diff --git a/client/src/components/header/header.component.jsx b/client/src/components/header/header.component.jsx
index 3ba45ca94..a1a567b9b 100644
--- a/client/src/components/header/header.component.jsx
+++ b/client/src/components/header/header.component.jsx
@@ -1,430 +1,469 @@
import Icon, {
- BankFilled,
- BarChartOutlined,
- CarFilled,
- CheckCircleOutlined,
- ClockCircleFilled,
- DashboardFilled,
- DollarCircleFilled,
- ExportOutlined,
- FieldTimeOutlined,
- FileAddFilled,
- FileAddOutlined,
- FileFilled,
- //GlobalOutlined,
- HomeFilled,
- ImportOutlined,
- LineChartOutlined,
- PaperClipOutlined,
- PhoneOutlined,
- QuestionCircleFilled,
- ScheduleOutlined,
- SettingOutlined,
- TeamOutlined,
- ToolFilled,
- UnorderedListOutlined,
- UserOutlined,
+ BankFilled,
+ BarChartOutlined,
+ CarFilled,
+ CheckCircleOutlined,
+ ClockCircleFilled,
+ DashboardFilled,
+ DollarCircleFilled,
+ ExportOutlined,
+ FieldTimeOutlined,
+ FileAddFilled,
+ FileAddOutlined,
+ FileFilled,
+ HomeFilled,
+ ImportOutlined,
+ LineChartOutlined,
+ PaperClipOutlined,
+ PhoneOutlined,
+ QuestionCircleFilled,
+ ScheduleOutlined,
+ SettingOutlined,
+ TeamOutlined,
+ ToolFilled,
+ UnorderedListOutlined,
+ UserOutlined,
} from "@ant-design/icons";
import {useSplitTreatments} from "@splitsoftware/splitio-react";
-import { Layout, Menu } from "antd";
+import {Layout, Menu} from "antd";
import React from "react";
-import { useTranslation } from "react-i18next";
-import { BsKanban } from "react-icons/bs";
-import {
- FaCalendarAlt,
- FaCarCrash,
- FaCreditCard,
- FaFileInvoiceDollar,
-} from "react-icons/fa";
-import { GiPayMoney, GiPlayerTime, GiSettingsKnobs } from "react-icons/gi";
-import { IoBusinessOutline } from "react-icons/io5";
-import { RiSurveyLine } from "react-icons/ri";
-import { connect } from "react-redux";
-import { Link } from "react-router-dom";
-import { createStructuredSelector } from "reselect";
-import {
- selectRecentItems,
- selectSelectedHeader,
-} from "../../redux/application/application.selectors";
-import { setModalContext } from "../../redux/modals/modals.actions";
-import { signOutStart } from "../../redux/user/user.actions";
-import {
- selectBodyshop,
- selectCurrentUser,
-} from "../../redux/user/user.selectors";
+import {useTranslation} from "react-i18next";
+import {BsKanban} from "react-icons/bs";
+import {FaCalendarAlt, FaCarCrash, FaCreditCard, FaFileInvoiceDollar,} from "react-icons/fa";
+import {GiPayMoney, GiPlayerTime, GiSettingsKnobs} from "react-icons/gi";
+import {IoBusinessOutline} from "react-icons/io5";
+import {RiSurveyLine} from "react-icons/ri";
+import {connect} from "react-redux";
+import {Link} from "react-router-dom";
+import {createStructuredSelector} from "reselect";
+import {selectRecentItems, selectSelectedHeader,} from "../../redux/application/application.selectors";
+import {setModalContext} from "../../redux/modals/modals.actions";
+import {signOutStart} from "../../redux/user/user.actions";
+import {selectBodyshop, selectCurrentUser,} from "../../redux/user/user.selectors";
+import {FiLogOut} from "react-icons/fi";
const mapStateToProps = createStructuredSelector({
- currentUser: selectCurrentUser,
- recentItems: selectRecentItems,
- selectedHeader: selectSelectedHeader,
- bodyshop: selectBodyshop,
+ currentUser: selectCurrentUser,
+ recentItems: selectRecentItems,
+ selectedHeader: selectSelectedHeader,
+ bodyshop: selectBodyshop,
});
const mapDispatchToProps = (dispatch) => ({
- setBillEnterContext: (context) =>
- dispatch(setModalContext({ context: context, modal: "billEnter" })),
- setTimeTicketContext: (context) =>
- dispatch(setModalContext({ context: context, modal: "timeTicket" })),
- setPaymentContext: (context) =>
- dispatch(setModalContext({ context: context, modal: "payment" })),
- setReportCenterContext: (context) =>
- dispatch(setModalContext({ context: context, modal: "reportCenter" })),
- signOutStart: () => dispatch(signOutStart()),
- setCardPaymentContext: (context) =>
- dispatch(setModalContext({ context: context, modal: "cardPayment" })),
+ setBillEnterContext: (context) =>
+ dispatch(setModalContext({context: context, modal: "billEnter"})),
+ setTimeTicketContext: (context) =>
+ dispatch(setModalContext({context: context, modal: "timeTicket"})),
+ setPaymentContext: (context) =>
+ dispatch(setModalContext({context: context, modal: "payment"})),
+ setReportCenterContext: (context) =>
+ dispatch(setModalContext({context: context, modal: "reportCenter"})),
+ signOutStart: () => dispatch(signOutStart()),
+ setCardPaymentContext: (context) =>
+ dispatch(setModalContext({context: context, modal: "cardPayment"})),
});
-function Header({
- handleMenuClick,
- currentUser,
- bodyshop,
- selectedHeader,
- signOutStart,
- setBillEnterContext,
- setTimeTicketContext,
- setPaymentContext,
- setReportCenterContext,
- recentItems,
- setCardPaymentContext,
-}) {
- // TODO: Client Update - New Split Treatments usage example
- const { treatments: {ImEXPay, DmsAp, Simple_Inventory} } = useSplitTreatments({
- attributes: {},
- names: ["ImEXPay", "DmsAp", "Simple_Inventory"],
- splitKey: bodyshop && bodyshop.imexshopid,
- });
+function Header({handleMenuClick, currentUser, bodyshop, selectedHeader, signOutStart, setBillEnterContext, setTimeTicketContext, setPaymentContext, setReportCenterContext, recentItems, setCardPaymentContext}) {
- const { t } = useTranslation();
+ const {treatments: {ImEXPay, DmsAp, Simple_Inventory}} = useSplitTreatments({
+ attributes: {},
+ names: ["ImEXPay", "DmsAp", "Simple_Inventory"],
+ splitKey: bodyshop && bodyshop.imexshopid,
+ });
- return (
-
-
-
- );
+ {
+ key: 'readyjobs',
+ icon: ,
+ label: ({t("menus.header.readyjobs")})
+ },
+ {
+ key: 'parts-queue',
+ icon: ,
+ label: ({t("menus.header.parts-queue")})
+ },
+ {
+ key: 'availablejobs',
+ icon: ,
+ label: ({t("menus.header.availablejobs")})
+ },
+ {
+ key: 'newjob',
+ icon: ,
+ label: ({t("menus.header.newjob")})
+ },
+ {
+ type: 'divider',
+ },
+ {
+ key: 'alljobs',
+ icon: ,
+ label: ({t("menus.header.alljobs")})
+ },
+ {
+ key: 'productionlist',
+ icon: ,
+ label: ({t("menus.header.productionlist")})
+ },
+ {
+ key: 'productionboard',
+ icon: ,
+ label: ({t("menus.header.productionboard")})
+ },
+ {
+ type: 'divider',
+ },
+ {
+ key: 'scoreboard',
+ icon: ,
+ label: ({t("menus.header.scoreboard")})
+ },
+ ]
+ },
+ {
+ key: 'customers',
+ icon: ,
+ label: t("menus.header.customers"),
+ children: [
+ {
+ key: 'owners',
+ icon: ,
+ label: ({t("menus.header.owners")})
+ },
+ {
+ key: 'vehicles',
+ icon: ,
+ label: ({t("menus.header.vehicles")})
+ },
+ ]
+ },
+ {
+ key: 'ccs',
+ icon: ,
+ label: t("menus.header.courtesycars"),
+ children: [
+ {
+ key: 'courtesycarsall',
+ icon: ,
+ label: ({t("menus.header.courtesycars-all")})
+ },
+ {
+ key: 'contracts',
+ icon: ,
+ label: ({t("menus.header.courtesycars-contracts")})
+ },
+ {
+ key: 'newcontract',
+ icon: ,
+ label: ({t("menus.header.courtesycars-newcontract")})
+ },
+ ]
+ },
+ {
+ key: 'accounting',
+ icon: ,
+ label: t("menus.header.accounting"),
+ children: accountingChildren,
+ },
+ {
+ key: 'phonebook',
+ icon: ,
+ label: ({t("menus.header.phonebook")})
+ },
+ {
+ key: 'temporarydocs',
+ icon: ,
+ label: ({t("menus.header.temporarydocs")})
+ },
+ {
+ key: 'shopsubmenu',
+ icon: ,
+ label: t("menus.header.shop"),
+ children: [
+ {
+ key: 'shop',
+ icon: ,
+ label: ({t("menus.header.shop_config")})
+ },
+ {
+ key: 'dashboard',
+ icon: ,
+ label: ({t("menus.header.dashboard")})
+ },
+ {
+ key: 'reportcenter',
+ icon: ,
+ label: t("menus.header.reportcenter"),
+ onClick: () => {
+ setReportCenterContext({
+ actions: {},
+ context: {},
+ });
+ }
+ },
+ {
+ key: 'shop-vendors',
+ icon: ,
+ label: ({t("menus.header.shop_vendors")})
+ },
+ {
+ key: 'shop-csi',
+ icon: ,
+ label: ({t("menus.header.shop_csi")})
+ },
+ ]
+ },
+ {
+ key: 'user',
+ label: (
+ currentUser.displayName ||
+ currentUser.email ||
+ t("general.labels.unknown")
+ ),
+ children: [
+ {
+ key: 'signout',
+ icon: ,
+ danger: true,
+ label: t("user.actions.signout"),
+ onClick: () => signOutStart()
+ },
+ {
+ key: 'help',
+ icon: ,
+ label: t("menus.header.help"),
+ onClick: () => {
+ window.open("https://help.imex.online/", "_blank");
+ }
+ },
+ {
+ key: 'rescue',
+ icon: ,
+ label: t("menus.header.rescueme"),
+ onClick: () => {
+ window.open("https://imexrescue.com/", "_blank");
+ }
+ },
+ {
+ key: 'shiftclock',
+ icon: ,
+ label: ({t("menus.header.shiftclock")})
+ },
+ {
+ key: 'profile',
+ icon: ,
+ label: ({t("menus.currentuser.profile")})
+ },
+ // {
+ // key: 'langselecter',
+ // label: t("menus.currentuser.languageselector"),
+ // children: [
+ // {
+ // key: 'en-US',
+ // label: t("general.languages.english"),
+ // onClick: () => {
+ // window.location.href = "/?lang=en-US";
+ // }
+ // },
+ // {
+ // key: 'fr-CA',
+ // label: t("general.languages.french"),
+ // onClick: () => {
+ // window.location.href = "/?lang=fr-CA";
+ // }
+ // },
+ // {
+ // key: 'es-MX',
+ // label: t("general.languages.spanish"),
+ // onClick: () => {
+ // window.location.href = "/?lang=es-MX";
+ // }
+ // },
+ // ]
+ // },
+ ]
+ },
+ {
+ key: 'recent',
+ icon: ,
+ children: recentItems.map((i, idx) => ({
+ key: idx,
+ label: ({i.label})
+
+ })),
+ }
+ ]
+
+ return (
+
+
+
+
+ );
}
export default connect(mapStateToProps, mapDispatchToProps)(Header);
diff --git a/client/src/components/job-at-change/schedule-event.color.component.jsx b/client/src/components/job-at-change/schedule-event.color.component.jsx
index d997834e3..7d72ef71f 100644
--- a/client/src/components/job-at-change/schedule-event.color.component.jsx
+++ b/client/src/components/job-at-change/schedule-event.color.component.jsx
@@ -54,7 +54,7 @@ export function ScheduleEventColor({ bodyshop, event }) {
label: color.label,
style: { color: color.color.hex },
})),
- { key: "divider", label:
, disabled: true },
+ { type: "divider" },
{ key: "null", label: t("general.actions.clear") },
]
};
diff --git a/client/src/components/job-detail-lines/job-lines.component.jsx b/client/src/components/job-detail-lines/job-lines.component.jsx
index 0aaf1d953..b1c67ac1b 100644
--- a/client/src/components/job-detail-lines/job-lines.component.jsx
+++ b/client/src/components/job-detail-lines/job-lines.component.jsx
@@ -416,7 +416,7 @@ export function JobLinesComponent({
{ key: "PAN", label: t("joblines.fields.part_types.PAN") },
{ key: "PAL", label: t("joblines.fields.part_types.PAL") },
{ key: "PAS", label: t("joblines.fields.part_types.PAS") },
- { key: "divider", label:
, disabled: true },
+ { type: 'divider' },
{ key: "clear", label: t("general.labels.clear") },
]
}
diff --git a/client/src/components/jobs-change-status/jobs-change-status.component.jsx b/client/src/components/jobs-change-status/jobs-change-status.component.jsx
index 724e57cc0..13ae86721 100644
--- a/client/src/components/jobs-change-status/jobs-change-status.component.jsx
+++ b/client/src/components/jobs-change-status/jobs-change-status.component.jsx
@@ -89,7 +89,7 @@ export function JobsChangeStatus({ job, bodyshop, jobRO, insertAuditTrail }) {
})),
...(job.converted
? [
- { key: "divider", label:
, disabled: true },
+ { type: "divider" },
...otherStages.map((item) => ({
key: item,
label: item,