16 Commits

Author SHA1 Message Date
9a66af25c2 - Trash ikonu eklendi
- FileListItem ek butonlar için alan açıldı.
- Piyango dökümanları adminler için silme butonu eklendi. Api bağlanmadı
2025-07-24 21:57:18 +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
31 changed files with 543 additions and 289 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

@ -237,4 +237,18 @@
d="M16.1362 14.1067H14.7781C14.3632 14.1067 14.0268 14.4424 14.0268 14.8564V19.8401C14.0268 20.2541 14.3632 20.5897 14.7781 20.5897H16.1362C16.5511 20.5897 16.8875 20.2541 16.8875 19.8401V14.8564C16.8875 14.4424 16.5511 14.1067 16.1362 14.1067Z" d="M16.1362 14.1067H14.7781C14.3632 14.1067 14.0268 14.4424 14.0268 14.8564V19.8401C14.0268 20.2541 14.3632 20.5897 14.7781 20.5897H16.1362C16.5511 20.5897 16.8875 20.2541 16.8875 19.8401V14.8564C16.8875 14.4424 16.5511 14.1067 16.1362 14.1067Z"
/> />
</symbol> </symbol>
<symbol id="trash" viewBox="0 0 20 22">
<path
d="M19.4015 6.14128H18.7672L18.8227 5.47865C18.8227 5.47865 18.8227 5.44229 18.8227 5.42613C18.8227 3.9837 17.6691 2.80795 16.2538 2.80795H14.8544V1.78976C14.8544 0.803906 14.0695 0.00390625 13.1022 0.00390625H6.88614C5.91885 0.00390625 5.13391 0.803906 5.13391 1.78976V2.80795H3.73451C2.31924 2.80795 1.16563 3.9837 1.16563 5.42613C1.16563 5.44229 1.16563 5.46249 1.16563 5.47865L1.22113 6.14128H0.586836C0.257797 6.14128 -0.0078125 6.41199 -0.0078125 6.74734C-0.0078125 7.08269 0.257797 7.3534 0.586836 7.3534H1.3242L2.35096 19.41C2.36682 20.8403 3.5125 21.9999 4.91984 21.9999H15.0645C16.4719 21.9999 17.6176 20.8403 17.6334 19.41L18.6602 7.3534H19.3975C19.7266 7.3534 19.9922 7.08269 19.9922 6.74734C19.9922 6.41199 19.7266 6.14128 19.3975 6.14128H19.4015ZM6.32321 1.78572C6.32321 1.46653 6.57692 1.21199 6.88614 1.21199H13.1022C13.4154 1.21199 13.6651 1.47057 13.6651 1.78572V2.80391H6.32321V1.78572ZM2.35492 5.40189C2.36682 4.63825 2.98129 4.02007 3.73451 4.02007H16.2578C17.011 4.02007 17.6255 4.63825 17.6374 5.40189L17.5739 6.14128H2.41835L2.35492 5.40189ZM16.452 19.3292C16.452 19.3292 16.452 19.3655 16.452 19.3817C16.452 20.1574 15.8336 20.7877 15.0725 20.7877H4.9238C4.16265 20.7877 3.54422 20.1574 3.54422 19.3817C3.54422 19.3655 3.54422 19.3453 3.54422 19.3292L2.52539 7.3534H17.4748L16.456 19.3292H16.452Z"
/>
<path
d="M14.7236 13.9756H5.2687C4.93966 13.9756 4.67405 14.2463 4.67405 14.5817C4.67405 14.917 4.93966 15.1877 5.2687 15.1877H14.7196C15.0487 15.1877 15.3143 14.917 15.3143 14.5817C15.3143 14.2463 15.0487 13.9756 14.7196 13.9756H14.7236Z"
/>
<path
d="M4.87227 11.6766H15.1161C15.4451 11.6766 15.7107 11.4059 15.7107 11.0706C15.7107 10.7352 15.4451 10.4645 15.1161 10.4645H4.87227C4.54323 10.4645 4.27762 10.7352 4.27762 11.0706C4.27762 11.4059 4.54323 11.6766 4.87227 11.6766Z"
/>
<path
d="M14.3272 17.4867H5.66513C5.33609 17.4867 5.07048 17.7574 5.07048 18.0928C5.07048 18.4281 5.33609 18.6989 5.66513 18.6989H14.3232C14.6522 18.6989 14.9179 18.4281 14.9179 18.0928C14.9179 17.7574 14.6522 17.4867 14.3232 17.4867H14.3272Z"
/>
</symbol>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 43 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

@ -18,6 +18,8 @@
{{ fileName }} {{ fileName }}
</div> </div>
</a> </a>
<div class="actions-c" v-if="editable || $slots.actionButtons">
<slot name="actionButtons"></slot>
<i <i
class="ico-c ico-section ico-section-header-btn ico-replace" class="ico-c ico-section ico-section-header-btn ico-replace"
@click="OnClick" @click="OnClick"
@ -26,6 +28,7 @@
</i> </i>
</div> </div>
</div> </div>
</div>
</template> </template>
<template v-else> <template v-else>
<div class="form-item-picture only-image clickable"> <div class="form-item-picture only-image clickable">
@ -75,8 +78,8 @@
if (props.filePath !== undefined && props.filePath !== null) { if (props.filePath !== undefined && props.filePath !== null) {
localFilePath.value = props.usePath localFilePath.value = props.usePath
? props.filePath as string ? (props.filePath as string)
: (axios.defaults.baseURL as string + props.filePath as string) as string : (((axios.defaults.baseURL as string) + props.filePath) as string as string)
fileType.value = globalStore.FileType(localFilePath.value) fileType.value = globalStore.FileType(localFilePath.value)
fileName.value = globalStore.FileName(localFilePath.value) fileName.value = globalStore.FileName(localFilePath.value)
@ -96,8 +99,19 @@
() => props.filePath, () => props.filePath,
() => { () => {
localFilePath.value = props.usePath localFilePath.value = props.usePath
? props.filePath as string ? (props.filePath as string)
: (axios.defaults.baseURL as string + props.filePath as string) as string : (((axios.defaults.baseURL as string) + props.filePath) as string as string)
} }
) )
</script> </script>
<style scoped>
.actions-c {
display: flex;
position: absolute;
right: 0;
height: 100%;
padding: 8px;
align-items: center;
pointer-events: fill;
}
</style>

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

@ -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,9 +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.baseURL = 'https://mpiapi.beyaz.net/'
// axios.defaults.baseURL = 'https://localhost:7241/'
//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

@ -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

@ -10,7 +10,15 @@
:editable="false" :editable="false"
:data="file" :data="file"
title="dokumanAdi" title="dokumanAdi"
:filePath="file.url" /> :filePath="file.url">
<template #actionButtons v-if="usersStore.isPanelUser">
<i
class="ico-c ico-btn ico-section back-grad-alert"
@click="DeleteDocumentPop(file)">
<svg><use href="/src/assets/images/icons.svg#trash"></use></svg>
</i>
</template>
</file-list-item>
</template> </template>
</template> </template>
<template v-else> <template v-else>
@ -33,6 +41,35 @@
const piyangoDocumentStore = usePiyangoDocumentStore() const piyangoDocumentStore = usePiyangoDocumentStore()
import { usePiyangoDocumentService } from '../../service/piyangoDocumentService' import { usePiyangoDocumentService } from '../../service/piyangoDocumentService'
const piyangoDocumentService = usePiyangoDocumentService() const piyangoDocumentService = usePiyangoDocumentService()
import { useDialogStore } from '@/components/global/dialogStore'
const dialogStore = useDialogStore()
import { useDataStore } from '@/stores/dataStore'
const dataStore = useDataStore()
const DeleteDocumentPop = (data: Record<string, any>) => {
dialogStore.CreateDialog({
title: 'Doküman Sil',
id: 'deletedoc',
content: 'Dokümanı silmek istediğinize emin misiniz? Bu işlem geri alınamaz.',
closeText: 'Vazgeç',
buttons: [
{
label: 'Doküman Sil',
type: 'alert',
function: () => DeleteDocument(data.id)
}
]
})
}
const DeleteDocument = async (id: number | string) => {
var dt = await dataStore.dataDelete('Popup/' + id)
if (dt !== 'errorfalse') {
dialogStore.CloseDialog('deletedoc')
await piyangoDocumentService.GetDocumentList()
}
}
onBeforeMount(async () => { onBeforeMount(async () => {
await piyangoDocumentService.GetDocumentList() await piyangoDocumentService.GetDocumentList()

View File

@ -601,7 +601,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("https://mpiapi.beyaz.net/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

@ -1,4 +1,4 @@
import PopupYonetimi from "../views/PopupYonetimi.vue"; import PopupYonetimi from '../views/PopupYonetimi.vue';
export default { export default {
path: '/site-yonetimi/popup-yonetimi/:popupId', path: '/site-yonetimi/popup-yonetimi/:popupId',

View File

@ -1,40 +1,36 @@
<template> <template>
<AdminLayout> <AdminLayout>
<Breadcrumb currentPageText='Popup Listesi' /> <Breadcrumb currentPageText="Popup Listesi" />
<section class='section-list'> <section class="section-list">
<list-table-content <list-table-content
:tableHeader='tableHeader' :tableHeader="tableHeader"
:rowAction='updateAction' :rowAction="updateAction"
:addAction='addAction' :addAction="addAction"
icon='sitemanagement' icon="sitemanagement"
title='Popup Listesi' title="Popup Listesi"
listText='Popup' listText="Popup"
:tableData='popups' :tableData="popups"
apiText='Popup Listesi' apiText="Popup Listesi"
apiList='Popup' apiList="Popup"
v-model:refresh='refresh' v-model:refresh="refresh"
/> :rowActions="rowActions"
:rowActionStyle="'width:10%;'" />
</section> </section>
<panel-wrapper <panel-wrapper
v-if='panel' v-if="panel"
v-model='panel' v-model="panel"
:panel-title=" :panel-title="isUpdate ? 'Popup Düzenle' : 'Popup Ekle'">
isUpdate
? 'Popup Düzenle'
: 'Popup Ekle'
">
<template #panelContent> <template #panelContent>
<form-input <form-input v-model="panelPopup.baslik" label="Başlık" />
v-model='panelPopup.baslik' <form-input v-model="panelPopup.url" label="Url" />
label='Başlık' />
<form-file <form-file
v-model='panelPopup.resimUrl' v-model="panelPopup.resimUrl"
label='Resim Url' label="Resim Url"
:fileTypes="['png', 'jpg', 'jpeg']" :fileTypes="['png', 'jpg', 'jpeg']"
elclass='panel-documents-item' elclass="panel-documents-item"
fileType='img' /> fileType="img" />
<div class='image-preview-wrapper' v-if='resimPreview'> <div class="image-preview-wrapper" v-if="resimPreview">
<img :src='resimPreview' alt='Seçilen Resim' /> <img :src="resimPreview" alt="Seçilen Resim" />
</div> </div>
<form-checkbox <form-checkbox
:listData="Checker" :listData="Checker"
@ -42,28 +38,30 @@
listVal="val" listVal="val"
v-model="panelPopup.durum"> v-model="panelPopup.durum">
<template #checktext0> <template #checktext0>
<span> <span>Aktif</span>
Durum
</span>
</template> </template>
</form-checkbox> </form-checkbox>
</template> </template>
<template #footerButton> <template #footerButton>
<div class='button-c button-save' @click='save'> <div class="button-c button-save" @click="save">
{{ isUpdate ? 'Kaydet' : 'Ekle' }} {{ isUpdate ? 'Kaydet' : 'Ekle' }}
</div> </div>
</template> </template>
</panel-wrapper> </panel-wrapper>
</AdminLayout> </AdminLayout>
</template> </template>
<script setup lang='ts'> <script setup lang="ts">
import { ref, onMounted, computed } from 'vue' import { ref, onMounted, computed } from 'vue'
import AdminLayout from '@/layouts/AdminLayout.vue' import AdminLayout from '@/layouts/AdminLayout.vue'
import { Breadcrumb } from '@/components/global' import { Breadcrumb } from '@/components/global'
import router from '@/router' import router from '@/router'
import { useDataStore } from '@/stores/dataStore' import { useDataStore } from '@/stores/dataStore'
import PanelWrapper from '@/components/PanelWrapper.vue' import PanelWrapper from '@/components/PanelWrapper.vue'
import PanelPiyangoItiraz from '@/module/cekilisler/components/panel/PanelPiyangoItiraz.vue' import { useGlobalStore } from '@/stores/globalStore'
const globalStore = useGlobalStore()
import { useDialogStore } from '@/components/global/dialogStore'
const dialogStore = useDialogStore()
const Checker = ref([ const Checker = ref([
{ {
label: '', label: '',
@ -71,9 +69,13 @@
} }
]) ])
const dataStore = useDataStore() const dataStore = useDataStore()
const refreshList = ref<boolean>(false)
const panel = ref<boolean>(false) const panel = ref<boolean>(false)
const isUpdate = 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>[]>([ const tableHeader = ref<Record<string, any>[]>([
{ {
name: 'baslik', name: 'baslik',
@ -83,13 +85,64 @@
{ {
name: 'resimUrl', name: 'resimUrl',
title: 'Resim Url', title: 'Resim Url',
sort: true computeHtml: (v: Record<string, any>) => {
if (v.resimUrl !== null && v.resimUrl !== undefined) {
return globalStore.TableCellDocument(v.resimUrl)
}
}
},
{
name: 'url',
title: 'Url'
}, },
{ {
name: 'durum', name: 'durum',
title: '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(() => { const resimPreview = computed(() => {
if (!panelPopup.value.resimUrl) return null if (!panelPopup.value.resimUrl) return null
@ -101,16 +154,6 @@
return URL.createObjectURL(panelPopup.value.resimUrl) return URL.createObjectURL(panelPopup.value.resimUrl)
}) })
interface Popup {
id: number
baslik: string
resimUrl: string
durum: boolean
}
const refresh = ref<number>(1)
const panelPopup = ref<Popup>()
const popups = ref<Popup[]>([])
const OpenMenu = (row: any) => { const OpenMenu = (row: any) => {
router.push('slider-yonetimi/' + row.id) router.push('slider-yonetimi/' + row.id)
} }
@ -119,44 +162,37 @@
panelPopup.value = { panelPopup.value = {
baslik: '', baslik: '',
resimUrl: '', resimUrl: '',
url: '',
durum: false durum: false
} }
panel.value = true panel.value = true
} }
const updateAction = (row: any) => { const updateAction = (row: any) => {
panelPopup.value = popups.value.find(x => x.id == row.id) Object.assign(panelPopup.value,row)
panel.value = true panel.value = true
isUpdate.value = true isUpdate.value = true
} }
const load = async () => {
const data = await dataStore.dataGet('Popup')
console.log('apidata', data)
popups.value = data
console.log(popups.value)
}
const save = async () => { const save = async () => {
if (isUpdate.value) if (isUpdate.value) {
{
const formData = new FormData() const formData = new FormData()
formData.append('Baslik', panelPopup.value.baslik) formData.append('Baslik', panelPopup.value.baslik)
formData.append('Durum', panelPopup.value.durum) formData.append('Durum', panelPopup.value.durum)
formData.append('Url', panelPopup.value.url)
if (panelPopup.value.resimUrl instanceof File) { if (panelPopup.value.resimUrl instanceof File) {
formData.append('ResimUrl', panelPopup.value.resimUrl) formData.append('ResimUrl', panelPopup.value.resimUrl)
} }
let update = dataStore.dataPut('Popup/'+panelPopup.value.id,{ let update: any = dataStore.dataPut('Popup/' + panelPopup.value.id, {
data: formData, data: formData,
headers: { 'Content-Type': 'multipart/form-data' } headers: { 'Content-Type': 'multipart/form-data' }
}) })
if (update !== 'errorfalse') { if (update !== 'errorfalse') {
panel.value = false panel.value = false
isUpdate.value = false isUpdate.value = false
refresh.value = refresh.value + 1 refresh.value = true
} }
} } else {
else {
let add = await dataStore.dataPost('Popup', { let add = await dataStore.dataPost('Popup', {
data: panelPopup.value, data: panelPopup.value,
headers: { 'Content-Type': 'multipart/form-data' } headers: { 'Content-Type': 'multipart/form-data' }
@ -164,15 +200,10 @@
if (add !== 'errorfalse') { if (add !== 'errorfalse') {
panel.value = false panel.value = false
isUpdate.value = false isUpdate.value = false
refresh.value = refresh.value + 1 refresh.value = true
} }
} }
} }
onMounted(() => {
load()
})
</script> </script>
<style> <style>
.image-preview-wrapper { .image-preview-wrapper {

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

@ -1,72 +1,67 @@
<template> <template>
<AdminLayout> <AdminLayout>
<Breadcrumb currentPageText='Slider Listesi' /> <Breadcrumb currentPageText="Slider Listesi" />
<section class='section-list'> <section class="section-list">
<list-table-content <list-table-content
:tableHeader='tableHeader' :tableHeader="tableHeader"
:rowAction='updateAction' :rowAction="updateAction"
:addAction='addAction' :addAction="addAction"
icon='sitemanagement' icon="sitemanagement"
title='Slider Listesi' title="Slider Listesi"
listText='Slider' listText="Slider"
:tableData='sliders' :tableData="sliders"
apiText='Slider Listesi' apiText="Slider Listesi"
apiList='Slider' apiList="Slider"
v-model:refresh='refresh' v-model:refresh="refresh"
/> :rowActions="rowActions"
:rowActionStyle="'width:10%;'" />
</section> </section>
<panel-wrapper <panel-wrapper
v-if='panel' v-if="panel"
v-model='panel' v-model="panel"
:panel-title=" :panel-title="isUpdate ? 'Slider Düzenle' : 'Slider Ekle'">
isUpdate
? 'Slider Düzenle'
: 'Slider Ekle'
">
<template #panelContent> <template #panelContent>
<form-input <form-input required v-model="panelSlider.baslik" label="Başlık" />
required
v-model='panelSlider.baslik'
label='Başlık' />
<form-file <form-file
v-model='panelSlider.resimUrl' v-model="panelSlider.resimUrl"
label='Resim Url' label="Resim Url"
:fileTypes="['png', 'jpg', 'jpeg']" :fileTypes="['png', 'jpg', 'jpeg']"
elclass='panel-documents-item' elclass="panel-documents-item"
fileType='img' /> fileType="img" />
<div class='image-preview-wrapper' v-if='resimPreview'> <div class="image-preview-wrapper" v-if="resimPreview">
<img :src='resimPreview' alt='Seçilen Resim' /> <img :src="resimPreview" alt="Seçilen Resim" />
</div> </div>
<form-input <form-input required v-model="panelSlider.url" label="Url" />
required <form-input required v-model="panelSlider.sira" label="Sıra" />
v-model='panelSlider.url'
label='Url' />
<form-input
required
v-model='panelSlider.sira'
label='Sıra' />
</template> </template>
<template #footerButton> <template #footerButton>
<div class='button-c button-save' @click='save'> <div class="button-c button-save" @click="save">
{{ isUpdate ? 'Kaydet' : 'Ekle' }} {{ isUpdate ? 'Kaydet' : 'Ekle' }}
</div> </div>
</template> </template>
</panel-wrapper> </panel-wrapper>
</AdminLayout> </AdminLayout>
</template> </template>
<script setup lang='ts'> <script setup lang="ts">
import { ref, onMounted, computed } from 'vue' import { ref, onMounted, computed } from 'vue'
import AdminLayout from '@/layouts/AdminLayout.vue' import AdminLayout from '@/layouts/AdminLayout.vue'
import { Breadcrumb } from '@/components/global' import { Breadcrumb } from '@/components/global'
import router from '@/router' import router from '@/router'
import { useDataStore } from '@/stores/dataStore' import { useDataStore } from '@/stores/dataStore'
import PanelWrapper from '@/components/PanelWrapper.vue' import PanelWrapper from '@/components/PanelWrapper.vue'
import PanelPiyangoItiraz from '@/module/cekilisler/components/panel/PanelPiyangoItiraz.vue' import { useDialogStore } from '@/components/global/dialogStore'
import { useGlobalStore } from '@/stores/globalStore'
const globalStore = useGlobalStore()
const dialogStore = useDialogStore()
const dataStore = useDataStore() const dataStore = useDataStore()
const refreshList = ref<boolean>(false)
const panel = ref<boolean>(false) const panel = ref<boolean>(false)
const isUpdate = 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>[]>([ const tableHeader = ref<Record<string, any>[]>([
{ {
name: 'baslik', name: 'baslik',
@ -81,7 +76,11 @@
{ {
name: 'resimUrl', name: 'resimUrl',
title: 'Resim Url', title: 'Resim Url',
sort: true computeHtml: (v: Record<string, any>) => {
if (v.resimUrl !== null && v.resimUrl !== undefined) {
return globalStore.TableCellDocument(v.resimUrl)
}
}
}, },
{ {
name: 'url', name: 'url',
@ -89,6 +88,40 @@
sort: true 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(() => { const resimPreview = computed(() => {
if (!panelSlider.value.resimUrl) return null if (!panelSlider.value.resimUrl) return null
@ -100,18 +133,6 @@
return URL.createObjectURL(panelSlider.value.resimUrl) return URL.createObjectURL(panelSlider.value.resimUrl)
}) })
interface Slider {
id: number
baslik: string
resimUrl: string
sira: number
url: string
positionId: number
}
const refresh = ref<number>(1)
const panelSlider = ref<Slider>()
const sliders = ref<Slider[]>([])
const OpenMenu = (row: any) => { const OpenMenu = (row: any) => {
router.push('slider-yonetimi/' + row.id) router.push('slider-yonetimi/' + row.id)
} }
@ -124,10 +145,9 @@
sira: 1 sira: 1
} }
panel.value = true panel.value = true
} }
const updateAction = (row: any) => { 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 panel.value = true
isUpdate.value = true isUpdate.value = true
} }
@ -140,8 +160,7 @@
} }
const save = async () => { const save = async () => {
if (isUpdate.value) if (isUpdate.value) {
{
const formData = new FormData() const formData = new FormData()
formData.append('Baslik', panelSlider.value.baslik) formData.append('Baslik', panelSlider.value.baslik)
formData.append('Url', panelSlider.value.url) formData.append('Url', panelSlider.value.url)
@ -150,17 +169,16 @@
formData.append('ResimUrl', panelSlider.value.resimUrl) formData.append('ResimUrl', panelSlider.value.resimUrl)
} }
let update = dataStore.dataPut('Slider/'+panelSlider.value.id,{ let update: any = dataStore.dataPut('Slider/' + panelSlider.value.id, {
data: formData, data: formData,
headers: { 'Content-Type': 'multipart/form-data' } headers: { 'Content-Type': 'multipart/form-data' }
}) })
if (update !== 'errorfalse') { if (update !== 'errorfalse') {
panel.value = false panel.value = false
isUpdate.value = false isUpdate.value = false
refresh.value = refresh.value + 1 refresh.value = true
} }
} } else {
else {
let add = await dataStore.dataPost('Slider/CreateSlider', { let add = await dataStore.dataPost('Slider/CreateSlider', {
data: panelSlider.value, data: panelSlider.value,
headers: { 'Content-Type': 'multipart/form-data' } headers: { 'Content-Type': 'multipart/form-data' }
@ -168,15 +186,10 @@
if (add !== 'errorfalse') { if (add !== 'errorfalse') {
panel.value = false panel.value = false
isUpdate.value = false isUpdate.value = false
refresh.value = refresh.value + 1 refresh.value = true
} }
} }
} }
onMounted(() => {
loadSliders()
})
</script> </script>
<style> <style>
.image-preview-wrapper { .image-preview-wrapper {

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')
} }
} }