EditChargesModal builds a chargeIds list from finalServices order, then PATCHes inspection with charges: chargeIds (attik-frontend/.../EditChargesModal.tsx, callServerAction with revalidatePath /inspections/:id via callServerAction.ts).ServicesPayments draws the charges table with inspection.charges.map in array order—no extra sort—so the UI should match the persisted charge order once props/state reflect the saved inspection.handleChargesSaved only closes the modal; it does not call router.refresh(), unlike other toggles on the same page—decision needed whether stale client state vs populate order vs revalidatePath scope explains the mismatch in production.attik-frontend/src/app/tools/inspections/[id]/components/EditChargesModal.tsx — handleConfirmedSave, servicesToCharges / chargesToServices (attik-frontend/src/util/functions/chargeConversions.ts), PATCH inspection payload charges.attik-frontend/src/util/functions/fetching/callServerAction.ts — revalidatePath when the third argument is set.attik-frontend/src/app/tools/inspections/[id]/components/ServicesPayments.tsx — handleChargesSaved, charges table mapping; compare with other actions that router.refresh() after PATCH.attik-frontend/src/app/tools/inspections/[id]/components/WorkorderPage.tsx — inspection state vs initialInspection after revalidation.attik-backend/src/routes/inspection.ts — PATCH when body.charges updates inspection.charges; GET populate('charges') ordering relative to the stored id array—confirm behavior if the UI still looks wrong after a hard refresh.attik-backend/src/models/inspectionSchema.ts — charges as an ordered array of refs.charges array order vs UI).attik-frontend/src/app/tools/inspections/[id]/components/EditChargesModal.tsxattik-frontend/src/app/tools/inspections/[id]/components/ServicesPayments.tsxattik-frontend/src/util/functions/fetching/callServerAction.tsattik-backend/src/routes/inspection.tsattik-backend/src/models/inspectionSchema.tsPlease authenticate to join the conversation.
Planned
Main App
16 days ago
Linear
Get notified by email when there are changes.
Planned
Main App
16 days ago
Linear
Get notified by email when there are changes.