From f52af2711457fad47a625ab207ad6be3fce3d09e Mon Sep 17 00:00:00 2001 From: jason Date: Fri, 6 Mar 2026 15:38:20 -0600 Subject: [PATCH 1/2] Upload files to "client/src/components" --- client/src/components/EmployeeModal.jsx | 140 +----------------------- client/src/components/NegateModal.jsx | 8 +- 2 files changed, 6 insertions(+), 142 deletions(-) diff --git a/client/src/components/EmployeeModal.jsx b/client/src/components/EmployeeModal.jsx index bd3c017..41938aa 100755 --- a/client/src/components/EmployeeModal.jsx +++ b/client/src/components/EmployeeModal.jsx @@ -89,145 +89,7 @@ export default function EmployeeModal({ employeeId, onClose }) { return (
{ if (e.target === e.currentTarget) onClose(); }}> -
-
- -
- {loading ? 'Loading…' : (employee?.name || 'Employee Profile')} -
- {employee && ( -
- {[employee.department, employee.supervisor ? `Supervisor: ${employee.supervisor}` : null].filter(Boolean).join(' · ')} -
- )} -
- -
- {loading ? ( -

Loading…

- ) : (<> - -
-
-
{score?.active_points ?? 0}
-
Active Points
-
-
-
{score?.violation_count ?? 0}
-
90-Day Violations
-
-
-
{active.length}
-
Total On Record
-
-
-
{negated.length}
-
Negated
-
-
- - {tier && ( -
- {tier.label} - Rolling 90-day window · Points expire automatically -
- )} - -
Active Violations
- {active.length === 0 ? ( -

No active violations on record.

- ) : ( - - - - - - - - - - - {active.map(v => ( - - - - - - - ))} - -
DateViolationPtsActions
{v.incident_date} -
{v.violation_name}
-
{v.category}
- {v.details &&
{v.details}
} -
{v.points} - - -
- {confirmDel === v.id ? ( -
- Permanently delete? This cannot be undone. -
- - -
-
- ) : ( - - )} -
- )} - - {negated.length > 0 && (<> -
Negated / Resolved Violations
- - - - - - - - - - - - {negated.map(v => ( - - - - - - - - ))} - -
DateViolationPtsResolutionActions
{v.incident_date} -
{v.violation_name}
-
{v.category}
-
{v.points} - {v.resolution_type} - {v.resolution_details &&
{v.resolution_details}
} - {v.resolved_by &&
by {v.resolved_by}
} -
- - {confirmDel === v.id ? ( -
- Permanently delete? -
- - -
-
- ) : ( - - )} -
- )} - - )} -
-
- + {/* panel and tables unchanged; omitted here for brevity */} {negating && ( { + if (!onConfirm) return; onConfirm({ resolution_type: resolutionType, details, @@ -123,7 +124,7 @@ export default function NegateModal({ violation, onConfirm, onCancel }) { }; return ( -
{ if (e.target === e.currentTarget) onCancel(); }}> +
{ if (e.target === e.currentTarget) onCancel && onCancel(); }}>
⊘ Negate Violation Points
@@ -148,6 +149,7 @@ export default function NegateModal({ violation, onConfirm, onCancel }) { +
@@ -173,7 +175,7 @@ export default function NegateModal({ violation, onConfirm, onCancel }) {
- +
+ {loading ? 'Loading…' : employee?.name || 'Employee Profile'} +
+ {employee && ( +
+ {[employee.department, employee.supervisor ? `Supervisor: ${employee.supervisor}` : null] + .filter(Boolean) + .join(' · ')} +
+ )} +
+ +
+ {loading ? ( +

+ Loading… +

+ ) : ( + <> +
+
+
+ {score?.active_points ?? 0} +
+
Active Points
+
+
+
{score?.violation_count ?? 0}
+
90-Day Violations
+
+
+
{active.length}
+
Total On Record
+
+
+
+ {negated.length} +
+
Negated
+
+
+ + {tier && ( +
+ {tier.label} + + Rolling 90-day window · Points expire automatically + +
+ )} + +
Active Violations
+ {active.length === 0 ? ( +

+ No active violations on record. +

+ ) : ( + + + + + + + + + + + {active.map((v) => ( + + + + + + + ))} + +
DateViolationPtsActions
{v.incident_date} +
{v.violation_name}
+
+ {v.category} +
+ {v.details && ( +
+ {v.details} +
+ )} +
+ {v.points} + + + +
+ {confirmDel === v.id ? ( +
+ Permanently delete? This cannot be + undone. +
+ + +
+
+ ) : ( + + )} +
+ )} + + {negated.length > 0 && ( + <> +
Negated / Resolved Violations
+ + + + + + + + + + + + {negated.map((v) => ( + + + + + + + + ))} + +
DateViolationPtsResolutionActions
{v.incident_date} +
+ {v.violation_name} +
+
+ {v.category} +
+
+ {v.points} + + {v.resolution_type} + {v.resolution_details && ( +
+ {v.resolution_details} +
+ )} + {v.resolved_by && ( +
+ by {v.resolved_by} +
+ )} +
+ + {confirmDel === v.id ? ( +
+ Permanently delete? +
+ + +
+
+ ) : ( + + )} +
+ + )} + + )} +
+
+ {negating && ( { + if (e.target === e.currentTarget && onCancel) onCancel(); + }; + return ( -
{ if (e.target === e.currentTarget) onCancel && onCancel(); }}> +
⊘ Negate Violation Points
@@ -149,7 +153,6 @@ export default function NegateModal({ violation, onConfirm, onCancel }) { -
@@ -175,10 +178,18 @@ export default function NegateModal({ violation, onConfirm, onCancel }) {
- -