diff --git a/client/src/components/production-board-kanban/production-board-kanban.settings.component.jsx b/client/src/components/production-board-kanban/production-board-kanban.settings.component.jsx index b4519d1fd..d5cadf5f9 100644 --- a/client/src/components/production-board-kanban/production-board-kanban.settings.component.jsx +++ b/client/src/components/production-board-kanban/production-board-kanban.settings.component.jsx @@ -14,8 +14,8 @@ const LayoutSettings = ({ t }) => ( name: "orientation", label: t("production.labels.orientation"), options: [ - { value: "vertical", label: t("production.labels.vertical") }, - { value: "horizontal", label: t("production.labels.horizontal") } + { value: true, label: t("production.labels.vertical") }, + { value: false, label: t("production.labels.horizontal") } ] }, { @@ -31,24 +31,24 @@ const LayoutSettings = ({ t }) => ( name: "compact", label: t("production.labels.compact"), options: [ - { value: "tall", label: t("production.labels.tall") }, - { value: "wide", label: t("production.labels.wide") } + { value: true, label: t("production.labels.tall") }, + { value: false, label: t("production.labels.wide") } ] }, { name: "cardcolor", label: t("production.labels.cardcolor"), options: [ - { value: "on", label: t("production.labels.on") }, - { value: "off", label: t("production.labels.off") } + { value: true, label: t("production.labels.on") }, + { value: false, label: t("production.labels.off") } ] }, { name: "kiosk", label: t("production.labels.kiosk_mode"), options: [ - { value: "on", label: t("production.labels.on") }, - { value: "off", label: t("production.labels.off") } + { value: true, label: t("production.labels.on") }, + { value: false, label: t("production.labels.off") } ] } ].map(({ name, label, options }) => ( @@ -56,7 +56,7 @@ const LayoutSettings = ({ t }) => ( {options.map((option) => ( - + {option.label} ))} @@ -67,6 +67,7 @@ const LayoutSettings = ({ t }) => ( ); + const InformationSettings = ({ t }) => ( @@ -162,7 +163,7 @@ export default function ProductionBoardKanbanSettings({ associationSettings, par const result = await updateKbSettings({ variables: { id: associationSettings?.id, - ks: { ...values, statisticsOrder } + ks: { ...associationSettings.kanban_settings, ...values, statisticsOrder } } }); @@ -183,6 +184,15 @@ export default function ProductionBoardKanbanSettings({ associationSettings, par const handleValuesChange = () => setHasChanges(true); + const handleRestoreDefaults = () => { + form.setFieldsValue({ + ...defaultKanbanSettings, + statisticsOrder: defaultKanbanSettings.statisticsOrder + }); + setStatisticsOrder(defaultKanbanSettings.statisticsOrder); + setHasChanges(true); + }; + const overlay = (
@@ -219,6 +229,11 @@ export default function ProductionBoardKanbanSettings({ associationSettings, par {t("general.actions.cancel")} + + +