12 Commits

26 changed files with 841 additions and 246 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

View File

@ -7,12 +7,12 @@
<div class="table-head-content">Sıra No</div>
</th>
<template v-for="(headCell, h) in tableHeader">
<th :style="headCell.style || ''">
<th :style="[headCell.style || '']">
<div
:class="[
'table-head-content',
headCell.sort !== undefined && headCell.sort ? 'clickable' : ''
]"
]"
@click="SortColumn(headCell)">
<span>{{ headCell.title }}</span>
<template
@ -47,13 +47,16 @@
</div>
</th>
</template>
<th
:style="[rowActionStyle || '']"
v-if="rowActions !== undefined && rowActions.length > 0">
<div class="table-head-content">İşlemler</div>
</th>
</tr>
</thead>
<tbody>
<tr v-if="tableData.length === 0 && !isPreview">
<td :colspan="rowNumber ? tableHeader.length + 1 : tableHeader.length">
Veri bulunamadı
</td>
<td :colspan="ColSpan">Veri bulunamadı</td>
</tr>
<tr
v-else
@ -77,16 +80,37 @@
:name="'dataCell' + j"
:cellData="CellData(dataRow, dataCell.name)"
:cellIndex="j">
{{
dataCell.compute !== undefined
? dataCell.compute(dataRow)
: dataRow[dataCell.name]
}}
<div class="table-inner-content">
{{
dataCell.compute !== undefined
? dataCell.compute(dataRow)
: dataRow[dataCell.name]
}}
</div>
</slot>
</td>
<td v-else v-html="dataCell.computeHtml(dataRow)"></td>
</template>
</slot>
<td
v-if="rowActions !== undefined && rowActions.length > 0"
:class="[actionFixed ? 'action-fixed' : '']">
<template v-for="(action, ai) in rowActions">
<button
:class="[
'button-c button-icon button-export',
action.class !== undefined ? 'back-grad back-grad-' + action.class : ''
]"
@click="LocalRowDataAction($event, action.action, dataRow, i)">
<i class="ico-c" v-if="action.icon !== undefined">
<svg>
<use :href="icourl + '#' + action.icon"></use>
</svg>
</i>
<span class="panel-date">{{ action.text }}</span>
</button>
</template>
</td>
</tr>
<template
v-if="
@ -120,6 +144,7 @@
import { ref, reactive, computed, watch } from 'vue'
import type { Ref } from 'vue'
import { useGlobalStore } from '@/stores/globalStore'
import icourl from '@/assets/images/icons.svg'
const globalStore = useGlobalStore()
interface ITableHead {
@ -150,11 +175,15 @@
rowNumber?: boolean
totalValues?: Record<string, any>
isPreview?: boolean
rowActions?: Record<string, any>[]
actionFixed?: boolean
rowActionStyle?: string
}
const props = withDefaults(defineProps<Props>(), {
tableData: () => [],
rowNumber: false,
isPreview: false
isPreview: false,
actionFixed: false
})
const emit = defineEmits(['update:sortData', 'update:pagination'])
@ -186,9 +215,27 @@
}
})
const ColSpan = computed<number>(() => {
var span = props.tableHeader.length
if (props.rowNumber) span++
if (props.rowActions) span++
return span
})
const LocalRowAction = (d: Record<string, any>) => {
if (props.rowAction !== undefined) {
(props.rowAction! as Function)(d)
;(props.rowAction! as Function)(d)
}
}
const LocalRowDataAction = (
e: Event,
action: Function | undefined,
dataRow: Record<string, any>,
i: number | string
) => {
if (action !== undefined) {
e.stopImmediatePropagation()
action(dataRow, i)
}
}
@ -223,3 +270,20 @@
{ deep: true }
)
</script>
<style scoped>
.action-fixed {
position: absolute;
z-index: 9;
top: 0;
right: 0;
}
.table-inner-content {
max-height: 400px;
overflow: hidden;
text-overflow: ellipsis;
-webkit-line-clamp: 20;
line-clamp: 20;
-webkit-box-orient: vertical;
display: -webkit-box;
}
</style>

View File

@ -19,7 +19,7 @@
v-for="(button, i) in dialogData.buttons">
<button
:class="['button-c', 'button-' + button.type]"
@click="button.function(id, button.data)">
@click="LocalFunction(button.function, id, button.data)">
{{ button.label }}
</button>
</template>
@ -42,7 +42,7 @@
const dialogStore = useDialogStore()
export interface Props {
id: number
id: number | string
dialogData: Record<string, any>
}
const props = withDefaults(defineProps<Props>(), {})
@ -60,7 +60,13 @@
const CreateData = () => {
Object.assign(localData, props.dialogData)
}
const LocalFunction = (
fun: Function | undefined,
id: string | number,
data: Record<string, any>
) => {
if (fun !== undefined) fun(id, data)
}
const CloseDialog = () => {
delete dialogStore.dialogs[props.id]
}

View File

@ -91,9 +91,9 @@
const emit = defineEmits(['update:modelValue', 'change', 'click'])
const localValue = ref<(string | number)[] | boolean | null | string | number|undefined>(
props.modelValue
)
const localValue = ref<
(string | number)[] | boolean | null | string | number | undefined
>(props.modelValue)
const InvalidMessageText = reactive<Record<string, any>>({})
const InvalidMessages = computed<string>(() => {

View File

@ -117,7 +117,10 @@
v-model:pagination="localPagination"
:rowNumber="rowNumber"
:totalValues="localTotalValues"
:isPreview="isPreview" />
:isPreview="isPreview"
:rowActions="rowActions"
:actionFixed="actionFixed"
:rowActionStyle="rowActionStyle" />
</slot>
</div>
@ -194,6 +197,9 @@
rowNumber?: boolean
totalValues?: Record<string, any>
isPreview?: boolean
rowActions?: Record<string, any>[]
actionFixed?: boolean
rowActionStyle?:string
}
const props = withDefaults(defineProps<Props>(), {
@ -205,7 +211,8 @@
export: true,
search: true,
rowNumber: false,
isPreview: false
isPreview: false,
actionFixed:false
})
const emit = defineEmits([
@ -360,7 +367,7 @@
searchForm.value = false
mobileButtons.value = !mobileButtons.value
}
const OpenSearchForm = (e: Event) => {
const OpenSearchForm = (e: Event) => {
searchFieldPos.value = ''
if (globalStore.screenWidth <= globalStore.breakPoints.tabletp) {
mobileButtons.value = false

View File

@ -7,11 +7,13 @@ export const useDialogStore = defineStore('dialogStore', () => {
const CreateDialog = (data: Record<string, any>) => {
const rnd: number = Number(Math.floor(Math.random() * 10000000000))
dialogs[rnd] = {} as Record<string, any>
dialogs[rnd].id = rnd
dialogs[rnd].data = data
const localId = data.id || rnd
dialogs[localId] = {} as Record<string, any>
dialogs[localId].id = localId
dialogs[localId].data = data
}
const CloseDialog = (id: number) => {
const CloseDialog = (id: number | string) => {
delete dialogs[id]
}
return {

View File

@ -8,7 +8,7 @@
</i>
<a href="/" class="logo-header">
<img
src="@/assets/images/cekilisevi-logo-1.png"
src="@/assets/images/cekilisevi-logo-n.png"
alt="MPI Çekiliş Evi"/>
</a>
</div>

View File

@ -4,7 +4,7 @@
<div class="login-header">
<div class="logo-header">
<img
src="@/assets/images/cekilisevi-logo-1.png"
src="@/assets/images/cekilisevi-logo-n.png"
alt="MPI Çekiliş Evi"/>
</div>
<h1>Şifremi Unuttum</h1>

View File

@ -4,7 +4,7 @@
<div class="login-header">
<div class="logo-header">
<img
src="@/assets/images/cekilisevi-logo-1.png"
src="@/assets/images/cekilisevi-logo-n.png"
alt="MPI Çekiliş Evi"/>
</div>
<h1>Giriş Yap</h1>

View File

@ -3,7 +3,7 @@
<section class="section-login">
<div class="login-header">
<div class="logo-header">
<img src="@/assets/images/cekilisevi-logo-1.png" alt="MPI Çekiliş Evi" />
<img src="@/assets/images/cekilisevi-logo-n.png" alt="MPI Çekiliş Evi" />
</div>
<h1>Üye Ol</h1>
</div>
@ -355,8 +355,6 @@
const globalDataStore = useGlobalDataStore()
import { useValidationStore } from '@/stores/validationStore'
const validationStore = useValidationStore()
import { useUsersStore } from '@/stores/usersStore'
const usersStore = useUsersStore()
import { useAuthValidationStore } from '../stores/authValidationStore'
const authValidationStore = useAuthValidationStore()
import router from '@/router'
@ -365,12 +363,6 @@
const uyeBilgileriStore = useUyeBilgileriStore()
uyeBilgileriStore.ResetStore()
interface IIl {
[key: string]: any
ad: string
id: number
}
const kvkkCheck = ref([
{
label: '',

View File

@ -0,0 +1,10 @@
<template>
<div class="form-content">
<div class="form-inner-content form-inner-content-left">
<form-piyango-dosya-kapama/>
</div>
</div>
</template>
<script setup lang="ts">
import FormPiyangoDosyaKapama from './form/FormPiyangoDosyaKapama.vue'
</script>

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>

View File

@ -39,7 +39,7 @@
</panel-wrapper>
</template>
<script setup lang="ts">
import { ref, reactive, computed, onBeforeMount } from 'vue'
import { ref, onBeforeMount } from 'vue'
import { usePDF } from 'vue3-pdfmake'
import { useUsersStore } from '@/stores/usersStore'
const usersStore = useUsersStore()

View File

@ -0,0 +1,244 @@
<template>
<div class="form-part form-title" v-if="piyangoDosyaKapamaStore.isNew">
<div class="form-title-buttons">
<div
class="button-c button-save"
@click="piyangoDosyaKapamaService.SaveDosyaKapama()">
Kaydet
</div>
</div>
</div>
<div
:class="[
'form-part',
piyangoDosyaKapamaStore.formChanged && !piyangoDosyaKapamaStore.isNew
? 'changed'
: ''
]">
<div class="form-part-title">
<h4>Teminat İade Evrak Kontrol</h4>
</div>
<div class="form-part-content" v-if="piyangoDosyaKapamaStore.loaded">
<form-input
modelKey="katilimSekli"
v-model="piyangoDosyaKapamaStore.dosyaKapamaData.katilimSekli"
label="1. Katılım Şekli"
placeholder="Katılım Şekli"
@keyup="OnKeyup" />
<form-checkbox
label="2. CD"
v-model="piyangoDosyaKapamaStore.dosyaKapamaData.cD"
@change="OnKeyup" />
<form-checkbox
label="3. Kutu Mühürleme Tutanağı"
v-model="piyangoDosyaKapamaStore.dosyaKapamaData.kutuMuhurlemeTutanagi"
@change="OnKeyup" />
<form-checkbox
label="4. Kutu Açma Tutanağı"
v-model="piyangoDosyaKapamaStore.dosyaKapamaData.kutuAcmaTutanagi"
@change="OnKeyup" />
<div class="form-part-title">
<h4>5. Çekiliş Tutanağı</h4>
</div>
<form-checkbox
label="Çekiliş Tutanağı"
v-model="piyangoDosyaKapamaStore.dosyaKapamaData.cekilisTutanagi"
@change="OnKeyup" />
<form-checkbox
label="Çekiliş izin alınan tarih, saat, adreste yapılmış"
v-model="piyangoDosyaKapamaStore.dosyaKapamaData.cekilisIzinAlinanTarihSaatAdres"
@change="OnKeyup" />
<form-checkbox
label="Çekilişte önceden belirlenen ikramiyeler çekiliş"
v-model="
piyangoDosyaKapamaStore.dosyaKapamaData.cekilisOncedenBelirlenenIkramiyeler
"
@change="OnKeyup" />
<form-checkbox
label="Çekilişte önceden belirlenen ikramiyeler çekiliş"
v-model="
piyangoDosyaKapamaStore.dosyaKapamaData.cekilisOncedenBelirlenenIkramiyeler
"
@change="OnKeyup" />
<form-checkbox
label="Çekiliş numara üzerinden/isimden"
v-model="piyangoDosyaKapamaStore.dosyaKapamaData.cekilisNumaraUzerindenCekilis"
@change="OnKeyup" />
<form-checkbox
label="Dağıtılmayan kupon tespiti"
v-model="piyangoDosyaKapamaStore.dosyaKapamaData.dagitilmayanKuponTespiti"
@change="OnKeyup" />
<div class="form-part-title">
<h4>6. Çekiliş Sonucu İlan</h4>
</div>
<form-checkbox
label="Çekiliş Sonucu İlan"
v-model="piyangoDosyaKapamaStore.dosyaKapamaData.cekilisSonucuIlani"
@change="OnKeyup" />
<form-checkbox
label="Taahhüt edilen tarih ve gazetede ilan"
v-model="piyangoDosyaKapamaStore.dosyaKapamaData.ilandaTarihGazete"
@change="OnKeyup" />
<form-checkbox
label="İlanda toplam katılımcı sayısı"
v-model="piyangoDosyaKapamaStore.dosyaKapamaData.ilandaToplamKatilimci"
@change="OnKeyup" />
<form-checkbox
label="Çekiliş tutanağı ile uyumlu kazanan numara/isim"
v-model="
piyangoDosyaKapamaStore.dosyaKapamaData.cekilisTutanagiIleUyumluKazananlar
"
@change="OnKeyup" />
<form-checkbox
label="İlanda ikramiyeler son teslim süresi"
v-model="piyangoDosyaKapamaStore.dosyaKapamaData.ilanSonBasvuruTeslimSuresi"
@change="OnKeyup" />
<form-input
modelKey="taahhutEdilenIkramiyeAdedi"
v-model="piyangoDosyaKapamaStore.dosyaKapamaData.taahhutEdilenIkramiyeAdedi"
label="7. Taahhüt Edilen İkramiye"
placeholder="Taahhüt Edilen İkramiye"
@keyup="OnKeyup" />
<div class="form-part-title">
<h4>8. Teslim Edilen İkramiye</h4>
</div>
<form-input
modelKey="teslimEdilenIkramiyeAdedi"
v-model="piyangoDosyaKapamaStore.dosyaKapamaData.teslimEdilenIkramiyeAdedi"
label="Teslim Edilen İkramiye"
placeholder="Teslim Edilen İkramiye"
@keyup="OnKeyup" />
<form-input
modelKey="asilIkramiyeSayisi"
v-model="piyangoDosyaKapamaStore.dosyaKapamaData.asilIkramiyeSayisi"
label="Teslim Edilen Asıl İkramiye"
placeholder="Teslim Edilen Asıl İkramiye"
@keyup="OnKeyup" />
<form-input
modelKey="yedekIkramiyeSayisi"
v-model="piyangoDosyaKapamaStore.dosyaKapamaData.yedekIkramiyeSayisi"
label="Teslim Edilen Yedek İkramiye"
placeholder="Teslim Edilen Yedek İkramiye"
@keyup="OnKeyup" />
<form-checkbox
label="Nüfus Cüzdanları"
v-model="piyangoDosyaKapamaStore.dosyaKapamaData.nufusCuzdani"
@change="OnKeyup" />
<form-checkbox
label="Kazanan numaralı noter onaylı ibraname"
v-model="piyangoDosyaKapamaStore.dosyaKapamaData.noterOnayliIbraname"
@change="OnKeyup" />
<form-checkbox
label="Teslim Belgesi"
v-model="piyangoDosyaKapamaStore.dosyaKapamaData.teslimBelgesi"
@change="OnKeyup" />
<form-checkbox
label="Fatura fotokopileri"
v-model="piyangoDosyaKapamaStore.dosyaKapamaData.faturaFotokopileri"
@change="OnKeyup" />
<form-checkbox
label="Tescile ait belgeler"
v-model="piyangoDosyaKapamaStore.dosyaKapamaData.tescileAitBelgeler"
@change="OnKeyup" />
<div class="form-part-title">
<h4>9. Süresi İçinde Alınmayan İkramiye</h4>
</div>
<form-input
modelKey="sureIcindesAlinmayanIkramiyeAdedi"
v-model="
piyangoDosyaKapamaStore.dosyaKapamaData.sureIcindesAlinmayanIkramiyeAdedi
"
label="Süresi İçinde Alınmayan İkramiye"
placeholder="Süresi İçinde Alınmayan İkramiye"
@keyup="OnKeyup" />
<form-checkbox
label="Tebligat"
v-model="piyangoDosyaKapamaStore.dosyaKapamaData.tebligat"
@change="OnKeyup" />
<form-checkbox
label="Feragat"
v-model="piyangoDosyaKapamaStore.dosyaKapamaData.feragat"
@change="OnKeyup" />
<form-checkbox
label="Bağış"
v-model="piyangoDosyaKapamaStore.dosyaKapamaData.bagis"
@change="OnKeyup" />
<div class="form-part-title">
<h4>10. Kupon (Aslı) ve Duyuru Örneği</h4>
</div>
<form-checkbox
label="Kupon Aslı"
v-model="piyangoDosyaKapamaStore.dosyaKapamaData.kuponAsli"
@change="OnKeyup" />
<form-checkbox
label="Duyuru Örneği"
v-model="piyangoDosyaKapamaStore.dosyaKapamaData.duyuruMateryali"
@change="OnKeyup" />
<form-date
type="date"
modelKey="ikramiyelerinSonTeslimTarihi"
v-model="piyangoDosyaKapamaStore.dosyaKapamaData.ikramiyelerinSonTeslimTarihi"
label="11. İkramiyelerin Son Teslim Tarihi"
@change="OnKeyup" />
<form-date
type="date"
modelKey="teminatIadeTarihi"
v-model="piyangoDosyaKapamaStore.dosyaKapamaData.teminatIadeTarihi"
label="12. Teminat İade Tarihi"
@change="OnKeyup" />
<div
class="form-item"
v-if="piyangoDosyaKapamaStore.formChanged && !piyangoDosyaKapamaStore.isNew">
<button
class="button-c button-save"
@click="piyangoDosyaKapamaService.SaveDosyaKapama()">
Kaydet
</button>
<button class="button-c button-cancel" @click="CancelSave">Vazgeç</button>
</div>
</div>
</div>
<div class="form-part form-title" v-if="piyangoDosyaKapamaStore.isNew">
<div class="form-title-buttons">
<div
class="button-c button-save"
@click="piyangoDosyaKapamaService.SaveDosyaKapama()">
Kaydet
</div>
</div>
</div>
</template>
<script setup lang="ts">
import { onBeforeMount } from 'vue'
import { usePiyangoDosyaKapamaStore } from '../../stores/piyangoDosyaKapamaStore'
const piyangoDosyaKapamaStore = usePiyangoDosyaKapamaStore()
import { usePiyangoDosyaKapamaService } from '../../service/piyangoDosyaKapamaService'
const piyangoDosyaKapamaService = usePiyangoDosyaKapamaService()
const OnKeyup = () => {
piyangoDosyaKapamaStore.formChanged = true
}
const CancelSave = () => {
piyangoDosyaKapamaStore.RestoreFormData()
piyangoDosyaKapamaStore.formChanged = false
}
onBeforeMount(async () => {
await piyangoDosyaKapamaService.GetDosyaKapama()
if (piyangoDosyaKapamaStore.isNew) {
piyangoDosyaKapamaStore.ResetFormData()
piyangoDosyaKapamaStore.loaded = true
}
})
</script>

View File

@ -0,0 +1,57 @@
import { defineStore } from 'pinia'
import { useDataStore } from '@/stores/dataStore'
import { usePiyangoStore } from '../stores/piyangoStore'
import { usePiyangoDosyaKapamaStore } from '../stores/piyangoDosyaKapamaStore'
import { usePiyangoDosyaKapamaValidationStore } from '../validation/piyangoDosyaKapamaValidationStore'
export const usePiyangoDosyaKapamaService = defineStore(
'piyangoDosyaKapamaService',
() => {
const dataStore = useDataStore()
const piyangoStore = usePiyangoStore()
const piyangoDosyaKapamaStore = usePiyangoDosyaKapamaStore()
const piyangoDosyaKapamaValidationStore = usePiyangoDosyaKapamaValidationStore()
const GetDosyaKapama = async () => {
let data: Record<string, any> | any = await dataStore.dataGet(
'TeminatIadeEvrakKontrol/' + piyangoStore.selectedLottery
)
if (data !== 'errorfalse' || data.data.id === undefined) {
Object.assign(piyangoDosyaKapamaStore.dosyaKapamaData, data.data)
Object.assign(piyangoDosyaKapamaStore.safeDosyaKapamaData, data.data)
piyangoDosyaKapamaStore.isNew = false
setTimeout(() => {
piyangoDosyaKapamaStore.loaded = true
}, 30)
} else {
piyangoDosyaKapamaStore.isNew = true
}
}
const SaveDosyaKapama = async () => {
let dt: any
dataStore.panelData.yayinlanacagiTarih = new Date(
dataStore.panelData.yayinlanacagiTarih
)
if (!piyangoDosyaKapamaStore.isUpdate) {
dt = await dataStore.dataPost('TeminatIadeEvrakKontrol', {
data: piyangoDosyaKapamaStore.dosyaKapamaData
})
} else {
dt = await dataStore.dataPut(
'TeminatIadeEvrakKontrol/' + piyangoDosyaKapamaStore.dosyaKapamaData.id,
{
data: piyangoDosyaKapamaStore.dosyaKapamaData
}
)
}
if (dt !== 'errorfalse') {
piyangoDosyaKapamaStore.isUpdate = false
await GetDosyaKapama()
}
}
return { GetDosyaKapama, SaveDosyaKapama }
}
)

View File

@ -0,0 +1,70 @@
import { defineStore } from 'pinia'
import { ref, reactive } from 'vue'
import { useGlobalStore } from '@/stores/globalStore'
export const usePiyangoDosyaKapamaStore = defineStore('piyangoDosyaKapamaStore', () => {
const globalStore = useGlobalStore()
const baseDosyaKapamaData = reactive<Record<string, any>>({
katilimSekli: '',
cD: false,
kutuMuhurlemeTutanagi: false,
kutuAcmaTutanagi: false,
cekilisTutanagi: false,
cekilisIzinAlinanTarihSaatAdres: false,
oncedenBelirlenenIkramiyeCekilis: false,
cekilisNumaraUzerindenCekilis: false,
dagitilmayanKuponTespiti: false,
cekilisSonucuIlan: false,
ilandaTarihGazete: false,
ilandaToplamKatilimci: false,
cekilisTutanagiIleUyumluKazananlar: false,
ilanSonBasvuruTeslimSuresi: false,
taahhutEdilenIkramiyeAdedi: null,
teslimEdilenIkramiyeAdedi: null,
asilIkramiyeSayisi: null,
yedekIkramiyeSayisi: null,
nufusCuzdani: false,
noterOnayliIbraname: false,
teslimBelgesi: false,
faturaFotokopileri: false,
tescileAitBelgeler: false,
sureIcindesAlinmayanIkramiyeAdedi: null,
tebligat: false,
feragat: false,
bagis: false,
kuponAsli: false,
duyuruMateryali: false,
ikramiyelerinSonTeslimTarihi: '',
teminatIadeTarihi: ''
})
const dosyaKapamaData = reactive<Record<string, any>>({})
const safeDosyaKapamaData = reactive<Record<string, any>>({})
const isNew = ref<boolean>(false)
const isUpdate = ref<boolean>(false)
const formChanged = ref<boolean>(false)
const loaded = ref<boolean>(false)
const ResetFormData = () => {
globalStore.ResetObject(dosyaKapamaData, baseDosyaKapamaData)
Object.assign(dosyaKapamaData, baseDosyaKapamaData)
}
const RestoreFormData = () => {
globalStore.ResetObject(dosyaKapamaData, baseDosyaKapamaData)
Object.assign(dosyaKapamaData, safeDosyaKapamaData)
}
return {
baseDosyaKapamaData,
dosyaKapamaData,
safeDosyaKapamaData,
isNew,
isUpdate,
formChanged,
loaded,
ResetFormData,
RestoreFormData
}
})

View File

@ -0,0 +1,35 @@
import { defineStore } from 'pinia'
import { ref, reactive } from 'vue'
import { useValidationStore } from '@/stores/validationStore'
import { usePiyangoDosyaKapamaStore } from '../stores/piyangoDosyaKapamaStore'
export const usePiyangoDosyaKapamaValidationStore = defineStore(
'piyangoDosyaKapamaValidationStore',
() => {
const piyangoDosyaKapamaStore = usePiyangoDosyaKapamaStore()
const validationStore = useValidationStore()
const isFormValid = ref<boolean>(true)
const invalidTexts = reactive<Record<string, any>>({})
const FormCheck = (): boolean => {
Object.assign(invalidTexts, {})
validationStore.IsFieldEmpty(
piyangoDosyaKapamaStore.dosyaKapamaData,
invalidTexts,
'mecraAdi',
'Yayınlanacak mecranın adını yazınız.'
)
isFormValid.value = Object.keys(invalidTexts).length === 0
return isFormValid.value
}
return {
isFormValid,
invalidTexts,
FormCheck
}
}
)

View File

@ -16,7 +16,7 @@
<template #talihliler><tab-piyango-talihli-listesi /></template>
<template #itirazsikayet><tab-piyango-itiraz /></template>
<template #piyangologlari><tab-piyango-loglari /></template>
<template #yetkilendirme>
<template #yetkilendirme v-if="usersStore.isPanelUser">
<tab-piyango-yetkilendirme />
</template>
<template #onaydurumu>
@ -26,6 +26,9 @@
<template #teminatlistesi>
<tab-piyango-teminat-durumu />
</template>
<template #dosyakapama v-if="usersStore.isPanelUser && piyangoStore.lotteryDrawState">
<tab-piyango-dosya-kapama />
</template>
</tabs>
</AdminLayout>
</template>
@ -52,6 +55,7 @@
import TabPiyangoBilgileri from '@/module/cekilisler/components/TabPiyangoBilgileri.vue'
import TabPiyangoBilgileriDisplay from '../components/TabPiyangoBilgileriDisplay.vue'
import TabPiyangoItiraz from '@/module/cekilisler/components/TabPiyangoItiraz.vue'
import TabPiyangoDosyaKapama from '@/module/cekilisler/components/TabPiyangoDosyaKapama.vue'
const loaded = ref<boolean>(false)
const tabList = ref<Record<string, any>[]>([
@ -85,6 +89,10 @@
if (piyangoStore.lotteryApprove !== 0) {
tabList.value.push({ text: 'Teminat Listesi', id: 'teminatlistesi' })
}
if (usersStore.isPanelUser && piyangoStore.lotteryDrawState) {
tabList.value.push({ text: 'Dossya Kapama', id: 'dosyakapama' })
}
}
onBeforeMount(async () => {

View File

@ -1,75 +1,68 @@
<template>
<AdminLayout>
<Breadcrumb currentPageText='Popup Listesi' />
<section class='section-list'>
<Breadcrumb currentPageText="Popup Listesi" />
<section class="section-list">
<list-table-content
:tableHeader='tableHeader'
:rowAction='updateAction'
:addAction='addAction'
icon='sitemanagement'
title='Popup Listesi'
listText='Popup'
:tableData='popups'
apiText='Popup Listesi'
apiList='Popup'
:tableHeader="tableHeader"
:rowAction="updateAction"
:addAction="addAction"
icon="sitemanagement"
title="Popup Listesi"
listText="Popup"
:tableData="popups"
apiText="Popup Listesi"
apiList="Popup"
v-model:refresh="refresh"
/>
:rowActions="rowActions"
:rowActionStyle="'width:10%;'" />
</section>
<panel-wrapper
v-if='panel'
v-model='panel'
:panel-title="
isUpdate
? 'Popup Düzenle'
: 'Popup Ekle'
">
v-if="panel"
v-model="panel"
:panel-title="isUpdate ? 'Popup Düzenle' : 'Popup Ekle'">
<template #panelContent>
<form-input
v-model='panelPopup.baslik'
label='Başlık' />
<form-input
v-model='panelPopup.url'
label='Url' />
<form-input v-model="panelPopup.baslik" label="Başlık" />
<form-input v-model="panelPopup.url" label="Url" />
<form-file
v-model='panelPopup.resimUrl'
label='Resim Url'
:fileTypes="['png','jpg','jpeg']"
elclass='panel-documents-item'
fileType='img' />
<div class='image-preview-wrapper' v-if='resimPreview'>
<img :src='resimPreview' alt='Seçilen Resim' />
v-model="panelPopup.resimUrl"
label="Resim Url"
:fileTypes="['png', 'jpg', 'jpeg']"
elclass="panel-documents-item"
fileType="img" />
<div class="image-preview-wrapper" v-if="resimPreview">
<img :src="resimPreview" alt="Seçilen Resim" />
</div>
<form-checkbox
:listData="Checker"
listText="label"
listVal="val"
v-model="panelPopup.durum" >
<template #checktext0>
<span>
Aktif
</span>
</template>
</form-checkbox>
:listData="Checker"
listText="label"
listVal="val"
v-model="panelPopup.durum">
<template #checktext0>
<span>Aktif</span>
</template>
</form-checkbox>
</template>
<template #footerButton>
<div class='button-c button-save' @click='save'>
<div class="button-c button-save" @click="save">
{{ isUpdate ? 'Kaydet' : 'Ekle' }}
</div>
</template>
</panel-wrapper>
</AdminLayout>
</template>
<script setup lang='ts'>
import { ref, onMounted, computed } from 'vue'
<script setup lang="ts">
import { ref, computed } from 'vue'
import AdminLayout from '@/layouts/AdminLayout.vue'
import { Breadcrumb } from '@/components/global'
import router from '@/router'
import { useDataStore } from '@/stores/dataStore'
import PanelWrapper from '@/components/PanelWrapper.vue'
import { useGlobalStore } from '@/stores/globalStore'
import { useGlobalStore } from '@/stores/globalStore'
const globalStore = useGlobalStore()
import { useDialogStore } from '@/components/global/dialogStore'
const dialogStore = useDialogStore()
const Checker = ref([
const Checker = ref([
{
label: '',
val: 'durum'
@ -80,8 +73,8 @@
const isUpdate = ref<boolean>(false)
const refresh = ref<boolean>(false)
const panelPopup = ref<Record<string,any>>({})
const popups = ref<Record<string,any>[]>([])
const panelPopup = ref<Record<string, any>>({})
const popups = ref<Record<string, any>[]>([])
const tableHeader = ref<Record<string, any>[]>([
{
@ -106,16 +99,50 @@
name: 'durum',
title: 'Durum',
computeHtml: (v: Record<string, any>): string => {
if (v.durum) {
return `<span class="back-grad back-grad-ok">
if (v.durum) {
return `<span class="back-grad back-grad-ok">
Aktif
</strong>`
} else {
return ``
}
} else {
return ``
}
}
}
])
const DeleteRowPop = (data: Record<string, any>, i: number) => {
dialogStore.CreateDialog({
title: 'Popup Sil',
id: 'deletepop',
content: 'Popup silmek istediğinize emin misiniz?',
closeText: 'Vazgeç',
buttons: [
{
label: 'Popup Sil',
type: 'alert',
function: () => DeleteRow(data.id)
}
]
})
}
const DeleteRow = async (id: number | string) => {
var dt = await dataStore.dataDelete('Popup/' + id)
if (dt !== 'errorfalse') {
dialogStore.CloseDialog('deletepop')
refresh.value = true
}
}
const rowActions = ref<Record<string, any>[]>([
{
text: 'Sil',
class: 'alert',
action: DeleteRowPop
}
])
const resimPreview = computed(() => {
if (!panelPopup.value.resimUrl) return null
@ -127,7 +154,6 @@
return URL.createObjectURL(panelPopup.value.resimUrl)
})
const OpenMenu = (row: any) => {
router.push('slider-yonetimi/' + row.id)
}
@ -136,29 +162,28 @@
panelPopup.value = {
baslik: '',
resimUrl: '',
url:'',
url: '',
durum: false
}
panel.value = true
}
const updateAction = (row: any) => {
panelPopup.value = popups.value.find(x => x.id == row.id) || {}
Object.assign(panelPopup.value,row)
panel.value = true
isUpdate.value = true
}
const save = async () => {
if (isUpdate.value)
{
if (isUpdate.value) {
const formData = new FormData()
formData.append('Baslik', panelPopup.value.baslik)
formData.append('Durum', panelPopup.value.durum)
formData.append('Url', panelPopup.value.url)
if (panelPopup.value.resimUrl instanceof File) {
formData.append('ResimUrl', panelPopup.value.resimUrl)
}
let update:any = dataStore.dataPut('Popup/'+panelPopup.value.id,{
let update: any = dataStore.dataPut('Popup/' + panelPopup.value.id, {
data: formData,
headers: { 'Content-Type': 'multipart/form-data' }
})
@ -167,8 +192,7 @@
isUpdate.value = false
refresh.value = true
}
}
else {
} else {
let add = await dataStore.dataPost('Popup', {
data: panelPopup.value,
headers: { 'Content-Type': 'multipart/form-data' }
@ -179,7 +203,6 @@
refresh.value = true
}
}
}
</script>
<style>
@ -204,4 +227,4 @@
object-fit: cover;
border-radius: 8px;
}
</style>
</style>

View File

@ -10,24 +10,64 @@
listText="Sayfa"
addRoute="yeni-sayfa"
apiList="Page"
apiText="Sayfa Listesi" />
apiText="Sayfa Listesi"
:refresh="refresh"
:rowActions="rowActions"
:rowActionStyle="'width:10%;'" />
</section>
</AdminLayout>
</template>
<script setup lang="ts">
import { ref } from 'vue'
import AdminLayout from '@/layouts/AdminLayout.vue'
import { useGlobalStore } from '@/stores/globalStore'
const globalStore = useGlobalStore()
import { useDialogStore } from '@/components/global/dialogStore'
const dialogStore = useDialogStore()
import { useDataStore } from '@/stores/dataStore'
const dataStore = useDataStore()
import router from '@/router'
const tableHeader = ref<Record<string,any>[]>([
const tableHeader = ref<Record<string, any>[]>([
{
name: 'title',
title: 'Sayfa Başlığı',
sort: true
}
])
const refresh = ref<boolean>(false)
const DeleteRowPop = (data: Record<string, any>, i: number) => {
dialogStore.CreateDialog({
title: 'Sayfa Sil',
id: 'deleteslider',
content: 'Sayfayı 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('Page/' + id)
if (dt !== 'errorfalse') {
dialogStore.CloseDialog('deleteslider')
refresh.value = true
}
}
const rowActions = ref<Record<string, any>[]>([
{
text: 'Sil',
class: 'alert',
action: () => DeleteRowPop
}
])
const pageDetail = (row: any) => {
router.push('/sayfalar/detay/' + row.id)
}

View File

@ -1,73 +1,66 @@
<template>
<AdminLayout>
<Breadcrumb currentPageText='Slider Listesi' />
<section class='section-list'>
<Breadcrumb currentPageText="Slider Listesi" />
<section class="section-list">
<list-table-content
:tableHeader='tableHeader'
:rowAction='updateAction'
:addAction='addAction'
icon='sitemanagement'
title='Slider Listesi'
listText='Slider'
:tableData='sliders'
apiText='Slider Listesi'
apiList='Slider'
v-model:refresh='refresh'
/>
:tableHeader="tableHeader"
:rowAction="updateAction"
:addAction="addAction"
icon="sitemanagement"
title="Slider Listesi"
listText="Slider"
:tableData="sliders"
apiText="Slider Listesi"
apiList="Slider"
v-model:refresh="refresh"
:rowActions="rowActions"
:rowActionStyle="'width:10%;'" />
</section>
<panel-wrapper
v-if='panel'
v-model='panel'
:panel-title="
isUpdate
? 'Slider Düzenle'
: 'Slider Ekle'
">
v-if="panel"
v-model="panel"
:panel-title="isUpdate ? 'Slider Düzenle' : 'Slider Ekle'">
<template #panelContent>
<form-input
required
v-model='panelSlider.baslik'
label='Başlık' />
<form-input required v-model="panelSlider.baslik" label="Başlık" />
<form-file
v-model='panelSlider.resimUrl'
label='Resim Url'
:fileTypes="['png','jpg','jpeg']"
elclass='panel-documents-item'
fileType='img' />
<div class='image-preview-wrapper' v-if='resimPreview'>
<img :src='resimPreview' alt='Seçilen Resim' />
v-model="panelSlider.resimUrl"
label="Resim Url"
:fileTypes="['png', 'jpg', 'jpeg']"
elclass="panel-documents-item"
fileType="img" />
<div class="image-preview-wrapper" v-if="resimPreview">
<img :src="resimPreview" alt="Seçilen Resim" />
</div>
<form-input
required
v-model='panelSlider.url'
label='Url' />
<form-input
required
v-model='panelSlider.sira'
label='Sıra' />
<form-input required v-model="panelSlider.url" label="Url" />
<form-input required v-model="panelSlider.sira" label="Sıra" />
</template>
<template #footerButton>
<div class='button-c button-save' @click='save'>
<div class="button-c button-save" @click="save">
{{ isUpdate ? 'Kaydet' : 'Ekle' }}
</div>
</template>
</panel-wrapper>
</AdminLayout>
</template>
<script setup lang='ts'>
<script setup lang="ts">
import { ref, onMounted, computed } from 'vue'
import AdminLayout from '@/layouts/AdminLayout.vue'
import { Breadcrumb } from '@/components/global'
import router from '@/router'
import { useDataStore } from '@/stores/dataStore'
import PanelWrapper from '@/components/PanelWrapper.vue'
import { useDialogStore } from '@/components/global/dialogStore'
import { useGlobalStore } from '@/stores/globalStore'
const globalStore = useGlobalStore()
const dialogStore = useDialogStore()
const dataStore = useDataStore()
const panel = ref<boolean>(false)
const isUpdate = ref<boolean>(false)
const refresh = ref<boolean>(false)
const panelSlider = ref<Record<string,any>>({})
const sliders = ref<Record<string,any>[]>([])
const panelSlider = ref<Record<string, any>>({})
const sliders = ref<Record<string, any>[]>([])
const tableHeader = ref<Record<string, any>[]>([
{
@ -83,7 +76,11 @@
{
name: 'resimUrl',
title: 'Resim Url',
sort: true
computeHtml: (v: Record<string, any>) => {
if (v.resimUrl !== null && v.resimUrl !== undefined) {
return globalStore.TableCellDocument(v.resimUrl)
}
}
},
{
name: 'url',
@ -91,6 +88,40 @@
sort: true
}
])
const DeleteRowPop = (data: Record<string, any>, i: number) => {
dialogStore.CreateDialog({
title: 'Slider Sil',
id: 'deleteslider',
content: 'Slider silmek istediğinize emin misiniz?',
closeText: 'Vazgeç',
buttons: [
{
label: 'Slider Sil',
type: 'alert',
function: () => DeleteRow(data.id)
}
]
})
}
const DeleteRow = async (id: number | string) => {
var dt = await dataStore.dataDelete('Slider/' + id)
if (dt !== 'errorfalse') {
dialogStore.CloseDialog('deleteslider')
refresh.value = true
}
}
const rowActions = ref<Record<string, any>[]>([
{
text: 'Sil',
class: 'alert',
action: DeleteRowPop
}
])
const resimPreview = computed(() => {
if (!panelSlider.value.resimUrl) return null
@ -100,8 +131,8 @@
// Eğer dosya ise
return URL.createObjectURL(panelSlider.value.resimUrl)
})
})
const OpenMenu = (row: any) => {
router.push('slider-yonetimi/' + row.id)
}
@ -114,10 +145,9 @@
sira: 1
}
panel.value = true
}
const updateAction = (row: any) => {
panelSlider.value = sliders.value.find(x => x.id == row.id) || {}
panelSlider.value = sliders.value.find((x) => x.id == row.id) || {}
panel.value = true
isUpdate.value = true
}
@ -130,8 +160,7 @@
}
const save = async () => {
if (isUpdate.value)
{
if (isUpdate.value) {
const formData = new FormData()
formData.append('Baslik', panelSlider.value.baslik)
formData.append('Url', panelSlider.value.url)
@ -140,7 +169,7 @@
formData.append('ResimUrl', panelSlider.value.resimUrl)
}
let update:any = dataStore.dataPut('Slider/'+panelSlider.value.id,{
let update: any = dataStore.dataPut('Slider/' + panelSlider.value.id, {
data: formData,
headers: { 'Content-Type': 'multipart/form-data' }
})
@ -149,8 +178,7 @@
isUpdate.value = false
refresh.value = true
}
}
else {
} else {
let add = await dataStore.dataPost('Slider/CreateSlider', {
data: panelSlider.value,
headers: { 'Content-Type': 'multipart/form-data' }
@ -161,12 +189,7 @@
refresh.value = true
}
}
}
onMounted(() => {
loadSliders()
})
</script>
<style>
.image-preview-wrapper {
@ -190,4 +213,4 @@
object-fit: cover;
border-radius: 8px;
}
</style>
</style>

View File

@ -13,7 +13,7 @@
@click="OpenPreviewPanel"
v-if="
(route.name === 'Profil' && !usersStore.isPanelUser) ||
route.name === 'UyeYetkiliDetay' && loaded
(route.name === 'UyeYetkiliDetay'|| usersStore.selectedUserApproveId === 3) && loaded
">
Önizleme
</button>
@ -21,9 +21,8 @@
</div>
<div class="form-part-content" v-if="loaded">
<user-approve-states v-if="!isPreview && route.name !== 'UyeYetkiliYeni'" />
<form-select
v-if="route.name === 'UyeYetkiliYeni'"
v-if="route.name === 'UyeYetkiliYeni' || usersStore.selectedUserApproveId === 3"
label="Kullanıcı Tipi"
:listData="yetkiliTipList"
listText="baslik"
@ -36,7 +35,6 @@
<div class="form-item back-grad back-grad-grey" v-else>
{{ uyeBilgileriStore.formData.basvuruTipi }}
</div>
<form-input
type="email"
half
@ -430,8 +428,8 @@
const SetYetkiliTipList = () => {
Object.assign(yetkiliTipList.value, globalDataStore.customerTips)
let araciInd = yetkiliTipList.value.findIndex((p) => p.id === 23)
yetkiliTipList.value.splice(araciInd, 1)
// let araciInd = yetkiliTipList.value.findIndex((p) => p.id === 23)
// yetkiliTipList.value.splice(araciInd, 1)
}
const ilceDisabled = computed<boolean>(() => {

View File

@ -1,21 +1,26 @@
<template>
<div class="form-part form-title">
<div class="form-title-buttons">
<div class="button-c button-save" @click="SendForApprove">Onaya Gönder</div>
<div class='form-part form-title'>
<div class='form-title-buttons'>
<div class='button-c button-save' @click='SendForApprove'>Onaya Gönder</div>
</div>
</div>
</template>
<script setup lang="ts">
<script setup lang='ts'>
import { ref, reactive, onBeforeMount, computed } from 'vue'
import { useRoute } from 'vue-router'
const route = useRoute()
import { useDataStore } from '@/stores/dataStore'
const dataStore = useDataStore()
import { useGlobalStore } from '@/stores/globalStore'
const globalStore = useGlobalStore()
import { useUsersStore } from '@/stores/usersStore'
const usersStore = useUsersStore()
import { useCustomerStore } from '../../stores/customerStore'
const customerStore = useCustomerStore()
const formData = reactive<Record<string, any>>({
@ -39,9 +44,9 @@
})
if (form !== 'errorfalse') {
if (route.name === 'UyeDetay')
if (route.name === 'UyeDetay' || route.name === 'Profil') {
usersStore.userApproveId = formData.onayDurumuIslemTipiId
else usersStore.userSubApproveId = formData.onayDurumuIslemTipiId
} else usersStore.userSubApproveId = formData.onayDurumuIslemTipiId
}
}
</script>

View File

@ -1,30 +1,30 @@
<template>
<div class="form-part">
<div class="form-part-title">
<div class='form-part'>
<div class='form-part-title'>
<h4>Profil Resmi</h4>
</div>
<div class="form-part-content">
<div class='form-part-content'>
<template v-if="file.filePath !== '' && file.filePath !== null">
<file-list-item
:data="file"
@click="ReplaceImage"
:data='file'
@click='ReplaceImage'
onlyPreview
:filePath="file.filePath" />
:filePath='file.filePath' />
</template>
<template v-else>
<template v-if="route.name === 'Profil' || (route.name === 'Profil' && !usersStore.isPanelUser)">
<div class="form-item form-item-picture clickable" @click="picturePanel = true">
<div class="image-c">
<i class="ico-c">
<div class='form-item form-item-picture clickable' @click='picturePanel = true'>
<div class='image-c'>
<i class='ico-c'>
<svg>
<use href="@/assets/images/icons.svg#plus"></use>
<use href='@/assets/images/icons.svg#plus'></use>
</svg>
</i>
</div>
</div>
</template>
<template v-else>
<div class="form-inner-comment">
<div class='form-inner-comment'>
Eklenmiş resim bulunamadı.
</div>
</template>
@ -32,39 +32,45 @@
</div>
</div>
<panel-wrapper
v-if="picturePanel"
v-model="picturePanel"
panel-title="Profil Resmi Ekle">
v-if='picturePanel'
v-model='picturePanel'
panel-title='Profil Resmi Ekle'>
<template #panelContent>
<panel-user-picture />
</template>
<template #footerButton>
<div class="button-c button-save" @click="FileUpload">Ekle</div>
<div class='button-c button-save' @click='FileUpload'>Ekle</div>
</template>
</panel-wrapper>
</template>
<script setup lang="ts">
<script setup lang='ts'>
import { ref, reactive, onBeforeMount } from 'vue'
import PanelUserPicture from '../panel/PanelUserPicture.vue'
import PanelWrapper from '@/components/PanelWrapper.vue'
import { useRoute } from 'vue-router'
const route = useRoute()
import { useDataStore } from '@/stores/dataStore'
const dataStore = useDataStore()
import { useGlobalStore } from '@/stores/globalStore'
const globalStore = useGlobalStore()
import { useValidationStore } from '@/stores/validationStore'
const validationStore = useValidationStore()
import { useUsersStore } from '@/stores/usersStore'
const usersStore = useUsersStore()
import { useCustomerStore } from '@/module/uyeler/stores/customerStore'
const customerStore = useCustomerStore()
const picturePanel = ref<boolean>(false)
const isUpdate = ref<boolean>(false)
const file = reactive<Record<string,any>>({
const file = reactive<Record<string, any>>({
title: '',
filePath: ''
})
@ -75,7 +81,7 @@
picturePanel.value = true
}
const GetData = async () => {
const GetData = async () => {
let dt = await dataStore.dataGet('AppUserResim/AppUserId/' + usersStore.selectedUserId())
if (dt !== 'errorfalse') {
Object.assign(file, dt)

View File

@ -119,6 +119,7 @@ export const useUyeBilgileriStore = defineStore('uyeBilgileriStore', () => {
delete formData[key]
})
}*/
ResetFormItems();
formChanged.value = true
}

View File

@ -40,7 +40,7 @@ export const useDataStore = defineStore('dataStore', () => {
}
const response = await axios.get(apiBase.value + api, sendData)
console.log('response --', api, response)
//console.log('response --', api, response)
if (data.full !== undefined && data.full) {
return response
@ -49,7 +49,7 @@ export const useDataStore = defineStore('dataStore', () => {
}
} catch (error: any) {
CheckApiError(error.response.status, error.response.data)
console.error('Hata oluştu -:', error)
//console.error('Hata oluştu -:', error)
return 'errorfalse'
}
}
@ -86,7 +86,7 @@ export const useDataStore = defineStore('dataStore', () => {
} catch (error: any) {
CheckApiError(error.response.status, error.response.data)
console.error('Hata oluştu:', error)
//console.error('Hata oluştu:', error)
return Promise.resolve('errorfalse')
}
}
@ -122,7 +122,7 @@ export const useDataStore = defineStore('dataStore', () => {
} catch (error: any) {
CheckApiError(error.response.status, error.response.data)
console.error('Hata oluştu:', error)
//console.error('Hata oluştu:', error)
return Promise.resolve('errorfalse')
}
}
@ -156,7 +156,7 @@ export const useDataStore = defineStore('dataStore', () => {
}
} catch (error: any) {
CheckApiError(error.response.status, error.response.data)
console.error('Hata oluştu:', error)
//console.error('Hata oluştu:', error)
return Promise.resolve('errorfalse')
}
}