Merge remote-tracking branch 'origin/master'

This commit is contained in:
M_Kececi
2026-04-16 15:18:44 +03:00
parent 1831c45a0c
commit 2d369e7d7d
40 changed files with 3477 additions and 97 deletions

View File

@@ -62,14 +62,36 @@ export const useProductPricingStore = defineStore('product-pricing-store', {
async fetchRows () {
this.loading = true
this.error = ''
const startedAt = Date.now()
console.info('[product-pricing][frontend] request:start', {
at: new Date(startedAt).toISOString(),
timeout_ms: 600000
})
try {
const res = await api.get('/pricing/products')
const res = await api.request({
method: 'GET',
url: '/pricing/products',
timeout: 600000
})
const traceId = res?.headers?.['x-trace-id'] || null
const data = Array.isArray(res?.data) ? res.data : []
this.rows = data.map((x, i) => mapRow(x, i))
console.info('[product-pricing][frontend] request:success', {
trace_id: traceId,
duration_ms: Date.now() - startedAt,
row_count: this.rows.length
})
} catch (err) {
this.rows = []
const msg = err?.response?.data || err?.message || 'Urun fiyatlandirma listesi alinamadi'
this.error = toText(msg)
console.error('[product-pricing][frontend] request:error', {
trace_id: err?.response?.headers?.['x-trace-id'] || null,
duration_ms: Date.now() - startedAt,
timeout_ms: err?.config?.timeout ?? null,
status: err?.response?.status || null,
message: this.error
})
} finally {
this.loading = false
}