@@ -16,15 +16,7 @@ export default connect(mapStateToProps, mapDispatchToProps)(FormDatePicker);
|
|||||||
|
|
||||||
const dateFormat = "MM/DD/YYYY";
|
const dateFormat = "MM/DD/YYYY";
|
||||||
|
|
||||||
export function FormDatePicker({
|
export function FormDatePicker({bodyshop, value, onChange, onBlur, onlyFuture, isDateOnly = true, ...restProps }) {
|
||||||
bodyshop,
|
|
||||||
value,
|
|
||||||
onChange,
|
|
||||||
onBlur,
|
|
||||||
onlyFuture,
|
|
||||||
isDateOnly = true,
|
|
||||||
...restProps
|
|
||||||
}) {
|
|
||||||
const ref = useRef();
|
const ref = useRef();
|
||||||
|
|
||||||
const handleChange = (newDate) => {
|
const handleChange = (newDate) => {
|
||||||
|
|||||||
@@ -12,7 +12,8 @@ import Icon, {
|
|||||||
FileAddOutlined,
|
FileAddOutlined,
|
||||||
FileFilled,
|
FileFilled,
|
||||||
HomeFilled,
|
HomeFilled,
|
||||||
ImportOutlined, InfoCircleOutlined,
|
ImportOutlined,
|
||||||
|
InfoCircleOutlined,
|
||||||
LineChartOutlined,
|
LineChartOutlined,
|
||||||
PaperClipOutlined,
|
PaperClipOutlined,
|
||||||
PhoneOutlined,
|
PhoneOutlined,
|
||||||
@@ -64,7 +65,19 @@ const mapDispatchToProps = (dispatch) => ({
|
|||||||
dispatch(setModalContext({context: context, modal: "cardPayment"})),
|
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({
|
const {treatments: {ImEXPay, DmsAp, Simple_Inventory}} = useSplitTreatments({
|
||||||
attributes: {},
|
attributes: {},
|
||||||
@@ -76,7 +89,7 @@ function Header({handleMenuClick, currentUser, bodyshop, selectedHeader, signOut
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const isBeta = checkBeta();
|
const isBeta = checkBeta();
|
||||||
setBetaSwitch(isBeta );
|
setBetaSwitch(isBeta);
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
|
||||||
@@ -186,7 +199,7 @@ function Header({handleMenuClick, currentUser, bodyshop, selectedHeader, signOut
|
|||||||
{
|
{
|
||||||
key: 'receivables',
|
key: 'receivables',
|
||||||
label: (<Link to="/manage/accounting/receivables">{t("menus.header.accounting-receivables")}</Link>)
|
label: (<Link to="/manage/accounting/receivables">{t("menus.header.accounting-receivables")}</Link>)
|
||||||
}
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
if (!((bodyshop && bodyshop.cdk_dealerid) || (bodyshop && bodyshop.pbs_serialnumber)) || DmsAp.treatment === "on") {
|
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(
|
accountingExportChildren.push({
|
||||||
{
|
type: 'divider',
|
||||||
key: 'exportlogs',
|
}, {
|
||||||
label: (<Link to="/manage/accounting/exportlogs">{t("menus.header.export-logs")}</Link>)
|
key: 'exportlogs',
|
||||||
},
|
label: (<Link to="/manage/accounting/exportlogs">{t("menus.header.export-logs")}</Link>)
|
||||||
|
});
|
||||||
|
|
||||||
|
accountingChildren.push(
|
||||||
{
|
{
|
||||||
key: 'accountingexport',
|
key: 'accountingexport',
|
||||||
icon: <ExportOutlined/>,
|
icon: <ExportOutlined/>,
|
||||||
label: t("menus.header.export"),
|
label: t("menus.header.export"),
|
||||||
children: accountingExportChildren
|
children: accountingExportChildren
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
const menuItems = [
|
const menuItems = [
|
||||||
@@ -467,20 +483,20 @@ function Header({handleMenuClick, currentUser, bodyshop, selectedHeader, signOut
|
|||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
menuItems.push({
|
menuItems.push({
|
||||||
key: 'beta-switch',
|
key: 'beta-switch',
|
||||||
style: { marginLeft: 'auto' },
|
style: {marginLeft: 'auto'},
|
||||||
label: (
|
label: (
|
||||||
<Tooltip title="A faster more modern ImEX Online is ready for you to try! You can switch back at any time.">
|
<Tooltip title="A faster more modern ImEX Online is ready for you to try! You can switch back at any time.">
|
||||||
<InfoCircleOutlined />
|
<InfoCircleOutlined/>
|
||||||
<span style={{marginRight: 8}}>Try the new ImEX Online</span>
|
<span style={{marginRight: 8}}>Try the new ImEX Online</span>
|
||||||
<Switch
|
<Switch
|
||||||
checked={betaSwitch}
|
checked={betaSwitch}
|
||||||
onChange={betaSwitchChange}
|
onChange={betaSwitchChange}
|
||||||
/>
|
/>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
)
|
)
|
||||||
});
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Layout.Header>
|
<Layout.Header>
|
||||||
|
|||||||
@@ -69,8 +69,9 @@ export function JobsAdminDatesChange({ insertAuditTrail, job }) {
|
|||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
form.resetFields();
|
form.resetFields();
|
||||||
form.resetFields();
|
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
//Get the owner details, populate it all back into the job.
|
//Get the owner details, populate it all back into the job.
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -588,6 +588,7 @@ export function JobsDetailHeaderActions({
|
|||||||
|
|
||||||
const menuItems = [
|
const menuItems = [
|
||||||
{
|
{
|
||||||
|
key: 'schedule',
|
||||||
disabled: !jobInPreProduction || !job.converted || jobRO,
|
disabled: !jobInPreProduction || !job.converted || jobRO,
|
||||||
label: t("jobs.actions.schedule"),
|
label: t("jobs.actions.schedule"),
|
||||||
onClick: () => {
|
onClick: () => {
|
||||||
@@ -603,6 +604,7 @@ export function JobsDetailHeaderActions({
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
key: 'cancelallappointments',
|
||||||
disabled: job.status !== bodyshop.md_ro_statuses.default_scheduled,
|
disabled: job.status !== bodyshop.md_ro_statuses.default_scheduled,
|
||||||
label: job.status !== bodyshop.md_ro_statuses.default_scheduled ? (
|
label: job.status !== bodyshop.md_ro_statuses.default_scheduled ? (
|
||||||
t("menus.jobsactions.cancelallappointments")
|
t("menus.jobsactions.cancelallappointments")
|
||||||
@@ -648,6 +650,7 @@ export function JobsDetailHeaderActions({
|
|||||||
)
|
)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
key: 'intake',
|
||||||
disabled: !!job.intakechecklist || !jobInPreProduction || !job.converted || jobRO,
|
disabled: !!job.intakechecklist || !jobInPreProduction || !job.converted || jobRO,
|
||||||
label: !!job.intakechecklist || !jobInPreProduction || !job.converted || jobRO ? (
|
label: !!job.intakechecklist || !jobInPreProduction || !job.converted || jobRO ? (
|
||||||
t("jobs.actions.intake")
|
t("jobs.actions.intake")
|
||||||
@@ -658,6 +661,7 @@ export function JobsDetailHeaderActions({
|
|||||||
)
|
)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
key: 'deliver',
|
||||||
disabled: !jobInProduction || jobRO,
|
disabled: !jobInProduction || jobRO,
|
||||||
label: !jobInProduction ? (
|
label: !jobInProduction ? (
|
||||||
t("jobs.actions.deliver")
|
t("jobs.actions.deliver")
|
||||||
@@ -668,6 +672,7 @@ export function JobsDetailHeaderActions({
|
|||||||
)
|
)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
key: 'checklist',
|
||||||
disabled: !job.converted,
|
disabled: !job.converted,
|
||||||
label: <Link to={`/manage/jobs/${job.id}/checklist`}>
|
label: <Link to={`/manage/jobs/${job.id}/checklist`}>
|
||||||
{t("jobs.actions.viewchecklist")}
|
{t("jobs.actions.viewchecklist")}
|
||||||
@@ -771,6 +776,7 @@ export function JobsDetailHeaderActions({
|
|||||||
label: t("menus.jobsactions.duplicate"),
|
label: t("menus.jobsactions.duplicate"),
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
|
key: 'duplicate',
|
||||||
label: <Popconfirm
|
label: <Popconfirm
|
||||||
title={t("jobs.labels.duplicateconfirm")}
|
title={t("jobs.labels.duplicateconfirm")}
|
||||||
okText="Yes"
|
okText="Yes"
|
||||||
@@ -783,6 +789,7 @@ export function JobsDetailHeaderActions({
|
|||||||
</Popconfirm>
|
</Popconfirm>
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
key: 'duplicatenolines',
|
||||||
label: <Popconfirm
|
label: <Popconfirm
|
||||||
title={t("jobs.labels.duplicateconfirm")}
|
title={t("jobs.labels.duplicateconfirm")}
|
||||||
okText="Yes"
|
okText="Yes"
|
||||||
@@ -949,6 +956,7 @@ export function JobsDetailHeaderActions({
|
|||||||
if (job && !job.converted) {
|
if (job && !job.converted) {
|
||||||
menuItems.push(
|
menuItems.push(
|
||||||
{
|
{
|
||||||
|
key: 'deletejob',
|
||||||
label: <Popconfirm
|
label: <Popconfirm
|
||||||
title={t("jobs.labels.deleteconfirm")}
|
title={t("jobs.labels.deleteconfirm")}
|
||||||
okText={t("general.labels.yes")}
|
okText={t("general.labels.yes")}
|
||||||
@@ -965,6 +973,7 @@ export function JobsDetailHeaderActions({
|
|||||||
|
|
||||||
menuItems.push(
|
menuItems.push(
|
||||||
{
|
{
|
||||||
|
key: 'manualevent',
|
||||||
onClick: (e) => {
|
onClick: (e) => {
|
||||||
setVisibility(true);
|
setVisibility(true);
|
||||||
},
|
},
|
||||||
@@ -974,6 +983,7 @@ export function JobsDetailHeaderActions({
|
|||||||
|
|
||||||
if (!jobRO && job.converted) {
|
if (!jobRO && job.converted) {
|
||||||
menuItems.push({
|
menuItems.push({
|
||||||
|
key: 'voidjob',
|
||||||
label: <RbacWrapper action="jobs:void" noauth>
|
label: <RbacWrapper action="jobs:void" noauth>
|
||||||
<Popconfirm
|
<Popconfirm
|
||||||
title={t("jobs.labels.voidjob")}
|
title={t("jobs.labels.voidjob")}
|
||||||
|
|||||||
@@ -129,7 +129,7 @@ export function ScheduleJobModalContainer({
|
|||||||
jobid: jobId,
|
jobid: jobId,
|
||||||
bodyshopid: bodyshop.id,
|
bodyshopid: bodyshop.id,
|
||||||
start: dayjs(values.start),
|
start: dayjs(values.start),
|
||||||
end: dayjs(values.start).add(bodyshop.appt_length || 60, "minutes"),
|
end: dayjs(values.start).add(bodyshop.appt_length || 60, "minute"),
|
||||||
color: values.color,
|
color: values.color,
|
||||||
note: values.note,
|
note: values.note,
|
||||||
created_by: currentUser.email,
|
created_by: currentUser.email,
|
||||||
|
|||||||
Reference in New Issue
Block a user