Compare commits
18 Commits
ae583a7dc5
...
Kapsam-Dış
| Author | SHA1 | Date | |
|---|---|---|---|
| ed8b6fd3eb | |||
| f4c0511afb | |||
| 7998b7bd6c | |||
| 6ff319cb1d | |||
| 10011eacd6 | |||
| 36d646e0bf | |||
| 908e63b896 | |||
| 0e130eafff | |||
| f6850853b2 | |||
| ff0304b4d9 | |||
| 67378a365a | |||
| 4eced25f06 | |||
| c9e3092e48 | |||
| 942df94b65 | |||
| 40eb05d618 | |||
| 14a9362266 | |||
| 6e3bba6e53 | |||
| d6deb5ab09 |
1
.env.development
Normal file
1
.env.development
Normal file
@ -0,0 +1 @@
|
|||||||
|
VITE_API_URL=https://panelapi.cekilisevitest.gov.tr/
|
||||||
1
.env.localdev
Normal file
1
.env.localdev
Normal file
@ -0,0 +1 @@
|
|||||||
|
VITE_API_URL=https://localhost:7241/
|
||||||
1
.env.production
Normal file
1
.env.production
Normal file
@ -0,0 +1 @@
|
|||||||
|
VITE_API_URL=https://panelapi.cekilisevi.gov.tr/
|
||||||
7
env.d.ts
vendored
7
env.d.ts
vendored
@ -1,2 +1,9 @@
|
|||||||
/// <reference types="vite/client" />
|
/// <reference types="vite/client" />
|
||||||
|
|
||||||
|
interface ImportMetaEnv {
|
||||||
|
readonly VITE_API_URL: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface ImportMeta {
|
||||||
|
readonly env: ImportMetaEnv;
|
||||||
|
}
|
||||||
@ -5,9 +5,12 @@
|
|||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
|
"localdev": "vite",
|
||||||
"build": "run-p type-check \"build-only {@}\" --",
|
"build": "run-p type-check \"build-only {@}\" --",
|
||||||
|
"buildtest": "run-p type-check \"build-only-test {@}\" --",
|
||||||
"preview": "vite preview",
|
"preview": "vite preview",
|
||||||
"build-only": "vite build",
|
"build-only": "vite build",
|
||||||
|
"build-only-test": "vite build --mode development",
|
||||||
"type-check": "vue-tsc --build --force"
|
"type-check": "vue-tsc --build --force"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
BIN
src/assets/images/cekilisevi-logo-n.png
Normal file
BIN
src/assets/images/cekilisevi-logo-n.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.1 KiB |
@ -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>
|
||||||
|
|||||||
@ -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]
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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>
|
||||||
|
|||||||
@ -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([
|
||||||
|
|||||||
@ -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 {
|
||||||
|
|||||||
@ -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 = 'https://panelapi.cekilisevi.gov.tr/'
|
axios.defaults.baseURL = import.meta.env.VITE_API_URL
|
||||||
//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'
|
||||||
|
|||||||
@ -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>
|
||||||
|
|||||||
@ -109,7 +109,7 @@
|
|||||||
{
|
{
|
||||||
title: 'Site Yönetimi',
|
title: 'Site Yönetimi',
|
||||||
ico: 'sitemanagement',
|
ico: 'sitemanagement',
|
||||||
show: usersStore.isPanelUser && !usersStore.isAccounting,
|
show: usersStore.isSuperAdmin,
|
||||||
sub: [
|
sub: [
|
||||||
{
|
{
|
||||||
title: 'Yeni Sayfa',
|
title: 'Yeni Sayfa',
|
||||||
|
|||||||
@ -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>
|
||||||
|
|||||||
@ -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>
|
||||||
|
|||||||
@ -3,7 +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 src="@/assets/images/cekilisevi-logo-1.png" alt="MPI Çekiliş Evi" />
|
<img src="@/assets/images/cekilisevi-logo-n.png" alt="MPI Çekiliş Evi" />
|
||||||
</div>
|
</div>
|
||||||
<h1>Üye Ol</h1>
|
<h1>Üye Ol</h1>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -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,8 +303,11 @@
|
|||||||
})
|
})
|
||||||
|
|
||||||
const formData = new FormData()
|
const formData = new FormData()
|
||||||
formData.append('excelFile', piyangoKatilimciStore.piyangoKatilimciFileFormData.excelFile)
|
formData.append(
|
||||||
console.log( dataStore.panelData)
|
'excelFile',
|
||||||
|
piyangoKatilimciStore.piyangoKatilimciFileFormData.excelFile
|
||||||
|
)
|
||||||
|
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 {
|
||||||
|
|||||||
@ -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 &&
|
||||||
|
|||||||
@ -1,102 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="form-part form-title" v-if="usersStore.isPanelUser">
|
|
||||||
<div class="form-title-buttons">
|
|
||||||
<button
|
|
||||||
class="button-c button-save"
|
|
||||||
@click="piyangoTeminatService.SaveTeminatDurum"
|
|
||||||
:disabled="!piyangoTeminatValidationStore.formChanged">
|
|
||||||
Kaydet
|
|
||||||
</button>
|
|
||||||
<button
|
|
||||||
v-if="piyangoTeminatValidationStore.formChanged"
|
|
||||||
class="button-c button-cancel panel-close"
|
|
||||||
@click="piyangoTeminatStore.ResetFormData">
|
|
||||||
Vazgeç
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div :class="['form-part', piyangoTeminatValidationStore.formChanged ? 'changed' : '']"> <div
|
|
||||||
class="form-part-content"
|
|
||||||
v-if="piyangoTeminatStore.loaded">
|
|
||||||
<form-select
|
|
||||||
v-if="usersStore.isPanelUser"
|
|
||||||
label="İşlem"
|
|
||||||
:listData="piyangoDataStore.piyangoTeminatDurumlari"
|
|
||||||
listText="value"
|
|
||||||
listVal="id"
|
|
||||||
v-model="piyangoTeminatStore.piyangoTeminatFormData.state"
|
|
||||||
required
|
|
||||||
:invalidText="piyangoTeminatValidationStore.invalidTexts.state"
|
|
||||||
@change="OnKeyup" />
|
|
||||||
|
|
||||||
<form-display
|
|
||||||
v-model="piyangoTeminatStore.piyangoTeminatFormData.amount"
|
|
||||||
half
|
|
||||||
label="Tutarı" />
|
|
||||||
|
|
||||||
<form-display
|
|
||||||
v-model="piyangoTeminatStore.piyangoTeminatFormData.teminatParentTypeText"
|
|
||||||
half
|
|
||||||
label="Para Birimi" />
|
|
||||||
|
|
||||||
<form-display
|
|
||||||
label="Teminat Türü"
|
|
||||||
half
|
|
||||||
v-model="piyangoTeminatStore.piyangoTeminatFormData.teminantChildTypeText" />
|
|
||||||
|
|
||||||
<form-display
|
|
||||||
type="date"
|
|
||||||
half
|
|
||||||
v-model="piyangoTeminatStore.piyangoTeminatFormData.teminantDate"
|
|
||||||
label="Tarih" />
|
|
||||||
|
|
||||||
<form-display
|
|
||||||
v-model="piyangoTeminatStore.piyangoTeminatFormData.teminantNo"
|
|
||||||
half
|
|
||||||
label="No" />
|
|
||||||
<div class="form-item form-item-half"></div>
|
|
||||||
|
|
||||||
<form-display
|
|
||||||
v-model="piyangoTeminatStore.piyangoTeminatFormData.bankName"
|
|
||||||
half
|
|
||||||
label="Banka Adı" />
|
|
||||||
|
|
||||||
<form-display
|
|
||||||
v-model="piyangoTeminatStore.piyangoTeminatFormData.bankBranch"
|
|
||||||
half
|
|
||||||
label="Banka Şubesi" />
|
|
||||||
|
|
||||||
<!--form-display
|
|
||||||
label="İşlem"
|
|
||||||
v-model="piyangoTeminatStore.piyangoTeminatFormData.stateText" /-->
|
|
||||||
|
|
||||||
<file-list-item
|
|
||||||
title="Dosya"
|
|
||||||
:data="piyangoTeminatStore.piyangoTeminatFormData"
|
|
||||||
:editable="false"
|
|
||||||
:filePath="piyangoTeminatStore.piyangoTeminatFormData.teminantDocumentUrl"
|
|
||||||
:usePath="true"
|
|
||||||
:onlyPreview="true" />
|
|
||||||
|
|
||||||
<form-display
|
|
||||||
v-model="piyangoTeminatStore.piyangoTeminatFormData.description"
|
|
||||||
label="Açıklama" />
|
|
||||||
</div></div>
|
|
||||||
|
|
||||||
</template>
|
|
||||||
<script setup lang="ts">
|
|
||||||
import { usePiyangoTeminatStore } from '../../stores/piyangoTeminatStore'
|
|
||||||
const piyangoTeminatStore = usePiyangoTeminatStore()
|
|
||||||
import { useUsersStore } from '@/stores/usersStore'
|
|
||||||
const usersStore = useUsersStore()
|
|
||||||
import { usePiyangoDataStore } from '../../stores/piyangoDataStore'
|
|
||||||
const piyangoDataStore = usePiyangoDataStore()
|
|
||||||
import { usePiyangoTeminatValidationStore } from '../../validation/piyangoTeminatValidationStore'
|
|
||||||
const piyangoTeminatValidationStore = usePiyangoTeminatValidationStore()
|
|
||||||
import { usePiyangoTeminatService } from '../../service/piyangoTeminatService'
|
|
||||||
const piyangoTeminatService = usePiyangoTeminatService()
|
|
||||||
|
|
||||||
const OnKeyup = () => {
|
|
||||||
piyangoTeminatValidationStore.formChanged = true
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
@ -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"
|
||||||
|
|||||||
@ -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"
|
||||||
|
|||||||
@ -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"
|
||||||
@ -602,7 +612,7 @@
|
|||||||
|
|
||||||
let list = await dataStore.dataGet('Auth/userbyuserChildList/' + id)
|
let list = await dataStore.dataGet('Auth/userbyuserChildList/' + id)
|
||||||
|
|
||||||
childUsers.value = list.data.filter((p:Record<string,any>) => {
|
childUsers.value = list.data.filter((p: Record<string, any>) => {
|
||||||
return p.islemTipId === 4 || p.islemTipi === 'Üyelik Onaylandı'
|
return p.islemTipId === 4 || p.islemTipi === 'Üyelik Onaylandı'
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@ -1,135 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="form-part form-title">
|
|
||||||
<div class="form-title-buttons">
|
|
||||||
<button
|
|
||||||
class="button-c button-save"
|
|
||||||
@click="piyangoTeminatService.SaveTeminatDurum"
|
|
||||||
:disabled="!piyangoTeminatValidationStore.formChanged">
|
|
||||||
Kaydet
|
|
||||||
</button>
|
|
||||||
<button
|
|
||||||
v-if="piyangoTeminatValidationStore.formChanged"
|
|
||||||
class="button-c button-cancel panel-close"
|
|
||||||
@click="piyangoTeminatStore.ResetFormData">
|
|
||||||
Vazgeç
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div :class="['form-part', piyangoTeminatValidationStore.formChanged ? 'changed' : '']">
|
|
||||||
<div class="form-part-title">
|
|
||||||
<h4>Teminat Durumu</h4>
|
|
||||||
</div>
|
|
||||||
<div class="form-part-content" v-if="piyangoTeminatStore.loaded">
|
|
||||||
<form-input
|
|
||||||
modelKey="amount"
|
|
||||||
v-model="piyangoTeminatStore.piyangoTeminatFormData.amount"
|
|
||||||
required
|
|
||||||
half
|
|
||||||
label="Tutarı"
|
|
||||||
minlength="2"
|
|
||||||
@keyup="OnKeyup"
|
|
||||||
@keydown="validationStore.allowPrice"
|
|
||||||
:invalidText="piyangoTeminatValidationStore.invalidTexts.amount" />
|
|
||||||
|
|
||||||
<form-select
|
|
||||||
modelKey="teminatParentType"
|
|
||||||
v-model="piyangoTeminatStore.piyangoTeminatFormData.teminatParentType"
|
|
||||||
required
|
|
||||||
half
|
|
||||||
label="Para Birimi"
|
|
||||||
:invalidText="piyangoTeminatValidationStore.invalidTexts.teminatParentType"
|
|
||||||
:listData="piyangoDataStore.piyangoTeminatParaBirimleri"
|
|
||||||
listVal="id"
|
|
||||||
listText="value"
|
|
||||||
@change="OnKeyup" />
|
|
||||||
|
|
||||||
<form-select
|
|
||||||
label="Teminat Türü"
|
|
||||||
:listData="piyangoDataStore.piyangoTeminatTurleri"
|
|
||||||
listText="value"
|
|
||||||
listVal="id"
|
|
||||||
half
|
|
||||||
v-model="piyangoTeminatStore.piyangoTeminatFormData.teminantChildType"
|
|
||||||
required
|
|
||||||
:invalidText="piyangoTeminatValidationStore.invalidTexts.teminantChildType"
|
|
||||||
@change="OnKeyup" />
|
|
||||||
|
|
||||||
<form-date
|
|
||||||
type="date"
|
|
||||||
half
|
|
||||||
required
|
|
||||||
modelKey="teminantDate"
|
|
||||||
v-model="piyangoTeminatStore.piyangoTeminatFormData.teminantDate"
|
|
||||||
label="Tarih"
|
|
||||||
:invalidText="piyangoTeminatValidationStore.invalidTexts.teminantDate"
|
|
||||||
@change="OnKeyup" />
|
|
||||||
|
|
||||||
<form-input
|
|
||||||
modelKey="teminantNo"
|
|
||||||
v-model="piyangoTeminatStore.piyangoTeminatFormData.teminantNo"
|
|
||||||
required
|
|
||||||
half
|
|
||||||
label="No"
|
|
||||||
minlength="2"
|
|
||||||
:invalidText="piyangoTeminatValidationStore.invalidTexts.teminantNo"
|
|
||||||
@keyup="OnKeyup" />
|
|
||||||
<div class="form-item form-item-half"></div>
|
|
||||||
|
|
||||||
<form-input
|
|
||||||
modelKey="bankName"
|
|
||||||
v-model="piyangoTeminatStore.piyangoTeminatFormData.bankName"
|
|
||||||
required
|
|
||||||
half
|
|
||||||
label="Banka Adı"
|
|
||||||
minlength="2"
|
|
||||||
:invalidText="piyangoTeminatValidationStore.invalidTexts.bankName"
|
|
||||||
@keyup="OnKeyup" />
|
|
||||||
|
|
||||||
<form-input
|
|
||||||
modelKey="bankBranch"
|
|
||||||
v-model="piyangoTeminatStore.piyangoTeminatFormData.bankBranch"
|
|
||||||
required
|
|
||||||
half
|
|
||||||
label="Banka Şubesi"
|
|
||||||
minlength="2"
|
|
||||||
:invalidText="piyangoTeminatValidationStore.invalidTexts.bankBranch"
|
|
||||||
@keyup="OnKeyup" />
|
|
||||||
|
|
||||||
<form-display :disabled="!usersStore.isPanelUser"
|
|
||||||
label="İşlem Durumu"
|
|
||||||
v-model="piyangoTeminatStore.piyangoTeminatFormData.stateText" />
|
|
||||||
|
|
||||||
<form-file
|
|
||||||
v-model="piyangoTeminatStore.piyangoTeminatFormData.file"
|
|
||||||
elclass="panel-documents-item"
|
|
||||||
:invalidText="piyangoTeminatValidationStore.invalidTexts.file"
|
|
||||||
@change="OnKeyup" />
|
|
||||||
|
|
||||||
<form-textarea
|
|
||||||
v-model="piyangoTeminatStore.piyangoTeminatFormData.description"
|
|
||||||
:invalidText="piyangoTeminatValidationStore.invalidTexts.description"
|
|
||||||
label="Açıklama"
|
|
||||||
@keyup="OnKeyup" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<script setup lang="ts">
|
|
||||||
import { usePiyangoDataStore } from '../../stores/piyangoDataStore'
|
|
||||||
const piyangoDataStore = usePiyangoDataStore()
|
|
||||||
import { usePiyangoServices } from '../../service/piyangoServices'
|
|
||||||
const piyangoServices = usePiyangoServices()
|
|
||||||
import { useValidationStore } from '@/stores/validationStore'
|
|
||||||
const validationStore = useValidationStore()
|
|
||||||
import { usePiyangoTeminatStore } from '../../stores/piyangoTeminatStore'
|
|
||||||
const piyangoTeminatStore = usePiyangoTeminatStore()
|
|
||||||
import { usePiyangoTeminatValidationStore } from '../../validation/piyangoTeminatValidationStore'
|
|
||||||
const piyangoTeminatValidationStore = usePiyangoTeminatValidationStore()
|
|
||||||
import { usePiyangoTeminatService } from '../../service/piyangoTeminatService'
|
|
||||||
const piyangoTeminatService = usePiyangoTeminatService()
|
|
||||||
import { useUsersStore } from '@/stores/usersStore'
|
|
||||||
const usersStore = useUsersStore()
|
|
||||||
|
|
||||||
const OnKeyup = () => {
|
|
||||||
piyangoTeminatValidationStore.formChanged = true
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
@ -10,7 +10,22 @@
|
|||||||
required
|
required
|
||||||
:invalidText="piyangoTeminatValidationStore.invalidTexts.state"
|
:invalidText="piyangoTeminatValidationStore.invalidTexts.state"
|
||||||
@change="OnKeyup"
|
@change="OnKeyup"
|
||||||
:disabled="!usersStore.isPanelUser"/>
|
:disabled="!usersStore.isPanelUser" />
|
||||||
|
|
||||||
|
<template v-if="piyangoTeminatStore.piyangoTeminatFormData.state === 2">
|
||||||
|
<form-date
|
||||||
|
type="date"
|
||||||
|
modelKey="iadeTarihi"
|
||||||
|
v-model="piyangoTeminatStore.piyangoTeminatFormData.iadeTarihi"
|
||||||
|
label="İlan Tarihi"
|
||||||
|
:invalidText="piyangoTeminatValidationStore.invalidTexts.iadeTarihi"
|
||||||
|
@change="OnKeyup" />
|
||||||
|
<form-file
|
||||||
|
v-model="piyangoTeminatStore.piyangoTeminatFormData.iadeFile"
|
||||||
|
elclass="panel-documents-item"
|
||||||
|
:invalidText="piyangoTeminatValidationStore.invalidTexts.iadeFile"
|
||||||
|
@change="OnKeyup" />
|
||||||
|
</template>
|
||||||
|
|
||||||
<form-display
|
<form-display
|
||||||
v-model="piyangoTeminatStore.piyangoTeminatFormData.amount"
|
v-model="piyangoTeminatStore.piyangoTeminatFormData.amount"
|
||||||
@ -51,7 +66,10 @@
|
|||||||
label="Banka Şubesi" />
|
label="Banka Şubesi" />
|
||||||
|
|
||||||
<file-list-item
|
<file-list-item
|
||||||
v-if="piyangoTeminatStore.piyangoTeminatFormData.teminantDocumentUrl !== null && piyangoTeminatStore.piyangoTeminatFormData.teminantDocumentUrl !== undefined"
|
v-if="
|
||||||
|
piyangoTeminatStore.piyangoTeminatFormData.teminantDocumentUrl !== null &&
|
||||||
|
piyangoTeminatStore.piyangoTeminatFormData.teminantDocumentUrl !== undefined
|
||||||
|
"
|
||||||
title="Dosya"
|
title="Dosya"
|
||||||
:data="piyangoTeminatStore.piyangoTeminatFormData"
|
:data="piyangoTeminatStore.piyangoTeminatFormData"
|
||||||
:editable="false"
|
:editable="false"
|
||||||
|
|||||||
@ -20,7 +20,10 @@ export const usePiyangoTeminatService = defineStore('piyangoTeminatService', ()
|
|||||||
let dataForm = new FormData()
|
let dataForm = new FormData()
|
||||||
|
|
||||||
dataForm.append('state', piyangoTeminatStore.piyangoTeminatFormData.state)
|
dataForm.append('state', piyangoTeminatStore.piyangoTeminatFormData.state)
|
||||||
dataForm.append('amount', globalStore.floatEnLocale(piyangoTeminatStore.piyangoTeminatFormData.amount))
|
dataForm.append(
|
||||||
|
'amount',
|
||||||
|
globalStore.floatEnLocale(piyangoTeminatStore.piyangoTeminatFormData.amount)
|
||||||
|
)
|
||||||
dataForm.append('bankName', piyangoTeminatStore.piyangoTeminatFormData.bankName)
|
dataForm.append('bankName', piyangoTeminatStore.piyangoTeminatFormData.bankName)
|
||||||
dataForm.append('bankBranch', piyangoTeminatStore.piyangoTeminatFormData.bankBranch)
|
dataForm.append('bankBranch', piyangoTeminatStore.piyangoTeminatFormData.bankBranch)
|
||||||
dataForm.append(
|
dataForm.append(
|
||||||
@ -43,6 +46,19 @@ export const usePiyangoTeminatService = defineStore('piyangoTeminatService', ()
|
|||||||
'description',
|
'description',
|
||||||
piyangoTeminatStore.piyangoTeminatFormData.description
|
piyangoTeminatStore.piyangoTeminatFormData.description
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if (usersStore.isPanelUser) {
|
||||||
|
if (piyangoTeminatStore.piyangoTeminatFormData.state !== 2) {
|
||||||
|
piyangoTeminatStore.piyangoTeminatFormData.iadeTarihi = ''
|
||||||
|
piyangoTeminatStore.piyangoTeminatFormData.iadeFile = ''
|
||||||
|
}
|
||||||
|
dataForm.append(
|
||||||
|
'iadeTarihi',
|
||||||
|
String(piyangoTeminatStore.piyangoTeminatFormData.iadeTarihi)
|
||||||
|
)
|
||||||
|
dataForm.append('iadeFile', piyangoTeminatStore.piyangoTeminatFormData.iadeFile)
|
||||||
|
}
|
||||||
|
|
||||||
if (piyangoTeminatStore.isNew) {
|
if (piyangoTeminatStore.isNew) {
|
||||||
form = await dataStore.dataPost('TeminantStates/', {
|
form = await dataStore.dataPost('TeminantStates/', {
|
||||||
data: dataForm,
|
data: dataForm,
|
||||||
|
|||||||
@ -23,7 +23,9 @@ export const usePiyangoTeminatStore = defineStore('piyangoTeminatStore', () => {
|
|||||||
cekilisId: piyangoStore.selectedLottery,
|
cekilisId: piyangoStore.selectedLottery,
|
||||||
kisiId: usersStore.userId,
|
kisiId: usersStore.userId,
|
||||||
description: '',
|
description: '',
|
||||||
file: ''
|
file: '',
|
||||||
|
iadeTarihi: '',
|
||||||
|
iadeFile: ''
|
||||||
})
|
})
|
||||||
|
|
||||||
const piyangoTeminatFormData = reactive<Record<string, any>>({})
|
const piyangoTeminatFormData = reactive<Record<string, any>>({})
|
||||||
@ -31,7 +33,7 @@ export const usePiyangoTeminatStore = defineStore('piyangoTeminatStore', () => {
|
|||||||
const loaded = ref<boolean>(false)
|
const loaded = ref<boolean>(false)
|
||||||
const isNew = ref<boolean>(false)
|
const isNew = ref<boolean>(false)
|
||||||
const teminatPanel = ref<boolean>(false)
|
const teminatPanel = ref<boolean>(false)
|
||||||
const selectedTeminatId = ref<number|null>(null)
|
const selectedTeminatId = ref<number | null>(null)
|
||||||
const refreshList = ref<boolean>(false)
|
const refreshList = ref<boolean>(false)
|
||||||
|
|
||||||
const ResetFormData = () => {
|
const ResetFormData = () => {
|
||||||
|
|||||||
@ -24,6 +24,12 @@ export const usePiyangoTeminatValidationStore = defineStore(
|
|||||||
'state',
|
'state',
|
||||||
'Lütfen işlem tipini seçiniz.'
|
'Lütfen işlem tipini seçiniz.'
|
||||||
)
|
)
|
||||||
|
validationStore.IsFieldEmpty(
|
||||||
|
piyangoTeminatStore.piyangoTeminatFormData,
|
||||||
|
invalidTexts,
|
||||||
|
'iadeTarihi',
|
||||||
|
'Lütfen iade tarihini seçiniz.'
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
validationStore.IsFieldEmpty(
|
validationStore.IsFieldEmpty(
|
||||||
|
|||||||
@ -60,13 +60,14 @@
|
|||||||
|
|
||||||
const CreateTabs = () => {
|
const CreateTabs = () => {
|
||||||
if (
|
if (
|
||||||
piyangoStore.lotteryApprove === 4 ||
|
(piyangoStore.lotteryApprove === 4 ||
|
||||||
piyangoStore.lotteryApprove === 10 ||
|
piyangoStore.lotteryApprove === 10 ||
|
||||||
piyangoStore.lotteryApprove === 11 ||
|
piyangoStore.lotteryApprove === 11 ||
|
||||||
piyangoStore.lotteryApprove === 12 ||
|
piyangoStore.lotteryApprove === 12 ||
|
||||||
piyangoStore.lotteryApprove === 13 ||
|
piyangoStore.lotteryApprove === 13 ||
|
||||||
piyangoStore.lotteryApprove === 14 ||
|
piyangoStore.lotteryApprove === 14 ||
|
||||||
usersStore.isPanelUser
|
usersStore.isPanelUser) &&
|
||||||
|
piyangoStore.lotteryPurposeId !== 3
|
||||||
) {
|
) {
|
||||||
tabList.value.push(
|
tabList.value.push(
|
||||||
{ text: 'Katılım Listesi', id: 'katilimcilistesi' },
|
{ text: 'Katılım Listesi', id: 'katilimcilistesi' },
|
||||||
@ -82,7 +83,7 @@
|
|||||||
}
|
}
|
||||||
tabList.value.push({ text: 'Onay Durumu', id: 'onaydurumu' })
|
tabList.value.push({ text: 'Onay Durumu', id: 'onaydurumu' })
|
||||||
|
|
||||||
if (piyangoStore.lotteryApprove !== 0) {
|
if (piyangoStore.lotteryApprove !== 0 && piyangoStore.lotteryPurposeId !== 3) {
|
||||||
tabList.value.push({ text: 'Teminat Listesi', id: 'teminatlistesi' })
|
tabList.value.push({ text: 'Teminat Listesi', id: 'teminatlistesi' })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -67,11 +67,25 @@
|
|||||||
const tableHeader = computed<Record<string, any>[]>(() => {
|
const tableHeader = computed<Record<string, any>[]>(() => {
|
||||||
let header: Record<string, any>[] = []
|
let header: Record<string, any>[] = []
|
||||||
|
|
||||||
|
header.push({
|
||||||
|
name: 'piyangoId',
|
||||||
|
title: 'Piyango Id',
|
||||||
|
sort: true,
|
||||||
|
style: { width: '10%' }
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
if (usersStore.isAraciFirma || usersStore.isPanelUser) {
|
if (usersStore.isAraciFirma || usersStore.isPanelUser) {
|
||||||
header.push({ name: 'duzenleyen', title: 'Düzenleyen' })
|
header.push({ name: 'duzenleyen', title: 'Düzenleyen' })
|
||||||
}
|
}
|
||||||
|
|
||||||
header.push(
|
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,14 +115,16 @@
|
|||||||
type: 'date',
|
type: 'date',
|
||||||
range: true
|
range: true
|
||||||
}
|
}
|
||||||
})
|
}
|
||||||
|
)
|
||||||
|
|
||||||
if (usersStore.isVakifDernek || usersStore.isPanelUser) {
|
if (usersStore.isVakifDernek || usersStore.isPanelUser) {
|
||||||
header.push({
|
header.push({
|
||||||
name: 'cekilisTarihi',
|
name: 'cekilisTarihi',
|
||||||
title: 'Çekiliş Tarihi',
|
title: 'Çekiliş Tarihi',
|
||||||
compute: (v: Record<string, any>): string => {
|
compute: (v: Record<string, any>): string => {
|
||||||
return dateStore.dateFormat({ date: v.cekilisTarihi })
|
if(v.piyangoAmacId === 3) return ''
|
||||||
|
else return dateStore.dateFormat({ date: v.cekilisTarihi })
|
||||||
},
|
},
|
||||||
sort: true,
|
sort: true,
|
||||||
filter: {
|
filter: {
|
||||||
|
|||||||
@ -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',
|
||||||
|
|||||||
@ -1,65 +1,56 @@
|
|||||||
<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-input
|
|
||||||
v-model='panelPopup.url'
|
|
||||||
label='Url' />
|
|
||||||
<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"
|
||||||
listText="label"
|
listText="label"
|
||||||
listVal="val"
|
listVal="val"
|
||||||
v-model="panelPopup.durum" >
|
v-model="panelPopup.durum">
|
||||||
<template #checktext0>
|
<template #checktext0>
|
||||||
<span>
|
<span>Aktif</span>
|
||||||
Aktif
|
|
||||||
</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'
|
||||||
@ -68,6 +59,8 @@
|
|||||||
import PanelWrapper from '@/components/PanelWrapper.vue'
|
import PanelWrapper from '@/components/PanelWrapper.vue'
|
||||||
import { useGlobalStore } from '@/stores/globalStore'
|
import { useGlobalStore } from '@/stores/globalStore'
|
||||||
const globalStore = useGlobalStore()
|
const globalStore = useGlobalStore()
|
||||||
|
import { useDialogStore } from '@/components/global/dialogStore'
|
||||||
|
const dialogStore = useDialogStore()
|
||||||
|
|
||||||
const Checker = ref([
|
const Checker = ref([
|
||||||
{
|
{
|
||||||
@ -80,8 +73,8 @@
|
|||||||
const isUpdate = ref<boolean>(false)
|
const isUpdate = ref<boolean>(false)
|
||||||
|
|
||||||
const refresh = ref<boolean>(false)
|
const refresh = ref<boolean>(false)
|
||||||
const panelPopup = ref<Record<string,any>>({})
|
const panelPopup = ref<Record<string, any>>({})
|
||||||
const popups = ref<Record<string,any>[]>([])
|
const popups = ref<Record<string, any>[]>([])
|
||||||
|
|
||||||
const tableHeader = ref<Record<string, any>[]>([
|
const tableHeader = ref<Record<string, any>[]>([
|
||||||
{
|
{
|
||||||
@ -94,7 +87,7 @@
|
|||||||
title: 'Resim Url',
|
title: 'Resim Url',
|
||||||
computeHtml: (v: Record<string, any>) => {
|
computeHtml: (v: Record<string, any>) => {
|
||||||
if (v.resimUrl !== null && v.resimUrl !== undefined) {
|
if (v.resimUrl !== null && v.resimUrl !== undefined) {
|
||||||
return globalStore.TableCellDocument(v.resimUrl)
|
return `<a href="${ v.resimUrl }" target="_blank" onclick="event.stopPropagation()"><img class="table-cell-image" src="${ v.resimUrl }" /></a>`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -116,6 +109,40 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
])
|
])
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
@ -127,7 +154,6 @@
|
|||||||
return URL.createObjectURL(panelPopup.value.resimUrl)
|
return URL.createObjectURL(panelPopup.value.resimUrl)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
const OpenMenu = (row: any) => {
|
const OpenMenu = (row: any) => {
|
||||||
router.push('slider-yonetimi/' + row.id)
|
router.push('slider-yonetimi/' + row.id)
|
||||||
}
|
}
|
||||||
@ -136,29 +162,28 @@
|
|||||||
panelPopup.value = {
|
panelPopup.value = {
|
||||||
baslik: '',
|
baslik: '',
|
||||||
resimUrl: '',
|
resimUrl: '',
|
||||||
url:'',
|
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 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:any = 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' }
|
||||||
})
|
})
|
||||||
@ -167,8 +192,7 @@
|
|||||||
isUpdate.value = false
|
isUpdate.value = false
|
||||||
refresh.value = true
|
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' }
|
||||||
@ -179,7 +203,6 @@
|
|||||||
refresh.value = true
|
refresh.value = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style>
|
||||||
|
|||||||
@ -10,24 +10,64 @@
|
|||||||
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>[]>([
|
||||||
{
|
{
|
||||||
name: 'title',
|
name: 'title',
|
||||||
title: 'Sayfa Başlığı',
|
title: 'Sayfa Başlığı',
|
||||||
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)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,73 +1,66 @@
|
|||||||
<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 { useDialogStore } from '@/components/global/dialogStore'
|
||||||
|
import { useGlobalStore } from '@/stores/globalStore'
|
||||||
|
const globalStore = useGlobalStore()
|
||||||
|
|
||||||
|
const dialogStore = useDialogStore()
|
||||||
|
|
||||||
const dataStore = useDataStore()
|
const dataStore = useDataStore()
|
||||||
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 refresh = ref<boolean>(false)
|
||||||
const panelSlider = ref<Record<string,any>>({})
|
const panelSlider = ref<Record<string, any>>({})
|
||||||
const sliders = ref<Record<string,any>[]>([])
|
const sliders = ref<Record<string, any>[]>([])
|
||||||
|
|
||||||
const tableHeader = ref<Record<string, any>[]>([
|
const tableHeader = ref<Record<string, any>[]>([
|
||||||
{
|
{
|
||||||
@ -83,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 `<a href="${ v.resimUrl }" target="_blank" onclick="event.stopPropagation()"><img class="table-cell-image" src="${ v.resimUrl }" /></a>`
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'url',
|
name: 'url',
|
||||||
@ -91,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
|
||||||
|
|
||||||
@ -114,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
|
||||||
}
|
}
|
||||||
@ -130,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)
|
||||||
@ -140,7 +169,7 @@
|
|||||||
formData.append('ResimUrl', panelSlider.value.resimUrl)
|
formData.append('ResimUrl', panelSlider.value.resimUrl)
|
||||||
}
|
}
|
||||||
|
|
||||||
let update:any = dataStore.dataPut('Slider/'+panelSlider.value.id,{
|
let update: any = dataStore.dataPut('Slider/' + panelSlider.value.id, {
|
||||||
data: formData,
|
data: formData,
|
||||||
headers: { 'Content-Type': 'multipart/form-data' }
|
headers: { 'Content-Type': 'multipart/form-data' }
|
||||||
})
|
})
|
||||||
@ -149,8 +178,7 @@
|
|||||||
isUpdate.value = false
|
isUpdate.value = false
|
||||||
refresh.value = true
|
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' }
|
||||||
@ -161,12 +189,7 @@
|
|||||||
refresh.value = true
|
refresh.value = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
|
||||||
loadSliders()
|
|
||||||
})
|
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style>
|
||||||
.image-preview-wrapper {
|
.image-preview-wrapper {
|
||||||
|
|||||||
@ -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://panelapi.cekilisevi.gov.tr/')
|
const siteBase = ref<string>(import.meta.env.VITE_API_URL)
|
||||||
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>>({})
|
||||||
|
|||||||
@ -11,5 +11,8 @@ export default defineConfig({
|
|||||||
alias: {
|
alias: {
|
||||||
'@': fileURLToPath(new URL('./src', import.meta.url))
|
'@': fileURLToPath(new URL('./src', import.meta.url))
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
esbuild: {
|
||||||
|
drop: process.env.NODE_ENV === 'production' ? ['console', 'debugger'] : []
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user