Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
<!-- src/pages/StatementHeaderReport.vue -->
|
||||
<template>
|
||||
<q-page class="q-pa-md page-col">
|
||||
<q-page v-if="canReadFinance" class="q-pa-md page-col">
|
||||
<!-- Başlık ve PDF butonu -->
|
||||
<div class="row justify-between items-center q-mb-md">
|
||||
<div class="text-h6">📄 Cari Hesap Raporu</div>
|
||||
<q-btn
|
||||
v-if="canExportFinance"
|
||||
color="red"
|
||||
icon="picture_as_pdf"
|
||||
label="PDF Yazdır"
|
||||
@@ -44,6 +45,12 @@
|
||||
</div>
|
||||
</q-card>
|
||||
</q-page>
|
||||
|
||||
<q-page v-else class="q-pa-md flex flex-center">
|
||||
<div class="text-negative text-subtitle1">
|
||||
Bu module erisim yetkiniz yok.
|
||||
</div>
|
||||
</q-page>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
@@ -53,11 +60,9 @@ import { useDownloadstHeadStore } from 'src/stores/downloadstHeadStore'
|
||||
import dayjs from 'dayjs'
|
||||
import { usePermission } from 'src/composables/usePermission'
|
||||
|
||||
const { canRead, canWrite, canUpdate } = usePermission()
|
||||
|
||||
const canReadOrder = canRead('order')
|
||||
const canWriteOrder = canWrite('order')
|
||||
const canUpdateOrder = canUpdate('order')
|
||||
const { canRead, canExport } = usePermission()
|
||||
const canReadFinance = canRead('finance')
|
||||
const canExportFinance = canExport('finance')
|
||||
|
||||
const $q = useQuasar()
|
||||
const downloadstHeadStore = useDownloadstHeadStore()
|
||||
@@ -76,6 +81,15 @@ const selectedMonType = ref(monetaryTypeOptions[0].value)
|
||||
|
||||
// indirme butonu
|
||||
async function handlestHeadDownload() {
|
||||
if (!canExportFinance.value) {
|
||||
$q.notify({
|
||||
type: 'negative',
|
||||
message: 'PDF export yetkiniz yok',
|
||||
position: 'top-right'
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
console.log("▶️ [DEBUG] handlestHeadDownload:", accountCode.value, startDate.value, endDate.value, selectedMonType.value)
|
||||
|
||||
if (!accountCode.value || !startDate.value || !endDate.value) {
|
||||
|
||||
Reference in New Issue
Block a user