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