Update NewPromotionForm.tsx
This commit is contained in:
@@ -137,8 +137,11 @@ export default function NewPromotionForm({ onSuccess, onCancel }: NewPromotionFo
|
||||
<FormItem>
|
||||
<FormLabel>Discount Type</FormLabel>
|
||||
<Select
|
||||
onValueChange={field.onChange}
|
||||
defaultValue={field.value}
|
||||
onValueChange={(value) => {
|
||||
console.log("Selected discount type:", value);
|
||||
field.onChange(value);
|
||||
}}
|
||||
value={field.value}
|
||||
>
|
||||
<FormControl>
|
||||
<SelectTrigger>
|
||||
@@ -150,6 +153,9 @@ export default function NewPromotionForm({ onSuccess, onCancel }: NewPromotionFo
|
||||
<SelectItem value="fixed">Fixed Amount (£)</SelectItem>
|
||||
</SelectContent>
|
||||
</Select>
|
||||
<FormDescription>
|
||||
Choose between percentage or fixed amount discount
|
||||
</FormDescription>
|
||||
<FormMessage />
|
||||
</FormItem>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user