Updates expense input to EUR

Updates the expense input fields to accept and display amounts in Euros instead of satoshis.

This change ensures that the amount field is configured to handle decimal values with a minimum value of €0.01.
This commit is contained in:
padreug 2025-11-07 21:36:22 +01:00 committed by Patrick Mulligan
parent e3a8c4b096
commit c934720bb9

View file

@ -80,18 +80,18 @@
<!-- Amount -->
<FormField v-slot="{ componentField }" name="amount">
<FormItem>
<FormLabel>Amount (sats) *</FormLabel>
<FormLabel>Amount (EUR) *</FormLabel>
<FormControl>
<Input
type="number"
placeholder="0"
placeholder="0.00"
v-bind="componentField"
min="1"
step="1"
min="0.01"
step="0.01"
/>
</FormControl>
<FormDescription>
Amount in satoshis
Amount in Euros
</FormDescription>
<FormMessage />
</FormItem>
@ -225,7 +225,7 @@ const isSubmitting = ref(false)
const formSchema = toTypedSchema(
z.object({
description: z.string().min(1, 'Description is required').max(500, 'Description too long'),
amount: z.coerce.number().min(1, 'Amount must be at least 1 sat'),
amount: z.coerce.number().min(0.01, 'Amount must be at least €0.01'),
reference: z.string().max(100, 'Reference too long').optional(),
isEquity: z.boolean().default(false)
})
@ -280,7 +280,7 @@ const onSubmit = form.handleSubmit(async (values) => {
is_equity: values.isEquity,
user_wallet: wallet.id,
reference: values.reference,
currency: 'sats'
currency: 'EUR'
})
// Show success message