Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

04 — Information Architecture (Staff Module)

Where Staff screens live in the global shell (00-shared/05) and how they nest. Navigation/routing decisions not fixed by backend are (proposed); the permission gate is the client mirror of permissions.constants.ts:19-24 (server RBAC on these endpoints is not wired — staff.controller.ts:21, OQ-1).

1. Position in the global IA

Global destination table: Staff → /staff → roles: admin, HR (00-shared/05 §2). Phone: bottom NavigationBar (≤ 5 destinations) with Staff under the drawer when not a primary tab; tablet/desktop: NavigationRail (00-shared/05 §3).

2. Staff module map

/staff (permission: staff.read)
├── list           (staff list: filters, pagination)
├── new            (create form — staff.create)
└── :id            (detail — staff.read)
    ├── (tabs: Overview | Employment | Metadata — proposed)
    └── edit       (staff.update)

/departments (permission: department.manage)
├── list
├── new            (department.create → POST /departments)
└── :id
    └── edit

/designations (permission: designation.manage)
├── list
├── new
└── :id
    └── edit

Route constants mirror the API nouns exactly (staff.controller.ts:20, department.controller.ts:22, designation.controller.ts:22).

3. Entry points

FromToWhy
Dashboard/staffOrg chart / roster overview (proposed)
Navigation (admin/HR)/staffPrimary management surface (00-shared/05 §2)
Users detail/staff (filtered)Link userId → staff profile (proposed) — users and staff are separate collections (RELATIONSHIPS.md:28)
Teachers detail/departments/:idTeacher references the same catalogs (teacher.schema.ts:22-26)
Global search (when backend supports staff)/staff/:idSearch indexer currently skips staff (OQ-6)

4. Information hierarchy of a staff record

  1. Identity anchor: employeeNumber — unique per tenant (staff.schema.ts:57) and the label users type/quote.
  2. Org placement: departmentIddesignationId (both optional refs, staff.schema.ts:29-33).
  3. Employment terms: employmentType (enum, default full_time), joiningDate, salaryGrade (staff.schema.ts:35-47).
  4. Lifecycle: status enum (staff.schema.ts:7-12,48-49).
  5. System meta: version, createdAt, updatedAt (base.schema.ts:29-34) — displayed in an "Audit" tab (proposed); metadata passthrough (staff.schema.ts:51-52).

5. Navigation model (per shared shell)

  • Phone: list → push detail (stack); tabs inside detail; FAB per screen (00-shared/05 §6-7).
  • Tablet ≥ 840 dp: master-detail — list left, detail right (00-shared/04 §6, 00-shared/05 §3).
  • Desktop: same master-detail + breadcrumbs (Staff / Administration / HR) at depth > 2 (00-shared/05 §3).
  • Deep links (proposed): studylyon://staff/:id, studylyon://departments/:id, studylyon://designations/:id.

6. Screen inventory (short form)

#ScreenRoutePermBackend source
S1Staff list/staffstaff.readstaff.controller.ts:27-28
S2Staff detail/staff/:idstaff.readstaff.controller.ts:30-31
S3Create staff/staff/newstaff.createstaff.controller.ts:24-25
S4Edit staff/staff/:id/editstaff.updatestaff.controller.ts:33-34
S5Deactivate flowmodal on S1/S2staff.deletestaff.controller.ts:36-37
S6Department list/departmentsdepartment.managedepartment.controller.ts:29-30
S7Department detail/departments/:iddepartment.managedepartment.controller.ts:32-33
S8Department form (create/edit)/departments/new, /departments/:id/editdepartment.managedepartment.controller.ts:26-27,35-40
S9Designation list/designationsdesignation.managedesignation.controller.ts:29-30
S10Designation detail/designations/:iddesignation.managedesignation.controller.ts:32-33
S11Designation form (create/edit)/designations/new, /designations/:id/editdesignation.managedesignation.controller.ts:26-27,35-40

Full detail in 05_Screen_Inventory.md, 06_Screen_Specifications.md.

7. Information hygiene rules

  • Employee number and names display in mono / tabular figures (00-shared/02 §2).
  • Status is never color-only: badge + icon + label (00-shared/09 §9).
  • Missing optional refs (no department/designation) render "—" with an "assign" affordance, never a broken ref.
  • Deleted heads (headId refs a soft-deleted staff) render as unassigned (proposed) — server stores the bare ObjectId (department.schema.ts:15-16).