Commit Graph

134 Commits

Author SHA1 Message Date
alexpolo1
db34ee96ed fix: make all verified smart packages selectable, not just 5
Root cause (from support tickets #333382 and #775903): a one-off
integrity migration archived 40 Excel-imported carpenter task packages
(is_active=0, blocked) because their material lines couldn't be
auto-linked to the material database, and even a verified component
package had nowhere to appear since the quote flow only fetched
packageType=complete_offer.

- verifyPackage now reactivates a package (is_active=1) once its
  materials/tasks pass integrity checks
- getPackageDetails/updatePackage can reach blocked-but-inactive
  packages so admins can repair them, without exposing genuinely
  deleted packages; fixes a latent bug where updatePackage's final
  UPDATE still hardcoded is_active=1 and would have silently no-op'd
- new GET /api/smart-packages/review-queue + SmartPackageReviewQueue
  admin panel to relink materials (with fuzzy-match suggestions) and
  verify archived packages in one step
- InlineSmartPackage gains an "Enkelte opgaver" à la carte picker
  (search-by-word, additive multi-select) for verified component
  packages, alongside the existing single complete-offer picker;
  geometry-based quantity/hours math extracted into
  utils/smartPackageGeometryCalculations.js so both flows share it

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-20 13:00:08 +02:00
alexpolo1
c3e3255aff [verified] fix: harden material and smart package errors 2026-08-18 12:50:24 +02:00
alexpolo1
8d2db6281c feat: send daily repository status to Discord 2026-08-18 10:07:59 +02:00
alexpolo1
77cddbf704 fix: harden mobile offer review flow 2026-08-18 00:49:25 +02:00
alexpolo1
6dc90a92aa security: move remaining credentials to environment 2026-08-17 09:25:03 +02:00
alexpolo1
edb73df2d6 docs: archive legacy guides and add Obsidian vault 2026-08-17 09:12:03 +02:00
alexpolo1
a2a99e1595 chore: stop tracking generated artifacts 2026-08-17 09:11:12 +02:00
alexpolo1
f9c0b7bc57 feat: harden smart package field workflow 2026-08-15 00:34:28 +02:00
alexpolo1
3ab5e8cf5e fix: resolve open smart package issues 2026-08-13 23:58:36 +02:00
alexpolo1
c6ca27dd22 feat: persist support tickets for Codex worklist 2026-08-13 14:29:15 +02:00
alexpolo1
340d15bf78 fix: align support tickets with osTicket API 2026-08-13 13:37:10 +02:00
alexpolo1
9c00074327 feat: add image attachments to support feedback 2026-08-13 13:28:29 +02:00
alexpolo1
ddc52ddc91 fix: cap quote PDFs and add compact recovery 2026-08-13 13:02:16 +02:00
Alex
d5f65f74d4 feat: mobil tømrerflow og Codex CLI-generering (#8)
Flyt brugerrettet indholdsgenerering til Codex CLI, forbedr mobilflowet og ret CI-miljøets afhængigheder og testkonfiguration.
2026-08-13 11:47:14 +02:00
alexpolo1
11ad6b7f0b feat: enforce verified smart package catalog 2026-08-10 12:38:52 +02:00
alexpolo1
46c0025e49 feat: add AI usage and quote output polish 2026-07-07 21:30:34 +02:00
alexpolo1
a6a643fd46 feat: add mobile order field workflow 2026-07-07 21:30:28 +02:00
alexpolo1
ca4ce44bef feat: improve roof quote readiness 2026-07-07 21:30:23 +02:00
alexpolo1
01ad8f4a49 feat: consolidate ordrestyring quote workflow 2026-07-05 08:10:59 +00:00
alexpolo1
002e05bfc7 fix(ordrestyring): close hours-without-case gap and harden local-first sync 2026-04-08 05:56:01 +00:00
alexpolo1
d081763d20 fix: stabilize ordrestyring sync parsing and simulation hours 2026-04-06 07:44:09 +00:00
alexpolo1
4695e28088 feat: add ordrestyring simulation runner 2026-04-05 20:05:07 +00:00
alexpolo1
7395d4d290 fix: stabilize ordrestyring sync layers 2026-04-05 19:47:47 +00:00
alexpolo1
10d94c7ff1 feat: persist carpenter workflow status and price freshness 2026-03-29 12:27:06 +00:00
alexpolo1
3b7772c697 chore: ignore test data and checkpoint current changes 2026-03-04 10:08:49 +00:00
alexpolo1
bbb75ccce2 feat: Add Advanced Dashboard and perform repo cleanup
This commit introduces a new Advanced Dashboard feature, which provides enhanced analytics and system health monitoring.

Additionally, this commit includes a general repository cleanup, which consists of:

- Removal of a duplicate  file from the root directory.
- Addition of temporary report and documentation files to .
- Relocation of several test files from the root to the  directory.
- Staging of various other modified files that were previously uncommitted.

The new Advanced Dashboard feature includes:
-  and  for the UI.
-  for the backend API.
-  for API documentation.

New tests for smart packages and autosave functionality have also been added.
2026-02-28 17:38:23 +00:00
Alex
9469a896d3 Merge pull request #1 from alexpolo1/copilot/identify-slow-code-improvements
Optimize database operations and async workflows for 5-20x performance gains
2026-01-25 12:01:05 +01:00
Alex
03071eb7b0 Merge pull request #2 from alexpolo1/copilot/secure-secret-handling
Security: Remove hardcoded JWT secrets and client-side refresh token storage
2026-01-25 11:57:25 +01:00
Claude
1ed77551a0 feat: Add comprehensive CI/CD pipelines and fix lint errors
CI/CD Pipelines:
- ci.yml: Enhanced with lint, unit tests, E2E tests, security scan
- deploy-test.yml: Test environment deployment workflow
- deploy-prod.yml: Production deployment with backup, rollback, smoke tests

Test Fixes:
- supportTickets.test.js: Fix field names (topic_id, priority_id)

Lint Fixes:
- CalendarGrid.js: Mark unused employeeTypeFilter
- CustomerSearch.js: Mark unused setTaskType
- EnhancedGeometry.js: Mark unused variables
- InlineSmartPackage.js: Add eslint-disable for unused handlers
- ProjectFlow.js: Remove unused imports and handlers
- WhosFreeWidget.js: Add eslint-disable for useEffect
- BackupImport.js: Remove unused TextField import
2026-01-25 10:47:16 +00:00
alexpolo1
a03b6df348 feat: Crew scheduling system (Phase 1-3) - 8.5/10 rating
Phase 1: Quick Wins
- Calendar default tab, simplified 3-option filters
- Show all employees including free ones

Phase 2: Core Functionality
- POST /api/calendar/allocate endpoint
- AllocationModal component with validation
- Integration with Ordrestyring GraphQL API

Phase 2.5: UX Polish
- Prominent employee names with type badges
- NotificationToast system for success/error feedback
- Auto-refresh after allocation
- Removed confusing employee-type filter

Phase 3: Enhanced UX
- WhosFreeWidget with tabs (I dag | I morgen | Denne uge)
- Job names displayed on busy employees
- Quick-allocate with employee pre-selection
- Fixed undefined name sorting bugs

Lars validation: 8.5/10 - 'Replaces whiteboard for 90% of planning'
Real impact: 97% faster than manual process (5s vs 2-3 min)
2026-01-22 21:59:34 +00:00
alexpolo1
b096ff55c3 fix: add automatic port cleanup before server start to prevent EADDRINUSE errors 2026-01-21 07:56:56 +00:00
alexpolo1
9937e60ed6 fix: correct syntax error in support tickets route and improve error handling 2026-01-21 07:52:13 +00:00
alexpolo1
f60a0dfd48 feat: add support ticket system with osTicket integration
- Add SupportDialog React component for user support requests
- Add backend /api/support/tickets endpoint with osTicket API integration
- Add comprehensive test suite for support tickets (Jest)
- Add system_settings table migration for dynamic osTicket config
- Fix OpenAI costs API query parameter bug
- Clean up ESLint warnings across frontend components
- Add Claude AI project configuration (.claude/ directory)
- Add comprehensive code quality rules and patterns
- Add security review and TDD workflow skills
- Add analysis report documenting project state

Technical details:
- Support dialog with form validation and rate limiting
- Database and env var fallback for osTicket credentials
- Input sanitization and XSS protection
- IP forwarding for ticket context
- Full test coverage (backend unit tests: 69/69 passing)
2026-01-21 07:29:20 +00:00
alexpolo1
e736645432 feat: Add task saving to database in Smart Packages + cleanup
Smart Package improvements:
- InlineSmartPackage.js: Add saveTaskToDatabase() to persist tasks
- smartPackagesRoutes.js: Add timeUnit and timePerUnit fields

Fixes:
- package.json: Fix playwright path to use local node_modules

Cleanup:
- .gitignore: Add test-results and playwright-report to ignore
- Remove old backup files from tracking (already in .gitignore)
- Remove test result artifacts from tracking

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 11:04:50 +00:00
copilot-swe-agent[bot]
7f42aa7d89 Add prominent warnings about incomplete refresh token implementation
Co-authored-by: alexpolo1 <14327609+alexpolo1@users.noreply.github.com>
2026-01-06 07:29:29 +00:00
copilot-swe-agent[bot]
8d0e7c159d Address code review: remove JWT secret exports and clarify incomplete refresh implementation
Co-authored-by: alexpolo1 <14327609+alexpolo1@users.noreply.github.com>
2026-01-06 07:27:17 +00:00
copilot-swe-agent[bot]
bf2288c1a0 Update unified-server.js to use separate JWT secrets and fail-fast
Co-authored-by: alexpolo1 <14327609+alexpolo1@users.noreply.github.com>
2026-01-06 07:25:09 +00:00
copilot-swe-agent[bot]
f7d75e18d9 Add jsonwebtoken and bcryptjs dependencies for authentication
Co-authored-by: alexpolo1 <14327609+alexpolo1@users.noreply.github.com>
2026-01-06 07:23:03 +00:00
copilot-swe-agent[bot]
be642f5c1d Implement security improvements: enforce JWT secrets, remove client-side refresh token storage
Co-authored-by: alexpolo1 <14327609+alexpolo1@users.noreply.github.com>
2026-01-06 07:20:24 +00:00
copilot-swe-agent[bot]
3329ddef7f Address code review feedback: deterministic cache cleanup and migration approach
Co-authored-by: alexpolo1 <14327609+alexpolo1@users.noreply.github.com>
2025-12-27 08:39:49 +00:00
copilot-swe-agent[bot]
fb78cdcdcc Add caching layer and comprehensive performance documentation
Co-authored-by: alexpolo1 <14327609+alexpolo1@users.noreply.github.com>
2025-12-27 08:37:06 +00:00
copilot-swe-agent[bot]
f828106d68 Optimize backend: parallelize async operations and batch database inserts
Co-authored-by: alexpolo1 <14327609+alexpolo1@users.noreply.github.com>
2025-12-27 08:34:29 +00:00
alexpolo1
78595bbf6f feat: Complete SVG validation and enhancements for all roof types
- Added comprehensive SVG validation and fixes in EnhancedGeometry.js
- Created SVG_VALIDATION_COMPLETE.md to document validation results and improvements
- Developed a quick test guide for all 7 roof types in TEST_ROOF_TYPES_QUICK.md
- Summarized test results in TEST_SUMMARY.md, highlighting core functionality and API status
- Implemented Playwright tests for roof types API and UI interactions, ensuring all roof types are selectable and functional
- Enhanced error handling and accessibility features across the application
- Verified successful integration of SVG rendering with React components
2025-12-23 01:37:04 +00:00
alexpolo1
ed6b5cd3a5 logging: Add correlation ID middleware and structured logging with request tracing 2025-12-22 22:31:16 +00:00
alexpolo1
88996342f2 auth: Add JWT middleware and React Auth context with token refresh 2025-12-22 22:26:22 +00:00
alexpolo1
30a4a9995e test: Add backend tests for API routes and formula safety, wire into CI 2025-12-22 22:23:13 +00:00
alexpolo1
fa2a79f8aa sec: Replace eval with safe expression parser (expr-eval) for material formulas 2025-12-22 21:56:51 +00:00
alexpolo1
0435f121d1 feat: remove old MaterialPackages and SmartPackages components; add performance optimization indexes for various tables 2025-12-22 21:51:33 +00:00
alexpolo1
4af8713934 security: Remove all hardcoded credential fallbacks from source code
BREAKING CHANGE: Application now requires proper environment configuration

Changes:
- Remove hardcoded password fallbacks from 6 backend files
- auth.js: Remove 'toemrer/tilbud2024' fallbacks
- db/connection.js: Remove 'tilbudpass123' fallback
- graphqlClient.js: Remove API token fallback
- ordrestyringSyncService.js: Remove password and token fallbacks
- databaseService.js: Remove 'ServicePass2024!' fallback
- logger.js: Remove 'tilbudpass123' fallback

- Update .env.example with secure template
- Add validation to fail fast if credentials not configured
- Add security notes to .env.example

Security improvements:
 No hardcoded credentials in source code
 Application fails immediately if not configured
 Clear error messages for missing env vars
 Secure .env.example template provided

Action required:
1. Copy backend/.env.example to backend/.env
2. Configure all required credentials
3. Restart the application

All exposed credentials have been removed from source code.
Credential rotation is strongly recommended.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-20 13:18:13 +00:00
alexpolo1
b6cf7a23f9 Add LICENSE file for bundled React and related libraries 2025-11-26 14:57:57 +00:00