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 (loading) return <LoadingSpinner />;
|
||||||
if (error) return <AlertComponent message={error.message} type="error" />;
|
if (error) return <AlertComponent message={error.message} type="error" />;
|
||||||
|
|
||||||
if (data && !!!data.bodyshops_by_pk.intakechecklist)
|
if (data && !!!data.bodyshops_by_pk.intakechecklist)
|
||||||
return (
|
return (
|
||||||
<AlertComponent message={t("intake.errors.nochecklist")} type="error" />
|
<AlertComponent message={t("intake.errors.nochecklist")} type="error" />
|
||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<RbacWrapper action="jobs:intake">
|
<RbacWrapper action="jobs:intake">
|
||||||
<div>
|
<div>
|
||||||
{!!data.jobs_by_pk.intakechecklist ||
|
{!!data.jobs_by_pk.intakechecklist ||
|
||||||
!(
|
!bodyshop.md_ro_statuses.pre_production_statuses.includes(
|
||||||
data.jobs_by_pk.status === bodyshop.md_ro_statuses.default_open ||
|
data.jobs_by_pk.status
|
||||||
data.jobs_by_pk.status === bodyshop.md_ro_statuses.default_scheduled
|
|
||||||
) ? (
|
) ? (
|
||||||
<Result status="warning" title={t("jobs.errors.cannotintake")} />
|
<Result status="warning" title={t("jobs.errors.cannotintake")} />
|
||||||
) : (
|
) : (
|
||||||
|
|||||||
Reference in New Issue
Block a user