IO-3020 IO-3036 Extend blur wrapper, add lock wrapper to components throughout the system. Many placeholders still left for upsell components.

This commit is contained in:
Patrick Fic
2024-12-04 11:51:54 -08:00
parent c85a5eb208
commit 6b3fb00cc0
47 changed files with 781 additions and 408 deletions

View File

@@ -56,6 +56,7 @@ import { DateTimeFormat } from "../../utils/DateFormatter";
import dayjs from "../../utils/day";
import InstanceRenderManager from "../../utils/instanceRenderMgr";
import UndefinedToNull from "../../utils/undefinedtonull";
import LockWrapperComponent from "../../components/lock-wrapper/lock-wrapper.component.jsx";
const mapStateToProps = createStructuredSelector({
bodyshop: selectBodyshop,
@@ -376,9 +377,7 @@ export function JobsDetailPage({
key: "partssublet",
id: "job-details-partssublet",
icon: <ToolFilled />,
label: HasFeatureAccess({ featureName: "bills", bodyshop })
? t("menus.jobsdetail.partssublet")
: t("menus.jobsdetail.parts"),
label: t("menus.jobsdetail.partssublet"),
children: (
<JobsDetailPliContainer
job={job}
@@ -389,20 +388,16 @@ export function JobsDetailPage({
/>
)
},
...(InstanceRenderManager({
rome: "USE_IMEX",
imex: HasFeatureAccess({ featureName: "timetickets", bodyshop })
})
? [
{
key: "labor",
id: "job-details-labor",
icon: <Icon component={FaHardHat} />,
label: t("menus.jobsdetail.labor"),
children: <JobsDetailLaborContainer job={job} jobId={job.id} />
}
]
: []),
{
key: "labor",
id: "job-details-labor",
icon: <Icon component={FaHardHat} />,
label: (
<LockWrapperComponent featureName="timetickets">{t("menus.jobsdetail.labor")}</LockWrapperComponent>
),
children: <JobsDetailLaborContainer job={job} jobId={job.id} />
},
{
key: "lifecycle",
icon: <BarsOutlined />,
@@ -418,24 +413,18 @@ export function JobsDetailPage({
forceRender: true,
children: <JobsDetailDatesComponent job={job} />
},
...(InstanceRenderManager({
rome: "USE_IMEX",
imex: HasFeatureAccess({ featureName: "media", bodyshop })
})
? [
{
key: "documents",
id: "job-details-documents",
icon: <FileImageFilled />,
label: t("jobs.labels.documents"),
children: bodyshop.uselocalmediaserver ? (
<JobsDocumentsLocalGallery job={job} />
) : (
<JobsDocumentsGalleryContainer jobId={job.id} />
)
}
]
: []),
{
key: "documents",
id: "job-details-documents",
icon: <FileImageFilled />,
label: <LockWrapperComponent featureName="media">{t("jobs.labels.documents")}</LockWrapperComponent>,
children: bodyshop.uselocalmediaserver ? (
<JobsDocumentsLocalGallery job={job} />
) : (
<JobsDocumentsGalleryContainer jobId={job.id} />
)
},
{
key: "notes",
id: "job-details-notes",
@@ -447,7 +436,7 @@ export function JobsDetailPage({
key: "audit",
icon: <HistoryOutlined />,
id: "job-details-audit",
label: t("jobs.labels.audit"),
label: <LockWrapperComponent featureName="audit">{t("jobs.labels.audit")}</LockWrapperComponent>,
children: <JobAuditTrail jobId={job.id} />
},
{