From 7a7008cc1bfb7b34f96793e79fcf19f3f12bd5d9 Mon Sep 17 00:00:00 2001 From: M_Kececi Date: Tue, 14 Jul 2026 00:17:47 +0300 Subject: [PATCH] Fix product performance grouped JSON build --- svc/queries/product_performance.go | 4 ++-- .../pages/ProductPerformanceProfitability.vue | 17 ++++++----------- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/svc/queries/product_performance.go b/svc/queries/product_performance.go index d6cbd7c..cf896c4 100644 --- a/svc/queries/product_performance.go +++ b/svc/queries/product_performance.go @@ -1157,7 +1157,7 @@ func productPerformanceGroupedSnapshotDefinitions(ctx context.Context, pg *sql.D {Mode: "products", Levels: []string{"urun_ilk_grubu", "askili_yan", "kategori", "urun_ana_grubu", "urun_alt_grubu", "product_code", "color_yaka", "market_key"}}, {Mode: "products", Levels: []string{"urun_ana_grubu"}}, {Mode: "idle", Levels: []string{"urun_ilk_grubu", "askili_yan", "kategori", "urun_ana_grubu", "urun_alt_grubu", "product_code", "color_yaka"}}, - {Mode: "sales_color_yaka_market_customer", Levels: []string{"color_yaka", "urun_ilk_grubu", "askili_yan", "kategori", "urun_ana_grubu", "urun_alt_grubu", "product_code", "country", "market_key", "customer_segment", "customer_code", "customer_name"}}, + {Mode: "sales_color_yaka_market_customer", Levels: []string{"urun_ana_grubu", "color_yaka", "market_key", "customer_code", "customer_name", "urun_alt_grubu", "product_code"}}, {Mode: "sales_product_country_segment_market_customer", Levels: []string{"urun_ilk_grubu", "askili_yan", "kategori", "urun_ana_grubu", "urun_alt_grubu", "product_code", "color_yaka", "country", "customer_segment", "market_key", "customer_code", "customer_name"}}, {Mode: "sales_country_segment_market_customer_product", Levels: []string{"country", "customer_segment", "market_key", "customer_code", "customer_name", "urun_ilk_grubu", "askili_yan", "kategori", "urun_ana_grubu", "urun_alt_grubu", "product_code", "color_yaka"}}, {Mode: "order_product_customers", Levels: []string{"urun_ilk_grubu", "askili_yan", "kategori", "urun_ana_grubu", "urun_alt_grubu", "product_code", "color_yaka", "market_key", "customer_code", "customer_name"}}, @@ -6746,7 +6746,7 @@ func sanitizeProductPerformanceGroupLevels(levels []string) []string { func defaultProductPerformanceGroupLevels(mode string) []string { switch mode { case "sales_color_yaka_market_customer": - return []string{"color_yaka", "urun_ilk_grubu", "askili_yan", "kategori", "urun_ana_grubu", "urun_alt_grubu", "product_code", "country", "market_key", "customer_segment", "customer_code", "customer_name"} + return []string{"urun_ana_grubu", "color_yaka", "market_key", "customer_code", "customer_name", "urun_alt_grubu", "product_code"} case "product_detail": return []string{"urun_alt_grubu", "product_code", "color_yaka", "market_key"} case "idle": diff --git a/ui/src/pages/ProductPerformanceProfitability.vue b/ui/src/pages/ProductPerformanceProfitability.vue index b39d8b7..c29f0a6 100644 --- a/ui/src/pages/ProductPerformanceProfitability.vue +++ b/ui/src/pages/ProductPerformanceProfitability.vue @@ -1621,7 +1621,7 @@ const lastManualExpandedGroupKey = ref('') const selectedExpandLevelKeysByTab = reactive({ products: ['urun_ilk_grubu', 'askili_yan', 'kategori'], product_detail: ['urun_alt_grubu'], - sales_color_yaka_market_customer: ['color_yaka'], + sales_color_yaka_market_customer: ['urun_ana_grubu', 'color_yaka'], idle: ['urun_ilk_grubu', 'askili_yan', 'kategori'], sales_product_country_segment_market_customer: ['urun_ilk_grubu', 'askili_yan', 'kategori'], sales_market_customer_product: ['market_key', 'customer_code', 'customer_name', 'urun_ilk_grubu', 'askili_yan'], @@ -1677,7 +1677,7 @@ const productPerformanceExcelExportFilterFields = new Set([ ]) const performanceTabs = [ { name: 'products', icon: 'dashboard', label: 'Genel Özet KPI' }, - { name: 'sales_color_yaka_market_customer', icon: 'palette', label: 'Renk/Yaka > Piyasa > Müşteri' }, + { name: 'sales_color_yaka_market_customer', icon: 'palette', label: 'Ürün Ana Grubu > Renk/Yaka > Piyasa > Müşteri' }, { name: 'idle', icon: 'warning', label: 'Atıl Stok / Maliyet' }, { name: 'sales_product_country_segment_market_customer', icon: 'account_tree', label: 'Ürün > Ülke > Segment > Piyasa > Müşteri' }, { name: 'sales_country_segment_market_customer_product', icon: 'public', label: 'Ülke > Segment > Piyasa > Müşteri > Ürün Satış KPI' }, @@ -2727,18 +2727,13 @@ const tabGroupLevels = { { key: 'market_key', label: 'Piyasa' } ], sales_color_yaka_market_customer: [ - { key: 'color_yaka', label: 'Renk/Yaka' }, - { key: 'urun_ilk_grubu', label: 'Ürün İlk Grubu' }, - { key: 'askili_yan', label: 'Askılı/Yan' }, - { key: 'kategori', label: 'Kategori' }, { key: 'urun_ana_grubu', label: 'Ürün Ana Grubu' }, - { key: 'urun_alt_grubu', label: 'Ürün Alt Grubu' }, - { key: 'product_code', label: 'Ürün' }, - { key: 'country', label: 'Ülke' }, + { key: 'color_yaka', label: 'Renk/Yaka' }, { key: 'market_key', label: 'Piyasa' }, - { key: 'customer_segment', label: 'Segment' }, { key: 'customer_code', label: 'Müşteri Kodu' }, - { key: 'customer_name', label: 'Müşteri' } + { key: 'customer_name', label: 'Müşteri' }, + { key: 'urun_alt_grubu', label: 'Ürün Alt Grubu' }, + { key: 'product_code', label: 'Ürün' } ], idle: [ { key: 'urun_ilk_grubu', label: 'Ürün İlk Grubu' },