Compare commits
10 Commits
Piyango-Do
...
Kapsam-Dış
| Author | SHA1 | Date | |
|---|---|---|---|
| ed8b6fd3eb | |||
| f4c0511afb | |||
| 7998b7bd6c | |||
| 6ff319cb1d | |||
| 10011eacd6 | |||
| 36d646e0bf | |||
| 908e63b896 | |||
| 0e130eafff | |||
| f6850853b2 | |||
| ff0304b4d9 |
1
.env.development
Normal file
1
.env.development
Normal file
@ -0,0 +1 @@
|
||||
VITE_API_URL=https://panelapi.cekilisevitest.gov.tr/
|
||||
1
.env.localdev
Normal file
1
.env.localdev
Normal file
@ -0,0 +1 @@
|
||||
VITE_API_URL=https://localhost:7241/
|
||||
1
.env.production
Normal file
1
.env.production
Normal file
@ -0,0 +1 @@
|
||||
VITE_API_URL=https://panelapi.cekilisevi.gov.tr/
|
||||
7
env.d.ts
vendored
7
env.d.ts
vendored
@ -1,2 +1,9 @@
|
||||
/// <reference types="vite/client" />
|
||||
|
||||
interface ImportMetaEnv {
|
||||
readonly VITE_API_URL: string;
|
||||
}
|
||||
|
||||
interface ImportMeta {
|
||||
readonly env: ImportMetaEnv;
|
||||
}
|
||||
@ -5,9 +5,12 @@
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"localdev": "vite",
|
||||
"build": "run-p type-check \"build-only {@}\" --",
|
||||
"buildtest": "run-p type-check \"build-only-test {@}\" --",
|
||||
"preview": "vite preview",
|
||||
"build-only": "vite build",
|
||||
"build-only-test": "vite build --mode development",
|
||||
"type-check": "vue-tsc --build --force"
|
||||
},
|
||||
"dependencies": {
|
||||
|
||||
@ -237,18 +237,4 @@
|
||||
d="M16.1362 14.1067H14.7781C14.3632 14.1067 14.0268 14.4424 14.0268 14.8564V19.8401C14.0268 20.2541 14.3632 20.5897 14.7781 20.5897H16.1362C16.5511 20.5897 16.8875 20.2541 16.8875 19.8401V14.8564C16.8875 14.4424 16.5511 14.1067 16.1362 14.1067Z"
|
||||
/>
|
||||
</symbol>
|
||||
<symbol id="trash" viewBox="0 0 20 22">
|
||||
<path
|
||||
d="M19.4015 6.14128H18.7672L18.8227 5.47865C18.8227 5.47865 18.8227 5.44229 18.8227 5.42613C18.8227 3.9837 17.6691 2.80795 16.2538 2.80795H14.8544V1.78976C14.8544 0.803906 14.0695 0.00390625 13.1022 0.00390625H6.88614C5.91885 0.00390625 5.13391 0.803906 5.13391 1.78976V2.80795H3.73451C2.31924 2.80795 1.16563 3.9837 1.16563 5.42613C1.16563 5.44229 1.16563 5.46249 1.16563 5.47865L1.22113 6.14128H0.586836C0.257797 6.14128 -0.0078125 6.41199 -0.0078125 6.74734C-0.0078125 7.08269 0.257797 7.3534 0.586836 7.3534H1.3242L2.35096 19.41C2.36682 20.8403 3.5125 21.9999 4.91984 21.9999H15.0645C16.4719 21.9999 17.6176 20.8403 17.6334 19.41L18.6602 7.3534H19.3975C19.7266 7.3534 19.9922 7.08269 19.9922 6.74734C19.9922 6.41199 19.7266 6.14128 19.3975 6.14128H19.4015ZM6.32321 1.78572C6.32321 1.46653 6.57692 1.21199 6.88614 1.21199H13.1022C13.4154 1.21199 13.6651 1.47057 13.6651 1.78572V2.80391H6.32321V1.78572ZM2.35492 5.40189C2.36682 4.63825 2.98129 4.02007 3.73451 4.02007H16.2578C17.011 4.02007 17.6255 4.63825 17.6374 5.40189L17.5739 6.14128H2.41835L2.35492 5.40189ZM16.452 19.3292C16.452 19.3292 16.452 19.3655 16.452 19.3817C16.452 20.1574 15.8336 20.7877 15.0725 20.7877H4.9238C4.16265 20.7877 3.54422 20.1574 3.54422 19.3817C3.54422 19.3655 3.54422 19.3453 3.54422 19.3292L2.52539 7.3534H17.4748L16.456 19.3292H16.452Z"
|
||||
/>
|
||||
<path
|
||||
d="M14.7236 13.9756H5.2687C4.93966 13.9756 4.67405 14.2463 4.67405 14.5817C4.67405 14.917 4.93966 15.1877 5.2687 15.1877H14.7196C15.0487 15.1877 15.3143 14.917 15.3143 14.5817C15.3143 14.2463 15.0487 13.9756 14.7196 13.9756H14.7236Z"
|
||||
/>
|
||||
<path
|
||||
d="M4.87227 11.6766H15.1161C15.4451 11.6766 15.7107 11.4059 15.7107 11.0706C15.7107 10.7352 15.4451 10.4645 15.1161 10.4645H4.87227C4.54323 10.4645 4.27762 10.7352 4.27762 11.0706C4.27762 11.4059 4.54323 11.6766 4.87227 11.6766Z"
|
||||
/>
|
||||
<path
|
||||
d="M14.3272 17.4867H5.66513C5.33609 17.4867 5.07048 17.7574 5.07048 18.0928C5.07048 18.4281 5.33609 18.6989 5.66513 18.6989H14.3232C14.6522 18.6989 14.9179 18.4281 14.9179 18.0928C14.9179 17.7574 14.6522 17.4867 14.3232 17.4867H14.3272Z"
|
||||
/>
|
||||
</symbol>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 41 KiB |
@ -18,15 +18,12 @@
|
||||
{{ fileName }}
|
||||
</div>
|
||||
</a>
|
||||
<div class="actions-c" v-if="editable || $slots.actionButtons">
|
||||
<slot name="actionButtons"></slot>
|
||||
<i
|
||||
class="ico-c ico-section ico-section-header-btn ico-replace"
|
||||
@click="OnClick"
|
||||
v-if="editable">
|
||||
<svg><use href="/src/assets/images/icons.svg#replace"></use></svg>
|
||||
</i>
|
||||
</div>
|
||||
<i
|
||||
class="ico-c ico-section ico-section-header-btn ico-replace"
|
||||
@click="OnClick"
|
||||
v-if="editable">
|
||||
<svg><use href="/src/assets/images/icons.svg#replace"></use></svg>
|
||||
</i>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@ -78,8 +75,8 @@
|
||||
|
||||
if (props.filePath !== undefined && props.filePath !== null) {
|
||||
localFilePath.value = props.usePath
|
||||
? (props.filePath as string)
|
||||
: (((axios.defaults.baseURL as string) + props.filePath) as string as string)
|
||||
? props.filePath as string
|
||||
: (axios.defaults.baseURL as string + props.filePath as string) as string
|
||||
|
||||
fileType.value = globalStore.FileType(localFilePath.value)
|
||||
fileName.value = globalStore.FileName(localFilePath.value)
|
||||
@ -99,19 +96,8 @@
|
||||
() => props.filePath,
|
||||
() => {
|
||||
localFilePath.value = props.usePath
|
||||
? (props.filePath as string)
|
||||
: (((axios.defaults.baseURL as string) + props.filePath) as string as string)
|
||||
? props.filePath as string
|
||||
: (axios.defaults.baseURL as string + props.filePath as string) as string
|
||||
}
|
||||
)
|
||||
</script>
|
||||
<style scoped>
|
||||
.actions-c {
|
||||
display: flex;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
height: 100%;
|
||||
padding: 8px;
|
||||
align-items: center;
|
||||
pointer-events: fill;
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -14,7 +14,9 @@
|
||||
</span>
|
||||
<template v-if="modelText !== undefined && modelText !== ''">
|
||||
<template v-if="typeof modelText === 'string'">
|
||||
<span>{{ price ? globalStore.toTrLocale(modelText) : modelText }}</span>
|
||||
<span :class="[size ? 'form-item-size form-item-size-' + size : '']">
|
||||
{{ price ? globalStore.toTrLocale(modelText) : modelText }}
|
||||
</span>
|
||||
</template>
|
||||
<template v-if="typeof modelText === 'object'">
|
||||
<ul>
|
||||
@ -25,7 +27,9 @@
|
||||
</template>
|
||||
</template>
|
||||
<template v-else>
|
||||
<span>{{ price ? globalStore.toTrLocale(localValue) : localValue }}</span>
|
||||
<span :class="[size ? 'form-item-size form-item-size-' + size : '']">
|
||||
{{ price ? globalStore.toTrLocale(localValue) : localValue }}
|
||||
</span>
|
||||
</template>
|
||||
<span
|
||||
class="form-item-alert"
|
||||
@ -64,6 +68,7 @@
|
||||
modelText?: any
|
||||
invalidText?: string
|
||||
price?: boolean
|
||||
size?: number | string
|
||||
}
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
half: false,
|
||||
@ -71,13 +76,23 @@
|
||||
})
|
||||
const localValue = ref<any>(props.modelValue)
|
||||
|
||||
if (props.type === 'date' && props.modelValue !== null && props.modelValue !== undefined && props.modelValue !== '')
|
||||
if (
|
||||
props.type === 'date' &&
|
||||
props.modelValue !== null &&
|
||||
props.modelValue !== undefined &&
|
||||
props.modelValue !== ''
|
||||
)
|
||||
localValue.value = dateStore.dateFormat({
|
||||
date: props.modelValue as Date,
|
||||
pattern: 'dd-mm-yy'
|
||||
})
|
||||
|
||||
if (props.type === 'datetime' && props.modelValue !== null && props.modelValue !== undefined && props.modelValue !== '')
|
||||
if (
|
||||
props.type === 'datetime' &&
|
||||
props.modelValue !== null &&
|
||||
props.modelValue !== undefined &&
|
||||
props.modelValue !== ''
|
||||
)
|
||||
localValue.value = dateStore.dateFormat({
|
||||
date: props.modelValue as Date,
|
||||
pattern: 'dd-mm-yy-t'
|
||||
@ -108,3 +123,14 @@
|
||||
}
|
||||
)
|
||||
</script>
|
||||
<style scoped>
|
||||
.form-item-size {
|
||||
font-weight: 600;
|
||||
}
|
||||
.form-item-size-1 {
|
||||
font-size: 1.2em;
|
||||
}
|
||||
.form-item-size-2 {
|
||||
font-size: 1.5em;
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -2,7 +2,7 @@ import axios from 'axios'
|
||||
import { useUsersStore } from '@/stores/usersStore'
|
||||
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.headers['Content-Type'] = 'application/json; charset=utf-8'
|
||||
import { useDataStore } from '@/stores/dataStore'
|
||||
|
||||
@ -109,7 +109,7 @@
|
||||
{
|
||||
title: 'Site Yönetimi',
|
||||
ico: 'sitemanagement',
|
||||
show: usersStore.isPanelUser && !usersStore.isAccounting,
|
||||
show: usersStore.isSuperAdmin,
|
||||
sub: [
|
||||
{
|
||||
title: 'Yeni Sayfa',
|
||||
|
||||
@ -3,6 +3,10 @@
|
||||
<lottery-states
|
||||
:piyangoAmac="piyangoStore.lotteryData.amacpiyangoId"
|
||||
v-if="!isPreview" />
|
||||
<form-display
|
||||
v-model="piyangoStore.lotteryData.piyangoId"
|
||||
label="Piyango ID"
|
||||
size="1" />
|
||||
<template
|
||||
v-if="
|
||||
usersStore.isPanelUser &&
|
||||
|
||||
@ -10,15 +10,7 @@
|
||||
:editable="false"
|
||||
:data="file"
|
||||
title="dokumanAdi"
|
||||
:filePath="file.url">
|
||||
<template #actionButtons v-if="usersStore.isPanelUser">
|
||||
<i
|
||||
class="ico-c ico-btn ico-section back-grad-alert"
|
||||
@click="DeleteDocumentPop(file)">
|
||||
<svg><use href="/src/assets/images/icons.svg#trash"></use></svg>
|
||||
</i>
|
||||
</template>
|
||||
</file-list-item>
|
||||
:filePath="file.url" />
|
||||
</template>
|
||||
</template>
|
||||
<template v-else>
|
||||
@ -41,35 +33,6 @@
|
||||
const piyangoDocumentStore = usePiyangoDocumentStore()
|
||||
import { usePiyangoDocumentService } from '../../service/piyangoDocumentService'
|
||||
const piyangoDocumentService = usePiyangoDocumentService()
|
||||
import { useDialogStore } from '@/components/global/dialogStore'
|
||||
const dialogStore = useDialogStore()
|
||||
import { useDataStore } from '@/stores/dataStore'
|
||||
const dataStore = useDataStore()
|
||||
|
||||
const DeleteDocumentPop = (data: Record<string, any>) => {
|
||||
dialogStore.CreateDialog({
|
||||
title: 'Doküman Sil',
|
||||
id: 'deletedoc',
|
||||
content: 'Dokümanı silmek istediğinize emin misiniz? Bu işlem geri alınamaz.',
|
||||
closeText: 'Vazgeç',
|
||||
buttons: [
|
||||
{
|
||||
label: 'Doküman Sil',
|
||||
type: 'alert',
|
||||
function: () => DeleteDocument(data.id)
|
||||
}
|
||||
]
|
||||
})
|
||||
}
|
||||
|
||||
const DeleteDocument = async (id: number | string) => {
|
||||
var dt = await dataStore.dataDelete('Popup/' + id)
|
||||
|
||||
if (dt !== 'errorfalse') {
|
||||
dialogStore.CloseDialog('deletedoc')
|
||||
await piyangoDocumentService.GetDocumentList()
|
||||
}
|
||||
}
|
||||
|
||||
onBeforeMount(async () => {
|
||||
await piyangoDocumentService.GetDocumentList()
|
||||
|
||||
@ -1,102 +0,0 @@
|
||||
<template>
|
||||
<div class="form-part form-title" v-if="usersStore.isPanelUser">
|
||||
<div class="form-title-buttons">
|
||||
<button
|
||||
class="button-c button-save"
|
||||
@click="piyangoTeminatService.SaveTeminatDurum"
|
||||
:disabled="!piyangoTeminatValidationStore.formChanged">
|
||||
Kaydet
|
||||
</button>
|
||||
<button
|
||||
v-if="piyangoTeminatValidationStore.formChanged"
|
||||
class="button-c button-cancel panel-close"
|
||||
@click="piyangoTeminatStore.ResetFormData">
|
||||
Vazgeç
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div :class="['form-part', piyangoTeminatValidationStore.formChanged ? 'changed' : '']"> <div
|
||||
class="form-part-content"
|
||||
v-if="piyangoTeminatStore.loaded">
|
||||
<form-select
|
||||
v-if="usersStore.isPanelUser"
|
||||
label="İşlem"
|
||||
:listData="piyangoDataStore.piyangoTeminatDurumlari"
|
||||
listText="value"
|
||||
listVal="id"
|
||||
v-model="piyangoTeminatStore.piyangoTeminatFormData.state"
|
||||
required
|
||||
:invalidText="piyangoTeminatValidationStore.invalidTexts.state"
|
||||
@change="OnKeyup" />
|
||||
|
||||
<form-display
|
||||
v-model="piyangoTeminatStore.piyangoTeminatFormData.amount"
|
||||
half
|
||||
label="Tutarı" />
|
||||
|
||||
<form-display
|
||||
v-model="piyangoTeminatStore.piyangoTeminatFormData.teminatParentTypeText"
|
||||
half
|
||||
label="Para Birimi" />
|
||||
|
||||
<form-display
|
||||
label="Teminat Türü"
|
||||
half
|
||||
v-model="piyangoTeminatStore.piyangoTeminatFormData.teminantChildTypeText" />
|
||||
|
||||
<form-display
|
||||
type="date"
|
||||
half
|
||||
v-model="piyangoTeminatStore.piyangoTeminatFormData.teminantDate"
|
||||
label="Tarih" />
|
||||
|
||||
<form-display
|
||||
v-model="piyangoTeminatStore.piyangoTeminatFormData.teminantNo"
|
||||
half
|
||||
label="No" />
|
||||
<div class="form-item form-item-half"></div>
|
||||
|
||||
<form-display
|
||||
v-model="piyangoTeminatStore.piyangoTeminatFormData.bankName"
|
||||
half
|
||||
label="Banka Adı" />
|
||||
|
||||
<form-display
|
||||
v-model="piyangoTeminatStore.piyangoTeminatFormData.bankBranch"
|
||||
half
|
||||
label="Banka Şubesi" />
|
||||
|
||||
<!--form-display
|
||||
label="İşlem"
|
||||
v-model="piyangoTeminatStore.piyangoTeminatFormData.stateText" /-->
|
||||
|
||||
<file-list-item
|
||||
title="Dosya"
|
||||
:data="piyangoTeminatStore.piyangoTeminatFormData"
|
||||
:editable="false"
|
||||
:filePath="piyangoTeminatStore.piyangoTeminatFormData.teminantDocumentUrl"
|
||||
:usePath="true"
|
||||
:onlyPreview="true" />
|
||||
|
||||
<form-display
|
||||
v-model="piyangoTeminatStore.piyangoTeminatFormData.description"
|
||||
label="Açıklama" />
|
||||
</div></div>
|
||||
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { usePiyangoTeminatStore } from '../../stores/piyangoTeminatStore'
|
||||
const piyangoTeminatStore = usePiyangoTeminatStore()
|
||||
import { useUsersStore } from '@/stores/usersStore'
|
||||
const usersStore = useUsersStore()
|
||||
import { usePiyangoDataStore } from '../../stores/piyangoDataStore'
|
||||
const piyangoDataStore = usePiyangoDataStore()
|
||||
import { usePiyangoTeminatValidationStore } from '../../validation/piyangoTeminatValidationStore'
|
||||
const piyangoTeminatValidationStore = usePiyangoTeminatValidationStore()
|
||||
import { usePiyangoTeminatService } from '../../service/piyangoTeminatService'
|
||||
const piyangoTeminatService = usePiyangoTeminatService()
|
||||
|
||||
const OnKeyup = () => {
|
||||
piyangoTeminatValidationStore.formChanged = true
|
||||
}
|
||||
</script>
|
||||
@ -23,6 +23,13 @@
|
||||
<strong style="font-size: 10pt; margin-bottom: 12px">
|
||||
PİYANGO İLE İLGİLİ BİLGİLER
|
||||
</strong>
|
||||
<br />
|
||||
<br />
|
||||
<strong style="font-size: 10pt; margin-bottom: 12px">
|
||||
PİYANGO ID: {{ piyangoStore.lotteryData.piyangoId }}
|
||||
</strong>
|
||||
<br />
|
||||
<br />
|
||||
<table
|
||||
cellspacing="0"
|
||||
class="table-no-line"
|
||||
|
||||
@ -12,6 +12,12 @@
|
||||
Bahisler ve Oyunlar Dairesi Başkanlığına
|
||||
</strong>
|
||||
<br />
|
||||
<br />
|
||||
<strong style="font-size: 10pt; margin-bottom: 12px">
|
||||
PİYANGO ID: {{ piyangoStore.lotteryData.piyangoId }}
|
||||
</strong>
|
||||
<br />
|
||||
<br />
|
||||
<table
|
||||
cellspacing="0"
|
||||
class="table-no-line"
|
||||
|
||||
@ -31,7 +31,17 @@
|
||||
</div>
|
||||
<div class="form-part-content" v-if="loaded">
|
||||
<lottery-states :piyangoAmac="piyangoStore.lotteryData.amacpiyangoId" />
|
||||
|
||||
<template
|
||||
v-if="
|
||||
!piyangoStore.isNew &&
|
||||
piyangoStore.lotteryData.piyangoId !== undefined &&
|
||||
piyangoStore.lotteryData.piyangoId !== null
|
||||
">
|
||||
<form-display
|
||||
v-model="piyangoStore.lotteryData.piyangoId"
|
||||
label="Piyango ID"
|
||||
size="1" />
|
||||
</template>
|
||||
<form-input
|
||||
modelKey="cekilisBaslik"
|
||||
v-model="piyangoStore.lotteryData.baslik"
|
||||
@ -602,7 +612,7 @@
|
||||
|
||||
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ı'
|
||||
})
|
||||
|
||||
|
||||
@ -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,9 +9,24 @@
|
||||
v-model="piyangoTeminatStore.piyangoTeminatFormData.state"
|
||||
required
|
||||
:invalidText="piyangoTeminatValidationStore.invalidTexts.state"
|
||||
@change="OnKeyup"
|
||||
:disabled="!usersStore.isPanelUser"/>
|
||||
@change="OnKeyup"
|
||||
:disabled="!usersStore.isPanelUser" />
|
||||
|
||||
<template v-if="piyangoTeminatStore.piyangoTeminatFormData.state === 2">
|
||||
<form-date
|
||||
type="date"
|
||||
modelKey="iadeTarihi"
|
||||
v-model="piyangoTeminatStore.piyangoTeminatFormData.iadeTarihi"
|
||||
label="İlan Tarihi"
|
||||
:invalidText="piyangoTeminatValidationStore.invalidTexts.iadeTarihi"
|
||||
@change="OnKeyup" />
|
||||
<form-file
|
||||
v-model="piyangoTeminatStore.piyangoTeminatFormData.iadeFile"
|
||||
elclass="panel-documents-item"
|
||||
:invalidText="piyangoTeminatValidationStore.invalidTexts.iadeFile"
|
||||
@change="OnKeyup" />
|
||||
</template>
|
||||
|
||||
<form-display
|
||||
v-model="piyangoTeminatStore.piyangoTeminatFormData.amount"
|
||||
half
|
||||
@ -51,7 +66,10 @@
|
||||
label="Banka Şubesi" />
|
||||
|
||||
<file-list-item
|
||||
v-if="piyangoTeminatStore.piyangoTeminatFormData.teminantDocumentUrl !== null && piyangoTeminatStore.piyangoTeminatFormData.teminantDocumentUrl !== undefined"
|
||||
v-if="
|
||||
piyangoTeminatStore.piyangoTeminatFormData.teminantDocumentUrl !== null &&
|
||||
piyangoTeminatStore.piyangoTeminatFormData.teminantDocumentUrl !== undefined
|
||||
"
|
||||
title="Dosya"
|
||||
:data="piyangoTeminatStore.piyangoTeminatFormData"
|
||||
:editable="false"
|
||||
|
||||
@ -18,9 +18,12 @@ export const usePiyangoTeminatService = defineStore('piyangoTeminatService', ()
|
||||
if (piyangoTeminatValidationStore.FormCheck()) {
|
||||
let form: any
|
||||
let dataForm = new FormData()
|
||||
|
||||
|
||||
dataForm.append('state', piyangoTeminatStore.piyangoTeminatFormData.state)
|
||||
dataForm.append('amount', globalStore.floatEnLocale(piyangoTeminatStore.piyangoTeminatFormData.amount))
|
||||
dataForm.append(
|
||||
'amount',
|
||||
globalStore.floatEnLocale(piyangoTeminatStore.piyangoTeminatFormData.amount)
|
||||
)
|
||||
dataForm.append('bankName', piyangoTeminatStore.piyangoTeminatFormData.bankName)
|
||||
dataForm.append('bankBranch', piyangoTeminatStore.piyangoTeminatFormData.bankBranch)
|
||||
dataForm.append(
|
||||
@ -43,6 +46,19 @@ export const usePiyangoTeminatService = defineStore('piyangoTeminatService', ()
|
||||
'description',
|
||||
piyangoTeminatStore.piyangoTeminatFormData.description
|
||||
)
|
||||
|
||||
if (usersStore.isPanelUser) {
|
||||
if (piyangoTeminatStore.piyangoTeminatFormData.state !== 2) {
|
||||
piyangoTeminatStore.piyangoTeminatFormData.iadeTarihi = ''
|
||||
piyangoTeminatStore.piyangoTeminatFormData.iadeFile = ''
|
||||
}
|
||||
dataForm.append(
|
||||
'iadeTarihi',
|
||||
String(piyangoTeminatStore.piyangoTeminatFormData.iadeTarihi)
|
||||
)
|
||||
dataForm.append('iadeFile', piyangoTeminatStore.piyangoTeminatFormData.iadeFile)
|
||||
}
|
||||
|
||||
if (piyangoTeminatStore.isNew) {
|
||||
form = await dataStore.dataPost('TeminantStates/', {
|
||||
data: dataForm,
|
||||
@ -61,8 +77,8 @@ export const usePiyangoTeminatService = defineStore('piyangoTeminatService', ()
|
||||
}
|
||||
|
||||
if (form !== 'errorfalse') {
|
||||
piyangoTeminatStore.isNew = false
|
||||
piyangoTeminatValidationStore.formChanged = false
|
||||
piyangoTeminatStore.isNew = false
|
||||
piyangoTeminatValidationStore.formChanged = false
|
||||
piyangoTeminatStore.refreshList = true
|
||||
piyangoTeminatStore.teminatPanel = false
|
||||
}
|
||||
@ -80,7 +96,7 @@ export const usePiyangoTeminatService = defineStore('piyangoTeminatService', ()
|
||||
|
||||
if (form !== 'errorfalse') {
|
||||
piyangoTeminatStore.isNew = false
|
||||
await Object.assign(piyangoTeminatStore.piyangoTeminatFormData, form)
|
||||
await Object.assign(piyangoTeminatStore.piyangoTeminatFormData, form)
|
||||
} else {
|
||||
await piyangoTeminatStore.ResetFormData()
|
||||
await piyangoTeminatStore.RestoreFormData()
|
||||
|
||||
@ -23,7 +23,9 @@ export const usePiyangoTeminatStore = defineStore('piyangoTeminatStore', () => {
|
||||
cekilisId: piyangoStore.selectedLottery,
|
||||
kisiId: usersStore.userId,
|
||||
description: '',
|
||||
file: ''
|
||||
file: '',
|
||||
iadeTarihi: '',
|
||||
iadeFile: ''
|
||||
})
|
||||
|
||||
const piyangoTeminatFormData = reactive<Record<string, any>>({})
|
||||
@ -31,7 +33,7 @@ export const usePiyangoTeminatStore = defineStore('piyangoTeminatStore', () => {
|
||||
const loaded = ref<boolean>(false)
|
||||
const isNew = ref<boolean>(false)
|
||||
const teminatPanel = ref<boolean>(false)
|
||||
const selectedTeminatId = ref<number|null>(null)
|
||||
const selectedTeminatId = ref<number | null>(null)
|
||||
const refreshList = ref<boolean>(false)
|
||||
|
||||
const ResetFormData = () => {
|
||||
@ -42,7 +44,7 @@ export const usePiyangoTeminatStore = defineStore('piyangoTeminatStore', () => {
|
||||
loaded.value = true
|
||||
}, 30)
|
||||
}
|
||||
const RestoreFormData = () => {
|
||||
const RestoreFormData = () => {
|
||||
Object.assign(piyangoTeminatFormData, piyangoTeminatSafeFormData)
|
||||
}
|
||||
return {
|
||||
|
||||
@ -24,6 +24,12 @@ export const usePiyangoTeminatValidationStore = defineStore(
|
||||
'state',
|
||||
'Lütfen işlem tipini seçiniz.'
|
||||
)
|
||||
validationStore.IsFieldEmpty(
|
||||
piyangoTeminatStore.piyangoTeminatFormData,
|
||||
invalidTexts,
|
||||
'iadeTarihi',
|
||||
'Lütfen iade tarihini seçiniz.'
|
||||
)
|
||||
}
|
||||
|
||||
validationStore.IsFieldEmpty(
|
||||
|
||||
@ -60,13 +60,14 @@
|
||||
|
||||
const CreateTabs = () => {
|
||||
if (
|
||||
piyangoStore.lotteryApprove === 4 ||
|
||||
piyangoStore.lotteryApprove === 10 ||
|
||||
piyangoStore.lotteryApprove === 11 ||
|
||||
piyangoStore.lotteryApprove === 12 ||
|
||||
piyangoStore.lotteryApprove === 13 ||
|
||||
piyangoStore.lotteryApprove === 14 ||
|
||||
usersStore.isPanelUser
|
||||
(piyangoStore.lotteryApprove === 4 ||
|
||||
piyangoStore.lotteryApprove === 10 ||
|
||||
piyangoStore.lotteryApprove === 11 ||
|
||||
piyangoStore.lotteryApprove === 12 ||
|
||||
piyangoStore.lotteryApprove === 13 ||
|
||||
piyangoStore.lotteryApprove === 14 ||
|
||||
usersStore.isPanelUser) &&
|
||||
piyangoStore.lotteryPurposeId !== 3
|
||||
) {
|
||||
tabList.value.push(
|
||||
{ text: 'Katılım Listesi', id: 'katilimcilistesi' },
|
||||
@ -82,7 +83,7 @@
|
||||
}
|
||||
tabList.value.push({ text: 'Onay Durumu', id: 'onaydurumu' })
|
||||
|
||||
if (piyangoStore.lotteryApprove !== 0) {
|
||||
if (piyangoStore.lotteryApprove !== 0 && piyangoStore.lotteryPurposeId !== 3) {
|
||||
tabList.value.push({ text: 'Teminat Listesi', id: 'teminatlistesi' })
|
||||
}
|
||||
}
|
||||
|
||||
@ -67,11 +67,25 @@
|
||||
const tableHeader = computed<Record<string, any>[]>(() => {
|
||||
let header: Record<string, any>[] = []
|
||||
|
||||
header.push({
|
||||
name: 'piyangoId',
|
||||
title: 'Piyango Id',
|
||||
sort: true,
|
||||
style: { width: '10%' }
|
||||
})
|
||||
|
||||
|
||||
if (usersStore.isAraciFirma || usersStore.isPanelUser) {
|
||||
header.push({ name: 'duzenleyen', title: 'Düzenleyen' })
|
||||
}
|
||||
|
||||
header.push(
|
||||
{
|
||||
name: 'piyangoId',
|
||||
title: 'Piyango ID',
|
||||
sort: true,
|
||||
style: { width: '10%' }
|
||||
},
|
||||
{
|
||||
name: 'baslik',
|
||||
title: 'Başlık',
|
||||
@ -101,14 +115,16 @@
|
||||
type: 'date',
|
||||
range: true
|
||||
}
|
||||
})
|
||||
}
|
||||
)
|
||||
|
||||
if (usersStore.isVakifDernek || usersStore.isPanelUser) {
|
||||
header.push({
|
||||
name: 'cekilisTarihi',
|
||||
title: 'Çekiliş Tarihi',
|
||||
compute: (v: Record<string, any>): string => {
|
||||
return dateStore.dateFormat({ date: v.cekilisTarihi })
|
||||
if(v.piyangoAmacId === 3) return ''
|
||||
else return dateStore.dateFormat({ date: v.cekilisTarihi })
|
||||
},
|
||||
sort: true,
|
||||
filter: {
|
||||
@ -146,7 +162,7 @@
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
header.push(
|
||||
{
|
||||
|
||||
@ -54,6 +54,12 @@
|
||||
}
|
||||
|
||||
header.push(
|
||||
{
|
||||
name: 'piyangoId',
|
||||
title: 'Piyango ID',
|
||||
sort: true,
|
||||
style: { width: '10%' }
|
||||
},
|
||||
{
|
||||
name: 'baslik',
|
||||
title: 'Başlık',
|
||||
|
||||
@ -87,7 +87,7 @@
|
||||
title: 'Resim Url',
|
||||
computeHtml: (v: Record<string, any>) => {
|
||||
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',
|
||||
computeHtml: (v: Record<string, any>) => {
|
||||
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>`
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@ -8,7 +8,7 @@ export const useDataStore = defineStore('dataStore', () => {
|
||||
const globalDataStore = useGlobalDataStore()
|
||||
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 panelData = 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)
|
||||
//console.log('response --', api, response)
|
||||
console.log('response --', api, response)
|
||||
|
||||
if (data.full !== undefined && data.full) {
|
||||
return response
|
||||
@ -49,7 +49,7 @@ export const useDataStore = defineStore('dataStore', () => {
|
||||
}
|
||||
} catch (error: any) {
|
||||
CheckApiError(error.response.status, error.response.data)
|
||||
//console.error('Hata oluştu -:', error)
|
||||
console.error('Hata oluştu -:', error)
|
||||
return 'errorfalse'
|
||||
}
|
||||
}
|
||||
@ -86,7 +86,7 @@ export const useDataStore = defineStore('dataStore', () => {
|
||||
} catch (error: any) {
|
||||
CheckApiError(error.response.status, error.response.data)
|
||||
|
||||
//console.error('Hata oluştu:', error)
|
||||
console.error('Hata oluştu:', error)
|
||||
return Promise.resolve('errorfalse')
|
||||
}
|
||||
}
|
||||
@ -122,7 +122,7 @@ export const useDataStore = defineStore('dataStore', () => {
|
||||
} catch (error: any) {
|
||||
CheckApiError(error.response.status, error.response.data)
|
||||
|
||||
//console.error('Hata oluştu:', error)
|
||||
console.error('Hata oluştu:', error)
|
||||
return Promise.resolve('errorfalse')
|
||||
}
|
||||
}
|
||||
@ -156,7 +156,7 @@ export const useDataStore = defineStore('dataStore', () => {
|
||||
}
|
||||
} catch (error: any) {
|
||||
CheckApiError(error.response.status, error.response.data)
|
||||
//console.error('Hata oluştu:', error)
|
||||
console.error('Hata oluştu:', error)
|
||||
return Promise.resolve('errorfalse')
|
||||
}
|
||||
}
|
||||
|
||||
@ -11,5 +11,8 @@ export default defineConfig({
|
||||
alias: {
|
||||
'@': fileURLToPath(new URL('./src', import.meta.url))
|
||||
}
|
||||
},
|
||||
esbuild: {
|
||||
drop: process.env.NODE_ENV === 'production' ? ['console', 'debugger'] : []
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user