| name | jeff-module-patterns |
| description | Jeff's cross-module implementation patterns for filter panels, table cells, status display, and employee-linked rows. Use for module-level route work across employees, leaves, dashboard, attendance, and similar list pages. |
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.tsx files.
- Export panel component and
{Route}FilterValues type 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