This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user