Disallow status change on non-converted jobs. IO-627
This commit is contained in:
@@ -77,10 +77,14 @@ export function JobsChangeStatus({ job, bodyshop, jobRO }) {
|
|||||||
{availableStatuses.map((item) => (
|
{availableStatuses.map((item) => (
|
||||||
<Menu.Item key={item}>{item}</Menu.Item>
|
<Menu.Item key={item}>{item}</Menu.Item>
|
||||||
))}
|
))}
|
||||||
<Menu.Divider />
|
{job.converted && (
|
||||||
{otherStages.map((item, idx) => (
|
<>
|
||||||
<Menu.Item key={item}>{item}</Menu.Item>
|
<Menu.Divider />
|
||||||
))}
|
{otherStages.map((item, idx) => (
|
||||||
|
<Menu.Item key={item}>{item}</Menu.Item>
|
||||||
|
))}
|
||||||
|
</>
|
||||||
|
)}
|
||||||
</Menu>
|
</Menu>
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -90,7 +94,7 @@ export function JobsChangeStatus({ job, bodyshop, jobRO }) {
|
|||||||
overlay={statusmenu}
|
overlay={statusmenu}
|
||||||
trigger={["click"]}
|
trigger={["click"]}
|
||||||
key="changestatus"
|
key="changestatus"
|
||||||
disabled={jobRO}
|
disabled={jobRO || !job.converted}
|
||||||
>
|
>
|
||||||
<Button>
|
<Button>
|
||||||
{t("jobs.actions.changestatus")} <DownCircleFilled />
|
{t("jobs.actions.changestatus")} <DownCircleFilled />
|
||||||
|
|||||||
Reference in New Issue
Block a user