diff --git a/CHANGELOG.md b/CHANGELOG.md index adf19d9e..ab4ebfd8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Added +- Add TopBarSettings type in B2B settings and updated saveB2BSettings to use the new topBar field in UISettings ## [0.62.0] - 2024-12-03 ### Added diff --git a/graphql/schema.graphql b/graphql/schema.graphql index f9c43640..ff0277ee 100644 --- a/graphql/schema.graphql +++ b/graphql/schema.graphql @@ -525,10 +525,19 @@ type TransactionEmailSettings { organizationStatusChanged: Boolean } +type TopBarSettings { + name: String + hexColor: String +} + type UISettings { showModal: Boolean clearCart: Boolean +<<<<<<< HEAD fullImpersonation: Boolean +======= + topBar: TopBarSettings +>>>>>>> 723475d (feat: add topBar settings type) } scalar Data @@ -681,10 +690,19 @@ input TransactionEmailSettingsInput { organizationStatusChanged: Boolean } +input TopBarSettingsInput { + name: String + hexColor: String +} + input UISettingsInput { showModal: Boolean clearCart: Boolean +<<<<<<< HEAD fullImpersonation: Boolean +======= + topBar: TopBarSettingsInput +>>>>>>> 723475d (feat: add topBar settings type) } input B2BSettingsInput { 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 a2fce388..5b1e0807 100644 --- a/node/typings.d.ts +++ b/node/typings.d.ts @@ -239,10 +239,19 @@ interface Price { id: string } +interface TopBarSetting { + name: string + hexColor: string +} + interface UISettings { showModal: boolean clearCart: boolean +<<<<<<< HEAD fullImpersonation: boolean +======= + topBar?: TopBarSetting | null +>>>>>>> 723475d (feat: add topBar settings type) } interface CustomField {