Add frontend/modules/loyalty with types, API client, design system, feature pages and thin App Router routes under app/loyalty/. BFF proxy at app/api/loyalty/. Include loyalty frontend docs. Co-authored-by: Cursor <cursoragent@cursor.com>
3.0 KiB
3.0 KiB
Phase: Staff & Commission
| Field | Value |
|---|---|
| Identifier | beauty-business-14-6 |
| Status | Planned |
| Owner | Platform |
| Module(s) | beauty_business.staff, beauty_business.commissions |
| Service(s) | beauty_business |
| Depends On | beauty-business-14-0, beauty-business-14-1 (schedules), beauty-business-14-3 (skills) |
| ADR(s) | TBD |
| Manifest | phase-manifest.yaml |
| Framework | ADR-013 · ADR-018 · ADR-019 |
Objective
Manage beauty staff and commission: staff profiles linked to Identity users, skills and certifications, working hours (feeds 14.1 schedules), commission rules (percentage, tiered, service-based), commission entries on completed services — without owning Identity admin, HCM payroll (Accounting Phase 5.9), or Healthcare doctor profiles.
Enterprise Phase Discovery
Required before Implementation.
Target Responsibility (this phase when Complete)
- StaffProfile (identity_user_ref, branch assignment, staff_kind: stylist, barber, therapist, laser tech)
- StaffSkill, StaffCertificate (refs Storage for docs)
- StaffWorkingHours (may unify with 14.1 schedules per Discovery)
- CommissionRule, CommissionEntry (accrual shells)
- Payroll export intents to Accounting (refs only)
- Events:
beauty_business.staff.*,beauty_business.commission.*
Explicitly Excluded
- Identity user provisioning
- Accounting PayrollEngine implementation
- Healthcare doctor panel and clinical credentials
Business Analysis
| Item | Detail |
|---|---|
| Actors | Salon owner, branch manager, stylist |
| Business capabilities | Staff roster, skills, commission calculation |
| Success metrics | Commission entries match completed appointments |
| Non-goals | Full HRIS |
Scope
In Scope
- StaffProfile, StaffSkill, StaffCertificate
- CommissionRule (per service, per staff tier, split rules shell)
- CommissionEntry (generated on appointment.completed)
- Permissions:
beauty_business.staff.*,beauty_business.commissions.*
High-Level Entities
| Entity | Purpose |
|---|---|
| StaffProfile | Beauty professional |
| StaffSkill | Color specialist, laser certified, … |
| CommissionRule | 40% service commission |
| CommissionEntry | Accrued commission line |
Out of Scope
- Booking availability engine (14.1)
- Marketing (14.7)
- Accounting journal posting (intents only)
- Healthcare doctors and visit sessions
Completion Criteria
- Staff linked by Identity ref only
- Commission entries triggered from appointment events
- No payroll engine duplication in beauty_business service