_inspectorRequestedIds on that new inspection — carried over silently from the original./schedule?reorderFrom=<inspectionId> (WorkorderActionsDropdown.tsx). NewSchedulingForm.tsx reads that query param and pre-populates the new inspection from the source job, including _inspectorRequestedIds.calcBonus.ts — correctly counts any inspection where the employee is in _inspectorRequestedIds toward their requested-inspector bonus. The logic is sound; the data coming in is incorrect.Locked
_inspectorRequestedIds must not be copied from the source inspection to the reordered inspection.Frontend — Scheduling
attik/apps/frontend/src/components/scheduling/NewSchedulingForm.tsx — the reorderFrom pre-population logic is where the source inspection's fields are read and applied to the new scheduling form state. The fix is to exclude _inspectorRequestedIds when hydrating form state from the source job.Backend — Payroll (reference only, no change needed)
attik/apps/backend/src/util/functions/payroll/calcBonus.ts — requested bonus calculation; correct as-is.attik/apps/backend/src/util/functions/payroll/payrollContext.ts — calcBonus called here per-inspector.attik/apps/frontend/src/app/tools/inspections/[id]/components/WorkorderActionsDropdown.tsxPlease authenticate to join the conversation.
Planned
Main App
About 3 hours ago
Linear
Get notified by email when there are changes.
Planned
Main App
About 3 hours ago
Linear
Get notified by email when there are changes.