diff --git a/app/app.vue b/app/app.vue index 606f38a..43b9cac 100644 --- a/app/app.vue +++ b/app/app.vue @@ -83,6 +83,14 @@ const managerPageTabs = computed(() => { if (route.path.startsWith('/admin/settings')) { return [ + { + key: 'catalog', + label: 'Каталог', + active: route.path === '/admin/settings/catalog', + to: { + path: '/admin/settings/catalog', + }, + }, { key: 'messages', label: 'Сообщения', diff --git a/app/components/catalog/CatalogConfigurator.vue b/app/components/catalog/CatalogConfigurator.vue index c6a9d56..1309dff 100644 --- a/app/components/catalog/CatalogConfigurator.vue +++ b/app/components/catalog/CatalogConfigurator.vue @@ -1,9 +1,15 @@ + + diff --git a/graphql/operations/settings/catalog-product-type-settings.graphql b/graphql/operations/settings/catalog-product-type-settings.graphql new file mode 100644 index 0000000..01e8946 --- /dev/null +++ b/graphql/operations/settings/catalog-product-type-settings.graphql @@ -0,0 +1,12 @@ +query CatalogProductTypeSettings { + catalogProductTypeSettings { + productType + showQuantityPerBox + allowCustomLength + customLengthMinM + customLengthMaxM + customLengthStepM + allowCustomSleeveBrand + allowCustomLabel + } +} diff --git a/graphql/operations/settings/upsert-catalog-product-type-setting.graphql b/graphql/operations/settings/upsert-catalog-product-type-setting.graphql new file mode 100644 index 0000000..d976373 --- /dev/null +++ b/graphql/operations/settings/upsert-catalog-product-type-setting.graphql @@ -0,0 +1,12 @@ +mutation UpsertCatalogProductTypeSetting($input: UpsertCatalogProductTypeSettingInput!) { + upsertCatalogProductTypeSetting(input: $input) { + productType + showQuantityPerBox + allowCustomLength + customLengthMinM + customLengthMaxM + customLengthStepM + allowCustomSleeveBrand + allowCustomLabel + } +} diff --git a/graphql/schema.graphql b/graphql/schema.graphql index e1b6d96..38bb0bd 100644 --- a/graphql/schema.graphql +++ b/graphql/schema.graphql @@ -248,6 +248,17 @@ type Product { availableInWarehouses: [ProductWarehouseBalance!]! } +type CatalogProductTypeSetting { + productType: String! + showQuantityPerBox: Boolean! + allowCustomLength: Boolean! + customLengthMinM: Int + customLengthMaxM: Int + customLengthStepM: Int + allowCustomSleeveBrand: Boolean! + allowCustomLabel: Boolean! +} + type CartItem { id: ID! productId: ID! @@ -411,6 +422,7 @@ type Query { integrationSyncDashboard: IntegrationSyncDashboard! managerNotificationHistory(userId: ID!, channel: MessengerType!, limit: Int = 50): [NotificationHistoryItem!]! clientProducts: [Product!]! + catalogProductTypeSettings: [CatalogProductTypeSetting!]! order(id: ID!): Order myOrders: [Order!]! myCurrentOrders: [Order!]! @@ -491,6 +503,17 @@ input UpdateCartItemQuantityInput { quantity: Float! } +input UpsertCatalogProductTypeSettingInput { + productType: String! + showQuantityPerBox: Boolean! + allowCustomLength: Boolean! + customLengthMinM: Int + customLengthMaxM: Int + customLengthStepM: Int + allowCustomSleeveBrand: Boolean! + allowCustomLabel: Boolean! +} + input ReadyOrderItemInput { productId: ID! quantity: Float! @@ -554,6 +577,7 @@ type Mutation { connectMessenger(input: ConnectMessengerInput!): MessengerConnection! deleteMyMessengerConnection(connectionId: ID!): Boolean! upsertMyCounterpartyProfile(input: UpsertMyCounterpartyProfileInput!): CounterpartyProfile! + upsertCatalogProductTypeSetting(input: UpsertCatalogProductTypeSettingInput!): CatalogProductTypeSetting! addProductToCart(productId: ID!): Cart! updateCartItemQuantity(input: UpdateCartItemQuantityInput!): Cart! removeCartItem(productId: ID!): Cart!