Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -233,7 +233,7 @@ import { useQuasar } from 'quasar'
|
|||||||
import { useOrderListStore } from 'src/stores/OrdernewListStore'
|
import { useOrderListStore } from 'src/stores/OrdernewListStore'
|
||||||
import { useAuthStore } from 'src/stores/authStore'
|
import { useAuthStore } from 'src/stores/authStore'
|
||||||
import { usePermission } from 'src/composables/usePermission'
|
import { usePermission } from 'src/composables/usePermission'
|
||||||
import api from 'src/services/api'
|
import api, { extractApiErrorDetail } from 'src/services/api'
|
||||||
|
|
||||||
const { canRead } = usePermission()
|
const { canRead } = usePermission()
|
||||||
const canReadOrder = canRead('order')
|
const canReadOrder = canRead('order')
|
||||||
@@ -392,8 +392,11 @@ async function printPDF (row) {
|
|||||||
})
|
})
|
||||||
|
|
||||||
window.open(URL.createObjectURL(res.data), '_blank')
|
window.open(URL.createObjectURL(res.data), '_blank')
|
||||||
} catch {
|
} catch (err) {
|
||||||
$q.notify({ type: 'negative', message: 'PDF yüklenemedi' })
|
const detail = await extractApiErrorDetail(err)
|
||||||
|
const status = err?.status || err?.response?.status || '-'
|
||||||
|
console.error(`PDF load error [${status}] /order/pdf/${row.OrderHeaderID}: ${detail}`)
|
||||||
|
$q.notify({ type: 'negative', message: `PDF yuklenemedi (${status}): ${detail}` })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function clearFilters () {
|
function clearFilters () {
|
||||||
|
|||||||
Reference in New Issue
Block a user