mirror of
https://github.com/perfect-panel/ppanel-web.git
synced 2026-02-16 13:21:10 -05:00
🐛 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
|
<FormField
|
||||||
control={form.control}
|
control={form.control}
|
||||||
name='server'
|
name='subscribe'
|
||||||
render={({ field }) => (
|
render={({ field }) => (
|
||||||
<FormItem>
|
<FormItem>
|
||||||
<FormLabel>{t('form.specifiedServer')}</FormLabel>
|
<FormLabel>{t('form.specifiedServer')}</FormLabel>
|
||||||
|
|||||||
@ -96,9 +96,9 @@ export default function Page() {
|
|||||||
defaultChecked={row.getValue('enable')}
|
defaultChecked={row.getValue('enable')}
|
||||||
onCheckedChange={async (checked) => {
|
onCheckedChange={async (checked) => {
|
||||||
await updateCoupon({
|
await updateCoupon({
|
||||||
...row,
|
...row.original,
|
||||||
enable: checked,
|
enable: checked,
|
||||||
} as any);
|
} as API.UpdateCouponRequest);
|
||||||
ref.current?.refresh();
|
ref.current?.refresh();
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@ -100,7 +100,7 @@ export function Combobox<T, M extends boolean = false>({
|
|||||||
{options.map((option) => (
|
{options.map((option) => (
|
||||||
<CommandItem
|
<CommandItem
|
||||||
key={String(option.label + option.value)}
|
key={String(option.label + option.value)}
|
||||||
value={option.label}
|
value={option.label + option.value}
|
||||||
onSelect={() => handleSelect(option.value)}
|
onSelect={() => handleSelect(option.value)}
|
||||||
>
|
>
|
||||||
{option.children || option.label}
|
{option.children || option.label}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user