From 81397902028e802b7801ddb2898c6295a94f2a44 Mon Sep 17 00:00:00 2001 From: eewing Date: Fri, 20 Feb 2026 09:59:31 -0600 Subject: [PATCH] refactor(scope-options): update and standardize scope options across multiple files - Reorganized and standardized scope options in `+page.svelte` and `+server.ts` files to improve clarity and consistency. - Removed duplicate and inconsistent entries, ensuring a uniform list of scope options for better usability in the application. --- src/routes/+page.svelte | 30 ++++++++++++++++------------- src/routes/[id]/+page.svelte | 30 ++++++++++++++++------------- src/routes/api/employees/+server.ts | 30 ++++++++++++++++------------- 3 files changed, 51 insertions(+), 39 deletions(-) diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index d61b7d7..115e739 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -25,21 +25,25 @@ let loadingMore = $state(false); let error = $state(null); const SCOPE_OPTIONS = [ - 'General', - 'OFFICE', - 'IT', - 'Framing', - 'Insulation', - 'Hanging', - 'Taping', - 'Scrap', - 'paper', - 'sanding', - 'masking', - 'WT', 'cleanup', + 'FRP', + 'Framing', + 'Framing Metal', + 'Framing Wood', + 'General', 'Grid', - 'Tile' + 'Hanging', + 'Insulation', + 'IT', + 'L5', + 'Masking', + 'OFFICE', + 'Paper', + 'Sanding', + 'Scrap', + 'Taping', + 'Tile', + 'WT' ]; type TypeFilterValue = 'all' | 'Employee' | 'Sub-Contractor'; diff --git a/src/routes/[id]/+page.svelte b/src/routes/[id]/+page.svelte index efd8f90..f124e79 100644 --- a/src/routes/[id]/+page.svelte +++ b/src/routes/[id]/+page.svelte @@ -143,21 +143,25 @@ } const SCOPE_OPTIONS = [ - 'General', - 'OFFICE', - 'IT', - 'Framing', - 'Insulation', - 'Hanging', - 'Taping', - 'Scrap', - 'paper', - 'sanding', - 'masking', - 'WT', 'cleanup', + 'FRP', + 'Framing', + 'Framing Metal', + 'Framing Wood', + 'General', 'Grid', - 'Tile' + 'Hanging', + 'Insulation', + 'IT', + 'L5', + 'Masking', + 'OFFICE', + 'Paper', + 'Sanding', + 'Scrap', + 'Taping', + 'Tile', + 'WT' ]; function employeeScopes(): string[] { diff --git a/src/routes/api/employees/+server.ts b/src/routes/api/employees/+server.ts index a4c451e..dfa4fcc 100644 --- a/src/routes/api/employees/+server.ts +++ b/src/routes/api/employees/+server.ts @@ -22,21 +22,25 @@ function escapeFilterValue(s: string): string { } const SCOPE_OPTIONS = [ - 'General', - 'OFFICE', - 'IT', - 'Framing', - 'Insulation', - 'Hanging', - 'Taping', - 'Scrap', - 'paper', - 'sanding', - 'masking', - 'WT', 'cleanup', + 'FRP', + 'Framing', + 'Framing Metal', + 'Framing Wood', + 'General', 'Grid', - 'Tile' + 'Hanging', + 'Insulation', + 'IT', + 'L5', + 'Masking', + 'OFFICE', + 'Paper', + 'Sanding', + 'Scrap', + 'Taping', + 'Tile', + 'WT' ]; export const GET: RequestHandler = async ({ locals, url }) => {