From db3d8df6cc274684ff5638211bc9f625a1026548 Mon Sep 17 00:00:00 2001 From: aewing Date: Mon, 22 Dec 2025 05:48:18 +0000 Subject: [PATCH] feat: add estimator table with frozen columns, settings UI, and dynamic column configuration - Created estimatortable.html with 47 columns displaying Job_Info_TestEnv data - Implemented frozen first two columns (Job_Number, Job_Full_Name) with sticky positioning - Implemented frozen header row with proper z-index layering - Added proper scrolling (vertical and horizontal within table container) - Applied .cursorrules formatting: dates in Central Time (MM/dd/yyyy), booleans as checkboxes - Implemented calculated fields: Due_Date_Counter with business logic, Active field read-only - Made boolean fields editable with PocketBase updates (except Active) - Created appsettings.html for comprehensive table configuration - Added global settings: row height, font size, striped rows - Added per-column settings: width, visibility, read-only status - Added dropdown choice configuration with color pickers and font styles for Job_Status - Settings save/load from app_preferences_settings collection - Fixed column position mapping with COLUMN_ORDER array for correct visibility and width application - Fixed horizontal scroll by calculating total table width dynamically - Added server routes for /estimatortable.html and /appsettings.html - Updated port to 6500 with improved console output --- appsettings.html | 482 ++++++++++++++++++++++++++++ estimatortable.html | 755 ++++++++++++++++++++++++++++++++++++++++++++ server.ts | 24 +- 3 files changed, 1258 insertions(+), 3 deletions(-) create mode 100644 appsettings.html create mode 100644 estimatortable.html diff --git a/appsettings.html b/appsettings.html new file mode 100644 index 0000000..74b1217 --- /dev/null +++ b/appsettings.html @@ -0,0 +1,482 @@ + + + + + + Estimator Job List - Settings + + + + + + + +
+
+
+

Estimator Job List Settings

+

Configure table appearance and behavior

+
+ +
+
+ + +
+
+

Loading settings...

+
+ + + + + + + + diff --git a/estimatortable.html b/estimatortable.html new file mode 100644 index 0000000..8373c1d --- /dev/null +++ b/estimatortable.html @@ -0,0 +1,755 @@ + + + + + + Estimator Table + + + + + + + + + + + + + + + + + + + + + + diff --git a/server.ts b/server.ts index 81c5d01..b9505a5 100644 --- a/server.ts +++ b/server.ts @@ -99,12 +99,27 @@ app.post('/api/submit', async (c) => { } }); -// Serve static index.html +// Serve static files app.get('/', async (c) => { const html = await Bun.file('index.html').text(); return c.html(html); }); +app.get('/estimatortable.html', async (c) => { + const html = await Bun.file('estimatortable.html').text(); + return c.html(html); +}); + +app.get('/admin.html', async (c) => { + const html = await Bun.file('admin.html').text(); + return c.html(html); +}); + +app.get('/appsettings.html', async (c) => { + const html = await Bun.file('appsettings.html').text(); + return c.html(html); +}); + // Admin login endpoint app.post('/api/admin/login', async (c) => { try { @@ -480,9 +495,12 @@ app.get('/api/export/schema', async (c) => { } }); -const PORT = Number(process.env.PORT || 7500); +const PORT = Number(process.env.PORT || 6500); -console.log(`Idea & Feedback Form server running at http://localhost:${PORT}`); +console.log(`\n🚀 Server running on port ${PORT}`); +console.log(`\n📊 Estimator Table: \x1b[36mhttp://localhost:${PORT}/estimatortable.html\x1b[0m`); +console.log(`📝 Idea & Feedback Form: \x1b[36mhttp://localhost:${PORT}/index.html\x1b[0m`); +console.log(`👤 Admin Panel: \x1b[36mhttp://localhost:${PORT}/admin.html\x1b[0m\n`); export default { port: PORT,