@@ -12,7 +12,8 @@ import Icon, {
|
||||
FileAddOutlined,
|
||||
FileFilled,
|
||||
HomeFilled,
|
||||
ImportOutlined, InfoCircleOutlined,
|
||||
ImportOutlined,
|
||||
InfoCircleOutlined,
|
||||
LineChartOutlined,
|
||||
PaperClipOutlined,
|
||||
PhoneOutlined,
|
||||
@@ -64,7 +65,19 @@ const mapDispatchToProps = (dispatch) => ({
|
||||
dispatch(setModalContext({context: context, modal: "cardPayment"})),
|
||||
});
|
||||
|
||||
function Header({handleMenuClick, currentUser, bodyshop, selectedHeader, signOutStart, setBillEnterContext, setTimeTicketContext, setPaymentContext, setReportCenterContext, recentItems, setCardPaymentContext}) {
|
||||
function Header({
|
||||
handleMenuClick,
|
||||
currentUser,
|
||||
bodyshop,
|
||||
selectedHeader,
|
||||
signOutStart,
|
||||
setBillEnterContext,
|
||||
setTimeTicketContext,
|
||||
setPaymentContext,
|
||||
setReportCenterContext,
|
||||
recentItems,
|
||||
setCardPaymentContext
|
||||
}) {
|
||||
|
||||
const {treatments: {ImEXPay, DmsAp, Simple_Inventory}} = useSplitTreatments({
|
||||
attributes: {},
|
||||
@@ -76,7 +89,7 @@ function Header({handleMenuClick, currentUser, bodyshop, selectedHeader, signOut
|
||||
|
||||
useEffect(() => {
|
||||
const isBeta = checkBeta();
|
||||
setBetaSwitch(isBeta );
|
||||
setBetaSwitch(isBeta);
|
||||
}, []);
|
||||
|
||||
|
||||
@@ -186,7 +199,7 @@ function Header({handleMenuClick, currentUser, bodyshop, selectedHeader, signOut
|
||||
{
|
||||
key: 'receivables',
|
||||
label: (<Link to="/manage/accounting/receivables">{t("menus.header.accounting-receivables")}</Link>)
|
||||
}
|
||||
},
|
||||
]
|
||||
|
||||
if (!((bodyshop && bodyshop.cdk_dealerid) || (bodyshop && bodyshop.pbs_serialnumber)) || DmsAp.treatment === "on") {
|
||||
@@ -206,17 +219,20 @@ function Header({handleMenuClick, currentUser, bodyshop, selectedHeader, signOut
|
||||
});
|
||||
}
|
||||
|
||||
accountingExportChildren.push(
|
||||
{
|
||||
key: 'exportlogs',
|
||||
label: (<Link to="/manage/accounting/exportlogs">{t("menus.header.export-logs")}</Link>)
|
||||
},
|
||||
accountingExportChildren.push({
|
||||
type: 'divider',
|
||||
}, {
|
||||
key: 'exportlogs',
|
||||
label: (<Link to="/manage/accounting/exportlogs">{t("menus.header.export-logs")}</Link>)
|
||||
});
|
||||
|
||||
accountingChildren.push(
|
||||
{
|
||||
key: 'accountingexport',
|
||||
icon: <ExportOutlined/>,
|
||||
label: t("menus.header.export"),
|
||||
children: accountingExportChildren
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
const menuItems = [
|
||||
@@ -467,20 +483,20 @@ function Header({handleMenuClick, currentUser, bodyshop, selectedHeader, signOut
|
||||
];
|
||||
|
||||
|
||||
menuItems.push({
|
||||
key: 'beta-switch',
|
||||
style: { marginLeft: 'auto' },
|
||||
label: (
|
||||
<Tooltip title="A faster more modern ImEX Online is ready for you to try! You can switch back at any time.">
|
||||
<InfoCircleOutlined />
|
||||
<span style={{marginRight: 8}}>Try the new ImEX Online</span>
|
||||
<Switch
|
||||
checked={betaSwitch}
|
||||
onChange={betaSwitchChange}
|
||||
/>
|
||||
</Tooltip>
|
||||
)
|
||||
});
|
||||
menuItems.push({
|
||||
key: 'beta-switch',
|
||||
style: {marginLeft: 'auto'},
|
||||
label: (
|
||||
<Tooltip title="A faster more modern ImEX Online is ready for you to try! You can switch back at any time.">
|
||||
<InfoCircleOutlined/>
|
||||
<span style={{marginRight: 8}}>Try the new ImEX Online</span>
|
||||
<Switch
|
||||
checked={betaSwitch}
|
||||
onChange={betaSwitchChange}
|
||||
/>
|
||||
</Tooltip>
|
||||
)
|
||||
});
|
||||
|
||||
return (
|
||||
<Layout.Header>
|
||||
|
||||
Reference in New Issue
Block a user