nis2-agile/public
Cristiano Benassati bcc5a2b003 [FIX] E2E testing - fix router, EmailService, frontend data mapping
Critical fixes discovered during end-to-end testing:

Router (index.php):
- Rewrote route resolution engine to properly handle /{id}/subAction patterns
- All routes like GET /assessments/{id}/questions, POST /incidents/{id}/early-warning,
  GET /organizations/{id}/members now resolve correctly
- Routes with kebab-case sub-actions (early-warning, ai-analyze) now convert to camelCase
- Controller methods receive correct arguments via spread operator

EmailService.php:
- Fix PHP parse error: ?? operator cannot be used inside string interpolation {}
- Extract incident_code to variable before interpolation (3 occurrences)

assessment.html:
- Fix data structure handling: API returns categories with nested questions array
- Fix field names: question_code (not question_id), response_value (not compliance_level)
- Fix answer enum values: not_implemented/partial/implemented (not Italian)
- Fix question text field: question_text (not text/question/title)
- Show NIS2 article and ISO 27001 control references
- Fix response restoration from existing answers

dashboard.html:
- Fix data mapping from overview API response structure
- risks.total instead of open_risks, policies array instead of approved_policies
- Calculate training completion percentage from training object
- Load deadlines/activity from dedicated endpoints (not included in overview)

onboarding.html:
- Fix field name mismatches: annual_turnover_eur, contact_email, contact_phone,
  full_name, phone (matching OnboardingController expected params)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 19:40:26 +01:00
..
admin [FEAT] Add all frontend pages - complete UI for NIS2 platform 2026-02-17 18:46:03 +01:00
css [CORE] Initial project scaffold - NIS2 Agile Compliance Platform 2026-02-17 17:50:18 +01:00
js [FEAT] Add EmailService, RateLimitService, ReportService + integrations 2026-02-17 19:12:46 +01:00
.htaccess [FIX] Deploy fixes - Auth header passthrough, dashboard query, landing page 2026-02-17 18:08:43 +01:00
api-status.php [CORE] Initial project scaffold - NIS2 Agile Compliance Platform 2026-02-17 17:50:18 +01:00
assessment.html [FIX] E2E testing - fix router, EmailService, frontend data mapping 2026-02-17 19:40:26 +01:00
assets.html [FEAT] Add all frontend pages - complete UI for NIS2 platform 2026-02-17 18:46:03 +01:00
dashboard.html [FIX] E2E testing - fix router, EmailService, frontend data mapping 2026-02-17 19:40:26 +01:00
incidents.html [FEAT] Add all frontend pages - complete UI for NIS2 platform 2026-02-17 18:46:03 +01:00
index.html [FIX] Deploy fixes - Auth header passthrough, dashboard query, landing page 2026-02-17 18:08:43 +01:00
index.php [FIX] E2E testing - fix router, EmailService, frontend data mapping 2026-02-17 19:40:26 +01:00
login.html [FEAT] Add onboarding wizard with visura camerale and CertiSource integration 2026-02-17 19:01:34 +01:00
onboarding.html [FIX] E2E testing - fix router, EmailService, frontend data mapping 2026-02-17 19:40:26 +01:00
policies.html [FEAT] Add all frontend pages - complete UI for NIS2 platform 2026-02-17 18:46:03 +01:00
register.html [FEAT] Add onboarding wizard with visura camerale and CertiSource integration 2026-02-17 19:01:34 +01:00
reports.html [FEAT] Add all frontend pages - complete UI for NIS2 platform 2026-02-17 18:46:03 +01:00
risks.html [FEAT] Add all frontend pages - complete UI for NIS2 platform 2026-02-17 18:46:03 +01:00
settings.html [FEAT] Add all frontend pages - complete UI for NIS2 platform 2026-02-17 18:46:03 +01:00
setup-org.html [CORE] Initial project scaffold - NIS2 Agile Compliance Platform 2026-02-17 17:50:18 +01:00
supply-chain.html [FEAT] Add all frontend pages - complete UI for NIS2 platform 2026-02-17 18:46:03 +01:00
training.html [FEAT] Add all frontend pages - complete UI for NIS2 platform 2026-02-17 18:46:03 +01:00