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
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user