fix: oprava buildu
CI / Generate TypeScript types (push) Successful in 11s
CI / Generate TypeScript types (pull_request) Successful in 23s
CI / Server unit tests (push) Successful in 21s
CI / Build client (push) Successful in 34s
CI / Server unit tests (pull_request) Successful in 21s
CI / Build server (push) Successful in 1m4s
CI / Build server (pull_request) Successful in 25s
CI / Build client (pull_request) Successful in 1m40s
CI / Playwright E2E tests (push) Successful in 1m19s
CI / Build and push Docker image (push) Has been skipped
CI / Notify (push) Successful in 10s
CI / Playwright E2E tests (pull_request) Successful in 1m18s
CI / Build and push Docker image (pull_request) Has been skipped
CI / Notify (pull_request) Has been skipped
CI / Generate TypeScript types (push) Successful in 11s
CI / Generate TypeScript types (pull_request) Successful in 23s
CI / Server unit tests (push) Successful in 21s
CI / Build client (push) Successful in 34s
CI / Server unit tests (pull_request) Successful in 21s
CI / Build server (push) Successful in 1m4s
CI / Build server (pull_request) Successful in 25s
CI / Build client (pull_request) Successful in 1m40s
CI / Playwright E2E tests (push) Successful in 1m19s
CI / Build and push Docker image (push) Has been skipped
CI / Notify (push) Successful in 10s
CI / Playwright E2E tests (pull_request) Successful in 1m18s
CI / Build and push Docker image (pull_request) Has been skipped
CI / Notify (pull_request) Has been skipped
This commit is contained in:
@@ -56,18 +56,16 @@ export default function EditGroupFeesModal({ isOpen, onClose, group, onSaved }:
|
||||
setError(null);
|
||||
setLoading(true);
|
||||
try {
|
||||
const body: Record<string, any> = { id: group.id };
|
||||
body.fees = feesNum;
|
||||
body.shipping = shippingNum;
|
||||
body.tip = tipNum;
|
||||
if (discountNum > 0) {
|
||||
body.discountType = discountType;
|
||||
body.discountValue = discountNum;
|
||||
} else {
|
||||
body.discountType = '';
|
||||
body.discountValue = 0;
|
||||
}
|
||||
const res = await updateGroupFees({ body });
|
||||
const res = await updateGroupFees({
|
||||
body: {
|
||||
id: group.id,
|
||||
fees: feesNum,
|
||||
shipping: shippingNum,
|
||||
tip: tipNum,
|
||||
discountType: discountNum > 0 ? discountType : undefined,
|
||||
discountValue: discountNum > 0 ? discountNum : undefined,
|
||||
},
|
||||
});
|
||||
if (res.error) {
|
||||
setError((res.error as any).error || 'Nastala chyba');
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user