Disallow status change on non-converted jobs. IO-627

This commit is contained in:
Patrick Fic
2021-02-10 11:38:57 -08:00
parent c14327f303
commit 563d3a189a

View File

@@ -77,10 +77,14 @@ export function JobsChangeStatus({ job, bodyshop, jobRO }) {
{availableStatuses.map((item) => (
<Menu.Item key={item}>{item}</Menu.Item>
))}
<Menu.Divider />
{otherStages.map((item, idx) => (
<Menu.Item key={item}>{item}</Menu.Item>
))}
{job.converted && (
<>
<Menu.Divider />
{otherStages.map((item, idx) => (
<Menu.Item key={item}>{item}</Menu.Item>
))}
</>
)}
</Menu>
);
@@ -90,7 +94,7 @@ export function JobsChangeStatus({ job, bodyshop, jobRO }) {
overlay={statusmenu}
trigger={["click"]}
key="changestatus"
disabled={jobRO}
disabled={jobRO || !job.converted}
>
<Button>
{t("jobs.actions.changestatus")} <DownCircleFilled />