_inspectorRequestedIds / inspector-request star) but applies independently to every service on the job that has the modifier configured — so a $75 requested fee on Home Inspection and a $25 fee on Radon both fire on the same jobisPrimary is already computed per charge line in pricing (calculateServicePrices, recalculateChargesForRequiredInfo) and passed into modifierPriceAdjFn, but individual modifiers do not currently gate on itprimaryOnly with tooltip copy: "Only triggers if the service is a primary service")Locked
primaryOnly means: skip the modifier when this service's charge line is not primary on the job. It is not a "once per job" deduplication flag — if Radon is booked standalone and is primary, a Radon modifier with primaryOnly still appliesprimaryOnly false / unset). No automatic migration of live modifier configsprimaryOnly is available on all modifier types (increment, bracket, compare, enum, zipcodes, requested, conditional)primaryOnly language on required reports ("Only triggers if the service is a primary service")Open
None — all product decisions resolved.
Backend (attik-backend)
src/models/modifierSchema.ts — add optional primaryOnly on modiferData; CRUD via src/routes/modifier.tssrc/util/functions/schedule/modifierPriceCalc.ts — calculateModifierPrice must accept isPrimary (or equivalent) and skip modifiers when primaryOnly is true and the line is not primary; apply gating for all modifier types; mirror existing addType: 'skip' pattern for missing required-info fieldssrc/util/functions/payroll/payrollContext.ts — applyModifiersToInspectionsBatch recalculates modifiers per charge but does not pass isPrimary today; wire charge.isPrimary so payroll respects the flagsrc/routes/aiEndpoints.ts — any scheduler/AI pricing paths calling calculateModifierPrice should pass primary context consistentlyFrontend (attik-frontend)
src/util/types/serverTypeCollection/services.ts — extend ModifierSchema / modiferData with primaryOnlysrc/util/functions/data/modifierPriceAdjFn.ts — gate all modifier types using service.isPrimary (already on the function signature)src/util/functions/schedulingHelpers/calculateServicePrices.ts and recalculateChargesForRequiredInfo.ts — already pass isPrimary; verify no regressions once gating is addedsrc/app/tools/settings/services/[id]/Modifier/ — add primaryOnly toggle on all modifier forms (shared via ModifierHeader.tsx or equivalent consistent pattern); follow ServiceRequiredReportsModal.tsx for tooltip copyOut of scope (unless expanded)
canBePrimary, first eligible service in usePriceCalculation)src/util/functions/data/modifierPriceAdjFn.ts, src/util/functions/schedulingHelpers/calculateServicePrices.tssrc/util/functions/schedule/modifierPriceCalc.tssrc/app/tools/settings/services/[id]/Modifier/Requested.tsxprimaryOnly precedent: src/app/tools/settings/services/[id]/components/ServiceRequiredReportsModal.tsxPlease authenticate to join the conversation.
Planned
Main App
About 2 hours ago
Linear
Get notified by email when there are changes.
Planned
Main App
About 2 hours ago
Linear
Get notified by email when there are changes.