Changed logic to allow job intake IO-430
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -60,17 +60,18 @@ export function JobsIntakeContainer({
|
||||
|
||||
if (loading) return <LoadingSpinner />;
|
||||
if (error) return <AlertComponent message={error.message} type="error" />;
|
||||
|
||||
if (data && !!!data.bodyshops_by_pk.intakechecklist)
|
||||
return (
|
||||
<AlertComponent message={t("intake.errors.nochecklist")} type="error" />
|
||||
);
|
||||
|
||||
return (
|
||||
<RbacWrapper action="jobs:intake">
|
||||
<div>
|
||||
{!!data.jobs_by_pk.intakechecklist ||
|
||||
!(
|
||||
data.jobs_by_pk.status === bodyshop.md_ro_statuses.default_open ||
|
||||
data.jobs_by_pk.status === bodyshop.md_ro_statuses.default_scheduled
|
||||
!bodyshop.md_ro_statuses.pre_production_statuses.includes(
|
||||
data.jobs_by_pk.status
|
||||
) ? (
|
||||
<Result status="warning" title={t("jobs.errors.cannotintake")} />
|
||||
) : (
|
||||
|
||||
Reference in New Issue
Block a user