Update EditPromotionForm.tsx
This commit is contained in:
@@ -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>
|
||||||
)}
|
)}
|
||||||
|
|||||||
Reference in New Issue
Block a user