From ccb27f679ff015b3dd2da7eb873898f2049af9b6 Mon Sep 17 00:00:00 2001 From: John Mizerek Date: Sun, 11 Jan 2026 18:01:30 -0800 Subject: [PATCH] Show EmployeeStatusID status instead of IsActive flag - Display Pending/Invited/Active/Suspended from EmployeeStatusID - Add CSS for pending and suspended status badges - Update getStatusClass to handle employee status codes Co-Authored-By: Claude Opus 4.5 --- portal/index.html | 2 +- portal/portal.css | 8 +++++++- portal/portal.js | 17 +++++++++-------- 3 files changed, 17 insertions(+), 10 deletions(-) diff --git a/portal/index.html b/portal/index.html index 5814327..6f0a185 100644 --- a/portal/index.html +++ b/portal/index.html @@ -424,6 +424,6 @@
- + diff --git a/portal/portal.css b/portal/portal.css index 241f7d0..4b2e4a1 100644 --- a/portal/portal.css +++ b/portal/portal.css @@ -803,11 +803,17 @@ body { color: var(--success); } -.status-badge.inactive { +.status-badge.inactive, +.status-badge.suspended { background: rgba(239, 68, 68, 0.1); color: var(--danger); } +.status-badge.pending { + background: rgba(156, 163, 175, 0.1); + color: var(--gray-600); +} + /* Modal */ .modal-overlay { display: none; diff --git a/portal/portal.js b/portal/portal.js index 54b6522..14875b4 100644 --- a/portal/portal.js +++ b/portal/portal.js @@ -301,15 +301,16 @@ const Portal = { `).join(''); }, - // Get status class + // Get status class for orders getStatusClass(statusId) { const classes = { - 1: 'submitted', - 2: 'preparing', - 3: 'ready', - 4: 'completed' + 0: 'pending', // Employee: Pending + 1: 'submitted', // Order: Submitted, Employee: Invited + 2: 'active', // Order: Preparing, Employee: Active + 3: 'suspended', // Order: Ready, Employee: Suspended + 4: 'completed' // Order: Completed }; - return classes[statusId] || 'submitted'; + return classes[statusId] || 'pending'; }, // Get status text @@ -544,8 +545,8 @@ const Portal = { ${member.Email || '-'} ${this.formatPhone(member.Phone)} - - ${member.IsActive ? 'Active' : 'Inactive'} + + ${member.StatusName || 'Unknown'}