Compare commits
37 Commits
99c7c1fc52
...
FileListIt
| Author | SHA1 | Date | |
|---|---|---|---|
| b521ad0278 | |||
| 7cff75e82c | |||
| 92d0a0dde7 | |||
| a4e2a922d3 | |||
| 190815193a | |||
| 26f843416d | |||
| 7adabf5abd | |||
| ed8b6fd3eb | |||
| 7776e24ddd | |||
| 408724cf67 | |||
| f4c0511afb | |||
| 7998b7bd6c | |||
| 6ff319cb1d | |||
| 10011eacd6 | |||
| 36d646e0bf | |||
| 908e63b896 | |||
| 0e130eafff | |||
| f6850853b2 | |||
| ff0304b4d9 | |||
| 9a66af25c2 | |||
| 67378a365a | |||
| 4eced25f06 | |||
| c9e3092e48 | |||
| 942df94b65 | |||
| 40eb05d618 | |||
| 14a9362266 | |||
| 6e3bba6e53 | |||
| d6deb5ab09 | |||
| ae583a7dc5 | |||
| de5f129bda | |||
| 016c0b09d4 | |||
| 2aee11cf9a | |||
| 85fe0fb6ba | |||
| 7349f1b5fa | |||
| 29a2448fb6 | |||
| 6afb24332c | |||
| 32486af507 |
2
.env.development
Normal file
2
.env.development
Normal file
@ -0,0 +1,2 @@
|
||||
VITE_API_URL=http://panelapi.cekilisevitest.gov.tr/
|
||||
VITE_SOCKET_URL=https://panelapi.cekilisevitest.gov.tr/uploadHub
|
||||
2
.env.localdev
Normal file
2
.env.localdev
Normal file
@ -0,0 +1,2 @@
|
||||
VITE_API_URL=https://localhost:7241/
|
||||
VITE_SOCKET_URL=https://localhost:7241/uploadHub
|
||||
2
.env.production
Normal file
2
.env.production
Normal file
@ -0,0 +1,2 @@
|
||||
VITE_API_URL=https://panelapi.cekilisevi.gov.tr/
|
||||
VITE_SOCKET_URL=https://panelapi.cekilisevi.gov.tr/uploadHub
|
||||
7
env.d.ts
vendored
7
env.d.ts
vendored
@ -1,2 +1,9 @@
|
||||
/// <reference types="vite/client" />
|
||||
|
||||
interface ImportMetaEnv {
|
||||
readonly VITE_API_URL: string;
|
||||
}
|
||||
|
||||
interface ImportMeta {
|
||||
readonly env: ImportMetaEnv;
|
||||
}
|
||||
@ -1,7 +1,7 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="tr">
|
||||
<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">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>MPİ KNOP Panel</title>
|
||||
|
||||
@ -5,9 +5,12 @@
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"localdev": "vite",
|
||||
"build": "run-p type-check \"build-only {@}\" --",
|
||||
"buildtest": "run-p type-check \"build-only-test {@}\" --",
|
||||
"preview": "vite preview",
|
||||
"build-only": "vite build",
|
||||
"build-only-test": "vite build --mode development",
|
||||
"type-check": "vue-tsc --build --force"
|
||||
},
|
||||
"dependencies": {
|
||||
|
||||
BIN
public/data/cekilisevi-gov-tr-uyelik-sozlesmesi.pdf
Normal file
BIN
public/data/cekilisevi-gov-tr-uyelik-sozlesmesi.pdf
Normal file
Binary file not shown.
BIN
public/data/kvkk-sartlari.pdf
Normal file
BIN
public/data/kvkk-sartlari.pdf
Normal file
Binary file not shown.
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 |
@ -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"
|
||||
/>
|
||||
</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>
|
||||
|
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 43 KiB |
@ -314,6 +314,7 @@ table.table-colored tbody tr:hover {
|
||||
|
||||
.table-cell-image {
|
||||
max-height: 100px;
|
||||
border: 1px solid #ececec;
|
||||
}
|
||||
|
||||
.table-cell-flx-row {
|
||||
@ -658,7 +659,9 @@ svg {
|
||||
max-width: 24px;
|
||||
max-height: 24px;
|
||||
}
|
||||
|
||||
.ico-c.ico-btn:hover{
|
||||
background-color: navy;
|
||||
}
|
||||
/* colors */
|
||||
.back-grad {
|
||||
padding: 6px 8px;
|
||||
@ -714,7 +717,11 @@ svg {
|
||||
color: #000;
|
||||
padding: 12px;
|
||||
}
|
||||
|
||||
.back-grad-dgrey {
|
||||
background-image: linear-gradient(24deg, #797979, #a1a1a1);
|
||||
color: #000;
|
||||
padding: 12px;
|
||||
}
|
||||
.back-grey {
|
||||
background-color: #f1f1f1;
|
||||
}
|
||||
|
||||
@ -7,12 +7,12 @@
|
||||
<div class="table-head-content">Sıra No</div>
|
||||
</th>
|
||||
<template v-for="(headCell, h) in tableHeader">
|
||||
<th :style="headCell.style || ''">
|
||||
<th :style="[headCell.style || '']">
|
||||
<div
|
||||
:class="[
|
||||
'table-head-content',
|
||||
headCell.sort !== undefined && headCell.sort ? 'clickable' : ''
|
||||
]"
|
||||
]"
|
||||
@click="SortColumn(headCell)">
|
||||
<span>{{ headCell.title }}</span>
|
||||
<template
|
||||
@ -47,13 +47,16 @@
|
||||
</div>
|
||||
</th>
|
||||
</template>
|
||||
<th
|
||||
:style="[rowActionStyle || '']"
|
||||
v-if="rowActions !== undefined && rowActions.length > 0">
|
||||
<div class="table-head-content">İşlemler</div>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-if="tableData.length === 0 && !isPreview">
|
||||
<td :colspan="rowNumber ? tableHeader.length + 1 : tableHeader.length">
|
||||
Veri bulunamadı
|
||||
</td>
|
||||
<td :colspan="ColSpan">Veri bulunamadı</td>
|
||||
</tr>
|
||||
<tr
|
||||
v-else
|
||||
@ -77,16 +80,37 @@
|
||||
:name="'dataCell' + j"
|
||||
:cellData="CellData(dataRow, dataCell.name)"
|
||||
:cellIndex="j">
|
||||
{{
|
||||
dataCell.compute !== undefined
|
||||
? dataCell.compute(dataRow)
|
||||
: dataRow[dataCell.name]
|
||||
}}
|
||||
<div class="table-inner-content">
|
||||
{{
|
||||
dataCell.compute !== undefined
|
||||
? dataCell.compute(dataRow)
|
||||
: dataRow[dataCell.name]
|
||||
}}
|
||||
</div>
|
||||
</slot>
|
||||
</td>
|
||||
<td v-else v-html="dataCell.computeHtml(dataRow)"></td>
|
||||
</template>
|
||||
</slot>
|
||||
<td
|
||||
v-if="rowActions !== undefined && rowActions.length > 0"
|
||||
:class="[actionFixed ? 'action-fixed' : '']">
|
||||
<template v-for="(action, ai) in rowActions">
|
||||
<button
|
||||
:class="[
|
||||
'button-c button-icon button-export',
|
||||
action.class !== undefined ? 'back-grad back-grad-' + action.class : ''
|
||||
]"
|
||||
@click="LocalRowDataAction($event, action.action, dataRow, i)">
|
||||
<i class="ico-c" v-if="action.icon !== undefined">
|
||||
<svg>
|
||||
<use :href="icourl + '#' + action.icon"></use>
|
||||
</svg>
|
||||
</i>
|
||||
<span class="panel-date">{{ action.text }}</span>
|
||||
</button>
|
||||
</template>
|
||||
</td>
|
||||
</tr>
|
||||
<template
|
||||
v-if="
|
||||
@ -120,6 +144,7 @@
|
||||
import { ref, reactive, computed, watch } from 'vue'
|
||||
import type { Ref } from 'vue'
|
||||
import { useGlobalStore } from '@/stores/globalStore'
|
||||
import icourl from '@/assets/images/icons.svg'
|
||||
const globalStore = useGlobalStore()
|
||||
|
||||
interface ITableHead {
|
||||
@ -150,11 +175,15 @@
|
||||
rowNumber?: boolean
|
||||
totalValues?: Record<string, any>
|
||||
isPreview?: boolean
|
||||
rowActions?: Record<string, any>[]
|
||||
actionFixed?: boolean
|
||||
rowActionStyle?: string
|
||||
}
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
tableData: () => [],
|
||||
rowNumber: false,
|
||||
isPreview: false
|
||||
isPreview: false,
|
||||
actionFixed: false
|
||||
})
|
||||
|
||||
const emit = defineEmits(['update:sortData', 'update:pagination'])
|
||||
@ -186,9 +215,27 @@
|
||||
}
|
||||
})
|
||||
|
||||
const ColSpan = computed<number>(() => {
|
||||
var span = props.tableHeader.length
|
||||
if (props.rowNumber) span++
|
||||
if (props.rowActions) span++
|
||||
return span
|
||||
})
|
||||
const LocalRowAction = (d: Record<string, any>) => {
|
||||
if (props.rowAction !== undefined) {
|
||||
(props.rowAction! as Function)(d)
|
||||
;(props.rowAction! as Function)(d)
|
||||
}
|
||||
}
|
||||
|
||||
const LocalRowDataAction = (
|
||||
e: Event,
|
||||
action: Function | undefined,
|
||||
dataRow: Record<string, any>,
|
||||
i: number | string
|
||||
) => {
|
||||
if (action !== undefined) {
|
||||
e.stopImmediatePropagation()
|
||||
action(dataRow, i)
|
||||
}
|
||||
}
|
||||
|
||||
@ -223,3 +270,20 @@
|
||||
{ deep: true }
|
||||
)
|
||||
</script>
|
||||
<style scoped>
|
||||
.action-fixed {
|
||||
position: absolute;
|
||||
z-index: 9;
|
||||
top: 0;
|
||||
right: 0;
|
||||
}
|
||||
.table-inner-content {
|
||||
max-height: 400px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
-webkit-line-clamp: 20;
|
||||
line-clamp: 20;
|
||||
-webkit-box-orient: vertical;
|
||||
display: -webkit-box;
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -19,7 +19,7 @@
|
||||
v-for="(button, i) in dialogData.buttons">
|
||||
<button
|
||||
:class="['button-c', 'button-' + button.type]"
|
||||
@click="button.function(id, button.data)">
|
||||
@click="LocalFunction(button.function, id, button.data)">
|
||||
{{ button.label }}
|
||||
</button>
|
||||
</template>
|
||||
@ -42,7 +42,7 @@
|
||||
const dialogStore = useDialogStore()
|
||||
|
||||
export interface Props {
|
||||
id: number
|
||||
id: number | string
|
||||
dialogData: Record<string, any>
|
||||
}
|
||||
const props = withDefaults(defineProps<Props>(), {})
|
||||
@ -60,7 +60,13 @@
|
||||
const CreateData = () => {
|
||||
Object.assign(localData, props.dialogData)
|
||||
}
|
||||
|
||||
const LocalFunction = (
|
||||
fun: Function | undefined,
|
||||
id: string | number,
|
||||
data: Record<string, any>
|
||||
) => {
|
||||
if (fun !== undefined) fun(id, data)
|
||||
}
|
||||
const CloseDialog = () => {
|
||||
delete dialogStore.dialogs[props.id]
|
||||
}
|
||||
|
||||
@ -18,12 +18,15 @@
|
||||
{{ fileName }}
|
||||
</div>
|
||||
</a>
|
||||
<i
|
||||
class="ico-c ico-section ico-section-header-btn ico-replace"
|
||||
@click="OnClick"
|
||||
v-if="editable">
|
||||
<svg><use href="/src/assets/images/icons.svg#replace"></use></svg>
|
||||
</i>
|
||||
<div class="actions-c" v-if="editable || $slots.actionButtons">
|
||||
<slot name="actionButtons"></slot>
|
||||
<i
|
||||
class="ico-c ico-section ico-btn back-grad-dgrey"
|
||||
@click="OnClick"
|
||||
v-if="editable">
|
||||
<svg><use href="/src/assets/images/icons.svg#replace"></use></svg>
|
||||
</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@ -35,12 +38,15 @@
|
||||
</div>
|
||||
<div v-else>{{ fileType.toLocaleUpperCase() }}</div>
|
||||
</a>
|
||||
<i
|
||||
class="ico-c ico-section ico-section-header-btn ico-replace"
|
||||
@click="OnClick"
|
||||
v-if="editable">
|
||||
<svg><use href="/src/assets/images/icons.svg#replace"></use></svg>
|
||||
</i>
|
||||
<div class="actions-c actions-top" v-if="editable || $slots.actionButtons">
|
||||
<slot name="actionButtons"></slot>
|
||||
<i
|
||||
class="ico-c ico-section ico-btn back-grad-dgrey"
|
||||
@click="OnClick"
|
||||
v-if="editable">
|
||||
<svg><use href="/src/assets/images/icons.svg#replace"></use></svg>
|
||||
</i>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</template>
|
||||
@ -75,8 +81,8 @@
|
||||
|
||||
if (props.filePath !== undefined && props.filePath !== null) {
|
||||
localFilePath.value = props.usePath
|
||||
? props.filePath as string
|
||||
: (axios.defaults.baseURL as string + props.filePath as string) as string
|
||||
? (props.filePath as string)
|
||||
: (((axios.defaults.baseURL as string) + props.filePath) as string as string)
|
||||
|
||||
fileType.value = globalStore.FileType(localFilePath.value)
|
||||
fileName.value = globalStore.FileName(localFilePath.value)
|
||||
@ -96,8 +102,29 @@
|
||||
() => props.filePath,
|
||||
() => {
|
||||
localFilePath.value = props.usePath
|
||||
? props.filePath as string
|
||||
: (axios.defaults.baseURL as string + props.filePath as string) as string
|
||||
? (props.filePath as string)
|
||||
: (((axios.defaults.baseURL as string) + props.filePath) as string as string)
|
||||
}
|
||||
)
|
||||
</script>
|
||||
<style scoped>
|
||||
.actions-c {
|
||||
display: flex;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
height: 100%;
|
||||
padding: 8px;
|
||||
align-items: center;
|
||||
pointer-events: fill;
|
||||
}
|
||||
.actions-c.actions-top{
|
||||
align-items: flex-start;
|
||||
}
|
||||
.form-item-picture.only-image{
|
||||
width: 140px;
|
||||
height: 140px;
|
||||
}
|
||||
.actions-c .ico-btn:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -6,7 +6,9 @@
|
||||
{{ title }}
|
||||
<i v-if="required" class="form-item-alert">*</i>
|
||||
</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
|
||||
type="checkbox"
|
||||
v-model="localValue"
|
||||
@ -72,7 +74,7 @@
|
||||
val?: number | string | boolean
|
||||
label?: string
|
||||
disabled?: boolean
|
||||
modelValue: (string | number)[] | boolean | string | number | null
|
||||
modelValue: (string | number)[] | boolean | string | number | null | undefined
|
||||
half?: boolean
|
||||
title?: string
|
||||
invalidText?: string
|
||||
@ -89,7 +91,7 @@
|
||||
|
||||
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
|
||||
)
|
||||
|
||||
|
||||
@ -14,7 +14,9 @@
|
||||
</span>
|
||||
<template v-if="modelText !== undefined && modelText !== ''">
|
||||
<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 v-if="typeof modelText === 'object'">
|
||||
<ul>
|
||||
@ -25,7 +27,9 @@
|
||||
</template>
|
||||
</template>
|
||||
<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>
|
||||
<span
|
||||
class="form-item-alert"
|
||||
@ -64,6 +68,7 @@
|
||||
modelText?: any
|
||||
invalidText?: string
|
||||
price?: boolean
|
||||
size?: number | string
|
||||
}
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
half: false,
|
||||
@ -71,13 +76,23 @@
|
||||
})
|
||||
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({
|
||||
date: props.modelValue as Date,
|
||||
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({
|
||||
date: props.modelValue as Date,
|
||||
pattern: 'dd-mm-yy-t'
|
||||
@ -108,3 +123,14 @@
|
||||
}
|
||||
)
|
||||
</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"
|
||||
:rowNumber="rowNumber"
|
||||
:totalValues="localTotalValues"
|
||||
:isPreview="isPreview" />
|
||||
:isPreview="isPreview"
|
||||
:rowActions="rowActions"
|
||||
:actionFixed="actionFixed"
|
||||
:rowActionStyle="rowActionStyle" />
|
||||
</slot>
|
||||
</div>
|
||||
|
||||
@ -194,6 +197,9 @@
|
||||
rowNumber?: boolean
|
||||
totalValues?: Record<string, any>
|
||||
isPreview?: boolean
|
||||
rowActions?: Record<string, any>[]
|
||||
actionFixed?: boolean
|
||||
rowActionStyle?:string
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
@ -205,7 +211,8 @@
|
||||
export: true,
|
||||
search: true,
|
||||
rowNumber: false,
|
||||
isPreview: false
|
||||
isPreview: false,
|
||||
actionFixed:false
|
||||
})
|
||||
|
||||
const emit = defineEmits([
|
||||
@ -360,7 +367,7 @@
|
||||
searchForm.value = false
|
||||
mobileButtons.value = !mobileButtons.value
|
||||
}
|
||||
const OpenSearchForm = (e: Event) => {
|
||||
const OpenSearchForm = (e: Event) => {
|
||||
searchFieldPos.value = ''
|
||||
if (globalStore.screenWidth <= globalStore.breakPoints.tabletp) {
|
||||
mobileButtons.value = false
|
||||
|
||||
@ -7,11 +7,13 @@ export const useDialogStore = defineStore('dialogStore', () => {
|
||||
const CreateDialog = (data: Record<string, any>) => {
|
||||
const rnd: number = Number(Math.floor(Math.random() * 10000000000))
|
||||
|
||||
dialogs[rnd] = {} as Record<string, any>
|
||||
dialogs[rnd].id = rnd
|
||||
dialogs[rnd].data = data
|
||||
const localId = data.id || rnd
|
||||
|
||||
dialogs[localId] = {} as Record<string, any>
|
||||
dialogs[localId].id = localId
|
||||
dialogs[localId].data = data
|
||||
}
|
||||
const CloseDialog = (id: number) => {
|
||||
const CloseDialog = (id: number | string) => {
|
||||
delete dialogs[id]
|
||||
}
|
||||
return {
|
||||
|
||||
@ -2,7 +2,7 @@ import axios from 'axios'
|
||||
import { useUsersStore } from '@/stores/usersStore'
|
||||
import router from '@/router'
|
||||
|
||||
axios.defaults.baseURL = 'http://panel.cekilisevi.gov.tr:5001/'
|
||||
axios.defaults.baseURL = import.meta.env.VITE_API_URL
|
||||
//axios.defaults.timeout = 2000;
|
||||
axios.defaults.headers['Content-Type'] = 'application/json; charset=utf-8'
|
||||
import { useDataStore } from '@/stores/dataStore'
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
</i>
|
||||
<a href="/" class="logo-header">
|
||||
<img
|
||||
src="@/assets/images/cekilisevi-logo-1.png"
|
||||
src="@/assets/images/cekilisevi-logo-n.png"
|
||||
alt="MPI Çekiliş Evi"/>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@ -109,7 +109,7 @@
|
||||
{
|
||||
title: 'Site Yönetimi',
|
||||
ico: 'sitemanagement',
|
||||
show: usersStore.isPanelUser && !usersStore.isAccounting,
|
||||
show: usersStore.isSuperAdmin,
|
||||
sub: [
|
||||
{
|
||||
title: 'Yeni Sayfa',
|
||||
@ -122,6 +122,14 @@
|
||||
{
|
||||
title: 'Menü Yönetimi',
|
||||
to: '/site-yonetimi/menu-listesi'
|
||||
},
|
||||
{
|
||||
title: 'Slider Yönetimi',
|
||||
to: '/site-yonetimi/slider-listesi'
|
||||
},
|
||||
{
|
||||
title: 'Popup Yönetimi',
|
||||
to: '/site-yonetimi/popup-listesi'
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
<div class="login-header">
|
||||
<div class="logo-header">
|
||||
<img
|
||||
src="@/assets/images/cekilisevi-logo-1.png"
|
||||
src="@/assets/images/cekilisevi-logo-n.png"
|
||||
alt="MPI Çekiliş Evi"/>
|
||||
</div>
|
||||
<h1>Şifremi Unuttum</h1>
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
<div class="login-header">
|
||||
<div class="logo-header">
|
||||
<img
|
||||
src="@/assets/images/cekilisevi-logo-1.png"
|
||||
src="@/assets/images/cekilisevi-logo-n.png"
|
||||
alt="MPI Çekiliş Evi"/>
|
||||
</div>
|
||||
<h1>Giriş Yap</h1>
|
||||
|
||||
@ -3,9 +3,7 @@
|
||||
<section class="section-login">
|
||||
<div class="login-header">
|
||||
<div class="logo-header">
|
||||
<img
|
||||
src="@/assets/images/cekilisevi-logo-1.png"
|
||||
alt="MPI Çekiliş Evi"/>
|
||||
<img src="@/assets/images/cekilisevi-logo-n.png" alt="MPI Çekiliş Evi" />
|
||||
</div>
|
||||
<h1>Üye Ol</h1>
|
||||
</div>
|
||||
@ -306,7 +304,12 @@
|
||||
:invalidText="uyeBilgileriStore.invalidTexts.kvkk">
|
||||
<template #checktext0>
|
||||
<span>
|
||||
<a href="#">KVKK Şartlarını</a>
|
||||
<a
|
||||
href="/data/kvkk-sartlari.pdf"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer">
|
||||
KVKK Şartlarını
|
||||
</a>
|
||||
Kabul Ediyorum
|
||||
</span>
|
||||
</template>
|
||||
@ -320,7 +323,12 @@
|
||||
:invalidText="uyeBilgileriStore.invalidTexts.uyelikSozlesmesi">
|
||||
<template #checktext0>
|
||||
<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
|
||||
</span>
|
||||
</template>
|
||||
@ -409,7 +417,8 @@
|
||||
if (register !== 'errorfalse') {
|
||||
authValidationStore.registerMessage = register.message
|
||||
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
|
||||
|
||||
router.push('/login')
|
||||
@ -419,7 +428,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
onBeforeMount(async () => {
|
||||
await dataStore.GetCustomerTipList()
|
||||
await dataStore.GetIlList()
|
||||
|
||||
@ -1,34 +1,34 @@
|
||||
<template>
|
||||
<section class='section-list'>
|
||||
<section class="section-list">
|
||||
<list-table-content
|
||||
:tableHeader='tableHeader'
|
||||
icon='draws'
|
||||
title='Katılım Listesi'
|
||||
listText='Katılımcı'
|
||||
:rowAction='OpenUser'
|
||||
:tableHeader="tableHeader"
|
||||
icon="draws"
|
||||
title="Katılım Listesi"
|
||||
listText="Katılımcı"
|
||||
:rowAction="OpenUser"
|
||||
:apiList="'Katilimci/ByCekilisId/' + piyangoStore.selectedLottery"
|
||||
v-model:pagination='paginationData'
|
||||
v-model:refresh='piyangoKatilimciStore.refreshPiyangoKatilimciList'>
|
||||
v-model:pagination="paginationData"
|
||||
v-model:refresh="piyangoKatilimciStore.refreshPiyangoKatilimciList">
|
||||
<template #extraButtons>
|
||||
<button
|
||||
class='button-c'
|
||||
@click='piyangoKatilimciService.CreateOnlineDraw'
|
||||
v-if='
|
||||
class="button-c"
|
||||
@click="piyangoKatilimciService.CreateOnlineDraw"
|
||||
v-if="
|
||||
paginationData.totalRecords > 0 &&
|
||||
usersStore.isPanelUser &&
|
||||
!piyangoStore.lotteryDrawState &&
|
||||
!piyangoStore.lotteryDrawState &&
|
||||
piyangoStore.lotteryApprove === 4 &&
|
||||
piyangoStore.lotteryData.cekilisYontemiId === 2
|
||||
'>
|
||||
">
|
||||
Online Çekiliş Düzenle
|
||||
</button>
|
||||
<a href='/data/ornek-katilimci-listesi.xlsx' target='_blank' class='button-c'>
|
||||
<a href="/data/ornek-katilimci-listesi.xlsx" target="_blank" class="button-c">
|
||||
Örnek Katılımcı Dosyası İndir
|
||||
</a>
|
||||
<button
|
||||
class='button-c'
|
||||
@click='AddNewDocument'
|
||||
v-if='!usersStore.isPanelUser && !piyangoStore.lotteryDrawState'>
|
||||
class="button-c"
|
||||
@click="AddNewDocument"
|
||||
v-if="!usersStore.isPanelUser && !piyangoStore.lotteryDrawState">
|
||||
Katılımcı Dosyası Yükle
|
||||
</button>
|
||||
<button
|
||||
@ -38,9 +38,8 @@
|
||||
paginationData.totalRecords > 0 &&
|
||||
usersStore.isPanelUser &&
|
||||
!piyangoStore.lotteryDrawState &&
|
||||
(piyangoStore.lotteryApprove === 7 || piyangoStore.lotteryApprove === 14)
|
||||
(piyangoStore.lotteryApprove === 7 || piyangoStore.lotteryApprove === 14)
|
||||
">
|
||||
|
||||
Tüm katılımcıları Sil
|
||||
</button>
|
||||
<button
|
||||
@ -51,20 +50,20 @@
|
||||
</template>
|
||||
</list-table-content>
|
||||
<panel-wrapper
|
||||
v-if='piyangoKatilimciStore.katilimciFilePanel'
|
||||
v-model='piyangoKatilimciStore.katilimciFilePanel'
|
||||
panel-title='Katılımcı Dosyası Yükle'>
|
||||
v-if="piyangoKatilimciStore.katilimciFilePanel"
|
||||
v-model="piyangoKatilimciStore.katilimciFilePanel"
|
||||
panel-title="Katılımcı Dosyası Yükle">
|
||||
<template #panelContent>
|
||||
<panel-katilimci-document />
|
||||
</template>
|
||||
<template #footerButton>
|
||||
<button class='button-c button-save' @click='FileUpload'>Yükle</button>
|
||||
<button class="button-c button-save" @click="FileUpload" :disabled="uploadProgressPanel">Yükle</button>
|
||||
</template>
|
||||
</panel-wrapper>
|
||||
<panel-wrapper
|
||||
wide
|
||||
v-if='piyangoKatilimciStore.katilimciUserPanel'
|
||||
v-model='piyangoKatilimciStore.katilimciUserPanel'
|
||||
v-if="piyangoKatilimciStore.katilimciUserPanel"
|
||||
v-model="piyangoKatilimciStore.katilimciUserPanel"
|
||||
:panel-title="
|
||||
piyangoKatilimciStore.isPiyangoKatilimciUserUpdate
|
||||
? 'Katılımcı Düzenle'
|
||||
@ -73,11 +72,11 @@
|
||||
<template #panelContent>
|
||||
<panel-piyango-katilimci />
|
||||
</template>
|
||||
<template #footerButton v-if='!usersStore.isPanelUser'>
|
||||
<template #footerButton v-if="!usersStore.isPanelUser">
|
||||
<button
|
||||
:disabled='!piyangoKatilimciValidationStore.userFormChanged'
|
||||
class='button-c button-save'
|
||||
@click='piyangoKatilimciService.SaveKatilimciUser'>
|
||||
:disabled="!piyangoKatilimciValidationStore.userFormChanged"
|
||||
class="button-c button-save"
|
||||
@click="piyangoKatilimciService.SaveKatilimciUser">
|
||||
{{ piyangoKatilimciStore.isPiyangoKatilimciUserUpdate ? 'Kaydet' : 'Ekle' }}
|
||||
</button>
|
||||
</template>
|
||||
@ -94,23 +93,20 @@
|
||||
<div class="progress-bar">
|
||||
<div
|
||||
class="progress-fill"
|
||||
:style="{ width: uploadProgressValue + '%' }"
|
||||
></div>
|
||||
:style="{ width: uploadProgressValue + '%' }"></div>
|
||||
</div>
|
||||
<div class="progress-text">
|
||||
<template v-if="uploadProgressValue === 0">
|
||||
Dosya içeriği okunuyor, yükleme başlatılıyor...
|
||||
</template>
|
||||
<template v-else>
|
||||
{{ uploadProgressValue }}%
|
||||
</template>
|
||||
<template v-else>{{ uploadProgressValue }}%</template>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</panel-wrapper>
|
||||
</section>
|
||||
</template>
|
||||
<script setup lang='ts'>
|
||||
<script setup lang="ts">
|
||||
import { ref, computed } from 'vue'
|
||||
import PanelWrapper from '@/components/PanelWrapper.vue'
|
||||
import PanelKatilimciDocument from '@/module/cekilisler/components/panel/PanelKatilimciDocument.vue'
|
||||
@ -146,8 +142,13 @@
|
||||
import { usePiyangoOnayService } from '../service/piyangoOnayService'
|
||||
const piyangoOnayService = usePiyangoOnayService()
|
||||
|
||||
import { connectToHub, onProgress, onInsertProgress, onCompleted, onError } from '../service/signalrService'
|
||||
|
||||
import {
|
||||
connectToHub,
|
||||
onProgress,
|
||||
onInsertProgress,
|
||||
onCompleted,
|
||||
onError
|
||||
} from '../service/signalrService'
|
||||
|
||||
const uploadProgressValue = ref(0)
|
||||
const uploadProgressPanel = ref(false)
|
||||
@ -302,8 +303,11 @@
|
||||
})
|
||||
|
||||
const formData = new FormData()
|
||||
formData.append('excelFile', piyangoKatilimciStore.piyangoKatilimciFileFormData.excelFile)
|
||||
console.log( dataStore.panelData)
|
||||
formData.append(
|
||||
'excelFile',
|
||||
piyangoKatilimciStore.piyangoKatilimciFileFormData.excelFile
|
||||
)
|
||||
console.log(dataStore.panelData)
|
||||
const response = await dataStore.dataPost(
|
||||
`Katilimci/ExcelleYukle/${piyangoStore.selectedLottery}?connectionId=${connectionId}`,
|
||||
{
|
||||
@ -341,6 +345,7 @@ console.log( dataStore.panelData)
|
||||
const DeleteAllButton = () => {
|
||||
dialogStore.CreateDialog({
|
||||
title: 'Tüm Katılımcıları Sil',
|
||||
id: 'deletekatilimci',
|
||||
content:
|
||||
'Tüm katılımcıları silmek istediğinize emin misiniz? Bu işlem geri alınamaz.',
|
||||
closeText: 'Vazgeç',
|
||||
@ -348,19 +353,19 @@ console.log( dataStore.panelData)
|
||||
{
|
||||
label: 'Tüm katılımcıları Sil',
|
||||
type: 'alert',
|
||||
function: DeleteAll
|
||||
function: () => DeleteAll
|
||||
}
|
||||
]
|
||||
})
|
||||
}
|
||||
const DeleteAll = async (id: number) => {
|
||||
const DeleteAll = async () => {
|
||||
var dt = await dataStore.dataDelete(
|
||||
'Katilimci/DeleteCekilisKatilimci/' + piyangoStore.selectedLottery
|
||||
)
|
||||
|
||||
if (dt !== 'errorfalse') {
|
||||
piyangoKatilimciStore.refreshPiyangoKatilimciList = true
|
||||
dialogStore.CloseDialog(id)
|
||||
dialogStore.CloseDialog('deletekatilimci')
|
||||
}
|
||||
}
|
||||
|
||||
@ -370,7 +375,6 @@ console.log( dataStore.panelData)
|
||||
piyangoOnayStore.piyangoOnayForm.aciklama = ''
|
||||
await piyangoOnayService.SaveOnayDurum()
|
||||
}
|
||||
|
||||
</script>
|
||||
<style>
|
||||
.progress-container {
|
||||
@ -413,4 +417,4 @@ console.log( dataStore.panelData)
|
||||
font-size: 14px;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@ -22,13 +22,20 @@
|
||||
v-if="
|
||||
usersStore.isPanelUser ||
|
||||
(!usersStore.isPanelUser &&
|
||||
piyangoStore.lotteryApprove !== 0 &&
|
||||
piyangoStore.lotteryApprove !== 1 &&
|
||||
piyangoStore.lotteryApprove !== 2 &&
|
||||
piyangoStore.lotteryApprove !== 3 &&
|
||||
!piyangoTeminatStore.isNew)
|
||||
" />
|
||||
<panel-piyango-teminat-durumu
|
||||
v-if="
|
||||
!usersStore.isPanelUser &&
|
||||
(piyangoStore.lotteryApprove === 3 || piyangoTeminatStore.isNew)
|
||||
(piyangoStore.lotteryApprove === 0 ||
|
||||
piyangoStore.lotteryApprove === 1 ||
|
||||
piyangoStore.lotteryApprove === 2 ||
|
||||
piyangoStore.lotteryApprove === 3 ||
|
||||
piyangoTeminatStore.isNew)
|
||||
" />
|
||||
</template>
|
||||
<template #footerButton>
|
||||
@ -43,7 +50,7 @@
|
||||
</panel-wrapper>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, computed,onBeforeMount } from 'vue'
|
||||
import { ref, computed, onBeforeMount } from 'vue'
|
||||
import PanelWrapper from '@/components/PanelWrapper.vue'
|
||||
|
||||
import PanelPiyangoTeminatDurumu from './panel/PanelPiyangoTeminatDurumu.vue'
|
||||
@ -143,10 +150,7 @@
|
||||
])
|
||||
|
||||
const teminatAddAction = computed(() => {
|
||||
if (
|
||||
!usersStore.isPanelUser
|
||||
)
|
||||
return NewTeminatDurum
|
||||
if (!usersStore.isPanelUser) return NewTeminatDurum
|
||||
else return ''
|
||||
})
|
||||
|
||||
|
||||
@ -84,7 +84,7 @@
|
||||
Başvuru admin tarafından kapsam dışı olarak işaretlenmiştir.
|
||||
</template>
|
||||
</div>
|
||||
<div class="form-inner-comment alert-d" v-if="piyangoStore.lotteryApprove === 11">
|
||||
<div class="form-inner-comment alert-d" v-if="piyangoStore.lotteryApprove === 13">
|
||||
Kampanya için cezai işlem uygulanmıştır.
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -3,6 +3,10 @@
|
||||
<lottery-states
|
||||
:piyangoAmac="piyangoStore.lotteryData.amacpiyangoId"
|
||||
v-if="!isPreview" />
|
||||
<form-display
|
||||
v-model="piyangoStore.lotteryData.piyangoId"
|
||||
label="Piyango ID"
|
||||
size="1" />
|
||||
<template
|
||||
v-if="
|
||||
usersStore.isPanelUser &&
|
||||
|
||||
@ -10,7 +10,15 @@
|
||||
:editable="false"
|
||||
:data="file"
|
||||
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 v-else>
|
||||
@ -33,6 +41,35 @@
|
||||
const piyangoDocumentStore = usePiyangoDocumentStore()
|
||||
import { usePiyangoDocumentService } from '../../service/piyangoDocumentService'
|
||||
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 () => {
|
||||
await piyangoDocumentService.GetDocumentList()
|
||||
|
||||
@ -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">
|
||||
PİYANGO İLE İLGİLİ BİLGİLER
|
||||
</strong>
|
||||
<br />
|
||||
<br />
|
||||
<strong style="font-size: 10pt; margin-bottom: 12px">
|
||||
PİYANGO ID: {{ piyangoStore.lotteryData.piyangoId }}
|
||||
</strong>
|
||||
<br />
|
||||
<br />
|
||||
<table
|
||||
cellspacing="0"
|
||||
class="table-no-line"
|
||||
|
||||
@ -12,6 +12,12 @@
|
||||
Bahisler ve Oyunlar Dairesi Başkanlığına
|
||||
</strong>
|
||||
<br />
|
||||
<br />
|
||||
<strong style="font-size: 10pt; margin-bottom: 12px">
|
||||
PİYANGO ID: {{ piyangoStore.lotteryData.piyangoId }}
|
||||
</strong>
|
||||
<br />
|
||||
<br />
|
||||
<table
|
||||
cellspacing="0"
|
||||
class="table-no-line"
|
||||
|
||||
@ -31,7 +31,17 @@
|
||||
</div>
|
||||
<div class="form-part-content" v-if="loaded">
|
||||
<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
|
||||
modelKey="cekilisBaslik"
|
||||
v-model="piyangoStore.lotteryData.baslik"
|
||||
@ -601,7 +611,10 @@
|
||||
: piyangoStore.lotteryData.baglisirketId
|
||||
|
||||
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) {
|
||||
await GetDuzenleyen(piyangoStore.lotteryData.duzenleyenId)
|
||||
|
||||
@ -53,12 +53,13 @@
|
||||
return AddNewMecra as Function
|
||||
}
|
||||
}
|
||||
|
||||
const AddNewMecra = () => {
|
||||
piyangoMecraStore.ResetForm()
|
||||
piyangoMecraStore.isUpdate = false
|
||||
piyangoMecraStore.mecraPanel = true
|
||||
}
|
||||
|
||||
|
||||
const EditMecra = (d: Record<string, any>) => {
|
||||
Object.assign(piyangoMecraStore.piyangoMecraForm, d)
|
||||
piyangoMecraStore.mecraPanel = true
|
||||
|
||||
@ -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>
|
||||
@ -9,8 +9,35 @@
|
||||
v-model="piyangoTeminatStore.piyangoTeminatFormData.state"
|
||||
required
|
||||
:invalidText="piyangoTeminatValidationStore.invalidTexts.state"
|
||||
@change="OnKeyup"
|
||||
:disabled="!usersStore.isPanelUser"/>
|
||||
@change="OnKeyup"
|
||||
:disabled="!usersStore.isPanelUser" />
|
||||
|
||||
<template
|
||||
v-if="
|
||||
piyangoTeminatStore.piyangoTeminatFormData.state === 2 ||
|
||||
piyangoTeminatStore.piyangoTeminatFormData.state === 3
|
||||
">
|
||||
<form-date
|
||||
type="date"
|
||||
half
|
||||
modelKey="iadeTarihi"
|
||||
v-model="piyangoTeminatStore.piyangoTeminatFormData.iadeTarihi"
|
||||
label="İlan Tarihi"
|
||||
:invalidText="piyangoTeminatValidationStore.invalidTexts.iadeTarihi"
|
||||
@change="OnKeyup" />
|
||||
<form-input
|
||||
modelKey="iadeSayi"
|
||||
v-model="piyangoTeminatStore.piyangoTeminatFormData.iadeSayi"
|
||||
half
|
||||
label="Sayısı"
|
||||
@keyup="OnKeyup"
|
||||
:invalidText="piyangoTeminatValidationStore.invalidTexts.iadeSayi" />
|
||||
<form-file
|
||||
v-model="piyangoTeminatStore.piyangoTeminatFormData.iadeFile"
|
||||
elclass="panel-documents-item"
|
||||
:invalidText="piyangoTeminatValidationStore.invalidTexts.iadeFile"
|
||||
@change="OnKeyup" />
|
||||
</template>
|
||||
|
||||
<form-display
|
||||
v-model="piyangoTeminatStore.piyangoTeminatFormData.amount"
|
||||
@ -51,7 +78,10 @@
|
||||
label="Banka Şubesi" />
|
||||
|
||||
<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"
|
||||
:data="piyangoTeminatStore.piyangoTeminatFormData"
|
||||
:editable="false"
|
||||
|
||||
@ -52,6 +52,11 @@ export const usePiyangoServices = defineStore('piyangoServices', () => {
|
||||
}
|
||||
const GetPiyangoTeminatDurumList = async () => {
|
||||
if (piyangoDataStore.piyangoTeminatDurumlari.length === 0) {
|
||||
/*
|
||||
1: Açık
|
||||
2: İade
|
||||
3: Zaman Aşımı İade
|
||||
*/
|
||||
let data = await dataStore.dataGet('TeminantStates/Durumlar')
|
||||
piyangoDataStore.piyangoTeminatDurumlari = data
|
||||
}
|
||||
|
||||
@ -18,9 +18,12 @@ export const usePiyangoTeminatService = defineStore('piyangoTeminatService', ()
|
||||
if (piyangoTeminatValidationStore.FormCheck()) {
|
||||
let form: any
|
||||
let dataForm = new FormData()
|
||||
|
||||
|
||||
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('bankBranch', piyangoTeminatStore.piyangoTeminatFormData.bankBranch)
|
||||
dataForm.append(
|
||||
@ -43,6 +46,20 @@ export const usePiyangoTeminatService = defineStore('piyangoTeminatService', ()
|
||||
'description',
|
||||
piyangoTeminatStore.piyangoTeminatFormData.description
|
||||
)
|
||||
|
||||
if (usersStore.isPanelUser) {
|
||||
if (piyangoTeminatStore.piyangoTeminatFormData.state === 1) {
|
||||
piyangoTeminatStore.piyangoTeminatFormData.iadeTarihi = ''
|
||||
piyangoTeminatStore.piyangoTeminatFormData.iadeSayi = ''
|
||||
piyangoTeminatStore.piyangoTeminatFormData.iadeFile = ''
|
||||
}
|
||||
dataForm.append(
|
||||
'iadeTarihi',
|
||||
String(piyangoTeminatStore.piyangoTeminatFormData.iadeTarihi)
|
||||
)
|
||||
dataForm.append('iadeFile', piyangoTeminatStore.piyangoTeminatFormData.iadeFile)
|
||||
}
|
||||
|
||||
if (piyangoTeminatStore.isNew) {
|
||||
form = await dataStore.dataPost('TeminantStates/', {
|
||||
data: dataForm,
|
||||
@ -61,8 +78,8 @@ export const usePiyangoTeminatService = defineStore('piyangoTeminatService', ()
|
||||
}
|
||||
|
||||
if (form !== 'errorfalse') {
|
||||
piyangoTeminatStore.isNew = false
|
||||
piyangoTeminatValidationStore.formChanged = false
|
||||
piyangoTeminatStore.isNew = false
|
||||
piyangoTeminatValidationStore.formChanged = false
|
||||
piyangoTeminatStore.refreshList = true
|
||||
piyangoTeminatStore.teminatPanel = false
|
||||
}
|
||||
@ -80,7 +97,7 @@ export const usePiyangoTeminatService = defineStore('piyangoTeminatService', ()
|
||||
|
||||
if (form !== 'errorfalse') {
|
||||
piyangoTeminatStore.isNew = false
|
||||
await Object.assign(piyangoTeminatStore.piyangoTeminatFormData, form)
|
||||
await Object.assign(piyangoTeminatStore.piyangoTeminatFormData, form)
|
||||
} else {
|
||||
await piyangoTeminatStore.ResetFormData()
|
||||
await piyangoTeminatStore.RestoreFormData()
|
||||
|
||||
@ -1,34 +1,34 @@
|
||||
import * as signalR from "@microsoft/signalr";
|
||||
import { v4 as uuidv4 } from "uuid";
|
||||
import * as signalR from '@microsoft/signalr'
|
||||
import { v4 as uuidv4 } from 'uuid'
|
||||
|
||||
let connection: signalR.HubConnection;
|
||||
let connectionId = "";
|
||||
let connection: signalR.HubConnection
|
||||
let connectionId = ''
|
||||
|
||||
export const connectToHub = async () => {
|
||||
connection = new signalR.HubConnectionBuilder()
|
||||
.withUrl("http://panel.cekilisevi.gov.tr:5001/uploadHub", {
|
||||
withCredentials: false // Bu zorunlu, yoksa cookie vs gönderilmez
|
||||
.withUrl(import.meta.env.VITE_SOCKET_URL, {
|
||||
withCredentials: false // Bu zorunlu, yoksa cookie vs gönderilmez
|
||||
}) // backend adresine göre düzenle
|
||||
.withAutomaticReconnect()
|
||||
.build();
|
||||
.build()
|
||||
|
||||
await connection.start();
|
||||
connectionId = connection.connectionId || uuidv4(); // SignalR id'si ya da frontend'de de guid üretilebilir
|
||||
return connectionId;
|
||||
};
|
||||
await connection.start()
|
||||
connectionId = connection.connectionId || uuidv4() // SignalR id'si ya da frontend'de de guid üretilebilir
|
||||
return connectionId
|
||||
}
|
||||
|
||||
export const onProgress = (callback: (data: any) => void) => {
|
||||
connection.on("ReceiveProgress", callback);
|
||||
};
|
||||
connection.on('ReceiveProgress', callback)
|
||||
}
|
||||
|
||||
export const onInsertProgress = (callback: (data: any) => void) => {
|
||||
connection.on("ReceiveInsertProgress", callback);
|
||||
};
|
||||
connection.on('ReceiveInsertProgress', callback)
|
||||
}
|
||||
|
||||
export const onCompleted = (callback: (data: any) => void) => {
|
||||
connection.on("ReceiveCompleted", callback);
|
||||
};
|
||||
connection.on('ReceiveCompleted', callback)
|
||||
}
|
||||
|
||||
export const onError = (callback: (data: any) => void) => {
|
||||
connection.on("ReceiveError", callback);
|
||||
};
|
||||
connection.on('ReceiveError', callback)
|
||||
}
|
||||
|
||||
@ -23,7 +23,10 @@ export const usePiyangoTeminatStore = defineStore('piyangoTeminatStore', () => {
|
||||
cekilisId: piyangoStore.selectedLottery,
|
||||
kisiId: usersStore.userId,
|
||||
description: '',
|
||||
file: ''
|
||||
file: '',
|
||||
iadeTarihi: '',
|
||||
iadeSayi: '',
|
||||
iadeFile: ''
|
||||
})
|
||||
|
||||
const piyangoTeminatFormData = reactive<Record<string, any>>({})
|
||||
@ -31,7 +34,7 @@ export const usePiyangoTeminatStore = defineStore('piyangoTeminatStore', () => {
|
||||
const loaded = ref<boolean>(false)
|
||||
const isNew = 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 ResetFormData = () => {
|
||||
@ -42,7 +45,7 @@ export const usePiyangoTeminatStore = defineStore('piyangoTeminatStore', () => {
|
||||
loaded.value = true
|
||||
}, 30)
|
||||
}
|
||||
const RestoreFormData = () => {
|
||||
const RestoreFormData = () => {
|
||||
Object.assign(piyangoTeminatFormData, piyangoTeminatSafeFormData)
|
||||
}
|
||||
return {
|
||||
|
||||
@ -24,6 +24,18 @@ export const usePiyangoTeminatValidationStore = defineStore(
|
||||
'state',
|
||||
'Lütfen işlem tipini seçiniz.'
|
||||
)
|
||||
validationStore.IsFieldEmpty(
|
||||
piyangoTeminatStore.piyangoTeminatFormData,
|
||||
invalidTexts,
|
||||
'iadeTarihi',
|
||||
'Lütfen iade tarihini seçiniz.'
|
||||
)
|
||||
validationStore.IsFieldEmpty(
|
||||
piyangoTeminatStore.piyangoTeminatFormData,
|
||||
invalidTexts,
|
||||
'iadeSayi',
|
||||
'Lütfen iade sayı no giriniz.'
|
||||
)
|
||||
}
|
||||
|
||||
validationStore.IsFieldEmpty(
|
||||
|
||||
@ -60,13 +60,14 @@
|
||||
|
||||
const CreateTabs = () => {
|
||||
if (
|
||||
piyangoStore.lotteryApprove === 4 ||
|
||||
piyangoStore.lotteryApprove === 10 ||
|
||||
piyangoStore.lotteryApprove === 11 ||
|
||||
piyangoStore.lotteryApprove === 12 ||
|
||||
piyangoStore.lotteryApprove === 13 ||
|
||||
piyangoStore.lotteryApprove === 14 ||
|
||||
usersStore.isPanelUser
|
||||
(piyangoStore.lotteryApprove === 4 ||
|
||||
piyangoStore.lotteryApprove === 10 ||
|
||||
piyangoStore.lotteryApprove === 11 ||
|
||||
piyangoStore.lotteryApprove === 12 ||
|
||||
piyangoStore.lotteryApprove === 13 ||
|
||||
piyangoStore.lotteryApprove === 14 ||
|
||||
usersStore.isPanelUser) &&
|
||||
piyangoStore.lotteryPurposeId !== 3
|
||||
) {
|
||||
tabList.value.push(
|
||||
{ text: 'Katılım Listesi', id: 'katilimcilistesi' },
|
||||
@ -82,7 +83,7 @@
|
||||
}
|
||||
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' })
|
||||
}
|
||||
}
|
||||
|
||||
@ -67,11 +67,25 @@
|
||||
const tableHeader = computed<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) {
|
||||
header.push({ name: 'duzenleyen', title: 'Düzenleyen' })
|
||||
}
|
||||
|
||||
header.push(
|
||||
{
|
||||
name: 'piyangoId',
|
||||
title: 'Piyango ID',
|
||||
sort: true,
|
||||
style: { width: '10%' }
|
||||
},
|
||||
{
|
||||
name: 'baslik',
|
||||
title: 'Başlık',
|
||||
@ -101,14 +115,16 @@
|
||||
type: 'date',
|
||||
range: true
|
||||
}
|
||||
})
|
||||
}
|
||||
)
|
||||
|
||||
if (usersStore.isVakifDernek || usersStore.isPanelUser) {
|
||||
header.push({
|
||||
name: 'cekilisTarihi',
|
||||
title: 'Çekiliş Tarihi',
|
||||
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,
|
||||
filter: {
|
||||
@ -146,7 +162,7 @@
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
header.push(
|
||||
{
|
||||
|
||||
@ -54,6 +54,12 @@
|
||||
}
|
||||
|
||||
header.push(
|
||||
{
|
||||
name: 'piyangoId',
|
||||
title: 'Piyango ID',
|
||||
sort: true,
|
||||
style: { width: '10%' }
|
||||
},
|
||||
{
|
||||
name: 'baslik',
|
||||
title: 'Başlık',
|
||||
|
||||
@ -5,4 +5,9 @@ import menuYonetimi from '@/module/site-yonetimi/routes/menu-yonetimi'
|
||||
import menuListe from '@/module/site-yonetimi/routes/menu-liste'
|
||||
import ayarlar from '@/module/site-yonetimi/routes/ayarlar'
|
||||
|
||||
export default [sayfaYeni, sayfDetay, sayfaListe, menuYonetimi, menuListe, ayarlar]
|
||||
import sliderYonetimi from '@/module/site-yonetimi/routes/slider-yonetimi'
|
||||
import sliderListe from '@/module/site-yonetimi/routes/slider-liste'
|
||||
import popupYonetimi from '@/module/site-yonetimi/routes/popup-yonetimi'
|
||||
import popupListe from '@/module/site-yonetimi/routes/popup-liste'
|
||||
|
||||
export default [sayfaYeni, sayfDetay, sayfaListe, menuYonetimi, menuListe, ayarlar,sliderYonetimi,sliderListe,popupYonetimi,popupListe]
|
||||
|
||||
10
src/module/site-yonetimi/routes/popup-liste.ts
Normal file
10
src/module/site-yonetimi/routes/popup-liste.ts
Normal file
@ -0,0 +1,10 @@
|
||||
import PopupListe from "../views/PopupListe.vue";
|
||||
|
||||
export default {
|
||||
path: '/site-yonetimi/popup-listesi',
|
||||
name: 'PopupListe',
|
||||
component: PopupListe,
|
||||
meta: {
|
||||
authRequired: true
|
||||
}
|
||||
}
|
||||
10
src/module/site-yonetimi/routes/popup-yonetimi.ts
Normal file
10
src/module/site-yonetimi/routes/popup-yonetimi.ts
Normal file
@ -0,0 +1,10 @@
|
||||
import PopupYonetimi from '../views/PopupYonetimi.vue';
|
||||
|
||||
export default {
|
||||
path: '/site-yonetimi/popup-yonetimi/:popupId',
|
||||
name: 'PopupYonetimi',
|
||||
component: PopupYonetimi,
|
||||
meta: {
|
||||
authRequired: true
|
||||
}
|
||||
}
|
||||
10
src/module/site-yonetimi/routes/slider-liste.ts
Normal file
10
src/module/site-yonetimi/routes/slider-liste.ts
Normal file
@ -0,0 +1,10 @@
|
||||
import SliderListe from "../views/SliderListe.vue";
|
||||
|
||||
export default {
|
||||
path: '/site-yonetimi/slider-listesi',
|
||||
name: 'SliderListe',
|
||||
component: SliderListe,
|
||||
meta: {
|
||||
authRequired: true
|
||||
}
|
||||
}
|
||||
10
src/module/site-yonetimi/routes/slider-yonetimi.ts
Normal file
10
src/module/site-yonetimi/routes/slider-yonetimi.ts
Normal file
@ -0,0 +1,10 @@
|
||||
import SliderYonetimi from "../views/SliderYonetimi.vue";
|
||||
|
||||
export default {
|
||||
path: '/site-yonetimi/slider-yonetimi/:sliderId',
|
||||
name: 'SliderYonetimi',
|
||||
component: SliderYonetimi,
|
||||
meta: {
|
||||
authRequired: true
|
||||
}
|
||||
}
|
||||
230
src/module/site-yonetimi/views/PopupListe.vue
Normal file
230
src/module/site-yonetimi/views/PopupListe.vue
Normal file
@ -0,0 +1,230 @@
|
||||
<template>
|
||||
<AdminLayout>
|
||||
<Breadcrumb currentPageText="Popup Listesi" />
|
||||
<section class="section-list">
|
||||
<list-table-content
|
||||
:tableHeader="tableHeader"
|
||||
:rowAction="updateAction"
|
||||
:addAction="addAction"
|
||||
icon="sitemanagement"
|
||||
title="Popup Listesi"
|
||||
listText="Popup"
|
||||
:tableData="popups"
|
||||
apiText="Popup Listesi"
|
||||
apiList="Popup"
|
||||
v-model:refresh="refresh"
|
||||
:rowActions="rowActions"
|
||||
:rowActionStyle="'width:10%;'" />
|
||||
</section>
|
||||
<panel-wrapper
|
||||
v-if="panel"
|
||||
v-model="panel"
|
||||
:panel-title="isUpdate ? 'Popup Düzenle' : 'Popup Ekle'">
|
||||
<template #panelContent>
|
||||
<form-input v-model="panelPopup.baslik" label="Başlık" />
|
||||
<form-input v-model="panelPopup.url" label="Url" />
|
||||
<form-file
|
||||
v-model="panelPopup.resimUrl"
|
||||
label="Resim Url"
|
||||
:fileTypes="['png', 'jpg', 'jpeg']"
|
||||
elclass="panel-documents-item"
|
||||
fileType="img" />
|
||||
<div class="image-preview-wrapper" v-if="resimPreview">
|
||||
<img :src="resimPreview" alt="Seçilen Resim" />
|
||||
</div>
|
||||
<form-checkbox
|
||||
:listData="Checker"
|
||||
listText="label"
|
||||
listVal="val"
|
||||
v-model="panelPopup.durum">
|
||||
<template #checktext0>
|
||||
<span>Aktif</span>
|
||||
</template>
|
||||
</form-checkbox>
|
||||
</template>
|
||||
<template #footerButton>
|
||||
<div class="button-c button-save" @click="save">
|
||||
{{ isUpdate ? 'Kaydet' : 'Ekle' }}
|
||||
</div>
|
||||
</template>
|
||||
</panel-wrapper>
|
||||
</AdminLayout>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, computed } from 'vue'
|
||||
import AdminLayout from '@/layouts/AdminLayout.vue'
|
||||
import { Breadcrumb } from '@/components/global'
|
||||
import router from '@/router'
|
||||
import { useDataStore } from '@/stores/dataStore'
|
||||
import PanelWrapper from '@/components/PanelWrapper.vue'
|
||||
import { useGlobalStore } from '@/stores/globalStore'
|
||||
const globalStore = useGlobalStore()
|
||||
import { useDialogStore } from '@/components/global/dialogStore'
|
||||
const dialogStore = useDialogStore()
|
||||
|
||||
const Checker = ref([
|
||||
{
|
||||
label: '',
|
||||
val: 'durum'
|
||||
}
|
||||
])
|
||||
const dataStore = useDataStore()
|
||||
const panel = ref<boolean>(false)
|
||||
const isUpdate = ref<boolean>(false)
|
||||
|
||||
const refresh = ref<boolean>(false)
|
||||
const panelPopup = ref<Record<string, any>>({})
|
||||
const popups = ref<Record<string, any>[]>([])
|
||||
|
||||
const tableHeader = ref<Record<string, any>[]>([
|
||||
{
|
||||
name: 'baslik',
|
||||
title: 'Başlık',
|
||||
sort: true
|
||||
},
|
||||
{
|
||||
name: 'resimUrl',
|
||||
title: 'Resim Url',
|
||||
computeHtml: (v: Record<string, any>) => {
|
||||
if (v.resimUrl !== null && v.resimUrl !== undefined) {
|
||||
return `<a href="${ v.resimUrl }" target="_blank" onclick="event.stopPropagation()"><img class="table-cell-image" src="${ v.resimUrl }" /></a>`
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'url',
|
||||
title: 'Url'
|
||||
},
|
||||
{
|
||||
name: 'durum',
|
||||
title: 'Durum',
|
||||
computeHtml: (v: Record<string, any>): string => {
|
||||
if (v.durum) {
|
||||
return `<span class="back-grad back-grad-ok">
|
||||
Aktif
|
||||
</strong>`
|
||||
} else {
|
||||
return ``
|
||||
}
|
||||
}
|
||||
}
|
||||
])
|
||||
|
||||
const DeleteRowPop = (data: Record<string, any>, i: number) => {
|
||||
dialogStore.CreateDialog({
|
||||
title: 'Popup Sil',
|
||||
id: 'deletepop',
|
||||
content: 'Popup silmek istediğinize emin misiniz?',
|
||||
closeText: 'Vazgeç',
|
||||
buttons: [
|
||||
{
|
||||
label: 'Popup Sil',
|
||||
type: 'alert',
|
||||
function: () => DeleteRow(data.id)
|
||||
}
|
||||
]
|
||||
})
|
||||
}
|
||||
|
||||
const DeleteRow = async (id: number | string) => {
|
||||
var dt = await dataStore.dataDelete('Popup/' + id)
|
||||
|
||||
if (dt !== 'errorfalse') {
|
||||
dialogStore.CloseDialog('deletepop')
|
||||
refresh.value = true
|
||||
}
|
||||
}
|
||||
|
||||
const rowActions = ref<Record<string, any>[]>([
|
||||
{
|
||||
text: 'Sil',
|
||||
class: 'alert',
|
||||
action: DeleteRowPop
|
||||
}
|
||||
])
|
||||
|
||||
const resimPreview = computed(() => {
|
||||
if (!panelPopup.value.resimUrl) return null
|
||||
|
||||
if (typeof panelPopup.value.resimUrl === 'string') {
|
||||
return panelPopup.value.resimUrl
|
||||
}
|
||||
|
||||
// Eğer dosya ise
|
||||
return URL.createObjectURL(panelPopup.value.resimUrl)
|
||||
})
|
||||
|
||||
const OpenMenu = (row: any) => {
|
||||
router.push('slider-yonetimi/' + row.id)
|
||||
}
|
||||
const addAction = async () => {
|
||||
isUpdate.value = false
|
||||
panelPopup.value = {
|
||||
baslik: '',
|
||||
resimUrl: '',
|
||||
url: '',
|
||||
durum: false
|
||||
}
|
||||
panel.value = true
|
||||
}
|
||||
const updateAction = (row: any) => {
|
||||
Object.assign(panelPopup.value,row)
|
||||
panel.value = true
|
||||
isUpdate.value = true
|
||||
}
|
||||
|
||||
const save = async () => {
|
||||
if (isUpdate.value) {
|
||||
const formData = new FormData()
|
||||
formData.append('Baslik', panelPopup.value.baslik)
|
||||
formData.append('Durum', panelPopup.value.durum)
|
||||
formData.append('Url', panelPopup.value.url)
|
||||
if (panelPopup.value.resimUrl instanceof File) {
|
||||
formData.append('ResimUrl', panelPopup.value.resimUrl)
|
||||
}
|
||||
|
||||
let update: any = dataStore.dataPut('Popup/' + panelPopup.value.id, {
|
||||
data: formData,
|
||||
headers: { 'Content-Type': 'multipart/form-data' }
|
||||
})
|
||||
if (update !== 'errorfalse') {
|
||||
panel.value = false
|
||||
isUpdate.value = false
|
||||
refresh.value = true
|
||||
}
|
||||
} else {
|
||||
let add = await dataStore.dataPost('Popup', {
|
||||
data: panelPopup.value,
|
||||
headers: { 'Content-Type': 'multipart/form-data' }
|
||||
})
|
||||
if (add !== 'errorfalse') {
|
||||
panel.value = false
|
||||
isUpdate.value = false
|
||||
refresh.value = true
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
.image-preview-wrapper {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background: #f8f9fa;
|
||||
padding: 12px;
|
||||
border: 1px solid #ddd;
|
||||
border-radius: 12px;
|
||||
margin: 12px 20px;
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
|
||||
}
|
||||
|
||||
.image-preview-wrapper img {
|
||||
display: block;
|
||||
max-width: 100%;
|
||||
max-height: 250px;
|
||||
object-fit: cover;
|
||||
border-radius: 8px;
|
||||
}
|
||||
</style>
|
||||
278
src/module/site-yonetimi/views/PopupYonetimi.vue
Normal file
278
src/module/site-yonetimi/views/PopupYonetimi.vue
Normal file
@ -0,0 +1,278 @@
|
||||
<template>
|
||||
<AdminLayout>
|
||||
<Breadcrumb current-page-text="Menu Yonetimi" />
|
||||
<div class="form-content">
|
||||
<div class="form-inner-content form-inner-content-left">
|
||||
<div class="form-part">
|
||||
<div class="form-part-title">
|
||||
<h4>
|
||||
{{ Number(route.params.menuId) === 1 ? 'Ana Menü' : 'Footer Menü' }}
|
||||
</h4>
|
||||
<div class="form-part-title-buttons">
|
||||
<div class="button-c button-save" @click="SaveMenu">Kaydet</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-part-content">
|
||||
<template v-if="loaded">
|
||||
<template v-if="siteManagementMenuStore.menuContentList.length > 0">
|
||||
<div class="form-inner-comment">
|
||||
Menü öğelerini sürükle-bırak yaparak düzenleyebilirsiniz.
|
||||
</div>
|
||||
<draggable
|
||||
class="menu-list-group"
|
||||
:list="siteManagementMenuStore.menuContentList"
|
||||
:group="{ name: 'menu', put: false }"
|
||||
itemKey="id"
|
||||
@end="ChangeMenu">
|
||||
<template #item="{ element, index }">
|
||||
<div class="menu-list-item">
|
||||
<span>{{ element.title }}</span>
|
||||
<div class="menu-list-item-buttons">
|
||||
<button
|
||||
@click="EditMenu(element, index)"
|
||||
v-if="element.pageId === null">
|
||||
Düzenle
|
||||
</button>
|
||||
<button
|
||||
@click="RemoveFromMenu(element, index)"
|
||||
class="button-alert">
|
||||
Sil
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</draggable>
|
||||
</template>
|
||||
<template v-else>
|
||||
<div class="form-inner-comment">
|
||||
Menüye henüz öğe eklenmemiş. Sağdaki bölümden öğe ekleyebilirsiniz.
|
||||
</div>
|
||||
</template>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-inner-content form-inner-content-right">
|
||||
<div class="form-part">
|
||||
<div class="form-part-title">
|
||||
<h4>Sayfalar</h4>
|
||||
<div class="form-part-title-buttons">
|
||||
<div class="button-c button-save" @click="AddMenuItem">Menü Öğesi Ekle</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-part-content">
|
||||
<div class="menu-list-group">
|
||||
<template v-for="(page, i) in pageList">
|
||||
<div v-if="page.show" class="menu-list-item menu-list-item-page">
|
||||
<span>{{ page.title }}</span>
|
||||
<div class="menu-list-item-buttons">
|
||||
<button @click="AddToMenu(page, i)">Menüye Ekle</button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<panel-wrapper
|
||||
wide
|
||||
v-if="menuItemPanel"
|
||||
v-model="menuItemPanel"
|
||||
:panel-title="isEdit ? 'Menü Öğesi Düzenle' : 'Menü Öğesi Ekle'">
|
||||
<template #panelContent>
|
||||
<panel-menu-item />
|
||||
</template>
|
||||
<template #footerButton>
|
||||
<div class="button-c button-save" @click="SaveMenuItem">
|
||||
{{ isEdit ? 'Kaydet' : 'Ekle' }}
|
||||
</div>
|
||||
</template>
|
||||
</panel-wrapper>
|
||||
</AdminLayout>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive, onBeforeMount } from 'vue'
|
||||
import draggable from 'vuedraggable'
|
||||
import AdminLayout from '@/layouts/AdminLayout.vue'
|
||||
import { Breadcrumb } from '@/components/global'
|
||||
import PanelWrapper from '@/components/PanelWrapper.vue'
|
||||
import PanelMenuItem from '../components/panel/PanelMenuItem.vue'
|
||||
|
||||
import { useRoute } from 'vue-router'
|
||||
const route = useRoute()
|
||||
import { useDataStore } from '@/stores/dataStore'
|
||||
const dataStore = useDataStore()
|
||||
import { useSiteManagementMenuStore } from '../stores/siteManagementMenuStore'
|
||||
const siteManagementMenuStore = useSiteManagementMenuStore()
|
||||
import { useSiteManagementPageStore } from '../stores/siteManagementPageStore'
|
||||
const siteManagementPageStore = useSiteManagementPageStore()
|
||||
import { useSiteManagementMenuValidationStore } from '../validation/siteManagementMenuValidationStore'
|
||||
const siteManagementMenuValidationStore = useSiteManagementMenuValidationStore()
|
||||
import { useSiteManagementMenuService } from '../service/siteManagementMenuService'
|
||||
const siteManagementMenuService = useSiteManagementMenuService()
|
||||
import { useSiteManagementPageService } from '../service/siteManagementPageService'
|
||||
const siteManagementPageService = useSiteManagementPageService()
|
||||
|
||||
const onayIslemTipleri = ref<Record<string, any>[]>([])
|
||||
const formData = reactive<Record<string, any>>({})
|
||||
const invalidTexts = reactive<Record<string, any>>({})
|
||||
const loaded = ref<boolean>(false)
|
||||
|
||||
const menuItemPanel = ref<boolean>(false)
|
||||
const isEdit = ref<boolean>(false)
|
||||
const pageList = ref<Record<string, any>[]>([])
|
||||
const editMenuIndex = ref<number | null>(null)
|
||||
|
||||
const AddMenuItem = () => {
|
||||
isEdit.value = false
|
||||
Object.assign(
|
||||
siteManagementMenuStore.menuItemData,
|
||||
siteManagementMenuStore.safeMenuItemData
|
||||
)
|
||||
menuItemPanel.value = true
|
||||
}
|
||||
|
||||
const EditMenu = (data: Record<string, any>, i: number) => {
|
||||
isEdit.value = true
|
||||
Object.assign(siteManagementMenuStore.menuItemData, data)
|
||||
siteManagementMenuStore.menuItemData.targetKey =
|
||||
siteManagementMenuStore.menuItemData.targetKey === '_blank' ? true : false
|
||||
|
||||
editMenuIndex.value = i
|
||||
menuItemPanel.value = true
|
||||
}
|
||||
|
||||
const SaveMenu = async () => {
|
||||
var dt: any
|
||||
siteManagementMenuStore.menuContentList.forEach(async (el, i) => {
|
||||
if (el.type === 'update') {
|
||||
dt = await dataStore.dataPut('Menu/' + el.id, {
|
||||
data: el
|
||||
})
|
||||
}
|
||||
if (el.type === 'new') {
|
||||
dt = await dataStore.dataPost('Menu', {
|
||||
data: el
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
siteManagementMenuStore.deleteMenuList.forEach(async (el, i) => {
|
||||
dt = await dataStore.dataDelete('Menu/' + el)
|
||||
})
|
||||
|
||||
setTimeout(async () => {
|
||||
siteManagementMenuStore.deleteMenuList = []
|
||||
await GetMenuList()
|
||||
}, 50)
|
||||
}
|
||||
|
||||
const ReorderMenu = () => {
|
||||
siteManagementMenuStore.menuContentList.forEach((el, i) => {
|
||||
el.sira = i + 1
|
||||
if (el.id !== undefined) el.type = 'update'
|
||||
})
|
||||
}
|
||||
const ChangeMenu = (data: Record<string, any>) => {
|
||||
ReorderMenu()
|
||||
}
|
||||
const AddToMenu = (data: Record<string, any>, i: number) => {
|
||||
let newData: Record<string, any> = {
|
||||
title: data.title,
|
||||
konumId: route.params.menuId,
|
||||
slug: data.slug,
|
||||
parentMenuId: null,
|
||||
pageId: data.id,
|
||||
isActive: true,
|
||||
type: 'new',
|
||||
targetKey: '',
|
||||
sira: siteManagementMenuStore.menuContentList.length + 1
|
||||
}
|
||||
siteManagementMenuStore.menuContentList.push(newData)
|
||||
data.show = false
|
||||
}
|
||||
|
||||
const CheckPageList = () => {
|
||||
pageList.value.forEach((page) => {
|
||||
var show: boolean = true
|
||||
siteManagementMenuStore.menuContentList.forEach((menu) => {
|
||||
if (page.id === menu.pageId) show = false
|
||||
})
|
||||
page.show = show
|
||||
})
|
||||
|
||||
setTimeout(() => {
|
||||
loaded.value = true
|
||||
}, 10)
|
||||
}
|
||||
|
||||
const RemoveFromMenu = (el: Record<string, any>, i: number) => {
|
||||
siteManagementMenuStore.menuContentList.splice(i, 1)
|
||||
|
||||
if (el.pageId !== null) {
|
||||
let page = pageList.value.filter((itm) => itm.id === el.pageId)[0]
|
||||
page.show = true
|
||||
}
|
||||
if (el.id !== undefined) {
|
||||
siteManagementMenuStore.deleteMenuList.push(el.id)
|
||||
}
|
||||
ReorderMenu()
|
||||
}
|
||||
|
||||
const SaveMenuItem = () => {
|
||||
if (siteManagementMenuValidationStore.FormCheck()) {
|
||||
if (!isEdit.value) {
|
||||
let newData: Record<string, any> = {
|
||||
title: siteManagementMenuStore.menuItemData.title,
|
||||
konumId: route.params.menuId,
|
||||
slug: siteManagementMenuStore.menuItemData.slug,
|
||||
parentMenuId: null,
|
||||
pageId: null,
|
||||
isActive: true,
|
||||
type: 'new',
|
||||
targetKey: siteManagementMenuStore.menuItemData.targetKey ? '_blank' : '',
|
||||
sira: siteManagementMenuStore.menuContentList.length + 1
|
||||
}
|
||||
siteManagementMenuStore.menuContentList.push(newData)
|
||||
} else {
|
||||
if (siteManagementMenuStore.menuItemData.id !== undefined)
|
||||
siteManagementMenuStore.menuItemData.type = 'update'
|
||||
|
||||
siteManagementMenuStore.menuItemData.targetKey = siteManagementMenuStore
|
||||
.menuItemData.targetKey
|
||||
? '_blank'
|
||||
: ''
|
||||
|
||||
Object.assign(
|
||||
siteManagementMenuStore.menuContentList[editMenuIndex.value!],
|
||||
siteManagementMenuStore.menuItemData
|
||||
)
|
||||
|
||||
isEdit.value = false
|
||||
editMenuIndex.value = null
|
||||
}
|
||||
menuItemPanel.value = false
|
||||
}else{
|
||||
siteManagementMenuValidationStore.isFormValid = true
|
||||
}
|
||||
}
|
||||
|
||||
const GetMenuList = async () => {
|
||||
await siteManagementMenuService.GetMenuContentList()
|
||||
siteManagementMenuStore.menuContentList.sort((a, b) => a.sira - b.sira)
|
||||
|
||||
pageList.value.splice(
|
||||
0,
|
||||
pageList.value.length,
|
||||
...siteManagementPageStore.allPagesList
|
||||
)
|
||||
|
||||
CheckPageList()
|
||||
}
|
||||
|
||||
onBeforeMount(async () => {
|
||||
await siteManagementPageService.GetAllPages()
|
||||
await GetMenuList()
|
||||
})
|
||||
</script>
|
||||
@ -10,24 +10,64 @@
|
||||
listText="Sayfa"
|
||||
addRoute="yeni-sayfa"
|
||||
apiList="Page"
|
||||
apiText="Sayfa Listesi" />
|
||||
apiText="Sayfa Listesi"
|
||||
:refresh="refresh"
|
||||
:rowActions="rowActions"
|
||||
:rowActionStyle="'width:10%;'" />
|
||||
</section>
|
||||
</AdminLayout>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
import AdminLayout from '@/layouts/AdminLayout.vue'
|
||||
import { useGlobalStore } from '@/stores/globalStore'
|
||||
const globalStore = useGlobalStore()
|
||||
import { useDialogStore } from '@/components/global/dialogStore'
|
||||
const dialogStore = useDialogStore()
|
||||
import { useDataStore } from '@/stores/dataStore'
|
||||
const dataStore = useDataStore()
|
||||
import router from '@/router'
|
||||
|
||||
const tableHeader = ref<Record<string,any>[]>([
|
||||
const tableHeader = ref<Record<string, any>[]>([
|
||||
{
|
||||
name: 'title',
|
||||
title: 'Sayfa Başlığı',
|
||||
sort: true
|
||||
}
|
||||
])
|
||||
const refresh = ref<boolean>(false)
|
||||
|
||||
const DeleteRowPop = (data: Record<string, any>, i: number) => {
|
||||
dialogStore.CreateDialog({
|
||||
title: 'Sayfa Sil',
|
||||
id: 'deleteslider',
|
||||
content: 'Sayfayı silmek istediğinize emin misiniz?',
|
||||
closeText: 'Vazgeç',
|
||||
buttons: [
|
||||
{
|
||||
label: 'Sil',
|
||||
type: 'alert',
|
||||
function: () => DeleteRow(data.id)
|
||||
}
|
||||
]
|
||||
})
|
||||
}
|
||||
|
||||
const DeleteRow = async (id: number | string) => {
|
||||
var dt = await dataStore.dataDelete('Page/' + id)
|
||||
|
||||
if (dt !== 'errorfalse') {
|
||||
dialogStore.CloseDialog('deleteslider')
|
||||
refresh.value = true
|
||||
}
|
||||
}
|
||||
|
||||
const rowActions = ref<Record<string, any>[]>([
|
||||
{
|
||||
text: 'Sil',
|
||||
class: 'alert',
|
||||
action: () => DeleteRowPop
|
||||
}
|
||||
])
|
||||
|
||||
const pageDetail = (row: any) => {
|
||||
router.push('/sayfalar/detay/' + row.id)
|
||||
}
|
||||
|
||||
216
src/module/site-yonetimi/views/SliderListe.vue
Normal file
216
src/module/site-yonetimi/views/SliderListe.vue
Normal file
@ -0,0 +1,216 @@
|
||||
<template>
|
||||
<AdminLayout>
|
||||
<Breadcrumb currentPageText="Slider Listesi" />
|
||||
<section class="section-list">
|
||||
<list-table-content
|
||||
:tableHeader="tableHeader"
|
||||
:rowAction="updateAction"
|
||||
:addAction="addAction"
|
||||
icon="sitemanagement"
|
||||
title="Slider Listesi"
|
||||
listText="Slider"
|
||||
:tableData="sliders"
|
||||
apiText="Slider Listesi"
|
||||
apiList="Slider"
|
||||
v-model:refresh="refresh"
|
||||
:rowActions="rowActions"
|
||||
:rowActionStyle="'width:10%;'" />
|
||||
</section>
|
||||
<panel-wrapper
|
||||
v-if="panel"
|
||||
v-model="panel"
|
||||
:panel-title="isUpdate ? 'Slider Düzenle' : 'Slider Ekle'">
|
||||
<template #panelContent>
|
||||
<form-input required v-model="panelSlider.baslik" label="Başlık" />
|
||||
<form-file
|
||||
v-model="panelSlider.resimUrl"
|
||||
label="Resim Url"
|
||||
:fileTypes="['png', 'jpg', 'jpeg']"
|
||||
elclass="panel-documents-item"
|
||||
fileType="img" />
|
||||
<div class="image-preview-wrapper" v-if="resimPreview">
|
||||
<img :src="resimPreview" alt="Seçilen Resim" />
|
||||
</div>
|
||||
<form-input required v-model="panelSlider.url" label="Url" />
|
||||
<form-input required v-model="panelSlider.sira" label="Sıra" />
|
||||
</template>
|
||||
<template #footerButton>
|
||||
<div class="button-c button-save" @click="save">
|
||||
{{ isUpdate ? 'Kaydet' : 'Ekle' }}
|
||||
</div>
|
||||
</template>
|
||||
</panel-wrapper>
|
||||
</AdminLayout>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, computed } from 'vue'
|
||||
import AdminLayout from '@/layouts/AdminLayout.vue'
|
||||
import { Breadcrumb } from '@/components/global'
|
||||
import router from '@/router'
|
||||
import { useDataStore } from '@/stores/dataStore'
|
||||
import PanelWrapper from '@/components/PanelWrapper.vue'
|
||||
import { useDialogStore } from '@/components/global/dialogStore'
|
||||
import { useGlobalStore } from '@/stores/globalStore'
|
||||
const globalStore = useGlobalStore()
|
||||
|
||||
const dialogStore = useDialogStore()
|
||||
|
||||
const dataStore = useDataStore()
|
||||
const panel = ref<boolean>(false)
|
||||
const isUpdate = ref<boolean>(false)
|
||||
const refresh = ref<boolean>(false)
|
||||
const panelSlider = ref<Record<string, any>>({})
|
||||
const sliders = ref<Record<string, any>[]>([])
|
||||
|
||||
const tableHeader = ref<Record<string, any>[]>([
|
||||
{
|
||||
name: 'baslik',
|
||||
title: 'Başlık',
|
||||
sort: true
|
||||
},
|
||||
{
|
||||
name: 'sira',
|
||||
title: 'Sıra',
|
||||
sort: true
|
||||
},
|
||||
{
|
||||
name: 'resimUrl',
|
||||
title: 'Resim Url',
|
||||
computeHtml: (v: Record<string, any>) => {
|
||||
if (v.resimUrl !== null && v.resimUrl !== undefined) {
|
||||
return `<a href="${ v.resimUrl }" target="_blank" onclick="event.stopPropagation()"><img class="table-cell-image" src="${ v.resimUrl }" /></a>`
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'url',
|
||||
title: 'Url',
|
||||
sort: true
|
||||
}
|
||||
])
|
||||
|
||||
const DeleteRowPop = (data: Record<string, any>, i: number) => {
|
||||
dialogStore.CreateDialog({
|
||||
title: 'Slider Sil',
|
||||
id: 'deleteslider',
|
||||
content: 'Slider silmek istediğinize emin misiniz?',
|
||||
closeText: 'Vazgeç',
|
||||
buttons: [
|
||||
{
|
||||
label: 'Slider Sil',
|
||||
type: 'alert',
|
||||
function: () => DeleteRow(data.id)
|
||||
}
|
||||
]
|
||||
})
|
||||
}
|
||||
|
||||
const DeleteRow = async (id: number | string) => {
|
||||
var dt = await dataStore.dataDelete('Slider/' + id)
|
||||
|
||||
if (dt !== 'errorfalse') {
|
||||
dialogStore.CloseDialog('deleteslider')
|
||||
refresh.value = true
|
||||
}
|
||||
}
|
||||
|
||||
const rowActions = ref<Record<string, any>[]>([
|
||||
{
|
||||
text: 'Sil',
|
||||
class: 'alert',
|
||||
action: DeleteRowPop
|
||||
}
|
||||
])
|
||||
|
||||
const resimPreview = computed(() => {
|
||||
if (!panelSlider.value.resimUrl) return null
|
||||
|
||||
if (typeof panelSlider.value.resimUrl === 'string') {
|
||||
return panelSlider.value.resimUrl
|
||||
}
|
||||
|
||||
// Eğer dosya ise
|
||||
return URL.createObjectURL(panelSlider.value.resimUrl)
|
||||
})
|
||||
|
||||
const OpenMenu = (row: any) => {
|
||||
router.push('slider-yonetimi/' + row.id)
|
||||
}
|
||||
const addAction = async () => {
|
||||
isUpdate.value = false
|
||||
panelSlider.value = {
|
||||
baslik: '',
|
||||
resimUrl: '',
|
||||
url: '',
|
||||
sira: 1
|
||||
}
|
||||
panel.value = true
|
||||
}
|
||||
const updateAction = (row: any) => {
|
||||
panelSlider.value = sliders.value.find((x) => x.id == row.id) || {}
|
||||
panel.value = true
|
||||
isUpdate.value = true
|
||||
}
|
||||
const loadSliders = async () => {
|
||||
const data = await dataStore.dataGet('Slider')
|
||||
console.log('apidata', data)
|
||||
sliders.value = data
|
||||
|
||||
console.log(sliders.value)
|
||||
}
|
||||
|
||||
const save = async () => {
|
||||
if (isUpdate.value) {
|
||||
const formData = new FormData()
|
||||
formData.append('Baslik', panelSlider.value.baslik)
|
||||
formData.append('Url', panelSlider.value.url)
|
||||
formData.append('Sira', panelSlider.value?.sira)
|
||||
if (panelSlider.value.resimUrl instanceof File) {
|
||||
formData.append('ResimUrl', panelSlider.value.resimUrl)
|
||||
}
|
||||
|
||||
let update: any = dataStore.dataPut('Slider/' + panelSlider.value.id, {
|
||||
data: formData,
|
||||
headers: { 'Content-Type': 'multipart/form-data' }
|
||||
})
|
||||
if (update !== 'errorfalse') {
|
||||
panel.value = false
|
||||
isUpdate.value = false
|
||||
refresh.value = true
|
||||
}
|
||||
} else {
|
||||
let add = await dataStore.dataPost('Slider/CreateSlider', {
|
||||
data: panelSlider.value,
|
||||
headers: { 'Content-Type': 'multipart/form-data' }
|
||||
})
|
||||
if (add !== 'errorfalse') {
|
||||
panel.value = false
|
||||
isUpdate.value = false
|
||||
refresh.value = true
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
.image-preview-wrapper {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background: #f8f9fa;
|
||||
padding: 12px;
|
||||
border: 1px solid #ddd;
|
||||
border-radius: 12px;
|
||||
margin: 12px 20px;
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
|
||||
}
|
||||
|
||||
.image-preview-wrapper img {
|
||||
display: block;
|
||||
max-width: 100%;
|
||||
max-height: 250px;
|
||||
object-fit: cover;
|
||||
border-radius: 8px;
|
||||
}
|
||||
</style>
|
||||
278
src/module/site-yonetimi/views/SliderYonetimi.vue
Normal file
278
src/module/site-yonetimi/views/SliderYonetimi.vue
Normal file
@ -0,0 +1,278 @@
|
||||
<template>
|
||||
<AdminLayout>
|
||||
<Breadcrumb current-page-text="Menu Yonetimi" />
|
||||
<div class="form-content">
|
||||
<div class="form-inner-content form-inner-content-left">
|
||||
<div class="form-part">
|
||||
<div class="form-part-title">
|
||||
<h4>
|
||||
{{ Number(route.params.menuId) === 1 ? 'Ana Menü' : 'Footer Menü' }}
|
||||
</h4>
|
||||
<div class="form-part-title-buttons">
|
||||
<div class="button-c button-save" @click="SaveMenu">Kaydet</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-part-content">
|
||||
<template v-if="loaded">
|
||||
<template v-if="siteManagementMenuStore.menuContentList.length > 0">
|
||||
<div class="form-inner-comment">
|
||||
Menü öğelerini sürükle-bırak yaparak düzenleyebilirsiniz.
|
||||
</div>
|
||||
<draggable
|
||||
class="menu-list-group"
|
||||
:list="siteManagementMenuStore.menuContentList"
|
||||
:group="{ name: 'menu', put: false }"
|
||||
itemKey="id"
|
||||
@end="ChangeMenu">
|
||||
<template #item="{ element, index }">
|
||||
<div class="menu-list-item">
|
||||
<span>{{ element.title }}</span>
|
||||
<div class="menu-list-item-buttons">
|
||||
<button
|
||||
@click="EditMenu(element, index)"
|
||||
v-if="element.pageId === null">
|
||||
Düzenle
|
||||
</button>
|
||||
<button
|
||||
@click="RemoveFromMenu(element, index)"
|
||||
class="button-alert">
|
||||
Sil
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</draggable>
|
||||
</template>
|
||||
<template v-else>
|
||||
<div class="form-inner-comment">
|
||||
Menüye henüz öğe eklenmemiş. Sağdaki bölümden öğe ekleyebilirsiniz.
|
||||
</div>
|
||||
</template>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-inner-content form-inner-content-right">
|
||||
<div class="form-part">
|
||||
<div class="form-part-title">
|
||||
<h4>Sayfalar</h4>
|
||||
<div class="form-part-title-buttons">
|
||||
<div class="button-c button-save" @click="AddMenuItem">Menü Öğesi Ekle</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-part-content">
|
||||
<div class="menu-list-group">
|
||||
<template v-for="(page, i) in pageList">
|
||||
<div v-if="page.show" class="menu-list-item menu-list-item-page">
|
||||
<span>{{ page.title }}</span>
|
||||
<div class="menu-list-item-buttons">
|
||||
<button @click="AddToMenu(page, i)">Menüye Ekle</button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<panel-wrapper
|
||||
wide
|
||||
v-if="menuItemPanel"
|
||||
v-model="menuItemPanel"
|
||||
:panel-title="isEdit ? 'Menü Öğesi Düzenle' : 'Menü Öğesi Ekle'">
|
||||
<template #panelContent>
|
||||
<panel-menu-item />
|
||||
</template>
|
||||
<template #footerButton>
|
||||
<div class="button-c button-save" @click="SaveMenuItem">
|
||||
{{ isEdit ? 'Kaydet' : 'Ekle' }}
|
||||
</div>
|
||||
</template>
|
||||
</panel-wrapper>
|
||||
</AdminLayout>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive, onBeforeMount } from 'vue'
|
||||
import draggable from 'vuedraggable'
|
||||
import AdminLayout from '@/layouts/AdminLayout.vue'
|
||||
import { Breadcrumb } from '@/components/global'
|
||||
import PanelWrapper from '@/components/PanelWrapper.vue'
|
||||
import PanelMenuItem from '../components/panel/PanelMenuItem.vue'
|
||||
|
||||
import { useRoute } from 'vue-router'
|
||||
const route = useRoute()
|
||||
import { useDataStore } from '@/stores/dataStore'
|
||||
const dataStore = useDataStore()
|
||||
import { useSiteManagementMenuStore } from '../stores/siteManagementMenuStore'
|
||||
const siteManagementMenuStore = useSiteManagementMenuStore()
|
||||
import { useSiteManagementPageStore } from '../stores/siteManagementPageStore'
|
||||
const siteManagementPageStore = useSiteManagementPageStore()
|
||||
import { useSiteManagementMenuValidationStore } from '../validation/siteManagementMenuValidationStore'
|
||||
const siteManagementMenuValidationStore = useSiteManagementMenuValidationStore()
|
||||
import { useSiteManagementMenuService } from '../service/siteManagementMenuService'
|
||||
const siteManagementMenuService = useSiteManagementMenuService()
|
||||
import { useSiteManagementPageService } from '../service/siteManagementPageService'
|
||||
const siteManagementPageService = useSiteManagementPageService()
|
||||
|
||||
const onayIslemTipleri = ref<Record<string, any>[]>([])
|
||||
const formData = reactive<Record<string, any>>({})
|
||||
const invalidTexts = reactive<Record<string, any>>({})
|
||||
const loaded = ref<boolean>(false)
|
||||
|
||||
const menuItemPanel = ref<boolean>(false)
|
||||
const isEdit = ref<boolean>(false)
|
||||
const pageList = ref<Record<string, any>[]>([])
|
||||
const editMenuIndex = ref<number | null>(null)
|
||||
|
||||
const AddMenuItem = () => {
|
||||
isEdit.value = false
|
||||
Object.assign(
|
||||
siteManagementMenuStore.menuItemData,
|
||||
siteManagementMenuStore.safeMenuItemData
|
||||
)
|
||||
menuItemPanel.value = true
|
||||
}
|
||||
|
||||
const EditMenu = (data: Record<string, any>, i: number) => {
|
||||
isEdit.value = true
|
||||
Object.assign(siteManagementMenuStore.menuItemData, data)
|
||||
siteManagementMenuStore.menuItemData.targetKey =
|
||||
siteManagementMenuStore.menuItemData.targetKey === '_blank' ? true : false
|
||||
|
||||
editMenuIndex.value = i
|
||||
menuItemPanel.value = true
|
||||
}
|
||||
|
||||
const SaveMenu = async () => {
|
||||
var dt: any
|
||||
siteManagementMenuStore.menuContentList.forEach(async (el, i) => {
|
||||
if (el.type === 'update') {
|
||||
dt = await dataStore.dataPut('Menu/' + el.id, {
|
||||
data: el
|
||||
})
|
||||
}
|
||||
if (el.type === 'new') {
|
||||
dt = await dataStore.dataPost('Menu', {
|
||||
data: el
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
siteManagementMenuStore.deleteMenuList.forEach(async (el, i) => {
|
||||
dt = await dataStore.dataDelete('Menu/' + el)
|
||||
})
|
||||
|
||||
setTimeout(async () => {
|
||||
siteManagementMenuStore.deleteMenuList = []
|
||||
await GetMenuList()
|
||||
}, 50)
|
||||
}
|
||||
|
||||
const ReorderMenu = () => {
|
||||
siteManagementMenuStore.menuContentList.forEach((el, i) => {
|
||||
el.sira = i + 1
|
||||
if (el.id !== undefined) el.type = 'update'
|
||||
})
|
||||
}
|
||||
const ChangeMenu = (data: Record<string, any>) => {
|
||||
ReorderMenu()
|
||||
}
|
||||
const AddToMenu = (data: Record<string, any>, i: number) => {
|
||||
let newData: Record<string, any> = {
|
||||
title: data.title,
|
||||
konumId: route.params.menuId,
|
||||
slug: data.slug,
|
||||
parentMenuId: null,
|
||||
pageId: data.id,
|
||||
isActive: true,
|
||||
type: 'new',
|
||||
targetKey: '',
|
||||
sira: siteManagementMenuStore.menuContentList.length + 1
|
||||
}
|
||||
siteManagementMenuStore.menuContentList.push(newData)
|
||||
data.show = false
|
||||
}
|
||||
|
||||
const CheckPageList = () => {
|
||||
pageList.value.forEach((page) => {
|
||||
var show: boolean = true
|
||||
siteManagementMenuStore.menuContentList.forEach((menu) => {
|
||||
if (page.id === menu.pageId) show = false
|
||||
})
|
||||
page.show = show
|
||||
})
|
||||
|
||||
setTimeout(() => {
|
||||
loaded.value = true
|
||||
}, 10)
|
||||
}
|
||||
|
||||
const RemoveFromMenu = (el: Record<string, any>, i: number) => {
|
||||
siteManagementMenuStore.menuContentList.splice(i, 1)
|
||||
|
||||
if (el.pageId !== null) {
|
||||
let page = pageList.value.filter((itm) => itm.id === el.pageId)[0]
|
||||
page.show = true
|
||||
}
|
||||
if (el.id !== undefined) {
|
||||
siteManagementMenuStore.deleteMenuList.push(el.id)
|
||||
}
|
||||
ReorderMenu()
|
||||
}
|
||||
|
||||
const SaveMenuItem = () => {
|
||||
if (siteManagementMenuValidationStore.FormCheck()) {
|
||||
if (!isEdit.value) {
|
||||
let newData: Record<string, any> = {
|
||||
title: siteManagementMenuStore.menuItemData.title,
|
||||
konumId: route.params.menuId,
|
||||
slug: siteManagementMenuStore.menuItemData.slug,
|
||||
parentMenuId: null,
|
||||
pageId: null,
|
||||
isActive: true,
|
||||
type: 'new',
|
||||
targetKey: siteManagementMenuStore.menuItemData.targetKey ? '_blank' : '',
|
||||
sira: siteManagementMenuStore.menuContentList.length + 1
|
||||
}
|
||||
siteManagementMenuStore.menuContentList.push(newData)
|
||||
} else {
|
||||
if (siteManagementMenuStore.menuItemData.id !== undefined)
|
||||
siteManagementMenuStore.menuItemData.type = 'update'
|
||||
|
||||
siteManagementMenuStore.menuItemData.targetKey = siteManagementMenuStore
|
||||
.menuItemData.targetKey
|
||||
? '_blank'
|
||||
: ''
|
||||
|
||||
Object.assign(
|
||||
siteManagementMenuStore.menuContentList[editMenuIndex.value!],
|
||||
siteManagementMenuStore.menuItemData
|
||||
)
|
||||
|
||||
isEdit.value = false
|
||||
editMenuIndex.value = null
|
||||
}
|
||||
menuItemPanel.value = false
|
||||
}else{
|
||||
siteManagementMenuValidationStore.isFormValid = true
|
||||
}
|
||||
}
|
||||
|
||||
const GetMenuList = async () => {
|
||||
await siteManagementMenuService.GetMenuContentList()
|
||||
siteManagementMenuStore.menuContentList.sort((a, b) => a.sira - b.sira)
|
||||
|
||||
pageList.value.splice(
|
||||
0,
|
||||
pageList.value.length,
|
||||
...siteManagementPageStore.allPagesList
|
||||
)
|
||||
|
||||
CheckPageList()
|
||||
}
|
||||
|
||||
onBeforeMount(async () => {
|
||||
await siteManagementPageService.GetAllPages()
|
||||
await GetMenuList()
|
||||
})
|
||||
</script>
|
||||
@ -13,7 +13,7 @@
|
||||
@click="OpenPreviewPanel"
|
||||
v-if="
|
||||
(route.name === 'Profil' && !usersStore.isPanelUser) ||
|
||||
route.name === 'UyeYetkiliDetay' && loaded
|
||||
(route.name === 'UyeYetkiliDetay'|| usersStore.selectedUserApproveId === 3) && loaded
|
||||
">
|
||||
Önizleme
|
||||
</button>
|
||||
@ -21,9 +21,8 @@
|
||||
</div>
|
||||
<div class="form-part-content" v-if="loaded">
|
||||
<user-approve-states v-if="!isPreview && route.name !== 'UyeYetkiliYeni'" />
|
||||
|
||||
<form-select
|
||||
v-if="route.name === 'UyeYetkiliYeni'"
|
||||
v-if="route.name === 'UyeYetkiliYeni' || usersStore.selectedUserApproveId === 3"
|
||||
label="Kullanıcı Tipi"
|
||||
:listData="yetkiliTipList"
|
||||
listText="baslik"
|
||||
@ -36,7 +35,6 @@
|
||||
<div class="form-item back-grad back-grad-grey" v-else>
|
||||
{{ uyeBilgileriStore.formData.basvuruTipi }}
|
||||
</div>
|
||||
|
||||
<form-input
|
||||
type="email"
|
||||
half
|
||||
@ -379,8 +377,7 @@
|
||||
v-model="previewPanel"
|
||||
panel-title="Üye Bilgileri Önizleme">
|
||||
<template #panelContent>
|
||||
<panel-uye-onizleme />
|
||||
<panel-uye-onizleme shadow v-model:id="previewId" />
|
||||
<panel-uye-onizleme v-model:id="previewId" />
|
||||
</template>
|
||||
<template #footerButton>
|
||||
<div class="button-c button-save" @click="DownloadPDF">PDF İndir</div>
|
||||
@ -431,8 +428,8 @@
|
||||
const SetYetkiliTipList = () => {
|
||||
Object.assign(yetkiliTipList.value, globalDataStore.customerTips)
|
||||
|
||||
let araciInd = yetkiliTipList.value.findIndex((p) => p.id === 23)
|
||||
yetkiliTipList.value.splice(araciInd, 1)
|
||||
// let araciInd = yetkiliTipList.value.findIndex((p) => p.id === 23)
|
||||
// yetkiliTipList.value.splice(araciInd, 1)
|
||||
}
|
||||
|
||||
const ilceDisabled = computed<boolean>(() => {
|
||||
|
||||
@ -1,21 +1,26 @@
|
||||
<template>
|
||||
<div class="form-part form-title">
|
||||
<div class="form-title-buttons">
|
||||
<div class="button-c button-save" @click="SendForApprove">Onaya Gönder</div>
|
||||
<div class='form-part form-title'>
|
||||
<div class='form-title-buttons'>
|
||||
<div class='button-c button-save' @click='SendForApprove'>Onaya Gönder</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
<script setup lang='ts'>
|
||||
import { ref, reactive, onBeforeMount, computed } from 'vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
|
||||
const route = useRoute()
|
||||
import { useDataStore } from '@/stores/dataStore'
|
||||
|
||||
const dataStore = useDataStore()
|
||||
import { useGlobalStore } from '@/stores/globalStore'
|
||||
|
||||
const globalStore = useGlobalStore()
|
||||
import { useUsersStore } from '@/stores/usersStore'
|
||||
|
||||
const usersStore = useUsersStore()
|
||||
import { useCustomerStore } from '../../stores/customerStore'
|
||||
|
||||
const customerStore = useCustomerStore()
|
||||
|
||||
const formData = reactive<Record<string, any>>({
|
||||
@ -39,9 +44,9 @@
|
||||
})
|
||||
|
||||
if (form !== 'errorfalse') {
|
||||
if (route.name === 'UyeDetay')
|
||||
if (route.name === 'UyeDetay' || route.name === 'Profil') {
|
||||
usersStore.userApproveId = formData.onayDurumuIslemTipiId
|
||||
else usersStore.userSubApproveId = formData.onayDurumuIslemTipiId
|
||||
} else usersStore.userSubApproveId = formData.onayDurumuIslemTipiId
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -1,30 +1,30 @@
|
||||
<template>
|
||||
<div class="form-part">
|
||||
<div class="form-part-title">
|
||||
<div class='form-part'>
|
||||
<div class='form-part-title'>
|
||||
<h4>Profil Resmi</h4>
|
||||
</div>
|
||||
<div class="form-part-content">
|
||||
<div class='form-part-content'>
|
||||
<template v-if="file.filePath !== '' && file.filePath !== null">
|
||||
<file-list-item
|
||||
:data="file"
|
||||
@click="ReplaceImage"
|
||||
:data='file'
|
||||
@click='ReplaceImage'
|
||||
onlyPreview
|
||||
:filePath="file.filePath" />
|
||||
:filePath='file.filePath' />
|
||||
</template>
|
||||
<template v-else>
|
||||
<template v-if="route.name === 'Profil' || (route.name === 'Profil' && !usersStore.isPanelUser)">
|
||||
<div class="form-item form-item-picture clickable" @click="picturePanel = true">
|
||||
<div class="image-c">
|
||||
<i class="ico-c">
|
||||
<div class='form-item form-item-picture clickable' @click='picturePanel = true'>
|
||||
<div class='image-c'>
|
||||
<i class='ico-c'>
|
||||
<svg>
|
||||
<use href="@/assets/images/icons.svg#plus"></use>
|
||||
<use href='@/assets/images/icons.svg#plus'></use>
|
||||
</svg>
|
||||
</i>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<template v-else>
|
||||
<div class="form-inner-comment">
|
||||
<div class='form-inner-comment'>
|
||||
Eklenmiş resim bulunamadı.
|
||||
</div>
|
||||
</template>
|
||||
@ -32,39 +32,45 @@
|
||||
</div>
|
||||
</div>
|
||||
<panel-wrapper
|
||||
v-if="picturePanel"
|
||||
v-model="picturePanel"
|
||||
panel-title="Profil Resmi Ekle">
|
||||
v-if='picturePanel'
|
||||
v-model='picturePanel'
|
||||
panel-title='Profil Resmi Ekle'>
|
||||
<template #panelContent>
|
||||
<panel-user-picture />
|
||||
</template>
|
||||
<template #footerButton>
|
||||
<div class="button-c button-save" @click="FileUpload">Ekle</div>
|
||||
<div class='button-c button-save' @click='FileUpload'>Ekle</div>
|
||||
</template>
|
||||
</panel-wrapper>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
<script setup lang='ts'>
|
||||
import { ref, reactive, onBeforeMount } from 'vue'
|
||||
import PanelUserPicture from '../panel/PanelUserPicture.vue'
|
||||
import PanelWrapper from '@/components/PanelWrapper.vue'
|
||||
|
||||
import { useRoute } from 'vue-router'
|
||||
|
||||
const route = useRoute()
|
||||
import { useDataStore } from '@/stores/dataStore'
|
||||
|
||||
const dataStore = useDataStore()
|
||||
import { useGlobalStore } from '@/stores/globalStore'
|
||||
|
||||
const globalStore = useGlobalStore()
|
||||
import { useValidationStore } from '@/stores/validationStore'
|
||||
|
||||
const validationStore = useValidationStore()
|
||||
import { useUsersStore } from '@/stores/usersStore'
|
||||
|
||||
const usersStore = useUsersStore()
|
||||
import { useCustomerStore } from '@/module/uyeler/stores/customerStore'
|
||||
|
||||
const customerStore = useCustomerStore()
|
||||
|
||||
const picturePanel = ref<boolean>(false)
|
||||
const isUpdate = ref<boolean>(false)
|
||||
|
||||
const file = reactive<Record<string,any>>({
|
||||
const file = reactive<Record<string, any>>({
|
||||
title: '',
|
||||
filePath: ''
|
||||
})
|
||||
@ -75,7 +81,7 @@
|
||||
picturePanel.value = true
|
||||
}
|
||||
|
||||
const GetData = async () => {
|
||||
const GetData = async () => {
|
||||
let dt = await dataStore.dataGet('AppUserResim/AppUserId/' + usersStore.selectedUserId())
|
||||
if (dt !== 'errorfalse') {
|
||||
Object.assign(file, dt)
|
||||
|
||||
@ -119,6 +119,7 @@ export const useUyeBilgileriStore = defineStore('uyeBilgileriStore', () => {
|
||||
delete formData[key]
|
||||
})
|
||||
}*/
|
||||
ResetFormItems();
|
||||
formChanged.value = true
|
||||
}
|
||||
|
||||
|
||||
@ -8,7 +8,7 @@ export const useDataStore = defineStore('dataStore', () => {
|
||||
const globalDataStore = useGlobalDataStore()
|
||||
const toastStore = useToastStore()
|
||||
|
||||
const siteBase = ref<string>('https://mpiapi.beyaz.net/')
|
||||
const siteBase = ref<string>(import.meta.env.VITE_API_URL)
|
||||
const apiBase = ref<string>('api/')
|
||||
const panelData = reactive<Record<string, any>>({})
|
||||
const pageData = reactive<Record<string, any>>({})
|
||||
|
||||
@ -11,5 +11,8 @@ export default defineConfig({
|
||||
alias: {
|
||||
'@': fileURLToPath(new URL('./src', import.meta.url))
|
||||
}
|
||||
},
|
||||
esbuild: {
|
||||
drop: process.env.NODE_ENV === 'production' ? ['console', 'debugger'] : []
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user