Merge branch 'main' of gitea.aldon.fr:Mop/amap
All checks were successful
Deploy Amap / deploy (push) Successful in 35s
All checks were successful
Deploy Amap / deploy (push) Successful in 35s
This commit is contained in:
@@ -274,7 +274,7 @@
|
|||||||
else ""}}
|
else ""}}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{{rec.product.quantity if rec.product.quantity != None else ""}}{{"g" if rec.product.unit == "1" else "kg" if
|
{{rec.quantity if rec.quantity != None else ""}}{{"g" if rec.product.unit == "1" else "kg" if
|
||||||
rec.product.unit == "2" else "p" }}
|
rec.product.unit == "2" else "p" }}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -317,7 +317,7 @@
|
|||||||
product.product.quantity_unit != None else ""}}
|
product.product.quantity_unit != None else ""}}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{{product.product.quantity if product.product.quantity != None
|
{{product.quantity if product.quantity != None
|
||||||
else ""}}{{"g" if product.product.unit == "1" else
|
else ""}}{{"g" if product.product.unit == "1" else
|
||||||
"kg" if product.product.unit == "2" else "p" }}
|
"kg" if product.product.unit == "2" else "p" }}
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ export function ContractCheque({ inputForm, price, productor }: ContractChequePr
|
|||||||
{ capfirst: true },
|
{ capfirst: true },
|
||||||
)}
|
)}
|
||||||
min={1}
|
min={1}
|
||||||
max={paymentMethod?.max || 3}
|
max={paymentMethod?.max && paymentMethod?.max !== "" ? Number(paymentMethod?.max) : 3}
|
||||||
{...inputForm.getInputProps(`cheque_quantity`)}
|
{...inputForm.getInputProps(`cheque_quantity`)}
|
||||||
/>
|
/>
|
||||||
<Group grow>
|
<Group grow>
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ export function ProductorModal({
|
|||||||
existing ?? {
|
existing ?? {
|
||||||
name,
|
name,
|
||||||
details: "",
|
details: "",
|
||||||
max: null,
|
max: "",
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -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();
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -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 = {
|
||||||
|
|||||||
Reference in New Issue
Block a user