How the two StaffGateway web apps are organised, built from the 391 frames of the Figma "Design EN" page plus the admin redesign page (48 frames) and the newer access-management frames (5). Part A covers both portals: who uses them, the navigation, the modules and their routes. Part B goes deep on the Roles module.
| App | Who | Entry | What it is for |
|---|---|---|---|
| Admin portal | Portal administrators, HR, cluster and facility admins (scope comes from their role, see Part B) | app.html | Set up and run the attendance system (locations, workforce setup, employee assignments, bulk assignment, error logs), read dashboards and reports, manage roles, announcements, banners, the contact form and the portal theme. |
| Employee portal | Every employee; managers see more (persona switch in the header for review: Employee / Manager) | portal.html | Home with personal dashboard and news, request HR services, act on the worklist, follow ongoing and saved requests, see own attendance, profile, payslip, analytics; managers and specialists act for their team. |
Both apps share one shell (header with language, notifications and user; light sidebar with expandable groups; theme switch), one sign-in flow, the StaffGateway design system, English and Arabic, light and dark.
Each module is one script and one stylesheet, built from its slice of the Figma page. Screen counts are Figma frames, including every state and dialog.
| Module | App | Routes | Figma source | Frames |
|---|---|---|---|---|
| Sign in | both | /login /forgot /otp /new-password /password-done /expired /password-changed | Login, Password Reset, password is expired | 30 |
| Home | both | /home | Home (admin), Home (employee, manager) | 15 |
| Dashboard | admin | /dashboard/activity /dashboard/activity/clusters/:id /dashboard/feedbacks | Dashboard, 2 tabs services, system activity variants | 20 |
| Locations | admin | /attendance/locations?tab=clusters|facilities|subs /attendance/locations/clusters/:id /attendance/locations/facilities/:id | Attendance System / Locations | 22 |
| Employee assignments | admin | /attendance/assignments /attendance/assignments/:id /attendance/bulk | Employee Assignments, Bulk Location Assignment | 69 |
| WorkForce setup | admin | /attendance/workforce?tab=shifts|plans|rotations|holidays /attendance/workforce/work-plans/:id /attendance/workforce/rotations/:id | WorkForce Setup, Holiday Calendar | 50 |
| Reports and error logs | both | /reports/attendance /reports/attendance/:report /attendance/error-logs /reports/services-errors · portal /attendance-report | Reports, Attendance Report, error logs | 26 |
| Daily attendance and violations | admin | /attendance/daily /attendance/violations | None (side-menu entries only); built from the attendance report screens and their data | 0 |
| Access management | admin | /roles /roles/user-access /roles/user-access/assign /roles/permissions … (Part B) | Roles, Role & Permission Management | 48 |
| System management | admin | /system/content /system/announcements /system/banners /system/contact /system/theme | System Management; page "Redesign (Admin Portal)" for the Content Panel | 43 |
| Services and requests | portal | /services /services/:id /requests/ongoing /requests/saved | Services, On Going Requests | 17 |
| Worklist | portal | /worklist?tab=fya|fyi|history /worklist/:id | Worklist (FYI, FYA, History and 8 action flows) | 43 |
| Profile and analytics | portal | /profile?tab=personal|job|payslip|salary|settings /analytics | Profile, Analytics | 11 |
| Self-services | portal | /manager /manager/team/:id /manager/team/:id/services /manager/requests · /specialist /specialist/employees/:id /specialist/employees/:id/services /specialist/requests | Manager and Specialist Self-services | 26 |
Daily Attendance and Violations appear in the Figma side menu but have no screens anywhere in the file. They were designed from the attendance report screens and read the same records, so a person's day matches in every report; they need design review. A large "Dark" frame on the page is empty and was skipped; dark mode comes from the design system instead.
Each module records its full list at the top of its script. The ones that change behaviour or wording:
| Module | Decisions |
|---|---|
| Sign in | Newest Figma set used. One left-to-right OTP field with a 60-second resend. Live password checklist (icon and word per rule). Done pages count down to sign-in with "Stay on this page". |
| Home | Employee home follows the latest StaffGateway home (greeting, offers, date and time, My Dashboard, News, Internal Systems, Quick actions · Notes · Social media bar, SNARK assistant). Salary hidden until shown, never saved. Manager adds For Your Action. The header bell and user menu open from every page. |
| Dashboard | Newest system-activity frames win; older variants kept as options (source tabs, Compare, list layout). "Ma'an / Mawared" became "StaffGateway / HR system". Cluster-admin view scopes every figure. Feedback totals made consistent. |
| Locations | "Subsidiary" is called Sub-facility. Cluster and facility details are pages. Delete added at every level (a cluster with facilities can't be deleted). Map is a token-drawn placeholder; latitude before longitude. |
| Employee assignments | Newest list with two tabs; older tab became status chips. Details is a page with pending requests and history. Transfers are pending until their start date and can be cancelled. Bulk upload really parses CSV with the template header; other files are simulated. |
| WorkForce setup | Work week is Sunday-first. "Work System" is called work plan. Shift/plan in use can't be deleted ("Action not allowed"). Holiday calendar is Gregorian with Hijri under each day and a Hijri month view; Saudi official holidays seeded. |
| Reports | All reports, error logs and the employee report read one set of attendance records, so figures agree. Shortfall = delay + early leave. "On leave" status added. CSV export opens correctly in Excel (Arabic included). |
| Daily attendance and violations | No Figma screens; designed from the attendance reports. Daily: today is live from the clock (Not started, Not checked in, On shift), other days show final status; check-in at another facility is flagged. Violations: late arrival, early leave, absence without leave, missing check-out, punch outside the location, fake location; approved excuse minutes cover lateness first; each can be excused (reason + note), confirmed or reopened, alone or in bulk, with Undo. |
| Access management | Newest Figma ("Role & Permission Management"): three control categories (Attendance, Management, Care), one role per category per person. Manager moved to Management. Four new roles: Announcements Controller, News Controller, Care Admin, Care Ads Controller. Changing a person's role in a category is done on Assign User with "Replace role"; a role's own assign dialog leaves out people who already hold a role in that category. One Cluster CEO per cluster (4, not the Figma's 12). |
| System management | The redesigned Content Panel manages the same news and banners as the Announcements and Banners pages, adds drag-to-reorder for news and a Hidden state (Figma "Suspended": Hide / Show again), and shows the licence cards; its "Admin | System Activity" header pills were not built (the sidebar has both). Statuses: Published, Scheduled, Draft, Expired, Hidden ("Disabled" became Unpublish). Titles and descriptions required in English and Arabic. Theme presets only (contrast checked), with live preview and Apply + Undo. |
| Services | Request form is a page with fill · review · submitted. In-progress requests can be updated or deleted, rejected ones re-submitted, approved ones only give output files. Output letters download as generated files. |
| Worklist | "Previous" is called History. HCM / SCM / Finance chips merged into one category row. Approve note optional, reject note required. Every action moves the item to History with Undo. |
| Profile and self-services | Profile pages are tabs on one page. Payslips generated from the salary history and downloadable. Specialist flow mirrors the manager flow for the employees a specialist serves. Self-services explain themselves to non-managers. |
The module answers three questions for a portal administrator: which roles exist, what each role may do (read-only), and who holds each role, where people can be assigned for a period or removed. Shift Admin goes one level further: each shift admin has a team of employees that can be edited.
Every scope in the module is expressed against this tree. Employees belong to a facility; a role assignment can carry a cluster or facility scope.
| Role | Level | What it is for | Scope set on assign | Holders (sample) |
|---|---|---|---|---|
| Organization Admin | Organisation | Owns all configuration: clusters, facilities, shifts, work systems, rotation plans, holidays, assignments. | None (whole organisation). Assigned by the platform owner, not from the portal; its holders are visible read-only. | 1 |
| Organization Head | Organisation | Executive viewer: the dashboard only. | None | 6 |
| Cluster Admin | Cluster | Runs one cluster: its facilities, sub-facilities, shifts, rotation and location assignments. | Cluster (required) | 6 |
| Cluster CEO | Cluster | Read-only view of their cluster and its facilities. | Cluster (required). One per cluster: a new CEO replaces the current one. | 4 |
| Facility Admin | Facility | Runs one or more facilities: sub-facilities, shifts, work systems, rotation plans. | Cluster + one or more facilities (step 2), editable per person later | 24 |
| Manager | Facility | Line manager inside a facility: reads its shifts, plans, people and attendance. | Cluster + facility (filters in step 1) | 10 |
| Shift Admin | Team | Supervises a named team of employees in one facility: reads shifts and plans, manages rotation assignments for the team. | Cluster + facility, then the team (step 2) | 12 |
The portal shell is shared: the header (logo, language switch, notifications, user), the sidebar (Home, Dashboard, Attendance System, Reports, Roles, System Management) and the theme switch. Only Roles is in scope here.
| # | Screen | Content | Actions | States | Source frames |
|---|---|---|---|---|---|
| S1 | Roles | Table: role name (sortable), level, assigned-to count. Search. | Roles permissions (outline button, top end). Row action: open users list (read-only for Organization Admin). | Default, search with no result. | 1 |
| S2 | Roles permissions | Role chips (single choice), "Permissions are read-only" note with a lock, table: entity, create, read, update, delete, scope. | Back, switch role. | One per role (6 frames). | 6 |
| S3 | {Role} users list | Filters: search field selector (employee name / ID / email / job), search, cluster, facility, clear filters. Table: user, ID, email, job, cluster, facility, assigned date with validity (starts on, ends in N days, until), action. Pagination. Shift Admin adds an Employees count column. | Back, Assign user (primary), remove (per row), Facility Admin: edit facilities, Shift Admin: open team. Organization Admin: read-only, no action column. | Default, empty, no result, scheduled, ending soon. | 6 lists + 24 overlays |
| S4 | {Person} team (Shift Admin) | Same table as S3 for the employees this shift admin supervises. | Back, Add employees (primary), remove from team. | Default, empty. | 2 |
| D1 | Assign user dialog | Employee picker: field selector, search, scrolling checklist (EN + AR name, ID, job), selected chips, counter. Role-specific scope fields. Last step: Effective from (required, today by default) and Until (optional). | Cancel, Add / Next / Save. | Empty, selected, error (no employee, no cluster, dates), CEO replacement warning, discard prompt. | 20 |
| D2 | Remove role from user? | Warning icon, title, consequence (for a shift admin: their team is left without one). | Cancel, Remove role (destructive). | — | 5 |
| D3 | Discard changes? | Shown when Cancel or × is pressed with unsaved choices. | Continue editing, Discard changes. | — | 5 |
| D4 | Edit facilities | One facility admin: cluster, facility checklist, chips. | Cancel, Save. | Error (no facility), discard prompt. | new |
One dialog component, configured per role. The employee picker is the same everywhere; what changes is where the scope is asked and whether there is a second step.
| Role | Title | Step 1 | Step 2 | Main button |
|---|---|---|---|---|
| Organization Head | Assign user | Employees | — | Add |
| Cluster Admin | Assign user | Employees, then Cluster* below the picker | — | Add |
| Cluster CEO | Assign Cluster CEO | One employee (radio list), then Cluster*. Each cluster option names its current CEO; picking one shows a replacement warning. | — | Add |
| Facility Admin | Assign users to Facility Admin | Employees | Cluster, then facilities (multi-select with chips). A note says the set applies to everyone selected. | Next → Save |
| Manager | Assign Manager | Cluster + Facility filters above the picker, then employees | — | Add |
| Shift Admin | Assign Shift Admin | Cluster + Facility filters, then the people who become shift admins | "Add employees to Shift Admin": the team they supervise | Next → Add |
Rules for every variant: the last step ends with Effective from (required, today by default, not in the past) and Until (optional, after the start). The main button is always enabled; pressing it with nothing selected shows the error under the picker and tints it. A required scope or date field shows its own error and takes focus. People who already hold the role are not offered again. An assignment that starts later counts as a holder and shows "Starts …"; one that has ended no longer counts.
flowchart LR A[Roles] -->|Roles permissions| B[Permissions: first role selected] B -->|pick another chip| B B -->|Back| A
flowchart TD
A[Roles] -->|row action| B[Role users list]
B -->|Assign user| C{Role needs filters first?}
C -->|Manager, Shift Admin| C1[Pick cluster and facility]
C -->|others| D[Pick employees]
C1 --> D
D -->|Add / Next with none picked| E[Error: select at least one employee]
E --> D
D -->|Cluster Admin, Cluster CEO| F[Pick cluster*]
D -->|Facility Admin: Next| G[Pick cluster, then facilities]
D -->|Shift Admin: Next| H[Pick the team]
D -->|Org Head: Add| T[Effective from, until]
F -->|Add| T
G -->|Save| T
H -->|Add| T
T -->|start in the past or end before start| T
T --> S[Saved: toast, list refreshed]
D -->|Cancel or close with changes| X{Discard changes?}
X -->|Continue editing| D
X -->|Discard| B
flowchart LR
A[Role users list] -->|trash on a row| B{Remove role from user?}
B -->|Cancel| A
B -->|Remove role| C[Row removed, count updated, toast with Undo]
flowchart LR A[Cluster CEO users] -->|Assign user| B[Pick one employee] B --> C[Pick cluster] C -->|cluster has a CEO| D[Warning: this replaces NAME] C -->|no CEO yet| E[Add] D -->|Add| F[New CEO saved, old CEO loses the role, toast names both] E --> F
flowchart LR
A[Facility Admin users] -->|pencil on a row| B[Edit facilities]
B -->|Save with none| B
B -->|Save| C[Row updated, toast]
B -->|Cancel with changes| D{Discard changes?}
flowchart LR
A[Shift Admin users list] -->|Employees count| B[Person team]
B -->|Add employees| C[Employee picker]
C -->|Add| B
B -->|trash on a row| D{Remove from team?}
D -->|Delete| B
C, R, U, D = create, read, update, delete. Read-only in the portal. Scope wording is normalised (for example "Within Cluster" and "Within Cluster Only" are one value).
| Object | Fields | Notes |
|---|---|---|
| Role | id, name (EN, AR), level, assignable, scopeType (none · cluster · facilities · team) | Fixed list; permissions come with the role. |
| Permission | role, entity, create, read, update, delete, scope | 12 entities, see the matrix. |
| Role assignment | employee, role, cluster?, facilities[]?, assignedDate, start (required), end? | Status is derived: scheduled (start later), active, ending (≤ 14 days left), ended (no longer a holder). Cluster CEO: at most one active per cluster. |
| Shift team | shiftAdmin (assignment), employees[] | Shown as the Employees count. |
| Employee | id (10 digits), name EN, name AR, email, job title, cluster, facility | Comes from the HR feed; read-only here. |
| Cluster · Facility | id, name EN, name AR, parent | Feed the filters and scope fields. |
| Where | English | Arabic |
|---|---|---|
| Permissions note | Permissions are read-only. | الصلاحيات للعرض فقط. |
| Remove confirm | Remove role from user? This removes all of this role's permissions from them. | إزالة الدور من المستخدم؟ ستُزال كل صلاحيات هذا الدور منه. |
| Picker error | Select at least one employee before adding. | اختر موظفًا واحدًا على الأقل قبل الإضافة. |
| Scope error | Select a cluster. | اختر التجمع. |
| Discard confirm | Discard changes? If you leave now, your selections will be lost. | تجاهل التغييرات؟ إذا خرجت الآن فستضيع اختياراتك. |
| Saved toast | 2 people assigned to Cluster Admin. | تم إسناد دور مسؤول التجمع. عدد الأشخاص: 2. |
| Date errors | The start date can't be in the past. · The end date must be after the start date. | لا يمكن أن يكون تاريخ البدء في الماضي. · يجب أن يكون تاريخ الانتهاء بعد تاريخ البدء. |
| CEO warning | This replaces the current CEO. NAME is the CEO of CLUSTER now. When you save, NAME loses the Cluster CEO role. | سيحل محل الرئيس التنفيذي الحالي. الرئيس التنفيذي الحالي لهذا التجمع هو NAME. عند الحفظ سيفقد هذا الدور. |
| Validity | Starts 01 Nov 2026 · Ends in 12 days · Until 31 Mar 2027 | يبدأ 01 نوفمبر 2026 · الأيام المتبقية: 12 · حتى 31 مارس 2027 |
| Remove shift admin | NAME will lose all Shift Admin permissions. Their team of 8 employees will have no shift admin until you assign one. | سيفقد NAME كل صلاحيات دور مسؤول المناوبة، وسيبقى فريقه بلا مسؤول مناوبة حتى تُسند أحدًا. |
Brand data-brand="staffgateway", comfortable density, cards with border and a small shadow, underline tabs. No IT-RANKS endorsement anywhere.
Sidebar: light, with a blue pill for the current page, as in the StaffGateway employee app and the source Figma. The design-system server's StaffGateway setting was changed from brand (navy) to sidebar.style: "light" on 21 Oct 2026 to match (contrast 66/66, no color roles changed).
| Figma element | Design system component |
|---|---|
| Top bar with language, notifications, user | App header · LanguageSwitch · NotificationsButton · Avatar |
| Side menu with expandable groups, theme switch, version | Sidebar (light style, pill for the current page), ToggleGroup segmented for light/dark |
| Roles, users and permission tables | Data table (search, sort, pagination), Table |
| Role chips on permissions | ToggleGroup, segmented (single choice) |
| ✓ / ✗ cells | Status icon + visually hidden word, so meaning is not colour-only |
| Assign user popup | Dialog · Field · Combobox (multiple, Arabic-aware filter) · Select |
| Remove role / Discard changes popups | Alert dialog (Cancel first, verb on the action) |
| Red trash in rows | IconButton (ghost, destructive tone) with a label and tooltip |
| Selected employees | Badge chips with remove buttons |
| After save / remove | Toast (bottom end), with Undo on remove |
The design left eight points open. Each has a recommended answer, and the build follows it. Recommended means it still needs the client's confirmation.
| # | Open point | Decision | In the build |
|---|---|---|---|
| 1 | Manager has screens but is missing from the roles list and the permission chips. | Manager is a real role. Read-only inside its own facility: facilities, shifts, work systems, rotation plans, employee data, rotation assignments and attendance; holidays for all. No create, update or delete. | Listed on Roles, has a permissions tab, 10 holders. |
| 2 | Organization Head scope says "All" on rows where nothing is allowed. | Dashboard only. A row with no permission shows "No access", whatever the stored scope. | Applied to every role's permissions table. |
| 3 | Organization Admin has no row action. | Not assignable from the portal: the platform owner sets it during onboarding. Its holders are visible, read-only, for audit. | Row shows "Managed by the system owner" and a view link; the list has no Assign, no remove, no action column. |
| 4 | Hidden dialog fields: Area, effective start, effective end, "Apply shift for all days". | Keep the dates: every assignment has a start date (today by default) and an optional end date, for acting roles and cover. Drop Area (the cluster already implies it) and "Apply shift for all days" (it belongs to shift planning, not roles). | Date fields on the last step with validation; the list shows Starts / Ends in N days / Until; ended assignments stop counting. |
| 5 | Cluster CEO uses the Cluster Admin dialog; several CEOs per cluster? | One CEO per cluster. Assigning a CEO to a cluster that has one replaces them, after a clear warning. | Single-choice picker, cluster options name the current CEO, warning callout, toast names both people. Seed data: 4 CEOs, one per cluster. |
| 6 | Facility Admin facilities chosen once for everyone selected. | Keep the shared set when assigning several people (the usual case), say so in the dialog, and allow per-person changes afterwards. | Note in step 2; pencil action per row opens "Edit facilities". |
| 7 | Users-list filters differ between frames. | One toolbar on every users list: search field (name, ID, email, job), search, cluster, facility, and Clear filters once any is set. | Same toolbar on all six lists; the team page keeps field + search. |
| 8 | Removing a role is immediate in the design. | Keep the confirmation and add Undo for 6 seconds, restoring the same dates and team. Removing a shift admin says their team is left without one. | Remove dialog, Undo in the toast, team warning in the dialog text. |