IO-990 Refactor job closing.

This commit is contained in:
Patrick Fic
2021-05-05 09:35:22 -07:00
parent 6469cb7e87
commit 1a9eddf7c6
6 changed files with 54 additions and 33 deletions

View File

@@ -56,7 +56,13 @@ export function JobsChangeStatus({ job, bodyshop, jobRO }) {
} else if (
bodyshop.md_ro_statuses.post_production_statuses.includes(job.status)
) {
setAvailableStatuses(bodyshop.md_ro_statuses.post_production_statuses);
setAvailableStatuses(
bodyshop.md_ro_statuses.post_production_statuses.filter(
(s) =>
s !== bodyshop.md_ro_statuses.default_invoiced &&
s !== bodyshop.md_ro_statuses.default_exported
)
);
if (bodyshop.md_ro_statuses.production_statuses[0])
setOtherStages([bodyshop.md_ro_statuses.production_statuses[0]]);
} else {