Merged in feature/IO-2264-schedule-filter (pull request #816)

Add manual appointment handling.
This commit is contained in:
Patrick Fic
2023-05-26 18:53:09 +00:00

View File

@@ -48,7 +48,10 @@ export function ScheduleCalendarComponent({ data, refetch, bodyshop }) {
() =>
data
.filter((d) => d.__typename === "appointments")
.map((app) => `${app.job.est_ct_fn} ${app.job.est_ct_ln}`),
.map((app) =>
`${app.job?.est_ct_fn || ""} ${app.job?.est_ct_ln || ""}`.trim()
)
.filter((e) => e.length > 0),
[data]
);
@@ -59,7 +62,9 @@ export function ScheduleCalendarComponent({ data, refetch, bodyshop }) {
? estimatorsFilter.length === 0
? true
: !!estimatorsFilter.find(
(e) => e === `${d.job.est_ct_fn} ${d.job.est_ct_ln}`
(e) =>
e ===
`${d.job?.est_ct_fn || ""} ${d.job?.est_ct_ln || ""}`.trim()
)
: true;