File tree Expand file tree Collapse file tree 5 files changed +30
-4
lines changed
shared-common/src/Shared/DocumentTemplate/Constant
Database/Migration/Development/Document/Data Expand file tree Collapse file tree 5 files changed +30
-4
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ module Shared.DocumentTemplate.Constant.DocumentTemplate where
33import Shared.Common.Model.Common.SemVer2Tuple
44
55documentTemplateMetamodelVersion :: SemVer2Tuple
6- documentTemplateMetamodelVersion = SemVer2Tuple 17 0
6+ documentTemplateMetamodelVersion = SemVer2Tuple 17 1
77
88isDocumentTemplateSupported :: SemVer2Tuple -> Bool
99isDocumentTemplateSupported metamodelVersion
Original file line number Diff line number Diff line change @@ -68,7 +68,15 @@ doc1Content =
6868dmp1 :: DocumentContext
6969dmp1 =
7070 DocumentContext
71- { config = DocumentContextConfig {clientUrl = " https://example.com/wizard" }
71+ { config =
72+ DocumentContextConfig
73+ { clientUrl = " https://example.com/wizard"
74+ , appTitle = Nothing
75+ , appTitleShort = Nothing
76+ , illustrationsColor = Nothing
77+ , primaryColor = Nothing
78+ , logoUrl = Nothing
79+ }
7280 , document =
7381 DocumentContextDocument
7482 { uuid = doc1. uuid
Original file line number Diff line number Diff line change @@ -32,6 +32,11 @@ data DocumentContext = DocumentContext
3232
3333data DocumentContextConfig = DocumentContextConfig
3434 { clientUrl :: String
35+ , appTitle :: Maybe String
36+ , appTitleShort :: Maybe String
37+ , illustrationsColor :: Maybe String
38+ , primaryColor :: Maybe String
39+ , logoUrl :: Maybe String
3540 }
3641 deriving (Show , Eq , Generic )
3742
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ import Wizard.Model.Tenant.Config.TenantConfig
1919import Wizard.Model.User.User
2020import Wizard.Service.KnowledgeModel.Package.KnowledgeModelPackageMapper
2121import qualified Wizard.Service.User.UserMapper as USR_Mapper
22+ import WizardLib.Public.Model.Tenant.Config.TenantConfig
2223
2324toDocumentContext
2425 :: Document
@@ -34,14 +35,23 @@ toDocumentContext
3435 -> Report
3536 -> KnowledgeModelPackage
3637 -> TenantConfigOrganization
38+ -> TenantConfigLookAndFeel
3739 -> Maybe User
3840 -> Maybe User
3941 -> [DocumentContextUserPerm ]
4042 -> [DocumentContextUserGroupPerm ]
4143 -> DocumentContext
42- toDocumentContext doc appClientUrl project phaseUuid replies labels mProjectVersion projectVersionDtos projectFiles km report pkg org mProjectCreatedBy mDocCreatedBy users groups =
44+ toDocumentContext doc appClientUrl project phaseUuid replies labels mProjectVersion projectVersionDtos projectFiles km report pkg org lookAndFeel mProjectCreatedBy mDocCreatedBy users groups =
4345 DocumentContext
44- { config = DocumentContextConfig {clientUrl = appClientUrl}
46+ { config =
47+ DocumentContextConfig
48+ { clientUrl = appClientUrl
49+ , appTitle = lookAndFeel. appTitle
50+ , appTitleShort = lookAndFeel. appTitleShort
51+ , illustrationsColor = lookAndFeel. illustrationsColor
52+ , primaryColor = lookAndFeel. primaryColor
53+ , logoUrl = lookAndFeel. logoUrl
54+ }
4555 , document =
4656 DocumentContextDocument
4757 { uuid = doc. uuid
Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ import Wizard.Service.Project.Compiler.ProjectCompilerService
3434import Wizard.Service.Report.ReportGenerator
3535import Wizard.Service.Tenant.TenantHelper
3636import qualified Wizard.Service.User.UserMapper as USR_Mapper
37+ import WizardLib.Public.Database.DAO.Tenant.Config.TenantConfigLookAndFeelDAO
3738import WizardLib.Public.Database.DAO.User.UserGroupDAO
3839import WizardLib.Public.Model.User.UserGroup
3940import qualified WizardLib.Public.Service.User.Group.UserGroupMapper as UGR_Mapper
@@ -44,6 +45,7 @@ createDocumentContext doc pkg kmEditorEvents project mReplies = do
4445 mProjectCreatedBy <- forM project. creatorUuid findUserByUuid
4546 mDocCreatedBy <- forM doc. createdBy findUserByUuid
4647 tcOrganization <- findTenantConfigOrganization
48+ tcLookAndFeel <- findTenantConfigLookAndFeel
4749 clientUrl <- getClientUrl
4850 now <- liftIO getCurrentTime
4951 (phaseUuid, replies, labels) <-
@@ -83,6 +85,7 @@ createDocumentContext doc pkg kmEditorEvents project mReplies = do
8385 report
8486 pkg
8587 tcOrganization
88+ tcLookAndFeel
8689 mProjectCreatedBy
8790 mDocCreatedBy
8891 users
You can’t perform that action at this time.
0 commit comments