diff --git a/ui/src/pages/OrderList.vue b/ui/src/pages/OrderList.vue index 6bffc73..5a36524 100644 --- a/ui/src/pages/OrderList.vue +++ b/ui/src/pages/OrderList.vue @@ -233,7 +233,7 @@ import { useQuasar } from 'quasar' import { useOrderListStore } from 'src/stores/OrdernewListStore' import { useAuthStore } from 'src/stores/authStore' import { usePermission } from 'src/composables/usePermission' -import api from 'src/services/api' +import api, { extractApiErrorDetail } from 'src/services/api' const { canRead } = usePermission() const canReadOrder = canRead('order') @@ -392,8 +392,11 @@ async function printPDF (row) { }) window.open(URL.createObjectURL(res.data), '_blank') - } catch { - $q.notify({ type: 'negative', message: 'PDF yüklenemedi' }) + } catch (err) { + 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 () {