Bỏ qua để đến nội dung

HR Dashboard & Schedule Management

Nội dung này hiện chưa có sẵn bằng ngôn ngữ của bạn.

The HR Dashboard (/dashboard/hr/*) and Schedule Management (/dashboard/schedule/*) provide comprehensive workforce management: timesheet tracking with clock-in/out, schedule planning with shift templates and lanes, leave requests and approvals, shift swaps between employees, employee certificates tracking, and import jobs for bulk schedule data. The module requires hr module read access; write operations (timesheet edits, schedule changes) require write permission.


GoalsNon-goals
Document HR dashboard and schedule featuresReplace employee management docs (see Employees & stores)
Explain timesheet, schedule, and leaves workflowsDocument payroll integrations (future feature)
Cover shift templates, swaps, and lanesDocument point-of-sale work-shift (see POS Workspace → Work Shift)

/dashboard/hr/
├── (HR Dashboard - default)
├── employees
└── timesheet
/dashboard/schedule/
├── (Schedule calendar - default)
├── me (My schedule - employee view)
├── templates (Shift templates)
├── swaps (Shift swap requests)
└── leaves (Leave requests)

Total routes: 8 (2 HR + 5 Schedule + 1 employee-specific)


Central hub for workforce metrics and quick actions

Today’s overview:

  • Scheduled staff: Count of employees scheduled today
  • Clocked in: Currently working employees
  • Absent: Scheduled but not clocked in (past grace period)
  • On leave: Approved leave today

This week:

  • Total hours: Scheduled hours across all employees
  • Overtime: Hours beyond standard 40/week (or custom)
  • Leave requests: Pending approval count
  • Shift swaps: Pending swap count

Cards:

  • Timesheet → Navigate to /hr/timesheet
  • Schedule → Navigate to /schedule
  • Leaves → Navigate to /schedule/leaves
  • Templates → Navigate to /schedule/templates

Recent activity (bottom panel):

  • Latest timesheet edits (who edited, when, reason)
  • Recent leave approvals/rejections
  • Shift swap completions
  • Clock-in/out anomalies (missed clock, early departure)

RBAC: Requires hr module read

Typical roles:

  • HR Manager: Full read/write (timesheet edits, schedule changes, approvals)
  • Store Manager: Read (view schedules, timesheets)
  • Employee: Read-only own data (via /schedule/me)

Employees Roster (/dashboard/hr/employees)

Section titled “Employees Roster (/dashboard/hr/employees)”

Employee list with quick access to HR-related info

  • Employee list: Name, role, store, status (active/inactive)
  • Filters: By store, role, employment status
  • Search: By name, email, employee code
  • Quick view: Click employee → side panel with:
    • Profile summary
    • Current shift (if clocked in)
    • This week’s hours
    • Upcoming schedule
    • Recent activity
  • Actions: View full profile, edit timesheet, view schedule

Click employee row → Opens employee detail at /dashboard/employees/:id (full profile from Employees module)

This route is a filtered view of the main employees list, pre-filtered for HR context.


Timesheet Management (/dashboard/hr/timesheet)

Section titled “Timesheet Management (/dashboard/hr/timesheet)”

View, edit, and audit employee work hours

Top filters:

  • Date range: This week, last week, this month, custom
  • Store filter: All stores, specific store
  • Employee filter: All, search by name
  • Status filter: All, pending approval, approved, exported

Timesheet table:

EmployeeDateClock InClock OutBreakTotal HoursOvertimeStatusActions
John Doe9/1808:0017:001h8.0h0hApprovedEdit, View
Jane Smith9/1809:0018:300.5h9.0h1.0hPendingEdit, Approve

Columns:

  • Employee: Name + avatar
  • Date: Work date
  • Clock In/Out: Actual times (from POS work-shift or manual entry)
  • Break: Unpaid break duration
  • Total Hours: Clock out - clock in - break
  • Overtime: Hours beyond daily limit (e.g., 8h) or weekly limit (40h)
  • Status: Pending, Approved, Exported (to payroll)
  • Actions: Edit, Approve, View detail

Edit modal (click “Edit”):

Fields:

  • Date: Date picker (read-only if already approved)
  • Clock In: Time picker (24h format)
  • Clock Out: Time picker
  • Break Duration: Number input (minutes or hours)
  • Adjustment Reason: Dropdown (missed clock, early leave, manual entry, correction)
  • Notes: Free text (e.g., “Manager approved early departure”)

Business rules:

  • Cannot edit timesheet more than X days old (store setting, e.g., 7 days)
  • Requires manager approval if adjustment > Y hours (e.g., 2h)
  • Audit log records who edited, when, and reason

Save:

  • Status remains “Pending” until approved
  • Notification sent to employee (optional)

Bulk approve (checkbox multiple rows):

  • Select rows
  • Click “Approve Selected”
  • Confirms bulk approval
  • Status → “Approved”

Single approve (action menu):

  • Click “Approve” on row
  • Confirmation dialog
  • Status → “Approved”

Click “View” → Side panel or modal:

Employee info:

  • Name, role, store
  • Week summary: Total hours, overtime, days worked

Daily breakdown (for selected week):

  • Each day: Clock in, clock out, break, total hours
  • Anomalies highlighted (missed clock, very long shift, no break)

Audit log:

  • Original clock in/out (from POS work-shift)
  • Manual edits (who, when, reason)
  • Approval timestamp

Actions:

  • Export to CSV
  • Print timesheet
  • Send to employee (email)

Export button (top right):

  • Generates CSV or Excel with approved hours
  • Columns: Employee ID, Name, Date, Hours, Overtime, Rate (if configured)
  • Marks exported rows (prevents duplicate export)
  • Downloadable file

Visual schedule management with drag-and-drop shift assignment

Top bar:

  • View selector: Week, 2 weeks, Month
  • Date navigation: Previous/Next, Today button, Date picker
  • Store filter: All stores, specific store
  • Lane filter: All lanes, specific lane (multi-lane stores)
  • Add shift: Quick add shift button

Calendar grid:

Week view:

  • Rows: Employees (or lanes, toggle)
  • Columns: Days of the week (Mon-Sun)
  • Cells: Shift cards (start time, end time, lane badge)

Shift card:

  • Employee name (if row is lanes)
  • Lane badge (if row is employees)
  • Time range (e.g., “08:00-17:00”)
  • Shift template indicator (if from template)
  • Status badge (published, draft, swap pending)
  • Drag handle (for reassignment)

Legend:

  • Colors: Shift types (morning, evening, night, split)
  • Patterns: Leave (diagonal stripes), swap (dashed border), overtime (red border)

Click “Add Shift” or empty cell → Modal:

Fields:

  • Employee: Dropdown (active employees)
  • Date: Date picker
  • Start Time: Time picker
  • End Time: Time picker
  • Lane: Dropdown (store lanes/registers)
  • Shift Template: Optional (pre-fill from template)
  • Break: Auto-calculated (based on duration) or manual
  • Notes: Free text

Save:

  • Creates shift record
  • Status: “Draft” (unpublished)
  • Publish button available after save

Click shift card → Edit modal (same fields as Add)

Additional options:

  • Publish: Make visible to employee
  • Delete: Remove shift
  • Duplicate: Copy to another day/employee
  • Convert to template: Save as reusable template

Drag shift card to different cell:

  • Same employee, different day → Move shift
  • Different employee, same day → Reassign shift
  • Different employee, different day → Move & reassign

Confirmation:

  • Prompt: “Reassign shift from [Old Employee] to [New Employee]?”
  • Option: Notify both employees
  • Save → Shift updated

Publish button (top bar):

  • Select date range (e.g., next week)
  • Preview: Shows all draft shifts in range
  • Confirm: “Publish X shifts?”
  • Action: Status → “Published”, employees notified (if enabled)

Published shifts:

  • Visible in employee’s “My Schedule” (/schedule/me)
  • Cannot be deleted (only edited with reason)

Automatic checks:

  • Overtime: Employee scheduled >40h/week (or custom limit)
  • Double-booking: Employee on multiple shifts at same time
  • Understaffed: Fewer employees than minimum (store setting)
  • Overstaffed: More employees than needed (based on forecast)
  • No break: Shift >6h without break (labor law warning)

Visual indicators:

  • Red border: Conflict (must resolve before publish)
  • Yellow border: Warning (can publish, but recommended to review)

Employee view of their own schedule (read-only or limited edit)

Calendar view:

  • Week or month view
  • Only shows current employee’s shifts
  • Color-coded by shift type

Shift detail:

  • Click shift → View detail (date, time, lane, break)
  • Cannot edit (unless manager role)

Actions:

  • Request swap: Propose shift swap with colleague
  • Request leave: Submit leave request for scheduled shift
  • Export: Download personal schedule (iCal, PDF)

Leave balance:

  • Annual leave remaining
  • Sick leave remaining
  • Leave requests status (pending, approved, denied)

Access:

  • All employees with hr module read OR standard employee access
  • No special permission needed (own data only)

Shift Templates (/dashboard/schedule/templates)

Section titled “Shift Templates (/dashboard/schedule/templates)”

Create reusable shift patterns for faster scheduling

Table view:

  • Template name (e.g., “Morning Shift”, “Weekend Closer”)
  • Start time, End time
  • Duration, Break
  • Lane assignment (if fixed)
  • Usage count (how many shifts created from this template)
  • Actions: Edit, Duplicate, Delete

Click “New Template” → Form:

Fields:

  • Name: Template identifier (e.g., “Morning Shift”)
  • Start Time: Default start (e.g., 08:00)
  • End Time: Default end (e.g., 17:00)
  • Break Duration: Auto-calculated or manual (e.g., 1h)
  • Lane: Default lane (optional)
  • Shift Type: Morning, Evening, Night, Split
  • Color: Visual indicator on calendar

Save:

  • Template saved
  • Available in “Add Shift” modal dropdown

From schedule calendar:

  1. Select date range (e.g., next week)
  2. Click “Apply Template”
  3. Choose template
  4. Select employees (or all)
  5. Preview: Shows shifts that will be created
  6. Confirm: Creates draft shifts for selected employees/dates

Bulk scheduling:

  • Apply same template to multiple employees on same day
  • Apply weekly template (Monday-Friday, same time)

Common templates:

  • Morning Shift: 08:00-17:00, 1h break
  • Evening Shift: 14:00-23:00, 1h break
  • Night Shift: 22:00-07:00, 1h break
  • Split Shift: 08:00-12:00 + 17:00-21:00
  • Weekend: 10:00-18:00, 0.5h break

Manage employee-initiated shift swap requests

Step 1: Employee initiates swap (from /schedule/me):

  1. Employee A views their shift
  2. Clicks “Request Swap”
  3. Selects colleague (Employee B) to swap with
  4. Optionally selects specific shift of Employee B (or proposes unassigned)
  5. Adds reason/note
  6. Submits request

Step 2: Colleague responds:

  • Employee B receives notification
  • Views swap request
  • Options: Accept, Decline, Propose alternative

Step 3: Manager approval:

  • If both employees accept → request goes to manager
  • Manager reviews:
    • Checks if both employees qualified for each other’s shift
    • Checks for overtime impact
    • Approves or denies with reason

Step 4: Swap executed:

  • If approved: Shifts reassigned, both employees notified
  • If denied: Status updated, employees notified

Table view:

Requested ByShift DateOriginal ShiftSwap WithReplacement ShiftStatusActions
John Doe9/2008:00-17:00 Lane AJane Smith14:00-23:00 Lane BPendingView, Approve, Deny

Filters:

  • Status: Pending, Approved, Denied, Cancelled
  • Date range
  • Employee

Swap detail:

  • Original shifts for both employees
  • Reason for swap
  • Conflict warnings (if any)
  • Approval history

Approve:

  • Confirmation: “Approve swap between [A] and [B]?”
  • Action: Shifts swapped, status → “Approved”, log entry created

Deny:

  • Reason required (e.g., “Conflict with lane coverage”, “Overtime limit”)
  • Notification sent to both employees

Auto-approve rules (optional):

  • Same-day swaps within same shift time (no coverage gap)
  • Swaps between employees with same qualifications
  • Configurable in Settings → HR

Leave Requests (/dashboard/schedule/leaves)

Section titled “Leave Requests (/dashboard/schedule/leaves)”

Manage employee leave requests and approvals

Configured in Settings (may vary by organization):

  • Annual Leave: Paid vacation days
  • Sick Leave: Medical leave (may require certificate)
  • Personal Leave: Unpaid personal days
  • Parental Leave: Maternity/paternity
  • Bereavement: Family emergency
  • Other: Custom leave types

Step 1: Employee submits:

  1. Navigate to /schedule/me or dedicated leave form
  2. Click “Request Leave”
  3. Form:
    • Leave Type: Dropdown
    • Start Date: Date picker
    • End Date: Date picker (or half-day toggle)
    • Total Days: Auto-calculated
    • Reason: Free text
    • Attachments: Optional (e.g., medical certificate)
  4. Submit → Status “Pending”

Step 2: Manager reviews:

  • Manager receives notification
  • Views leave request in /schedule/leaves
  • Checks:
    • Leave balance (enough days remaining?)
    • Coverage (who will cover shifts?)
    • Conflicts (other leaves same period?)
  • Actions: Approve, Deny, Request more info

Step 3: Approval:

  • If approved:
    • Leave balance deducted
    • Scheduled shifts removed or marked “On Leave”
    • Employee notified
  • If denied:
    • Reason recorded
    • Employee notified
    • Balance unchanged

Table:

EmployeeLeave TypeStart DateEnd DateDaysStatusActions
John DoeAnnual9/259/273PendingView, Approve, Deny
Jane SmithSick9/209/201ApprovedView

Filters:

  • Status: Pending, Approved, Denied, Cancelled
  • Leave type
  • Date range
  • Employee

Leave detail panel:

  • Employee info
  • Leave dates and duration
  • Reason and attachments
  • Current balance (before and after deduction)
  • Coverage plan (if provided)
  • Approval workflow (if multi-level)

Per employee:

  • Annual leave: X days/year (accrued monthly or upfront)
  • Sick leave: Y days/year (may not carry over)
  • Other: Custom rules

Balance display:

  • Total allocated
  • Used (approved leaves)
  • Pending (awaiting approval)
  • Remaining

Carry-over:

  • Unused annual leave may roll over (org policy)
  • Expiry date displayed

Employee Certificates (/dashboard/hr/certificates)

Section titled “Employee Certificates (/dashboard/hr/certificates)”

Purpose: Track certifications, licenses, and training completion

Not yet implemented in audit - placeholder for future feature or custom extension

If implemented:

  • Certificate list per employee
  • Expiry tracking
  • Renewal reminders
  • Attachment storage

Bulk import schedule data from external systems

  • CSV: Comma-separated values
  • Excel: XLSX workbook

Step 1: Upload file:

  1. Click “Import Schedule”
  2. Select CSV or Excel file
  3. Upload

Step 2: Map columns:

  • System detects columns: Employee, Date, Start Time, End Time, Lane
  • User confirms or remaps column headers

Step 3: Validate:

  • System checks:
    • Employee exists (by email or employee code)
    • Date format valid
    • Time format valid
    • Lane exists
    • No conflicts (double-booking)
  • Displays errors/warnings

Step 4: Import:

  • Review summary: X shifts to create, Y conflicts skipped
  • Confirm: Import
  • Result: Shifts created as “Draft” (unpublished)

Step 5: Publish:

  • Review imported shifts in calendar
  • Publish batch or individually
Employee Code,Date,Start Time,End Time,Lane,Shift Type
EMP001,2026-09-20,08:00,17:00,Lane A,Morning
EMP002,2026-09-20,14:00,23:00,Lane B,Evening
  • Initial schedule setup for new store
  • Migrate from legacy scheduling system
  • Import forecasted schedule from workforce planning tool