Commit graph

17 commits

Author SHA1 Message Date
Vadym Samoilenko
6900dabfea merge git and server changes 2026-03-13 10:52:07 +00:00
Alessandro Benedetti Admin
cf9075a7e0 Lock Opera Upload stage as always-active and non-deselectable
Opera Upload (stage 7) is now permanently enabled for all brief types.
Toggle is disabled in Step 2, badge is non-clickable in Step 1, and a
"Required" label is shown in both views. Uses config-driven alwaysActive
flag — no hard-coded stage index in JS. Cache-busting bumped to v=2026031302.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 10:29:48 +00:00
Alessandro Benedetti Admin
878f231574 Add cache-busting version strings to script.js and config.json
Browsers were serving stale cached files after deploy. Added ?v=2026031201
query params to force fresh loads.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 17:52:49 +00:00
Alessandro Benedetti Admin
0c85cb4319 Update brief type descriptions, add disclaimer, decimal inputs, extend asset brackets
- Add non-contractual dates disclaimer banner at top of page
- Allow decimal values (0.1 step) in revision and approval fields
- Make Opera Upload mandatory for all brief types
- Remove Speed Up by % slider from Production stage
- Extend asset volume brackets: 100-200, 200-300, 300-400
- Update all 9 brief type descriptions with client scope definitions
- Render brief descriptions as bullet lists for clarity

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 17:44:06 +00:00
Vadym Samoilenko
7ba7cebf56 Fix API base path: use /loreal-sla-calculator/api prefix for all fetch calls
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-10 20:05:07 +00:00
Vadym Samoilenko
d1af08786c Add Node.js/Express backend, PostgreSQL, email/password auth, and Docker deployment
- Add Express server (server/) with JWT auth, rate limiting, and all /api/auth/* routes
- Add PostgreSQL schema and migration runner (3 migrations)
- Add email/password login, registration, password reset via Mailgun
- Validate MSAL SSO ID token server-side, upsert user into DB
- Rewrite auth.js: 8-panel auth UI (SSO, login, register, forgot, reset, verify)
- Expand index.html auth overlay with full multi-view auth UI
- Add apiFetch() helper in script.js with auto token refresh
- Add Dockerfile, docker-compose.yml, .dockerignore for containerised deployment
- Add idempotent deploy.sh: git pull, docker build, migrate, copy static to /var/www
- Add .gitignore

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-10 19:27:44 +00:00
Vadym Samoilenko
7ba4695f19 Add Azure AD SSO authentication using MSAL.js
Gate app access behind Microsoft login so only authenticated L'Oreal
users can use the calculator. Shows spinner overlay during sign-in,
displays user name in header with sign-out button.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 20:36:26 +00:00
Alessandro Benedetti Admin
a6135e09bc Add Gantt chart view to results page
- LIST/GANTT toggle buttons switch between table and visual views
- Pure CSS Gantt chart — no external library needed
- Horizontal bars show stage durations with purple gradient colors
- Month markers along the top for timeline context
- Red dashed GO-LIVE deadline marker when visible in range
- Stages 4 & 5 (Translation) shown as parallel bars
- Only active stages displayed in Gantt
- Hover tooltip shows date range and total days per stage
- Legend with stage duration and go-live indicators
- Works in both light and dark modes

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 17:49:35 +00:00
Alessandro Benedetti Admin
9afa90391b Disable weekends and past dates in date pickers
- Flatpickr now greys out Sat/Sun so they cannot be selected
- minDate set to 'today' to prevent picking dates in the past
- Business day calculations already excluded weekends (addBusinessDays)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 17:41:53 +00:00
Alessandro Benedetti Admin
e23c887b0f Show step 4 (Results) as green checkmark in stepper
Step 4 now shows a green checkmark like completed steps, since reaching
Results means the wizard is complete.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 17:39:40 +00:00
Alessandro Benedetti Admin
181dfbe7bf Make verdict badge a large roundel with checkmark/cross icons
- Y verdict: large green circle with white checkmark SVG
- N verdict: large red circle with white X SVG
- ? verdict: large gray circle with white question mark
- Responsive sizing (w-20/h-20 mobile, w-24/h-24 desktop) with shadow

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 17:37:30 +00:00
Alessandro Benedetti Admin
ff0cf5ed0d Change date format from DD/Mon to DD-Mon in results tables
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 17:33:51 +00:00
Alessandro Benedetti Admin
f228592025 Replace Markdown copy with rich HTML for Outlook-friendly email pasting
- copyForEmail() generates inline-styled HTML tables that render in Outlook/Gmail
- Uses ClipboardItem API with text/html + text/plain, fallback to execCommand
- Tables have borders, gray headers, green/gray active badges
- Button renamed from "Copy as Markdown" to "Copy for Email"
- Shows "Copied!" confirmation with checkmark for 2 seconds

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 17:07:37 +00:00
Alessandro Benedetti Admin
29ad845ce0 Add Copy as Markdown button for easy email sharing
- New copyMarkdown() function generates clean Markdown with verdict, key dates table, and calculation table
- Uses clipboard API with textarea fallback for broad browser support
- Button shows brief "Copied!" confirmation feedback
- Green emerald button sits alongside existing Calendar and CSV exports

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 17:03:25 +00:00
Alessandro Benedetti Admin
006e5e6690 Make stage badges clickable in Step 1, move Key Dates table above Calculation of Days
- Stage badges in Step 1 are now clickable to toggle stages on/off
- Added hint text "Click a stage to toggle it on or off"
- Stages 4 & 5 (Translation) toggle together when either badge is clicked
- Badge clicks sync with Step 2 toggle switches via updateStageCards()
- Swapped table order in results: Key Dates now appears first (more client-relevant)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 16:56:11 +00:00
Alessandro Benedetti Admin
55d902d311 Replace PDF export with CSV, add iCal calendar export
- Removed html2pdf.js CDN dependency
- Replaced PDF export with CSV export (summary + two data tables)
- Added iCal (.ics) export with key milestone dates for Outlook/Google Calendar
- Added csvEscape utility and lastCalculationData state tracking

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 16:43:42 +00:00
Alessandro Benedetti
2b400201cb Add SLA Calculator web app
Static web app that replaces the Excel SLA calculator with a 4-step wizard:
- config.json: all business rules, cross-reference tables, stage matrix, tooltips
- index.html: Tailwind CSS UI with dark mode, responsive layout, Flatpickr dates
- script.js: business-day calculation engine, real-time SLA computation, PDF + iCal export

Matches Excel logic exactly (verified against Tab 2 example).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 15:01:40 +00:00