Update EditPromotionForm.tsx

This commit is contained in:
NotII
2025-03-08 04:59:25 +00:00
parent de45a8ecfc
commit b8e6e1dfc0

View File

@@ -144,8 +144,11 @@ export default function EditPromotionForm({ promotion, onSuccess, onCancel }: Ed
<FormItem> <FormItem>
<FormLabel>Discount Type</FormLabel> <FormLabel>Discount Type</FormLabel>
<Select <Select
onValueChange={field.onChange} onValueChange={(value) => {
defaultValue={field.value} console.log("Selected discount type:", value);
field.onChange(value);
}}
value={field.value}
> >
<FormControl> <FormControl>
<SelectTrigger> <SelectTrigger>
@@ -157,6 +160,9 @@ export default function EditPromotionForm({ promotion, onSuccess, onCancel }: Ed
<SelectItem value="fixed">Fixed Amount (£)</SelectItem> <SelectItem value="fixed">Fixed Amount (£)</SelectItem>
</SelectContent> </SelectContent>
</Select> </Select>
<FormDescription>
Choose between percentage or fixed amount discount
</FormDescription>
<FormMessage /> <FormMessage />
</FormItem> </FormItem>
)} )}