Jeff's Module Patterns
Cross-module conventions that repeat across Jeff's route modules.
Apply when
- •Building/refactoring module routes with list or summary tables.
- •Implementing reusable filter panels and filter value types.
- •Rendering status chips, employee-linked rows, or repeated cell formatting patterns.
Filter panel conventions
- •Use colocated
-{route}-filters.tsxfiles. - •Export panel component and
{Route}FilterValuestype together. - •Use shared reference data hooks for common options.
- •Keep large option groups searchable.
- •Keep filter-change handlers predictable and reset pagination when needed.
Table/cell conventions
- •Prefer stable helpers for repeated cell rendering patterns.
- •Use tabular numeric/monospace classes for aligned numbers and times.
- •Keep placeholders explicit for missing values (
-). - •Prefer shared constants/helpers over duplicating inline logic.
Status and badge conventions
- •Use module-consistent status color mappings.
- •Keep semantic meaning of colors stable inside each module.
- •Prefer centralized mappings/constants over ad-hoc class strings.
Employee-linked row conventions
- •Avatar with fallback.
- •Primary link to module-relevant detail page.
- •Optional contextual edit/action affordance where useful.
- •Show system status cues (inactive/deleted) clearly but subtly.
Module notes
- •Attendance can add specialized patterns (for example multi-shift arrays and calendar statuses) on top of these base conventions.
- •Leaves, Employees, Dashboard, and similar modules should follow the same filter/type/status consistency rules.
Validation checklist
- • Filter behavior and filter types are consistent in-module.
- • Status visuals are consistent across module surfaces.
- • Repeated row/cell patterns are implemented through shared helpers or constants.