izin bedel hatalar düzeltildi ve onay durum logları eklendi

This commit is contained in:
burakovec
2025-08-15 19:02:15 +03:00
parent 343e93c168
commit 9e6c1f3840
6 changed files with 111 additions and 66 deletions

View File

@ -8,6 +8,11 @@
<form-piyango-onay-kisiler />
</div>
</!--div-->
<div class="form-inner-content">
<div class="form-part">
<form-piyango-onay-durum />
</div>
</div>
<div class="form-inner-content">
<div class="form-part">
<form-piyango-onay-log />
@ -16,6 +21,7 @@
</div>
</template>
<script setup lang="ts">
import FormPiyangoOnayDurum from './form/FormPiyangoOnayDurum.vue'
import FormPiyangoOnayLog from './form/FormPiyangoOnayLog.vue'
import FormPiyangoOnay from './form/FormPiyangoOnay.vue'
import FormPiyangoOnayKisiler from './form/FormPiyangoOnayKisiler.vue'

View File

@ -10,7 +10,7 @@
</div>
<div class="form-inner-content">
<div class="form-part">
<form-piyango-onay-log />
<form-piyango-onay-durum />
</div>
</div>
</div>
@ -19,6 +19,6 @@
import { usePiyangoStore } from '../stores/piyangoStore'
const piyangoStore = usePiyangoStore()
import FormPiyangoOnayLog from './form/FormPiyangoOnayLog.vue'
import FormPiyangoOnayDurum from './form/FormPiyangoOnayDurum.vue'
import FormPiyangoUserOnayaGonder from './form/FormPiyangoUserOnayaGonder.vue'
</script>

View File

@ -0,0 +1,88 @@
<template>
<list-table-content
v-if="loaded"
:tableHeader="tableHeader"
formTitle="Piyango Onay Durumları"
listText="Kayıt"
:apiList="'OnayDurumu/GetSonOnayDurumlariList/' + piyangoStore.selectedLottery"
apiText="Piyango Onay Log Listesi"
page="form"
:refresh="piyangoOnayStore.refreshList" />
</template>
<script setup lang="ts">
import { ref,onBeforeMount,computed } from 'vue'
import axios from 'axios'
import { useDateStore } from '@/stores/dateStore'
const dateStore = useDateStore()
import { useGlobalStore } from '@/stores/globalStore'
const globalStore = useGlobalStore()
import { usePiyangoOnayStore } from '../../stores/piyangoOnayStore'
const piyangoOnayStore = usePiyangoOnayStore()
import { usePiyangoStore } from '../../stores/piyangoStore'
const piyangoStore = usePiyangoStore()
import { usePiyangoDataStore } from '../../stores/piyangoDataStore'
const piyangoDataStore = usePiyangoDataStore()
import { usePiyangoServices } from '../../service/piyangoServices'
const piyangoServices = usePiyangoServices()
const loaded = ref<boolean>(false)
const piyangoOnayDurumlari = computed<Record<string, any>[]>(() => {
return piyangoDataStore.piyangoOnayDurumlari
})
const tableHeader = ref<Record<string, any>[]>([
{
name: 'tarih',
title: 'Tarih',
compute: (v: Record<string, any>): string => {
return v.tarih === null
? ''
: dateStore.dateFormat({ pattern: 'dd-mm-yy', date: v.tarih })
},
sort: true,
filter: {
type: 'date',
range: true
}
},
{
name: 'kisiAdi',
title: 'Kişi',
sort: true,
style: { width: '20%' }
},
{
name: 'onayDurumuIslemTipiAdi',
title: 'İşlem',
sort: true,
filter: {
type: 'select',
data: piyangoOnayDurumlari,
listVal: 'id',
listText: 'tipAdi',
filterId: 'onayDurumuIslemTipiId'
}
},
{
name: 'aciklama',
title: 'Açıklama',
sort: true,
style: { width: '30%' }
},
{
dosyaUrl: 'aciklama',
title: 'Dosya',
computeHtml: (v: Record<string, any>) => {
if (v.dosyaUrl !== null && v.dosyaUrl !== undefined) {
return globalStore.TableCellDocument(v.dosyaUrl)
}
},
style: { width: '20%' }
}
])
onBeforeMount(async () => {
loaded.value = true
})
</script>

View File

@ -4,7 +4,7 @@
:tableHeader="tableHeader"
formTitle="Piyango Onay Logları"
listText="Kayıt"
:apiList="'OnayDurumu/GetSonOnayDurumlariList/' + piyangoStore.selectedLottery"
:apiList="'OnayDurumLog/Cekilis/' + piyangoStore.selectedLottery"
apiText="Piyango Onay Log Listesi"
page="form"
:refresh="piyangoOnayStore.refreshList" />
@ -47,38 +47,24 @@
}
},
{
name: 'kisiAdi',
name: 'islemYapanKullanici.email',
title: 'Kişi',
sort: true,
style: { width: '20%' }
},
{
name: 'onayDurumuIslemTipiAdi',
title: 'İşlem',
sort: true,
filter: {
type: 'select',
data: piyangoOnayDurumlari,
listVal: 'id',
listText: 'tipAdi',
filterId: 'onayDurumuIslemTipiId'
}
name: 'eskiDurum',
title: 'Eski Durum',
},
{
name: 'yeniDurum',
title: 'Yeni Durum',
},
{
name: 'aciklama',
title: 'Açıklama',
sort: true,
style: { width: '30%' }
},
{
dosyaUrl: 'aciklama',
title: 'Dosya',
computeHtml: (v: Record<string, any>) => {
if (v.dosyaUrl !== null && v.dosyaUrl !== undefined) {
return globalStore.TableCellDocument(v.dosyaUrl)
}
},
style: { width: '20%' }
}
])

View File

@ -34,8 +34,8 @@
const izinBedelOraniStore = useIzinBedelOraniStore()
const izinBedelOraniService = useIzinBedelOraniService()
const tableHeader = computed<Record<string, any>[]>(() => {
return [
const tableHeader = ref<Record<string, any>[]>(
[
{
name: 'id',
title: 'ID',
@ -81,8 +81,7 @@
title: 'İşlemler',
style: { width: '15%' },
computeHtml: (v: Record<string, any>): string => {
let actions = ''
actions += `<button class="button-c button-edit" onclick="window.editIzinBedelOrani(${v.id})">
let actions = `<button class="button-c button-edit" onclick="window.editIzinBedelOrani(${v.id})">
<i class="ico-c">
<svg width="14" height="14">
<use href="@/assets/images/icons.svg#edit"></use>
@ -90,52 +89,18 @@
</i>
Düzenle
</button> `
if (v.aktif) {
actions += `<button class="button-c button-delete" onclick="window.updateDurum(${v.id})">
<i class="ico-c">
<svg width="14" height="14">
<use href="@/assets/images/icons.svg#delete"></use>
</svg>
</i>
Pasif Yap
</button>`
} else {
actions += `<button class="button-c button-save" onclick="window.updateDurum(${v.id})">
<i class="ico-c">
<svg width="14" height="14">
<use href="@/assets/images/icons.svg#check"></use>
</svg>
</i>
Aktif Yap
</button>`
}
return actions
}
}
]
})
)
const EditIzinBedelOrani = (row: any) => {
izinBedelOraniStore.EditForm(row)
}
// Global functions for HTML buttons
const setupGlobalFunctions = () => {
;(window as any).editIzinBedelOrani = (id: number) => {
const item = izinBedelOraniStore.izinBedelOraniList.find(x => x.id === id)
if (item) {
EditIzinBedelOrani(item)
}
}
;(window as any).updateDurum = async (id: number) => {
await izinBedelOraniService.UpdateDurum(id)
}
}
onBeforeMount(async () => {
await izinBedelOraniService.GetIzinBedelOraniList()
setupGlobalFunctions()
izinBedelOraniService.loaded = true
})
</script>

View File

@ -75,8 +75,8 @@
const panelIzinBedelOrani = ref<Record<string, any>>({})
const izinBedelOraniList = ref<Record<string, any>[]>([])
const tableHeader = computed<Record<string, any>[]>(() => {
return [
const tableHeader = ref<Record<string, any>[]>(
[
{
name: 'id',
title: 'ID',
@ -118,7 +118,7 @@
}
}
]
})
)
const DeleteRowPop = (data: Record<string, any>, i: number) => {
dialogStore.CreateDialog({