feat(libra): surface the "Other" account hint as a warning callout
Move the "Use the Other account if you're not sure" guidance out of the plain instruction line and into a prominent amber Alert with a warning icon, on both the expense and income account-selection steps. Split the income i18n string into selectAccount + a new otherAccountHint key (en/fr/es + types).
This commit is contained in:
parent
9f8f2a233b
commit
4ec4cdf4ba
6 changed files with 24 additions and 7 deletions
|
|
@ -81,6 +81,12 @@
|
|||
<p class="text-sm text-muted-foreground mb-4">
|
||||
{{ t('libra.income.selectAccount') }}
|
||||
</p>
|
||||
<Alert class="mb-4 border-amber-500/50 bg-amber-50 text-amber-800 dark:border-amber-500/40 dark:bg-amber-950/30 dark:text-amber-200">
|
||||
<AlertTriangle class="text-amber-600 dark:text-amber-400" />
|
||||
<AlertDescription class="text-amber-800 dark:text-amber-200">
|
||||
{{ t('libra.income.otherAccountHint') }}
|
||||
</AlertDescription>
|
||||
</Alert>
|
||||
<AccountSelector
|
||||
v-model="selectedRevenueAccount"
|
||||
root-account="Income"
|
||||
|
|
@ -197,6 +203,7 @@ import { Button } from '@/components/ui/button'
|
|||
import { Input } from '@/components/ui/input'
|
||||
import { Textarea } from '@/components/ui/textarea'
|
||||
import { Badge } from '@/components/ui/badge'
|
||||
import { Alert, AlertDescription } from '@/components/ui/alert'
|
||||
import {
|
||||
FormControl,
|
||||
FormField,
|
||||
|
|
@ -218,7 +225,7 @@ import {
|
|||
DialogHeader,
|
||||
DialogTitle,
|
||||
} from '@/components/ui/dialog'
|
||||
import { TrendingUp, ChevronLeft, Loader2, CheckCircle2, Receipt, Clock } from 'lucide-vue-next'
|
||||
import { TrendingUp, ChevronLeft, Loader2, CheckCircle2, Receipt, Clock, AlertTriangle } from 'lucide-vue-next'
|
||||
import { injectService, SERVICE_TOKENS } from '@/core/di-container'
|
||||
import { useAuth } from '@/composables/useAuthService'
|
||||
import { useToast } from '@/core/composables/useToast'
|
||||
|
|
|
|||
|
|
@ -202,7 +202,8 @@ const messages: LocaleMessages = {
|
|||
income: {
|
||||
title: 'Add Income',
|
||||
description: 'Submit income for the organization',
|
||||
selectAccount: 'Select the revenue account. Use the "Other" account if you\'re not sure.',
|
||||
selectAccount: 'Select the revenue account.',
|
||||
otherAccountHint: 'Use the "Other" account if you\'re not sure.',
|
||||
submitIncome: 'Submit Income',
|
||||
notAvailable: 'Income submission is not yet available. This feature is coming soon.',
|
||||
},
|
||||
|
|
|
|||
|
|
@ -202,7 +202,8 @@ const messages: LocaleMessages = {
|
|||
income: {
|
||||
title: 'A\u00f1adir ingreso',
|
||||
description: 'Enviar un ingreso para la organizaci\u00f3n',
|
||||
selectAccount: 'Seleccionar la cuenta de ingresos. Use la cuenta "Other" si no está seguro.',
|
||||
selectAccount: 'Seleccionar la cuenta de ingresos.',
|
||||
otherAccountHint: 'Use la cuenta "Other" si no está seguro.',
|
||||
submitIncome: 'Enviar ingreso',
|
||||
notAvailable: 'El registro de ingresos a\u00fan no est\u00e1 disponible. Esta funci\u00f3n llegar\u00e1 pronto.',
|
||||
},
|
||||
|
|
|
|||
|
|
@ -202,7 +202,8 @@ const messages: LocaleMessages = {
|
|||
income: {
|
||||
title: 'Ajouter un revenu',
|
||||
description: 'Soumettre un revenu pour l\u2019organisation',
|
||||
selectAccount: 'S\u00e9lectionner le compte de revenus. Utilisez le compte "Other" si vous n\'\u00eates pas s\u00fbr.',
|
||||
selectAccount: 'S\u00e9lectionner le compte de revenus.',
|
||||
otherAccountHint: 'Utilisez le compte "Other" si vous n\'\u00eates pas s\u00fbr.',
|
||||
submitIncome: 'Soumettre le revenu',
|
||||
notAvailable: 'La saisie de revenus n\u2019est pas encore disponible. Cette fonctionnalit\u00e9 arrive bient\u00f4t.',
|
||||
},
|
||||
|
|
|
|||
|
|
@ -179,6 +179,7 @@ export interface LocaleMessages {
|
|||
title: string
|
||||
description: string
|
||||
selectAccount: string
|
||||
otherAccountHint: string
|
||||
submitIncome: string
|
||||
notAvailable: string
|
||||
}
|
||||
|
|
|
|||
|
|
@ -85,9 +85,14 @@
|
|||
<!-- Step 1: Account Selection -->
|
||||
<div v-if="currentStep === 1">
|
||||
<p class="text-sm text-muted-foreground mb-4">
|
||||
Select the account for this expense. Use the "Other" account if
|
||||
you're not sure.
|
||||
Select the account for this expense.
|
||||
</p>
|
||||
<Alert class="mb-4 border-amber-500/50 bg-amber-50 text-amber-800 dark:border-amber-500/40 dark:bg-amber-950/30 dark:text-amber-200">
|
||||
<AlertTriangle class="text-amber-600 dark:text-amber-400" />
|
||||
<AlertDescription class="text-amber-800 dark:text-amber-200">
|
||||
Use the "Other" account if you're not sure.
|
||||
</AlertDescription>
|
||||
</Alert>
|
||||
<AccountSelector
|
||||
v-model="selectedAccount"
|
||||
root-account="Expenses"
|
||||
|
|
@ -249,6 +254,7 @@ import { Input } from '@/components/ui/input'
|
|||
import { Textarea } from '@/components/ui/textarea'
|
||||
import { Checkbox } from '@/components/ui/checkbox'
|
||||
import { Badge } from '@/components/ui/badge'
|
||||
import { Alert, AlertDescription } from '@/components/ui/alert'
|
||||
import {
|
||||
FormControl,
|
||||
FormDescription,
|
||||
|
|
@ -271,7 +277,7 @@ import {
|
|||
DialogHeader,
|
||||
DialogTitle,
|
||||
} from '@/components/ui/dialog'
|
||||
import { DollarSign, ChevronLeft, Loader2, CheckCircle2, Receipt, Clock } from 'lucide-vue-next'
|
||||
import { DollarSign, ChevronLeft, Loader2, CheckCircle2, Receipt, Clock, AlertTriangle } from 'lucide-vue-next'
|
||||
import { injectService, SERVICE_TOKENS } from '@/core/di-container'
|
||||
import { useAuth } from '@/composables/useAuthService'
|
||||
import { useToast } from '@/core/composables/useToast'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue