- Katılımcı listesi tümünü sil dialog fonksiyon düzenlemesi

This commit is contained in:
Kevser
2025-07-23 10:41:09 +03:00
parent 40eb05d618
commit 942df94b65

View File

@ -1,34 +1,34 @@
<template> <template>
<section class='section-list'> <section class="section-list">
<list-table-content <list-table-content
:tableHeader='tableHeader' :tableHeader="tableHeader"
icon='draws' icon="draws"
title='Katılım Listesi' title="Katılım Listesi"
listText='Katılımcı' listText="Katılımcı"
:rowAction='OpenUser' :rowAction="OpenUser"
:apiList="'Katilimci/ByCekilisId/' + piyangoStore.selectedLottery" :apiList="'Katilimci/ByCekilisId/' + piyangoStore.selectedLottery"
v-model:pagination='paginationData' v-model:pagination="paginationData"
v-model:refresh='piyangoKatilimciStore.refreshPiyangoKatilimciList'> v-model:refresh="piyangoKatilimciStore.refreshPiyangoKatilimciList">
<template #extraButtons> <template #extraButtons>
<button <button
class='button-c' class="button-c"
@click='piyangoKatilimciService.CreateOnlineDraw' @click="piyangoKatilimciService.CreateOnlineDraw"
v-if=' v-if="
paginationData.totalRecords > 0 && paginationData.totalRecords > 0 &&
usersStore.isPanelUser && usersStore.isPanelUser &&
!piyangoStore.lotteryDrawState && !piyangoStore.lotteryDrawState &&
piyangoStore.lotteryApprove === 4 && piyangoStore.lotteryApprove === 4 &&
piyangoStore.lotteryData.cekilisYontemiId === 2 piyangoStore.lotteryData.cekilisYontemiId === 2
'> ">
Online Çekiliş Düzenle Online Çekiliş Düzenle
</button> </button>
<a href='/data/ornek-katilimci-listesi.xlsx' target='_blank' class='button-c'> <a href="/data/ornek-katilimci-listesi.xlsx" target="_blank" class="button-c">
Örnek Katılımcı Dosyası İndir Örnek Katılımcı Dosyası İndir
</a> </a>
<button <button
class='button-c' class="button-c"
@click='AddNewDocument' @click="AddNewDocument"
v-if='!usersStore.isPanelUser && !piyangoStore.lotteryDrawState'> v-if="!usersStore.isPanelUser && !piyangoStore.lotteryDrawState">
Katılımcı Dosyası Yükle Katılımcı Dosyası Yükle
</button> </button>
<button <button
@ -38,9 +38,8 @@
paginationData.totalRecords > 0 && paginationData.totalRecords > 0 &&
usersStore.isPanelUser && usersStore.isPanelUser &&
!piyangoStore.lotteryDrawState && !piyangoStore.lotteryDrawState &&
(piyangoStore.lotteryApprove === 7 || piyangoStore.lotteryApprove === 14) (piyangoStore.lotteryApprove === 7 || piyangoStore.lotteryApprove === 14)
"> ">
Tüm katılımcıları Sil Tüm katılımcıları Sil
</button> </button>
<button <button
@ -51,20 +50,20 @@
</template> </template>
</list-table-content> </list-table-content>
<panel-wrapper <panel-wrapper
v-if='piyangoKatilimciStore.katilimciFilePanel' v-if="piyangoKatilimciStore.katilimciFilePanel"
v-model='piyangoKatilimciStore.katilimciFilePanel' v-model="piyangoKatilimciStore.katilimciFilePanel"
panel-title='Katılımcı Dosyası Yükle'> panel-title="Katılımcı Dosyası Yükle">
<template #panelContent> <template #panelContent>
<panel-katilimci-document /> <panel-katilimci-document />
</template> </template>
<template #footerButton> <template #footerButton>
<button class='button-c button-save' @click='FileUpload'>Yükle</button> <button class="button-c button-save" @click="FileUpload">Yükle</button>
</template> </template>
</panel-wrapper> </panel-wrapper>
<panel-wrapper <panel-wrapper
wide wide
v-if='piyangoKatilimciStore.katilimciUserPanel' v-if="piyangoKatilimciStore.katilimciUserPanel"
v-model='piyangoKatilimciStore.katilimciUserPanel' v-model="piyangoKatilimciStore.katilimciUserPanel"
:panel-title=" :panel-title="
piyangoKatilimciStore.isPiyangoKatilimciUserUpdate piyangoKatilimciStore.isPiyangoKatilimciUserUpdate
? 'Katılımcı Düzenle' ? 'Katılımcı Düzenle'
@ -73,11 +72,11 @@
<template #panelContent> <template #panelContent>
<panel-piyango-katilimci /> <panel-piyango-katilimci />
</template> </template>
<template #footerButton v-if='!usersStore.isPanelUser'> <template #footerButton v-if="!usersStore.isPanelUser">
<button <button
:disabled='!piyangoKatilimciValidationStore.userFormChanged' :disabled="!piyangoKatilimciValidationStore.userFormChanged"
class='button-c button-save' class="button-c button-save"
@click='piyangoKatilimciService.SaveKatilimciUser'> @click="piyangoKatilimciService.SaveKatilimciUser">
{{ piyangoKatilimciStore.isPiyangoKatilimciUserUpdate ? 'Kaydet' : 'Ekle' }} {{ piyangoKatilimciStore.isPiyangoKatilimciUserUpdate ? 'Kaydet' : 'Ekle' }}
</button> </button>
</template> </template>
@ -94,23 +93,20 @@
<div class="progress-bar"> <div class="progress-bar">
<div <div
class="progress-fill" class="progress-fill"
:style="{ width: uploadProgressValue + '%' }" :style="{ width: uploadProgressValue + '%' }"></div>
></div>
</div> </div>
<div class="progress-text"> <div class="progress-text">
<template v-if="uploadProgressValue === 0"> <template v-if="uploadProgressValue === 0">
Dosya içeriği okunuyor, yükleme başlatılıyor... Dosya içeriği okunuyor, yükleme başlatılıyor...
</template> </template>
<template v-else> <template v-else>{{ uploadProgressValue }}%</template>
{{ uploadProgressValue }}%
</template>
</div> </div>
</div> </div>
</template> </template>
</panel-wrapper> </panel-wrapper>
</section> </section>
</template> </template>
<script setup lang='ts'> <script setup lang="ts">
import { ref, computed } from 'vue' import { ref, computed } from 'vue'
import PanelWrapper from '@/components/PanelWrapper.vue' import PanelWrapper from '@/components/PanelWrapper.vue'
import PanelKatilimciDocument from '@/module/cekilisler/components/panel/PanelKatilimciDocument.vue' import PanelKatilimciDocument from '@/module/cekilisler/components/panel/PanelKatilimciDocument.vue'
@ -146,8 +142,13 @@
import { usePiyangoOnayService } from '../service/piyangoOnayService' import { usePiyangoOnayService } from '../service/piyangoOnayService'
const piyangoOnayService = usePiyangoOnayService() const piyangoOnayService = usePiyangoOnayService()
import { connectToHub, onProgress, onInsertProgress, onCompleted, onError } from '../service/signalrService' import {
connectToHub,
onProgress,
onInsertProgress,
onCompleted,
onError
} from '../service/signalrService'
const uploadProgressValue = ref(0) const uploadProgressValue = ref(0)
const uploadProgressPanel = ref(false) const uploadProgressPanel = ref(false)
@ -302,8 +303,11 @@
}) })
const formData = new FormData() const formData = new FormData()
formData.append('excelFile', piyangoKatilimciStore.piyangoKatilimciFileFormData.excelFile) formData.append(
console.log( dataStore.panelData) 'excelFile',
piyangoKatilimciStore.piyangoKatilimciFileFormData.excelFile
)
console.log(dataStore.panelData)
const response = await dataStore.dataPost( const response = await dataStore.dataPost(
`Katilimci/ExcelleYukle/${piyangoStore.selectedLottery}?connectionId=${connectionId}`, `Katilimci/ExcelleYukle/${piyangoStore.selectedLottery}?connectionId=${connectionId}`,
{ {
@ -341,6 +345,7 @@ console.log( dataStore.panelData)
const DeleteAllButton = () => { const DeleteAllButton = () => {
dialogStore.CreateDialog({ dialogStore.CreateDialog({
title: 'Tüm Katılımcıları Sil', title: 'Tüm Katılımcıları Sil',
id: 'deletekatilimci',
content: content:
'Tüm katılımcıları silmek istediğinize emin misiniz? Bu işlem geri alınamaz.', 'Tüm katılımcıları silmek istediğinize emin misiniz? Bu işlem geri alınamaz.',
closeText: 'Vazgeç', closeText: 'Vazgeç',
@ -348,19 +353,19 @@ console.log( dataStore.panelData)
{ {
label: 'Tüm katılımcıları Sil', label: 'Tüm katılımcıları Sil',
type: 'alert', type: 'alert',
function: DeleteAll function: () => DeleteAll
} }
] ]
}) })
} }
const DeleteAll = async (id: number) => { const DeleteAll = async () => {
var dt = await dataStore.dataDelete( var dt = await dataStore.dataDelete(
'Katilimci/DeleteCekilisKatilimci/' + piyangoStore.selectedLottery 'Katilimci/DeleteCekilisKatilimci/' + piyangoStore.selectedLottery
) )
if (dt !== 'errorfalse') { if (dt !== 'errorfalse') {
piyangoKatilimciStore.refreshPiyangoKatilimciList = true piyangoKatilimciStore.refreshPiyangoKatilimciList = true
dialogStore.CloseDialog(id) dialogStore.CloseDialog('deletekatilimci')
} }
} }
@ -370,7 +375,6 @@ console.log( dataStore.panelData)
piyangoOnayStore.piyangoOnayForm.aciklama = '' piyangoOnayStore.piyangoOnayForm.aciklama = ''
await piyangoOnayService.SaveOnayDurum() await piyangoOnayService.SaveOnayDurum()
} }
</script> </script>
<style> <style>
.progress-container { .progress-container {
@ -413,4 +417,4 @@ console.log( dataStore.panelData)
font-size: 14px; font-size: 14px;
text-align: center; text-align: center;
} }
</style> </style>