diff --git a/client/src/App/ProductFruitsWrapper.jsx b/client/src/App/ProductFruitsWrapper.jsx
index 2d3cfbac7..2686a161e 100644
--- a/client/src/App/ProductFruitsWrapper.jsx
+++ b/client/src/App/ProductFruitsWrapper.jsx
@@ -27,6 +27,6 @@ ProductFruitsWrapper.propTypes = {
currentUser: PropTypes.shape({
authorized: PropTypes.bool,
email: PropTypes.string
- }).isRequired,
- workspaceCode: PropTypes.string.isRequired
+ }),
+ workspaceCode: PropTypes.string
};
diff --git a/client/src/components/production-board-kanban/defaultKanbanSettings.js b/client/src/components/production-board-kanban/defaultKanbanSettings.js
new file mode 100644
index 000000000..d06c67e83
--- /dev/null
+++ b/client/src/components/production-board-kanban/defaultKanbanSettings.js
@@ -0,0 +1,42 @@
+const statisticsItems = [
+ { id: 0, name: "totalHrs", label: "total_hours_in_production" },
+ { id: 1, name: "totalAmountInProduction", label: "total_amount_in_production" },
+ { id: 2, name: "totalLAB", label: "total_lab_in_production" },
+ { id: 3, name: "totalLAR", label: "total_lar_in_production" },
+ { id: 4, name: "jobsInProduction", label: "jobs_in_production" },
+ { id: 5, name: "totalHrsOnBoard", label: "total_hours_on_board" },
+ { id: 6, name: "totalAmountOnBoard", label: "total_amount_on_board" },
+ { id: 7, name: "totalLABOnBoard", label: "total_lab_on_board" },
+ { id: 8, name: "totalLAROnBoard", label: "total_lar_on_board" },
+ { id: 9, name: "jobsOnBoard", label: "total_jobs_on_board" }
+];
+
+const defaultKanbanSettings = {
+ ats: true,
+ clm_no: true,
+ compact: false,
+ ownr_nm: true,
+ sublets: true,
+ ins_co_nm: true,
+ production_note: true,
+ employeeassignments: true,
+ scheduled_completion: true,
+ cardcolor: false,
+ orientation: false,
+ cardSize: "small",
+ model_info: true,
+ kiosk: false,
+ totalHrs: true,
+ totalAmountInProduction: false,
+ totalLAB: true,
+ totalLAR: true,
+ jobsInProduction: true,
+ totalHrsOnBoard: false,
+ totalLABOnBoard: false,
+ totalLAROnBoard: false,
+ jobsOnBoard: false,
+ totalAmountOnBoard: true,
+ statisticsOrder: statisticsItems.map((item) => item.id)
+};
+
+export { defaultKanbanSettings, statisticsItems };
diff --git a/client/src/components/production-board-kanban/production-board-kanban.component.jsx b/client/src/components/production-board-kanban/production-board-kanban.component.jsx
index 1c02ab194..6f8932f94 100644
--- a/client/src/components/production-board-kanban/production-board-kanban.component.jsx
+++ b/client/src/components/production-board-kanban/production-board-kanban.component.jsx
@@ -21,6 +21,7 @@ import { createBoardData } from "./production-board-kanban.utils.js";
import ProductionBoardKanbanSettings from "./production-board-kanban.settings.component.jsx";
import cloneDeep from "lodash/cloneDeep";
import isEqual from "lodash/isEqual";
+import { defaultKanbanSettings } from "./defaultKanbanSettings.js";
const mapStateToProps = createStructuredSelector({
bodyshop: selectBodyshop
@@ -179,32 +180,7 @@ function ProductionBoardKanbanComponent({ data, bodyshop, refetch, insertAuditTr
() =>
associationSettings?.kanban_settings && Object.keys(associationSettings.kanban_settings).length > 0
? associationSettings.kanban_settings
- : {
- ats: true,
- clm_no: true,
- compact: false,
- ownr_nm: true,
- sublets: true,
- ins_co_nm: true,
- production_note: true,
- employeeassignments: true,
- scheduled_completion: true,
- cardcolor: false,
- orientation: false,
- cardSize: "small",
- model_info: true,
- kiosk: false,
- totalHrs: true,
- totalAmountInProduction: false,
- totalLAB: true,
- totalLAR: true,
- jobsInProduction: true,
- totalHrsOnBoard: false,
- totalLABOnBoard: false,
- totalLAROnBoard: false,
- jobsOnBoard: false,
- totalAmountOnBoard: true
- },
+ : defaultKanbanSettings,
[associationSettings]
);
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 39d60fa14..8c0b63bc6 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
@@ -1,15 +1,132 @@
-// ProductionBoardKanbanSettings.jsx
import { useMutation } from "@apollo/client";
-import { Button, Card, Checkbox, Col, Form, notification, Popover, Radio, Row } from "antd";
+import { Button, Card, Checkbox, Col, Form, notification, Popover, Radio, Row, Tabs } from "antd";
import React, { useEffect, useState } from "react";
import { useTranslation } from "react-i18next";
import { UPDATE_KANBAN_SETTINGS } from "../../graphql/user.queries";
+import { DragDropContext, Draggable, Droppable } from "./trello-board/dnd/lib";
+import { statisticsItems } from "./defaultKanbanSettings.js";
+
+const LayoutSettings = ({ t }) => (
+