mirror of
https://github.com/grassrootseconomics/farmstar-survey-ui.git
synced 2024-12-04 16:06:47 +01:00
fixes: cards alignment, error messages
This commit is contained in:
parent
e0e63aaa19
commit
85ca52d5ab
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div
|
||||
class="bg-white mx-2 p-4 rounded border border-gray-300 mb-4 md:min-w-[250px] md:w-full md:mx-0 lg:mx-4"
|
||||
class="lg:max-w-72 bg-white mx-1 p-4 rounded border border-gray-300 mb-4 md:min-w-[250px] md:w-full"
|
||||
>
|
||||
<h2 class="text-l font-bold mb-2">{{ title }}</h2>
|
||||
<p class="text-sm text-gray-600 mb-4">{{ subtitle }}</p>
|
||||
|
@ -152,7 +152,7 @@ const handleResponse = async (response, form$) => {
|
||||
if (response.status <= 201) {
|
||||
formSubmitted.value = true;
|
||||
} else {
|
||||
form$.messageBag.append(response.data?.message);
|
||||
form$.messageBag.append(response.data?.error);
|
||||
if (Object.keys(response.data.data)[0]?.message) {
|
||||
form$.messageBag.append(
|
||||
Object.keys(response.data.data)[0] +
|
||||
|
@ -21,4 +21,11 @@
|
||||
link="/transaction"
|
||||
/>
|
||||
</div>
|
||||
<div class="mt-4 flex flex-col md:flex-row">
|
||||
<Card
|
||||
title="Redeem your points"
|
||||
subtitle="For EverGrow organic fertilizer."
|
||||
link="/redeem"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -71,7 +71,7 @@
|
||||
:conditions="[['tx', 'sell']]"
|
||||
/>
|
||||
<TextElement
|
||||
name="evergrow_quantity"
|
||||
name="evergrow_quantity_purchase"
|
||||
label="How much EverGrow did you purchase?"
|
||||
description="in 50kg bags of EverGrow. 1x50kg bag = 1, 2x50kg bags = 2, etc."
|
||||
rules="required|numeric|min:1|max:20"
|
||||
@ -79,7 +79,7 @@
|
||||
:conditions="[['tx', 'buy']]"
|
||||
/>
|
||||
<TextElement
|
||||
name="evergrow_quantity"
|
||||
name="evergrow_quantity_sale"
|
||||
label="How much EverGrow did you sell?"
|
||||
description="in 50kg bags of EverGrow. 1x50kg bag = 1, 2x50kg bags = 2, etc."
|
||||
rules="required|numeric|min:1|max:20"
|
||||
@ -116,7 +116,7 @@ const handleResponse = async (response, form$) => {
|
||||
if (response.status <= 201) {
|
||||
formSubmitted.value = true;
|
||||
} else {
|
||||
form$.messageBag.append(response.data?.message);
|
||||
form$.messageBag.append(response.data?.error);
|
||||
if (Object.keys(response.data.data)[0]?.message) {
|
||||
form$.messageBag.append(
|
||||
Object.keys(response.data.data)[0] +
|
||||
|
Loading…
Reference in New Issue
Block a user