diff --git a/src/module/cekilisler/components/form/FormPiyangoOnayDurum.vue b/src/module/cekilisler/components/form/FormPiyangoOnayDurum.vue index 00eb060..0eeaab4 100644 --- a/src/module/cekilisler/components/form/FormPiyangoOnayDurum.vue +++ b/src/module/cekilisler/components/form/FormPiyangoOnayDurum.vue @@ -8,7 +8,8 @@ :apiList="'OnayDurumu/GetSonOnayDurumlariList/' + piyangoStore.selectedLottery" apiText="Piyango Onay Log Listesi" page="form" - :refresh="piyangoOnayStore.refreshList" /> + :refresh="piyangoOnayStore.refreshList" + :rowActions="rowActions" /> (false) @@ -132,6 +137,41 @@ piyangoOnayStore.onayFormPanel = true } + const DeleteRowPop = (data: Record, i: number) => { + dialogStore.CreateDialog({ + title: 'Onay Durumu Sil', + id: 'deleteonaydurumu', + content: 'Onay durumunu silmek istediğinize emin misiniz?', + closeText: 'Vazgeç', + buttons: [ + { + label: 'Sil', + type: 'alert', + function: () => DeleteRow(data.id) + } + ] + }) + } + + const DeleteRow = async (id: number | string) => { + var dt = await dataStore.dataDelete('OnayDurumu/' + id, { + toast: { toast: 'Onay durumu başarıyla silindi', type: 'success' } + }) + + if (dt !== 'errorfalse') { + dialogStore.CloseDialog('deleteonaydurumu') + piyangoOnayStore.refreshList = true + } + } + + const rowActions = ref[]>([ + { + text: 'Sil', + class: 'alert', + action: DeleteRowPop + } + ]) + onBeforeMount(async () => { loaded.value = true }) diff --git a/src/module/cekilisler/views/PiyangoListe.vue b/src/module/cekilisler/views/PiyangoListe.vue index 7b8c512..61e2465 100644 --- a/src/module/cekilisler/views/PiyangoListe.vue +++ b/src/module/cekilisler/views/PiyangoListe.vue @@ -84,6 +84,9 @@ title: 'Müdürlük', compute: (v: Record): string => { return v.mudurluk || '' + }, + filter: { + type: 'text' } }) @@ -103,7 +106,13 @@ // 4. DÜZENLEYEN (koşullu) if (usersStore.isAraciFirma || usersStore.isPanelUser) { - header.push({ name: 'duzenleyen', title: 'Düzenleyen' }) + header.push({ + name: 'duzenleyen', + title: 'Düzenleyen', + filter: { + type: 'text' + } + }) } // 5. ARACI FİRMA @@ -112,6 +121,9 @@ title: 'Araci Firma', compute: (v: Record): string => { return v.araciFirma || '' + }, + filter: { + type: 'text' } }) @@ -156,7 +168,11 @@ compute: (v: Record): string => { return v.izinSayisi || '' }, - sort: true + sort: true, + filter: { + type: 'text', + range: true + } }) // 9. BAŞLANGIÇ TARİHİ @@ -211,6 +227,9 @@ title: 'Çekiliş Görevlisi', compute: (v: Record): string => { return v.cekilisGorevlisi || '' + }, + filter: { + type: 'text' } })