Merge remote-tracking branch 'origin/master'

This commit is contained in:
2026-02-13 07:27:57 +03:00
parent d571fe2fd5
commit 7f56bb40c5
38 changed files with 1709 additions and 457 deletions

View File

@@ -1,6 +1,8 @@
<template>
<q-page class="q-pa-md">
<q-page
v-if="canSendTestMail"
class="q-pa-md"
>
<q-card flat bordered class="q-pa-md" style="max-width: 500px">
<q-card-section>
<div class="text-h6">SMTP Test Mail</div>
@@ -9,7 +11,7 @@
<q-card-section>
<q-input
v-model="to"
label="Gönderilecek mail"
label="Gonderilecek mail"
filled
dense
/>
@@ -17,28 +19,36 @@
<q-card-actions align="right">
<q-btn
v-if="canSendTestMail"
color="primary"
label="Test Mail Gönder"
label="Test Mail Gonder"
:loading="store.loading"
:disable="!canSendTestMail"
@click="send"
/>
</q-card-actions>
</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>
import { ref } from 'vue'
import { computed, ref } from 'vue'
import { useQuasar } from 'quasar'
import { useMailTestStore } from 'src/stores/mailTestStore'
import { usePermission } from 'src/composables/usePermission'
const { canRead, canWrite, canUpdate } = usePermission()
const canReadOrder = canRead('order')
const canWriteOrder = canWrite('order')
const canUpdateOrder = canUpdate('order')
const { canWrite } = usePermission()
const canWriteUser = canWrite('user')
const canSendTestMail = computed(() => canWriteUser.value)
const $q = useQuasar()
const store = useMailTestStore()
@@ -46,17 +56,25 @@ const store = useMailTestStore()
const to = ref('mehmet.kececi@baggi.com.tr')
async function send () {
if (!canSendTestMail.value) {
$q.notify({
type: 'negative',
message: 'Test mail gonderme yetkiniz yok'
})
return
}
try {
await store.sendTestMail(to.value)
$q.notify({
type: 'positive',
message: 'Test mail gönderildi'
message: 'Test mail gonderildi'
})
} catch (err) {
$q.notify({
type: 'negative',
message: err?.message || 'Mail gönderilemedi'
message: err?.message || 'Mail gonderilemedi'
})
}
}