- Fix CC Cart stuff

Signed-off-by: Dave Richer <dave@imexsystems.ca>
This commit is contained in:
Dave Richer
2024-01-25 16:03:34 -05:00
parent 461bc726aa
commit 2b0ecbdd91
3 changed files with 8 additions and 12 deletions

View File

@@ -624,7 +624,7 @@ export function JobsDetailHeaderActions({
{ {
key: 'cancelallappointments', key: 'cancelallappointments',
onClick: () => { onClick: () => {
if ( job.status !== bodyshop.md_ro_statuses.default_scheduled) { if (job.status !== bodyshop.md_ro_statuses.default_scheduled) {
return; return;
} }
showCancelScheduleModal() showCancelScheduleModal()
@@ -713,12 +713,7 @@ export function JobsDetailHeaderActions({
menuItems.push({ menuItems.push({
key: 'cccontract', key: 'cccontract',
disabled: jobRO || !job.converted, disabled: jobRO || !job.converted,
label: <Link label: <Link state={{jobId: job.id}} to='/manage/courtesycars/contracts/new'>
to={{
pathname: "/manage/courtesycars/contracts/new",
state: {jobId: job.id},
}}
>
{t("menus.jobsactions.newcccontract")} {t("menus.jobsactions.newcccontract")}
</Link> </Link>
}); });
@@ -993,10 +988,11 @@ export function JobsDetailHeaderActions({
onOk={handleCancelScheduleOK} onOk={handleCancelScheduleOK}
onCancel={handleCancelScheduleModalCancel} onCancel={handleCancelScheduleModalCancel}
footer={[ footer={[
<Button form="cancelScheduleForm" key="back" onClick={handleCancelScheduleModalCancel}> <Button form="cancelScheduleForm" key="back" onClick={handleCancelScheduleModalCancel}>
{t("general.actions.cancel")} {t("general.actions.cancel")}
</Button>, </Button>,
<Button form="cancelScheduleForm" htmlType="submit" key="submit" type="primary" loading={loading} onClick={handleCancelScheduleOK}> <Button form="cancelScheduleForm" htmlType="submit" key="submit" type="primary" loading={loading}
onClick={handleCancelScheduleOK}>
{t("appointments.actions.cancel")} {t("appointments.actions.cancel")}
</Button>, </Button>,
]} ]}
@@ -1004,7 +1000,7 @@ export function JobsDetailHeaderActions({
<Form <Form
layout="vertical" layout="vertical"
id="cancelScheduleForm" id="cancelScheduleForm"
onFinish={s =>{ onFinish={s => {
console.log(s); console.log(s);
handleLostSaleFinish(s); handleLostSaleFinish(s);
}} }}

View File

@@ -225,7 +225,7 @@ export function PayableExportAll({
if (bodyshop.pbs_serialnumber) if (bodyshop.pbs_serialnumber)
return ( return (
<Link to={{ state: { billids }, pathname: `/manage/dmsap` }}> <Link to='/manage/dmsap' state={{ billids }}>
<Button>{t("jobs.actions.export")}</Button> <Button>{t("jobs.actions.export")}</Button>
</Link> </Link>
); );

View File

@@ -218,7 +218,7 @@ export function PayableExportButton({
if (bodyshop.pbs_serialnumber) if (bodyshop.pbs_serialnumber)
return ( return (
<Link to={{ state: { billids: [billId] }, pathname: `/manage/dmsap` }}> <Link to='/manage/dmsap' state={{billids: [billId]}}>
<Button>{t("jobs.actions.export")}</Button> <Button>{t("jobs.actions.export")}</Button>
</Link> </Link>
); );