Compare commits
41 Commits
Piyango-Do
...
847b1c1b37
| Author | SHA1 | Date | |
|---|---|---|---|
| 847b1c1b37 | |||
| 62dbaef278 | |||
| aae7512498 | |||
| 75ff9823fe | |||
| 3b9173b881 | |||
| fb1ddf085a | |||
| b1274cf3ab | |||
| 9650194cb9 | |||
| 9e6c1f3840 | |||
| 343e93c168 | |||
| b1c23985ff | |||
| a4358afa11 | |||
| 9869edf4a6 | |||
| 624b8fae56 | |||
| 6c44487489 | |||
| 7353d957c1 | |||
| 915aa1757e | |||
| 10d95b6763 | |||
| 97a77a2a37 | |||
| 2338cf04d8 | |||
| de3a1f549a | |||
| b521ad0278 | |||
| 7872259102 | |||
| 7cff75e82c | |||
| 92d0a0dde7 | |||
| a4e2a922d3 | |||
| 190815193a | |||
| 26f843416d | |||
| 7adabf5abd | |||
| ed8b6fd3eb | |||
| 7776e24ddd | |||
| 408724cf67 | |||
| f4c0511afb | |||
| 7998b7bd6c | |||
| 6ff319cb1d | |||
| 10011eacd6 | |||
| 36d646e0bf | |||
| 908e63b896 | |||
| 0e130eafff | |||
| f6850853b2 | |||
| ff0304b4d9 |
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=http://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" />
|
/// <reference types="vite/client" />
|
||||||
|
|
||||||
|
interface ImportMetaEnv {
|
||||||
|
readonly VITE_API_URL: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface ImportMeta {
|
||||||
|
readonly env: ImportMetaEnv;
|
||||||
|
}
|
||||||
@ -5,9 +5,12 @@
|
|||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
|
"localdev": "vite",
|
||||||
"build": "run-p type-check \"build-only {@}\" --",
|
"build": "run-p type-check \"build-only {@}\" --",
|
||||||
|
"buildtest": "run-p type-check \"build-only-test {@}\" --",
|
||||||
"preview": "vite preview",
|
"preview": "vite preview",
|
||||||
"build-only": "vite build",
|
"build-only": "vite build",
|
||||||
|
"build-only-test": "vite build --mode development",
|
||||||
"type-check": "vue-tsc --build --force"
|
"type-check": "vue-tsc --build --force"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
@ -659,7 +659,9 @@ svg {
|
|||||||
max-width: 24px;
|
max-width: 24px;
|
||||||
max-height: 24px;
|
max-height: 24px;
|
||||||
}
|
}
|
||||||
|
.ico-c.ico-btn:hover{
|
||||||
|
background-color: navy;
|
||||||
|
}
|
||||||
/* colors */
|
/* colors */
|
||||||
.back-grad {
|
.back-grad {
|
||||||
padding: 6px 8px;
|
padding: 6px 8px;
|
||||||
@ -715,7 +717,11 @@ svg {
|
|||||||
color: #000;
|
color: #000;
|
||||||
padding: 12px;
|
padding: 12px;
|
||||||
}
|
}
|
||||||
|
.back-grad-dgrey {
|
||||||
|
background-image: linear-gradient(24deg, #797979, #a1a1a1);
|
||||||
|
color: #000;
|
||||||
|
padding: 12px;
|
||||||
|
}
|
||||||
.back-grey {
|
.back-grey {
|
||||||
background-color: #f1f1f1;
|
background-color: #f1f1f1;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -21,7 +21,7 @@
|
|||||||
<div class="actions-c" v-if="editable || $slots.actionButtons">
|
<div class="actions-c" v-if="editable || $slots.actionButtons">
|
||||||
<slot name="actionButtons"></slot>
|
<slot name="actionButtons"></slot>
|
||||||
<i
|
<i
|
||||||
class="ico-c ico-section ico-section-header-btn ico-replace"
|
class="ico-c ico-section ico-btn back-grad-dgrey"
|
||||||
@click="OnClick"
|
@click="OnClick"
|
||||||
v-if="editable">
|
v-if="editable">
|
||||||
<svg><use href="/src/assets/images/icons.svg#replace"></use></svg>
|
<svg><use href="/src/assets/images/icons.svg#replace"></use></svg>
|
||||||
@ -38,12 +38,15 @@
|
|||||||
</div>
|
</div>
|
||||||
<div v-else>{{ fileType.toLocaleUpperCase() }}</div>
|
<div v-else>{{ fileType.toLocaleUpperCase() }}</div>
|
||||||
</a>
|
</a>
|
||||||
<i
|
<div class="actions-c actions-top" v-if="editable || $slots.actionButtons">
|
||||||
class="ico-c ico-section ico-section-header-btn ico-replace"
|
<slot name="actionButtons"></slot>
|
||||||
@click="OnClick"
|
<i
|
||||||
v-if="editable">
|
class="ico-c ico-section ico-btn back-grad-dgrey"
|
||||||
<svg><use href="/src/assets/images/icons.svg#replace"></use></svg>
|
@click="OnClick"
|
||||||
</i>
|
v-if="editable">
|
||||||
|
<svg><use href="/src/assets/images/icons.svg#replace"></use></svg>
|
||||||
|
</i>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
@ -114,4 +117,14 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
pointer-events: fill;
|
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>
|
</style>
|
||||||
|
|||||||
@ -14,7 +14,9 @@
|
|||||||
</span>
|
</span>
|
||||||
<template v-if="modelText !== undefined && modelText !== ''">
|
<template v-if="modelText !== undefined && modelText !== ''">
|
||||||
<template v-if="typeof modelText === 'string'">
|
<template v-if="typeof modelText === 'string'">
|
||||||
<span>{{ price ? globalStore.toTrLocale(modelText) : modelText }}</span>
|
<span :class="[size ? 'form-item-size form-item-size-' + size : '']">
|
||||||
|
{{ price ? globalStore.toTrLocale(modelText) : modelText }}
|
||||||
|
</span>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="typeof modelText === 'object'">
|
<template v-if="typeof modelText === 'object'">
|
||||||
<ul>
|
<ul>
|
||||||
@ -25,7 +27,9 @@
|
|||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<span>{{ price ? globalStore.toTrLocale(localValue) : localValue }}</span>
|
<span :class="[size ? 'form-item-size form-item-size-' + size : '']">
|
||||||
|
{{ price ? globalStore.toTrLocale(localValue) : localValue }}
|
||||||
|
</span>
|
||||||
</template>
|
</template>
|
||||||
<span
|
<span
|
||||||
class="form-item-alert"
|
class="form-item-alert"
|
||||||
@ -64,6 +68,7 @@
|
|||||||
modelText?: any
|
modelText?: any
|
||||||
invalidText?: string
|
invalidText?: string
|
||||||
price?: boolean
|
price?: boolean
|
||||||
|
size?: number | string
|
||||||
}
|
}
|
||||||
const props = withDefaults(defineProps<Props>(), {
|
const props = withDefaults(defineProps<Props>(), {
|
||||||
half: false,
|
half: false,
|
||||||
@ -71,13 +76,23 @@
|
|||||||
})
|
})
|
||||||
const localValue = ref<any>(props.modelValue)
|
const localValue = ref<any>(props.modelValue)
|
||||||
|
|
||||||
if (props.type === 'date' && props.modelValue !== null && props.modelValue !== undefined && props.modelValue !== '')
|
if (
|
||||||
|
props.type === 'date' &&
|
||||||
|
props.modelValue !== null &&
|
||||||
|
props.modelValue !== undefined &&
|
||||||
|
props.modelValue !== ''
|
||||||
|
)
|
||||||
localValue.value = dateStore.dateFormat({
|
localValue.value = dateStore.dateFormat({
|
||||||
date: props.modelValue as Date,
|
date: props.modelValue as Date,
|
||||||
pattern: 'dd-mm-yy'
|
pattern: 'dd-mm-yy'
|
||||||
})
|
})
|
||||||
|
|
||||||
if (props.type === 'datetime' && props.modelValue !== null && props.modelValue !== undefined && props.modelValue !== '')
|
if (
|
||||||
|
props.type === 'datetime' &&
|
||||||
|
props.modelValue !== null &&
|
||||||
|
props.modelValue !== undefined &&
|
||||||
|
props.modelValue !== ''
|
||||||
|
)
|
||||||
localValue.value = dateStore.dateFormat({
|
localValue.value = dateStore.dateFormat({
|
||||||
date: props.modelValue as Date,
|
date: props.modelValue as Date,
|
||||||
pattern: 'dd-mm-yy-t'
|
pattern: 'dd-mm-yy-t'
|
||||||
@ -108,3 +123,14 @@
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
</script>
|
</script>
|
||||||
|
<style scoped>
|
||||||
|
.form-item-size {
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
.form-item-size-1 {
|
||||||
|
font-size: 1.2em;
|
||||||
|
}
|
||||||
|
.form-item-size-2 {
|
||||||
|
font-size: 1.5em;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
@ -2,7 +2,7 @@ import axios from 'axios'
|
|||||||
import { useUsersStore } from '@/stores/usersStore'
|
import { useUsersStore } from '@/stores/usersStore'
|
||||||
import router from '@/router'
|
import router from '@/router'
|
||||||
|
|
||||||
axios.defaults.baseURL = 'https://panelapi.cekilisevi.gov.tr/'
|
axios.defaults.baseURL = import.meta.env.VITE_API_URL
|
||||||
//axios.defaults.timeout = 2000;
|
//axios.defaults.timeout = 2000;
|
||||||
axios.defaults.headers['Content-Type'] = 'application/json; charset=utf-8'
|
axios.defaults.headers['Content-Type'] = 'application/json; charset=utf-8'
|
||||||
import { useDataStore } from '@/stores/dataStore'
|
import { useDataStore } from '@/stores/dataStore'
|
||||||
|
|||||||
@ -109,7 +109,7 @@
|
|||||||
{
|
{
|
||||||
title: 'Site Yönetimi',
|
title: 'Site Yönetimi',
|
||||||
ico: 'sitemanagement',
|
ico: 'sitemanagement',
|
||||||
show: usersStore.isPanelUser && !usersStore.isAccounting,
|
show: usersStore.isSuperAdmin,
|
||||||
sub: [
|
sub: [
|
||||||
{
|
{
|
||||||
title: 'Yeni Sayfa',
|
title: 'Yeni Sayfa',
|
||||||
@ -142,6 +142,10 @@
|
|||||||
title: 'Piyango Listesi',
|
title: 'Piyango Listesi',
|
||||||
to: '/muhasebe/piyango-listesi'
|
to: '/muhasebe/piyango-listesi'
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: 'İzin Bedel Oranı',
|
||||||
|
to: '/muhasebe/izin-bedel-orani'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: 'Ayarlar',
|
title: 'Ayarlar',
|
||||||
to: '/muhasebe/ayarlar'
|
to: '/muhasebe/ayarlar'
|
||||||
|
|||||||
@ -57,7 +57,7 @@
|
|||||||
<panel-katilimci-document />
|
<panel-katilimci-document />
|
||||||
</template>
|
</template>
|
||||||
<template #footerButton>
|
<template #footerButton>
|
||||||
<button class="button-c button-save" @click="FileUpload">Yükle</button>
|
<button class="button-c button-save" @click="FileUpload" :disabled="uploadProgressPanel">Yükle</button>
|
||||||
</template>
|
</template>
|
||||||
</panel-wrapper>
|
</panel-wrapper>
|
||||||
<panel-wrapper
|
<panel-wrapper
|
||||||
|
|||||||
@ -8,6 +8,11 @@
|
|||||||
<form-piyango-onay-kisiler />
|
<form-piyango-onay-kisiler />
|
||||||
</div>
|
</div>
|
||||||
</!--div-->
|
</!--div-->
|
||||||
|
<div class="form-inner-content">
|
||||||
|
<div class="form-part">
|
||||||
|
<form-piyango-onay-durum />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="form-inner-content">
|
<div class="form-inner-content">
|
||||||
<div class="form-part">
|
<div class="form-part">
|
||||||
<form-piyango-onay-log />
|
<form-piyango-onay-log />
|
||||||
@ -16,6 +21,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import FormPiyangoOnayDurum from './form/FormPiyangoOnayDurum.vue'
|
||||||
import FormPiyangoOnayLog from './form/FormPiyangoOnayLog.vue'
|
import FormPiyangoOnayLog from './form/FormPiyangoOnayLog.vue'
|
||||||
import FormPiyangoOnay from './form/FormPiyangoOnay.vue'
|
import FormPiyangoOnay from './form/FormPiyangoOnay.vue'
|
||||||
import FormPiyangoOnayKisiler from './form/FormPiyangoOnayKisiler.vue'
|
import FormPiyangoOnayKisiler from './form/FormPiyangoOnayKisiler.vue'
|
||||||
|
|||||||
@ -10,7 +10,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="form-inner-content">
|
<div class="form-inner-content">
|
||||||
<div class="form-part">
|
<div class="form-part">
|
||||||
<form-piyango-onay-log />
|
<form-piyango-onay-durum />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -19,6 +19,6 @@
|
|||||||
import { usePiyangoStore } from '../stores/piyangoStore'
|
import { usePiyangoStore } from '../stores/piyangoStore'
|
||||||
const piyangoStore = usePiyangoStore()
|
const piyangoStore = usePiyangoStore()
|
||||||
|
|
||||||
import FormPiyangoOnayLog from './form/FormPiyangoOnayLog.vue'
|
import FormPiyangoOnayDurum from './form/FormPiyangoOnayDurum.vue'
|
||||||
import FormPiyangoUserOnayaGonder from './form/FormPiyangoUserOnayaGonder.vue'
|
import FormPiyangoUserOnayaGonder from './form/FormPiyangoUserOnayaGonder.vue'
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -22,13 +22,20 @@
|
|||||||
v-if="
|
v-if="
|
||||||
usersStore.isPanelUser ||
|
usersStore.isPanelUser ||
|
||||||
(!usersStore.isPanelUser &&
|
(!usersStore.isPanelUser &&
|
||||||
|
piyangoStore.lotteryApprove !== 0 &&
|
||||||
|
piyangoStore.lotteryApprove !== 1 &&
|
||||||
|
piyangoStore.lotteryApprove !== 2 &&
|
||||||
piyangoStore.lotteryApprove !== 3 &&
|
piyangoStore.lotteryApprove !== 3 &&
|
||||||
!piyangoTeminatStore.isNew)
|
!piyangoTeminatStore.isNew)
|
||||||
" />
|
" />
|
||||||
<panel-piyango-teminat-durumu
|
<panel-piyango-teminat-durumu
|
||||||
v-if="
|
v-if="
|
||||||
!usersStore.isPanelUser &&
|
!usersStore.isPanelUser &&
|
||||||
(piyangoStore.lotteryApprove === 3 || piyangoTeminatStore.isNew)
|
(piyangoStore.lotteryApprove === 0 ||
|
||||||
|
piyangoStore.lotteryApprove === 1 ||
|
||||||
|
piyangoStore.lotteryApprove === 2 ||
|
||||||
|
piyangoStore.lotteryApprove === 3 ||
|
||||||
|
piyangoTeminatStore.isNew)
|
||||||
" />
|
" />
|
||||||
</template>
|
</template>
|
||||||
<template #footerButton>
|
<template #footerButton>
|
||||||
@ -36,14 +43,22 @@
|
|||||||
class="button-c button-save"
|
class="button-c button-save"
|
||||||
:disabled="!piyangoTeminatValidationStore.formChanged"
|
:disabled="!piyangoTeminatValidationStore.formChanged"
|
||||||
@click="piyangoTeminatService.SaveTeminatDurum"
|
@click="piyangoTeminatService.SaveTeminatDurum"
|
||||||
v-if="piyangoTeminatStore.isNew || usersStore.isPanelUser">
|
v-if="
|
||||||
|
usersStore.isPanelUser ||
|
||||||
|
(!usersStore.isPanelUser &&
|
||||||
|
(piyangoStore.lotteryApprove === 0 ||
|
||||||
|
piyangoStore.lotteryApprove === 1 ||
|
||||||
|
piyangoStore.lotteryApprove === 2 ||
|
||||||
|
piyangoStore.lotteryApprove === 3)) ||
|
||||||
|
piyangoTeminatStore.isNew
|
||||||
|
">
|
||||||
Kaydet
|
Kaydet
|
||||||
</button>
|
</button>
|
||||||
</template>
|
</template>
|
||||||
</panel-wrapper>
|
</panel-wrapper>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, computed,onBeforeMount } from 'vue'
|
import { ref, computed, onBeforeMount } from 'vue'
|
||||||
import PanelWrapper from '@/components/PanelWrapper.vue'
|
import PanelWrapper from '@/components/PanelWrapper.vue'
|
||||||
|
|
||||||
import PanelPiyangoTeminatDurumu from './panel/PanelPiyangoTeminatDurumu.vue'
|
import PanelPiyangoTeminatDurumu from './panel/PanelPiyangoTeminatDurumu.vue'
|
||||||
@ -143,10 +158,7 @@
|
|||||||
])
|
])
|
||||||
|
|
||||||
const teminatAddAction = computed(() => {
|
const teminatAddAction = computed(() => {
|
||||||
if (
|
if (!usersStore.isPanelUser) return NewTeminatDurum
|
||||||
!usersStore.isPanelUser
|
|
||||||
)
|
|
||||||
return NewTeminatDurum
|
|
||||||
else return ''
|
else return ''
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@ -84,7 +84,7 @@
|
|||||||
Başvuru admin tarafından kapsam dışı olarak işaretlenmiştir.
|
Başvuru admin tarafından kapsam dışı olarak işaretlenmiştir.
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</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.
|
Kampanya için cezai işlem uygulanmıştır.
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@ -3,6 +3,10 @@
|
|||||||
<lottery-states
|
<lottery-states
|
||||||
:piyangoAmac="piyangoStore.lotteryData.amacpiyangoId"
|
:piyangoAmac="piyangoStore.lotteryData.amacpiyangoId"
|
||||||
v-if="!isPreview" />
|
v-if="!isPreview" />
|
||||||
|
<form-display
|
||||||
|
v-model="piyangoStore.lotteryData.piyangoId"
|
||||||
|
label="Piyango ID"
|
||||||
|
size="1" />
|
||||||
<template
|
<template
|
||||||
v-if="
|
v-if="
|
||||||
usersStore.isPanelUser &&
|
usersStore.isPanelUser &&
|
||||||
|
|||||||
@ -9,9 +9,19 @@
|
|||||||
:data="file"
|
:data="file"
|
||||||
onlyPreview
|
onlyPreview
|
||||||
:editable="false"
|
:editable="false"
|
||||||
:filePath="file.resimYolu" />
|
:filePath="file.resimYolu">
|
||||||
|
<template #actionButtons v-if="usersStore.isPanelUser">
|
||||||
|
<i
|
||||||
|
class="ico-c ico-btn ico-section back-grad-alert"
|
||||||
|
@click="DeleteImagePop(file)">
|
||||||
|
<svg><use href="/src/assets/images/icons.svg#trash"></use></svg>
|
||||||
|
</i>
|
||||||
|
</template>
|
||||||
|
</file-list-item>
|
||||||
</template>
|
</template>
|
||||||
<div v-if="usersStore.isPanelUser && fileList.length === 0" class="form-inner-comment">
|
<div
|
||||||
|
v-if="usersStore.isPanelUser && fileList.length === 0"
|
||||||
|
class="form-inner-comment">
|
||||||
Eklenmiş resim bulunamadı.
|
Eklenmiş resim bulunamadı.
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -26,13 +36,43 @@
|
|||||||
const usersStore = useUsersStore()
|
const usersStore = useUsersStore()
|
||||||
import { usePiyangoStore } from '../../stores/piyangoStore'
|
import { usePiyangoStore } from '../../stores/piyangoStore'
|
||||||
const piyangoStore = usePiyangoStore()
|
const piyangoStore = usePiyangoStore()
|
||||||
|
import { useDialogStore } from '@/components/global/dialogStore'
|
||||||
|
const dialogStore = useDialogStore()
|
||||||
|
|
||||||
const fileList = ref<Record<string,any>[]>([])
|
const fileList = ref<Record<string, any>[]>([])
|
||||||
|
|
||||||
const GetData = async () => {
|
const GetData = async () => {
|
||||||
let dt = await dataStore.dataGet('CekilisResim/Cekilis/' + piyangoStore.selectedLottery)
|
let dt = await dataStore.dataGet(
|
||||||
|
'CekilisResim/Cekilis/' + piyangoStore.selectedLottery
|
||||||
|
)
|
||||||
if (dt !== 'errorfalse') fileList.value.splice(0, fileList.value.length, ...dt.data)
|
if (dt !== 'errorfalse') fileList.value.splice(0, fileList.value.length, ...dt.data)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const DeleteImagePop = (data: Record<string, any>) => {
|
||||||
|
dialogStore.CreateDialog({
|
||||||
|
title: 'Resim Sil',
|
||||||
|
id: 'deleteimage',
|
||||||
|
content: 'Resimi silmek istediğinize emin misiniz? Bu işlem geri alınamaz.',
|
||||||
|
closeText: 'Vazgeç',
|
||||||
|
buttons: [
|
||||||
|
{
|
||||||
|
label: 'Resmi Sil',
|
||||||
|
type: 'alert',
|
||||||
|
function: () => DeleteImage(data.id)
|
||||||
|
}
|
||||||
|
]
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const DeleteImage = async (id: number | string) => {
|
||||||
|
var dt = await dataStore.dataDelete('CekilisResim/' + id)
|
||||||
|
|
||||||
|
if (dt !== 'errorfalse') {
|
||||||
|
dialogStore.CloseDialog('deleteimage')
|
||||||
|
await GetData()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
onBeforeMount(async () => {
|
onBeforeMount(async () => {
|
||||||
await GetData()
|
await GetData()
|
||||||
})
|
})
|
||||||
|
|||||||
@ -1,102 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="form-part form-title" v-if="usersStore.isPanelUser">
|
|
||||||
<div class="form-title-buttons">
|
|
||||||
<button
|
|
||||||
class="button-c button-save"
|
|
||||||
@click="piyangoTeminatService.SaveTeminatDurum"
|
|
||||||
:disabled="!piyangoTeminatValidationStore.formChanged">
|
|
||||||
Kaydet
|
|
||||||
</button>
|
|
||||||
<button
|
|
||||||
v-if="piyangoTeminatValidationStore.formChanged"
|
|
||||||
class="button-c button-cancel panel-close"
|
|
||||||
@click="piyangoTeminatStore.ResetFormData">
|
|
||||||
Vazgeç
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div :class="['form-part', piyangoTeminatValidationStore.formChanged ? 'changed' : '']"> <div
|
|
||||||
class="form-part-content"
|
|
||||||
v-if="piyangoTeminatStore.loaded">
|
|
||||||
<form-select
|
|
||||||
v-if="usersStore.isPanelUser"
|
|
||||||
label="İşlem"
|
|
||||||
:listData="piyangoDataStore.piyangoTeminatDurumlari"
|
|
||||||
listText="value"
|
|
||||||
listVal="id"
|
|
||||||
v-model="piyangoTeminatStore.piyangoTeminatFormData.state"
|
|
||||||
required
|
|
||||||
:invalidText="piyangoTeminatValidationStore.invalidTexts.state"
|
|
||||||
@change="OnKeyup" />
|
|
||||||
|
|
||||||
<form-display
|
|
||||||
v-model="piyangoTeminatStore.piyangoTeminatFormData.amount"
|
|
||||||
half
|
|
||||||
label="Tutarı" />
|
|
||||||
|
|
||||||
<form-display
|
|
||||||
v-model="piyangoTeminatStore.piyangoTeminatFormData.teminatParentTypeText"
|
|
||||||
half
|
|
||||||
label="Para Birimi" />
|
|
||||||
|
|
||||||
<form-display
|
|
||||||
label="Teminat Türü"
|
|
||||||
half
|
|
||||||
v-model="piyangoTeminatStore.piyangoTeminatFormData.teminantChildTypeText" />
|
|
||||||
|
|
||||||
<form-display
|
|
||||||
type="date"
|
|
||||||
half
|
|
||||||
v-model="piyangoTeminatStore.piyangoTeminatFormData.teminantDate"
|
|
||||||
label="Tarih" />
|
|
||||||
|
|
||||||
<form-display
|
|
||||||
v-model="piyangoTeminatStore.piyangoTeminatFormData.teminantNo"
|
|
||||||
half
|
|
||||||
label="No" />
|
|
||||||
<div class="form-item form-item-half"></div>
|
|
||||||
|
|
||||||
<form-display
|
|
||||||
v-model="piyangoTeminatStore.piyangoTeminatFormData.bankName"
|
|
||||||
half
|
|
||||||
label="Banka Adı" />
|
|
||||||
|
|
||||||
<form-display
|
|
||||||
v-model="piyangoTeminatStore.piyangoTeminatFormData.bankBranch"
|
|
||||||
half
|
|
||||||
label="Banka Şubesi" />
|
|
||||||
|
|
||||||
<!--form-display
|
|
||||||
label="İşlem"
|
|
||||||
v-model="piyangoTeminatStore.piyangoTeminatFormData.stateText" /-->
|
|
||||||
|
|
||||||
<file-list-item
|
|
||||||
title="Dosya"
|
|
||||||
:data="piyangoTeminatStore.piyangoTeminatFormData"
|
|
||||||
:editable="false"
|
|
||||||
:filePath="piyangoTeminatStore.piyangoTeminatFormData.teminantDocumentUrl"
|
|
||||||
:usePath="true"
|
|
||||||
:onlyPreview="true" />
|
|
||||||
|
|
||||||
<form-display
|
|
||||||
v-model="piyangoTeminatStore.piyangoTeminatFormData.description"
|
|
||||||
label="Açıklama" />
|
|
||||||
</div></div>
|
|
||||||
|
|
||||||
</template>
|
|
||||||
<script setup lang="ts">
|
|
||||||
import { usePiyangoTeminatStore } from '../../stores/piyangoTeminatStore'
|
|
||||||
const piyangoTeminatStore = usePiyangoTeminatStore()
|
|
||||||
import { useUsersStore } from '@/stores/usersStore'
|
|
||||||
const usersStore = useUsersStore()
|
|
||||||
import { usePiyangoDataStore } from '../../stores/piyangoDataStore'
|
|
||||||
const piyangoDataStore = usePiyangoDataStore()
|
|
||||||
import { usePiyangoTeminatValidationStore } from '../../validation/piyangoTeminatValidationStore'
|
|
||||||
const piyangoTeminatValidationStore = usePiyangoTeminatValidationStore()
|
|
||||||
import { usePiyangoTeminatService } from '../../service/piyangoTeminatService'
|
|
||||||
const piyangoTeminatService = usePiyangoTeminatService()
|
|
||||||
|
|
||||||
const OnKeyup = () => {
|
|
||||||
piyangoTeminatValidationStore.formChanged = true
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
@ -23,6 +23,13 @@
|
|||||||
<strong style="font-size: 10pt; margin-bottom: 12px">
|
<strong style="font-size: 10pt; margin-bottom: 12px">
|
||||||
PİYANGO İLE İLGİLİ BİLGİLER
|
PİYANGO İLE İLGİLİ BİLGİLER
|
||||||
</strong>
|
</strong>
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
|
<strong style="font-size: 10pt; margin-bottom: 12px">
|
||||||
|
PİYANGO ID: {{ piyangoStore.lotteryData.piyangoId }}
|
||||||
|
</strong>
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
<table
|
<table
|
||||||
cellspacing="0"
|
cellspacing="0"
|
||||||
class="table-no-line"
|
class="table-no-line"
|
||||||
|
|||||||
@ -12,6 +12,12 @@
|
|||||||
Bahisler ve Oyunlar Dairesi Başkanlığına
|
Bahisler ve Oyunlar Dairesi Başkanlığına
|
||||||
</strong>
|
</strong>
|
||||||
<br />
|
<br />
|
||||||
|
<br />
|
||||||
|
<strong style="font-size: 10pt; margin-bottom: 12px">
|
||||||
|
PİYANGO ID: {{ piyangoStore.lotteryData.piyangoId }}
|
||||||
|
</strong>
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
<table
|
<table
|
||||||
cellspacing="0"
|
cellspacing="0"
|
||||||
class="table-no-line"
|
class="table-no-line"
|
||||||
|
|||||||
@ -31,7 +31,17 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="form-part-content" v-if="loaded">
|
<div class="form-part-content" v-if="loaded">
|
||||||
<lottery-states :piyangoAmac="piyangoStore.lotteryData.amacpiyangoId" />
|
<lottery-states :piyangoAmac="piyangoStore.lotteryData.amacpiyangoId" />
|
||||||
|
<template
|
||||||
|
v-if="
|
||||||
|
!piyangoStore.isNew &&
|
||||||
|
piyangoStore.lotteryData.piyangoId !== undefined &&
|
||||||
|
piyangoStore.lotteryData.piyangoId !== null
|
||||||
|
">
|
||||||
|
<form-display
|
||||||
|
v-model="piyangoStore.lotteryData.piyangoId"
|
||||||
|
label="Piyango ID"
|
||||||
|
size="1" />
|
||||||
|
</template>
|
||||||
<form-input
|
<form-input
|
||||||
modelKey="cekilisBaslik"
|
modelKey="cekilisBaslik"
|
||||||
v-model="piyangoStore.lotteryData.baslik"
|
v-model="piyangoStore.lotteryData.baslik"
|
||||||
@ -602,7 +612,7 @@
|
|||||||
|
|
||||||
let list = await dataStore.dataGet('Auth/userbyuserChildList/' + id)
|
let list = await dataStore.dataGet('Auth/userbyuserChildList/' + id)
|
||||||
|
|
||||||
childUsers.value = list.data.filter((p:Record<string,any>) => {
|
childUsers.value = list.data.filter((p: Record<string, any>) => {
|
||||||
return p.islemTipId === 4 || p.islemTipi === 'Üyelik Onaylandı'
|
return p.islemTipId === 4 || p.islemTipi === 'Üyelik Onaylandı'
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,88 @@
|
|||||||
|
<template>
|
||||||
|
<list-table-content
|
||||||
|
v-if="loaded"
|
||||||
|
:tableHeader="tableHeader"
|
||||||
|
formTitle="Piyango Onay Durumları"
|
||||||
|
listText="Kayıt"
|
||||||
|
:apiList="'OnayDurumu/GetSonOnayDurumlariList/' + piyangoStore.selectedLottery"
|
||||||
|
apiText="Piyango Onay Log Listesi"
|
||||||
|
page="form"
|
||||||
|
:refresh="piyangoOnayStore.refreshList" />
|
||||||
|
</template>
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { ref,onBeforeMount,computed } from 'vue'
|
||||||
|
import axios from 'axios'
|
||||||
|
import { useDateStore } from '@/stores/dateStore'
|
||||||
|
const dateStore = useDateStore()
|
||||||
|
import { useGlobalStore } from '@/stores/globalStore'
|
||||||
|
const globalStore = useGlobalStore()
|
||||||
|
import { usePiyangoOnayStore } from '../../stores/piyangoOnayStore'
|
||||||
|
const piyangoOnayStore = usePiyangoOnayStore()
|
||||||
|
import { usePiyangoStore } from '../../stores/piyangoStore'
|
||||||
|
const piyangoStore = usePiyangoStore()
|
||||||
|
import { usePiyangoDataStore } from '../../stores/piyangoDataStore'
|
||||||
|
const piyangoDataStore = usePiyangoDataStore()
|
||||||
|
import { usePiyangoServices } from '../../service/piyangoServices'
|
||||||
|
const piyangoServices = usePiyangoServices()
|
||||||
|
|
||||||
|
const loaded = ref<boolean>(false)
|
||||||
|
|
||||||
|
const piyangoOnayDurumlari = computed<Record<string, any>[]>(() => {
|
||||||
|
return piyangoDataStore.piyangoOnayDurumlari
|
||||||
|
})
|
||||||
|
|
||||||
|
const tableHeader = ref<Record<string, any>[]>([
|
||||||
|
{
|
||||||
|
name: 'tarih',
|
||||||
|
title: 'Tarih',
|
||||||
|
compute: (v: Record<string, any>): string => {
|
||||||
|
return v.tarih === null
|
||||||
|
? ''
|
||||||
|
: dateStore.dateFormat({ pattern: 'dd-mm-yy', date: v.tarih })
|
||||||
|
},
|
||||||
|
sort: true,
|
||||||
|
filter: {
|
||||||
|
type: 'date',
|
||||||
|
range: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'kisiAdi',
|
||||||
|
title: 'Kişi',
|
||||||
|
sort: true,
|
||||||
|
style: { width: '20%' }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'onayDurumuIslemTipiAdi',
|
||||||
|
title: 'İşlem',
|
||||||
|
sort: true,
|
||||||
|
filter: {
|
||||||
|
type: 'select',
|
||||||
|
data: piyangoOnayDurumlari,
|
||||||
|
listVal: 'id',
|
||||||
|
listText: 'tipAdi',
|
||||||
|
filterId: 'onayDurumuIslemTipiId'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'aciklama',
|
||||||
|
title: 'Açıklama',
|
||||||
|
sort: true,
|
||||||
|
style: { width: '30%' }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
dosyaUrl: 'aciklama',
|
||||||
|
title: 'Dosya',
|
||||||
|
computeHtml: (v: Record<string, any>) => {
|
||||||
|
if (v.dosyaUrl !== null && v.dosyaUrl !== undefined) {
|
||||||
|
return globalStore.TableCellDocument(v.dosyaUrl)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
style: { width: '20%' }
|
||||||
|
}
|
||||||
|
])
|
||||||
|
|
||||||
|
onBeforeMount(async () => {
|
||||||
|
loaded.value = true
|
||||||
|
})
|
||||||
|
</script>
|
||||||
@ -4,7 +4,7 @@
|
|||||||
:tableHeader="tableHeader"
|
:tableHeader="tableHeader"
|
||||||
formTitle="Piyango Onay Logları"
|
formTitle="Piyango Onay Logları"
|
||||||
listText="Kayıt"
|
listText="Kayıt"
|
||||||
:apiList="'OnayDurumu/GetSonOnayDurumlariList/' + piyangoStore.selectedLottery"
|
:apiList="'OnayDurumLog/Cekilis/' + piyangoStore.selectedLottery"
|
||||||
apiText="Piyango Onay Log Listesi"
|
apiText="Piyango Onay Log Listesi"
|
||||||
page="form"
|
page="form"
|
||||||
:refresh="piyangoOnayStore.refreshList" />
|
:refresh="piyangoOnayStore.refreshList" />
|
||||||
@ -47,38 +47,24 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'kisiAdi',
|
name: 'islemYapanKullanici.email',
|
||||||
title: 'Kişi',
|
title: 'Kişi',
|
||||||
sort: true,
|
sort: true,
|
||||||
style: { width: '20%' }
|
style: { width: '20%' }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'onayDurumuIslemTipiAdi',
|
name: 'eskiDurum',
|
||||||
title: 'İşlem',
|
title: 'Eski Durum',
|
||||||
sort: true,
|
},
|
||||||
filter: {
|
{
|
||||||
type: 'select',
|
name: 'yeniDurum',
|
||||||
data: piyangoOnayDurumlari,
|
title: 'Yeni Durum',
|
||||||
listVal: 'id',
|
|
||||||
listText: 'tipAdi',
|
|
||||||
filterId: 'onayDurumuIslemTipiId'
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'aciklama',
|
name: 'aciklama',
|
||||||
title: 'Açıklama',
|
title: 'Açıklama',
|
||||||
sort: true,
|
sort: true,
|
||||||
style: { width: '30%' }
|
style: { width: '30%' }
|
||||||
},
|
|
||||||
{
|
|
||||||
dosyaUrl: 'aciklama',
|
|
||||||
title: 'Dosya',
|
|
||||||
computeHtml: (v: Record<string, any>) => {
|
|
||||||
if (v.dosyaUrl !== null && v.dosyaUrl !== undefined) {
|
|
||||||
return globalStore.TableCellDocument(v.dosyaUrl)
|
|
||||||
}
|
|
||||||
},
|
|
||||||
style: { width: '20%' }
|
|
||||||
}
|
}
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|||||||
@ -9,7 +9,17 @@
|
|||||||
:data="file"
|
:data="file"
|
||||||
@click="EditImage"
|
@click="EditImage"
|
||||||
onlyPreview
|
onlyPreview
|
||||||
:filePath="file.resimYolu" />
|
:filePath="file.resimYolu">
|
||||||
|
<template
|
||||||
|
#actionButtons
|
||||||
|
v-if="piyangoStore.lotteryApprove === 0 || piyangoStore.lotteryApprove === 3">
|
||||||
|
<i
|
||||||
|
class="ico-c ico-btn ico-section back-grad-alert"
|
||||||
|
@click="DeleteImagePop(file)">
|
||||||
|
<svg><use href="/src/assets/images/icons.svg#trash"></use></svg>
|
||||||
|
</i>
|
||||||
|
</template>
|
||||||
|
</file-list-item>
|
||||||
</template>
|
</template>
|
||||||
<div
|
<div
|
||||||
class="form-item form-item-picture clickable"
|
class="form-item form-item-picture clickable"
|
||||||
@ -23,7 +33,9 @@
|
|||||||
</i>
|
</i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="usersStore.isPanelUser && fileList.length === 0" class="form-inner-comment">
|
<div
|
||||||
|
v-if="usersStore.isPanelUser && fileList.length === 0"
|
||||||
|
class="form-inner-comment">
|
||||||
Eklenmiş resim bulunamadı.
|
Eklenmiş resim bulunamadı.
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -57,16 +69,14 @@
|
|||||||
const usersStore = useUsersStore()
|
const usersStore = useUsersStore()
|
||||||
import { usePiyangoStore } from '../../stores/piyangoStore'
|
import { usePiyangoStore } from '../../stores/piyangoStore'
|
||||||
const piyangoStore = usePiyangoStore()
|
const piyangoStore = usePiyangoStore()
|
||||||
|
import { useDialogStore } from '@/components/global/dialogStore'
|
||||||
|
const dialogStore = useDialogStore()
|
||||||
|
|
||||||
const picturePanel = ref<boolean>(false)
|
const picturePanel = ref<boolean>(false)
|
||||||
const isUpdate = ref<boolean>(false)
|
const isUpdate = ref<boolean>(false)
|
||||||
const isFormValid = ref<boolean>(true)
|
const isFormValid = ref<boolean>(true)
|
||||||
|
|
||||||
interface IFileList {
|
const fileList = ref<Record<string, any>[]>([])
|
||||||
[key: string]: any
|
|
||||||
}
|
|
||||||
|
|
||||||
const fileList = ref<IFileList[]>([] as IFileList[])
|
|
||||||
|
|
||||||
const AddNewImage = () => {
|
const AddNewImage = () => {
|
||||||
dataStore.panelData = {
|
dataStore.panelData = {
|
||||||
@ -82,7 +92,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
const GetData = async () => {
|
const GetData = async () => {
|
||||||
let dt = await dataStore.dataGet('CekilisResim/Cekilis/' + piyangoStore.selectedLottery)
|
let dt = await dataStore.dataGet(
|
||||||
|
'CekilisResim/Cekilis/' + piyangoStore.selectedLottery
|
||||||
|
)
|
||||||
if (dt !== 'errorfalse') fileList.value.splice(0, fileList.value.length, ...dt.data)
|
if (dt !== 'errorfalse') fileList.value.splice(0, fileList.value.length, ...dt.data)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -129,6 +141,30 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
const DeleteImagePop = (data: Record<string, any>) => {
|
||||||
|
dialogStore.CreateDialog({
|
||||||
|
title: 'Resim Sil',
|
||||||
|
id: 'deleteimage',
|
||||||
|
content: 'Resimi silmek istediğinize emin misiniz? Bu işlem geri alınamaz.',
|
||||||
|
closeText: 'Vazgeç',
|
||||||
|
buttons: [
|
||||||
|
{
|
||||||
|
label: 'Resmi Sil',
|
||||||
|
type: 'alert',
|
||||||
|
function: () => DeleteImage(data.id)
|
||||||
|
}
|
||||||
|
]
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const DeleteImage = async (id: number | string) => {
|
||||||
|
var dt = await dataStore.dataDelete('CekilisResim/' + id)
|
||||||
|
|
||||||
|
if (dt !== 'errorfalse') {
|
||||||
|
dialogStore.CloseDialog('deleteimage')
|
||||||
|
await GetData()
|
||||||
|
}
|
||||||
|
}
|
||||||
onBeforeMount(async () => {
|
onBeforeMount(async () => {
|
||||||
await GetData()
|
await GetData()
|
||||||
})
|
})
|
||||||
|
|||||||
@ -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"
|
v-model="piyangoTeminatStore.piyangoTeminatFormData.state"
|
||||||
required
|
required
|
||||||
:invalidText="piyangoTeminatValidationStore.invalidTexts.state"
|
:invalidText="piyangoTeminatValidationStore.invalidTexts.state"
|
||||||
@change="OnKeyup"
|
@change="OnKeyup"
|
||||||
:disabled="!usersStore.isPanelUser"/>
|
:disabled="!usersStore.isPanelUser" />
|
||||||
|
|
||||||
|
<template
|
||||||
|
v-if="
|
||||||
|
piyangoTeminatStore.piyangoTeminatFormData.state === 2 ||
|
||||||
|
piyangoTeminatStore.piyangoTeminatFormData.state === 3
|
||||||
|
">
|
||||||
|
<form-date
|
||||||
|
type="date"
|
||||||
|
half
|
||||||
|
modelKey="refundDate"
|
||||||
|
v-model="piyangoTeminatStore.piyangoTeminatFormData.refundDate"
|
||||||
|
label="İade Tarihi"
|
||||||
|
:invalidText="piyangoTeminatValidationStore.invalidTexts.refundDate"
|
||||||
|
@change="OnKeyup" />
|
||||||
|
<form-input
|
||||||
|
modelKey="refundCount"
|
||||||
|
v-model="piyangoTeminatStore.piyangoTeminatFormData.refundCount"
|
||||||
|
half
|
||||||
|
label="Sayısı"
|
||||||
|
@keyup="OnKeyup"
|
||||||
|
:invalidText="piyangoTeminatValidationStore.invalidTexts.refundCount" />
|
||||||
|
<form-file
|
||||||
|
v-model="piyangoTeminatStore.piyangoTeminatFormData.refundDocumentUrl"
|
||||||
|
elclass="panel-documents-item"
|
||||||
|
:invalidText="piyangoTeminatValidationStore.invalidTexts.refundDocumentUrl"
|
||||||
|
@change="OnKeyup" />
|
||||||
|
</template>
|
||||||
|
|
||||||
<form-display
|
<form-display
|
||||||
v-model="piyangoTeminatStore.piyangoTeminatFormData.amount"
|
v-model="piyangoTeminatStore.piyangoTeminatFormData.amount"
|
||||||
@ -51,7 +78,10 @@
|
|||||||
label="Banka Şubesi" />
|
label="Banka Şubesi" />
|
||||||
|
|
||||||
<file-list-item
|
<file-list-item
|
||||||
v-if="piyangoTeminatStore.piyangoTeminatFormData.teminantDocumentUrl !== null && piyangoTeminatStore.piyangoTeminatFormData.teminantDocumentUrl !== undefined"
|
v-if="
|
||||||
|
piyangoTeminatStore.piyangoTeminatFormData.teminantDocumentUrl !== null &&
|
||||||
|
piyangoTeminatStore.piyangoTeminatFormData.teminantDocumentUrl !== undefined
|
||||||
|
"
|
||||||
title="Dosya"
|
title="Dosya"
|
||||||
:data="piyangoTeminatStore.piyangoTeminatFormData"
|
:data="piyangoTeminatStore.piyangoTeminatFormData"
|
||||||
:editable="false"
|
:editable="false"
|
||||||
|
|||||||
@ -52,6 +52,11 @@ export const usePiyangoServices = defineStore('piyangoServices', () => {
|
|||||||
}
|
}
|
||||||
const GetPiyangoTeminatDurumList = async () => {
|
const GetPiyangoTeminatDurumList = async () => {
|
||||||
if (piyangoDataStore.piyangoTeminatDurumlari.length === 0) {
|
if (piyangoDataStore.piyangoTeminatDurumlari.length === 0) {
|
||||||
|
/*
|
||||||
|
1: Açık
|
||||||
|
2: İade
|
||||||
|
3: Zaman Aşımı İade
|
||||||
|
*/
|
||||||
let data = await dataStore.dataGet('TeminantStates/Durumlar')
|
let data = await dataStore.dataGet('TeminantStates/Durumlar')
|
||||||
piyangoDataStore.piyangoTeminatDurumlari = data
|
piyangoDataStore.piyangoTeminatDurumlari = data
|
||||||
}
|
}
|
||||||
|
|||||||
@ -18,9 +18,12 @@ export const usePiyangoTeminatService = defineStore('piyangoTeminatService', ()
|
|||||||
if (piyangoTeminatValidationStore.FormCheck()) {
|
if (piyangoTeminatValidationStore.FormCheck()) {
|
||||||
let form: any
|
let form: any
|
||||||
let dataForm = new FormData()
|
let dataForm = new FormData()
|
||||||
|
|
||||||
dataForm.append('state', piyangoTeminatStore.piyangoTeminatFormData.state)
|
dataForm.append('state', piyangoTeminatStore.piyangoTeminatFormData.state)
|
||||||
dataForm.append('amount', globalStore.floatEnLocale(piyangoTeminatStore.piyangoTeminatFormData.amount))
|
dataForm.append(
|
||||||
|
'amount',
|
||||||
|
globalStore.floatEnLocale(piyangoTeminatStore.piyangoTeminatFormData.amount)
|
||||||
|
)
|
||||||
dataForm.append('bankName', piyangoTeminatStore.piyangoTeminatFormData.bankName)
|
dataForm.append('bankName', piyangoTeminatStore.piyangoTeminatFormData.bankName)
|
||||||
dataForm.append('bankBranch', piyangoTeminatStore.piyangoTeminatFormData.bankBranch)
|
dataForm.append('bankBranch', piyangoTeminatStore.piyangoTeminatFormData.bankBranch)
|
||||||
dataForm.append(
|
dataForm.append(
|
||||||
@ -43,6 +46,27 @@ export const usePiyangoTeminatService = defineStore('piyangoTeminatService', ()
|
|||||||
'description',
|
'description',
|
||||||
piyangoTeminatStore.piyangoTeminatFormData.description
|
piyangoTeminatStore.piyangoTeminatFormData.description
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if (usersStore.isPanelUser) {
|
||||||
|
if (piyangoTeminatStore.piyangoTeminatFormData.state === 1) {
|
||||||
|
piyangoTeminatStore.piyangoTeminatFormData.refundDate = ''
|
||||||
|
piyangoTeminatStore.piyangoTeminatFormData.refundCount = ''
|
||||||
|
piyangoTeminatStore.piyangoTeminatFormData.refundDocumentUrl = ''
|
||||||
|
}
|
||||||
|
dataForm.append(
|
||||||
|
'refundDate',
|
||||||
|
String(piyangoTeminatStore.piyangoTeminatFormData.refundDate)
|
||||||
|
)
|
||||||
|
dataForm.append(
|
||||||
|
'refundCount',
|
||||||
|
String(piyangoTeminatStore.piyangoTeminatFormData.refundCount)
|
||||||
|
)
|
||||||
|
dataForm.append(
|
||||||
|
'refundDocumentUrl',
|
||||||
|
piyangoTeminatStore.piyangoTeminatFormData.refundDocumentUrl
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
if (piyangoTeminatStore.isNew) {
|
if (piyangoTeminatStore.isNew) {
|
||||||
form = await dataStore.dataPost('TeminantStates/', {
|
form = await dataStore.dataPost('TeminantStates/', {
|
||||||
data: dataForm,
|
data: dataForm,
|
||||||
@ -61,8 +85,8 @@ export const usePiyangoTeminatService = defineStore('piyangoTeminatService', ()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (form !== 'errorfalse') {
|
if (form !== 'errorfalse') {
|
||||||
piyangoTeminatStore.isNew = false
|
piyangoTeminatStore.isNew = false
|
||||||
piyangoTeminatValidationStore.formChanged = false
|
piyangoTeminatValidationStore.formChanged = false
|
||||||
piyangoTeminatStore.refreshList = true
|
piyangoTeminatStore.refreshList = true
|
||||||
piyangoTeminatStore.teminatPanel = false
|
piyangoTeminatStore.teminatPanel = false
|
||||||
}
|
}
|
||||||
@ -80,7 +104,7 @@ export const usePiyangoTeminatService = defineStore('piyangoTeminatService', ()
|
|||||||
|
|
||||||
if (form !== 'errorfalse') {
|
if (form !== 'errorfalse') {
|
||||||
piyangoTeminatStore.isNew = false
|
piyangoTeminatStore.isNew = false
|
||||||
await Object.assign(piyangoTeminatStore.piyangoTeminatFormData, form)
|
await Object.assign(piyangoTeminatStore.piyangoTeminatFormData, form)
|
||||||
} else {
|
} else {
|
||||||
await piyangoTeminatStore.ResetFormData()
|
await piyangoTeminatStore.ResetFormData()
|
||||||
await piyangoTeminatStore.RestoreFormData()
|
await piyangoTeminatStore.RestoreFormData()
|
||||||
|
|||||||
@ -1,34 +1,34 @@
|
|||||||
import * as signalR from "@microsoft/signalr";
|
import * as signalR from '@microsoft/signalr'
|
||||||
import { v4 as uuidv4 } from "uuid";
|
import { v4 as uuidv4 } from 'uuid'
|
||||||
|
|
||||||
let connection: signalR.HubConnection;
|
let connection: signalR.HubConnection
|
||||||
let connectionId = "";
|
let connectionId = ''
|
||||||
|
|
||||||
export const connectToHub = async () => {
|
export const connectToHub = async () => {
|
||||||
connection = new signalR.HubConnectionBuilder()
|
connection = new signalR.HubConnectionBuilder()
|
||||||
.withUrl("https://panelapi.cekilisevi.gov.tr/uploadHub", {
|
.withUrl(import.meta.env.VITE_SOCKET_URL, {
|
||||||
withCredentials: false // Bu zorunlu, yoksa cookie vs gönderilmez
|
withCredentials: false // Bu zorunlu, yoksa cookie vs gönderilmez
|
||||||
}) // backend adresine göre düzenle
|
}) // backend adresine göre düzenle
|
||||||
.withAutomaticReconnect()
|
.withAutomaticReconnect()
|
||||||
.build();
|
.build()
|
||||||
|
|
||||||
await connection.start();
|
await connection.start()
|
||||||
connectionId = connection.connectionId || uuidv4(); // SignalR id'si ya da frontend'de de guid üretilebilir
|
connectionId = connection.connectionId || uuidv4() // SignalR id'si ya da frontend'de de guid üretilebilir
|
||||||
return connectionId;
|
return connectionId
|
||||||
};
|
}
|
||||||
|
|
||||||
export const onProgress = (callback: (data: any) => void) => {
|
export const onProgress = (callback: (data: any) => void) => {
|
||||||
connection.on("ReceiveProgress", callback);
|
connection.on('ReceiveProgress', callback)
|
||||||
};
|
}
|
||||||
|
|
||||||
export const onInsertProgress = (callback: (data: any) => void) => {
|
export const onInsertProgress = (callback: (data: any) => void) => {
|
||||||
connection.on("ReceiveInsertProgress", callback);
|
connection.on('ReceiveInsertProgress', callback)
|
||||||
};
|
}
|
||||||
|
|
||||||
export const onCompleted = (callback: (data: any) => void) => {
|
export const onCompleted = (callback: (data: any) => void) => {
|
||||||
connection.on("ReceiveCompleted", callback);
|
connection.on('ReceiveCompleted', callback)
|
||||||
};
|
}
|
||||||
|
|
||||||
export const onError = (callback: (data: any) => void) => {
|
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,
|
cekilisId: piyangoStore.selectedLottery,
|
||||||
kisiId: usersStore.userId,
|
kisiId: usersStore.userId,
|
||||||
description: '',
|
description: '',
|
||||||
file: ''
|
file: '',
|
||||||
|
refundDate: '',
|
||||||
|
refundCount: '',
|
||||||
|
refundDocumentUrl: ''
|
||||||
})
|
})
|
||||||
|
|
||||||
const piyangoTeminatFormData = reactive<Record<string, any>>({})
|
const piyangoTeminatFormData = reactive<Record<string, any>>({})
|
||||||
@ -31,7 +34,7 @@ export const usePiyangoTeminatStore = defineStore('piyangoTeminatStore', () => {
|
|||||||
const loaded = ref<boolean>(false)
|
const loaded = ref<boolean>(false)
|
||||||
const isNew = ref<boolean>(false)
|
const isNew = ref<boolean>(false)
|
||||||
const teminatPanel = ref<boolean>(false)
|
const teminatPanel = ref<boolean>(false)
|
||||||
const selectedTeminatId = ref<number|null>(null)
|
const selectedTeminatId = ref<number | null>(null)
|
||||||
const refreshList = ref<boolean>(false)
|
const refreshList = ref<boolean>(false)
|
||||||
|
|
||||||
const ResetFormData = () => {
|
const ResetFormData = () => {
|
||||||
@ -42,7 +45,7 @@ export const usePiyangoTeminatStore = defineStore('piyangoTeminatStore', () => {
|
|||||||
loaded.value = true
|
loaded.value = true
|
||||||
}, 30)
|
}, 30)
|
||||||
}
|
}
|
||||||
const RestoreFormData = () => {
|
const RestoreFormData = () => {
|
||||||
Object.assign(piyangoTeminatFormData, piyangoTeminatSafeFormData)
|
Object.assign(piyangoTeminatFormData, piyangoTeminatSafeFormData)
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
|
|||||||
@ -24,6 +24,18 @@ export const usePiyangoTeminatValidationStore = defineStore(
|
|||||||
'state',
|
'state',
|
||||||
'Lütfen işlem tipini seçiniz.'
|
'Lütfen işlem tipini seçiniz.'
|
||||||
)
|
)
|
||||||
|
validationStore.IsFieldEmpty(
|
||||||
|
piyangoTeminatStore.piyangoTeminatFormData,
|
||||||
|
invalidTexts,
|
||||||
|
'refundDate',
|
||||||
|
'Lütfen iade tarihini seçiniz.'
|
||||||
|
)
|
||||||
|
validationStore.IsFieldEmpty(
|
||||||
|
piyangoTeminatStore.piyangoTeminatFormData,
|
||||||
|
invalidTexts,
|
||||||
|
'refundCount',
|
||||||
|
'Lütfen iade sayı no giriniz.'
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
validationStore.IsFieldEmpty(
|
validationStore.IsFieldEmpty(
|
||||||
|
|||||||
@ -216,7 +216,7 @@ export const usePiyangoValidationStore = defineStore('piyangoValidationStore', (
|
|||||||
!usersStore.isPanelUser) ||
|
!usersStore.isPanelUser) ||
|
||||||
(usersStore.isPanelUser && piyangoStore.duzenleyenData.basvuruTipId !== 22)) &&
|
(usersStore.isPanelUser && piyangoStore.duzenleyenData.basvuruTipId !== 22)) &&
|
||||||
piyangoStore.lotteryData.amacpiyangoId === 2
|
piyangoStore.lotteryData.amacpiyangoId === 2
|
||||||
) {
|
) {
|
||||||
if (!usersStore.isPanelUser) piyangoStore.lotteryData.amacpiyangoId = null
|
if (!usersStore.isPanelUser) piyangoStore.lotteryData.amacpiyangoId = null
|
||||||
isFormValid.value = false
|
isFormValid.value = false
|
||||||
invalidTexts.amacpiyangoId =
|
invalidTexts.amacpiyangoId =
|
||||||
@ -240,7 +240,7 @@ export const usePiyangoValidationStore = defineStore('piyangoValidationStore', (
|
|||||||
if (
|
if (
|
||||||
piyangoStore.duzenleyenData.basvuruTipId !== 22 &&
|
piyangoStore.duzenleyenData.basvuruTipId !== 22 &&
|
||||||
piyangoStore.lotteryData.amacpiyangoId === 2
|
piyangoStore.lotteryData.amacpiyangoId === 2
|
||||||
) {
|
) {
|
||||||
if (!usersStore.isPanelUser) piyangoStore.lotteryData.amacpiyangoId = null
|
if (!usersStore.isPanelUser) piyangoStore.lotteryData.amacpiyangoId = null
|
||||||
isFormValid.value = false
|
isFormValid.value = false
|
||||||
invalidTexts.amacpiyangoId =
|
invalidTexts.amacpiyangoId =
|
||||||
@ -472,12 +472,16 @@ export const usePiyangoValidationStore = defineStore('piyangoValidationStore', (
|
|||||||
date: ilanTarihi2Max.value,
|
date: ilanTarihi2Max.value,
|
||||||
pattern: 'dd-mm-yy'
|
pattern: 'dd-mm-yy'
|
||||||
})
|
})
|
||||||
|
if (ilan2min > ilan2max) {
|
||||||
if (ilanTarihi2 < ilan2min || ilanTarihi2 > ilan2max) {
|
|
||||||
isFormValid.value = false
|
isFormValid.value = false
|
||||||
invalidTexts.ilantarihi2 = `2. İlan Tarihi ${ilan2mind} - ${ilan2maxd} tarihleri arasında olmalıdır.`
|
invalidTexts.ilantarihi2 = `Lütfen 1. ilan tarihini daha erken bir tarih ile değiştiriniz. 2. İlan tarihi 1. ilan tarihinden en az 1 gün sonra olabilir`
|
||||||
} else {
|
} else {
|
||||||
delete invalidTexts.ilantarihi2
|
if (ilanTarihi2 < ilan2min || ilanTarihi2 > ilan2max) {
|
||||||
|
isFormValid.value = false
|
||||||
|
invalidTexts.ilantarihi2 = `2. İlan Tarihi ${ilan2mind} - ${ilan2maxd} tarihleri arasında olmalıdır.`
|
||||||
|
} else {
|
||||||
|
delete invalidTexts.ilantarihi2
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -60,13 +60,14 @@
|
|||||||
|
|
||||||
const CreateTabs = () => {
|
const CreateTabs = () => {
|
||||||
if (
|
if (
|
||||||
piyangoStore.lotteryApprove === 4 ||
|
(piyangoStore.lotteryApprove === 4 ||
|
||||||
piyangoStore.lotteryApprove === 10 ||
|
piyangoStore.lotteryApprove === 10 ||
|
||||||
piyangoStore.lotteryApprove === 11 ||
|
piyangoStore.lotteryApprove === 11 ||
|
||||||
piyangoStore.lotteryApprove === 12 ||
|
piyangoStore.lotteryApprove === 12 ||
|
||||||
piyangoStore.lotteryApprove === 13 ||
|
piyangoStore.lotteryApprove === 13 ||
|
||||||
piyangoStore.lotteryApprove === 14 ||
|
piyangoStore.lotteryApprove === 14 ||
|
||||||
usersStore.isPanelUser
|
usersStore.isPanelUser) &&
|
||||||
|
piyangoStore.lotteryPurposeId !== 3
|
||||||
) {
|
) {
|
||||||
tabList.value.push(
|
tabList.value.push(
|
||||||
{ text: 'Katılım Listesi', id: 'katilimcilistesi' },
|
{ text: 'Katılım Listesi', id: 'katilimcilistesi' },
|
||||||
@ -82,7 +83,7 @@
|
|||||||
}
|
}
|
||||||
tabList.value.push({ text: 'Onay Durumu', id: 'onaydurumu' })
|
tabList.value.push({ text: 'Onay Durumu', id: 'onaydurumu' })
|
||||||
|
|
||||||
if (piyangoStore.lotteryApprove !== 0) {
|
if (piyangoStore.lotteryApprove !== 0 && piyangoStore.lotteryPurposeId !== 3) {
|
||||||
tabList.value.push({ text: 'Teminat Listesi', id: 'teminatlistesi' })
|
tabList.value.push({ text: 'Teminat Listesi', id: 'teminatlistesi' })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -67,11 +67,25 @@
|
|||||||
const tableHeader = computed<Record<string, any>[]>(() => {
|
const tableHeader = computed<Record<string, any>[]>(() => {
|
||||||
let header: Record<string, any>[] = []
|
let header: Record<string, any>[] = []
|
||||||
|
|
||||||
|
header.push({
|
||||||
|
name: 'piyangoId',
|
||||||
|
title: 'Piyango Id',
|
||||||
|
sort: true,
|
||||||
|
style: { width: '10%' }
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
if (usersStore.isAraciFirma || usersStore.isPanelUser) {
|
if (usersStore.isAraciFirma || usersStore.isPanelUser) {
|
||||||
header.push({ name: 'duzenleyen', title: 'Düzenleyen' })
|
header.push({ name: 'duzenleyen', title: 'Düzenleyen' })
|
||||||
}
|
}
|
||||||
|
|
||||||
header.push(
|
header.push(
|
||||||
|
{
|
||||||
|
name: 'piyangoId',
|
||||||
|
title: 'Piyango ID',
|
||||||
|
sort: true,
|
||||||
|
style: { width: '10%' }
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: 'baslik',
|
name: 'baslik',
|
||||||
title: 'Başlık',
|
title: 'Başlık',
|
||||||
@ -101,14 +115,16 @@
|
|||||||
type: 'date',
|
type: 'date',
|
||||||
range: true
|
range: true
|
||||||
}
|
}
|
||||||
})
|
}
|
||||||
|
)
|
||||||
|
|
||||||
if (usersStore.isVakifDernek || usersStore.isPanelUser) {
|
if (usersStore.isVakifDernek || usersStore.isPanelUser) {
|
||||||
header.push({
|
header.push({
|
||||||
name: 'cekilisTarihi',
|
name: 'cekilisTarihi',
|
||||||
title: 'Çekiliş Tarihi',
|
title: 'Çekiliş Tarihi',
|
||||||
compute: (v: Record<string, any>): string => {
|
compute: (v: Record<string, any>): string => {
|
||||||
return dateStore.dateFormat({ date: v.cekilisTarihi })
|
if(v.piyangoAmacId === 3) return ''
|
||||||
|
else return dateStore.dateFormat({ date: v.cekilisTarihi })
|
||||||
},
|
},
|
||||||
sort: true,
|
sort: true,
|
||||||
filter: {
|
filter: {
|
||||||
@ -146,7 +162,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
header.push(
|
header.push(
|
||||||
{
|
{
|
||||||
|
|||||||
8
src/module/muhasebe/components/TabIzinBedelOraniForm.vue
Normal file
8
src/module/muhasebe/components/TabIzinBedelOraniForm.vue
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<template>
|
||||||
|
<section class="section-list form-inner-content-left">
|
||||||
|
<form-izin-bedel-orani />
|
||||||
|
</section>
|
||||||
|
</template>
|
||||||
|
<script setup lang="ts">
|
||||||
|
import FormIzinBedelOrani from './form/FormIzinBedelOrani.vue'
|
||||||
|
</script>
|
||||||
106
src/module/muhasebe/components/TabIzinBedelOraniListe.vue
Normal file
106
src/module/muhasebe/components/TabIzinBedelOraniListe.vue
Normal file
@ -0,0 +1,106 @@
|
|||||||
|
<template>
|
||||||
|
<section class="section-list">
|
||||||
|
<div class="section-list-header">
|
||||||
|
<h2>İzin Bedel Oranı Listesi</h2>
|
||||||
|
<div class="section-list-header-buttons">
|
||||||
|
<button class="button-c button-add" @click="izinBedelOraniStore.NewForm()">
|
||||||
|
<i class="ico-c">
|
||||||
|
<svg width="16" height="16">
|
||||||
|
<use href="@/assets/images/icons.svg#plus"></use>
|
||||||
|
</svg>
|
||||||
|
</i>
|
||||||
|
Yeni İzin Bedel Oranı Ekle
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<list-table-content
|
||||||
|
v-if="izinBedelOraniService.loaded"
|
||||||
|
:tableHeader="tableHeader"
|
||||||
|
:rowAction="EditIzinBedelOrani"
|
||||||
|
icon="draws"
|
||||||
|
title="İzin Bedel Oranları"
|
||||||
|
listText="İzin Bedel Oranı"
|
||||||
|
:apiList="'IzinBedelOrani'"
|
||||||
|
apiText="İzin Bedel Oranı Listesi" />
|
||||||
|
</section>
|
||||||
|
</template>
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { ref, computed, onBeforeMount } from 'vue'
|
||||||
|
import ListTableContent from '@/components/global/ListTableContent.vue'
|
||||||
|
import { useIzinBedelOraniStore } from '../store/izinBedelOraniStore'
|
||||||
|
import { useIzinBedelOraniService } from '../service/izinBedelOraniService'
|
||||||
|
|
||||||
|
const izinBedelOraniStore = useIzinBedelOraniStore()
|
||||||
|
const izinBedelOraniService = useIzinBedelOraniService()
|
||||||
|
|
||||||
|
const tableHeader = ref<Record<string, any>[]>(
|
||||||
|
[
|
||||||
|
{
|
||||||
|
name: 'id',
|
||||||
|
title: 'ID',
|
||||||
|
sort: true,
|
||||||
|
style: { width: '8%' }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'ad',
|
||||||
|
title: 'Ad',
|
||||||
|
sort: true,
|
||||||
|
style: { width: '20%' }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'oran',
|
||||||
|
title: 'Oran (%)',
|
||||||
|
sort: true,
|
||||||
|
style: { width: '15%' },
|
||||||
|
compute: (v: Record<string, any>): string => {
|
||||||
|
return `%${v.oran}`
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'aciklama',
|
||||||
|
title: 'Açıklama',
|
||||||
|
sort: true,
|
||||||
|
style: { width: '30%' }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'aktif',
|
||||||
|
title: 'Durum',
|
||||||
|
sort: true,
|
||||||
|
style: { width: '12%' },
|
||||||
|
computeHtml: (v: Record<string, any>): string => {
|
||||||
|
if (v.aktif) {
|
||||||
|
return `<span class="back-grad back-grad-ok">Aktif</span>`
|
||||||
|
} else {
|
||||||
|
return `<span class="back-grad back-grad-alert">Pasif</span>`
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'actions',
|
||||||
|
title: 'İşlemler',
|
||||||
|
style: { width: '15%' },
|
||||||
|
computeHtml: (v: Record<string, any>): string => {
|
||||||
|
let actions = `<button class="button-c button-edit" onclick="window.editIzinBedelOrani(${v.id})">
|
||||||
|
<i class="ico-c">
|
||||||
|
<svg width="14" height="14">
|
||||||
|
<use href="@/assets/images/icons.svg#edit"></use>
|
||||||
|
</svg>
|
||||||
|
</i>
|
||||||
|
Düzenle
|
||||||
|
</button> `
|
||||||
|
return actions
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
|
const EditIzinBedelOrani = (row: any) => {
|
||||||
|
izinBedelOraniStore.EditForm(row)
|
||||||
|
}
|
||||||
|
|
||||||
|
onBeforeMount(async () => {
|
||||||
|
await izinBedelOraniService.GetIzinBedelOraniList()
|
||||||
|
izinBedelOraniService.loaded = true
|
||||||
|
})
|
||||||
|
</script>
|
||||||
90
src/module/muhasebe/components/form/FormIzinBedelOrani.vue
Normal file
90
src/module/muhasebe/components/form/FormIzinBedelOrani.vue
Normal file
@ -0,0 +1,90 @@
|
|||||||
|
<template>
|
||||||
|
<div
|
||||||
|
:class="['form-part', izinBedelOraniValidationStore.formChanged ? 'changed' : '']">
|
||||||
|
<div class="form-part-title">
|
||||||
|
<h4>{{ izinBedelOraniStore.isNew ? 'Yeni İzin Bedel Oranı' : 'İzin Bedel Oranı Düzenle' }}</h4>
|
||||||
|
<div class="form-part-title-buttons"></div>
|
||||||
|
</div>
|
||||||
|
<div class="form-part-content">
|
||||||
|
<form-input
|
||||||
|
required
|
||||||
|
half
|
||||||
|
modelKey="ad"
|
||||||
|
v-model="izinBedelOraniStore.izinBedelOraniForm.ad"
|
||||||
|
:invalidText="izinBedelOraniValidationStore.invalidTexts.ad"
|
||||||
|
label="Ad"
|
||||||
|
maxlength="100"
|
||||||
|
@keyup="OnKeyup" />
|
||||||
|
<form-input
|
||||||
|
required
|
||||||
|
half
|
||||||
|
modelKey="oran"
|
||||||
|
v-model="izinBedelOraniStore.izinBedelOraniForm.oran"
|
||||||
|
:invalidText="izinBedelOraniValidationStore.invalidTexts.oran"
|
||||||
|
label="Oran (%)"
|
||||||
|
maxlength="3"
|
||||||
|
@keydown="validationStore.allowNumbersWithKeys"
|
||||||
|
description="1-100 arasında bir rakam giriniz"
|
||||||
|
@keyup="OnKeyup" />
|
||||||
|
<form-textarea
|
||||||
|
required
|
||||||
|
modelKey="aciklama"
|
||||||
|
v-model="izinBedelOraniStore.izinBedelOraniForm.aciklama"
|
||||||
|
:invalidText="izinBedelOraniValidationStore.invalidTexts.aciklama"
|
||||||
|
label="Açıklama"
|
||||||
|
maxlength="500"
|
||||||
|
rows="4"
|
||||||
|
@keyup="OnKeyup" />
|
||||||
|
<form-checkbox
|
||||||
|
modelKey="aktif"
|
||||||
|
v-model="izinBedelOraniStore.izinBedelOraniForm.aktif"
|
||||||
|
label="Aktif"
|
||||||
|
@change="OnKeyup" />
|
||||||
|
<div
|
||||||
|
class="form-item"
|
||||||
|
v-if="izinBedelOraniStore.isNew || izinBedelOraniValidationStore.formChanged">
|
||||||
|
<button
|
||||||
|
class="button-c button-save"
|
||||||
|
@click="izinBedelOraniService.SaveIzinBedelOrani">
|
||||||
|
{{ izinBedelOraniStore.isNew ? 'Kaydet' : 'Güncelle' }}
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
class="button-c button-cancel"
|
||||||
|
@click="CancelForm"
|
||||||
|
v-if="izinBedelOraniValidationStore.formChanged">
|
||||||
|
Vazgeç
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { onBeforeMount } from 'vue'
|
||||||
|
import { useValidationStore } from '@/stores/validationStore'
|
||||||
|
const validationStore = useValidationStore()
|
||||||
|
import { useIzinBedelOraniStore } from '../../store/izinBedelOraniStore'
|
||||||
|
const izinBedelOraniStore = useIzinBedelOraniStore()
|
||||||
|
import { useIzinBedelOraniValidationStore } from '../../validation/izinBedelOraniValidationStore'
|
||||||
|
const izinBedelOraniValidationStore = useIzinBedelOraniValidationStore()
|
||||||
|
import { useIzinBedelOraniService } from '../../service/izinBedelOraniService'
|
||||||
|
const izinBedelOraniService = useIzinBedelOraniService()
|
||||||
|
|
||||||
|
const OnKeyup = () => {
|
||||||
|
izinBedelOraniValidationStore.formChanged = true
|
||||||
|
}
|
||||||
|
|
||||||
|
const CancelForm = () => {
|
||||||
|
if (izinBedelOraniStore.isNew) {
|
||||||
|
izinBedelOraniStore.isNew = false
|
||||||
|
} else {
|
||||||
|
izinBedelOraniStore.RestoreData()
|
||||||
|
izinBedelOraniValidationStore.formChanged = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
onBeforeMount(() => {
|
||||||
|
if (izinBedelOraniStore.isNew) {
|
||||||
|
izinBedelOraniStore.ResetForm()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
</script>
|
||||||
@ -6,17 +6,17 @@
|
|||||||
<div class="form-part-title-buttons"></div>
|
<div class="form-part-title-buttons"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-part-content" v-if="muhasebeSettingsService.loaded">
|
<div class="form-part-content" v-if="muhasebeSettingsService.loaded">
|
||||||
<form-input
|
<!-- <form-input-->
|
||||||
required
|
<!-- required-->
|
||||||
half
|
<!-- half-->
|
||||||
modelKey="izinBedeliOrani"
|
<!-- modelKey="izinBedeliOrani"-->
|
||||||
v-model="muhasebeSettingsStore.muhasebeSettingsForm.izinBedeliOrani"
|
<!-- v-model="muhasebeSettingsStore.muhasebeSettingsForm.izinBedeliOrani"-->
|
||||||
:invalidText="muhasebeSettingsValidationStore.invalidTexts.izinBedeliOrani"
|
<!-- :invalidText="muhasebeSettingsValidationStore.invalidTexts.izinBedeliOrani" -->
|
||||||
label="İzin Bedeli Oranı"
|
<!-- label="İzin Bedeli Oranı"-->
|
||||||
maxlength="3"
|
<!-- maxlength="3"-->
|
||||||
@keydown="validationStore.allowNumbersWithKeys"
|
<!-- @keydown="validationStore.allowNumbersWithKeys"-->
|
||||||
description="1-100 arasında bir rakam giriniz"
|
<!-- description="1-100 arasında bir rakam giriniz"-->
|
||||||
@keyup="OnKeyup" />
|
<!-- @keyup="OnKeyup" />-->
|
||||||
<form-input
|
<form-input
|
||||||
required
|
required
|
||||||
half
|
half
|
||||||
|
|||||||
@ -1,9 +1,11 @@
|
|||||||
import muhasebePiyangoListesi from './muhasebe-piyango-listesi'
|
import muhasebePiyangoListesi from './muhasebe-piyango-listesi'
|
||||||
import muhasebePiyangoDetay from './muhasebe-piyango-detay'
|
import muhasebePiyangoDetay from './muhasebe-piyango-detay'
|
||||||
import muhasebeAyarlar from './muhasebe-ayarlar'
|
import muhasebeAyarlar from './muhasebe-ayarlar'
|
||||||
|
import izinBedelOrani from './izin-bedel-orani'
|
||||||
|
|
||||||
export default [
|
export default [
|
||||||
muhasebePiyangoListesi,
|
muhasebePiyangoListesi,
|
||||||
muhasebePiyangoDetay,
|
muhasebePiyangoDetay,
|
||||||
muhasebeAyarlar,
|
muhasebeAyarlar,
|
||||||
|
izinBedelOrani,
|
||||||
]
|
]
|
||||||
|
|||||||
10
src/module/muhasebe/routes/izin-bedel-orani.ts
Normal file
10
src/module/muhasebe/routes/izin-bedel-orani.ts
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
import IzinBedelOrani from '../views/IzinBedelOrani.vue'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
path: '/muhasebe/izin-bedel-orani',
|
||||||
|
name: 'IzinBedelOrani',
|
||||||
|
component: IzinBedelOrani,
|
||||||
|
meta: {
|
||||||
|
authRequired: true
|
||||||
|
}
|
||||||
|
}
|
||||||
102
src/module/muhasebe/service/izinBedelOraniService.ts
Normal file
102
src/module/muhasebe/service/izinBedelOraniService.ts
Normal file
@ -0,0 +1,102 @@
|
|||||||
|
import { defineStore } from 'pinia'
|
||||||
|
import { ref } from 'vue'
|
||||||
|
import { useDataStore } from '@/stores/dataStore'
|
||||||
|
import { useIzinBedelOraniStore } from '../store/izinBedelOraniStore'
|
||||||
|
import { useIzinBedelOraniValidationStore } from '../validation/izinBedelOraniValidationStore'
|
||||||
|
|
||||||
|
export const useIzinBedelOraniService = defineStore('izinBedelOraniService', () => {
|
||||||
|
const dataStore = useDataStore()
|
||||||
|
const izinBedelOraniStore = useIzinBedelOraniStore()
|
||||||
|
const izinBedelOraniValidationStore = useIzinBedelOraniValidationStore()
|
||||||
|
|
||||||
|
const loaded = ref<boolean>(false)
|
||||||
|
|
||||||
|
const SaveIzinBedelOrani = async (panelData: Record<string, any>, isUpdate: boolean = false) => {
|
||||||
|
if (izinBedelOraniValidationStore.FormCheck(panelData)) {
|
||||||
|
var res: any
|
||||||
|
|
||||||
|
if (!isUpdate) {
|
||||||
|
res = await dataStore.dataPost('IzinBedelOrani', {
|
||||||
|
data: {
|
||||||
|
adi: panelData.ad,
|
||||||
|
oran: panelData.oran,
|
||||||
|
aciklama: panelData.aciklama,
|
||||||
|
aktif: panelData.aktif
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
res = await dataStore.dataPut('IzinBedelOrani/' + panelData.id, {
|
||||||
|
data: {
|
||||||
|
id: panelData.id,
|
||||||
|
adi: panelData.ad,
|
||||||
|
oran: panelData.oran,
|
||||||
|
aciklama: panelData.aciklama,
|
||||||
|
aktif: panelData.aktif
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
if (res !== 'errorfalse') {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
const DeleteIzinBedelOrani = async (id: number | string) => {
|
||||||
|
var res = await dataStore.dataDelete('IzinBedelOrani/' + id)
|
||||||
|
return res !== 'errorfalse'
|
||||||
|
}
|
||||||
|
|
||||||
|
const GetIzinBedelOraniList = async () => {
|
||||||
|
var res = await dataStore.dataGet('IzinBedelOrani')
|
||||||
|
if (res !== 'errorfalse') {
|
||||||
|
izinBedelOraniStore.izinBedelOraniList = res
|
||||||
|
return res
|
||||||
|
}
|
||||||
|
return []
|
||||||
|
}
|
||||||
|
|
||||||
|
const GetIzinBedelOraniById = async (id: number | string) => {
|
||||||
|
var res = await dataStore.dataGet('IzinBedelOrani/' + id)
|
||||||
|
if (res !== 'errorfalse') {
|
||||||
|
return res
|
||||||
|
}
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
|
||||||
|
const GetAktifIzinBedelOraniList = async () => {
|
||||||
|
var res = await dataStore.dataGet('IzinBedelOrani/Aktif')
|
||||||
|
if (res !== 'errorfalse') {
|
||||||
|
izinBedelOraniStore.aktifIzinBedelOraniList = res
|
||||||
|
return res
|
||||||
|
}
|
||||||
|
return []
|
||||||
|
}
|
||||||
|
|
||||||
|
const UpdateIzinBedelOraniStatus = async (id: number | string, aktif: boolean) => {
|
||||||
|
var res = await dataStore.dataPut('IzinBedelOrani/' + id + '/Status', {
|
||||||
|
data: {
|
||||||
|
Aktif: aktif
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return res !== 'errorfalse'
|
||||||
|
}
|
||||||
|
|
||||||
|
const LoadData = async () => {
|
||||||
|
await GetIzinBedelOraniList()
|
||||||
|
await GetAktifIzinBedelOraniList()
|
||||||
|
loaded.value = true
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
loaded,
|
||||||
|
SaveIzinBedelOrani,
|
||||||
|
DeleteIzinBedelOrani,
|
||||||
|
GetIzinBedelOraniList,
|
||||||
|
GetIzinBedelOraniById,
|
||||||
|
GetAktifIzinBedelOraniList,
|
||||||
|
UpdateIzinBedelOraniStatus,
|
||||||
|
LoadData
|
||||||
|
}
|
||||||
|
})
|
||||||
59
src/module/muhasebe/store/izinBedelOraniStore.ts
Normal file
59
src/module/muhasebe/store/izinBedelOraniStore.ts
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
import { defineStore } from 'pinia'
|
||||||
|
import { ref, reactive } from 'vue'
|
||||||
|
import { useUsersStore } from '@/stores/usersStore'
|
||||||
|
|
||||||
|
export const useIzinBedelOraniStore = defineStore('izinBedelOraniStore', () => {
|
||||||
|
const usersStore = useUsersStore()
|
||||||
|
|
||||||
|
const izinBedelOraniBaseForm = reactive<Record<string, any>>({
|
||||||
|
ad: '',
|
||||||
|
oran: 0,
|
||||||
|
aciklama: '',
|
||||||
|
aktif: true,
|
||||||
|
appUserId: usersStore.userId
|
||||||
|
})
|
||||||
|
|
||||||
|
const izinBedelOraniForm = reactive<Record<string, any>>({})
|
||||||
|
const izinBedelOraniSafeForm = reactive<Record<string, any>>({})
|
||||||
|
const izinBedelOraniList = ref<Record<string, any>[]>([])
|
||||||
|
const aktifIzinBedelOraniList = ref<Record<string, any>[]>([])
|
||||||
|
const isNew = ref<boolean>(false)
|
||||||
|
const izinBedelOraniLoaded = ref<boolean>(false)
|
||||||
|
|
||||||
|
const ResetForm = () => {
|
||||||
|
Object.assign(izinBedelOraniForm, izinBedelOraniBaseForm)
|
||||||
|
}
|
||||||
|
|
||||||
|
const SafeServerData = () => {
|
||||||
|
Object.assign(izinBedelOraniSafeForm, izinBedelOraniForm)
|
||||||
|
}
|
||||||
|
|
||||||
|
const RestoreData = () => {
|
||||||
|
Object.assign(izinBedelOraniForm, izinBedelOraniSafeForm)
|
||||||
|
}
|
||||||
|
|
||||||
|
const NewForm = () => {
|
||||||
|
ResetForm()
|
||||||
|
isNew.value = true
|
||||||
|
}
|
||||||
|
|
||||||
|
const EditForm = (item: Record<string, any>) => {
|
||||||
|
Object.assign(izinBedelOraniForm, item)
|
||||||
|
isNew.value = false
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
izinBedelOraniBaseForm,
|
||||||
|
izinBedelOraniForm,
|
||||||
|
izinBedelOraniSafeForm,
|
||||||
|
izinBedelOraniList,
|
||||||
|
aktifIzinBedelOraniList,
|
||||||
|
isNew,
|
||||||
|
izinBedelOraniLoaded,
|
||||||
|
ResetForm,
|
||||||
|
SafeServerData,
|
||||||
|
RestoreData,
|
||||||
|
NewForm,
|
||||||
|
EditForm
|
||||||
|
}
|
||||||
|
})
|
||||||
@ -0,0 +1,64 @@
|
|||||||
|
import { defineStore } from 'pinia'
|
||||||
|
import { ref, reactive } from 'vue'
|
||||||
|
import { useValidationStore } from '@/stores/validationStore'
|
||||||
|
|
||||||
|
export const useIzinBedelOraniValidationStore = defineStore(
|
||||||
|
'izinBedelOraniValidationStore',
|
||||||
|
() => {
|
||||||
|
const validationStore = useValidationStore()
|
||||||
|
|
||||||
|
const formChanged = ref<boolean>(false)
|
||||||
|
const isFormValid = ref<boolean>(true)
|
||||||
|
const invalidTexts = reactive<Record<string, any>>({})
|
||||||
|
|
||||||
|
const FormCheck = (panelData: Record<string, any>): boolean => {
|
||||||
|
Object.assign(invalidTexts, {})
|
||||||
|
|
||||||
|
validationStore.IsFieldEmpty(
|
||||||
|
panelData,
|
||||||
|
invalidTexts,
|
||||||
|
'ad',
|
||||||
|
'Ad alanı zorunludur'
|
||||||
|
)
|
||||||
|
|
||||||
|
validationStore.IsFieldEmpty(
|
||||||
|
panelData,
|
||||||
|
invalidTexts,
|
||||||
|
'oran',
|
||||||
|
'Oran alanı zorunludur'
|
||||||
|
)
|
||||||
|
|
||||||
|
validationStore.IsFieldEmpty(
|
||||||
|
panelData,
|
||||||
|
invalidTexts,
|
||||||
|
'aciklama',
|
||||||
|
'Açıklama alanı zorunludur'
|
||||||
|
)
|
||||||
|
|
||||||
|
// Oran validation (0-100 arası)
|
||||||
|
if (panelData.oran !== undefined && panelData.oran !== '') {
|
||||||
|
const oran = parseFloat(panelData.oran)
|
||||||
|
if (isNaN(oran) || oran < 0 || oran > 100) {
|
||||||
|
invalidTexts.oran = 'Oran 0-100 arasında olmalıdır'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
isFormValid.value = Object.keys(invalidTexts).length === 0
|
||||||
|
return isFormValid.value
|
||||||
|
}
|
||||||
|
|
||||||
|
const ResetValidation = () => {
|
||||||
|
Object.assign(invalidTexts, {})
|
||||||
|
formChanged.value = false
|
||||||
|
isFormValid.value = true
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
formChanged,
|
||||||
|
isFormValid,
|
||||||
|
invalidTexts,
|
||||||
|
FormCheck,
|
||||||
|
ResetValidation
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
202
src/module/muhasebe/views/IzinBedelOrani.vue
Normal file
202
src/module/muhasebe/views/IzinBedelOrani.vue
Normal file
@ -0,0 +1,202 @@
|
|||||||
|
<template>
|
||||||
|
<AdminLayout>
|
||||||
|
<Breadcrumb currentPageText="Muhasebe / İzin Bedel Oranı" />
|
||||||
|
<section class="section-list">
|
||||||
|
<list-table-content
|
||||||
|
:tableHeader="tableHeader"
|
||||||
|
:rowAction="updateAction"
|
||||||
|
:addAction="addAction"
|
||||||
|
icon="draws"
|
||||||
|
title="İzin Bedel Oranları"
|
||||||
|
listText="İzin Bedel Oranı"
|
||||||
|
:tableData="izinBedelOraniList"
|
||||||
|
apiText="İzin Bedel Oranı Listesi"
|
||||||
|
apiList="IzinBedelOrani"
|
||||||
|
v-model:refresh="refresh"
|
||||||
|
:rowActions="rowActions"
|
||||||
|
:rowActionStyle="'width:15%;'" />
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<panel-wrapper
|
||||||
|
v-if="panel"
|
||||||
|
v-model="panel"
|
||||||
|
:panel-title="isUpdate ? 'İzin Bedel Oranı Düzenle' : 'Yeni İzin Bedel Oranı Ekle'">
|
||||||
|
<template #panelContent>
|
||||||
|
<form-input
|
||||||
|
required
|
||||||
|
v-model="panelIzinBedelOrani.ad"
|
||||||
|
label="Ad"
|
||||||
|
maxlength="100" />
|
||||||
|
<form-input
|
||||||
|
required
|
||||||
|
v-model="panelIzinBedelOrani.oran"
|
||||||
|
label="Oran (%)"
|
||||||
|
maxlength="3"
|
||||||
|
@keydown="validationStore.allowNumbersWithKeys"
|
||||||
|
description="1-100 arasında bir rakam giriniz" />
|
||||||
|
<form-textarea
|
||||||
|
required
|
||||||
|
v-model="panelIzinBedelOrani.aciklama"
|
||||||
|
label="Açıklama"
|
||||||
|
maxlength="500"
|
||||||
|
rows="4" />
|
||||||
|
<form-checkbox
|
||||||
|
v-model="panelIzinBedelOrani.aktif"
|
||||||
|
label="Aktif" />
|
||||||
|
</template>
|
||||||
|
<template #footerButton>
|
||||||
|
<div class="button-c button-save" @click="save">
|
||||||
|
{{ isUpdate ? 'Güncelle' : 'Ekle' }}
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</panel-wrapper>
|
||||||
|
</AdminLayout>
|
||||||
|
</template>
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { ref, onBeforeMount, computed } from 'vue'
|
||||||
|
import AdminLayout from '@/layouts/AdminLayout.vue'
|
||||||
|
import { Breadcrumb, ListTableContent } from '@/components/global'
|
||||||
|
import PanelWrapper from '@/components/PanelWrapper.vue'
|
||||||
|
import { useIzinBedelOraniStore } from '../store/izinBedelOraniStore'
|
||||||
|
import { useIzinBedelOraniService } from '../service/izinBedelOraniService'
|
||||||
|
import { useValidationStore } from '@/stores/validationStore'
|
||||||
|
import { useDialogStore } from '@/components/global/dialogStore'
|
||||||
|
import { useDataStore } from '@/stores/dataStore'
|
||||||
|
|
||||||
|
const izinBedelOraniStore = useIzinBedelOraniStore()
|
||||||
|
const izinBedelOraniService = useIzinBedelOraniService()
|
||||||
|
const validationStore = useValidationStore()
|
||||||
|
const dialogStore = useDialogStore()
|
||||||
|
const dataStore = useDataStore()
|
||||||
|
|
||||||
|
const panel = ref<boolean>(false)
|
||||||
|
const isUpdate = ref<boolean>(false)
|
||||||
|
const refresh = ref<boolean>(false)
|
||||||
|
const panelIzinBedelOrani = ref<Record<string, any>>({})
|
||||||
|
const izinBedelOraniList = ref<Record<string, any>[]>([])
|
||||||
|
|
||||||
|
const tableHeader = ref<Record<string, any>[]>(
|
||||||
|
[
|
||||||
|
{
|
||||||
|
name: 'id',
|
||||||
|
title: 'ID',
|
||||||
|
sort: true,
|
||||||
|
style: { width: '8%' }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'adi',
|
||||||
|
title: 'Ad',
|
||||||
|
sort: true,
|
||||||
|
style: { width: '20%' }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'oran',
|
||||||
|
title: 'Oran (%)',
|
||||||
|
sort: true,
|
||||||
|
style: { width: '15%' },
|
||||||
|
compute: (v: Record<string, any>): string => {
|
||||||
|
return `%${v.oran}`
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'aciklama',
|
||||||
|
title: 'Açıklama',
|
||||||
|
sort: true,
|
||||||
|
style: { width: '30%' }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'aktif',
|
||||||
|
title: 'Durum',
|
||||||
|
sort: true,
|
||||||
|
style: { width: '12%' },
|
||||||
|
computeHtml: (v: Record<string, any>): string => {
|
||||||
|
if (v.aktif) {
|
||||||
|
return `<span class="back-grad back-grad-ok">Aktif</span>`
|
||||||
|
} else {
|
||||||
|
return `<span class="back-grad back-grad-alert">Pasif</span>`
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
|
const DeleteRowPop = (data: Record<string, any>, i: number) => {
|
||||||
|
dialogStore.CreateDialog({
|
||||||
|
title: 'İzin Bedel Oranı Sil',
|
||||||
|
id: 'deleteIzinBedelOrani',
|
||||||
|
content: 'İzin bedel oranını silmek istediğinize emin misiniz?',
|
||||||
|
closeText: 'Vazgeç',
|
||||||
|
buttons: [
|
||||||
|
{
|
||||||
|
label: 'İzin Bedel Oranı Sil',
|
||||||
|
type: 'alert',
|
||||||
|
function: () => DeleteRow(data.id)
|
||||||
|
}
|
||||||
|
]
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const DeleteRow = async (id: number | string) => {
|
||||||
|
var dt = await dataStore.dataDelete('IzinBedelOrani/' + id)
|
||||||
|
|
||||||
|
if (dt !== 'errorfalse') {
|
||||||
|
dialogStore.CloseDialog('deleteIzinBedelOrani')
|
||||||
|
refresh.value = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const rowActions = ref<Record<string, any>[]>([
|
||||||
|
{
|
||||||
|
text: 'Sil',
|
||||||
|
class: 'alert',
|
||||||
|
action: DeleteRowPop
|
||||||
|
}
|
||||||
|
])
|
||||||
|
|
||||||
|
const addAction = async () => {
|
||||||
|
isUpdate.value = false
|
||||||
|
panelIzinBedelOrani.value = {
|
||||||
|
ad: '',
|
||||||
|
oran: 0,
|
||||||
|
aciklama: '',
|
||||||
|
aktif: true
|
||||||
|
}
|
||||||
|
panel.value = true
|
||||||
|
}
|
||||||
|
|
||||||
|
const updateAction = (row: any) => {
|
||||||
|
const foundItem = izinBedelOraniList.value.find((x) => x.id == row.id)
|
||||||
|
if (foundItem) {
|
||||||
|
panelIzinBedelOrani.value = {
|
||||||
|
id: foundItem.id,
|
||||||
|
ad: foundItem.adi,
|
||||||
|
oran: foundItem.oran,
|
||||||
|
aciklama: foundItem.aciklama,
|
||||||
|
aktif: foundItem.aktif
|
||||||
|
}
|
||||||
|
}
|
||||||
|
panel.value = true
|
||||||
|
isUpdate.value = true
|
||||||
|
}
|
||||||
|
|
||||||
|
const save = async () => {
|
||||||
|
const result = await izinBedelOraniService.SaveIzinBedelOrani(panelIzinBedelOrani.value, isUpdate.value)
|
||||||
|
if (result) {
|
||||||
|
panel.value = false
|
||||||
|
isUpdate.value = false
|
||||||
|
refresh.value = true
|
||||||
|
await loadIzinBedelOraniList()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const loadIzinBedelOraniList = async () => {
|
||||||
|
const data = await dataStore.dataGet('IzinBedelOrani')
|
||||||
|
if (data !== 'errorfalse') {
|
||||||
|
izinBedelOraniList.value = data
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
onBeforeMount(async () => {
|
||||||
|
await loadIzinBedelOraniList()
|
||||||
|
})
|
||||||
|
</script>
|
||||||
@ -54,6 +54,12 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
header.push(
|
header.push(
|
||||||
|
{
|
||||||
|
name: 'piyangoId',
|
||||||
|
title: 'Piyango ID',
|
||||||
|
sort: true,
|
||||||
|
style: { width: '10%' }
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: 'baslik',
|
name: 'baslik',
|
||||||
title: 'Başlık',
|
title: 'Başlık',
|
||||||
|
|||||||
@ -9,7 +9,15 @@
|
|||||||
:data="file"
|
:data="file"
|
||||||
@click="ReplaceImage"
|
@click="ReplaceImage"
|
||||||
onlyPreview
|
onlyPreview
|
||||||
:filePath="file.fileUrl" />
|
:filePath="file.fileUrl">
|
||||||
|
<template #actionButtons v-if="!usersStore.isPanelUser">
|
||||||
|
<i
|
||||||
|
class="ico-c ico-btn ico-section back-grad-alert"
|
||||||
|
@click="DeleteImagePop(file)">
|
||||||
|
<svg><use href="/src/assets/images/icons.svg#trash"></use></svg>
|
||||||
|
</i>
|
||||||
|
</template>
|
||||||
|
</file-list-item>
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<div class="form-item form-item-picture clickable" @click="picturePanel = true">
|
<div class="form-item form-item-picture clickable" @click="picturePanel = true">
|
||||||
@ -43,17 +51,19 @@
|
|||||||
|
|
||||||
import { useDataStore } from '@/stores/dataStore'
|
import { useDataStore } from '@/stores/dataStore'
|
||||||
const dataStore = useDataStore()
|
const dataStore = useDataStore()
|
||||||
import { useGlobalStore } from '@/stores/globalStore'
|
|
||||||
const globalStore = useGlobalStore()
|
|
||||||
import { useValidationStore } from '@/stores/validationStore'
|
import { useValidationStore } from '@/stores/validationStore'
|
||||||
const validationStore = useValidationStore()
|
const validationStore = useValidationStore()
|
||||||
import { useSiteManagementPageStore } from '../../stores/siteManagementPageStore'
|
import { useSiteManagementPageStore } from '../../stores/siteManagementPageStore'
|
||||||
const siteManagementPageStore = useSiteManagementPageStore()
|
const siteManagementPageStore = useSiteManagementPageStore()
|
||||||
|
import { useDialogStore } from '@/components/global/dialogStore'
|
||||||
|
const dialogStore = useDialogStore()
|
||||||
|
import { useUsersStore } from '@/stores/usersStore'
|
||||||
|
const usersStore = useUsersStore()
|
||||||
|
|
||||||
const picturePanel = ref<boolean>(false)
|
const picturePanel = ref<boolean>(false)
|
||||||
const isUpdate = ref<boolean>(false)
|
const isUpdate = ref<boolean>(false)
|
||||||
|
|
||||||
const file = reactive<Record<string,any>>({
|
const file = reactive<Record<string, any>>({
|
||||||
title: '',
|
title: '',
|
||||||
fileUrl: ''
|
fileUrl: ''
|
||||||
})
|
})
|
||||||
@ -108,6 +118,32 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const DeleteImagePop = (data: Record<string, any>) => {
|
||||||
|
dialogStore.CreateDialog({
|
||||||
|
title: 'Resim Sil',
|
||||||
|
id: 'deleteimage',
|
||||||
|
content: 'Resmi silmek istediğinize emin misiniz? Bu işlem geri alınamaz.',
|
||||||
|
closeText: 'Vazgeç',
|
||||||
|
buttons: [
|
||||||
|
{
|
||||||
|
label: 'Resmi Sil',
|
||||||
|
type: 'alert',
|
||||||
|
function: () => DeleteImage(data.id)
|
||||||
|
}
|
||||||
|
]
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const DeleteImage = async (id: number | string) => {
|
||||||
|
var dt = await dataStore.dataDelete('DocumentPage/' + id)
|
||||||
|
|
||||||
|
if (dt !== 'errorfalse') {
|
||||||
|
dialogStore.CloseDialog('deleteimage')
|
||||||
|
await GetData()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
onBeforeMount(async () => {
|
onBeforeMount(async () => {
|
||||||
await GetData()
|
await GetData()
|
||||||
})
|
})
|
||||||
|
|||||||
@ -87,7 +87,7 @@
|
|||||||
title: 'Resim Url',
|
title: 'Resim Url',
|
||||||
computeHtml: (v: Record<string, any>) => {
|
computeHtml: (v: Record<string, any>) => {
|
||||||
if (v.resimUrl !== null && v.resimUrl !== undefined) {
|
if (v.resimUrl !== null && v.resimUrl !== undefined) {
|
||||||
return globalStore.TableCellDocument(v.resimUrl)
|
return `<a href="${ v.resimUrl }" target="_blank" onclick="event.stopPropagation()"><img class="table-cell-image" src="${ v.resimUrl }" /></a>`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@ -78,7 +78,7 @@
|
|||||||
title: 'Resim Url',
|
title: 'Resim Url',
|
||||||
computeHtml: (v: Record<string, any>) => {
|
computeHtml: (v: Record<string, any>) => {
|
||||||
if (v.resimUrl !== null && v.resimUrl !== undefined) {
|
if (v.resimUrl !== null && v.resimUrl !== undefined) {
|
||||||
return globalStore.TableCellDocument(v.resimUrl)
|
return `<a href="${ v.resimUrl }" target="_blank" onclick="event.stopPropagation()"><img class="table-cell-image" src="${ v.resimUrl }" /></a>`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@ -16,7 +16,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="form-part-content" v-if="customerDocumentStore.loaded">
|
<div class="form-part-content" v-if="customerDocumentStore.loaded">
|
||||||
<template v-if="customerDocumentStore.customerDocumentsList.length > 0">
|
<template v-if="customerDocumentStore.customerDocumentsList.length > 0">
|
||||||
<div class="form-inner-comment waiting-d" v-if="customerDocumentStore.customerDocumentsList.length < 3">
|
<div
|
||||||
|
class="form-inner-comment waiting-d"
|
||||||
|
v-if="customerDocumentStore.customerDocumentsList.length < 3">
|
||||||
En az
|
En az
|
||||||
<strong>Ticaret Sicil Gazetesi, Vergi Levhası, İmza Sirküleri</strong>
|
<strong>Ticaret Sicil Gazetesi, Vergi Levhası, İmza Sirküleri</strong>
|
||||||
sisteme yüklenmiş olmalıdır.
|
sisteme yüklenmiş olmalıdır.
|
||||||
@ -26,12 +28,26 @@
|
|||||||
:data="file"
|
:data="file"
|
||||||
@click="EditDocument"
|
@click="EditDocument"
|
||||||
:filePath="file.filePath"
|
:filePath="file.filePath"
|
||||||
:editable="usersStore.selectedUserApproveId === 3 || usersStore.selectedUserApproveId === 0"
|
:editable="
|
||||||
title="title" />
|
usersStore.isPanelUser ||
|
||||||
|
(!usersStore.isPanelUser &&
|
||||||
|
(usersStore.selectedUserApproveId === 3 ||
|
||||||
|
usersStore.selectedUserApproveId === 0))
|
||||||
|
"
|
||||||
|
title="title">
|
||||||
|
<template #actionButtons v-if="usersStore.isPanelUser">
|
||||||
|
<i
|
||||||
|
class="ico-c ico-btn ico-section back-grad-alert"
|
||||||
|
@click="DeleteDocumentPop(file)">
|
||||||
|
<svg><use href="/src/assets/images/icons.svg#trash"></use></svg>
|
||||||
|
</i>
|
||||||
|
</template>
|
||||||
|
</file-list-item>
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<template v-if="!usersStore.isPanelUser && usersStore.selectedUserApproveId !== 5">
|
<template
|
||||||
|
v-if="!usersStore.isPanelUser && usersStore.selectedUserApproveId !== 5">
|
||||||
<div class="form-inner-comment">
|
<div class="form-inner-comment">
|
||||||
<span>
|
<span>
|
||||||
Eklenmiş dosya bulunamadı. Üstteki butonu kullanarak dosya ekleyebilirsiniz.
|
Eklenmiş dosya bulunamadı. Üstteki butonu kullanarak dosya ekleyebilirsiniz.
|
||||||
@ -79,20 +95,21 @@
|
|||||||
</panel-wrapper>
|
</panel-wrapper>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onBeforeMount } from 'vue'
|
import { onBeforeMount } from 'vue'
|
||||||
|
|
||||||
import PanelUserDocument from '../panel/PanelUserDocument.vue'
|
import PanelUserDocument from '../panel/PanelUserDocument.vue'
|
||||||
import PanelWrapper from '@/components/PanelWrapper.vue'
|
import PanelWrapper from '@/components/PanelWrapper.vue'
|
||||||
|
|
||||||
import { useDataStore } from '@/stores/dataStore'
|
|
||||||
const dataStore = useDataStore()
|
|
||||||
import { useUsersStore } from '@/stores/usersStore'
|
import { useUsersStore } from '@/stores/usersStore'
|
||||||
const usersStore = useUsersStore()
|
const usersStore = useUsersStore()
|
||||||
|
|
||||||
import { useCustomerDocumentStore } from '../../stores/customerDocumentStore'
|
import { useCustomerDocumentStore } from '../../stores/customerDocumentStore'
|
||||||
const customerDocumentStore = useCustomerDocumentStore()
|
const customerDocumentStore = useCustomerDocumentStore()
|
||||||
import { useCustomerDocumentService } from '../../service/customerDocumentService'
|
import { useCustomerDocumentService } from '../../service/customerDocumentService'
|
||||||
const customerDocumentService = useCustomerDocumentService()
|
const customerDocumentService = useCustomerDocumentService()
|
||||||
|
import { useDialogStore } from '@/components/global/dialogStore'
|
||||||
|
const dialogStore = useDialogStore()
|
||||||
|
import { useDataStore } from '@/stores/dataStore'
|
||||||
|
const dataStore = useDataStore()
|
||||||
|
|
||||||
const NewDocument = () => {
|
const NewDocument = () => {
|
||||||
customerDocumentStore.ResetForm()
|
customerDocumentStore.ResetForm()
|
||||||
@ -106,6 +123,31 @@
|
|||||||
customerDocumentStore.documentPanel = true
|
customerDocumentStore.documentPanel = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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('AppUserDocument/' + id)
|
||||||
|
|
||||||
|
if (dt !== 'errorfalse') {
|
||||||
|
dialogStore.CloseDialog('deletedoc')
|
||||||
|
await customerDocumentService.GetDocumentList()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
onBeforeMount(async () => {
|
onBeforeMount(async () => {
|
||||||
usersStore.SetSelectedUser()
|
usersStore.SetSelectedUser()
|
||||||
|
|
||||||
|
|||||||
@ -1,49 +1,64 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class='form-part'>
|
<div class="form-part">
|
||||||
<div class='form-part-title'>
|
<div class="form-part-title">
|
||||||
<h4>Profil Resmi</h4>
|
<h4>Profil Resmi</h4>
|
||||||
</div>
|
</div>
|
||||||
<div class='form-part-content'>
|
<div class="form-part-content">
|
||||||
<template v-if="file.filePath !== '' && file.filePath !== null">
|
<template v-if="file.filePath !== '' && file.filePath !== null">
|
||||||
<file-list-item
|
<file-list-item
|
||||||
:data='file'
|
:data="file"
|
||||||
@click='ReplaceImage'
|
@click="ReplaceImage"
|
||||||
onlyPreview
|
onlyPreview
|
||||||
:filePath='file.filePath' />
|
:filePath="file.filePath">
|
||||||
|
<template
|
||||||
|
#actionButtons
|
||||||
|
v-if="
|
||||||
|
route.name === 'Profil' ||
|
||||||
|
(route.name === 'Profil' && !usersStore.isPanelUser)
|
||||||
|
">
|
||||||
|
<i
|
||||||
|
class="ico-c ico-btn ico-section back-grad-alert"
|
||||||
|
@click="DeleteImagePop(file)">
|
||||||
|
<svg><use href="/src/assets/images/icons.svg#trash"></use></svg>
|
||||||
|
</i>
|
||||||
|
</template>
|
||||||
|
</file-list-item>
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<template v-if="route.name === 'Profil' || (route.name === 'Profil' && !usersStore.isPanelUser)">
|
<template
|
||||||
<div class='form-item form-item-picture clickable' @click='picturePanel = true'>
|
v-if="
|
||||||
<div class='image-c'>
|
route.name === 'Profil' ||
|
||||||
<i class='ico-c'>
|
(route.name === 'Profil' && !usersStore.isPanelUser)
|
||||||
|
">
|
||||||
|
<div class="form-item form-item-picture clickable" @click="picturePanel = true">
|
||||||
|
<div class="image-c">
|
||||||
|
<i class="ico-c">
|
||||||
<svg>
|
<svg>
|
||||||
<use href='@/assets/images/icons.svg#plus'></use>
|
<use href="@/assets/images/icons.svg#plus"></use>
|
||||||
</svg>
|
</svg>
|
||||||
</i>
|
</i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<div class='form-inner-comment'>
|
<div class="form-inner-comment">Eklenmiş resim bulunamadı.</div>
|
||||||
Eklenmiş resim bulunamadı.
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<panel-wrapper
|
<panel-wrapper
|
||||||
v-if='picturePanel'
|
v-if="picturePanel"
|
||||||
v-model='picturePanel'
|
v-model="picturePanel"
|
||||||
panel-title='Profil Resmi Ekle'>
|
panel-title="Profil Resmi Ekle">
|
||||||
<template #panelContent>
|
<template #panelContent>
|
||||||
<panel-user-picture />
|
<panel-user-picture />
|
||||||
</template>
|
</template>
|
||||||
<template #footerButton>
|
<template #footerButton>
|
||||||
<div class='button-c button-save' @click='FileUpload'>Ekle</div>
|
<div class="button-c button-save" @click="FileUpload">Ekle</div>
|
||||||
</template>
|
</template>
|
||||||
</panel-wrapper>
|
</panel-wrapper>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang='ts'>
|
<script setup lang="ts">
|
||||||
import { ref, reactive, onBeforeMount } from 'vue'
|
import { ref, reactive, onBeforeMount } from 'vue'
|
||||||
import PanelUserPicture from '../panel/PanelUserPicture.vue'
|
import PanelUserPicture from '../panel/PanelUserPicture.vue'
|
||||||
import PanelWrapper from '@/components/PanelWrapper.vue'
|
import PanelWrapper from '@/components/PanelWrapper.vue'
|
||||||
@ -52,20 +67,13 @@
|
|||||||
|
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
import { useDataStore } from '@/stores/dataStore'
|
import { useDataStore } from '@/stores/dataStore'
|
||||||
|
|
||||||
const dataStore = useDataStore()
|
const dataStore = useDataStore()
|
||||||
import { useGlobalStore } from '@/stores/globalStore'
|
|
||||||
|
|
||||||
const globalStore = useGlobalStore()
|
|
||||||
import { useValidationStore } from '@/stores/validationStore'
|
import { useValidationStore } from '@/stores/validationStore'
|
||||||
|
|
||||||
const validationStore = useValidationStore()
|
const validationStore = useValidationStore()
|
||||||
import { useUsersStore } from '@/stores/usersStore'
|
import { useUsersStore } from '@/stores/usersStore'
|
||||||
|
|
||||||
const usersStore = useUsersStore()
|
const usersStore = useUsersStore()
|
||||||
import { useCustomerStore } from '@/module/uyeler/stores/customerStore'
|
import { useDialogStore } from '@/components/global/dialogStore'
|
||||||
|
const dialogStore = useDialogStore()
|
||||||
const customerStore = useCustomerStore()
|
|
||||||
|
|
||||||
const picturePanel = ref<boolean>(false)
|
const picturePanel = ref<boolean>(false)
|
||||||
const isUpdate = ref<boolean>(false)
|
const isUpdate = ref<boolean>(false)
|
||||||
@ -82,7 +90,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
const GetData = async () => {
|
const GetData = async () => {
|
||||||
let dt = await dataStore.dataGet('AppUserResim/AppUserId/' + usersStore.selectedUserId())
|
let dt = await dataStore.dataGet(
|
||||||
|
'AppUserResim/AppUserId/' + usersStore.selectedUserId()
|
||||||
|
)
|
||||||
if (dt !== 'errorfalse') {
|
if (dt !== 'errorfalse') {
|
||||||
Object.assign(file, dt)
|
Object.assign(file, dt)
|
||||||
if (usersStore.selectedUserId() === usersStore.userId)
|
if (usersStore.selectedUserId() === usersStore.userId)
|
||||||
@ -126,6 +136,32 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const DeleteImagePop = (data: Record<string, any>) => {
|
||||||
|
dialogStore.CreateDialog({
|
||||||
|
title: 'Resim Sil',
|
||||||
|
id: 'deleteimage',
|
||||||
|
content: 'Resmi silmek istediğinize emin misiniz? Bu işlem geri alınamaz.',
|
||||||
|
closeText: 'Vazgeç',
|
||||||
|
buttons: [
|
||||||
|
{
|
||||||
|
label: 'Resim Sil',
|
||||||
|
type: 'alert',
|
||||||
|
function: () => DeleteImage(data.id)
|
||||||
|
}
|
||||||
|
]
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const DeleteImage = async (id: number | string) => {
|
||||||
|
var dt = await dataStore.dataDelete('AppUserResim/' + id)
|
||||||
|
|
||||||
|
if (dt !== 'errorfalse') {
|
||||||
|
dialogStore.CloseDialog('deleteimage')
|
||||||
|
await GetData()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
onBeforeMount(async () => {
|
onBeforeMount(async () => {
|
||||||
await GetData()
|
await GetData()
|
||||||
})
|
})
|
||||||
|
|||||||
@ -8,7 +8,7 @@ export const useDataStore = defineStore('dataStore', () => {
|
|||||||
const globalDataStore = useGlobalDataStore()
|
const globalDataStore = useGlobalDataStore()
|
||||||
const toastStore = useToastStore()
|
const toastStore = useToastStore()
|
||||||
|
|
||||||
const siteBase = ref<string>('https://panelapi.cekilisevi.gov.tr/')
|
const siteBase = ref<string>(import.meta.env.VITE_API_URL)
|
||||||
const apiBase = ref<string>('api/')
|
const apiBase = ref<string>('api/')
|
||||||
const panelData = reactive<Record<string, any>>({})
|
const panelData = reactive<Record<string, any>>({})
|
||||||
const pageData = reactive<Record<string, any>>({})
|
const pageData = reactive<Record<string, any>>({})
|
||||||
@ -40,7 +40,7 @@ export const useDataStore = defineStore('dataStore', () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const response = await axios.get(apiBase.value + api, sendData)
|
const response = await axios.get(apiBase.value + api, sendData)
|
||||||
//console.log('response --', api, response)
|
console.log('response --', api, response)
|
||||||
|
|
||||||
if (data.full !== undefined && data.full) {
|
if (data.full !== undefined && data.full) {
|
||||||
return response
|
return response
|
||||||
@ -49,7 +49,7 @@ export const useDataStore = defineStore('dataStore', () => {
|
|||||||
}
|
}
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
CheckApiError(error.response.status, error.response.data)
|
CheckApiError(error.response.status, error.response.data)
|
||||||
//console.error('Hata oluştu -:', error)
|
console.error('Hata oluştu -:', error)
|
||||||
return 'errorfalse'
|
return 'errorfalse'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -86,7 +86,7 @@ export const useDataStore = defineStore('dataStore', () => {
|
|||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
CheckApiError(error.response.status, error.response.data)
|
CheckApiError(error.response.status, error.response.data)
|
||||||
|
|
||||||
//console.error('Hata oluştu:', error)
|
console.error('Hata oluştu:', error)
|
||||||
return Promise.resolve('errorfalse')
|
return Promise.resolve('errorfalse')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -122,7 +122,7 @@ export const useDataStore = defineStore('dataStore', () => {
|
|||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
CheckApiError(error.response.status, error.response.data)
|
CheckApiError(error.response.status, error.response.data)
|
||||||
|
|
||||||
//console.error('Hata oluştu:', error)
|
console.error('Hata oluştu:', error)
|
||||||
return Promise.resolve('errorfalse')
|
return Promise.resolve('errorfalse')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -156,7 +156,7 @@ export const useDataStore = defineStore('dataStore', () => {
|
|||||||
}
|
}
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
CheckApiError(error.response.status, error.response.data)
|
CheckApiError(error.response.status, error.response.data)
|
||||||
//console.error('Hata oluştu:', error)
|
console.error('Hata oluştu:', error)
|
||||||
return Promise.resolve('errorfalse')
|
return Promise.resolve('errorfalse')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,10 +6,22 @@ import vueJsx from '@vitejs/plugin-vue-jsx'
|
|||||||
|
|
||||||
// https://vitejs.dev/config/
|
// https://vitejs.dev/config/
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
plugins: [vue(), vueJsx()],
|
plugins: [
|
||||||
|
vue({
|
||||||
|
template: {
|
||||||
|
compilerOptions: {
|
||||||
|
comments: false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
vueJsx()
|
||||||
|
],
|
||||||
resolve: {
|
resolve: {
|
||||||
alias: {
|
alias: {
|
||||||
'@': fileURLToPath(new URL('./src', import.meta.url))
|
'@': fileURLToPath(new URL('./src', import.meta.url))
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
esbuild: {
|
||||||
|
drop: process.env.NODE_ENV === 'production' ? ['console', 'debugger'] : []
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user