IO-3190 Add nulll coalesce and check for non-intake events.

This commit is contained in:
Patrick Fic
2025-05-14 17:56:15 -07:00
parent 76c0c7c41e
commit a49b3f6496

View File

@@ -66,7 +66,7 @@ export function ScheduleEventComponent({
const [popOverVisible, setPopOverVisible] = useState(false);
const [getJobDetails] = useLazyQuery(GET_JOB_BY_PK_QUICK_INTAKE, {
variables: { id: event.job.id },
variables: { id: event.job?.id },
onCompleted: (data) => {
if (data?.jobs_by_pk) {
const totalHours =
@@ -83,6 +83,7 @@ export function ScheduleEventComponent({
});
}
},
fetchPolicy: "network-only"
});
@@ -409,8 +410,10 @@ export function ScheduleEventComponent({
open={popOverVisible}
onOpenChange={setPopOverVisible}
onClick={(e) => {
getJobDetails();
e.stopPropagation();
if (event.job?.id) {
e.stopPropagation();
getJobDetails();
}
}}
getPopupContainer={(trigger) => trigger.parentNode}
trigger="click"