IO-3251 Quick Intake Jobs at Change

Signed-off-by: Allan Carr <allan@imexsystems.ca>
This commit is contained in:
Allan Carr
2025-05-28 13:26:13 -07:00
parent cf393e8f9e
commit 64a280b111

View File

@@ -395,32 +395,33 @@ export function ScheduleEventComponent({
) : ( ) : (
<ScheduleManualEvent event={event} /> <ScheduleManualEvent event={event} />
)} )}
{event.isintake && HasFeatureAccess({ featureName: "checklist", bodyshop }) ? ( {event.job &&
<Link (HasFeatureAccess({ featureName: "checklist", bodyshop }) ? (
to={{ <Link
pathname: `/manage/jobs/${event.job && event.job.id}/intake`, to={{
search: `?appointmentId=${event.id}` pathname: `/manage/jobs/${event.job && event.job.id}/intake`,
}} search: `?appointmentId=${event.id}`
> }}
<Button disabled={event.arrived}>{t("appointments.actions.intake")}</Button> >
</Link> <Button disabled={event.arrived}>{t("appointments.actions.intake")}</Button>
) : ( </Link>
<Popover //open={open} ) : (
content={popMenu} <Popover //open={open}
open={popOverVisible} content={popMenu}
onOpenChange={setPopOverVisible} open={popOverVisible}
onClick={(e) => { onOpenChange={setPopOverVisible}
if (event.job?.id) { onClick={(e) => {
e.stopPropagation(); if (event.job?.id) {
getJobDetails(); e.stopPropagation();
} getJobDetails();
}} }
getPopupContainer={(trigger) => trigger.parentNode} }}
trigger="click" getPopupContainer={(trigger) => trigger.parentNode}
> trigger="click"
<Button disabled={event.arrived}>{t("jobs.actions.intake_quick")}</Button> >
</Popover> <Button disabled={event.arrived}>{t("jobs.actions.intake_quick")}</Button>
)} </Popover>
))}
</Space> </Space>
</div> </div>
); );