Commit graph

25 commits

Author SHA1 Message Date
Phil Dore
586cb57155 Simplify Stage 8 syndication and derive Advisor Stage 6 complexity
- Stage 8: replace 3x3 complexity x EAN grid with single syndicationType
  dropdown -- Salsify Prep Only (4d), Syndication PDP (5d), Syndication
  Non-PDP (3d). Advisor maps contentType to PDP/Non-PDP only; Salsify
  Prep Only is not surfaced in the Advisor (team decision).
- Stage 6 (Advisor): derive complexity from staticWorkType / videoWorkType
  / needsHTML toggles via deriveProductionComplexity helper. Precedence
  bespoke > creation > complex > simple, max across enabled toggles.
  HTML-only falls back to complex (placeholder, may revisit).
- Bump config.json cache-bust to 2026050801.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-08 13:24:02 +01:00
Phil Dore
5e301b68c1 Update production day estimates per v3 amends (06/05/26)
Simple row reduced across all brackets (4/5/7/7/7 → 2/4/6/6/6). Creation reshaped (5/10/11/13/13 → 7/9/11/11/11). Simple default revision rounds 1 → 2. Complex, bespoke and Opera Upload unchanged. Cache-bust bumped to 2026050601 on both scripts so browsers refetch the new config.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-06 17:37:51 +01:00
Phil Dore
45238e7a9b Bump config.json cache-bust version to 2026050101
Forces browsers to fetch updated config.json with revised production day estimates.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-01 17:00:47 +01:00
Phil Dore
a77efee3fc Remove handover days from SLA Calculator to match Advisor
Mirrors the change from commit d19f7e7 which removed handover from
the Advisor. Sets handover:0 for all stages, removes grey Handover
phase bars from Gantt, removes Handover column from summary table,
CSV export, and email copy. Bumps script version to bust cache.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-24 12:18:19 +01:00
Phil Dore
375ca684a1 Fix Gantt red line offset: add LABEL_W to marker position in both charts
The deadline marker was positioned relative to the outer container but
calculated relative to the timeline column only, placing it LABEL_W px
too far left. Adds LABEL_W offset so EST. COMPLETION (Advisor) and
SUGGESTED LIVE (Calculator) lines land on the correct dates.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-24 11:36:31 +01:00
Phil Dore
3ed76f15b6 Add Gantt sub-phase breakdown with day-grid header and PNG export
- Gantt now shows per-stage phases: WIP 1, Feedback 1, WIP 2... (violet/amber colour coding)
- Replaced month-based % layout with fixed 28px/day grid (horizontally scrollable)
- Two-row header: week-start dates + SMTWTFS day letters
- Weekend columns shaded gray across all stage rows
- Added Download PNG button using html2canvas (2x retina quality)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-23 12:15:13 +01:00
Vadym Samoilenko
8843af6402 Add analytics link to page headers, event tracking to calculator, update deploy script
- Add analytics.html to STATIC_FILES in deploy.sh
- Add trackEvent/getVisitorId to script.js with page_view, show_results, copy_email hooks
- Add "Analytics →" nav link to index.html and market.html headers

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-17 16:15:12 +00:00
Alessandro Benedetti Admin
80d90da95e Market Brief Advisor: copy for email, timeline dates, syndication default, verdict fix
- Add Copy for Email button with rich HTML table (Outlook-compatible)
- Show start → end dates on each timeline stage row
- Syndication toggled ON by default
- Fix translation feedback default to 5 days (matches config.json)
- Restore form validation (disabled button until all fields filled)
- Fix verdict logic in full calculator to include syndication buffer
  in deadline comparison (suggestedGoLive vs goLive)
- Differentiate verdict message: production-over vs syndication-short
- Update README with client estimator docs

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-16 12:00:46 +00:00
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