From e74c6c9f5fa615dc2f07d48565a123f7cbc3e261 Mon Sep 17 00:00:00 2001 From: Nevio Di Gennaro Date: Tue, 19 Nov 2024 10:45:55 +0100 Subject: [PATCH] implement new config attr in frontend and rename attr --- .../src/main/java/ch/puzzle/okr/dto/ClientConfigDto.java | 2 +- .../customization/TenantClientCustomization.java | 2 +- .../customization/TenantClientCustomizationProvider.java | 2 +- .../okr/service/clientconfig/ClientConfigService.java | 2 +- backend/src/main/resources/application-dev.properties | 2 ++ .../application-top-bar/application-top-bar.component.html | 4 +++- .../application-top-bar/application-top-bar.component.ts | 6 +++++- frontend/src/app/shared/types/model/ClientConfig.ts | 2 +- 8 files changed, 15 insertions(+), 7 deletions(-) diff --git a/backend/src/main/java/ch/puzzle/okr/dto/ClientConfigDto.java b/backend/src/main/java/ch/puzzle/okr/dto/ClientConfigDto.java index 04716f4428..3a0714a807 100644 --- a/backend/src/main/java/ch/puzzle/okr/dto/ClientConfigDto.java +++ b/backend/src/main/java/ch/puzzle/okr/dto/ClientConfigDto.java @@ -3,6 +3,6 @@ import java.util.Map; public record ClientConfigDto(String activeProfile, String issuer, String clientId, String favicon, String logo, - String triangles, String backgroundLogo, String title, String supportSiteURL, + String triangles, String backgroundLogo, String title, String supportSiteUrl, Map customStyles) { } diff --git a/backend/src/main/java/ch/puzzle/okr/multitenancy/customization/TenantClientCustomization.java b/backend/src/main/java/ch/puzzle/okr/multitenancy/customization/TenantClientCustomization.java index 02b3aaba6a..ce797d5826 100644 --- a/backend/src/main/java/ch/puzzle/okr/multitenancy/customization/TenantClientCustomization.java +++ b/backend/src/main/java/ch/puzzle/okr/multitenancy/customization/TenantClientCustomization.java @@ -3,5 +3,5 @@ import java.util.Map; public record TenantClientCustomization(String favicon, String logo, String triangles, String backgroundLogo, - String title, String supportSiteURL, Map customStyles) { + String title, String supportSiteUrl, Map customStyles) { } diff --git a/backend/src/main/java/ch/puzzle/okr/multitenancy/customization/TenantClientCustomizationProvider.java b/backend/src/main/java/ch/puzzle/okr/multitenancy/customization/TenantClientCustomizationProvider.java index 4f2284ecbd..d73e636f0f 100644 --- a/backend/src/main/java/ch/puzzle/okr/multitenancy/customization/TenantClientCustomizationProvider.java +++ b/backend/src/main/java/ch/puzzle/okr/multitenancy/customization/TenantClientCustomizationProvider.java @@ -39,7 +39,7 @@ private TenantClientCustomization readClientCustomizationConfig(String tenantId) env.getProperty(MessageFormat.format("okr.tenants.{0}.clientcustomization.triangles", tenantId)), env.getProperty(MessageFormat.format("okr.tenants.{0}.clientcustomization.background-logo", tenantId)), env.getProperty(MessageFormat.format("okr.tenants.{0}.clientcustomization.title", tenantId)), - env.getProperty(MessageFormat.format("okr.tenants.{0}.clientcustomization.supportSiteURL", tenantId)), + env.getProperty(MessageFormat.format("okr.tenants.{0}.clientcustomization.supportSiteUrl", tenantId)), getCustomCssStyles(tenantId) // ); } diff --git a/backend/src/main/java/ch/puzzle/okr/service/clientconfig/ClientConfigService.java b/backend/src/main/java/ch/puzzle/okr/service/clientconfig/ClientConfigService.java index f010a7ca3e..ab5fd87847 100644 --- a/backend/src/main/java/ch/puzzle/okr/service/clientconfig/ClientConfigService.java +++ b/backend/src/main/java/ch/puzzle/okr/service/clientconfig/ClientConfigService.java @@ -57,7 +57,7 @@ public ClientConfigDto getConfigBasedOnActiveEnv(String hostName) { tenantClientCustomization.get().triangles(), // tenantClientCustomization.get().backgroundLogo(), // tenantClientCustomization.get().title(), // - tenantClientCustomization.get().supportSiteURL(), // + tenantClientCustomization.get().supportSiteUrl(), // tenantClientCustomization.get().customStyles()); // } diff --git a/backend/src/main/resources/application-dev.properties b/backend/src/main/resources/application-dev.properties index b995d8a397..85a92f418e 100644 --- a/backend/src/main/resources/application-dev.properties +++ b/backend/src/main/resources/application-dev.properties @@ -48,6 +48,7 @@ okr.tenants.pitc.clientcustomization.triangles=assets/images/triangles-okr-heade okr.tenants.pitc.clientcustomization.background-logo=assets/images/puzzle-p.svg okr.tenants.pitc.clientcustomization.favicon=assets/favicon.png okr.tenants.pitc.clientcustomization.title=Puzzle OKR +okr.tenants.pitc.clientcustomization.supportSiteUrl=https://wiki.puzzle.ch/Puzzle/OKRs okr.tenants.pitc.clientcustomization.customstyles.okr-topbar-background-color=#1e5a96 okr.tenants.pitc.clientcustomization.customstyles.okr-banner-background-color=#dcedf9 @@ -57,5 +58,6 @@ okr.tenants.acme.clientcustomization.triangles=assets/images/triangles-okr-acme- okr.tenants.acme.clientcustomization.background-logo=assets/images/acme.svg okr.tenants.acme.clientcustomization.favicon=assets/favicon-acme.png okr.tenants.acme.clientcustomization.title=ACME OKR +okr.tenants.acme.clientcustomization.supportSiteUrl=https://google.com okr.tenants.acme.clientcustomization.customstyles.okr-topbar-background-color=#738290 okr.tenants.acme.clientcustomization.customstyles.okr-banner-background-color=#F2F2F2 diff --git a/frontend/src/app/components/application-top-bar/application-top-bar.component.html b/frontend/src/app/components/application-top-bar/application-top-bar.component.html index 3b66f02ff5..2bf4a58e72 100644 --- a/frontend/src/app/components/application-top-bar/application-top-bar.component.html +++ b/frontend/src/app/components/application-top-bar/application-top-bar.component.html @@ -22,9 +22,11 @@