From c33a3118bc95e0a8340cde2608bf46558b1e8b5e Mon Sep 17 00:00:00 2001 From: Dave Date: Tue, 24 Mar 2026 11:51:55 -0400 Subject: [PATCH] IO-3624 Polish remaining shop config section cards --- .../shop-info/shop-info.intake.component.jsx | 121 ++++++----- ...p-info.notifications-autoadd.component.jsx | 75 +++---- .../shop-info/shop-info.rbac.component.jsx | 2 +- .../shop-info/shop-info.roguard.component.jsx | 2 +- .../shop-info.rostatus.component.jsx | 188 +++++++++--------- .../shop-info.speedprint.component.jsx | 188 +++++++++--------- .../shop-info.task-presets.component.jsx | 2 +- .../shop-intellipay-config.component.jsx | 4 +- client/src/translations/en_us/common.json | 7 + 9 files changed, 302 insertions(+), 287 deletions(-) diff --git a/client/src/components/shop-info/shop-info.intake.component.jsx b/client/src/components/shop-info/shop-info.intake.component.jsx index cf04dcf5b..6b23defc9 100644 --- a/client/src/components/shop-info/shop-info.intake.component.jsx +++ b/client/src/components/shop-info/shop-info.intake.component.jsx @@ -22,6 +22,66 @@ export default function ShopInfoIntakeChecklistComponent({ form }) { const deliverChecklistItems = Form.useWatch(["deliverchecklist", "form"], form) || []; return (
+ + + + ({ + value: TemplateListGenerated[i].key, + label: TemplateListGenerated[i].title + }))} + /> + + + + + + {(fields, { add, remove, move }) => { @@ -163,34 +223,6 @@ export default function ShopInfoIntakeChecklistComponent({ form }) { }} - - - ({ - value: TemplateListGenerated[i].key, - label: TemplateListGenerated[i].title - }))} - /> - - - - -
); } diff --git a/client/src/components/shop-info/shop-info.notifications-autoadd.component.jsx b/client/src/components/shop-info/shop-info.notifications-autoadd.component.jsx index 45a8ef838..3647cc95c 100644 --- a/client/src/components/shop-info/shop-info.notifications-autoadd.component.jsx +++ b/client/src/components/shop-info/shop-info.notifications-autoadd.component.jsx @@ -1,6 +1,7 @@ import { Form, Typography } from "antd"; import { useTranslation } from "react-i18next"; import EmployeeSearchSelectComponent from "../employee-search-select/employee-search-select.component.jsx"; +import LayoutFormRow from "../layout-form-row/layout-form-row.component"; const { Text, Paragraph } = Typography; @@ -11,43 +12,45 @@ export default function ShopInfoNotificationsAutoadd({ bodyshop }) { const employeeOptions = bodyshop?.employees?.filter((e) => e.active && e.user_email && e.id) || []; return ( -
- {t("bodyshop.fields.notifications.description")} - {t("bodyshop.labels.notifications.followers")} - {employeeOptions.length > 0 ? ( - (value || []).filter((id) => typeof id === "string" && id.trim() !== "")} - name="notification_followers" - rules={[ - { - type: "array", - message: t("general.validation.array") - }, - { - validator: async (_, value) => { - if (!value || value.length === 0) { - return Promise.resolve(); // Allow empty array + +
+ {t("bodyshop.fields.notifications.description")} + {t("bodyshop.labels.notifications.followers")} + {employeeOptions.length > 0 ? ( + (value || []).filter((id) => typeof id === "string" && id.trim() !== "")} + name="notification_followers" + rules={[ + { + type: "array", + message: t("general.validation.array") + }, + { + validator: async (_, value) => { + if (!value || value.length === 0) { + return Promise.resolve(); // Allow empty array + } + const hasInvalid = value.some((id) => id == null || typeof id !== "string" || id.trim() === ""); + if (hasInvalid) { + return Promise.reject(new Error(t("bodyshop.fields.notifications.invalid_followers"))); + } + return Promise.resolve(); } - const hasInvalid = value.some((id) => id == null || typeof id !== "string" || id.trim() === ""); - if (hasInvalid) { - return Promise.reject(new Error(t("bodyshop.fields.notifications.invalid_followers"))); - } - return Promise.resolve(); } - } - ]} - > - - - ) : ( - {t("bodyshop.fields.no_employees_available")} - )} -
+ ]} + > + +
+ ) : ( + {t("bodyshop.fields.no_employees_available")} + )} +
+ ); } diff --git a/client/src/components/shop-info/shop-info.rbac.component.jsx b/client/src/components/shop-info/shop-info.rbac.component.jsx index c0377cc17..1e24355ec 100644 --- a/client/src/components/shop-info/shop-info.rbac.component.jsx +++ b/client/src/components/shop-info/shop-info.rbac.component.jsx @@ -27,7 +27,7 @@ export function ShopInfoRbacComponent({ bodyshop }) { }); return ( - + {[ ...(HasFeatureAccess({ featureName: "export", bodyshop }) ? [ diff --git a/client/src/components/shop-info/shop-info.roguard.component.jsx b/client/src/components/shop-info/shop-info.roguard.component.jsx index a8b6e983e..117f5e92a 100644 --- a/client/src/components/shop-info/shop-info.roguard.component.jsx +++ b/client/src/components/shop-info/shop-info.roguard.component.jsx @@ -21,7 +21,7 @@ export default function ShopInfoRoGuard({ form }) { {() => { const disabled = !form.getFieldValue(["md_ro_guard", "enabled"]); return ( - + - - ({ value: item, label: item }))} /> - - - ({ value: item, label: item }))} /> - - - ({ value: item, label: item }))} /> - - - + + + ({ value: item, label: item }))} /> + + + ({ value: item, label: item }))} /> + + + ({ value: item, label: item }))} /> + + + + - {(fields, { add, remove, move }) => { - return ( -
- {fields.map((field, index) => { - const speedPrintItem = speedPrintItems[field.name] || {}; + + + {(fields, { add, remove, move }) => { + return ( +
+ {fields.map((field, index) => { + const speedPrintItem = speedPrintItems[field.name] || {}; - return ( - - -