Compare commits
6 Commits
678a96d76f
...
e8f914b321
| Author | SHA1 | Date | |
|---|---|---|---|
| e8f914b321 | |||
| bd93496e4d | |||
| 9da5f9946b | |||
| b0386d53e5 | |||
| f6c1b242b2 | |||
| b422187704 |
@ -727,6 +727,99 @@ svg {
|
|||||||
background-color: #f1f1f1;
|
background-color: #f1f1f1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* İşlem durumu badge stilleri - basit ve kompakt */
|
||||||
|
.islem-status-badge {
|
||||||
|
display: inline-block;
|
||||||
|
padding: 4px 10px;
|
||||||
|
color: #fff;
|
||||||
|
border-radius: 12px;
|
||||||
|
font-size: 0.875em;
|
||||||
|
font-weight: 500;
|
||||||
|
white-space: nowrap;
|
||||||
|
line-height: 1.4;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-select-list-item .islem-status-badge {
|
||||||
|
display: inline-block;
|
||||||
|
width: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-select-activator .islem-status-badge {
|
||||||
|
display: inline-block;
|
||||||
|
width: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Her durum için benzersiz canlı renkler */
|
||||||
|
.islem-status-coral {
|
||||||
|
background: #e74c3c;
|
||||||
|
}
|
||||||
|
.islem-status-amber {
|
||||||
|
background: #f39c12;
|
||||||
|
}
|
||||||
|
.islem-status-sky {
|
||||||
|
background: #3498db;
|
||||||
|
}
|
||||||
|
.islem-status-rose {
|
||||||
|
background: #e91e63;
|
||||||
|
}
|
||||||
|
.islem-status-pink {
|
||||||
|
background: #ec407a;
|
||||||
|
}
|
||||||
|
.islem-status-slate {
|
||||||
|
background: #607d8b;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
.islem-status-emerald {
|
||||||
|
background: #27ae60;
|
||||||
|
}
|
||||||
|
.islem-status-red {
|
||||||
|
background: #c0392b;
|
||||||
|
}
|
||||||
|
.islem-status-salmon {
|
||||||
|
background: #e67e22;
|
||||||
|
}
|
||||||
|
.islem-status-mint {
|
||||||
|
background: #2ecc71;
|
||||||
|
}
|
||||||
|
.islem-status-peach {
|
||||||
|
background: #ff9800;
|
||||||
|
}
|
||||||
|
.islem-status-yellow {
|
||||||
|
background: #f1c40f;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
.islem-status-teal {
|
||||||
|
background: #1abc9c;
|
||||||
|
}
|
||||||
|
.islem-status-cyan {
|
||||||
|
background: #00bcd4;
|
||||||
|
}
|
||||||
|
.islem-status-orange {
|
||||||
|
background: #ff5722;
|
||||||
|
}
|
||||||
|
.islem-status-blue {
|
||||||
|
background: #2196f3;
|
||||||
|
}
|
||||||
|
.islem-status-gold {
|
||||||
|
background: #ffc107;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
.islem-status-lavender {
|
||||||
|
background: #9c27b0;
|
||||||
|
}
|
||||||
|
.islem-status-violet {
|
||||||
|
background: #673ab7;
|
||||||
|
}
|
||||||
|
.islem-status-crimson {
|
||||||
|
background: #d32f2f;
|
||||||
|
}
|
||||||
|
.islem-status-indigo {
|
||||||
|
background: #3f51b5;
|
||||||
|
}
|
||||||
|
.islem-status-default {
|
||||||
|
background: #757575;
|
||||||
|
}
|
||||||
|
|
||||||
/* login */
|
/* login */
|
||||||
.login-w {
|
.login-w {
|
||||||
min-width: 100%;
|
min-width: 100%;
|
||||||
|
|||||||
@ -67,7 +67,7 @@
|
|||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
tableData: Record<string, any>
|
tableData: Record<string, any>[]
|
||||||
lineFunction?: Function
|
lineFunction?: Function
|
||||||
title?: string
|
title?: string
|
||||||
listText?: string
|
listText?: string
|
||||||
@ -97,16 +97,36 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
const goToListWithFilter = () => {
|
const goToListWithFilter = () => {
|
||||||
const query: Record<string, any> = {}
|
try {
|
||||||
|
const query: Record<string, any> = {}
|
||||||
|
|
||||||
// Filtre parametrelerini query'ye ekle
|
// Filtre parametrelerini query'ye ekle (Filters[...] formatına dönüştür)
|
||||||
if (props.filterParams) {
|
if (props.filterParams && typeof props.filterParams === 'object') {
|
||||||
Object.assign(query, props.filterParams)
|
Object.keys(props.filterParams).forEach((key) => {
|
||||||
|
const value = props.filterParams![key]
|
||||||
|
if (value !== undefined && value !== null && value !== '') {
|
||||||
|
// Değer zaten operatör içeriyorsa olduğu gibi kullan, yoksa '=' ekle
|
||||||
|
let filterValue = String(value)
|
||||||
|
// Eğer değer zaten operatör içermiyorsa '=' ekle
|
||||||
|
if (!filterValue.match(/^[<>=]/)) {
|
||||||
|
filterValue = '=' + filterValue
|
||||||
|
}
|
||||||
|
// Query parametresine string olarak ekle (Vue Router array'leri yanlış serialize ediyor)
|
||||||
|
query[`Filters[${key}]`] = filterValue
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
router.push({
|
||||||
|
path: '/piyangolar/piyango-listesi',
|
||||||
|
query: query
|
||||||
|
})
|
||||||
|
} catch (error) {
|
||||||
|
console.error('goToListWithFilter hatası:', error)
|
||||||
|
// Hata durumunda filtre olmadan yönlendir
|
||||||
|
router.push({
|
||||||
|
path: '/piyangolar/piyango-listesi'
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
router.push({
|
|
||||||
path: '/piyangolar/piyango-listesi',
|
|
||||||
query: query
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -473,16 +473,23 @@
|
|||||||
1
|
1
|
||||||
)
|
)
|
||||||
if (filter.type === 'select') {
|
if (filter.type === 'select') {
|
||||||
const forText = props.tableHeader[
|
const filterData = props.tableHeader[filter.hIndex].filter!.data
|
||||||
filter.hIndex
|
if (filterData && Array.isArray(filterData)) {
|
||||||
].filter!.data.find(
|
const forText = filterData.find(
|
||||||
(o: Record<string, any>) =>
|
(o: Record<string, any>) =>
|
||||||
String(
|
String(
|
||||||
o[props.tableHeader[filter.hIndex].filter!.listVal]
|
o[props.tableHeader[filter.hIndex].filter!.listVal]
|
||||||
) === String(filter.values[ind].val)
|
) === String(filter.values[ind].val)
|
||||||
)
|
)
|
||||||
filter.values[ind].text =
|
if (forText) {
|
||||||
forText[props.tableHeader[filter.hIndex].filter!.listText]
|
filter.values[ind].text =
|
||||||
|
forText[props.tableHeader[filter.hIndex].filter!.listText]
|
||||||
|
} else {
|
||||||
|
filter.values[ind].text = filter.values[ind].val
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
filter.values[ind].text = filter.values[ind].val
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
@ -490,13 +497,22 @@
|
|||||||
filter.values[0].val = (route.query[key] as string).slice(1)
|
filter.values[0].val = (route.query[key] as string).slice(1)
|
||||||
|
|
||||||
if (filter.type === 'select') {
|
if (filter.type === 'select') {
|
||||||
const forText = props.tableHeader[filter.hIndex].filter!.data.find(
|
const filterData = props.tableHeader[filter.hIndex].filter!.data
|
||||||
(o: Record<string, any>) =>
|
if (filterData && Array.isArray(filterData)) {
|
||||||
String(o[props.tableHeader[filter.hIndex].filter!.listVal]) ===
|
const forText = filterData.find(
|
||||||
String(filter.values[0].val)
|
(o: Record<string, any>) =>
|
||||||
)
|
String(o[props.tableHeader[filter.hIndex].filter!.listVal]) ===
|
||||||
filter.values[0].text =
|
String(filter.values[0].val)
|
||||||
forText[props.tableHeader[filter.hIndex].filter!.listText]
|
)
|
||||||
|
if (forText) {
|
||||||
|
filter.values[0].text =
|
||||||
|
forText[props.tableHeader[filter.hIndex].filter!.listText]
|
||||||
|
} else {
|
||||||
|
filter.values[0].text = filter.values[0].val
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
filter.values[0].text = filter.values[0].val
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
filter.filter = true
|
filter.filter = true
|
||||||
|
|||||||
@ -18,16 +18,27 @@
|
|||||||
listVal="islemId"
|
listVal="islemId"
|
||||||
v-model="piyangoOnayStore.piyangoOnayForm.onayDurumuIslemTipiId"
|
v-model="piyangoOnayStore.piyangoOnayForm.onayDurumuIslemTipiId"
|
||||||
required
|
required
|
||||||
:invalidText="piyangoOnayValidationStore.invalidTexts.onayDurumuIslemTipiId" />
|
:invalidText="piyangoOnayValidationStore.invalidTexts.onayDurumuIslemTipiId">
|
||||||
<template v-if="piyangoOnayStore.piyangoOnayForm.onayDurumuIslemTipiId === 4">
|
<template #option="{ optionData }">
|
||||||
<form-input
|
<span
|
||||||
modelKey="izinSayisi"
|
v-if="optionData && optionData.tipAdi"
|
||||||
v-model="piyangoOnayStore.piyangoOnayForm.izinSayisi"
|
class="islem-status-badge"
|
||||||
required
|
:class="piyangoStore.GetIslemStatusClass(optionData.tipAdi)">
|
||||||
label="İzin Sayı No"
|
{{ optionData.tipAdi }}
|
||||||
placeholder="İzin Sayı No"
|
</span>
|
||||||
:invalidText="piyangoOnayValidationStore.invalidTexts.izinSayisi"
|
<span v-else>{{ optionData?.tipAdi || optionData }}</span>
|
||||||
@keyup="OnKeyup" />
|
</template>
|
||||||
|
<template #activator="{ activatorData }">
|
||||||
|
<span
|
||||||
|
v-if="activatorData && activatorData.tipAdi"
|
||||||
|
class="islem-status-badge"
|
||||||
|
:class="piyangoStore.GetIslemStatusClass(activatorData.tipAdi)">
|
||||||
|
{{ activatorData.tipAdi }}
|
||||||
|
</span>
|
||||||
|
<span v-else>Lütfen Seçim Yapınız</span>
|
||||||
|
</template>
|
||||||
|
</form-select>
|
||||||
|
<template v-if="showIzinFields">
|
||||||
<form-date
|
<form-date
|
||||||
type="date"
|
type="date"
|
||||||
required
|
required
|
||||||
@ -36,12 +47,50 @@
|
|||||||
label="İzin Tarihi"
|
label="İzin Tarihi"
|
||||||
:invalidText="piyangoOnayValidationStore.invalidTexts.izinTarihi"
|
:invalidText="piyangoOnayValidationStore.invalidTexts.izinTarihi"
|
||||||
@change="OnKeyup" />
|
@change="OnKeyup" />
|
||||||
|
<form-input
|
||||||
|
modelKey="izinSayisi"
|
||||||
|
v-model="piyangoOnayStore.piyangoOnayForm.izinSayisi"
|
||||||
|
required
|
||||||
|
label="İzin Sayısı"
|
||||||
|
placeholder="İzin Sayısı"
|
||||||
|
:invalidText="piyangoOnayValidationStore.invalidTexts.izinSayisi"
|
||||||
|
@keyup="OnKeyup" />
|
||||||
<form-textarea
|
<form-textarea
|
||||||
v-model="piyangoOnayStore.piyangoOnayForm.izinAciklamasi"
|
v-model="piyangoOnayStore.piyangoOnayForm.izinAciklamasi"
|
||||||
:invalidText="piyangoOnayValidationStore.invalidTexts.izinAciklamasi"
|
:invalidText="piyangoOnayValidationStore.invalidTexts.izinAciklamasi"
|
||||||
label="İzin Açıklaması"
|
label="İzin Açıklaması"
|
||||||
@keyup="OnKeyup" />
|
@keyup="OnKeyup" />
|
||||||
</template>
|
</template>
|
||||||
|
<template v-if="showIzinVerildiFields">
|
||||||
|
<form-select
|
||||||
|
label="Müdürlük"
|
||||||
|
:listData="mudurlukListesi"
|
||||||
|
listText="name"
|
||||||
|
listVal="id"
|
||||||
|
v-model="piyangoOnayStore.piyangoOnayForm.mudurlukId"
|
||||||
|
required
|
||||||
|
:invalidText="piyangoOnayValidationStore.invalidTexts.mudurlukId"
|
||||||
|
@change="OnKeyup" />
|
||||||
|
<form-select
|
||||||
|
label="Çekiliş Görevlisi"
|
||||||
|
:listData="cekilisGorevlisiListesi"
|
||||||
|
listText="name"
|
||||||
|
listVal="id"
|
||||||
|
v-model="piyangoOnayStore.piyangoOnayForm.cekilisGorevlisiId"
|
||||||
|
required
|
||||||
|
:invalidText="piyangoOnayValidationStore.invalidTexts.cekilisGorevlisiId"
|
||||||
|
@change="OnKeyup" />
|
||||||
|
</template>
|
||||||
|
<form-select
|
||||||
|
v-if="showKapsamDisiSebebi"
|
||||||
|
label="Kapsam Dışı Sebebi"
|
||||||
|
:listData="kapsamDisiSebepListesi"
|
||||||
|
listText="name"
|
||||||
|
listVal="id"
|
||||||
|
v-model="piyangoOnayStore.piyangoOnayForm.kapsamDisiSebebi"
|
||||||
|
required
|
||||||
|
:invalidText="piyangoOnayValidationStore.invalidTexts.kapsamDisiSebebi"
|
||||||
|
@change="OnKeyup" />
|
||||||
<form-file
|
<form-file
|
||||||
v-model="piyangoOnayStore.piyangoOnayForm.file"
|
v-model="piyangoOnayStore.piyangoOnayForm.file"
|
||||||
elclass="panel-documents-item"
|
elclass="panel-documents-item"
|
||||||
@ -55,7 +104,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { onBeforeMount } from 'vue'
|
import { onBeforeMount, computed, ref } from 'vue'
|
||||||
import { usePiyangoOnayStore } from '../../stores/piyangoOnayStore'
|
import { usePiyangoOnayStore } from '../../stores/piyangoOnayStore'
|
||||||
const piyangoOnayStore = usePiyangoOnayStore()
|
const piyangoOnayStore = usePiyangoOnayStore()
|
||||||
import { usePiyangoOnayValidationStore } from '../../validation/piyangoOnayValidationStore'
|
import { usePiyangoOnayValidationStore } from '../../validation/piyangoOnayValidationStore'
|
||||||
@ -66,6 +115,62 @@
|
|||||||
const piyangoDataStore = usePiyangoDataStore()
|
const piyangoDataStore = usePiyangoDataStore()
|
||||||
import { usePiyangoServices } from '../../service/piyangoServices'
|
import { usePiyangoServices } from '../../service/piyangoServices'
|
||||||
const piyangoServices = usePiyangoServices()
|
const piyangoServices = usePiyangoServices()
|
||||||
|
import { usePiyangoStore } from '../../stores/piyangoStore'
|
||||||
|
const piyangoStore = usePiyangoStore()
|
||||||
|
|
||||||
|
const kapsamDisiId = computed<number | null>(() => {
|
||||||
|
const kapsamDisi = piyangoDataStore.piyangoOnayDurumlari.find(
|
||||||
|
(item: Record<string, any>) => item.tipAdi === 'Kapsam Dışı'
|
||||||
|
)
|
||||||
|
return kapsamDisi ? kapsamDisi.islemId : null
|
||||||
|
})
|
||||||
|
|
||||||
|
const showIzinFields = computed<boolean>(() => {
|
||||||
|
return (
|
||||||
|
piyangoOnayStore.piyangoOnayForm.onayDurumuIslemTipiId === 4 ||
|
||||||
|
piyangoOnayStore.piyangoOnayForm.onayDurumuIslemTipiId === kapsamDisiId.value
|
||||||
|
)
|
||||||
|
})
|
||||||
|
|
||||||
|
const showIzinVerildiFields = computed<boolean>(() => {
|
||||||
|
return (
|
||||||
|
piyangoOnayStore.piyangoOnayForm.onayDurumuIslemTipiId === 4
|
||||||
|
)
|
||||||
|
})
|
||||||
|
|
||||||
|
const showKapsamDisiSebebi = computed<boolean>(() => {
|
||||||
|
return piyangoOnayStore.piyangoOnayForm.onayDurumuIslemTipiId === kapsamDisiId.value
|
||||||
|
})
|
||||||
|
|
||||||
|
const kapsamDisiSebepListesi = ref<Record<string, any>[]>([
|
||||||
|
{ id: '2/a', name: '2/a' },
|
||||||
|
{ id: '2/b', name: '2/b' },
|
||||||
|
{ id: '2/c', name: '2/c' },
|
||||||
|
{ id: '2/ç', name: '2/ç' },
|
||||||
|
{ id: '2/d', name: '2/d' },
|
||||||
|
{ id: '2/e', name: '2/e' },
|
||||||
|
{ id: '2/f', name: '2/f' },
|
||||||
|
{ id: '2/g', name: '2/g' },
|
||||||
|
{ id: 'Diğer', name: 'Diğer' }
|
||||||
|
])
|
||||||
|
|
||||||
|
const cekilisGorevlisiListesi = ref<Record<string, any>[]>([
|
||||||
|
{ id: 1, name: 'Antalya Şube Müdürlüğü' },
|
||||||
|
{ id: 2, name: 'Gaziantep Şube Müdürlüğü' },
|
||||||
|
{ id: 3, name: 'Aksaray Şube Müdürlüğü' },
|
||||||
|
{ id: 4, name: 'Kadıköy Şube Müdürlüğü' },
|
||||||
|
{ id: 5, name: 'Karşıyaka Şube Müdürlüğü' },
|
||||||
|
{ id: 6, name: 'Muğla Şube Müdürlüğü' },
|
||||||
|
{ id: 7, name: 'Trabzon Şube Müdürlüğü' },
|
||||||
|
{ id: 8, name: 'Noter' },
|
||||||
|
{ id: 9, name: 'Başkanlık Personeli' }
|
||||||
|
])
|
||||||
|
|
||||||
|
const mudurlukListesi = ref<Record<string, any>[]>([
|
||||||
|
{ id: 1, name: '1 No\'lu Özel Çekilişler İzin ve Takip Şubesi Müdürlüğü' },
|
||||||
|
{ id: 2, name: '2 No\'lu Özel Çekilişler İzin ve Takip Şubesi Müdürlüğü' },
|
||||||
|
{ id: 3, name: '3 No\'lu Özel Çekilişler İzin ve Takip Şubesi Müdürlüğü' }
|
||||||
|
])
|
||||||
|
|
||||||
const OnKeyup = () => {
|
const OnKeyup = () => {
|
||||||
piyangoOnayValidationStore.formChanged = true
|
piyangoOnayValidationStore.formChanged = true
|
||||||
|
|||||||
@ -8,7 +8,8 @@
|
|||||||
:apiList="'OnayDurumu/GetSonOnayDurumlariList/' + piyangoStore.selectedLottery"
|
:apiList="'OnayDurumu/GetSonOnayDurumlariList/' + piyangoStore.selectedLottery"
|
||||||
apiText="Piyango Onay Log Listesi"
|
apiText="Piyango Onay Log Listesi"
|
||||||
page="form"
|
page="form"
|
||||||
:refresh="piyangoOnayStore.refreshList" />
|
:refresh="piyangoOnayStore.refreshList"
|
||||||
|
:rowActions="rowActions" />
|
||||||
<panel-wrapper
|
<panel-wrapper
|
||||||
v-if="piyangoOnayStore.onayFormPanel"
|
v-if="piyangoOnayStore.onayFormPanel"
|
||||||
v-model="piyangoOnayStore.onayFormPanel"
|
v-model="piyangoOnayStore.onayFormPanel"
|
||||||
@ -40,6 +41,10 @@
|
|||||||
const piyangoStore = usePiyangoStore()
|
const piyangoStore = usePiyangoStore()
|
||||||
import { usePiyangoDataStore } from '../../stores/piyangoDataStore'
|
import { usePiyangoDataStore } from '../../stores/piyangoDataStore'
|
||||||
const piyangoDataStore = usePiyangoDataStore()
|
const piyangoDataStore = usePiyangoDataStore()
|
||||||
|
import { useDialogStore } from '@/components/global/dialogStore'
|
||||||
|
const dialogStore = useDialogStore()
|
||||||
|
import { useDataStore } from '@/stores/dataStore'
|
||||||
|
const dataStore = useDataStore()
|
||||||
|
|
||||||
const loaded = ref<boolean>(false)
|
const loaded = ref<boolean>(false)
|
||||||
|
|
||||||
@ -72,6 +77,11 @@
|
|||||||
name: 'onayDurumuIslemTipiAdi',
|
name: 'onayDurumuIslemTipiAdi',
|
||||||
title: 'İşlem',
|
title: 'İşlem',
|
||||||
sort: true,
|
sort: true,
|
||||||
|
computeHtml: (v: Record<string, any>): string => {
|
||||||
|
const statusName = v.onayDurumuIslemTipiAdi || ''
|
||||||
|
const statusClass = piyangoStore.GetIslemStatusClass(statusName)
|
||||||
|
return `<span class='islem-status-badge ${statusClass}'>${statusName}</span>`
|
||||||
|
},
|
||||||
filter: {
|
filter: {
|
||||||
type: 'select',
|
type: 'select',
|
||||||
data: piyangoOnayDurumlari,
|
data: piyangoOnayDurumlari,
|
||||||
@ -100,19 +110,71 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'izinTarihi',
|
name: 'izinTarihi',
|
||||||
title: 'İzin Tarihi'
|
title: 'İzin Tarihi',
|
||||||
|
compute: (v: Record<string, any>): string => {
|
||||||
|
return v.izinTarihi === null || v.izinTarihi === undefined || v.izinTarihi === ''
|
||||||
|
? ''
|
||||||
|
: dateStore.dateFormat({ pattern: 'dd-mm-yy', date: v.izinTarihi })
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'izinAciklamasi',
|
name: 'izinAciklamasi',
|
||||||
title: 'İzin Açıklaması'
|
title: 'İzin Açıklaması'
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'kapsamDisiSebebi',
|
||||||
|
title: 'Kapsam Dışı Sebebi'
|
||||||
|
},
|
||||||
])
|
])
|
||||||
|
|
||||||
const EditOnay = (d: Record<string, any>) => {
|
const EditOnay = (d: Record<string, any>) => {
|
||||||
Object.assign(piyangoOnayStore.piyangoPanelOnayForm, d)
|
Object.assign(piyangoOnayStore.piyangoPanelOnayForm, {
|
||||||
|
...piyangoOnayStore.piyangoOnayBaseForm,
|
||||||
|
...d,
|
||||||
|
izinAciklamasi: d.izinAciklamasi != null ? d.izinAciklamasi : '',
|
||||||
|
kapsamDisiSebebi: d.kapsamDisiSebebi != null ? d.kapsamDisiSebebi : null
|
||||||
|
})
|
||||||
piyangoOnayStore.onayFormPanel = true
|
piyangoOnayStore.onayFormPanel = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const DeleteRowPop = (data: Record<string, any>, 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 = false
|
||||||
|
setTimeout(() => {
|
||||||
|
piyangoOnayStore.refreshList = true
|
||||||
|
}, 10)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const rowActions = ref<Record<string, any>[]>([
|
||||||
|
{
|
||||||
|
text: 'Sil',
|
||||||
|
class: 'alert',
|
||||||
|
action: DeleteRowPop
|
||||||
|
}
|
||||||
|
])
|
||||||
|
|
||||||
onBeforeMount(async () => {
|
onBeforeMount(async () => {
|
||||||
loaded.value = true
|
loaded.value = true
|
||||||
})
|
})
|
||||||
|
|||||||
@ -7,16 +7,27 @@
|
|||||||
listVal="islemId"
|
listVal="islemId"
|
||||||
v-model="piyangoOnayStore.piyangoPanelOnayForm.onayDurumuIslemTipiId"
|
v-model="piyangoOnayStore.piyangoPanelOnayForm.onayDurumuIslemTipiId"
|
||||||
required
|
required
|
||||||
:invalidText="piyangoOnayValidationStore.invalidTextsPanel.onayDurumuIslemTipiId" />
|
:invalidText="piyangoOnayValidationStore.invalidTextsPanel.onayDurumuIslemTipiId">
|
||||||
<template v-if="piyangoOnayStore.piyangoPanelOnayForm.onayDurumuIslemTipiId === 4">
|
<template #option="{ optionData }">
|
||||||
<form-input
|
<span
|
||||||
modelKey="izinSayisi"
|
v-if="optionData && optionData.tipAdi"
|
||||||
v-model="piyangoOnayStore.piyangoPanelOnayForm.izinSayisi"
|
class="islem-status-badge"
|
||||||
required
|
:class="piyangoStore.GetIslemStatusClass(optionData.tipAdi)">
|
||||||
label="İzin Sayı No"
|
{{ optionData.tipAdi }}
|
||||||
placeholder="İzin Sayı No"
|
</span>
|
||||||
:invalidText="piyangoOnayValidationStore.invalidTextsPanel.izinSayisi"
|
<span v-else>{{ optionData?.tipAdi || optionData }}</span>
|
||||||
@keyup="OnKeyup" />
|
</template>
|
||||||
|
<template #activator="{ activatorData }">
|
||||||
|
<span
|
||||||
|
v-if="activatorData && activatorData.tipAdi"
|
||||||
|
class="islem-status-badge"
|
||||||
|
:class="piyangoStore.GetIslemStatusClass(activatorData.tipAdi)">
|
||||||
|
{{ activatorData.tipAdi }}
|
||||||
|
</span>
|
||||||
|
<span v-else>Lütfen Seçim Yapınız</span>
|
||||||
|
</template>
|
||||||
|
</form-select>
|
||||||
|
<template v-if="showIzinFields">
|
||||||
<form-date
|
<form-date
|
||||||
type="date"
|
type="date"
|
||||||
required
|
required
|
||||||
@ -25,12 +36,30 @@
|
|||||||
label="İzin Tarihi"
|
label="İzin Tarihi"
|
||||||
:invalidText="piyangoOnayValidationStore.invalidTextsPanel.izinTarihi"
|
:invalidText="piyangoOnayValidationStore.invalidTextsPanel.izinTarihi"
|
||||||
@change="OnKeyup" />
|
@change="OnKeyup" />
|
||||||
|
<form-input
|
||||||
|
modelKey="izinSayisi"
|
||||||
|
v-model="piyangoOnayStore.piyangoPanelOnayForm.izinSayisi"
|
||||||
|
required
|
||||||
|
label="İzin Sayısı"
|
||||||
|
placeholder="İzin Sayısı"
|
||||||
|
:invalidText="piyangoOnayValidationStore.invalidTextsPanel.izinSayisi"
|
||||||
|
@keyup="OnKeyup" />
|
||||||
<form-textarea
|
<form-textarea
|
||||||
v-model="piyangoOnayStore.piyangoPanelOnayForm.izinAciklamasi"
|
v-model="piyangoOnayStore.piyangoPanelOnayForm.izinAciklamasi"
|
||||||
:invalidText="piyangoOnayValidationStore.invalidTextsPanel.izinAciklamasi"
|
:invalidText="piyangoOnayValidationStore.invalidTextsPanel.izinAciklamasi"
|
||||||
label="İzin Açıklaması"
|
label="İzin Açıklaması"
|
||||||
@keyup="OnKeyup" />
|
@keyup="OnKeyup" />
|
||||||
</template>
|
</template>
|
||||||
|
<form-select
|
||||||
|
v-if="showKapsamDisiSebebi"
|
||||||
|
label="Kapsam Dışı Sebebi"
|
||||||
|
:listData="kapsamDisiSebepListesi"
|
||||||
|
listText="name"
|
||||||
|
listVal="id"
|
||||||
|
v-model="piyangoOnayStore.piyangoPanelOnayForm.kapsamDisiSebebi"
|
||||||
|
required
|
||||||
|
:invalidText="piyangoOnayValidationStore.invalidTextsPanel.kapsamDisiSebebi"
|
||||||
|
@change="OnKeyup" />
|
||||||
<form-file
|
<form-file
|
||||||
v-model="piyangoOnayStore.piyangoPanelOnayForm.file"
|
v-model="piyangoOnayStore.piyangoPanelOnayForm.file"
|
||||||
elclass="panel-documents-item"
|
elclass="panel-documents-item"
|
||||||
@ -43,7 +72,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { onBeforeMount } from 'vue'
|
import { onBeforeMount, computed, ref } from 'vue'
|
||||||
import { usePiyangoOnayStore } from '../../stores/piyangoOnayStore'
|
import { usePiyangoOnayStore } from '../../stores/piyangoOnayStore'
|
||||||
const piyangoOnayStore = usePiyangoOnayStore()
|
const piyangoOnayStore = usePiyangoOnayStore()
|
||||||
import { usePiyangoOnayValidationStore } from '../../validation/piyangoOnayValidationStore'
|
import { usePiyangoOnayValidationStore } from '../../validation/piyangoOnayValidationStore'
|
||||||
@ -52,6 +81,38 @@
|
|||||||
const piyangoDataStore = usePiyangoDataStore()
|
const piyangoDataStore = usePiyangoDataStore()
|
||||||
import { usePiyangoServices } from '../../service/piyangoServices'
|
import { usePiyangoServices } from '../../service/piyangoServices'
|
||||||
const piyangoServices = usePiyangoServices()
|
const piyangoServices = usePiyangoServices()
|
||||||
|
import { usePiyangoStore } from '../../stores/piyangoStore'
|
||||||
|
const piyangoStore = usePiyangoStore()
|
||||||
|
|
||||||
|
const kapsamDisiId = computed<number | null>(() => {
|
||||||
|
const kapsamDisi = piyangoDataStore.piyangoOnayDurumlari.find(
|
||||||
|
(item: Record<string, any>) => item.tipAdi === 'Kapsam Dışı'
|
||||||
|
)
|
||||||
|
return kapsamDisi ? kapsamDisi.islemId : null
|
||||||
|
})
|
||||||
|
|
||||||
|
const showIzinFields = computed<boolean>(() => {
|
||||||
|
return (
|
||||||
|
piyangoOnayStore.piyangoPanelOnayForm.onayDurumuIslemTipiId === 4 ||
|
||||||
|
piyangoOnayStore.piyangoPanelOnayForm.onayDurumuIslemTipiId === kapsamDisiId.value
|
||||||
|
)
|
||||||
|
})
|
||||||
|
|
||||||
|
const showKapsamDisiSebebi = computed<boolean>(() => {
|
||||||
|
return piyangoOnayStore.piyangoPanelOnayForm.onayDurumuIslemTipiId === kapsamDisiId.value
|
||||||
|
})
|
||||||
|
|
||||||
|
const kapsamDisiSebepListesi = ref<Record<string, any>[]>([
|
||||||
|
{ id: '2/a', name: '2/a' },
|
||||||
|
{ id: '2/b', name: '2/b' },
|
||||||
|
{ id: '2/c', name: '2/c' },
|
||||||
|
{ id: '2/ç', name: '2/ç' },
|
||||||
|
{ id: '2/d', name: '2/d' },
|
||||||
|
{ id: '2/e', name: '2/e' },
|
||||||
|
{ id: '2/f', name: '2/f' },
|
||||||
|
{ id: '2/g', name: '2/g' },
|
||||||
|
{ id: 'Diğer', name: 'Diğer' }
|
||||||
|
])
|
||||||
|
|
||||||
const OnKeyup = () => {
|
const OnKeyup = () => {
|
||||||
piyangoOnayValidationStore.formChanged = true
|
piyangoOnayValidationStore.formChanged = true
|
||||||
|
|||||||
@ -34,14 +34,14 @@
|
|||||||
:invalidText="piyangoTeminatValidationStore.invalidTexts.refundCount" />
|
:invalidText="piyangoTeminatValidationStore.invalidTexts.refundCount" />
|
||||||
<form-file
|
<form-file
|
||||||
v-model="piyangoTeminatStore.piyangoTeminatFormData.refundDocumentUrl"
|
v-model="piyangoTeminatStore.piyangoTeminatFormData.refundDocumentUrl"
|
||||||
label='Klasör Arşiv'
|
label='İade Yazısı'
|
||||||
elclass="panel-documents-item"
|
elclass="panel-documents-item"
|
||||||
:invalidText="piyangoTeminatValidationStore.invalidTexts.refundDocumentUrl"
|
:invalidText="piyangoTeminatValidationStore.invalidTexts.refundDocumentUrl"
|
||||||
@change="OnKeyup" />
|
@change="OnKeyup" />
|
||||||
<form-input
|
<form-input
|
||||||
modelKey="refundDescription"
|
modelKey="refundDescription"
|
||||||
v-model="piyangoTeminatStore.piyangoTeminatFormData.refundDescription"
|
v-model="piyangoTeminatStore.piyangoTeminatFormData.refundDescription"
|
||||||
label="İade Açıklama"
|
label="Klasör Arşiv No"
|
||||||
@keyup="OnKeyup" />
|
@keyup="OnKeyup" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@ -4,6 +4,7 @@ import { usePiyangoStore } from '../stores/piyangoStore'
|
|||||||
import { usePiyangoOnayStore } from '../stores/piyangoOnayStore'
|
import { usePiyangoOnayStore } from '../stores/piyangoOnayStore'
|
||||||
import { usePiyangoOnayValidationStore } from '../validation/piyangoOnayValidationStore'
|
import { usePiyangoOnayValidationStore } from '../validation/piyangoOnayValidationStore'
|
||||||
import { useUsersStore } from '@/stores/usersStore'
|
import { useUsersStore } from '@/stores/usersStore'
|
||||||
|
import { usePiyangoDataStore } from '../stores/piyangoDataStore'
|
||||||
|
|
||||||
export const usePiyangoOnayService = defineStore('piyangoOnayService', () => {
|
export const usePiyangoOnayService = defineStore('piyangoOnayService', () => {
|
||||||
const dataStore = useDataStore()
|
const dataStore = useDataStore()
|
||||||
@ -11,6 +12,18 @@ export const usePiyangoOnayService = defineStore('piyangoOnayService', () => {
|
|||||||
const piyangoOnayStore = usePiyangoOnayStore()
|
const piyangoOnayStore = usePiyangoOnayStore()
|
||||||
const piyangoOnayValidationStore = usePiyangoOnayValidationStore()
|
const piyangoOnayValidationStore = usePiyangoOnayValidationStore()
|
||||||
const usersStore = useUsersStore()
|
const usersStore = useUsersStore()
|
||||||
|
const piyangoDataStore = usePiyangoDataStore()
|
||||||
|
|
||||||
|
const getKapsamDisiId = (): number | null => {
|
||||||
|
const kapsamDisi = piyangoDataStore.piyangoOnayDurumlari.find(
|
||||||
|
(item: Record<string, any>) => item.tipAdi === 'Kapsam Dışı'
|
||||||
|
)
|
||||||
|
return kapsamDisi ? kapsamDisi.islemId : null
|
||||||
|
}
|
||||||
|
|
||||||
|
const shouldKeepIzinFields = (islemTipiId: number | null): boolean => {
|
||||||
|
return islemTipiId === 4 || islemTipiId === getKapsamDisiId()
|
||||||
|
}
|
||||||
|
|
||||||
const SaveOnayDurum = async () => {
|
const SaveOnayDurum = async () => {
|
||||||
if (piyangoOnayValidationStore.FormCheck()) {
|
if (piyangoOnayValidationStore.FormCheck()) {
|
||||||
@ -18,11 +31,14 @@ export const usePiyangoOnayService = defineStore('piyangoOnayService', () => {
|
|||||||
let form: any
|
let form: any
|
||||||
let dataForm = new FormData()
|
let dataForm = new FormData()
|
||||||
|
|
||||||
if (piyangoOnayStore.piyangoOnayForm.onayDurumuIslemTipiId !== 4) {
|
if (!shouldKeepIzinFields(piyangoOnayStore.piyangoOnayForm.onayDurumuIslemTipiId)) {
|
||||||
piyangoOnayStore.piyangoOnayForm.izinSayisi = ''
|
piyangoOnayStore.piyangoOnayForm.izinSayisi = ''
|
||||||
piyangoOnayStore.piyangoOnayForm.izinTarihi = ''
|
piyangoOnayStore.piyangoOnayForm.izinTarihi = ''
|
||||||
piyangoOnayStore.piyangoOnayForm.izinAciklamasi = ''
|
piyangoOnayStore.piyangoOnayForm.izinAciklamasi = ''
|
||||||
}
|
}
|
||||||
|
if (piyangoOnayStore.piyangoOnayForm.onayDurumuIslemTipiId !== getKapsamDisiId()) {
|
||||||
|
piyangoOnayStore.piyangoOnayForm.kapsamDisiSebebi = null
|
||||||
|
}
|
||||||
dataForm.append(
|
dataForm.append(
|
||||||
'onayDurumuIslemTipiId',
|
'onayDurumuIslemTipiId',
|
||||||
piyangoOnayStore.piyangoOnayForm.onayDurumuIslemTipiId
|
piyangoOnayStore.piyangoOnayForm.onayDurumuIslemTipiId
|
||||||
@ -30,10 +46,21 @@ export const usePiyangoOnayService = defineStore('piyangoOnayService', () => {
|
|||||||
dataForm.append('onayCekilisId', String(piyangoStore.selectedLottery))
|
dataForm.append('onayCekilisId', String(piyangoStore.selectedLottery))
|
||||||
dataForm.append('kisiId', String(usersStore.userId))
|
dataForm.append('kisiId', String(usersStore.userId))
|
||||||
dataForm.append('file', piyangoOnayStore.piyangoOnayForm.file)
|
dataForm.append('file', piyangoOnayStore.piyangoOnayForm.file)
|
||||||
dataForm.append('aciklama', piyangoOnayStore.piyangoOnayForm.aciklama)
|
dataForm.append('aciklama', piyangoOnayStore.piyangoOnayForm.aciklama || '')
|
||||||
dataForm.append('izinSayisi', piyangoOnayStore.piyangoOnayForm.izinSayisi)
|
dataForm.append('izinSayisi', piyangoOnayStore.piyangoOnayForm.izinSayisi || '')
|
||||||
dataForm.append('izinTarihi', piyangoOnayStore.piyangoOnayForm.izinTarihi)
|
dataForm.append('izinTarihi', piyangoOnayStore.piyangoOnayForm.izinTarihi || '')
|
||||||
dataForm.append('izinAciklamasi', piyangoOnayStore.piyangoOnayForm.izinAciklamasi)
|
dataForm.append(
|
||||||
|
'izinAciklamasi',
|
||||||
|
piyangoOnayStore.piyangoOnayForm.izinAciklamasi != null
|
||||||
|
? String(piyangoOnayStore.piyangoOnayForm.izinAciklamasi)
|
||||||
|
: ''
|
||||||
|
)
|
||||||
|
dataForm.append(
|
||||||
|
'kapsamDisiSebebi',
|
||||||
|
piyangoOnayStore.piyangoOnayForm.kapsamDisiSebebi != null
|
||||||
|
? String(piyangoOnayStore.piyangoOnayForm.kapsamDisiSebebi)
|
||||||
|
: ''
|
||||||
|
)
|
||||||
|
|
||||||
form = await dataStore.dataPost('OnayDurumu/', {
|
form = await dataStore.dataPost('OnayDurumu/', {
|
||||||
data: dataForm,
|
data: dataForm,
|
||||||
@ -61,22 +88,33 @@ export const usePiyangoOnayService = defineStore('piyangoOnayService', () => {
|
|||||||
let form: any
|
let form: any
|
||||||
let dataForm = new FormData()
|
let dataForm = new FormData()
|
||||||
|
|
||||||
if (piyangoOnayStore.piyangoPanelOnayForm.onayDurumuIslemTipiId !== 4) {
|
if (!shouldKeepIzinFields(piyangoOnayStore.piyangoPanelOnayForm.onayDurumuIslemTipiId)) {
|
||||||
piyangoOnayStore.piyangoPanelOnayForm.izinSayisi = ''
|
piyangoOnayStore.piyangoPanelOnayForm.izinSayisi = ''
|
||||||
piyangoOnayStore.piyangoPanelOnayForm.izinTarihi = ''
|
piyangoOnayStore.piyangoPanelOnayForm.izinTarihi = ''
|
||||||
piyangoOnayStore.piyangoPanelOnayForm.izinAciklamasi = ''
|
piyangoOnayStore.piyangoPanelOnayForm.izinAciklamasi = ''
|
||||||
}
|
}
|
||||||
|
if (piyangoOnayStore.piyangoPanelOnayForm.onayDurumuIslemTipiId !== getKapsamDisiId()) {
|
||||||
|
piyangoOnayStore.piyangoPanelOnayForm.kapsamDisiSebebi = null
|
||||||
|
}
|
||||||
dataForm.append('onayDurumuIslemTipiId', piyangoOnayStore.piyangoPanelOnayForm.onayDurumuIslemTipiId)
|
dataForm.append('onayDurumuIslemTipiId', piyangoOnayStore.piyangoPanelOnayForm.onayDurumuIslemTipiId)
|
||||||
dataForm.append('id', piyangoOnayStore.piyangoPanelOnayForm.id)
|
dataForm.append('id', piyangoOnayStore.piyangoPanelOnayForm.id)
|
||||||
dataForm.append('onayCekilisId', String(piyangoStore.selectedLottery))
|
dataForm.append('onayCekilisId', String(piyangoStore.selectedLottery))
|
||||||
dataForm.append('kisiId', String(usersStore.userId))
|
dataForm.append('kisiId', String(usersStore.userId))
|
||||||
dataForm.append('file', piyangoOnayStore.piyangoPanelOnayForm.file)
|
dataForm.append('file', piyangoOnayStore.piyangoPanelOnayForm.file)
|
||||||
dataForm.append('aciklama', piyangoOnayStore.piyangoPanelOnayForm.aciklama)
|
dataForm.append('aciklama', piyangoOnayStore.piyangoPanelOnayForm.aciklama || '')
|
||||||
dataForm.append('izinSayisi', piyangoOnayStore.piyangoPanelOnayForm.izinSayisi)
|
dataForm.append('izinSayisi', piyangoOnayStore.piyangoPanelOnayForm.izinSayisi || '')
|
||||||
dataForm.append('izinTarihi', piyangoOnayStore.piyangoPanelOnayForm.izinTarihi)
|
dataForm.append('izinTarihi', piyangoOnayStore.piyangoPanelOnayForm.izinTarihi || '')
|
||||||
dataForm.append(
|
dataForm.append(
|
||||||
'izinAciklamasi',
|
'izinAciklamasi',
|
||||||
piyangoOnayStore.piyangoPanelOnayForm.izinAciklamasi
|
piyangoOnayStore.piyangoPanelOnayForm.izinAciklamasi != null
|
||||||
|
? String(piyangoOnayStore.piyangoPanelOnayForm.izinAciklamasi)
|
||||||
|
: ''
|
||||||
|
)
|
||||||
|
dataForm.append(
|
||||||
|
'kapsamDisiSebebi',
|
||||||
|
piyangoOnayStore.piyangoPanelOnayForm.kapsamDisiSebebi != null
|
||||||
|
? String(piyangoOnayStore.piyangoPanelOnayForm.kapsamDisiSebebi)
|
||||||
|
: ''
|
||||||
)
|
)
|
||||||
|
|
||||||
form = await dataStore.dataPut(
|
form = await dataStore.dataPut(
|
||||||
@ -89,7 +127,11 @@ export const usePiyangoOnayService = defineStore('piyangoOnayService', () => {
|
|||||||
)
|
)
|
||||||
|
|
||||||
if (form !== 'errorfalse') {
|
if (form !== 'errorfalse') {
|
||||||
piyangoOnayStore.refreshList = true
|
piyangoOnayStore.refreshList = false
|
||||||
|
setTimeout(() => {
|
||||||
|
piyangoOnayStore.refreshList = true
|
||||||
|
}, 10)
|
||||||
|
piyangoOnayStore.onayFormPanel = false
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
piyangoOnayValidationStore.isPanelFormValid = true
|
piyangoOnayValidationStore.isPanelFormValid = true
|
||||||
|
|||||||
@ -15,7 +15,8 @@ export const usePiyangoOnayStore = defineStore('piyangoOnayStore', () => {
|
|||||||
file: '',
|
file: '',
|
||||||
izinSayisi: '',
|
izinSayisi: '',
|
||||||
izinTarihi: '',
|
izinTarihi: '',
|
||||||
izinAciklamasi: ''
|
izinAciklamasi: '',
|
||||||
|
kapsamDisiSebebi: null
|
||||||
})
|
})
|
||||||
const piyangoOnayForm = reactive<Record<string, any>>({})
|
const piyangoOnayForm = reactive<Record<string, any>>({})
|
||||||
const piyangoPanelOnayForm = reactive<Record<string, any>>({})
|
const piyangoPanelOnayForm = reactive<Record<string, any>>({})
|
||||||
|
|||||||
@ -131,13 +131,41 @@ export const usePiyangoStore = defineStore('piyangoStore', () => {
|
|||||||
Object.assign(lotteryData, baseLotteryData)
|
Object.assign(lotteryData, baseLotteryData)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const GetIslemStatusClass = (statusName: string | undefined): string => {
|
||||||
|
if (!statusName) {
|
||||||
|
return 'islem-status-default'
|
||||||
|
}
|
||||||
|
// Her duruma benzersiz canlı renkler atanıyor
|
||||||
|
const statusMap: Record<string, string> = {
|
||||||
|
'Bilgi/Belge Eksik/Yanlış': 'islem-status-coral',
|
||||||
|
'Üzerinde Çalışılıyor': 'islem-status-amber',
|
||||||
|
'Başvuru İşleme Alındı': 'islem-status-sky',
|
||||||
|
'Başvuru Uygun Görülmedi': 'islem-status-rose',
|
||||||
|
'İzin Öncesi İptal': 'islem-status-pink',
|
||||||
|
'Kapsam Dışı': 'islem-status-slate',
|
||||||
|
'İzin Verildi': 'islem-status-emerald',
|
||||||
|
'Ceza Verildi': 'islem-status-red',
|
||||||
|
'İzin Sonrası İptal': 'islem-status-salmon',
|
||||||
|
'Kampanya Olumlu Bitti': 'islem-status-mint',
|
||||||
|
'Mükerrer Başvuru': 'islem-status-peach',
|
||||||
|
'Bekliyor': 'islem-status-yellow',
|
||||||
|
'Onaylandı': 'islem-status-teal',
|
||||||
|
'Katılımcı Listesi Yüklendi': 'islem-status-cyan',
|
||||||
|
'Düzenleme Bekliyor': 'islem-status-orange',
|
||||||
|
'Ön Kayıt Kabul Edildi': 'islem-status-blue',
|
||||||
|
'Yardım Amaçlı Piyango Son Onay': 'islem-status-gold',
|
||||||
|
'İnceleme Bekleniyor': 'islem-status-lavender',
|
||||||
|
'Yeni Piyango': 'islem-status-violet',
|
||||||
|
'Başvuru Reddedildi': 'islem-status-crimson',
|
||||||
|
'Değişiklik Talep Ediliyor': 'islem-status-indigo'
|
||||||
|
}
|
||||||
|
return statusMap[statusName] || 'islem-status-default'
|
||||||
|
}
|
||||||
|
|
||||||
const LoterryStatusClass = (d: any): string => {
|
const LoterryStatusClass = (d: any): string => {
|
||||||
let cls = lotteryStatusTypes.value.filter((v) => {
|
// Yeni renk sistemini kullan, ama back-grad sınıfı ekle (geriye dönük uyumluluk için)
|
||||||
return v.name === d
|
const statusClass = GetIslemStatusClass(d)
|
||||||
})
|
return 'islem-status-badge ' + statusClass
|
||||||
if (cls !== undefined && cls !== null && cls.length !== 0)
|
|
||||||
return 'back-grad-' + cls[0].class
|
|
||||||
else return 'back-grad-waiting'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const SetLotteryControlData = (data: Record<string, any>) => {
|
const SetLotteryControlData = (data: Record<string, any>) => {
|
||||||
@ -181,6 +209,7 @@ export const usePiyangoStore = defineStore('piyangoStore', () => {
|
|||||||
ResetLotteryData,
|
ResetLotteryData,
|
||||||
ResetLotteryContent,
|
ResetLotteryContent,
|
||||||
LoterryStatusClass,
|
LoterryStatusClass,
|
||||||
|
GetIslemStatusClass,
|
||||||
SetLotteryControlData
|
SetLotteryControlData
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@ -1,13 +1,15 @@
|
|||||||
import { defineStore } from 'pinia'
|
import { defineStore } from 'pinia'
|
||||||
import { ref, reactive } from 'vue'
|
import { ref, reactive, computed } from 'vue'
|
||||||
import { useValidationStore } from '@/stores/validationStore'
|
import { useValidationStore } from '@/stores/validationStore'
|
||||||
import { usePiyangoOnayStore } from '../stores/piyangoOnayStore'
|
import { usePiyangoOnayStore } from '../stores/piyangoOnayStore'
|
||||||
|
import { usePiyangoDataStore } from '../stores/piyangoDataStore'
|
||||||
|
|
||||||
export const usePiyangoOnayValidationStore = defineStore(
|
export const usePiyangoOnayValidationStore = defineStore(
|
||||||
'piyangoOnayValidationStore',
|
'piyangoOnayValidationStore',
|
||||||
() => {
|
() => {
|
||||||
const validationStore = useValidationStore()
|
const validationStore = useValidationStore()
|
||||||
const piyangoOnayStore = usePiyangoOnayStore()
|
const piyangoOnayStore = usePiyangoOnayStore()
|
||||||
|
const piyangoDataStore = usePiyangoDataStore()
|
||||||
|
|
||||||
const formChanged = ref<boolean>(false)
|
const formChanged = ref<boolean>(false)
|
||||||
const isFormValid = ref<boolean>(true)
|
const isFormValid = ref<boolean>(true)
|
||||||
@ -15,6 +17,17 @@ export const usePiyangoOnayValidationStore = defineStore(
|
|||||||
const isPanelFormValid = ref<boolean>(true)
|
const isPanelFormValid = ref<boolean>(true)
|
||||||
const invalidTextsPanel = reactive<Record<string, any>>({})
|
const invalidTextsPanel = reactive<Record<string, any>>({})
|
||||||
|
|
||||||
|
const kapsamDisiId = computed<number | null>(() => {
|
||||||
|
const kapsamDisi = piyangoDataStore.piyangoOnayDurumlari.find(
|
||||||
|
(item: Record<string, any>) => item.tipAdi === 'Kapsam Dışı'
|
||||||
|
)
|
||||||
|
return kapsamDisi ? kapsamDisi.islemId : null
|
||||||
|
})
|
||||||
|
|
||||||
|
const shouldValidateIzinFields = (islemTipiId: number | null): boolean => {
|
||||||
|
return islemTipiId === 4 || islemTipiId === kapsamDisiId.value
|
||||||
|
}
|
||||||
|
|
||||||
const FormCheck = (): boolean => {
|
const FormCheck = (): boolean => {
|
||||||
Object.assign(invalidTexts, {})
|
Object.assign(invalidTexts, {})
|
||||||
|
|
||||||
@ -24,12 +37,12 @@ export const usePiyangoOnayValidationStore = defineStore(
|
|||||||
'onayDurumuIslemTipiId',
|
'onayDurumuIslemTipiId',
|
||||||
'Bir işlem tipi seçmelisinz.'
|
'Bir işlem tipi seçmelisinz.'
|
||||||
)
|
)
|
||||||
if (piyangoOnayStore.piyangoOnayForm.onayDurumuIslemTipiId === 4) {
|
if (shouldValidateIzinFields(piyangoOnayStore.piyangoOnayForm.onayDurumuIslemTipiId)) {
|
||||||
validationStore.IsFieldEmpty(
|
validationStore.IsFieldEmpty(
|
||||||
piyangoOnayStore.piyangoOnayForm,
|
piyangoOnayStore.piyangoOnayForm,
|
||||||
invalidTexts,
|
invalidTexts,
|
||||||
'izinSayisi',
|
'izinSayisi',
|
||||||
'İzin sayı no girmelisiniz.'
|
'İzin sayısı girmelisiniz.'
|
||||||
)
|
)
|
||||||
validationStore.IsFieldEmpty(
|
validationStore.IsFieldEmpty(
|
||||||
piyangoOnayStore.piyangoOnayForm,
|
piyangoOnayStore.piyangoOnayForm,
|
||||||
@ -38,6 +51,14 @@ export const usePiyangoOnayValidationStore = defineStore(
|
|||||||
'İzin tarihi seçmelisiniz.'
|
'İzin tarihi seçmelisiniz.'
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
if (piyangoOnayStore.piyangoOnayForm.onayDurumuIslemTipiId === kapsamDisiId.value) {
|
||||||
|
validationStore.IsFieldEmpty(
|
||||||
|
piyangoOnayStore.piyangoOnayForm,
|
||||||
|
invalidTexts,
|
||||||
|
'kapsamDisiSebebi',
|
||||||
|
'Kapsam dışı sebebi seçmelisiniz.'
|
||||||
|
)
|
||||||
|
}
|
||||||
isFormValid.value = Object.keys(invalidTexts).length === 0
|
isFormValid.value = Object.keys(invalidTexts).length === 0
|
||||||
return isFormValid.value
|
return isFormValid.value
|
||||||
}
|
}
|
||||||
@ -51,12 +72,12 @@ export const usePiyangoOnayValidationStore = defineStore(
|
|||||||
'onayDurumuIslemTipiId',
|
'onayDurumuIslemTipiId',
|
||||||
'Bir işlem tipi seçmelisinz.'
|
'Bir işlem tipi seçmelisinz.'
|
||||||
)
|
)
|
||||||
if (piyangoOnayStore.piyangoPanelOnayForm.onayDurumuIslemTipiId === 4) {
|
if (shouldValidateIzinFields(piyangoOnayStore.piyangoPanelOnayForm.onayDurumuIslemTipiId)) {
|
||||||
validationStore.IsFieldEmpty(
|
validationStore.IsFieldEmpty(
|
||||||
piyangoOnayStore.piyangoPanelOnayForm,
|
piyangoOnayStore.piyangoPanelOnayForm,
|
||||||
invalidTextsPanel,
|
invalidTextsPanel,
|
||||||
'izinSayisi',
|
'izinSayisi',
|
||||||
'İzin sayı no girmelisiniz.'
|
'İzin sayısı girmelisiniz.'
|
||||||
)
|
)
|
||||||
validationStore.IsFieldEmpty(
|
validationStore.IsFieldEmpty(
|
||||||
piyangoOnayStore.piyangoPanelOnayForm,
|
piyangoOnayStore.piyangoPanelOnayForm,
|
||||||
@ -65,6 +86,14 @@ export const usePiyangoOnayValidationStore = defineStore(
|
|||||||
'İzin tarihi seçmelisiniz.'
|
'İzin tarihi seçmelisiniz.'
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
if (piyangoOnayStore.piyangoPanelOnayForm.onayDurumuIslemTipiId === kapsamDisiId.value) {
|
||||||
|
validationStore.IsFieldEmpty(
|
||||||
|
piyangoOnayStore.piyangoPanelOnayForm,
|
||||||
|
invalidTextsPanel,
|
||||||
|
'kapsamDisiSebebi',
|
||||||
|
'Kapsam dışı sebebi seçmelisiniz.'
|
||||||
|
)
|
||||||
|
}
|
||||||
isPanelFormValid.value = Object.keys(invalidTextsPanel).length === 0
|
isPanelFormValid.value = Object.keys(invalidTextsPanel).length === 0
|
||||||
return isPanelFormValid.value
|
return isPanelFormValid.value
|
||||||
}
|
}
|
||||||
|
|||||||
@ -31,6 +31,8 @@
|
|||||||
const dateStore = useDateStore()
|
const dateStore = useDateStore()
|
||||||
import { useUsersStore } from '@/stores/usersStore'
|
import { useUsersStore } from '@/stores/usersStore'
|
||||||
const usersStore = useUsersStore()
|
const usersStore = useUsersStore()
|
||||||
|
import { useGlobalStore } from '@/stores/globalStore'
|
||||||
|
const globalStore = useGlobalStore()
|
||||||
import { usePiyangoStore } from '../stores/piyangoStore'
|
import { usePiyangoStore } from '../stores/piyangoStore'
|
||||||
const piyangoStore = usePiyangoStore()
|
const piyangoStore = usePiyangoStore()
|
||||||
import { usePiyangoDataStore } from '../stores/piyangoDataStore'
|
import { usePiyangoDataStore } from '../stores/piyangoDataStore'
|
||||||
@ -68,128 +70,297 @@
|
|||||||
const tableHeader = computed<Record<string, any>[]>(() => {
|
const tableHeader = computed<Record<string, any>[]>(() => {
|
||||||
let header: Record<string, any>[] = []
|
let header: Record<string, any>[] = []
|
||||||
|
|
||||||
|
// 1. PİYANGO ID
|
||||||
header.push({
|
header.push({
|
||||||
name: 'piyangoId',
|
name: 'piyangoId',
|
||||||
title: 'Piyango Id',
|
title: 'Piyango ID',
|
||||||
sort: true,
|
sort: true,
|
||||||
style: { width: '10%' }
|
style: { width: '10%' }
|
||||||
})
|
})
|
||||||
|
|
||||||
if (usersStore.isAraciFirma || usersStore.isPanelUser) {
|
// 2. MÜDÜRLÜK
|
||||||
header.push({ name: 'duzenleyen', title: 'Düzenleyen' })
|
header.push({
|
||||||
}
|
name: 'mudurluk',
|
||||||
|
title: 'Müdürlük',
|
||||||
header.push(
|
compute: (v: Record<string, any>): string => {
|
||||||
{
|
return v.mudurluk || ''
|
||||||
name: 'baslik',
|
|
||||||
title: 'Başlık',
|
|
||||||
sort: true,
|
|
||||||
style: { width: '15%' }
|
|
||||||
},
|
},
|
||||||
{
|
filter: {
|
||||||
name: 'piyangoamac',
|
type: 'text'
|
||||||
title: 'Piyango Amacı',
|
|
||||||
sort: true,
|
|
||||||
filter: {
|
|
||||||
type: 'select',
|
|
||||||
data: piyangoAmaclari.value,
|
|
||||||
listVal: 'id',
|
|
||||||
listText: 'amacAdi',
|
|
||||||
filterId: 'piyangoAmacId'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'olusturmaTarihi',
|
|
||||||
title: 'Oluşturulma Tarihi',
|
|
||||||
compute: (v: Record<string, any>): string => {
|
|
||||||
return dateStore.dateFormat({ date: v.olusturmaTarihi })
|
|
||||||
},
|
|
||||||
sort: true,
|
|
||||||
filter: {
|
|
||||||
type: 'date',
|
|
||||||
between: true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
)
|
})
|
||||||
|
|
||||||
if (usersStore.isVakifDernek || usersStore.isPanelUser) {
|
// 3. PİYANGO AMACI
|
||||||
|
header.push({
|
||||||
|
name: 'piyangoamac',
|
||||||
|
title: 'Piyango Amacı',
|
||||||
|
sort: true,
|
||||||
|
filter: {
|
||||||
|
type: 'select',
|
||||||
|
data: piyangoAmaclari.value,
|
||||||
|
listVal: 'id',
|
||||||
|
listText: 'amacAdi',
|
||||||
|
filterId: 'piyangoAmacId'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
// 4. DÜZENLEYEN (koşullu)
|
||||||
|
if (usersStore.isAraciFirma || usersStore.isPanelUser) {
|
||||||
header.push({
|
header.push({
|
||||||
name: 'cekilisTarihi',
|
name: 'duzenleyen',
|
||||||
title: 'Çekiliş Tarihi',
|
title: 'Düzenleyen',
|
||||||
compute: (v: Record<string, any>): string => {
|
|
||||||
if (v.piyangoAmacId === 3) return ''
|
|
||||||
else return dateStore.dateFormat({ date: v.cekilisTarihi })
|
|
||||||
},
|
|
||||||
sort: true,
|
|
||||||
filter: {
|
filter: {
|
||||||
type: 'date',
|
type: 'text'
|
||||||
between: true
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
if (!usersStore.isVakifDernek || usersStore.isPanelUser) {
|
|
||||||
header.push(
|
|
||||||
{
|
|
||||||
name: 'baslangicTarihi',
|
|
||||||
title: 'Başlangıç Tarihi',
|
|
||||||
compute: (v: Record<string, any>): string => {
|
|
||||||
if (v.baslangicTarihi.includes('0001-')) return ''
|
|
||||||
else return dateStore.dateFormat({ date: v.baslangicTarihi })
|
|
||||||
},
|
|
||||||
sort: true,
|
|
||||||
filter: {
|
|
||||||
type: 'date',
|
|
||||||
between: true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'bitisTarihi',
|
|
||||||
title: 'Bitis Tarihi',
|
|
||||||
compute: (v: Record<string, any>): string => {
|
|
||||||
if (v.bitisTarihi.includes('0001-')) return ''
|
|
||||||
else return dateStore.dateFormat({ date: v.bitisTarihi })
|
|
||||||
},
|
|
||||||
sort: true,
|
|
||||||
filter: {
|
|
||||||
type: 'date',
|
|
||||||
between: true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
header.push(
|
// 5. ARACI FİRMA
|
||||||
{
|
header.push({
|
||||||
name: 'cekilisYontemi',
|
name: 'araciFirma',
|
||||||
title: 'Çekiliş Yöntemi',
|
title: 'Araci Firma',
|
||||||
sort: true,
|
compute: (v: Record<string, any>): string => {
|
||||||
filter: {
|
return v.araciFirma || ''
|
||||||
type: 'select',
|
|
||||||
data: cekilisYontemleri.value,
|
|
||||||
listVal: 'id',
|
|
||||||
listText: 'deger',
|
|
||||||
filterId: 'cekilisYontemiId'
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{ name: 'ikramiyeler', title: 'İkramiyeler', style: { width: '15%' } },
|
filter: {
|
||||||
{
|
type: 'text'
|
||||||
name: 'durum',
|
|
||||||
title: 'Durum',
|
|
||||||
style: { width: '10%' },
|
|
||||||
computeHtml: (v: Record<string, any>): string => {
|
|
||||||
return `<span class="back-grad ${piyangoStore.LoterryStatusClass(v.durum)}">
|
|
||||||
${v.durum}
|
|
||||||
</span>`
|
|
||||||
},
|
|
||||||
filter: {
|
|
||||||
type: 'select',
|
|
||||||
data: piyangoOnayDurumlari.value,
|
|
||||||
listVal: 'id',
|
|
||||||
listText: 'tipAdi',
|
|
||||||
filterId: 'durumId'
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
)
|
})
|
||||||
|
|
||||||
|
// 6. DURUM
|
||||||
|
header.push({
|
||||||
|
name: 'durum',
|
||||||
|
title: 'Durum',
|
||||||
|
style: { width: '10%' },
|
||||||
|
computeHtml: (v: Record<string, any>): string => {
|
||||||
|
return `<span class="${piyangoStore.LoterryStatusClass(v.durum)}">
|
||||||
|
${v.durum}
|
||||||
|
</span>`
|
||||||
|
},
|
||||||
|
filter: {
|
||||||
|
type: 'select',
|
||||||
|
data: piyangoOnayDurumlari.value,
|
||||||
|
listVal: 'id',
|
||||||
|
listText: 'tipAdi',
|
||||||
|
filterId: 'durumId'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
// 7. İZİN TARİHİ
|
||||||
|
header.push({
|
||||||
|
name: 'izinTarihi',
|
||||||
|
title: 'İzin Tarihi',
|
||||||
|
compute: (v: Record<string, any>): string => {
|
||||||
|
if (!v.izinTarihi || v.izinTarihi === null) return ''
|
||||||
|
return dateStore.dateFormat({ date: v.izinTarihi })
|
||||||
|
},
|
||||||
|
sort: true,
|
||||||
|
filter: {
|
||||||
|
type: 'date',
|
||||||
|
between: true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
// 8. İZİN SAYISI
|
||||||
|
header.push({
|
||||||
|
name: 'izinSayisi',
|
||||||
|
title: 'İzin Sayısı',
|
||||||
|
compute: (v: Record<string, any>): string => {
|
||||||
|
return v.izinSayisi || ''
|
||||||
|
},
|
||||||
|
sort: true,
|
||||||
|
filter: {
|
||||||
|
type: 'text',
|
||||||
|
range: true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
// 9. BAŞLANGIÇ TARİHİ
|
||||||
|
header.push({
|
||||||
|
name: 'baslangicTarihi',
|
||||||
|
title: 'Başlangıç Tarihi',
|
||||||
|
compute: (v: Record<string, any>): string => {
|
||||||
|
if (!v.baslangicTarihi || v.baslangicTarihi.includes('0001-')) return ''
|
||||||
|
return dateStore.dateFormat({ date: v.baslangicTarihi })
|
||||||
|
},
|
||||||
|
sort: true,
|
||||||
|
filter: {
|
||||||
|
type: 'date',
|
||||||
|
between: true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
// 10. BİTİŞ TARİHİ
|
||||||
|
header.push({
|
||||||
|
name: 'bitisTarihi',
|
||||||
|
title: 'Bitiş Tarihi',
|
||||||
|
compute: (v: Record<string, any>): string => {
|
||||||
|
if (!v.bitisTarihi || v.bitisTarihi.includes('0001-')) return ''
|
||||||
|
return dateStore.dateFormat({ date: v.bitisTarihi })
|
||||||
|
},
|
||||||
|
sort: true,
|
||||||
|
filter: {
|
||||||
|
type: 'date',
|
||||||
|
between: true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
// 11. ÇEKİLİŞ TARİHİ
|
||||||
|
header.push({
|
||||||
|
name: 'cekilisTarihi',
|
||||||
|
title: 'Çekiliş Tarihi',
|
||||||
|
compute: (v: Record<string, any>): string => {
|
||||||
|
if (!v.cekilisTarihi || v.cekilisTarihi.includes('0001-')) return ''
|
||||||
|
if (v.piyangoAmacId === 3) return ''
|
||||||
|
return dateStore.dateFormat({ date: v.cekilisTarihi })
|
||||||
|
},
|
||||||
|
sort: true,
|
||||||
|
filter: {
|
||||||
|
type: 'date',
|
||||||
|
between: true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
// 12. ÇEKİLİŞ GÖREVLİSİ
|
||||||
|
header.push({
|
||||||
|
name: 'cekilisGorevlisi',
|
||||||
|
title: 'Çekiliş Görevlisi',
|
||||||
|
compute: (v: Record<string, any>): string => {
|
||||||
|
return v.cekilisGorevlisi || ''
|
||||||
|
},
|
||||||
|
filter: {
|
||||||
|
type: 'text'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
// 13. GAZETE İLAN TARİHİ
|
||||||
|
header.push({
|
||||||
|
name: 'gazeteIlanTarihi',
|
||||||
|
title: 'Gazete İlan Tarihi',
|
||||||
|
compute: (v: Record<string, any>): string => {
|
||||||
|
if (!v.gazeteIlanTarihi || v.gazeteIlanTarihi === null) return ''
|
||||||
|
return dateStore.dateFormat({ date: v.gazeteIlanTarihi })
|
||||||
|
},
|
||||||
|
sort: true,
|
||||||
|
filter: {
|
||||||
|
type: 'date',
|
||||||
|
between: true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
// 14. GAZETE ADI
|
||||||
|
header.push({
|
||||||
|
name: 'gazeteAdi',
|
||||||
|
title: 'Gazete Adı',
|
||||||
|
compute: (v: Record<string, any>): string => {
|
||||||
|
return v.gazeteAdi || ''
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
// 15. İZİN BEDELİ
|
||||||
|
header.push({
|
||||||
|
name: 'izinBedeliTutari',
|
||||||
|
title: 'İzin Bedeli',
|
||||||
|
compute: (v: Record<string, any>): string => {
|
||||||
|
if (v.izinBedeliTutari === null || v.izinBedeliTutari === undefined) return ''
|
||||||
|
return globalStore.toTrLocale(v.izinBedeliTutari)
|
||||||
|
},
|
||||||
|
sort: true
|
||||||
|
})
|
||||||
|
|
||||||
|
// 16. İKRAMİYE TUTARI
|
||||||
|
header.push({
|
||||||
|
name: 'ikramiyeTutari',
|
||||||
|
title: 'İkramiye Tutarı',
|
||||||
|
compute: (v: Record<string, any>): string => {
|
||||||
|
if (v.ikramiyeTutari === null || v.ikramiyeTutari === undefined) return ''
|
||||||
|
return globalStore.toTrLocale(v.ikramiyeTutari)
|
||||||
|
},
|
||||||
|
sort: true
|
||||||
|
})
|
||||||
|
|
||||||
|
// 17. TEMİNAT TARİHİ
|
||||||
|
header.push({
|
||||||
|
name: 'teminatTarihi',
|
||||||
|
title: 'Teminat Tarihi',
|
||||||
|
compute: (v: Record<string, any>): string => {
|
||||||
|
if (!v.teminatTarihi || v.teminatTarihi === null) return ''
|
||||||
|
return dateStore.dateFormat({ date: v.teminatTarihi })
|
||||||
|
},
|
||||||
|
sort: true
|
||||||
|
})
|
||||||
|
|
||||||
|
// 18. TEMİNAT SAYISI
|
||||||
|
header.push({
|
||||||
|
name: 'teminatSayisi',
|
||||||
|
title: 'Teminat Sayısı',
|
||||||
|
compute: (v: Record<string, any>): string => {
|
||||||
|
return v.teminatSayisi || ''
|
||||||
|
},
|
||||||
|
sort: true
|
||||||
|
})
|
||||||
|
|
||||||
|
// 19. TEMİNAT BANKASI
|
||||||
|
header.push({
|
||||||
|
name: 'teminatBankasi',
|
||||||
|
title: 'Teminat Bankası',
|
||||||
|
compute: (v: Record<string, any>): string => {
|
||||||
|
return v.teminatBankasi || ''
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
// 20. TEMİNAT TUTARI
|
||||||
|
header.push({
|
||||||
|
name: 'teminatTutari',
|
||||||
|
title: 'Teminat Tutarı',
|
||||||
|
compute: (v: Record<string, any>): string => {
|
||||||
|
if (v.teminatTutari === null || v.teminatTutari === undefined) return ''
|
||||||
|
return globalStore.toTrLocale(v.teminatTutari)
|
||||||
|
},
|
||||||
|
sort: true
|
||||||
|
})
|
||||||
|
|
||||||
|
// 21. T. PARA CİNSİ
|
||||||
|
header.push({
|
||||||
|
name: 'paraBirimiSembol',
|
||||||
|
title: 'T. Para Cinsi',
|
||||||
|
compute: (v: Record<string, any>): string => {
|
||||||
|
return v.paraBirimiSembol || ''
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
// 22. T. İADE TARİHİ
|
||||||
|
header.push({
|
||||||
|
name: 'teminatIadeTarihi',
|
||||||
|
title: 'T. İade Tarihi',
|
||||||
|
compute: (v: Record<string, any>): string => {
|
||||||
|
if (!v.teminatIadeTarihi || v.teminatIadeTarihi === null) return ''
|
||||||
|
return dateStore.dateFormat({ date: v.teminatIadeTarihi })
|
||||||
|
},
|
||||||
|
sort: true
|
||||||
|
})
|
||||||
|
|
||||||
|
// 23. T. İADE SAYISI
|
||||||
|
header.push({
|
||||||
|
name: 'teminatIadeSayisi',
|
||||||
|
title: 'T. İade Sayısı',
|
||||||
|
compute: (v: Record<string, any>): string => {
|
||||||
|
return v.teminatIadeSayisi || ''
|
||||||
|
},
|
||||||
|
sort: true
|
||||||
|
})
|
||||||
|
|
||||||
|
// 24. İKRAMİYELER
|
||||||
|
header.push({
|
||||||
|
name: 'ikramiyeler',
|
||||||
|
title: 'İkramiyeler',
|
||||||
|
style: { width: '15%' },
|
||||||
|
compute: (v: Record<string, any>): string => {
|
||||||
|
return v.ikramiyeler || ''
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
// Panel User için ek sütunlar
|
||||||
if (usersStore.isPanelUser) {
|
if (usersStore.isPanelUser) {
|
||||||
header.push({
|
header.push({
|
||||||
name: 'atanmis',
|
name: 'atanmis',
|
||||||
@ -197,17 +368,15 @@
|
|||||||
computeHtml: (v: Record<string, any>): string => {
|
computeHtml: (v: Record<string, any>): string => {
|
||||||
if (v.atanmis) {
|
if (v.atanmis) {
|
||||||
return `<strong class="back-grad back-grad-sevk-ok">
|
return `<strong class="back-grad back-grad-sevk-ok">
|
||||||
${v.atananlar}
|
${v.atananlar}
|
||||||
</strong>`
|
</strong>`
|
||||||
} else {
|
} else {
|
||||||
return `<span class="back-grad back-grad-sevk">
|
return `<span class="back-grad back-grad-sevk">
|
||||||
Sevk Edilmemiş</span>`
|
Sevk Edilmemiş</span>`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
|
||||||
|
|
||||||
if (usersStore.isPanelUser) {
|
|
||||||
header.push({
|
header.push({
|
||||||
name: 'basvuruBedelNo',
|
name: 'basvuruBedelNo',
|
||||||
title: 'Muhasebeleştirme Durumu',
|
title: 'Muhasebeleştirme Durumu',
|
||||||
@ -215,16 +384,17 @@
|
|||||||
let durum = ''
|
let durum = ''
|
||||||
if (v.basvuruBedelNo !== null) {
|
if (v.basvuruBedelNo !== null) {
|
||||||
durum += `<strong">Başvuru Bedel No: </strong>
|
durum += `<strong">Başvuru Bedel No: </strong>
|
||||||
${v.basvuruBedelNo}<br>`
|
${v.basvuruBedelNo}<br>`
|
||||||
}
|
}
|
||||||
if (v.izinBedelNo !== null) {
|
if (v.izinBedelNo !== null) {
|
||||||
durum += `<strong">İzin Bedel No: </strong>
|
durum += `<strong">İzin Bedel No: </strong>
|
||||||
${v.izinBedelNo}`
|
${v.izinBedelNo}`
|
||||||
}
|
}
|
||||||
return durum
|
return durum
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
return header
|
return header
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@ -134,7 +134,7 @@
|
|||||||
name: 'durum',
|
name: 'durum',
|
||||||
title: 'Durum',
|
title: 'Durum',
|
||||||
computeHtml: (v: Record<string, any>): string => {
|
computeHtml: (v: Record<string, any>): string => {
|
||||||
return `<span class='back-grad ${piyangoStore.LoterryStatusClass(v.durum)}'>
|
return `<span class='${piyangoStore.LoterryStatusClass(v.durum)}'>
|
||||||
${v.durum}
|
${v.durum}
|
||||||
</span>`
|
</span>`
|
||||||
},
|
},
|
||||||
|
|||||||
@ -24,6 +24,8 @@
|
|||||||
const dateStore = useDateStore()
|
const dateStore = useDateStore()
|
||||||
import { useUsersStore } from '@/stores/usersStore'
|
import { useUsersStore } from '@/stores/usersStore'
|
||||||
const usersStore = useUsersStore()
|
const usersStore = useUsersStore()
|
||||||
|
import { useGlobalStore } from '@/stores/globalStore'
|
||||||
|
const globalStore = useGlobalStore()
|
||||||
import { usePiyangoStore } from '@/module/cekilisler/stores/piyangoStore'
|
import { usePiyangoStore } from '@/module/cekilisler/stores/piyangoStore'
|
||||||
const piyangoStore = usePiyangoStore()
|
const piyangoStore = usePiyangoStore()
|
||||||
import { usePiyangoDataStore } from '@/module/cekilisler/stores/piyangoDataStore'
|
import { usePiyangoDataStore } from '@/module/cekilisler/stores/piyangoDataStore'
|
||||||
@ -50,156 +52,310 @@
|
|||||||
const tableHeader = computed<Record<string, any>[]>(() => {
|
const tableHeader = computed<Record<string, any>[]>(() => {
|
||||||
let header: Record<string, any>[] = []
|
let header: Record<string, any>[] = []
|
||||||
|
|
||||||
|
// 1. PİYANGO ID
|
||||||
|
header.push({
|
||||||
|
name: 'piyangoId',
|
||||||
|
title: 'Piyango ID',
|
||||||
|
sort: true,
|
||||||
|
style: { width: '10%' }
|
||||||
|
})
|
||||||
|
|
||||||
|
// 2. MÜDÜRLÜK
|
||||||
|
header.push({
|
||||||
|
name: 'mudurluk',
|
||||||
|
title: 'Müdürlük',
|
||||||
|
compute: (v: Record<string, any>): string => {
|
||||||
|
return v.mudurluk || ''
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
// 3. PİYANGO AMACI
|
||||||
|
header.push({
|
||||||
|
name: 'piyangoamac',
|
||||||
|
title: 'Piyango Amacı',
|
||||||
|
sort: true,
|
||||||
|
filter: {
|
||||||
|
type: 'select',
|
||||||
|
data: piyangoAmaclari.value,
|
||||||
|
listVal: 'id',
|
||||||
|
listText: 'amacAdi',
|
||||||
|
filterId: 'piyangoAmacId'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
// 4. DÜZENLEYEN (koşullu)
|
||||||
if (usersStore.isAraciFirma || usersStore.isPanelUser) {
|
if (usersStore.isAraciFirma || usersStore.isPanelUser) {
|
||||||
header.push({ name: 'duzenleyen', title: 'Düzenleyen' })
|
header.push({ name: 'duzenleyen', title: 'Düzenleyen' })
|
||||||
}
|
}
|
||||||
|
|
||||||
header.push(
|
// 5. ARACI FİRMA
|
||||||
{
|
header.push({
|
||||||
name: 'piyangoId',
|
name: 'araciFirma',
|
||||||
title: 'Piyango ID',
|
title: 'Araci Firma',
|
||||||
sort: true,
|
compute: (v: Record<string, any>): string => {
|
||||||
style: { width: '10%' }
|
return v.araciFirma || ''
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
// 6. DURUM
|
||||||
|
header.push({
|
||||||
|
name: 'durum',
|
||||||
|
title: 'Durum',
|
||||||
|
style: { width: '10%' },
|
||||||
|
computeHtml: (v: Record<string, any>): string => {
|
||||||
|
return `<span class="${piyangoStore.LoterryStatusClass(v.durum)}">
|
||||||
|
${v.durum}
|
||||||
|
</span>`
|
||||||
},
|
},
|
||||||
{
|
filter: {
|
||||||
name: 'baslik',
|
type: 'select',
|
||||||
title: 'Başlık',
|
data: piyangoOnayDurumlari.value,
|
||||||
sort: true,
|
listVal: 'id',
|
||||||
style: { width: '15%' }
|
listText: 'tipAdi',
|
||||||
|
filterId: 'durumId'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
// 7. İZİN TARİHİ
|
||||||
|
header.push({
|
||||||
|
name: 'izinTarihi',
|
||||||
|
title: 'İzin Tarihi',
|
||||||
|
compute: (v: Record<string, any>): string => {
|
||||||
|
if (!v.izinTarihi || v.izinTarihi === null) return ''
|
||||||
|
return dateStore.dateFormat({ date: v.izinTarihi })
|
||||||
},
|
},
|
||||||
{
|
sort: true,
|
||||||
name: 'piyangoamac',
|
filter: {
|
||||||
title: 'Piyango Amacı',
|
type: 'date',
|
||||||
sort: true,
|
between: true
|
||||||
filter: {
|
}
|
||||||
type: 'select',
|
})
|
||||||
data: piyangoAmaclari.value,
|
|
||||||
listVal: 'id',
|
// 8. İZİN SAYISI
|
||||||
listText: 'amacAdi',
|
header.push({
|
||||||
filterId: 'piyangoAmacId'
|
name: 'izinSayisi',
|
||||||
}
|
title: 'İzin Sayısı',
|
||||||
|
compute: (v: Record<string, any>): string => {
|
||||||
|
return v.izinSayisi || ''
|
||||||
},
|
},
|
||||||
{
|
sort: true
|
||||||
name: 'olusturmaTarihi',
|
})
|
||||||
title: 'Oluşturulma Tarihi',
|
|
||||||
compute: (v: Record<string, any>): string => {
|
// 9. BAŞLANGIÇ TARİHİ
|
||||||
return dateStore.dateFormat({ date: v.olusturmaTarihi })
|
header.push({
|
||||||
},
|
name: 'baslangicTarihi',
|
||||||
sort: true,
|
title: 'Başlangıç Tarihi',
|
||||||
filter: {
|
compute: (v: Record<string, any>): string => {
|
||||||
type: 'date',
|
if (!v.baslangicTarihi || v.baslangicTarihi.includes('0001-')) return ''
|
||||||
between: true
|
return dateStore.dateFormat({ date: v.baslangicTarihi })
|
||||||
|
},
|
||||||
|
sort: true,
|
||||||
|
filter: {
|
||||||
|
type: 'date',
|
||||||
|
between: true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
// 10. BİTİŞ TARİHİ
|
||||||
|
header.push({
|
||||||
|
name: 'bitisTarihi',
|
||||||
|
title: 'Bitiş Tarihi',
|
||||||
|
compute: (v: Record<string, any>): string => {
|
||||||
|
if (!v.bitisTarihi || v.bitisTarihi.includes('0001-')) return ''
|
||||||
|
return dateStore.dateFormat({ date: v.bitisTarihi })
|
||||||
|
},
|
||||||
|
sort: true,
|
||||||
|
filter: {
|
||||||
|
type: 'date',
|
||||||
|
between: true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
// 11. ÇEKİLİŞ TARİHİ
|
||||||
|
header.push({
|
||||||
|
name: 'cekilisTarihi',
|
||||||
|
title: 'Çekiliş Tarihi',
|
||||||
|
compute: (v: Record<string, any>): string => {
|
||||||
|
if (!v.cekilisTarihi || v.cekilisTarihi.includes('0001-')) return ''
|
||||||
|
if (v.piyangoAmacId === 3) return ''
|
||||||
|
return dateStore.dateFormat({ date: v.cekilisTarihi })
|
||||||
|
},
|
||||||
|
sort: true,
|
||||||
|
filter: {
|
||||||
|
type: 'date',
|
||||||
|
between: true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
// 12. ÇEKİLİŞ GÖREVLİSİ
|
||||||
|
header.push({
|
||||||
|
name: 'cekilisGorevlisi',
|
||||||
|
title: 'Çekiliş Görevlisi',
|
||||||
|
compute: (v: Record<string, any>): string => {
|
||||||
|
return v.cekilisGorevlisi || ''
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
// 13. GAZETE İLAN TARİHİ
|
||||||
|
header.push({
|
||||||
|
name: 'gazeteIlanTarihi',
|
||||||
|
title: 'Gazete İlan Tarihi',
|
||||||
|
compute: (v: Record<string, any>): string => {
|
||||||
|
if (!v.gazeteIlanTarihi || v.gazeteIlanTarihi === null) return ''
|
||||||
|
return dateStore.dateFormat({ date: v.gazeteIlanTarihi })
|
||||||
|
},
|
||||||
|
sort: true,
|
||||||
|
filter: {
|
||||||
|
type: 'date',
|
||||||
|
between: true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
// 14. GAZETE ADI
|
||||||
|
header.push({
|
||||||
|
name: 'gazeteAdi',
|
||||||
|
title: 'Gazete Adı',
|
||||||
|
compute: (v: Record<string, any>): string => {
|
||||||
|
return v.gazeteAdi || ''
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
// 15. İZİN BEDELİ
|
||||||
|
header.push({
|
||||||
|
name: 'izinBedeliTutari',
|
||||||
|
title: 'İzin Bedeli',
|
||||||
|
compute: (v: Record<string, any>): string => {
|
||||||
|
if (v.izinBedeliTutari === null || v.izinBedeliTutari === undefined) return ''
|
||||||
|
return globalStore.toTrLocale(v.izinBedeliTutari)
|
||||||
|
},
|
||||||
|
sort: true
|
||||||
|
})
|
||||||
|
|
||||||
|
// 16. İKRAMİYE TUTARI
|
||||||
|
header.push({
|
||||||
|
name: 'ikramiyeTutari',
|
||||||
|
title: 'İkramiye Tutarı',
|
||||||
|
compute: (v: Record<string, any>): string => {
|
||||||
|
if (v.ikramiyeTutari === null || v.ikramiyeTutari === undefined) return ''
|
||||||
|
return globalStore.toTrLocale(v.ikramiyeTutari)
|
||||||
|
},
|
||||||
|
sort: true
|
||||||
|
})
|
||||||
|
|
||||||
|
// 17. TEMİNAT TARİHİ
|
||||||
|
header.push({
|
||||||
|
name: 'teminatTarihi',
|
||||||
|
title: 'Teminat Tarihi',
|
||||||
|
compute: (v: Record<string, any>): string => {
|
||||||
|
if (!v.teminatTarihi || v.teminatTarihi === null) return ''
|
||||||
|
return dateStore.dateFormat({ date: v.teminatTarihi })
|
||||||
|
},
|
||||||
|
sort: true
|
||||||
|
})
|
||||||
|
|
||||||
|
// 18. TEMİNAT SAYISI
|
||||||
|
header.push({
|
||||||
|
name: 'teminatSayisi',
|
||||||
|
title: 'Teminat Sayısı',
|
||||||
|
compute: (v: Record<string, any>): string => {
|
||||||
|
return v.teminatSayisi || ''
|
||||||
|
},
|
||||||
|
sort: true
|
||||||
|
})
|
||||||
|
|
||||||
|
// 19. TEMİNAT BANKASI
|
||||||
|
header.push({
|
||||||
|
name: 'teminatBankasi',
|
||||||
|
title: 'Teminat Bankası',
|
||||||
|
compute: (v: Record<string, any>): string => {
|
||||||
|
return v.teminatBankasi || ''
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
// 20. TEMİNAT TUTARI
|
||||||
|
header.push({
|
||||||
|
name: 'teminatTutari',
|
||||||
|
title: 'Teminat Tutarı',
|
||||||
|
compute: (v: Record<string, any>): string => {
|
||||||
|
if (v.teminatTutari === null || v.teminatTutari === undefined) return ''
|
||||||
|
return globalStore.toTrLocale(v.teminatTutari)
|
||||||
|
},
|
||||||
|
sort: true
|
||||||
|
})
|
||||||
|
|
||||||
|
// 21. T. PARA CİNSİ
|
||||||
|
header.push({
|
||||||
|
name: 'paraBirimiSembol',
|
||||||
|
title: 'T. Para Cinsi',
|
||||||
|
compute: (v: Record<string, any>): string => {
|
||||||
|
return v.paraBirimiSembol || ''
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
// 22. T. İADE TARİHİ
|
||||||
|
header.push({
|
||||||
|
name: 'teminatIadeTarihi',
|
||||||
|
title: 'T. İade Tarihi',
|
||||||
|
compute: (v: Record<string, any>): string => {
|
||||||
|
if (!v.teminatIadeTarihi || v.teminatIadeTarihi === null) return ''
|
||||||
|
return dateStore.dateFormat({ date: v.teminatIadeTarihi })
|
||||||
|
},
|
||||||
|
sort: true
|
||||||
|
})
|
||||||
|
|
||||||
|
// 23. T. İADE SAYISI
|
||||||
|
header.push({
|
||||||
|
name: 'teminatIadeSayisi',
|
||||||
|
title: 'T. İade Sayısı',
|
||||||
|
compute: (v: Record<string, any>): string => {
|
||||||
|
return v.teminatIadeSayisi || ''
|
||||||
|
},
|
||||||
|
sort: true
|
||||||
|
})
|
||||||
|
|
||||||
|
// 24. İKRAMİYELER
|
||||||
|
header.push({
|
||||||
|
name: 'ikramiyeler',
|
||||||
|
title: 'İkramiyeler',
|
||||||
|
style: { width: '15%' },
|
||||||
|
compute: (v: Record<string, any>): string => {
|
||||||
|
return v.ikramiyeler || ''
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
// Muhasebe özel sütunlar
|
||||||
|
header.push({
|
||||||
|
name: 'atanmis',
|
||||||
|
title: 'Sevk Durumu',
|
||||||
|
computeHtml: (v: Record<string, any>): string => {
|
||||||
|
if (v.atanmis) {
|
||||||
|
return `<strong class="back-grad back-grad-sevk-ok">
|
||||||
|
${v.atananlar}
|
||||||
|
</strong>`
|
||||||
|
} else {
|
||||||
|
return `<span class="back-grad back-grad-sevk">
|
||||||
|
Sevk Edilmemiş</span>`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
)
|
})
|
||||||
|
|
||||||
if (usersStore.isVakifDernek || usersStore.isPanelUser) {
|
header.push({
|
||||||
header.push({
|
name: 'basvuruBedelNo',
|
||||||
name: 'cekilisTarihi',
|
title: 'Muhasebeleştirme Durumu',
|
||||||
title: 'Çekiliş Tarihi',
|
computeHtml: (v: Record<string, any>): string => {
|
||||||
compute: (v: Record<string, any>): string => {
|
let durum = ''
|
||||||
return dateStore.dateFormat({ date: v.cekilisTarihi })
|
if (v.basvuruBedelNo !== null) {
|
||||||
},
|
durum += `<strong">Başvuru Bedel No: </strong>
|
||||||
sort: true,
|
${v.basvuruBedelNo}<br>`
|
||||||
filter: {
|
|
||||||
type: 'date',
|
|
||||||
between: true
|
|
||||||
}
|
}
|
||||||
})
|
if (v.izinBedelNo !== null) {
|
||||||
}
|
durum += `<strong">İzin Bedel No: </strong>
|
||||||
if (!usersStore.isVakifDernek || usersStore.isPanelUser) {
|
${v.izinBedelNo}`
|
||||||
header.push(
|
|
||||||
{
|
|
||||||
name: 'baslangicTarihi',
|
|
||||||
title: 'Başlangıç Tarihi',
|
|
||||||
compute: (v: Record<string, any>): string => {
|
|
||||||
if (v.baslangicTarihi.includes('0001-')) return ''
|
|
||||||
else return dateStore.dateFormat({ date: v.baslangicTarihi })
|
|
||||||
},
|
|
||||||
sort: true,
|
|
||||||
filter: {
|
|
||||||
type: 'date',
|
|
||||||
between: true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'bitisTarihi',
|
|
||||||
title: 'Bitis Tarihi',
|
|
||||||
compute: (v: Record<string, any>): string => {
|
|
||||||
if (v.bitisTarihi.includes('0001-')) return ''
|
|
||||||
else return dateStore.dateFormat({ date: v.bitisTarihi })
|
|
||||||
},
|
|
||||||
sort: true,
|
|
||||||
filter: {
|
|
||||||
type: 'date',
|
|
||||||
between: true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
header.push(
|
|
||||||
{
|
|
||||||
name: 'cekilisYontemi',
|
|
||||||
title: 'Çekiliş Yöntemi',
|
|
||||||
sort: true,
|
|
||||||
filter: {
|
|
||||||
type: 'select',
|
|
||||||
data: cekilisYontemleri.value,
|
|
||||||
listVal: 'id',
|
|
||||||
listText: 'deger',
|
|
||||||
filterId: 'cekilisYontemiId'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{ name: 'ikramiyeler', title: 'İkramiyeler', style: { width: '15%' } },
|
|
||||||
{
|
|
||||||
name: 'durum',
|
|
||||||
title: 'Durum',
|
|
||||||
style: { width: '10%' },
|
|
||||||
computeHtml: (v: Record<string, any>): string => {
|
|
||||||
return `<span class="back-grad ${piyangoStore.LoterryStatusClass(v.durum)}">
|
|
||||||
${v.durum}
|
|
||||||
</span>`
|
|
||||||
},
|
|
||||||
filter: {
|
|
||||||
type: 'select',
|
|
||||||
data: piyangoOnayDurumlari.value,
|
|
||||||
listVal: 'id',
|
|
||||||
listText: 'tipAdi',
|
|
||||||
filterId: 'durumId'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'atanmis',
|
|
||||||
title: 'Sevk Durumu',
|
|
||||||
computeHtml: (v: Record<string, any>): string => {
|
|
||||||
if (v.atanmis) {
|
|
||||||
return `<strong class="back-grad back-grad-sevk-ok">
|
|
||||||
${v.atananlar}
|
|
||||||
</strong>`
|
|
||||||
} else {
|
|
||||||
return `<span class="back-grad back-grad-sevk">
|
|
||||||
Sevk Edilmemiş</span>`
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'basvuruBedelNo',
|
|
||||||
title: 'Muhasebeleştirme Durumu',
|
|
||||||
computeHtml: (v: Record<string, any>): string => {
|
|
||||||
let durum = ''
|
|
||||||
if (v.basvuruBedelNo !== null) {
|
|
||||||
durum += `<strong">Başvuru Bedel No: </strong>
|
|
||||||
${v.basvuruBedelNo}<br>`
|
|
||||||
}
|
|
||||||
if (v.izinBedelNo !== null) {
|
|
||||||
durum += `<strong">İzin Bedel No: </strong>
|
|
||||||
${v.izinBedelNo}`
|
|
||||||
}
|
|
||||||
return durum
|
|
||||||
}
|
}
|
||||||
|
return durum
|
||||||
}
|
}
|
||||||
)
|
})
|
||||||
|
|
||||||
return header
|
return header
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@ -143,7 +143,7 @@
|
|||||||
title: 'Durum',
|
title: 'Durum',
|
||||||
style: { width: '10%' },
|
style: { width: '10%' },
|
||||||
computeHtml: (v: Record<string, any>): string => {
|
computeHtml: (v: Record<string, any>): string => {
|
||||||
return `<span class='back-grad ${piyangoStore.LoterryStatusClass(v.durum)}'>
|
return `<span class='${piyangoStore.LoterryStatusClass(v.durum)}'>
|
||||||
${v.durum}
|
${v.durum}
|
||||||
</span>`
|
</span>`
|
||||||
},
|
},
|
||||||
|
|||||||
@ -7,6 +7,9 @@
|
|||||||
<template #kisi-kurum-bilgileri>
|
<template #kisi-kurum-bilgileri>
|
||||||
<tab-yetkili-uye-bilgileri />
|
<tab-yetkili-uye-bilgileri />
|
||||||
</template>
|
</template>
|
||||||
|
<template #piyangolar>
|
||||||
|
<tab-uye-piyangolar />
|
||||||
|
</template>
|
||||||
<template #onay-durumu>
|
<template #onay-durumu>
|
||||||
<tab-uye-onay-durumu v-if="usersStore.isPanelUser" />
|
<tab-uye-onay-durumu v-if="usersStore.isPanelUser" />
|
||||||
<tab-uye-onay-durumu-user v-else />
|
<tab-uye-onay-durumu-user v-else />
|
||||||
@ -25,6 +28,7 @@
|
|||||||
|
|
||||||
import AdminLayout from '@/layouts/AdminLayout.vue'
|
import AdminLayout from '@/layouts/AdminLayout.vue'
|
||||||
import TabYetkiliUyeBilgileri from '../components/TabYetkiliUyeBilgileri.vue'
|
import TabYetkiliUyeBilgileri from '../components/TabYetkiliUyeBilgileri.vue'
|
||||||
|
import TabUyePiyangolar from '../components/TabUyePiyangolar.vue'
|
||||||
import TabUyeOnayDurumu from '../components/TabUyeOnayDurumu.vue'
|
import TabUyeOnayDurumu from '../components/TabUyeOnayDurumu.vue'
|
||||||
import TabUyeOnayDurumuUser from '../components/TabUyeOnayDurumuUser.vue'
|
import TabUyeOnayDurumuUser from '../components/TabUyeOnayDurumuUser.vue'
|
||||||
|
|
||||||
@ -32,6 +36,11 @@
|
|||||||
const tabList = ref<Record<string, any>[]>([
|
const tabList = ref<Record<string, any>[]>([
|
||||||
{ text: 'Kişi/Kurum Bilgileri', id: 'kisi-kurum-bilgileri' }
|
{ text: 'Kişi/Kurum Bilgileri', id: 'kisi-kurum-bilgileri' }
|
||||||
])
|
])
|
||||||
|
|
||||||
|
if (usersStore.isPanelUser || usersStore.isAraciFirma) {
|
||||||
|
tabList.value.push({ text: 'Piyangolar', id: 'piyangolar' })
|
||||||
|
}
|
||||||
|
|
||||||
tabList.value.push({ text: 'Onay Durumu', id: 'onay-durumu' })
|
tabList.value.push({ text: 'Onay Durumu', id: 'onay-durumu' })
|
||||||
|
|
||||||
onBeforeMount(async () => {
|
onBeforeMount(async () => {
|
||||||
|
|||||||
@ -35,13 +35,14 @@ export const useDataStore = defineStore('dataStore', () => {
|
|||||||
if (data.data !== undefined) sendData.data = data.data
|
if (data.data !== undefined) sendData.data = data.data
|
||||||
if (data.params !== undefined) sendData.params = data.params
|
if (data.params !== undefined) sendData.params = data.params
|
||||||
if (data.headers !== undefined) sendData.headers = data.headers
|
if (data.headers !== undefined) sendData.headers = data.headers
|
||||||
if (data.toast !== undefined) {
|
|
||||||
toastStore.AddToast(data.toast.toast, data.toast.type, data.toast.timeout)
|
|
||||||
}
|
|
||||||
|
|
||||||
const response = await axios.get(apiBase.value + api, sendData)
|
const response = await axios.get(apiBase.value + api, sendData)
|
||||||
console.log('response --', api, response)
|
console.log('response --', api, response)
|
||||||
|
|
||||||
|
if (data.toast !== undefined) {
|
||||||
|
toastStore.AddToast(data.toast.toast, data.toast.type, data.toast.timeout)
|
||||||
|
}
|
||||||
|
|
||||||
if (data.full !== undefined && data.full) {
|
if (data.full !== undefined && data.full) {
|
||||||
return response
|
return response
|
||||||
} else {
|
} else {
|
||||||
@ -72,12 +73,13 @@ export const useDataStore = defineStore('dataStore', () => {
|
|||||||
if (data.options !== undefined) Object.assign(sendData, data.options)
|
if (data.options !== undefined) Object.assign(sendData, data.options)
|
||||||
if (data.params !== undefined) sendData.params = data.params
|
if (data.params !== undefined) sendData.params = data.params
|
||||||
if (data.headers !== undefined) sendData.headers = data.headers
|
if (data.headers !== undefined) sendData.headers = data.headers
|
||||||
|
|
||||||
|
const response = await axios.post(apiBase.value + api, postData, sendData)
|
||||||
|
|
||||||
if (data.toast !== undefined) {
|
if (data.toast !== undefined) {
|
||||||
toastStore.AddToast(data.toast.toast, data.toast.type, data.toast.timeout)
|
toastStore.AddToast(data.toast.toast, data.toast.type, data.toast.timeout)
|
||||||
}
|
}
|
||||||
|
|
||||||
const response = await axios.post(apiBase.value + api, postData, sendData)
|
|
||||||
|
|
||||||
if (data.full !== undefined && data.full) {
|
if (data.full !== undefined && data.full) {
|
||||||
return response
|
return response
|
||||||
} else {
|
} else {
|
||||||
@ -109,11 +111,13 @@ export const useDataStore = defineStore('dataStore', () => {
|
|||||||
if (data.options !== undefined) Object.assign(sendData, data.options)
|
if (data.options !== undefined) Object.assign(sendData, data.options)
|
||||||
if (data.params !== undefined) sendData.params = data.params
|
if (data.params !== undefined) sendData.params = data.params
|
||||||
if (data.headers !== undefined) sendData.headers = data.headers
|
if (data.headers !== undefined) sendData.headers = data.headers
|
||||||
|
|
||||||
|
const response = await axios.put(apiBase.value + api, postData, sendData)
|
||||||
|
|
||||||
if (data.toast !== undefined) {
|
if (data.toast !== undefined) {
|
||||||
toastStore.AddToast(data.toast.toast, data.toast.type, data.toast.timeout)
|
toastStore.AddToast(data.toast.toast, data.toast.type, data.toast.timeout)
|
||||||
}
|
}
|
||||||
|
|
||||||
const response = await axios.put(apiBase.value + api, postData, sendData)
|
|
||||||
if (data.full !== undefined && data.full) {
|
if (data.full !== undefined && data.full) {
|
||||||
return response
|
return response
|
||||||
} else {
|
} else {
|
||||||
@ -144,11 +148,13 @@ export const useDataStore = defineStore('dataStore', () => {
|
|||||||
if (data.options !== undefined) Object.assign(sendData, data.options)
|
if (data.options !== undefined) Object.assign(sendData, data.options)
|
||||||
if (data.params !== undefined) sendData.params = data.params
|
if (data.params !== undefined) sendData.params = data.params
|
||||||
if (data.headers !== undefined) sendData.headers = data.headers
|
if (data.headers !== undefined) sendData.headers = data.headers
|
||||||
|
|
||||||
|
const response = await axios.delete(apiBase.value + api, sendData)
|
||||||
|
|
||||||
if (data.toast !== undefined) {
|
if (data.toast !== undefined) {
|
||||||
toastStore.AddToast(data.toast.toast, data.toast.type, data.toast.timeout)
|
toastStore.AddToast(data.toast.toast, data.toast.type, data.toast.timeout)
|
||||||
}
|
}
|
||||||
|
|
||||||
const response = await axios.delete(apiBase.value + api, sendData)
|
|
||||||
if (data.full !== undefined && data.full) {
|
if (data.full !== undefined && data.full) {
|
||||||
return response
|
return response
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user