fix cheque validation
Some checks failed
Deploy Amap / deploy (push) Failing after 15s

This commit is contained in:
2026-02-20 18:13:47 +01:00
parent 85a70da07d
commit 41552a889f
3 changed files with 15 additions and 3 deletions

View File

@@ -109,7 +109,7 @@ export function ProductorModal({
existing ?? { existing ?? {
name, name,
details: "", details: "",
max: null, max: "",
} }
); );
}), }),

View File

@@ -58,6 +58,11 @@ export default function Productors() {
async (productor: ProductorInputs) => { async (productor: ProductorInputs) => {
await createProductorMutation.mutateAsync({ await createProductorMutation.mutateAsync({
...productor, ...productor,
payment_methods: productor.payment_methods.map((payment) =>( {
name: payment.name,
details: payment.details,
max: payment.max === "" ? null : payment.max
}))
}); });
closeModal(); closeModal();
}, },
@@ -69,7 +74,14 @@ export default function Productors() {
if (!id) return; if (!id) return;
await editProductorMutation.mutateAsync({ await editProductorMutation.mutateAsync({
id: id, id: id,
productor: productor, productor: {
...productor,
payment_methods: productor.payment_methods.map((payment) =>( {
name: payment.name,
details: payment.details,
max: payment.max === "" ? null : payment.max
}))
},
}); });
closeModal(); closeModal();
}, },

View File

@@ -9,7 +9,7 @@ export const PaymentMethods = [
export type PaymentMethod = { export type PaymentMethod = {
name: string; name: string;
details: string; details: string;
max: number | null; max: number | string | null;
}; };
export type Productor = { export type Productor = {