event._chargeId), Completed should also require required reports for the relevant service(s) to be satisfied, using the same primary-only / primary-charge applicability rules as web inspection reports.[start, end]) and time-only completion for item types that are out of scope (vacation, block, standalone events without _chargeId, eventGroup shells, etc.) unless product decides otherwise.ScheduleCard today sets isCompleted with end.isBefore(now) and isUpNext with start.isBefore(now) && end.isAfter(now) only—no reads of charges, events-on-charge, or report completion (components/schedule/ScheduleCard.tsx).combineScheduleItems in lib/scheduleUtils.ts, which attaches nested subItems (events under an inspection). Sub-rows render time and equipment but do not currently surface their own Completed / Up Next badges separate from the parent card.useSchedule already loads inspections with populate: ["charges", "services", "people", "reports"] and events with inspectionPopulated: ["charges", "reports", "people"] (hooks/useSchedule.ts), so much of the data needed for gating may already be on the client—or a computed flag from the API may be preferable to avoid drift with web.src/models/inspectionSchema.ts (charges, events, _reportIds), src/models/eventSchema.ts (_chargeId → charge), src/models/chargeSchema.ts (isPrimary, _serviceId), and src/models/reportSchema.ts (_serviceId, _requiredReportTypeId, status, requiredReportIndex).now is past endtime but reports are still missing, showing plain Completed is misleading—product sign-off is needed on an alternate label or treatment (e.g. Pending reports).Attik Mobile
ScheduleItem.type === "inspection"): derive completion only after required slots for charges that do not have any linked Event on that inspection (same inspection, event._chargeId === charge._id) are satisfied, plus the existing applicability rules for primaryOnly vs charge.isPrimary (parity with web / toolsv2 as the source of truth for those rules)._chargeId: gate Completed on required reports for that charge’s service until satisfied; events without _chargeId keep time-only completion.eventGroup items—keep current time-based Completed unless product extends scope.item.subItems in ScheduleCard) may need per-sub-item completion signaling if the parent row alone is insufficient—decision needed with design/product.app/(app)/map.tsx) uses combineScheduleItems; confirm whether the same completion semantics should apply anywhere schedule-derived UI shows “completed” (e.g. StopMarker props today are not wired from report state).Attik Backend (optional but valuable)
Attik Frontend / web parity
primaryOnly and primary-charge filtering with whatever web implementation is canonical (see related work on inspection reports if still landing).attik-mobile/components/schedule/ScheduleCard.tsx, attik-mobile/lib/scheduleUtils.ts, attik-mobile/hooks/useSchedule.ts, attik-mobile/app/(app)/index.tsxattik-backend/src/models/inspectionSchema.ts, attik-backend/src/models/eventSchema.ts, attik-backend/src/models/chargeSchema.ts, attik-backend/src/models/reportSchema.tsPlease authenticate to join the conversation.
Completed
Main App
About 2 months ago
Linear
Get notified by email when there are changes.
Completed
Main App
About 2 months ago
Linear
Get notified by email when there are changes.