18 Commits

Author SHA1 Message Date
f6850853b2 - FormDisplay size props eklendi
- PiyangoId alanları eklendi
2025-07-25 06:24:35 +03:00
67378a365a console lar kaldırıldı 2025-07-24 15:38:10 +03:00
4eced25f06 Listelerde hücre alanlarını içeriği uzun olsa da max 400 px , 20 satır olacak şekilde düzenleme yapıldı 2025-07-24 15:34:27 +03:00
c9e3092e48 Logo değiştirildi 2025-07-24 15:17:26 +03:00
942df94b65 - Katılımcı listesi tümünü sil dialog fonksiyon düzenlemesi 2025-07-23 10:41:09 +03:00
40eb05d618 - Silme butonu tıklandığında silme fonksiyonu direkt çalışma sorunu 2025-07-22 10:17:15 +03:00
14a9362266 popup sayfa slider 2025-07-22 09:57:32 +03:00
6e3bba6e53 -api url fix 2025-07-22 08:04:44 +03:00
d6deb5ab09 - ListTableContent Action sütunu eklendi.
- DialogStore id elle girilebilecek
2025-07-22 08:03:30 +03:00
ae583a7dc5 Merge remote-tracking branch 'origin/main' 2025-07-21 14:48:38 +03:00
de5f129bda üye tipi değiştirme eklendi. 2025-07-21 14:48:29 +03:00
016c0b09d4 - Popup listesi düzenlendi 2025-07-21 14:20:18 +03:00
2aee11cf9a - Üyelik sözleşmesi ve kvkk pdf eklendi, kaydol sayfasından link verildi
- aracı firma sadece onaylı üyeleri listede görecek
2025-07-17 15:43:47 +03:00
85fe0fb6ba url 2025-07-17 15:08:14 +03:00
7349f1b5fa panle ceklilis 2025-07-16 08:46:10 +03:00
29a2448fb6 -popupliste, sliderliste ts hataları giderildi
- Uyebilgileri preview 2 form görünüyor
2025-07-11 09:40:29 +03:00
6afb24332c Merge remote-tracking branch 'origin/main'
# Conflicts:
#	src/init/axios-init.ts
2025-07-11 09:17:11 +03:00
32486af507 slider popup 2025-07-11 09:16:24 +03:00
41 changed files with 1402 additions and 134 deletions

View File

@ -1,7 +1,7 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="tr"> <html lang="tr">
<head> <head>
<meta charset="UTF-8"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="icon" type="image/png" href="/mpi-fav.png"> <link rel="icon" type="image/png" href="/mpi-fav.png">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>MPİ KNOP Panel</title> <title>MPİ KNOP Panel</title>

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

View File

@ -314,6 +314,7 @@ table.table-colored tbody tr:hover {
.table-cell-image { .table-cell-image {
max-height: 100px; max-height: 100px;
border: 1px solid #ececec;
} }
.table-cell-flx-row { .table-cell-flx-row {

View File

@ -7,7 +7,7 @@
<div class="table-head-content">Sıra No</div> <div class="table-head-content">Sıra No</div>
</th> </th>
<template v-for="(headCell, h) in tableHeader"> <template v-for="(headCell, h) in tableHeader">
<th :style="headCell.style || ''"> <th :style="[headCell.style || '']">
<div <div
:class="[ :class="[
'table-head-content', 'table-head-content',
@ -47,13 +47,16 @@
</div> </div>
</th> </th>
</template> </template>
<th
:style="[rowActionStyle || '']"
v-if="rowActions !== undefined && rowActions.length > 0">
<div class="table-head-content">İşlemler</div>
</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr v-if="tableData.length === 0 && !isPreview"> <tr v-if="tableData.length === 0 && !isPreview">
<td :colspan="rowNumber ? tableHeader.length + 1 : tableHeader.length"> <td :colspan="ColSpan">Veri bulunamadı</td>
Veri bulunamadı
</td>
</tr> </tr>
<tr <tr
v-else v-else
@ -77,16 +80,37 @@
:name="'dataCell' + j" :name="'dataCell' + j"
:cellData="CellData(dataRow, dataCell.name)" :cellData="CellData(dataRow, dataCell.name)"
:cellIndex="j"> :cellIndex="j">
<div class="table-inner-content">
{{ {{
dataCell.compute !== undefined dataCell.compute !== undefined
? dataCell.compute(dataRow) ? dataCell.compute(dataRow)
: dataRow[dataCell.name] : dataRow[dataCell.name]
}} }}
</div>
</slot> </slot>
</td> </td>
<td v-else v-html="dataCell.computeHtml(dataRow)"></td> <td v-else v-html="dataCell.computeHtml(dataRow)"></td>
</template> </template>
</slot> </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> </tr>
<template <template
v-if=" v-if="
@ -120,6 +144,7 @@
import { ref, reactive, computed, watch } from 'vue' import { ref, reactive, computed, watch } from 'vue'
import type { Ref } from 'vue' import type { Ref } from 'vue'
import { useGlobalStore } from '@/stores/globalStore' import { useGlobalStore } from '@/stores/globalStore'
import icourl from '@/assets/images/icons.svg'
const globalStore = useGlobalStore() const globalStore = useGlobalStore()
interface ITableHead { interface ITableHead {
@ -150,11 +175,15 @@
rowNumber?: boolean rowNumber?: boolean
totalValues?: Record<string, any> totalValues?: Record<string, any>
isPreview?: boolean isPreview?: boolean
rowActions?: Record<string, any>[]
actionFixed?: boolean
rowActionStyle?: string
} }
const props = withDefaults(defineProps<Props>(), { const props = withDefaults(defineProps<Props>(), {
tableData: () => [], tableData: () => [],
rowNumber: false, rowNumber: false,
isPreview: false isPreview: false,
actionFixed: false
}) })
const emit = defineEmits(['update:sortData', 'update:pagination']) 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>) => { const LocalRowAction = (d: Record<string, any>) => {
if (props.rowAction !== undefined) { 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 } { deep: true }
) )
</script> </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"> v-for="(button, i) in dialogData.buttons">
<button <button
:class="['button-c', 'button-' + button.type]" :class="['button-c', 'button-' + button.type]"
@click="button.function(id, button.data)"> @click="LocalFunction(button.function, id, button.data)">
{{ button.label }} {{ button.label }}
</button> </button>
</template> </template>
@ -42,7 +42,7 @@
const dialogStore = useDialogStore() const dialogStore = useDialogStore()
export interface Props { export interface Props {
id: number id: number | string
dialogData: Record<string, any> dialogData: Record<string, any>
} }
const props = withDefaults(defineProps<Props>(), {}) const props = withDefaults(defineProps<Props>(), {})
@ -60,7 +60,13 @@
const CreateData = () => { const CreateData = () => {
Object.assign(localData, props.dialogData) 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 = () => { const CloseDialog = () => {
delete dialogStore.dialogs[props.id] delete dialogStore.dialogs[props.id]
} }

View File

@ -6,7 +6,9 @@
{{ title }} {{ title }}
<i v-if="required" class="form-item-alert">*</i> <i v-if="required" class="form-item-alert">*</i>
</span> </span>
<label :class="['label-radio', disabled ? 'disabled' : '']" v-for="(item, i) in listData"> <label
:class="['label-radio', disabled ? 'disabled' : '']"
v-for="(item, i) in listData">
<input <input
type="checkbox" type="checkbox"
v-model="localValue" v-model="localValue"
@ -72,7 +74,7 @@
val?: number | string | boolean val?: number | string | boolean
label?: string label?: string
disabled?: boolean disabled?: boolean
modelValue: (string | number)[] | boolean | string | number | null modelValue: (string | number)[] | boolean | string | number | null | undefined
half?: boolean half?: boolean
title?: string title?: string
invalidText?: string invalidText?: string
@ -89,7 +91,7 @@
const emit = defineEmits(['update:modelValue', 'change', 'click']) const emit = defineEmits(['update:modelValue', 'change', 'click'])
const localValue = ref<(string | number)[] | boolean | null | string | number>( const localValue = ref<(string | number)[] | boolean | null | string | number|undefined>(
props.modelValue props.modelValue
) )

View File

@ -14,7 +14,9 @@
</span> </span>
<template v-if="modelText !== undefined && modelText !== ''"> <template v-if="modelText !== undefined && modelText !== ''">
<template v-if="typeof modelText === 'string'"> <template v-if="typeof modelText === 'string'">
<span>{{ price ? globalStore.toTrLocale(modelText) : modelText }}</span> <span :class="[size ? 'form-item-size form-item-size-' + size : '']">
{{ price ? globalStore.toTrLocale(modelText) : modelText }}
</span>
</template> </template>
<template v-if="typeof modelText === 'object'"> <template v-if="typeof modelText === 'object'">
<ul> <ul>
@ -25,7 +27,9 @@
</template> </template>
</template> </template>
<template v-else> <template v-else>
<span>{{ price ? globalStore.toTrLocale(localValue) : localValue }}</span> <span :class="[size ? 'form-item-size form-item-size-' + size : '']">
{{ price ? globalStore.toTrLocale(localValue) : localValue }}
</span>
</template> </template>
<span <span
class="form-item-alert" class="form-item-alert"
@ -64,6 +68,7 @@
modelText?: any modelText?: any
invalidText?: string invalidText?: string
price?: boolean price?: boolean
size?: number | string
} }
const props = withDefaults(defineProps<Props>(), { const props = withDefaults(defineProps<Props>(), {
half: false, half: false,
@ -71,13 +76,23 @@
}) })
const localValue = ref<any>(props.modelValue) const localValue = ref<any>(props.modelValue)
if (props.type === 'date' && props.modelValue !== null && props.modelValue !== undefined && props.modelValue !== '') if (
props.type === 'date' &&
props.modelValue !== null &&
props.modelValue !== undefined &&
props.modelValue !== ''
)
localValue.value = dateStore.dateFormat({ localValue.value = dateStore.dateFormat({
date: props.modelValue as Date, date: props.modelValue as Date,
pattern: 'dd-mm-yy' pattern: 'dd-mm-yy'
}) })
if (props.type === 'datetime' && props.modelValue !== null && props.modelValue !== undefined && props.modelValue !== '') if (
props.type === 'datetime' &&
props.modelValue !== null &&
props.modelValue !== undefined &&
props.modelValue !== ''
)
localValue.value = dateStore.dateFormat({ localValue.value = dateStore.dateFormat({
date: props.modelValue as Date, date: props.modelValue as Date,
pattern: 'dd-mm-yy-t' pattern: 'dd-mm-yy-t'
@ -108,3 +123,14 @@
} }
) )
</script> </script>
<style scoped>
.form-item-size {
font-weight: 600;
}
.form-item-size-1 {
font-size: 1.2em;
}
.form-item-size-2 {
font-size: 1.5em;
}
</style>

View File

@ -117,7 +117,10 @@
v-model:pagination="localPagination" v-model:pagination="localPagination"
:rowNumber="rowNumber" :rowNumber="rowNumber"
:totalValues="localTotalValues" :totalValues="localTotalValues"
:isPreview="isPreview" /> :isPreview="isPreview"
:rowActions="rowActions"
:actionFixed="actionFixed"
:rowActionStyle="rowActionStyle" />
</slot> </slot>
</div> </div>
@ -194,6 +197,9 @@
rowNumber?: boolean rowNumber?: boolean
totalValues?: Record<string, any> totalValues?: Record<string, any>
isPreview?: boolean isPreview?: boolean
rowActions?: Record<string, any>[]
actionFixed?: boolean
rowActionStyle?:string
} }
const props = withDefaults(defineProps<Props>(), { const props = withDefaults(defineProps<Props>(), {
@ -205,7 +211,8 @@
export: true, export: true,
search: true, search: true,
rowNumber: false, rowNumber: false,
isPreview: false isPreview: false,
actionFixed:false
}) })
const emit = defineEmits([ const emit = defineEmits([

View File

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

View File

@ -2,7 +2,7 @@ import axios from 'axios'
import { useUsersStore } from '@/stores/usersStore' import { useUsersStore } from '@/stores/usersStore'
import router from '@/router' import router from '@/router'
axios.defaults.baseURL = 'http://panel.cekilisevi.gov.tr:5001/' axios.defaults.baseURL = 'https://panelapi.cekilisevi.gov.tr/'
//axios.defaults.timeout = 2000; //axios.defaults.timeout = 2000;
axios.defaults.headers['Content-Type'] = 'application/json; charset=utf-8' axios.defaults.headers['Content-Type'] = 'application/json; charset=utf-8'
import { useDataStore } from '@/stores/dataStore' import { useDataStore } from '@/stores/dataStore'

View File

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

View File

@ -122,6 +122,14 @@
{ {
title: 'Menü Yönetimi', title: 'Menü Yönetimi',
to: '/site-yonetimi/menu-listesi' to: '/site-yonetimi/menu-listesi'
},
{
title: 'Slider Yönetimi',
to: '/site-yonetimi/slider-listesi'
},
{
title: 'Popup Yönetimi',
to: '/site-yonetimi/popup-listesi'
} }
] ]
}, },

View File

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

View File

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

View File

@ -3,9 +3,7 @@
<section class="section-login"> <section class="section-login">
<div class="login-header"> <div class="login-header">
<div class="logo-header"> <div class="logo-header">
<img <img src="@/assets/images/cekilisevi-logo-n.png" alt="MPI Çekiliş Evi" />
src="@/assets/images/cekilisevi-logo-1.png"
alt="MPI Çekiliş Evi"/>
</div> </div>
<h1>Üye Ol</h1> <h1>Üye Ol</h1>
</div> </div>
@ -306,7 +304,12 @@
:invalidText="uyeBilgileriStore.invalidTexts.kvkk"> :invalidText="uyeBilgileriStore.invalidTexts.kvkk">
<template #checktext0> <template #checktext0>
<span> <span>
<a href="#">KVKK Şartlarını</a> <a
href="/data/kvkk-sartlari.pdf"
target="_blank"
rel="noopener noreferrer">
KVKK Şartlarını
</a>
Kabul Ediyorum Kabul Ediyorum
</span> </span>
</template> </template>
@ -320,7 +323,12 @@
:invalidText="uyeBilgileriStore.invalidTexts.uyelikSozlesmesi"> :invalidText="uyeBilgileriStore.invalidTexts.uyelikSozlesmesi">
<template #checktext0> <template #checktext0>
<span> <span>
<a href="#">Üyelik Sözleşmesi Şartlarını</a> <a
href="/data/cekilisevi-gov-tr-uyelik-sozlesmesi.pdf"
target="_blank"
rel="noopener noreferrer">
Üyelik Sözleşmesi Şartlarını
</a>
Kabul Ediyorum Kabul Ediyorum
</span> </span>
</template> </template>
@ -409,7 +417,8 @@
if (register !== 'errorfalse') { if (register !== 'errorfalse') {
authValidationStore.registerMessage = register.message authValidationStore.registerMessage = register.message
authValidationStore.loginMessageType = 'success' authValidationStore.loginMessageType = 'success'
authValidationStore.loginMessage = 'Başarıyla kayıt oldunuz. Kullanıcı adı ve şifreniz ile giriş yapabilirsiniz.' authValidationStore.loginMessage =
'Başarıyla kayıt oldunuz. Kullanıcı adı ve şifreniz ile giriş yapabilirsiniz.'
authValidationStore.isLoginMessage = true authValidationStore.isLoginMessage = true
router.push('/login') router.push('/login')
@ -419,7 +428,6 @@
} }
} }
onBeforeMount(async () => { onBeforeMount(async () => {
await dataStore.GetCustomerTipList() await dataStore.GetCustomerTipList()
await dataStore.GetIlList() await dataStore.GetIlList()

View File

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

View File

@ -3,6 +3,10 @@
<lottery-states <lottery-states
:piyangoAmac="piyangoStore.lotteryData.amacpiyangoId" :piyangoAmac="piyangoStore.lotteryData.amacpiyangoId"
v-if="!isPreview" /> v-if="!isPreview" />
<form-display
v-model="piyangoStore.lotteryData.piyangoId"
label="Piyango ID"
size="1" />
<template <template
v-if=" v-if="
usersStore.isPanelUser && usersStore.isPanelUser &&

View File

@ -23,6 +23,13 @@
<strong style="font-size: 10pt; margin-bottom: 12px"> <strong style="font-size: 10pt; margin-bottom: 12px">
PİYANGO İLE İLGİLİ BİLGİLER PİYANGO İLE İLGİLİ BİLGİLER
</strong> </strong>
<br />
<br />
<strong style="font-size: 10pt; margin-bottom: 12px">
PİYANGO ID: {{ piyangoStore.lotteryData.piyangoId }}
</strong>
<br />
<br />
<table <table
cellspacing="0" cellspacing="0"
class="table-no-line" class="table-no-line"

View File

@ -12,6 +12,12 @@
Bahisler ve Oyunlar Dairesi Başkanlığına Bahisler ve Oyunlar Dairesi Başkanlığına
</strong> </strong>
<br /> <br />
<br />
<strong style="font-size: 10pt; margin-bottom: 12px">
PİYANGO ID: {{ piyangoStore.lotteryData.piyangoId }}
</strong>
<br />
<br />
<table <table
cellspacing="0" cellspacing="0"
class="table-no-line" class="table-no-line"

View File

@ -31,7 +31,17 @@
</div> </div>
<div class="form-part-content" v-if="loaded"> <div class="form-part-content" v-if="loaded">
<lottery-states :piyangoAmac="piyangoStore.lotteryData.amacpiyangoId" /> <lottery-states :piyangoAmac="piyangoStore.lotteryData.amacpiyangoId" />
<template
v-if="
!piyangoStore.isNew &&
piyangoStore.lotteryData.piyangoId !== undefined &&
piyangoStore.lotteryData.piyangoId !== null
">
<form-display
v-model="piyangoStore.lotteryData.piyangoId"
label="Piyango ID"
size="1" />
</template>
<form-input <form-input
modelKey="cekilisBaslik" modelKey="cekilisBaslik"
v-model="piyangoStore.lotteryData.baslik" v-model="piyangoStore.lotteryData.baslik"
@ -601,7 +611,10 @@
: piyangoStore.lotteryData.baglisirketId : piyangoStore.lotteryData.baglisirketId
let list = await dataStore.dataGet('Auth/userbyuserChildList/' + id) let list = await dataStore.dataGet('Auth/userbyuserChildList/' + id)
childUsers.value = list.data
childUsers.value = list.data.filter((p: Record<string, any>) => {
return p.islemTipId === 4 || p.islemTipi === 'Üyelik Onaylandı'
})
if (!piyangoStore.isNew) { if (!piyangoStore.isNew) {
await GetDuzenleyen(piyangoStore.lotteryData.duzenleyenId) await GetDuzenleyen(piyangoStore.lotteryData.duzenleyenId)

View File

@ -53,6 +53,7 @@
return AddNewMecra as Function return AddNewMecra as Function
} }
} }
const AddNewMecra = () => { const AddNewMecra = () => {
piyangoMecraStore.ResetForm() piyangoMecraStore.ResetForm()
piyangoMecraStore.isUpdate = false piyangoMecraStore.isUpdate = false

View File

@ -6,7 +6,7 @@ let connectionId = "";
export const connectToHub = async () => { export const connectToHub = async () => {
connection = new signalR.HubConnectionBuilder() connection = new signalR.HubConnectionBuilder()
.withUrl("http://panel.cekilisevi.gov.tr:5001/uploadHub", { .withUrl("https://panelapi.cekilisevi.gov.tr/uploadHub", {
withCredentials: false // Bu zorunlu, yoksa cookie vs gönderilmez withCredentials: false // Bu zorunlu, yoksa cookie vs gönderilmez
}) // backend adresine göre düzenle }) // backend adresine göre düzenle
.withAutomaticReconnect() .withAutomaticReconnect()

View File

@ -72,6 +72,12 @@
} }
header.push( header.push(
{
name: 'piyangoId',
title: 'Piyango ID',
sort: true,
style: { width: '10%' }
},
{ {
name: 'baslik', name: 'baslik',
title: 'Başlık', title: 'Başlık',
@ -101,7 +107,8 @@
type: 'date', type: 'date',
range: true range: true
} }
}) }
)
if (usersStore.isVakifDernek || usersStore.isPanelUser) { if (usersStore.isVakifDernek || usersStore.isPanelUser) {
header.push({ header.push({

View File

@ -54,6 +54,12 @@
} }
header.push( header.push(
{
name: 'piyangoId',
title: 'Piyango ID',
sort: true,
style: { width: '10%' }
},
{ {
name: 'baslik', name: 'baslik',
title: 'Başlık', title: 'Başlık',

View File

@ -5,4 +5,9 @@ import menuYonetimi from '@/module/site-yonetimi/routes/menu-yonetimi'
import menuListe from '@/module/site-yonetimi/routes/menu-liste' import menuListe from '@/module/site-yonetimi/routes/menu-liste'
import ayarlar from '@/module/site-yonetimi/routes/ayarlar' import ayarlar from '@/module/site-yonetimi/routes/ayarlar'
export default [sayfaYeni, sayfDetay, sayfaListe, menuYonetimi, menuListe, ayarlar] import sliderYonetimi from '@/module/site-yonetimi/routes/slider-yonetimi'
import sliderListe from '@/module/site-yonetimi/routes/slider-liste'
import popupYonetimi from '@/module/site-yonetimi/routes/popup-yonetimi'
import popupListe from '@/module/site-yonetimi/routes/popup-liste'
export default [sayfaYeni, sayfDetay, sayfaListe, menuYonetimi, menuListe, ayarlar,sliderYonetimi,sliderListe,popupYonetimi,popupListe]

View File

@ -0,0 +1,10 @@
import PopupListe from "../views/PopupListe.vue";
export default {
path: '/site-yonetimi/popup-listesi',
name: 'PopupListe',
component: PopupListe,
meta: {
authRequired: true
}
}

View File

@ -0,0 +1,10 @@
import PopupYonetimi from '../views/PopupYonetimi.vue';
export default {
path: '/site-yonetimi/popup-yonetimi/:popupId',
name: 'PopupYonetimi',
component: PopupYonetimi,
meta: {
authRequired: true
}
}

View File

@ -0,0 +1,10 @@
import SliderListe from "../views/SliderListe.vue";
export default {
path: '/site-yonetimi/slider-listesi',
name: 'SliderListe',
component: SliderListe,
meta: {
authRequired: true
}
}

View File

@ -0,0 +1,10 @@
import SliderYonetimi from "../views/SliderYonetimi.vue";
export default {
path: '/site-yonetimi/slider-yonetimi/:sliderId',
name: 'SliderYonetimi',
component: SliderYonetimi,
meta: {
authRequired: true
}
}

View File

@ -0,0 +1,230 @@
<template>
<AdminLayout>
<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"
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'">
<template #panelContent>
<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" />
</div>
<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">
{{ isUpdate ? 'Kaydet' : 'Ekle' }}
</div>
</template>
</panel-wrapper>
</AdminLayout>
</template>
<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 { useGlobalStore } from '@/stores/globalStore'
const globalStore = useGlobalStore()
import { useDialogStore } from '@/components/global/dialogStore'
const dialogStore = useDialogStore()
const Checker = ref([
{
label: '',
val: 'durum'
}
])
const dataStore = useDataStore()
const panel = ref<boolean>(false)
const isUpdate = ref<boolean>(false)
const refresh = ref<boolean>(false)
const panelPopup = ref<Record<string, any>>({})
const popups = ref<Record<string, any>[]>([])
const tableHeader = ref<Record<string, any>[]>([
{
name: 'baslik',
title: 'Başlık',
sort: true
},
{
name: 'resimUrl',
title: 'Resim Url',
computeHtml: (v: Record<string, any>) => {
if (v.resimUrl !== null && v.resimUrl !== undefined) {
return globalStore.TableCellDocument(v.resimUrl)
}
}
},
{
name: 'url',
title: 'Url'
},
{
name: 'durum',
title: 'Durum',
computeHtml: (v: Record<string, any>): string => {
if (v.durum) {
return `<span class="back-grad back-grad-ok">
Aktif
</strong>`
} 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
if (typeof panelPopup.value.resimUrl === 'string') {
return panelPopup.value.resimUrl
}
// Eğer dosya ise
return URL.createObjectURL(panelPopup.value.resimUrl)
})
const OpenMenu = (row: any) => {
router.push('slider-yonetimi/' + row.id)
}
const addAction = async () => {
isUpdate.value = false
panelPopup.value = {
baslik: '',
resimUrl: '',
url: '',
durum: false
}
panel.value = true
}
const updateAction = (row: any) => {
Object.assign(panelPopup.value,row)
panel.value = true
isUpdate.value = true
}
const save = async () => {
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, {
data: formData,
headers: { 'Content-Type': 'multipart/form-data' }
})
if (update !== 'errorfalse') {
panel.value = false
isUpdate.value = false
refresh.value = true
}
} else {
let add = await dataStore.dataPost('Popup', {
data: panelPopup.value,
headers: { 'Content-Type': 'multipart/form-data' }
})
if (add !== 'errorfalse') {
panel.value = false
isUpdate.value = false
refresh.value = true
}
}
}
</script>
<style>
.image-preview-wrapper {
display: flex;
justify-content: center;
align-items: center;
background: #f8f9fa;
padding: 12px;
border: 1px solid #ddd;
border-radius: 12px;
margin: 12px 20px;
width: 100%;
max-width: 100%;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.image-preview-wrapper img {
display: block;
max-width: 100%;
max-height: 250px;
object-fit: cover;
border-radius: 8px;
}
</style>

View File

@ -0,0 +1,278 @@
<template>
<AdminLayout>
<Breadcrumb current-page-text="Menu Yonetimi" />
<div class="form-content">
<div class="form-inner-content form-inner-content-left">
<div class="form-part">
<div class="form-part-title">
<h4>
{{ Number(route.params.menuId) === 1 ? 'Ana Menü' : 'Footer Menü' }}
</h4>
<div class="form-part-title-buttons">
<div class="button-c button-save" @click="SaveMenu">Kaydet</div>
</div>
</div>
<div class="form-part-content">
<template v-if="loaded">
<template v-if="siteManagementMenuStore.menuContentList.length > 0">
<div class="form-inner-comment">
Menü öğelerini sürükle-bırak yaparak düzenleyebilirsiniz.
</div>
<draggable
class="menu-list-group"
:list="siteManagementMenuStore.menuContentList"
:group="{ name: 'menu', put: false }"
itemKey="id"
@end="ChangeMenu">
<template #item="{ element, index }">
<div class="menu-list-item">
<span>{{ element.title }}</span>
<div class="menu-list-item-buttons">
<button
@click="EditMenu(element, index)"
v-if="element.pageId === null">
Düzenle
</button>
<button
@click="RemoveFromMenu(element, index)"
class="button-alert">
Sil
</button>
</div>
</div>
</template>
</draggable>
</template>
<template v-else>
<div class="form-inner-comment">
Menüye henüz öğe eklenmemiş. Sağdaki bölümden öğe ekleyebilirsiniz.
</div>
</template>
</template>
</div>
</div>
</div>
<div class="form-inner-content form-inner-content-right">
<div class="form-part">
<div class="form-part-title">
<h4>Sayfalar</h4>
<div class="form-part-title-buttons">
<div class="button-c button-save" @click="AddMenuItem">Menü Öğesi Ekle</div>
</div>
</div>
<div class="form-part-content">
<div class="menu-list-group">
<template v-for="(page, i) in pageList">
<div v-if="page.show" class="menu-list-item menu-list-item-page">
<span>{{ page.title }}</span>
<div class="menu-list-item-buttons">
<button @click="AddToMenu(page, i)">Menüye Ekle</button>
</div>
</div>
</template>
</div>
</div>
</div>
</div>
</div>
<panel-wrapper
wide
v-if="menuItemPanel"
v-model="menuItemPanel"
:panel-title="isEdit ? 'Menü Öğesi Düzenle' : 'Menü Öğesi Ekle'">
<template #panelContent>
<panel-menu-item />
</template>
<template #footerButton>
<div class="button-c button-save" @click="SaveMenuItem">
{{ isEdit ? 'Kaydet' : 'Ekle' }}
</div>
</template>
</panel-wrapper>
</AdminLayout>
</template>
<script setup lang="ts">
import { ref, reactive, onBeforeMount } from 'vue'
import draggable from 'vuedraggable'
import AdminLayout from '@/layouts/AdminLayout.vue'
import { Breadcrumb } from '@/components/global'
import PanelWrapper from '@/components/PanelWrapper.vue'
import PanelMenuItem from '../components/panel/PanelMenuItem.vue'
import { useRoute } from 'vue-router'
const route = useRoute()
import { useDataStore } from '@/stores/dataStore'
const dataStore = useDataStore()
import { useSiteManagementMenuStore } from '../stores/siteManagementMenuStore'
const siteManagementMenuStore = useSiteManagementMenuStore()
import { useSiteManagementPageStore } from '../stores/siteManagementPageStore'
const siteManagementPageStore = useSiteManagementPageStore()
import { useSiteManagementMenuValidationStore } from '../validation/siteManagementMenuValidationStore'
const siteManagementMenuValidationStore = useSiteManagementMenuValidationStore()
import { useSiteManagementMenuService } from '../service/siteManagementMenuService'
const siteManagementMenuService = useSiteManagementMenuService()
import { useSiteManagementPageService } from '../service/siteManagementPageService'
const siteManagementPageService = useSiteManagementPageService()
const onayIslemTipleri = ref<Record<string, any>[]>([])
const formData = reactive<Record<string, any>>({})
const invalidTexts = reactive<Record<string, any>>({})
const loaded = ref<boolean>(false)
const menuItemPanel = ref<boolean>(false)
const isEdit = ref<boolean>(false)
const pageList = ref<Record<string, any>[]>([])
const editMenuIndex = ref<number | null>(null)
const AddMenuItem = () => {
isEdit.value = false
Object.assign(
siteManagementMenuStore.menuItemData,
siteManagementMenuStore.safeMenuItemData
)
menuItemPanel.value = true
}
const EditMenu = (data: Record<string, any>, i: number) => {
isEdit.value = true
Object.assign(siteManagementMenuStore.menuItemData, data)
siteManagementMenuStore.menuItemData.targetKey =
siteManagementMenuStore.menuItemData.targetKey === '_blank' ? true : false
editMenuIndex.value = i
menuItemPanel.value = true
}
const SaveMenu = async () => {
var dt: any
siteManagementMenuStore.menuContentList.forEach(async (el, i) => {
if (el.type === 'update') {
dt = await dataStore.dataPut('Menu/' + el.id, {
data: el
})
}
if (el.type === 'new') {
dt = await dataStore.dataPost('Menu', {
data: el
})
}
})
siteManagementMenuStore.deleteMenuList.forEach(async (el, i) => {
dt = await dataStore.dataDelete('Menu/' + el)
})
setTimeout(async () => {
siteManagementMenuStore.deleteMenuList = []
await GetMenuList()
}, 50)
}
const ReorderMenu = () => {
siteManagementMenuStore.menuContentList.forEach((el, i) => {
el.sira = i + 1
if (el.id !== undefined) el.type = 'update'
})
}
const ChangeMenu = (data: Record<string, any>) => {
ReorderMenu()
}
const AddToMenu = (data: Record<string, any>, i: number) => {
let newData: Record<string, any> = {
title: data.title,
konumId: route.params.menuId,
slug: data.slug,
parentMenuId: null,
pageId: data.id,
isActive: true,
type: 'new',
targetKey: '',
sira: siteManagementMenuStore.menuContentList.length + 1
}
siteManagementMenuStore.menuContentList.push(newData)
data.show = false
}
const CheckPageList = () => {
pageList.value.forEach((page) => {
var show: boolean = true
siteManagementMenuStore.menuContentList.forEach((menu) => {
if (page.id === menu.pageId) show = false
})
page.show = show
})
setTimeout(() => {
loaded.value = true
}, 10)
}
const RemoveFromMenu = (el: Record<string, any>, i: number) => {
siteManagementMenuStore.menuContentList.splice(i, 1)
if (el.pageId !== null) {
let page = pageList.value.filter((itm) => itm.id === el.pageId)[0]
page.show = true
}
if (el.id !== undefined) {
siteManagementMenuStore.deleteMenuList.push(el.id)
}
ReorderMenu()
}
const SaveMenuItem = () => {
if (siteManagementMenuValidationStore.FormCheck()) {
if (!isEdit.value) {
let newData: Record<string, any> = {
title: siteManagementMenuStore.menuItemData.title,
konumId: route.params.menuId,
slug: siteManagementMenuStore.menuItemData.slug,
parentMenuId: null,
pageId: null,
isActive: true,
type: 'new',
targetKey: siteManagementMenuStore.menuItemData.targetKey ? '_blank' : '',
sira: siteManagementMenuStore.menuContentList.length + 1
}
siteManagementMenuStore.menuContentList.push(newData)
} else {
if (siteManagementMenuStore.menuItemData.id !== undefined)
siteManagementMenuStore.menuItemData.type = 'update'
siteManagementMenuStore.menuItemData.targetKey = siteManagementMenuStore
.menuItemData.targetKey
? '_blank'
: ''
Object.assign(
siteManagementMenuStore.menuContentList[editMenuIndex.value!],
siteManagementMenuStore.menuItemData
)
isEdit.value = false
editMenuIndex.value = null
}
menuItemPanel.value = false
}else{
siteManagementMenuValidationStore.isFormValid = true
}
}
const GetMenuList = async () => {
await siteManagementMenuService.GetMenuContentList()
siteManagementMenuStore.menuContentList.sort((a, b) => a.sira - b.sira)
pageList.value.splice(
0,
pageList.value.length,
...siteManagementPageStore.allPagesList
)
CheckPageList()
}
onBeforeMount(async () => {
await siteManagementPageService.GetAllPages()
await GetMenuList()
})
</script>

View File

@ -10,15 +10,20 @@
listText="Sayfa" listText="Sayfa"
addRoute="yeni-sayfa" addRoute="yeni-sayfa"
apiList="Page" apiList="Page"
apiText="Sayfa Listesi" /> apiText="Sayfa Listesi"
:refresh="refresh"
:rowActions="rowActions"
:rowActionStyle="'width:10%;'" />
</section> </section>
</AdminLayout> </AdminLayout>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref } from 'vue' import { ref } from 'vue'
import AdminLayout from '@/layouts/AdminLayout.vue' import AdminLayout from '@/layouts/AdminLayout.vue'
import { useGlobalStore } from '@/stores/globalStore' import { useDialogStore } from '@/components/global/dialogStore'
const globalStore = useGlobalStore() const dialogStore = useDialogStore()
import { useDataStore } from '@/stores/dataStore'
const dataStore = useDataStore()
import router from '@/router' import router from '@/router'
const tableHeader = ref<Record<string, any>[]>([ const tableHeader = ref<Record<string, any>[]>([
@ -28,6 +33,41 @@
sort: true 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) => { const pageDetail = (row: any) => {
router.push('/sayfalar/detay/' + row.id) router.push('/sayfalar/detay/' + row.id)
} }

View File

@ -0,0 +1,216 @@
<template>
<AdminLayout>
<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"
:rowActions="rowActions"
:rowActionStyle="'width:10%;'" />
</section>
<panel-wrapper
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-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" />
</div>
<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">
{{ isUpdate ? 'Kaydet' : 'Ekle' }}
</div>
</template>
</panel-wrapper>
</AdminLayout>
</template>
<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 tableHeader = ref<Record<string, any>[]>([
{
name: 'baslik',
title: 'Başlık',
sort: true
},
{
name: 'sira',
title: 'Sıra',
sort: true
},
{
name: 'resimUrl',
title: 'Resim Url',
computeHtml: (v: Record<string, any>) => {
if (v.resimUrl !== null && v.resimUrl !== undefined) {
return globalStore.TableCellDocument(v.resimUrl)
}
}
},
{
name: 'url',
title: 'Url',
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
if (typeof panelSlider.value.resimUrl === 'string') {
return panelSlider.value.resimUrl
}
// Eğer dosya ise
return URL.createObjectURL(panelSlider.value.resimUrl)
})
const OpenMenu = (row: any) => {
router.push('slider-yonetimi/' + row.id)
}
const addAction = async () => {
isUpdate.value = false
panelSlider.value = {
baslik: '',
resimUrl: '',
url: '',
sira: 1
}
panel.value = true
}
const updateAction = (row: any) => {
panelSlider.value = sliders.value.find((x) => x.id == row.id) || {}
panel.value = true
isUpdate.value = true
}
const loadSliders = async () => {
const data = await dataStore.dataGet('Slider')
console.log('apidata', data)
sliders.value = data
console.log(sliders.value)
}
const save = async () => {
if (isUpdate.value) {
const formData = new FormData()
formData.append('Baslik', panelSlider.value.baslik)
formData.append('Url', panelSlider.value.url)
formData.append('Sira', panelSlider.value?.sira)
if (panelSlider.value.resimUrl instanceof File) {
formData.append('ResimUrl', panelSlider.value.resimUrl)
}
let update: any = dataStore.dataPut('Slider/' + panelSlider.value.id, {
data: formData,
headers: { 'Content-Type': 'multipart/form-data' }
})
if (update !== 'errorfalse') {
panel.value = false
isUpdate.value = false
refresh.value = true
}
} else {
let add = await dataStore.dataPost('Slider/CreateSlider', {
data: panelSlider.value,
headers: { 'Content-Type': 'multipart/form-data' }
})
if (add !== 'errorfalse') {
panel.value = false
isUpdate.value = false
refresh.value = true
}
}
}
</script>
<style>
.image-preview-wrapper {
display: flex;
justify-content: center;
align-items: center;
background: #f8f9fa;
padding: 12px;
border: 1px solid #ddd;
border-radius: 12px;
margin: 12px 20px;
width: 100%;
max-width: 100%;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.image-preview-wrapper img {
display: block;
max-width: 100%;
max-height: 250px;
object-fit: cover;
border-radius: 8px;
}
</style>

View File

@ -0,0 +1,278 @@
<template>
<AdminLayout>
<Breadcrumb current-page-text="Menu Yonetimi" />
<div class="form-content">
<div class="form-inner-content form-inner-content-left">
<div class="form-part">
<div class="form-part-title">
<h4>
{{ Number(route.params.menuId) === 1 ? 'Ana Menü' : 'Footer Menü' }}
</h4>
<div class="form-part-title-buttons">
<div class="button-c button-save" @click="SaveMenu">Kaydet</div>
</div>
</div>
<div class="form-part-content">
<template v-if="loaded">
<template v-if="siteManagementMenuStore.menuContentList.length > 0">
<div class="form-inner-comment">
Menü öğelerini sürükle-bırak yaparak düzenleyebilirsiniz.
</div>
<draggable
class="menu-list-group"
:list="siteManagementMenuStore.menuContentList"
:group="{ name: 'menu', put: false }"
itemKey="id"
@end="ChangeMenu">
<template #item="{ element, index }">
<div class="menu-list-item">
<span>{{ element.title }}</span>
<div class="menu-list-item-buttons">
<button
@click="EditMenu(element, index)"
v-if="element.pageId === null">
Düzenle
</button>
<button
@click="RemoveFromMenu(element, index)"
class="button-alert">
Sil
</button>
</div>
</div>
</template>
</draggable>
</template>
<template v-else>
<div class="form-inner-comment">
Menüye henüz öğe eklenmemiş. Sağdaki bölümden öğe ekleyebilirsiniz.
</div>
</template>
</template>
</div>
</div>
</div>
<div class="form-inner-content form-inner-content-right">
<div class="form-part">
<div class="form-part-title">
<h4>Sayfalar</h4>
<div class="form-part-title-buttons">
<div class="button-c button-save" @click="AddMenuItem">Menü Öğesi Ekle</div>
</div>
</div>
<div class="form-part-content">
<div class="menu-list-group">
<template v-for="(page, i) in pageList">
<div v-if="page.show" class="menu-list-item menu-list-item-page">
<span>{{ page.title }}</span>
<div class="menu-list-item-buttons">
<button @click="AddToMenu(page, i)">Menüye Ekle</button>
</div>
</div>
</template>
</div>
</div>
</div>
</div>
</div>
<panel-wrapper
wide
v-if="menuItemPanel"
v-model="menuItemPanel"
:panel-title="isEdit ? 'Menü Öğesi Düzenle' : 'Menü Öğesi Ekle'">
<template #panelContent>
<panel-menu-item />
</template>
<template #footerButton>
<div class="button-c button-save" @click="SaveMenuItem">
{{ isEdit ? 'Kaydet' : 'Ekle' }}
</div>
</template>
</panel-wrapper>
</AdminLayout>
</template>
<script setup lang="ts">
import { ref, reactive, onBeforeMount } from 'vue'
import draggable from 'vuedraggable'
import AdminLayout from '@/layouts/AdminLayout.vue'
import { Breadcrumb } from '@/components/global'
import PanelWrapper from '@/components/PanelWrapper.vue'
import PanelMenuItem from '../components/panel/PanelMenuItem.vue'
import { useRoute } from 'vue-router'
const route = useRoute()
import { useDataStore } from '@/stores/dataStore'
const dataStore = useDataStore()
import { useSiteManagementMenuStore } from '../stores/siteManagementMenuStore'
const siteManagementMenuStore = useSiteManagementMenuStore()
import { useSiteManagementPageStore } from '../stores/siteManagementPageStore'
const siteManagementPageStore = useSiteManagementPageStore()
import { useSiteManagementMenuValidationStore } from '../validation/siteManagementMenuValidationStore'
const siteManagementMenuValidationStore = useSiteManagementMenuValidationStore()
import { useSiteManagementMenuService } from '../service/siteManagementMenuService'
const siteManagementMenuService = useSiteManagementMenuService()
import { useSiteManagementPageService } from '../service/siteManagementPageService'
const siteManagementPageService = useSiteManagementPageService()
const onayIslemTipleri = ref<Record<string, any>[]>([])
const formData = reactive<Record<string, any>>({})
const invalidTexts = reactive<Record<string, any>>({})
const loaded = ref<boolean>(false)
const menuItemPanel = ref<boolean>(false)
const isEdit = ref<boolean>(false)
const pageList = ref<Record<string, any>[]>([])
const editMenuIndex = ref<number | null>(null)
const AddMenuItem = () => {
isEdit.value = false
Object.assign(
siteManagementMenuStore.menuItemData,
siteManagementMenuStore.safeMenuItemData
)
menuItemPanel.value = true
}
const EditMenu = (data: Record<string, any>, i: number) => {
isEdit.value = true
Object.assign(siteManagementMenuStore.menuItemData, data)
siteManagementMenuStore.menuItemData.targetKey =
siteManagementMenuStore.menuItemData.targetKey === '_blank' ? true : false
editMenuIndex.value = i
menuItemPanel.value = true
}
const SaveMenu = async () => {
var dt: any
siteManagementMenuStore.menuContentList.forEach(async (el, i) => {
if (el.type === 'update') {
dt = await dataStore.dataPut('Menu/' + el.id, {
data: el
})
}
if (el.type === 'new') {
dt = await dataStore.dataPost('Menu', {
data: el
})
}
})
siteManagementMenuStore.deleteMenuList.forEach(async (el, i) => {
dt = await dataStore.dataDelete('Menu/' + el)
})
setTimeout(async () => {
siteManagementMenuStore.deleteMenuList = []
await GetMenuList()
}, 50)
}
const ReorderMenu = () => {
siteManagementMenuStore.menuContentList.forEach((el, i) => {
el.sira = i + 1
if (el.id !== undefined) el.type = 'update'
})
}
const ChangeMenu = (data: Record<string, any>) => {
ReorderMenu()
}
const AddToMenu = (data: Record<string, any>, i: number) => {
let newData: Record<string, any> = {
title: data.title,
konumId: route.params.menuId,
slug: data.slug,
parentMenuId: null,
pageId: data.id,
isActive: true,
type: 'new',
targetKey: '',
sira: siteManagementMenuStore.menuContentList.length + 1
}
siteManagementMenuStore.menuContentList.push(newData)
data.show = false
}
const CheckPageList = () => {
pageList.value.forEach((page) => {
var show: boolean = true
siteManagementMenuStore.menuContentList.forEach((menu) => {
if (page.id === menu.pageId) show = false
})
page.show = show
})
setTimeout(() => {
loaded.value = true
}, 10)
}
const RemoveFromMenu = (el: Record<string, any>, i: number) => {
siteManagementMenuStore.menuContentList.splice(i, 1)
if (el.pageId !== null) {
let page = pageList.value.filter((itm) => itm.id === el.pageId)[0]
page.show = true
}
if (el.id !== undefined) {
siteManagementMenuStore.deleteMenuList.push(el.id)
}
ReorderMenu()
}
const SaveMenuItem = () => {
if (siteManagementMenuValidationStore.FormCheck()) {
if (!isEdit.value) {
let newData: Record<string, any> = {
title: siteManagementMenuStore.menuItemData.title,
konumId: route.params.menuId,
slug: siteManagementMenuStore.menuItemData.slug,
parentMenuId: null,
pageId: null,
isActive: true,
type: 'new',
targetKey: siteManagementMenuStore.menuItemData.targetKey ? '_blank' : '',
sira: siteManagementMenuStore.menuContentList.length + 1
}
siteManagementMenuStore.menuContentList.push(newData)
} else {
if (siteManagementMenuStore.menuItemData.id !== undefined)
siteManagementMenuStore.menuItemData.type = 'update'
siteManagementMenuStore.menuItemData.targetKey = siteManagementMenuStore
.menuItemData.targetKey
? '_blank'
: ''
Object.assign(
siteManagementMenuStore.menuContentList[editMenuIndex.value!],
siteManagementMenuStore.menuItemData
)
isEdit.value = false
editMenuIndex.value = null
}
menuItemPanel.value = false
}else{
siteManagementMenuValidationStore.isFormValid = true
}
}
const GetMenuList = async () => {
await siteManagementMenuService.GetMenuContentList()
siteManagementMenuStore.menuContentList.sort((a, b) => a.sira - b.sira)
pageList.value.splice(
0,
pageList.value.length,
...siteManagementPageStore.allPagesList
)
CheckPageList()
}
onBeforeMount(async () => {
await siteManagementPageService.GetAllPages()
await GetMenuList()
})
</script>

View File

@ -13,7 +13,7 @@
@click="OpenPreviewPanel" @click="OpenPreviewPanel"
v-if=" v-if="
(route.name === 'Profil' && !usersStore.isPanelUser) || (route.name === 'Profil' && !usersStore.isPanelUser) ||
route.name === 'UyeYetkiliDetay' && loaded (route.name === 'UyeYetkiliDetay'|| usersStore.selectedUserApproveId === 3) && loaded
"> ">
Önizleme Önizleme
</button> </button>
@ -21,9 +21,8 @@
</div> </div>
<div class="form-part-content" v-if="loaded"> <div class="form-part-content" v-if="loaded">
<user-approve-states v-if="!isPreview && route.name !== 'UyeYetkiliYeni'" /> <user-approve-states v-if="!isPreview && route.name !== 'UyeYetkiliYeni'" />
<form-select <form-select
v-if="route.name === 'UyeYetkiliYeni'" v-if="route.name === 'UyeYetkiliYeni' || usersStore.selectedUserApproveId === 3"
label="Kullanıcı Tipi" label="Kullanıcı Tipi"
:listData="yetkiliTipList" :listData="yetkiliTipList"
listText="baslik" listText="baslik"
@ -36,7 +35,6 @@
<div class="form-item back-grad back-grad-grey" v-else> <div class="form-item back-grad back-grad-grey" v-else>
{{ uyeBilgileriStore.formData.basvuruTipi }} {{ uyeBilgileriStore.formData.basvuruTipi }}
</div> </div>
<form-input <form-input
type="email" type="email"
half half
@ -379,8 +377,7 @@
v-model="previewPanel" v-model="previewPanel"
panel-title="Üye Bilgileri Önizleme"> panel-title="Üye Bilgileri Önizleme">
<template #panelContent> <template #panelContent>
<panel-uye-onizleme /> <panel-uye-onizleme v-model:id="previewId" />
<panel-uye-onizleme shadow v-model:id="previewId" />
</template> </template>
<template #footerButton> <template #footerButton>
<div class="button-c button-save" @click="DownloadPDF">PDF İndir</div> <div class="button-c button-save" @click="DownloadPDF">PDF İndir</div>
@ -431,8 +428,8 @@
const SetYetkiliTipList = () => { const SetYetkiliTipList = () => {
Object.assign(yetkiliTipList.value, globalDataStore.customerTips) Object.assign(yetkiliTipList.value, globalDataStore.customerTips)
let araciInd = yetkiliTipList.value.findIndex((p) => p.id === 23) // let araciInd = yetkiliTipList.value.findIndex((p) => p.id === 23)
yetkiliTipList.value.splice(araciInd, 1) // yetkiliTipList.value.splice(araciInd, 1)
} }
const ilceDisabled = computed<boolean>(() => { const ilceDisabled = computed<boolean>(() => {

View File

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

View File

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

View File

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

View File

@ -8,7 +8,7 @@ export const useDataStore = defineStore('dataStore', () => {
const globalDataStore = useGlobalDataStore() const globalDataStore = useGlobalDataStore()
const toastStore = useToastStore() const toastStore = useToastStore()
const siteBase = ref<string>('https://mpiapi.beyaz.net/') const siteBase = ref<string>('https://panelapi.cekilisevi.gov.tr/')
const apiBase = ref<string>('api/') const apiBase = ref<string>('api/')
const panelData = reactive<Record<string, any>>({}) const panelData = reactive<Record<string, any>>({})
const pageData = reactive<Record<string, any>>({}) const pageData = reactive<Record<string, any>>({})
@ -40,7 +40,7 @@ export const useDataStore = defineStore('dataStore', () => {
} }
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.full !== undefined && data.full) { if (data.full !== undefined && data.full) {
return response return response
@ -49,7 +49,7 @@ export const useDataStore = defineStore('dataStore', () => {
} }
} catch (error: any) { } catch (error: any) {
CheckApiError(error.response.status, error.response.data) CheckApiError(error.response.status, error.response.data)
console.error('Hata oluştu -:', error) //console.error('Hata oluştu -:', error)
return 'errorfalse' return 'errorfalse'
} }
} }
@ -86,7 +86,7 @@ export const useDataStore = defineStore('dataStore', () => {
} catch (error: any) { } catch (error: any) {
CheckApiError(error.response.status, error.response.data) CheckApiError(error.response.status, error.response.data)
console.error('Hata oluştu:', error) //console.error('Hata oluştu:', error)
return Promise.resolve('errorfalse') return Promise.resolve('errorfalse')
} }
} }
@ -122,7 +122,7 @@ export const useDataStore = defineStore('dataStore', () => {
} catch (error: any) { } catch (error: any) {
CheckApiError(error.response.status, error.response.data) CheckApiError(error.response.status, error.response.data)
console.error('Hata oluştu:', error) //console.error('Hata oluştu:', error)
return Promise.resolve('errorfalse') return Promise.resolve('errorfalse')
} }
} }
@ -156,7 +156,7 @@ export const useDataStore = defineStore('dataStore', () => {
} }
} catch (error: any) { } catch (error: any) {
CheckApiError(error.response.status, error.response.data) CheckApiError(error.response.status, error.response.data)
console.error('Hata oluştu:', error) //console.error('Hata oluştu:', error)
return Promise.resolve('errorfalse') return Promise.resolve('errorfalse')
} }
} }