add all suppress modal
All checks were successful
Deploy Amap / deploy (push) Successful in 41s

This commit is contained in:
Julien Aldon
2026-03-06 16:48:38 +01:00
parent 74bf1474e2
commit 46b369ecd9
39 changed files with 654 additions and 372 deletions

View File

@@ -34,7 +34,7 @@ export default function FormModal({ opened, onClose, currentForm, handleSubmit }
productor_id: currentForm?.productor?.id.toString() ?? "",
referer_id: currentForm?.referer?.id.toString() ?? "",
minimum_shipment_value: currentForm?.minimum_shipment_value ?? null,
visible: currentForm?.visible ?? false
visible: currentForm?.visible ?? false,
},
validate: {
name: (value) =>
@@ -53,8 +53,7 @@ export default function FormModal({ opened, onClose, currentForm, handleSubmit }
});
const usersSelect = useMemo(() => {
if (!users)
return [];
if (!users) return [];
return users?.map((user) => ({
value: String(user.id),
label: `${user.name}`,
@@ -62,8 +61,7 @@ export default function FormModal({ opened, onClose, currentForm, handleSubmit }
}, [users]);
const productorsSelect = useMemo(() => {
if (!productors)
return [];
if (!productors) return [];
return productors?.map((prod) => ({
value: String(prod.id),
label: `${prod.name}`,
@@ -142,10 +140,14 @@ export default function FormModal({ opened, onClose, currentForm, handleSubmit }
radius="sm"
{...form.getInputProps("minimum_shipment_value")}
/>
<Checkbox mt="lg"
label={t("visible", {capfirst: true})}
description={t("by checking this option the form will be accessible publicly on the home page, only check it if everything is fine with your form", {capfirst: true})}
{...form.getInputProps("visible", {type: "checkbox"})}
<Checkbox
mt="lg"
label={t("visible", { capfirst: true })}
description={t(
"by checking this option the form will be accessible publicly on the home page, only check it if everything is fine with your form",
{ capfirst: true },
)}
{...form.getInputProps("visible", { type: "checkbox" })}
/>
<Group mt="sm" justify="space-between">
<Button