🐛 fix(coupon): Rename 'server' field to 'subscribe' in coupon form and update coupon update request type
This commit is contained in:
parent
b01a5bc83b
commit
f8b6d82780
@ -235,7 +235,7 @@ export default function CouponForm<T extends Record<string, any>>({
|
||||
)}
|
||||
<FormField
|
||||
control={form.control}
|
||||
name='server'
|
||||
name='subscribe'
|
||||
render={({ field }) => (
|
||||
<FormItem>
|
||||
<FormLabel>{t('form.specifiedServer')}</FormLabel>
|
||||
|
||||
@ -96,9 +96,9 @@ export default function Page() {
|
||||
defaultChecked={row.getValue('enable')}
|
||||
onCheckedChange={async (checked) => {
|
||||
await updateCoupon({
|
||||
...row,
|
||||
...row.original,
|
||||
enable: checked,
|
||||
} as any);
|
||||
} as API.UpdateCouponRequest);
|
||||
ref.current?.refresh();
|
||||
}}
|
||||
/>
|
||||
|
||||
@ -100,7 +100,7 @@ export function Combobox<T, M extends boolean = false>({
|
||||
{options.map((option) => (
|
||||
<CommandItem
|
||||
key={String(option.label + option.value)}
|
||||
value={option.label}
|
||||
value={option.label + option.value}
|
||||
onSelect={() => handleSelect(option.value)}
|
||||
>
|
||||
{option.children || option.label}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user