diff --git a/src/components/DashPiyangoListe.vue b/src/components/DashPiyangoListe.vue
index e11a1ba..bfea13d 100644
--- a/src/components/DashPiyangoListe.vue
+++ b/src/components/DashPiyangoListe.vue
@@ -10,7 +10,7 @@
@@ -60,9 +60,11 @@
diff --git a/src/components/global/ListTableContent.vue b/src/components/global/ListTableContent.vue
index 137a8b5..06f094f 100644
--- a/src/components/global/ListTableContent.vue
+++ b/src/components/global/ListTableContent.vue
@@ -590,6 +590,17 @@
searchForm.value = false
mobileButtons.value = false
}
+
+ // Filtre başlığını almak için yardımcı fonksiyon
+ const getFilterTitle = (key: string): string => {
+ const filterTitles: Record = {
+ 'durumId': 'Durum',
+ 'piyangoAmacId': 'Piyango Amacı',
+ 'cekilisYontemiId': 'Çekiliş Yöntemi'
+ }
+ return filterTitles[key] || key
+ }
+
onBeforeMount(() => {
if (globalStore.screenWidth >= globalStore.breakPoints.tabletp)
mobileButtons.value = true
@@ -598,6 +609,21 @@
RouteSearchControl()
RouteFilterControl()
+ // URL query parametrelerini kontrol et ve filtreleri uygula (ilk istekten önce)
+ if (Object.keys(route.query).length > 0) {
+ Object.keys(route.query).forEach(key => {
+ const value = route.query[key]
+ if (value && typeof value === 'string') {
+ // Filtre parametresini filterParams'a ekle
+ filterParams[key] = {
+ val: value,
+ op: '=',
+ title: getFilterTitle(key)
+ }
+ }
+ })
+ }
+
if (props.apiList !== undefined) GetLocalData()
window.addEventListener('resize', Resize)
diff --git a/src/module/cekilisler/components/TabPiyangoKatilimciListesi.vue b/src/module/cekilisler/components/TabPiyangoKatilimciListesi.vue
index d3f1d82..3abaa25 100644
--- a/src/module/cekilisler/components/TabPiyangoKatilimciListesi.vue
+++ b/src/module/cekilisler/components/TabPiyangoKatilimciListesi.vue
@@ -148,6 +148,8 @@
const uploadProgressValue = ref(0)
const uploadProgressPanel = ref(false)
+ const connectionId = ref('')
+
const tableHeader = ref[]>([
{
name: 'cekilisKatilimSiraNo',
@@ -252,7 +254,8 @@
else return ''
})
- const AddNewDocument = () => {
+ const AddNewDocument = async () => {
+ connectionId.value = await connectToHub()
dataStore.panelData = {
title: '',
file: ''
@@ -277,7 +280,7 @@
piyangoKatilimciStore.katilimciUserPanel = true
}
const FileUpload = async () => {
- const connectionId = await connectToHub()
+ // Mevcut bağlantıyı kullan (AddNewDocument'te açıldı)
// Progress modal'ı aç
uploadProgressValue.value = 0
@@ -302,7 +305,7 @@
)
console.log(dataStore.panelData)
const response = await dataStore.dataPost(
- `Katilimci/ExcelleYukle/${piyangoStore.selectedLottery}?connectionId=${connectionId}`,
+ `Katilimci/ExcelleYukle/${piyangoStore.selectedLottery}?connectionId=${connectionId.value}`,
{
data: formData,
headers: { 'Content-Type': 'multipart/form-data' }
diff --git a/src/module/cekilisler/components/form/FormPiyangoOnayDurum.vue b/src/module/cekilisler/components/form/FormPiyangoOnayDurum.vue
index c0db81d..f249458 100644
--- a/src/module/cekilisler/components/form/FormPiyangoOnayDurum.vue
+++ b/src/module/cekilisler/components/form/FormPiyangoOnayDurum.vue
@@ -82,9 +82,7 @@
},
{
name: 'aciklama',
- title: 'Açıklama',
- sort: true,
- style: { width: '30%' }
+ title: 'Açıklama'
},
{
dosyaUrl: 'aciklama',
@@ -95,7 +93,19 @@
}
},
style: { width: '20%' }
- }
+ },
+ {
+ name: 'izinSayisi',
+ title: 'İzin Sayısı'
+ },
+ {
+ name: 'izinTarihi',
+ title: 'İzin Tarihi'
+ },
+ {
+ name: 'izinAciklamasi',
+ title: 'İzin Açıklaması'
+ },
])
const EditOnay = (d: Record) => {
diff --git a/src/module/cekilisler/service/signalrService.ts b/src/module/cekilisler/service/signalrService.ts
index 1e71439..21e1941 100644
--- a/src/module/cekilisler/service/signalrService.ts
+++ b/src/module/cekilisler/service/signalrService.ts
@@ -1,19 +1,33 @@
import * as signalR from '@microsoft/signalr'
-import { v4 as uuidv4 } from 'uuid'
let connection: signalR.HubConnection
let connectionId = ''
export const connectToHub = async () => {
+ console.log('Connecting to SignalR Hub...')
+ // Mevcut bağlantı varsa kapat
+ if (connection && connection.state === signalR.HubConnectionState.Connected) {
+ await connection.stop()
+ }
+
connection = new signalR.HubConnectionBuilder()
.withUrl(import.meta.env.VITE_SOCKET_URL, {
- withCredentials: false // Bu zorunlu, yoksa cookie vs gönderilmez
- }) // backend adresine göre düzenle
+ withCredentials: true,
+ skipNegotiation: true, // WebSocket kullanırken negotiation atlanabilir
+ transport: signalR.HttpTransportType.WebSockets
+ })
.withAutomaticReconnect()
.build()
+ // Eventleri ekle
+ onProgress((data) => console.log('progress', data))
+ onInsertProgress((data) => console.log('insert progress', data))
+ onCompleted((data) => console.log('completed', data))
+ onError((data) => console.log('error', data))
+
await connection.start()
- connectionId = connection.connectionId || uuidv4() // SignalR id'si ya da frontend'de de guid üretilebilir
+ connectionId = await connection.invoke('GetConnectionId')
+ console.log('Connected to SignalR Hub with Connection ID:', connectionId)
return connectionId
}
diff --git a/src/module/cekilisler/views/PiyangoListe.vue b/src/module/cekilisler/views/PiyangoListe.vue
index 6b5d60a..f021a5b 100644
--- a/src/module/cekilisler/views/PiyangoListe.vue
+++ b/src/module/cekilisler/views/PiyangoListe.vue
@@ -23,7 +23,8 @@
diff --git a/src/module/muhasebe/components/display/FormMuhasebePiyangoBilgileriDisplay.vue b/src/module/muhasebe/components/display/FormMuhasebePiyangoBilgileriDisplay.vue
index aa18c0f..f439dd1 100644
--- a/src/module/muhasebe/components/display/FormMuhasebePiyangoBilgileriDisplay.vue
+++ b/src/module/muhasebe/components/display/FormMuhasebePiyangoBilgileriDisplay.vue
@@ -217,7 +217,9 @@
}
}
const GetIkramiyeTotalValues = async () => {
- let data = await dataStore.dataGet('Ikramiye/Cekilis/' + piyangoStore.selectedLottery)
+ console.log(piyangoStore, 'piyangoStore')
+ let data = await dataStore.dataGet('Ikramiye/Cekilis/' + piyangoStore.selectedLottery +'?pageNumber=0')
+ //todo:page 0
if (data !== 'errorfalse') {
piyangoIkramiyeStore.totalIkramiyeValue = data.toplamdeger
}
@@ -279,6 +281,7 @@
})
}
const BasvuruBedeliMuhasebelestir = async () => {
+ console.log('basvuru bedeli muhasebelestir')
let data = await dataStore.dataGet(
'MuhasebeSettings/BasvuruBedeli/' + piyangoStore.selectedLottery
)
diff --git a/src/views/Dashboard.vue b/src/views/Dashboard.vue
index 49b958c..1f09c2b 100644
--- a/src/views/Dashboard.vue
+++ b/src/views/Dashboard.vue
@@ -10,7 +10,8 @@
iconBack="waiting"
:tableData="onayBekleyenPiyango"
lineRoute="piyangolar/detay/"
- lineRouteKey="id" />
+ lineRouteKey="id"
+ :filterParams="{ durumId: 0 }" />
+ lineRouteKey="id"
+ :filterParams="{ durumId: 1 }" />
+ lineRouteKey="id"
+ :filterParams="{ baslangicTarihi: '>' + new Date().toISOString().split('T')[0] }"/>
+ lineRouteKey="id"
+ :filterParams="{ bitisTarihi: '<' + new Date().toISOString().split('T')[0] }" />