From 9d9453b5c81cc0721caea2b8b7dc897af2750940 Mon Sep 17 00:00:00 2001 From: gsinghpal Date: Tue, 24 Feb 2026 02:53:55 -0500 Subject: [PATCH] feat: customizable portal gradient theme + LTC repair form fixes - Add portal gradient branding settings with 4 presets (Green/Teal, Blue/Purple, Sunset Orange, Dark Slate) and custom color picker - Live preview in settings, onchange updates colors reactively - Dynamic gradient applied across portal home, CSS, and card elements - Fix after photos visibility (conditional on resolved=yes) - Fix technician section gating on portal repair form - Move Create Sale Order button to form header for visibility - Fix portal home row width inconsistency (xpath target change) Co-authored-by: Cursor --- .../controllers/portal_main.py | 8 ++ .../static/src/css/portal_style.css | 10 +- .../views/portal_repair_form.xml | 42 +++---- .../views/portal_templates.xml | 30 ++--- fusion_claims/models/res_config_settings.py | 110 ++++++++++++++++++ fusion_claims/views/ltc_repair_views.xml | 6 +- .../views/res_config_settings_views.xml | 61 ++++++++++ 7 files changed, 226 insertions(+), 41 deletions(-) diff --git a/fusion_authorizer_portal/controllers/portal_main.py b/fusion_authorizer_portal/controllers/portal_main.py index e05288a..b97938f 100644 --- a/fusion_authorizer_portal/controllers/portal_main.py +++ b/fusion_authorizer_portal/controllers/portal_main.py @@ -37,6 +37,14 @@ class AuthorizerPortal(CustomerPortal): ]) response.qcontext['sign_count'] = sign_count response.qcontext['sign_module_available'] = sign_module_available + + ICP = request.env['ir.config_parameter'].sudo() + g_start = ICP.get_param('fusion_claims.portal_gradient_start', '#5ba848') + g_mid = ICP.get_param('fusion_claims.portal_gradient_mid', '#3a8fb7') + g_end = ICP.get_param('fusion_claims.portal_gradient_end', '#2e7aad') + response.qcontext['portal_gradient'] = ( + 'linear-gradient(135deg, %s 0%%, %s 60%%, %s 100%%)' % (g_start, g_mid, g_end) + ) return response diff --git a/fusion_authorizer_portal/static/src/css/portal_style.css b/fusion_authorizer_portal/static/src/css/portal_style.css index 3fb49d7..163e5ba 100644 --- a/fusion_authorizer_portal/static/src/css/portal_style.css +++ b/fusion_authorizer_portal/static/src/css/portal_style.css @@ -339,7 +339,7 @@ } .assessment-express-form .card-header.bg-primary { - background: linear-gradient(135deg, #5ba848 0%, #3a8fb7 60%, #2e7aad 100%) !important; + background: var(--fc-portal-gradient, linear-gradient(135deg, #5ba848 0%, #3a8fb7 60%, #2e7aad 100%)) !important; border-radius: 12px 12px 0 0; } @@ -391,7 +391,7 @@ } .assessment-express-form .progress-bar { - background: linear-gradient(90deg, #5ba848 0%, #3a8fb7 60%, #2e7aad 100%); + background: var(--fc-portal-gradient, linear-gradient(90deg, #5ba848 0%, #3a8fb7 60%, #2e7aad 100%)); } /* Section Separators */ @@ -415,7 +415,7 @@ /* New Assessment Card on Portal Home */ .portal-new-assessment-card { - background: linear-gradient(135deg, #5ba848 0%, #3a8fb7 60%, #2e7aad 100%) !important; + background: var(--fc-portal-gradient, linear-gradient(135deg, #5ba848 0%, #3a8fb7 60%, #2e7aad 100%)) !important; transition: transform 0.2s ease, box-shadow 0.2s ease; } @@ -450,7 +450,7 @@ /* Authorizer Portal Card on Portal Home */ .portal-authorizer-card { - background: linear-gradient(135deg, #5ba848 0%, #3a8fb7 60%, #2e7aad 100%) !important; + background: var(--fc-portal-gradient, linear-gradient(135deg, #5ba848 0%, #3a8fb7 60%, #2e7aad 100%)) !important; transition: transform 0.2s ease, box-shadow 0.2s ease; } @@ -522,7 +522,7 @@ /* Welcome Header */ .auth-dash-header { - background: linear-gradient(135deg, #5ba848 0%, #3a8fb7 60%, #2e7aad 100%); + background: var(--fc-portal-gradient, linear-gradient(135deg, #5ba848 0%, #3a8fb7 60%, #2e7aad 100%)); border-radius: 16px; margin-bottom: 24px; overflow: hidden; diff --git a/fusion_authorizer_portal/views/portal_repair_form.xml b/fusion_authorizer_portal/views/portal_repair_form.xml index 165e077..7d1d5ac 100644 --- a/fusion_authorizer_portal/views/portal_repair_form.xml +++ b/fusion_authorizer_portal/views/portal_repair_form.xml @@ -178,27 +178,29 @@ for="resolved_no">No -