Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -3,18 +3,20 @@
|
||||
<q-inner-loading :showing="pageBusy">
|
||||
<q-spinner-gears size="52px" color="primary" />
|
||||
</q-inner-loading>
|
||||
<div
|
||||
v-if="pageBusy"
|
||||
class="page-busy-overlay"
|
||||
@click.stop
|
||||
@mousedown.stop
|
||||
@mouseup.stop
|
||||
@touchstart.stop
|
||||
@wheel.stop
|
||||
>
|
||||
<q-spinner-gears size="56px" color="primary" />
|
||||
<div class="page-busy-label">Yukleniyor...</div>
|
||||
</div>
|
||||
<teleport to="body">
|
||||
<div
|
||||
v-if="pageBusy"
|
||||
class="page-busy-overlay"
|
||||
@click.stop
|
||||
@mousedown.stop
|
||||
@mouseup.stop
|
||||
@touchstart.stop
|
||||
@wheel.stop
|
||||
>
|
||||
<q-spinner-gears size="56px" color="primary" />
|
||||
<div class="page-busy-label">Yukleniyor...</div>
|
||||
</div>
|
||||
</teleport>
|
||||
|
||||
<div class="top-bar row items-center justify-between q-mb-xs">
|
||||
<div class="text-subtitle1 text-weight-bold">Urun Fiyatlandirma</div>
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user