From 5d835e6b911cf4f1e6edac2bf6a93d6d8cc1f3b4 Mon Sep 17 00:00:00 2001 From: jason Date: Sat, 7 Mar 2026 23:13:26 -0600 Subject: [PATCH 1/3] feat: add shared DEPARTMENTS constant --- client/src/data/departments.js | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 client/src/data/departments.js diff --git a/client/src/data/departments.js b/client/src/data/departments.js new file mode 100644 index 0000000..9ed3cfa --- /dev/null +++ b/client/src/data/departments.js @@ -0,0 +1,9 @@ +export const DEPARTMENTS = [ + 'Administrative', + 'Business Development', + 'Design and Content', + 'Executive', + 'Implementation and Support', + 'Operations', + 'Production', +]; From 0f31677631a959ea55178c4b3f03a34578fc0aab Mon Sep 17 00:00:00 2001 From: jason Date: Sat, 7 Mar 2026 23:14:40 -0600 Subject: [PATCH 2/3] feat: replace department text input with preloaded select dropdown --- client/src/components/ViolationForm.jsx | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/client/src/components/ViolationForm.jsx b/client/src/components/ViolationForm.jsx index 3367803..2ca944b 100755 --- a/client/src/components/ViolationForm.jsx +++ b/client/src/components/ViolationForm.jsx @@ -6,6 +6,7 @@ import CpasBadge from './CpasBadge'; import TierWarning from './TierWarning'; import ViolationHistory from './ViolationHistory'; import { useToast } from './ToastProvider'; +import { DEPARTMENTS } from '../data/departments'; const s = { content: { padding: '32px 40px', background: '#111217', borderRadius: '10px', color: '#f8f9fa' }, @@ -171,12 +172,21 @@ export default function ViolationForm() { )}
- {[['employeeName','Employee Name','text','John Doe'],['department','Department','text','Engineering'],['supervisor','Supervisor Name','text','Jane Smith'],['witnessName','Witness Name (Officer)','text','Officer Name']].map(([name,label,type,ph]) => ( + {[['employeeName','Employee Name','John Doe'],['supervisor','Supervisor Name','Jane Smith'],['witnessName','Witness Name (Officer)','Officer Name']].map(([name,label,ph]) => (
- +
))} +
+ + +
From d8793000fc69fa2089318fea2fd764e52c758fef Mon Sep 17 00:00:00 2001 From: jason Date: Sat, 7 Mar 2026 23:15:15 -0600 Subject: [PATCH 3/3] feat: replace department text input with preloaded select dropdown --- client/src/components/EditEmployeeModal.jsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/client/src/components/EditEmployeeModal.jsx b/client/src/components/EditEmployeeModal.jsx index a438e1b..1d71ed4 100644 --- a/client/src/components/EditEmployeeModal.jsx +++ b/client/src/components/EditEmployeeModal.jsx @@ -1,5 +1,6 @@ import React, { useState, useEffect } from 'react'; import axios from 'axios'; +import { DEPARTMENTS } from '../data/departments'; const s = { overlay: { @@ -133,7 +134,12 @@ export default function EditEmployeeModal({ employee, onClose, onSaved }) {
Full Name
setName(e.target.value)} />
Department
- setDepartment(e.target.value)} placeholder="Optional" /> +
Supervisor
setSupervisor(e.target.value)} placeholder="Optional" />