diff --git a/CHANGELOG.md b/CHANGELOG.md index 64b869c9..627c6031 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,9 +7,14 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] +### Added + +- Add TopBarSettings type in B2B settings and updated saveB2BSettings to use the new topBar field in UISettings + ## [0.61.1] - 2024-10-29 ### Fixed + - Avoid calls to checkUserPermissions when session data is not available ## [0.61.0] - 2024-10-16 @@ -21,6 +26,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [0.60.0] - 2024-10-09 ### Added + - Add new store user token validation directive to some APIs ## [0.59.0] - 2024-10-08 diff --git a/graphql/schema.graphql b/graphql/schema.graphql index a6a49414..1dd19884 100644 --- a/graphql/schema.graphql +++ b/graphql/schema.graphql @@ -521,9 +521,15 @@ type TransactionEmailSettings { organizationStatusChanged: Boolean } +type TopBarSettings { + name: String + hexColor: String +} + type UISettings { showModal: Boolean clearCart: Boolean + topBar: TopBarSettings fullImpersonation: Boolean } @@ -677,9 +683,15 @@ input TransactionEmailSettingsInput { organizationStatusChanged: Boolean } +input TopBarSettingsInput { + name: String + hexColor: String +} + input UISettingsInput { showModal: Boolean clearCart: Boolean + topBar: TopBarSettingsInput fullImpersonation: Boolean } diff --git a/node/resolvers/Mutations/Settings.ts b/node/resolvers/Mutations/Settings.ts index 764c9901..b8d1a98c 100644 --- a/node/resolvers/Mutations/Settings.ts +++ b/node/resolvers/Mutations/Settings.ts @@ -103,7 +103,11 @@ const Settings = { transactionEmailSettings: transactionEmailSettings ?? currentB2BSettings?.transactionEmailSettings, - uiSettings, + uiSettings: { + showModal: uiSettings.showModal, + clearCart: uiSettings.clearCart, + topBar: uiSettings.topBar ?? currentB2BSettings?.uiSettings?.topBar, + }, } await vbase.saveJSON(B2B_SETTINGS_DATA_ENTITY, 'settings', b2bSettings) diff --git a/node/typings.d.ts b/node/typings.d.ts index 29113e57..7531131e 100644 --- a/node/typings.d.ts +++ b/node/typings.d.ts @@ -231,9 +231,15 @@ interface Price { id: string } +interface TopBarSetting { + name: string + hexColor: string +} + interface UISettings { showModal: boolean clearCart: boolean + topBar?: TopBarSetting | null fullImpersonation: boolean }