IO-1032 Disable actions for non converted jobs
This commit is contained in:
@@ -116,13 +116,14 @@ export function JobsDetailHeaderActions({
|
||||
</Link>
|
||||
)}
|
||||
</Menu.Item>
|
||||
<Menu.Item>
|
||||
<Menu.Item disabled={!job.converted}>
|
||||
<Link to={`/manage/jobs/${job.id}/checklist`}>
|
||||
{t("jobs.actions.viewchecklist")}
|
||||
</Link>
|
||||
</Menu.Item>
|
||||
<Menu.Item
|
||||
key="entertimetickets"
|
||||
disabled={!job.converted}
|
||||
onClick={() => {
|
||||
logImEXEvent("job_header_enter_time_ticekts");
|
||||
|
||||
@@ -136,7 +137,7 @@ export function JobsDetailHeaderActions({
|
||||
</Menu.Item>
|
||||
<Menu.Item
|
||||
key="enterpayments"
|
||||
disabled={jobRO}
|
||||
disabled={jobRO || !job.converted}
|
||||
onClick={() => {
|
||||
logImEXEvent("job_header_enter_payment");
|
||||
|
||||
@@ -148,7 +149,7 @@ export function JobsDetailHeaderActions({
|
||||
>
|
||||
{t("menus.header.enterpayment")}
|
||||
</Menu.Item>
|
||||
<Menu.Item key="cccontract" disabled={jobRO}>
|
||||
<Menu.Item key="cccontract" disabled={jobRO || !job.converted}>
|
||||
<Link
|
||||
to={{
|
||||
pathname: "/manage/courtesycars/contracts/new",
|
||||
@@ -294,6 +295,7 @@ export function JobsDetailHeaderActions({
|
||||
<JobsDetaiLheaderCsi job={job} />
|
||||
<Menu.Item
|
||||
key="jobcosting"
|
||||
disabled={!job.converted}
|
||||
onClick={() => {
|
||||
logImEXEvent("job_header_job_costing");
|
||||
setJobCostingContext({
|
||||
|
||||
@@ -178,7 +178,11 @@ export function JobsDetailHeaderCsi({
|
||||
};
|
||||
|
||||
return (
|
||||
<Menu.SubMenu title={t("jobs.actions.sendcsi")} {...props}>
|
||||
<Menu.SubMenu
|
||||
title={t("jobs.actions.sendcsi")}
|
||||
disabled={!job.converted}
|
||||
{...props}
|
||||
>
|
||||
<Menu.Item
|
||||
onClick={handleCreateCsi}
|
||||
key="email"
|
||||
|
||||
Reference in New Issue
Block a user