diff --git a/ui/src/pages/ProductPricing.vue b/ui/src/pages/ProductPricing.vue
index 8850573..b725253 100644
--- a/ui/src/pages/ProductPricing.vue
+++ b/ui/src/pages/ProductPricing.vue
@@ -3,18 +3,20 @@
-
Urun Fiyatlandirma
@@ -871,7 +873,8 @@ const $q = useQuasar()
const store = useProductPricingStore()
const isReloading = ref(false)
-const pageBusy = computed(() => Boolean(isReloading.value || store.loading || saving.value || bulkCalcLoading.value || exportAllLoading.value))
+const reloadScheduled = ref(false)
+const pageBusy = computed(() => Boolean(reloadScheduled.value || isReloading.value || store.loading || saving.value || bulkCalcLoading.value || exportAllLoading.value))
const PAGE_LIMIT = 250
const currentPage = ref(1)
let reloadTimer = null
@@ -1660,6 +1663,13 @@ function toggleColumnFilterValue (field, value) {
}
return
}
+ if (field === 'productCode') {
+ columnFilters.value = {
+ ...columnFilters.value,
+ [field]: current.has(value) ? [value] : []
+ }
+ return
+ }
columnFilters.value = {
...columnFilters.value,
[field]: Array.from(current)
@@ -1675,6 +1685,13 @@ function selectAllColumnFilterOptions (field) {
}
return
}
+ if (field === 'productCode') {
+ columnFilters.value = {
+ ...columnFilters.value,
+ [field]: options.length > 0 ? [options[0].value] : []
+ }
+ return
+ }
columnFilters.value = {
...columnFilters.value,
[field]: options.map((option) => option.value)
@@ -2443,6 +2460,7 @@ function buildServerFilters () {
}
function scheduleReload () {
+ reloadScheduled.value = true
if (reloadTimer) clearTimeout(reloadTimer)
reloadTimer = setTimeout(() => {
reloadTimer = null
@@ -2493,9 +2511,13 @@ async function fetchChunk ({ page = 1, useCache = true } = {}) {
}
async function reloadData ({ page = 1, useCache = true } = {}) {
- if (isReloading.value) return
+ if (isReloading.value) {
+ reloadScheduled.value = false
+ return
+ }
const startedAt = Date.now()
isReloading.value = true
+ reloadScheduled.value = false
console.info('[product-pricing][ui] reload:start', {
at: new Date(startedAt).toISOString()
})
@@ -2521,6 +2543,7 @@ async function reloadData ({ page = 1, useCache = true } = {}) {
duration_ms: Date.now() - startedAt,
row_count: Array.isArray(store.rows) ? store.rows.length : 0
})
+ reloadScheduled.value = false
isReloading.value = false
}
}
@@ -2594,7 +2617,7 @@ onBeforeUnmount(() => {
.page-busy-overlay {
position: fixed;
inset: 0;
- z-index: 9000;
+ z-index: 30000;
display: flex;
flex-direction: column;
align-items: center;
diff --git a/ui/src/pages/WholesaleCampaigns.vue b/ui/src/pages/WholesaleCampaigns.vue
index 5a8685e..3537a30 100644
--- a/ui/src/pages/WholesaleCampaigns.vue
+++ b/ui/src/pages/WholesaleCampaigns.vue
@@ -3,18 +3,20 @@
-
+
+
+
Toptan Kampanya Yonetimi
@@ -875,9 +877,9 @@ const $q = useQuasar()
const store = useProductPricingStore()
const isReloading = ref(false)
-const pageBusy = computed(() => Boolean(isReloading.value || store.loading || variantLoading.value || saving.value || exportAllLoading.value))
-// Variant rows explode product rows; keep this smaller than ProductPricing for responsiveness.
-const PAGE_LIMIT = 50
+const reloadScheduled = ref(false)
+const pageBusy = computed(() => Boolean(reloadScheduled.value || isReloading.value || store.loading || variantLoading.value || saving.value || exportAllLoading.value))
+const PAGE_LIMIT = 250
const currentPage = ref(1)
let reloadTimer = null
const variantRows = ref([])
@@ -1734,6 +1736,13 @@ function toggleColumnFilterValue (field, value) {
}
return
}
+ if (field === 'productCode') {
+ columnFilters.value = {
+ ...columnFilters.value,
+ [field]: current.has(value) ? [value] : []
+ }
+ return
+ }
columnFilters.value = {
...columnFilters.value,
[field]: Array.from(current)
@@ -1749,6 +1758,13 @@ function selectAllColumnFilterOptions (field) {
}
return
}
+ if (field === 'productCode') {
+ columnFilters.value = {
+ ...columnFilters.value,
+ [field]: options.length > 0 ? [options[0].value] : []
+ }
+ return
+ }
columnFilters.value = {
...columnFilters.value,
[field]: options.map((option) => option.value)
@@ -2456,6 +2472,7 @@ function buildServerFilters () {
}
function scheduleReload () {
+ reloadScheduled.value = true
if (reloadTimer) clearTimeout(reloadTimer)
reloadTimer = setTimeout(() => {
reloadTimer = null
@@ -2700,9 +2717,13 @@ async function buildVariantRowsForProductPage (baseProductRows = []) {
}
async function reloadData ({ page = 1, useCache = true } = {}) {
- if (isReloading.value) return
+ if (isReloading.value) {
+ reloadScheduled.value = false
+ return
+ }
const startedAt = Date.now()
isReloading.value = true
+ reloadScheduled.value = false
console.info('[product-pricing][ui] reload:start', {
at: new Date(startedAt).toISOString()
})
@@ -2732,6 +2753,7 @@ async function reloadData ({ page = 1, useCache = true } = {}) {
row_count: Array.isArray(store.rows) ? store.rows.length : 0,
variant_row_count: Array.isArray(variantRows.value) ? variantRows.value.length : 0
})
+ reloadScheduled.value = false
isReloading.value = false
}
}
@@ -2808,7 +2830,7 @@ onBeforeUnmount(() => {
.page-busy-overlay {
position: fixed;
inset: 0;
- z-index: 9000;
+ z-index: 30000;
display: flex;
flex-direction: column;
align-items: center;
diff --git a/ui/src/stores/ProductPricingStore.js b/ui/src/stores/ProductPricingStore.js
index d964ca6..ba3684b 100644
--- a/ui/src/stores/ProductPricingStore.js
+++ b/ui/src/stores/ProductPricingStore.js
@@ -317,14 +317,6 @@ export const useProductPricingStore = defineStore('product-pricing-store', {
this.applyPageResult(payload, page)
}
- // Background prefetch for next page to reduce perceived wait on page change.
- if (this.page < this.totalPages) {
- void this.prefetchPage({
- limit,
- page: this.page + 1,
- filters
- })
- }
console.info('[product-pricing][frontend] request:success', {
trace_id: traceId,
duration_ms: Date.now() - startedAt,