ilk commit
This commit is contained in:
76
src/module/uyeler/components/TabUyeBilgileri.vue
Normal file
76
src/module/uyeler/components/TabUyeBilgileri.vue
Normal file
@ -0,0 +1,76 @@
|
||||
<template>
|
||||
<div class="form-content">
|
||||
<div class="form-inner-content form-inner-content-left">
|
||||
<template
|
||||
v-if="
|
||||
!usersStore.isPanelUser &&
|
||||
(usersStore.selectedUserApproveId === 0 ||
|
||||
usersStore.selectedUserApproveId === 3)
|
||||
">
|
||||
<form-uye-bilgileri />
|
||||
</template>
|
||||
<template v-else>
|
||||
<form-uye-bilgileri-display
|
||||
v-if="
|
||||
!usersStore.isPanelUser || (usersStore.isPanelUser && route.name !== 'Profil')
|
||||
" />
|
||||
<form-sifre-degistir v-if="usersStore.isPanelUser && CanChangePassword" />
|
||||
</template>
|
||||
<div class="form-part" v-if="(usersStore.isPanelUser && route.name !== 'Profil') ||
|
||||
(!usersStore.isPanelUser && route.name === 'Profil') ||
|
||||
(!usersStore.isPanelUser && route.name === 'UyeYetkiliDetay')">
|
||||
<form-uye-irtibat-kisi
|
||||
v-if="
|
||||
route.name === 'Profil' &&
|
||||
(usersStore.selectedUserApproveId === 0 ||
|
||||
usersStore.selectedUserApproveId === 3)
|
||||
" />
|
||||
<form-uye-irtibat-kisi-display v-else />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-inner-content form-inner-content-right">
|
||||
<form-uye-documents
|
||||
v-if="
|
||||
(usersStore.isPanelUser && route.name !== 'Profil') ||
|
||||
(!usersStore.isPanelUser && route.name === 'Profil')
|
||||
" />
|
||||
<form-uye-picture
|
||||
v-if="route.name !== 'UyeYetkiliDetay' && route.name !== 'UyeYetkiliYeni'" />
|
||||
<form-sifre-degistir
|
||||
v-if="
|
||||
route.name !== 'UyeYetkiliDetay' &&
|
||||
route.name !== 'UyeYetkiliYeni' &&
|
||||
CanChangePassword &&
|
||||
!usersStore.isPanelUser
|
||||
" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
const route = useRoute()
|
||||
import { useUsersStore } from '@/stores/usersStore'
|
||||
const usersStore = useUsersStore()
|
||||
import { useGlobalStore } from '@/stores/globalStore'
|
||||
const globalStore = useGlobalStore()
|
||||
|
||||
import FormUyeBilgileri from './form/FormUyeBilgileri.vue'
|
||||
import FormUyeBilgileriDisplay from './display/FormUyeBilgileriDisplay.vue'
|
||||
import FormUyeIrtibatKisi from './form/FormUyeIrtibatKisi.vue'
|
||||
import FormUyeIrtibatKisiDisplay from './display/FormUyeIrtibatKisiDisplay.vue'
|
||||
import FormUyeDocuments from './form/FormUyeDocuments.vue'
|
||||
import FormUyePicture from './form/FormUyePicture.vue'
|
||||
import FormSifreDegistir from '@/module/kullanicilar/components/form/FormSifreDegistir.vue'
|
||||
|
||||
const CanChangePassword = computed<boolean>(() => {
|
||||
if (usersStore.isPanelUser) {
|
||||
if (route.name === 'Profil' && usersStore.userId === usersStore.selectedUserId())
|
||||
return true
|
||||
else return false
|
||||
} else {
|
||||
if (usersStore.userId === usersStore.selectedUserId()) return true
|
||||
else return false
|
||||
}
|
||||
})
|
||||
</script>
|
||||
42
src/module/uyeler/components/TabUyeLoglari.vue
Normal file
42
src/module/uyeler/components/TabUyeLoglari.vue
Normal file
@ -0,0 +1,42 @@
|
||||
<template>
|
||||
<section class="section-list">
|
||||
<list-table-content
|
||||
:tableHeader="tableHeader"
|
||||
icon="draws"
|
||||
title="Üye Logları"
|
||||
listText="Kayıt"
|
||||
apiList="CekilisAtamaLog"/>
|
||||
</section>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
import { useDateStore } from '@/stores/dateStore'
|
||||
const dateStore = useDateStore()
|
||||
|
||||
interface ITableHead {
|
||||
[key: string]: any
|
||||
}
|
||||
|
||||
const tableHeader:ITableHead = ref([
|
||||
{
|
||||
name: 'tarih',
|
||||
title: 'İşlem Tarihi',
|
||||
compute: (v: { [key: string]: string }): string => {
|
||||
return dateStore.dateFormat({ date: v.tarih })
|
||||
},
|
||||
sort: true,
|
||||
style:{width:'10%'}
|
||||
},
|
||||
{
|
||||
name: 'islemiYapan',
|
||||
title: 'İşlemi yapan',
|
||||
sort: true,
|
||||
style:{width:'20%'}
|
||||
},
|
||||
{
|
||||
name: 'islem',
|
||||
title: 'İşlem',
|
||||
sort: true
|
||||
}
|
||||
])
|
||||
</script>
|
||||
19
src/module/uyeler/components/TabUyeOnayDurumu.vue
Normal file
19
src/module/uyeler/components/TabUyeOnayDurumu.vue
Normal file
@ -0,0 +1,19 @@
|
||||
<template>
|
||||
<div class="form-content">
|
||||
<div class="form-inner-content form-inner-content-left" v-if="usersStore.isPanelUser">
|
||||
<form-uye-onay />
|
||||
</div>
|
||||
<div class="form-inner-content">
|
||||
<div class="form-part">
|
||||
<form-uye-onay-log />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { useUsersStore } from '@/stores/usersStore'
|
||||
const usersStore = useUsersStore()
|
||||
|
||||
import FormUyeOnayLog from './form/FormUyeOnayLog.vue'
|
||||
import FormUyeOnay from './form/FormUyeOnay.vue'
|
||||
</script>
|
||||
21
src/module/uyeler/components/TabUyeOnayDurumuUser.vue
Normal file
21
src/module/uyeler/components/TabUyeOnayDurumuUser.vue
Normal file
@ -0,0 +1,21 @@
|
||||
<template>
|
||||
<div class="form-content">
|
||||
<div
|
||||
class="form-inner-content form-inner-content-left"
|
||||
v-if="usersStore.selectedUserApproveId === 0 || usersStore.selectedUserApproveId === 3">
|
||||
<form-uye-onaya-gonder />
|
||||
</div>
|
||||
<div class="form-inner-content">
|
||||
<div class="form-part">
|
||||
<form-uye-onay-log />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { useUsersStore } from '@/stores/usersStore'
|
||||
const usersStore = useUsersStore()
|
||||
|
||||
import FormUyeOnayLog from './form/FormUyeOnayLog.vue'
|
||||
import FormUyeOnayaGonder from './form/FormUyeOnayaGonder.vue'
|
||||
</script>
|
||||
138
src/module/uyeler/components/TabUyeYetkiliOlduguKisiKurum.vue
Normal file
138
src/module/uyeler/components/TabUyeYetkiliOlduguKisiKurum.vue
Normal file
@ -0,0 +1,138 @@
|
||||
<template>
|
||||
<section class="section-list">
|
||||
<list-table-content
|
||||
v-if="loaded"
|
||||
:tableHeader="tableHeader"
|
||||
:rowAction="rwAction"
|
||||
:addRoute="YetkiliKurumLink()"
|
||||
icon="draws"
|
||||
title="Yetkili Olduğu Kişi/Kurum"
|
||||
listText="Kayıt"
|
||||
:apiList="'Auth/userbyuserChildList/' + usersStore.selectedUserId()" />
|
||||
</section>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, computed, onBeforeMount } from 'vue'
|
||||
|
||||
import { useGlobalStore } from '@/stores/globalStore'
|
||||
const globalStore = useGlobalStore()
|
||||
import { useGlobalDataStore } from '@/stores/globalDataStore'
|
||||
const globalDataStore = useGlobalDataStore()
|
||||
import { useUsersStore } from '@/stores/usersStore'
|
||||
const usersStore = useUsersStore()
|
||||
import { useDataStore } from '@/stores/dataStore'
|
||||
const dataStore = useDataStore()
|
||||
import { useDateStore } from '@/stores/dateStore'
|
||||
const dateStore = useDateStore()
|
||||
import { useCustomerStore } from '../stores/customerStore'
|
||||
const customerStore = useCustomerStore()
|
||||
import { useCustomerService } from '../service/customerService'
|
||||
const customerService = useCustomerService()
|
||||
import { useRoute } from 'vue-router'
|
||||
const route = useRoute()
|
||||
import router from '@/router'
|
||||
|
||||
const loaded = ref<boolean>(false)
|
||||
|
||||
const UyeId = () => {
|
||||
if (usersStore.isPanelUser) return route.params.uyeId
|
||||
else return usersStore.userId
|
||||
}
|
||||
|
||||
const YetkiliKurumLink = (): string => {
|
||||
if (usersStore.isPanelUser) return ''
|
||||
else return '/uyeler/detay/' + UyeId() + '/yetkili-uye/yeni'
|
||||
}
|
||||
|
||||
const ilList = computed<Record<string, any>[]>(() => {
|
||||
return globalDataStore.ilList
|
||||
})
|
||||
|
||||
const userTips = computed<Record<string, any>[]>(() => {
|
||||
return globalDataStore.customerTips
|
||||
})
|
||||
|
||||
const customerOnayIslemTipleri = computed<Record<string, any>[]>(() => {
|
||||
return customerStore.onayIslemTipleri
|
||||
})
|
||||
|
||||
const tableHeader = ref<Record<string, any>>([
|
||||
{
|
||||
name: 'olusturmatarihi',
|
||||
title: 'Kayıt Tarihi',
|
||||
sort: true,
|
||||
compute: (v: Record<string, any>): string => {
|
||||
if (v.olusturmatarihi === null) return ''
|
||||
else return dateStore.dateFormat({ date: v.olusturmatarihi })
|
||||
},
|
||||
filter: {
|
||||
type: 'date',
|
||||
range: true
|
||||
},
|
||||
style: { width: '10%' }
|
||||
},
|
||||
{
|
||||
name: 'basvuruTipi',
|
||||
title: 'Kullanıcı Tipi',
|
||||
sort: true,
|
||||
filter: {
|
||||
type: 'select',
|
||||
data: userTips,
|
||||
listVal: 'id',
|
||||
listText: 'baslik',
|
||||
filterId: 'basvuruTipId'
|
||||
},
|
||||
style:{width:'10%'}
|
||||
},
|
||||
{
|
||||
name: 'unvan',
|
||||
title: 'Ünvan',
|
||||
style: { width: '20%' }
|
||||
},
|
||||
{ name: 'email', title: 'Email', style: { width: '10%' } },
|
||||
{ name: 'telefonNumarasi', title: 'Telefon' },
|
||||
{
|
||||
name: 'il',
|
||||
title: 'İl',
|
||||
sort: true,
|
||||
filter: {
|
||||
type: 'select',
|
||||
data: ilList,
|
||||
listVal: 'id',
|
||||
listText: 'ad',
|
||||
filterId: 'ilId'
|
||||
}
|
||||
},
|
||||
{ name: 'ilce', title: 'İlçe', sort: true },
|
||||
{
|
||||
name: 'islemTipi',
|
||||
title: 'Durum',
|
||||
sort: true,
|
||||
computeHtml: (v: Record<string, any>): string => {
|
||||
return `<span class='back-grad ${customerStore.CellStatusClass(v.islemTipId)}'>
|
||||
${v.islemTipi}
|
||||
</span>`
|
||||
},
|
||||
filter: {
|
||||
type: 'select',
|
||||
data: customerOnayIslemTipleri,
|
||||
listVal: 'id',
|
||||
listText: 'tipAdi',
|
||||
filterId: 'islemTipId'
|
||||
},
|
||||
style: { width: '10%' }
|
||||
}
|
||||
])
|
||||
|
||||
const rwAction = (row: any) => {
|
||||
router.push('/uyeler/detay/' + UyeId() + '/yetkili-uye/detay/' + row.id)
|
||||
}
|
||||
|
||||
onBeforeMount(async () => {
|
||||
await dataStore.GetIlList()
|
||||
await dataStore.GetCustomerTipList()
|
||||
await customerService.GetCustomerOnayIslemTipleri()
|
||||
|
||||
loaded.value = true
|
||||
})
|
||||
</script>
|
||||
50
src/module/uyeler/components/TabYetkiliUyeBilgileri.vue
Normal file
50
src/module/uyeler/components/TabYetkiliUyeBilgileri.vue
Normal file
@ -0,0 +1,50 @@
|
||||
<template>
|
||||
<div class="form-content">
|
||||
<div class="form-inner-content form-inner-content-left">
|
||||
<form-uye-bilgileri
|
||||
v-if="
|
||||
(!usersStore.isPanelUser &&
|
||||
(usersStore.selectedUserApproveId === 0 ||
|
||||
usersStore.selectedUserApproveId === 3)) ||
|
||||
(route.name === 'Profil' && usersStore.isPanelUser) ||
|
||||
route.name === 'UyeYetkiliYeni'
|
||||
" />
|
||||
<form-uye-bilgileri-display v-else />
|
||||
<div
|
||||
class="form-part"
|
||||
v-if="
|
||||
(usersStore.isPanelUser && route.name !== 'Profil') ||
|
||||
(!usersStore.isPanelUser && route.name === 'Profil') ||
|
||||
(!usersStore.isPanelUser && route.name === 'UyeYetkiliDetay')
|
||||
">
|
||||
<form-uye-irtibat-kisi
|
||||
v-if="
|
||||
(usersStore.selectedUserApproveId === 0 ||
|
||||
usersStore.selectedUserApproveId === 3)
|
||||
" />
|
||||
<form-uye-irtibat-kisi-display v-else />
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="form-inner-content form-inner-content-right"
|
||||
v-if="
|
||||
(usersStore.isPanelUser && route.name !== 'Profil') ||
|
||||
(!usersStore.isPanelUser && route.name === 'Profil') ||
|
||||
(!usersStore.isPanelUser && route.name === 'UyeYetkiliDetay')
|
||||
">
|
||||
<form-uye-documents />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { useRoute } from 'vue-router'
|
||||
const route = useRoute()
|
||||
import { useUsersStore } from '@/stores/usersStore'
|
||||
const usersStore = useUsersStore()
|
||||
|
||||
import FormUyeBilgileri from './form/FormUyeBilgileri.vue'
|
||||
import FormUyeBilgileriDisplay from './display/FormUyeBilgileriDisplay.vue'
|
||||
import FormUyeIrtibatKisi from './form/FormUyeIrtibatKisi.vue'
|
||||
import FormUyeIrtibatKisiDisplay from './display/FormUyeIrtibatKisiDisplay.vue'
|
||||
import FormUyeDocuments from './form/FormUyeDocuments.vue'
|
||||
</script>
|
||||
52
src/module/uyeler/components/content/UserApproveStates.vue
Normal file
52
src/module/uyeler/components/content/UserApproveStates.vue
Normal file
@ -0,0 +1,52 @@
|
||||
<template>
|
||||
<template v-if="usersStore.selectedUserApproveId === 0">
|
||||
<div class="form-inner-comment new-d">Yeni üyelik Başvurusu.</div>
|
||||
<div class="form-inner-comment alert-d" v-if="!usersStore.isPanelUser">
|
||||
Bilgilerinizi güncelledikten sonra "Onay Durumu" tabından "Onaya Gönder"meyi
|
||||
unutmayınız.
|
||||
</div>
|
||||
</template>
|
||||
<div class="form-inner-comment waiting-d" v-if="usersStore.selectedUserApproveId === 1">
|
||||
Üyelik Başvurusu işleme alınmıştır.
|
||||
</div>
|
||||
<div class="form-inner-comment waiting-d" v-if="usersStore.selectedUserApproveId === 2">
|
||||
Üyelik Başvurusu inceleme aşamasındadır.
|
||||
</div>
|
||||
<template v-if="usersStore.selectedUserApproveId === 3">
|
||||
<div class="form-inner-comment waiting-d">
|
||||
'Üyelik başvurusu için düzenleme beklenmektedir.'
|
||||
</div>
|
||||
<div class="form-inner-comment alert-d" v-if="!usersStore.isPanelUser">
|
||||
Bilgilerinizi güncelledikten sonra "Onay Durumu" tabından "Onaya Gönder"meyi
|
||||
unutmayınız.
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<div class="form-inner-comment success-d" v-if="usersStore.selectedUserApproveId === 4">
|
||||
Üye Başvurusu onaylanmıştır.
|
||||
{{
|
||||
usersStore.isAraciFirma
|
||||
? ' Piyango oluşturabilir ve Yetkili Olduğunuz Kişi/Kurum Ekleyebilirsiniz.'
|
||||
: !usersStore.isPanelUser
|
||||
? 'Piyango oluşturabilirsiniz'
|
||||
: ''
|
||||
}}
|
||||
</div>
|
||||
<div class="form-inner-comment alert-d" v-if="usersStore.selectedUserApproveId === 5">
|
||||
Üyelik başvurusu reddedilmiştir.
|
||||
</div>
|
||||
<div class="form-inner-comment waiting-d" v-if="usersStore.selectedUserApproveId === 6">
|
||||
Üyelik başvurusunun incelenmesi bekleniyor.
|
||||
</div>
|
||||
<div class="form-inner-comment waiting-d" v-if="usersStore.selectedUserApproveId === 7">
|
||||
{{
|
||||
usersStore.isPanelUser
|
||||
? 'Üye bilgilerinde değişiklik yapma talebinde bulunmuştur.'
|
||||
: 'Değişiklik yapma telebinizin değerlendirilmesi bekleniyor.'
|
||||
}}
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { useUsersStore } from '@/stores/usersStore'
|
||||
const usersStore = useUsersStore()
|
||||
</script>
|
||||
219
src/module/uyeler/components/display/FormUyeBilgileriDisplay.vue
Normal file
219
src/module/uyeler/components/display/FormUyeBilgileriDisplay.vue
Normal file
@ -0,0 +1,219 @@
|
||||
<template>
|
||||
<div :class="['form-part', formChanged ? 'changed' : '']">
|
||||
<div class="form-part-title">
|
||||
<h4>Üye Bilgileri</h4>
|
||||
<div class="form-part-title-buttons" v-if="!isPreview">
|
||||
<button @click="SendChangeRequest" v-if="usersStore.selectedUserApproveId === 4 && !usersStore.isPanelUser">
|
||||
Değişiklik Talebi Gönder
|
||||
</button>
|
||||
<button @click="OpenPreviewPanel" v-if="loaded">Önizleme</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-part-content form-part-display" v-if="loaded">
|
||||
<user-approve-states v-if="!isPreview" />
|
||||
|
||||
<div class="form-item back-grad back-grad-grey">{{ formData.basvuruTipi }}</div>
|
||||
<form-display half v-model="formData.email" label="E-posta adresi" />
|
||||
<form-display half v-model="formData.telefonNumarasi" label="Telefon Numarası" />
|
||||
|
||||
<template v-if="formData.basvuruTipId === 18">
|
||||
<form-display half v-model="formData.gercekAdi" label="Ad" />
|
||||
<form-display half v-model="formData.gercekSoyadi" label="Soyadı" />
|
||||
<form-display half v-model="formData.gercekTCKN" label="TCKN" />
|
||||
<form-display half v-model="formData.gercekVergiDairesi" label="Vergi Dairesi" />
|
||||
<form-display half v-model="formData.gercekVergiNo" label="Vergi No" />
|
||||
<form-display
|
||||
half
|
||||
v-model="formData.gercekOdaKayitNo"
|
||||
label="Oda Kayıt No/ Ticaret Sicil No" />
|
||||
<form-display half v-model="formData.gercekTicariUnvan" label="Ticari Ünvan" />
|
||||
</template>
|
||||
|
||||
<template v-if="formData.basvuruTipId === 21">
|
||||
<form-display v-model="formData.tuzelUnvan" label="Ünvan" />
|
||||
<form-display half v-model="formData.tuzelVergiDairesi" label="Vergi Dairesi" />
|
||||
<form-display half v-model="formData.tuzelVergiNo" label="Vergi No" />
|
||||
<form-display half v-model="formData.tuzelSicilNo" label="Sicil No" />
|
||||
<div class="form-item form-item-half"></div>
|
||||
</template>
|
||||
|
||||
<template v-if="formData.basvuruTipId === 22">
|
||||
<form-display v-model="formData.dernekUnvan" label="Ünvan" />
|
||||
<form-display half v-model="formData.dernekVergiDairesi" label="Vergi Dairesi" />
|
||||
<form-display half v-model="formData.dernekVergiNo" label="Vergi No" />
|
||||
<form-display half v-model="formData.dernekSicilNo" label="Sicil No" />
|
||||
<div class="form-item form-item-half"></div>
|
||||
</template>
|
||||
|
||||
<template v-if="formData.basvuruTipId === 23">
|
||||
<form-display v-model="formData.sirketUnvan" label="Ünvan" />
|
||||
<form-display half v-model="formData.sirketVergiDairesi" label="Vergi Dairesi" />
|
||||
<form-display half v-model="formData.sirketVergiNo" label="Vergi No" />
|
||||
<form-display half v-model="formData.sirketSicilNo" label="Sicil No" />
|
||||
<form-display half v-model="formData.sirketMersis" label="Mersis No" />
|
||||
</template>
|
||||
|
||||
<template v-if="formData.basvuruTipId === 26">
|
||||
<form-display v-model="formData.kamuUnvan" label="Ünvan" />
|
||||
<form-display half v-model="formData.kamuVergiDairesi" label="Vergi Dairesi" />
|
||||
<form-display half v-model="formData.kamuVergiNo" label="Vergi No" />
|
||||
<form-display half v-model="formData.kamuSicilNo" label="Sicil No" />
|
||||
<div class="form-item form-item-half"></div>
|
||||
</template>
|
||||
|
||||
<form-display label="İl" half v-model="formData.il" />
|
||||
<form-display label="İlçe" half v-model="formData.ilce" />
|
||||
<form-display label="Mahalle" half v-model="formData.mahalle" />
|
||||
<form-display half v-model="formData.postaKodu" label="Posta Kodu" />
|
||||
<form-display v-model="formData.internetSitesi" label="İnternet Sitesi" />
|
||||
<form-display v-model="formData.adres" label="Adres" />
|
||||
</div>
|
||||
</div>
|
||||
<panel-wrapper
|
||||
wide
|
||||
v-if="previewPanel"
|
||||
v-model="previewPanel"
|
||||
panel-title="Üye Bilgileri Önizleme">
|
||||
<template #panelContent>
|
||||
<panel-uye-onizleme v-model:id="previewId" />
|
||||
</template>
|
||||
<template #footerButton>
|
||||
<div class="button-c button-save" @click="DownloadPDF">PDF İndir</div>
|
||||
<div class="button-c button-save" @click="PrintContent">Yazdır</div>
|
||||
</template>
|
||||
</panel-wrapper>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive, onBeforeMount, computed } from 'vue'
|
||||
import { usePDF } from 'vue3-pdfmake'
|
||||
|
||||
import PanelUyeOnizleme from '../panel/PanelUyeOnizleme.vue'
|
||||
import PanelWrapper from '@/components/PanelWrapper.vue'
|
||||
import UserApproveStates from '../content/UserApproveStates.vue'
|
||||
|
||||
import { useRoute } from 'vue-router'
|
||||
const route = useRoute()
|
||||
import { useDataStore } from '@/stores/dataStore'
|
||||
const dataStore = useDataStore()
|
||||
import { useGlobalStore } from '@/stores/globalStore'
|
||||
const globalStore = useGlobalStore()
|
||||
import { usePreviewStore } from '@/stores/previewStore'
|
||||
const previewStore = usePreviewStore()
|
||||
import { useUsersStore } from '@/stores/usersStore'
|
||||
const usersStore = useUsersStore()
|
||||
import { useCustomerStore } from '../../stores/customerStore'
|
||||
const customerStore = useCustomerStore()
|
||||
|
||||
export interface Props {
|
||||
isPreview?: boolean
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), { isPreview: false })
|
||||
|
||||
const loaded = ref<boolean>(false)
|
||||
const formChanged = ref<boolean>(false)
|
||||
const previewPanel = ref<boolean>(false)
|
||||
const previewId = ref<number>(0)
|
||||
const changeRequestForm = reactive<Record<string, any>>({
|
||||
onayDurumuIslemTipiId: 7,
|
||||
aciklama: '',
|
||||
file: ''
|
||||
})
|
||||
|
||||
const UyeId = (): string => {
|
||||
if (route.name === 'Profil') {
|
||||
return String(usersStore.userId)
|
||||
} else {
|
||||
if (route.name === 'UyeYetkiliDetay') return String(route.params.altUyeId)
|
||||
else return String(route.params.uyeId)
|
||||
}
|
||||
}
|
||||
|
||||
const formData = reactive<Record<string, any>>({
|
||||
basvuruTipi: '',
|
||||
gercekAdi: '',
|
||||
gercekSoyadi: '',
|
||||
gercekTCKN: '',
|
||||
gercekTicariUnvan: '',
|
||||
tuzelUnvan: '',
|
||||
tuzelVergiDairesi: '',
|
||||
tuzelVergiNo: '',
|
||||
tuzelSicilNo: '',
|
||||
dernekUnvan: '',
|
||||
dernekVergiDairesi: '',
|
||||
dernekVergiNo: '',
|
||||
dernekSicilNo: '',
|
||||
sirketUnvan: '',
|
||||
sirketVergiDairesi: '',
|
||||
sirketVergiNo: '',
|
||||
sirketSicilNo: '',
|
||||
sirketMersis: '',
|
||||
kamuUnvan: '',
|
||||
kamuVergiDairesi: '',
|
||||
kamuVergiNo: '',
|
||||
kamuSicilNo: '',
|
||||
email: '',
|
||||
telefonNumarasi: '',
|
||||
ilId: '',
|
||||
ilceId: '',
|
||||
mahalleId: '',
|
||||
postaKodu: '',
|
||||
adres: '',
|
||||
internetSitesi: '',
|
||||
islemTipi: null,
|
||||
aciklama: '',
|
||||
parentUserId: null
|
||||
})
|
||||
|
||||
const GetData = async () => {
|
||||
let data: Record<string, any> | any = await dataStore.dataGet(
|
||||
'Auth/userbyuserid/' + UyeId()
|
||||
)
|
||||
if (data !== 'errorfalse') {
|
||||
Object.assign(formData, data)
|
||||
usersStore.userMail = data.email
|
||||
globalStore.selCustomerType = formData.basvuruTipId
|
||||
loaded.value = true
|
||||
}
|
||||
}
|
||||
|
||||
const SendChangeRequest = async () => {
|
||||
let form: any
|
||||
let dataForm = new FormData()
|
||||
dataForm.append('onayDurumuIslemTipiId', changeRequestForm.onayDurumuIslemTipiId)
|
||||
dataForm.append('appUserId', String(usersStore.selectedUserId()))
|
||||
dataForm.append('onaylayanKisiId', String(usersStore.userId))
|
||||
dataForm.append('file', changeRequestForm.file)
|
||||
dataForm.append('aciklama', changeRequestForm.aciklama)
|
||||
form = await dataStore.dataPost('AppUserOnayDurum/', {
|
||||
data: dataForm,
|
||||
headers: { 'Content-Type': 'multipart/form-data' },
|
||||
toast: { toast: 'Değişiklik başvuruişleminiz başarıyla iletildi.', type: 'success' }
|
||||
})
|
||||
|
||||
if (form !== 'errorfalse') {
|
||||
if (route.name === 'UyeDetay')
|
||||
usersStore.userApproveId = changeRequestForm.onayDurumuIslemTipiId
|
||||
else usersStore.userSubApproveId = changeRequestForm.onayDurumuIslemTipiId
|
||||
}
|
||||
}
|
||||
const OpenPreviewPanel = () => {
|
||||
previewPanel.value = true
|
||||
}
|
||||
|
||||
const pdfmake = usePDF()
|
||||
const DownloadPDF = async () => {
|
||||
var pdfData: string = document.querySelector('.pdf-content')?.outerHTML || ''
|
||||
previewStore.CreatePdfFromHtml(pdfmake, pdfData)
|
||||
}
|
||||
|
||||
const PrintContent = () => {
|
||||
previewStore.PrintContent(previewId.value)
|
||||
}
|
||||
|
||||
onBeforeMount(async () => {
|
||||
await dataStore.GetCustomerTipList()
|
||||
await dataStore.GetIlList()
|
||||
await GetData()
|
||||
})
|
||||
</script>
|
||||
@ -0,0 +1,38 @@
|
||||
<template>
|
||||
<div class="form-part">
|
||||
<div class="form-part-title">
|
||||
<h4>İrtibat Kurulacak Kişi</h4>
|
||||
<div class="form-part-title-buttons"></div>
|
||||
</div>
|
||||
<div class="form-part-content" v-if="customerIrtibatStore.loaded">
|
||||
<form-display
|
||||
half
|
||||
v-model="customerIrtibatStore.customerIrtibatForm.firstName"
|
||||
label="Adı" />
|
||||
<form-display
|
||||
half
|
||||
v-model="customerIrtibatStore.customerIrtibatForm.lastName"
|
||||
label="Soyadı" />
|
||||
<form-display
|
||||
half
|
||||
v-model="customerIrtibatStore.customerIrtibatForm.phone"
|
||||
label="Telefon Numarası" />
|
||||
<form-display
|
||||
half
|
||||
v-model="customerIrtibatStore.customerIrtibatForm.email"
|
||||
label="E-posta adresi" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { onBeforeMount } from 'vue'
|
||||
|
||||
import { useCustomerIrtibatStore } from '../../stores/customerIrtibatStore'
|
||||
const customerIrtibatStore = useCustomerIrtibatStore()
|
||||
import { useCustomerIrtibatService } from '../../service/customerIrtibatService'
|
||||
const customerIrtibatService = useCustomerIrtibatService()
|
||||
|
||||
onBeforeMount(async () => {
|
||||
await customerIrtibatService.GetIrtibat()
|
||||
})
|
||||
</script>
|
||||
@ -0,0 +1,63 @@
|
||||
<template>
|
||||
<div
|
||||
class="form-inner-comment waiting-d"
|
||||
v-if="customerIrtibatStore.totalIrtibat === 0 && !isPreview">
|
||||
<template v-if="usersStore.isPanelUser">
|
||||
En az 1 irtibat kişisi eklenmiş olmalıdır.
|
||||
</template>
|
||||
<template v-else>En az 1 adet irtabita kurulacak kişi eklemelisiniz.</template>
|
||||
</div>
|
||||
<list-table-content
|
||||
:tableHeader="tableHeader"
|
||||
addAction=""
|
||||
v-model:totalRecord="customerIrtibatStore.totalIrtibat"
|
||||
formTitle="İrtibat Kurulacak Kişiler"
|
||||
:apiList="
|
||||
'AppUserContactPerson/GetContactPersonAppUserId/' + usersStore.selectedUserId()
|
||||
"
|
||||
apiText="İrtibat Kurulacak Kişi Listesi"
|
||||
page="form"
|
||||
:isPreview="isPreview" />
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, onBeforeMount } from 'vue'
|
||||
|
||||
import { useUsersStore } from '@/stores/usersStore'
|
||||
const usersStore = useUsersStore()
|
||||
import { useCustomerIrtibatStore } from '../../stores/customerIrtibatStore'
|
||||
const customerIrtibatStore = useCustomerIrtibatStore()
|
||||
|
||||
export interface Props {
|
||||
isPreview?: boolean
|
||||
}
|
||||
const props = withDefaults(defineProps<Props>(), { isPreview: false })
|
||||
|
||||
const tableHeader = ref<Record<string, any>>([
|
||||
{
|
||||
name: 'firstName',
|
||||
title: 'Adı',
|
||||
sort: props.isPreview ? false : true,
|
||||
style: { width: '25%' }
|
||||
},
|
||||
{
|
||||
name: 'lastName',
|
||||
title: 'Soyadı',
|
||||
sort: props.isPreview ? false : true,
|
||||
style: { width: '25%' }
|
||||
},
|
||||
{
|
||||
name: 'email',
|
||||
title: 'E-posta',
|
||||
sort: props.isPreview ? false : true,
|
||||
style: { width: '25%' }
|
||||
},
|
||||
{
|
||||
name: 'phone',
|
||||
title: 'Telefon Numarası',
|
||||
sort: props.isPreview ? false : true
|
||||
}
|
||||
])
|
||||
onBeforeMount(() => {
|
||||
usersStore.SetSelectedUser()
|
||||
})
|
||||
</script>
|
||||
282
src/module/uyeler/components/display/UyeOnizlemeDisplay.vue
Normal file
282
src/module/uyeler/components/display/UyeOnizlemeDisplay.vue
Normal file
@ -0,0 +1,282 @@
|
||||
<template>
|
||||
<strong
|
||||
style="
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
font-size: 14pt;
|
||||
margin-bottom: 12px;
|
||||
text-align: center;
|
||||
">
|
||||
ÜYE FORMU
|
||||
</strong>
|
||||
<br />
|
||||
<br />
|
||||
<table
|
||||
cellspacing="0"
|
||||
class="table-no-line"
|
||||
data-pdfmake="{'widths': [ '50%', '50%'],'layout':'pdfTableLayoutNoLine'}">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<strong style="font-size: 10pt; margin-bottom: 12px">Üye Bilgileri</strong>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<table
|
||||
v-if="loaded"
|
||||
cellspacing="0"
|
||||
data-pdfmake="{'widths': [ '50%', '50%'],'layout':'pdfTableLayout'}"
|
||||
style="margin-bottom: 12px; font-size: 10pt">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<strong>Üye Tipi:</strong>
|
||||
{{ customerStore.customerForm.basvuruTipi }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<strong>E-posta adresi:</strong>
|
||||
{{ customerStore.customerForm.email }}
|
||||
</td>
|
||||
<td>
|
||||
<strong>Telefon Numarası:</strong>
|
||||
{{ customerStore.customerForm.telefonNumarasi }}
|
||||
</td>
|
||||
</tr>
|
||||
<template v-if="customerStore.customerForm.basvuruTipId === 18">
|
||||
<tr>
|
||||
<td>
|
||||
<strong>Adı:</strong>
|
||||
{{ customerStore.customerForm.gercekAdi }}
|
||||
</td>
|
||||
<td>
|
||||
<strong>Soyadı:</strong>
|
||||
{{ customerStore.customerForm.gercekSoyadi }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<strong>TCKN:</strong>
|
||||
{{ customerStore.customerForm.gercekTCKN }}
|
||||
</td>
|
||||
<td>
|
||||
<strong>Vergi Dairesi:</strong>
|
||||
{{ customerStore.customerForm.gercekVergiDairesi }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<strong>Vergi No:</strong>
|
||||
{{ customerStore.customerForm.gercekVergiNo }}
|
||||
</td>
|
||||
<td>
|
||||
<strong>Oda Kayıt No/ Ticaret Sicil No:</strong>
|
||||
{{ customerStore.customerForm.gercekOdaKayitNo }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<strong>Ticari Ünvan:</strong>
|
||||
{{ customerStore.customerForm.gercekTicariUnvan }}
|
||||
</td>
|
||||
</tr>
|
||||
</template>
|
||||
<template v-if="customerStore.customerForm.basvuruTipId === 21">
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<strong>Ünvan:</strong>
|
||||
{{ customerStore.customerForm.tuzelUnvan }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<strong>Vergi Dairesi:</strong>
|
||||
{{ customerStore.customerForm.tuzelVergiDairesi }}
|
||||
</td>
|
||||
<td>
|
||||
<strong>Vergi No:</strong>
|
||||
{{ customerStore.customerForm.tuzelVergiNo }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<strong>Sicil No:</strong>
|
||||
{{ customerStore.customerForm.tuzelSicilNo }}
|
||||
</td>
|
||||
</tr>
|
||||
</template>
|
||||
<template v-if="customerStore.customerForm.basvuruTipId === 22">
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<strong>Ünvan:</strong>
|
||||
{{ customerStore.customerForm.dernekUnvan }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<strong>Vergi Dairesi:</strong>
|
||||
{{ customerStore.customerForm.dernekVergiDairesi }}
|
||||
</td>
|
||||
<td>
|
||||
<strong>Vergi No:</strong>
|
||||
{{ customerStore.customerForm.dernekVergiNo }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<strong>Sicil No:</strong>
|
||||
{{ customerStore.customerForm.dernekSicilNo }}
|
||||
</td>
|
||||
</tr>
|
||||
</template>
|
||||
<template v-if="customerStore.customerForm.basvuruTipId === 23">
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<strong>Ünvan:</strong>
|
||||
{{ customerStore.customerForm.sirketUnvan }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<strong>Vergi Dairesi:</strong>
|
||||
{{ customerStore.customerForm.sirketVergiDairesi }}
|
||||
</td>
|
||||
<td>
|
||||
<strong>Vergi No:</strong>
|
||||
{{ customerStore.customerForm.sirketVergiNo }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<strong>Sicil No:</strong>
|
||||
{{ customerStore.customerForm.sirketSicilNo }}
|
||||
</td>
|
||||
<td>
|
||||
<strong>Mersis No:</strong>
|
||||
{{ customerStore.customerForm.sirketMersis }}
|
||||
</td>
|
||||
</tr>
|
||||
</template>
|
||||
<template v-if="customerStore.customerForm.basvuruTipId === 26">
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<strong>Ünvan:</strong>
|
||||
{{ customerStore.customerForm.kamuUnvan }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<strong>Vergi Dairesi:</strong>
|
||||
{{ customerStore.customerForm.kamuVergiDairesi }}
|
||||
</td>
|
||||
<td>
|
||||
<strong>Vergi No:</strong>
|
||||
{{ customerStore.customerForm.kamuVergiNo }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<strong>Sicil No:</strong>
|
||||
{{ customerStore.customerForm.kamuSicilNo }}
|
||||
</td>
|
||||
</tr>
|
||||
</template>
|
||||
<tr>
|
||||
<td>
|
||||
<strong>İl:</strong>
|
||||
{{ customerStore.customerForm.il }}
|
||||
</td>
|
||||
<td>
|
||||
<strong>İlçe:</strong>
|
||||
{{ customerStore.customerForm.ilce }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<strong>Mahalle:</strong>
|
||||
{{ customerStore.customerForm.mahalle }}
|
||||
</td>
|
||||
<td>
|
||||
<strong>Posta Kodu:</strong>
|
||||
{{ customerStore.customerForm.postaKodu }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<strong>İnternet Sitesi:</strong>
|
||||
{{ customerStore.customerForm.internetSitesi }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<strong>Adres:</strong>
|
||||
{{ customerStore.customerForm.adres }}
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<table
|
||||
cellspacing="0"
|
||||
class="table-no-line"
|
||||
data-pdfmake="{'widths': [ '50%', '50%'],'layout':'pdfTableLayoutNoLine'}">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<strong style="font-size: 10pt; margin-bottom: 12px">
|
||||
Üye İrtibat Bilgileri
|
||||
</strong>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<table
|
||||
v-if="loaded"
|
||||
cellspacing="0"
|
||||
data-pdfmake="{'widths': [ '50%', '50%'],'layout':'pdfTableLayout'}"
|
||||
style="margin-bottom: 12px; font-size: 10pt">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<strong>Adı:</strong>
|
||||
{{ customerIrtibatStore.customerIrtibatForm.firstName }}
|
||||
</td>
|
||||
<td>
|
||||
<strong>Soyadı:</strong>
|
||||
{{ customerIrtibatStore.customerIrtibatForm.lastName }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<strong>E-Posta:</strong>
|
||||
{{ customerIrtibatStore.customerIrtibatForm.email }}
|
||||
</td>
|
||||
<td>
|
||||
<strong>Telefon:</strong>
|
||||
{{ customerIrtibatStore.customerIrtibatForm.phone }}
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
import { onBeforeMount } from 'vue'
|
||||
import { useCustomerStore } from '../../stores/customerStore'
|
||||
const customerStore = useCustomerStore()
|
||||
import { useCustomerService } from '../../service/customerService'
|
||||
const customerService = useCustomerService()
|
||||
import { useCustomerIrtibatStore } from '../../stores/customerIrtibatStore'
|
||||
const customerIrtibatStore = useCustomerIrtibatStore()
|
||||
import { useCustomerIrtibatService } from '../../service/customerIrtibatService'
|
||||
const customerIrtibatService = useCustomerIrtibatService()
|
||||
|
||||
const loaded = ref<boolean>(false)
|
||||
|
||||
onBeforeMount(async () => {
|
||||
await customerService.GetCustomerData()
|
||||
await customerIrtibatService.GetIrtibat()
|
||||
loaded.value = true
|
||||
})
|
||||
</script>
|
||||
561
src/module/uyeler/components/form/FormUyeBilgileri.vue
Normal file
561
src/module/uyeler/components/form/FormUyeBilgileri.vue
Normal file
@ -0,0 +1,561 @@
|
||||
<template>
|
||||
<div class="form-part form-title" v-if="isNew">
|
||||
<div class="form-title-buttons">
|
||||
<div class="button-c button-save" @click="SaveData">Kaydet</div>
|
||||
<router-link class="button-c button-cancel" to="/profil">Vazgeç</router-link>
|
||||
</div>
|
||||
</div>
|
||||
<div :class="['form-part', uyeBilgileriStore.formChanged ? 'changed' : '']">
|
||||
<div class="form-part-title">
|
||||
<h4>Üye Bilgileri</h4>
|
||||
<div class="form-part-title-buttons">
|
||||
<button
|
||||
@click="OpenPreviewPanel"
|
||||
v-if="
|
||||
(route.name === 'Profil' && !usersStore.isPanelUser) ||
|
||||
route.name === 'UyeYetkiliDetay' && loaded
|
||||
">
|
||||
Önizleme
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-part-content" v-if="loaded">
|
||||
<user-approve-states v-if="!isPreview && route.name !== 'UyeYetkiliYeni'" />
|
||||
|
||||
<form-select
|
||||
v-if="route.name === 'UyeYetkiliYeni'"
|
||||
label="Kullanıcı Tipi"
|
||||
:listData="yetkiliTipList"
|
||||
listText="baslik"
|
||||
listVal="id"
|
||||
v-model="uyeBilgileriStore.formData.basvuruTipId"
|
||||
required
|
||||
:invalidText="uyeBilgileriStore.invalidTexts.basvuruTipId"
|
||||
@change="uyeBilgileriStore.ChangeKullaniciTipi" />
|
||||
|
||||
<div class="form-item back-grad back-grad-grey" v-else>
|
||||
{{ uyeBilgileriStore.formData.basvuruTipi }}
|
||||
</div>
|
||||
|
||||
<form-input
|
||||
type="email"
|
||||
half
|
||||
modelKey="email"
|
||||
v-model="uyeBilgileriStore.formData.email"
|
||||
required
|
||||
label="E-posta adresi"
|
||||
placeholder="eposta@alanadi.com"
|
||||
:invalidText="uyeBilgileriStore.invalidTexts.email" />
|
||||
|
||||
<form-input
|
||||
type="tel"
|
||||
half
|
||||
modelKey="telefonNumarasi"
|
||||
v-model="uyeBilgileriStore.formData.telefonNumarasi"
|
||||
required
|
||||
label="Telefon Numarası"
|
||||
placeholder="5554443322"
|
||||
@keydown="validationStore.allowNumbersWithKeys"
|
||||
@keyup="OnKeyup"
|
||||
maxlength="10"
|
||||
minlength="10"
|
||||
:invalidText="uyeBilgileriStore.invalidTexts.telefonNumarasi" />
|
||||
|
||||
<template v-if="uyeBilgileriStore.formData.basvuruTipId === 18">
|
||||
<form-input
|
||||
modelKey="gercekAdi"
|
||||
half
|
||||
v-model="uyeBilgileriStore.formData.gercekAdi"
|
||||
required
|
||||
label="Ad"
|
||||
minlength="2"
|
||||
:invalidText="uyeBilgileriStore.invalidTexts.gercekAdi"
|
||||
@keydown="validationStore.allowLettersWithKeysExtra($event, /^[ ]*$/)"
|
||||
@keyup="OnKeyup" />
|
||||
|
||||
<form-input
|
||||
modelKey="gercekSoyadi"
|
||||
half
|
||||
v-model="uyeBilgileriStore.formData.gercekSoyadi"
|
||||
required
|
||||
label="Soyadı"
|
||||
minlength="2"
|
||||
:invalidText="uyeBilgileriStore.invalidTexts.gercekSoyadi"
|
||||
@keydown="validationStore.allowLettersWithKeysExtra($event, /^[ ]*$/)"
|
||||
@keyup="OnKeyup" />
|
||||
|
||||
<form-input
|
||||
modelKey="gercekTCKN"
|
||||
half
|
||||
v-model="uyeBilgileriStore.formData.gercekTCKN"
|
||||
required
|
||||
label="TCKN"
|
||||
@keydown="validationStore.allowNumbersWithKeys"
|
||||
@keyup="OnKeyup"
|
||||
maxlength="11"
|
||||
minlength="11"
|
||||
:invalidText="uyeBilgileriStore.invalidTexts.gercekTCKN" />
|
||||
|
||||
<form-input
|
||||
modelKey="gercekVergiDairesi"
|
||||
v-model="uyeBilgileriStore.formData.gercekVergiDairesi"
|
||||
required
|
||||
half
|
||||
label="Vergi Dairesi"
|
||||
:invalidText="uyeBilgileriStore.invalidTexts.gercekVergiDairesi" />
|
||||
|
||||
<form-input
|
||||
modelKey="gercekVergiNo"
|
||||
half
|
||||
v-model="uyeBilgileriStore.formData.gercekVergiNo"
|
||||
required
|
||||
label="Vergi No"
|
||||
maxlength="11"
|
||||
minlength="11"
|
||||
:invalidText="uyeBilgileriStore.invalidTexts.gercekVergiNo"
|
||||
@keydown="validationStore.allowNumbersWithKeys"
|
||||
@keyup="OnKeyup" />
|
||||
|
||||
<form-input
|
||||
modelKey="gercekOdaKayitNo"
|
||||
half
|
||||
v-model="uyeBilgileriStore.formData.gercekOdaKayitNo"
|
||||
required
|
||||
label="Oda Kayıt No/ Ticaret Sicil No"
|
||||
:invalidText="uyeBilgileriStore.invalidTexts.gercekOdaKayitNo"
|
||||
@keydown="validationStore.allowNumbersWithKeys"
|
||||
@keyup="OnKeyup" />
|
||||
|
||||
<form-input
|
||||
modelKey="gercekTicariUnvan"
|
||||
half
|
||||
v-model="uyeBilgileriStore.formData.gercekTicariUnvan"
|
||||
label="Ticari Ünvan"
|
||||
:invalidText="uyeBilgileriStore.invalidTexts.gercekTicariUnvan"
|
||||
@keyup="OnKeyup" />
|
||||
</template>
|
||||
|
||||
<template v-if="uyeBilgileriStore.formData.basvuruTipId === 21">
|
||||
<form-input
|
||||
modelKey="tuzelUnvan"
|
||||
v-model="uyeBilgileriStore.formData.tuzelUnvan"
|
||||
required
|
||||
label="Ünvan"
|
||||
:invalidText="uyeBilgileriStore.invalidTexts.tuzelUnvan"
|
||||
@keyup="OnKeyup" />
|
||||
<form-input
|
||||
modelKey="tuzelVergiDairesi"
|
||||
half
|
||||
v-model="uyeBilgileriStore.formData.tuzelVergiDairesi"
|
||||
required
|
||||
label="Vergi Dairesi"
|
||||
:invalidText="uyeBilgileriStore.invalidTexts.tuzelVergiDairesi"
|
||||
@keyup="OnKeyup" />
|
||||
|
||||
<form-input
|
||||
modelKey="tuzelVergiNo"
|
||||
half
|
||||
v-model="uyeBilgileriStore.formData.tuzelVergiNo"
|
||||
required
|
||||
label="Vergi No"
|
||||
maxlength="11"
|
||||
minlength="10"
|
||||
:invalidText="uyeBilgileriStore.invalidTexts.tuzelVergiNo"
|
||||
@keydown="validationStore.allowNumbersWithKeys"
|
||||
@keyup="OnKeyup" />
|
||||
|
||||
<form-input
|
||||
modelKey="tuzelSicilNo"
|
||||
half
|
||||
v-model="uyeBilgileriStore.formData.tuzelSicilNo"
|
||||
required
|
||||
label="Ticaret Sicil No"
|
||||
:invalidText="uyeBilgileriStore.invalidTexts.tuzelSicilNo"
|
||||
@keydown="validationStore.allowNumbersWithKeysExtra($event, /^[-]*$/)"
|
||||
@keyup="OnKeyup" />
|
||||
<div class="form-item form-item-half"></div>
|
||||
</template>
|
||||
<template v-if="uyeBilgileriStore.formData.basvuruTipId === 22">
|
||||
<form-input
|
||||
modelKey="dernekUnvan"
|
||||
v-model="uyeBilgileriStore.formData.dernekUnvan"
|
||||
required
|
||||
label="Ünvan"
|
||||
:invalidText="uyeBilgileriStore.invalidTexts.dernekUnvan"
|
||||
@keyup="OnKeyup" />
|
||||
<form-input
|
||||
modelKey="dernekVergiDairesi"
|
||||
half
|
||||
v-model="uyeBilgileriStore.formData.dernekVergiDairesi"
|
||||
required
|
||||
label="Vergi Dairesi"
|
||||
:invalidText="uyeBilgileriStore.invalidTexts.dernekVergiDairesi"
|
||||
@keyup="OnKeyup" />
|
||||
|
||||
<form-input
|
||||
modelKey="dernekVergiNo"
|
||||
half
|
||||
v-model="uyeBilgileriStore.formData.dernekVergiNo"
|
||||
required
|
||||
label="Vergi No"
|
||||
maxlength="11"
|
||||
minlength="10"
|
||||
:invalidText="uyeBilgileriStore.invalidTexts.dernekVergiNo"
|
||||
@keydown="validationStore.allowNumbersWithKeys"
|
||||
@keyup="OnKeyup" />
|
||||
|
||||
<form-input
|
||||
modelKey="dernekSicilNo"
|
||||
half
|
||||
v-model="uyeBilgileriStore.formData.dernekSicilNo"
|
||||
required
|
||||
label="Sicil No"
|
||||
:invalidText="uyeBilgileriStore.invalidTexts.dernekSicilNo"
|
||||
@keydown="validationStore.allowNumbersWithKeysExtra($event, /^[-]*$/)"
|
||||
@keyup="OnKeyup" />
|
||||
<div class="form-item form-item-half"></div>
|
||||
</template>
|
||||
<template v-if="uyeBilgileriStore.formData.basvuruTipId === 23">
|
||||
<form-input
|
||||
modelKey="sirketUnvan"
|
||||
v-model="uyeBilgileriStore.formData.sirketUnvan"
|
||||
required
|
||||
label="Ünvan"
|
||||
:invalidText="uyeBilgileriStore.invalidTexts.sirketUnvan"
|
||||
@keyup="OnKeyup" />
|
||||
<form-input
|
||||
modelKey="sirketVergiDairesi"
|
||||
half
|
||||
v-model="uyeBilgileriStore.formData.sirketVergiDairesi"
|
||||
required
|
||||
label="Vergi Dairesi"
|
||||
:invalidText="uyeBilgileriStore.invalidTexts.sirketVergiDairesi"
|
||||
@keyup="OnKeyup" />
|
||||
|
||||
<form-input
|
||||
modelKey="sirketVergiNo"
|
||||
half
|
||||
v-model="uyeBilgileriStore.formData.sirketVergiNo"
|
||||
required
|
||||
label="Vergi No"
|
||||
maxlength="11"
|
||||
minlength="10"
|
||||
:invalidText="uyeBilgileriStore.invalidTexts.sirketVergiNo"
|
||||
@keydown="validationStore.allowNumbersWithKeys"
|
||||
@keyup="OnKeyup" />
|
||||
|
||||
<form-input
|
||||
modelKey="sirketSicilNo"
|
||||
half
|
||||
v-model="uyeBilgileriStore.formData.sirketSicilNo"
|
||||
required
|
||||
label="Ticaret Sicil No"
|
||||
:invalidText="uyeBilgileriStore.invalidTexts.sirketSicilNo"
|
||||
@keydown="validationStore.allowNumbersWithKeysExtra($event, /^[-]*$/)"
|
||||
@keyup="OnKeyup" />
|
||||
|
||||
<form-input
|
||||
modelKey="sirketMersis"
|
||||
half
|
||||
v-model="uyeBilgileriStore.formData.sirketMersis"
|
||||
label="Mersis No"
|
||||
:invalidText="uyeBilgileriStore.invalidTexts.sirketMersis"
|
||||
@keydown="validationStore.allowNumbersWithKeysExtra($event, /^[-]*$/)"
|
||||
@keyup="OnKeyup" />
|
||||
</template>
|
||||
|
||||
<template v-if="uyeBilgileriStore.formData.basvuruTipId === 26">
|
||||
<form-input
|
||||
modelKey="kamuUnvan"
|
||||
v-model="uyeBilgileriStore.formData.kamuUnvan"
|
||||
required
|
||||
label="Ünvan"
|
||||
:invalidText="uyeBilgileriStore.invalidTexts.kamuUnvan"
|
||||
@keyup="OnKeyup" />
|
||||
<form-input
|
||||
modelKey="kamuVergiDairesi"
|
||||
half
|
||||
v-model="uyeBilgileriStore.formData.kamuVergiDairesi"
|
||||
required
|
||||
label="Vergi Dairesi"
|
||||
:invalidText="uyeBilgileriStore.invalidTexts.kamuVergiDairesi"
|
||||
@keyup="OnKeyup" />
|
||||
|
||||
<form-input
|
||||
modelKey="kamuVergiNo"
|
||||
half
|
||||
v-model="uyeBilgileriStore.formData.kamuVergiNo"
|
||||
required
|
||||
label="Vergi No"
|
||||
maxlength="11"
|
||||
minlength="10"
|
||||
:invalidText="uyeBilgileriStore.invalidTexts.kamuVergiNo"
|
||||
@keydown="validationStore.allowNumbersWithKeys"
|
||||
@keyup="OnKeyup" />
|
||||
|
||||
<form-input
|
||||
modelKey="kamuSicilNo"
|
||||
half
|
||||
v-model="uyeBilgileriStore.formData.kamuSicilNo"
|
||||
label="Ticaret Sicil No"
|
||||
:invalidText="uyeBilgileriStore.invalidTexts.kamuSicilNo"
|
||||
@keydown="validationStore.allowNumbersWithKeysExtra($event, /^[-]*$/)"
|
||||
@keyup="OnKeyup" />
|
||||
<div class="form-item form-item-half"></div>
|
||||
</template>
|
||||
|
||||
<form-select
|
||||
label="İl"
|
||||
half
|
||||
:listData="globalDataStore.ilList"
|
||||
listText="ad"
|
||||
listVal="id"
|
||||
v-model="uyeBilgileriStore.formData.ilId"
|
||||
required
|
||||
:invalidText="uyeBilgileriStore.invalidTexts.ilId"
|
||||
@change="ChangeIl" />
|
||||
<form-select
|
||||
label="İlçe"
|
||||
half
|
||||
:listData="uyeBilgileriStore.ilceList"
|
||||
listText="ad"
|
||||
listVal="id"
|
||||
v-model="uyeBilgileriStore.formData.ilceId"
|
||||
required
|
||||
:invalidText="uyeBilgileriStore.invalidTexts.ilceId"
|
||||
@change="ChangeIlce"
|
||||
:disabled="ilceDisabled" />
|
||||
<form-select
|
||||
label="Mahalle"
|
||||
half
|
||||
:listData="uyeBilgileriStore.mahalleList"
|
||||
listText="ad"
|
||||
listVal="id"
|
||||
v-model="uyeBilgileriStore.formData.mahalleId"
|
||||
@keyup="OnKeyup"
|
||||
required
|
||||
:invalidText="uyeBilgileriStore.invalidTexts.mahalleId"
|
||||
:disabled="mahalleDisabled" />
|
||||
<form-input
|
||||
modelKey="postaKodu"
|
||||
half
|
||||
v-model="uyeBilgileriStore.formData.postaKodu"
|
||||
label="Posta Kodu"
|
||||
:invalidText="uyeBilgileriStore.invalidTexts.postaKodu"
|
||||
maxlength="5"
|
||||
minlength="5"
|
||||
@keydown="validationStore.allowNumbersWithKeys"
|
||||
@keyup="OnKeyup" />
|
||||
<form-input
|
||||
modelKey="internetSitesi"
|
||||
v-model="uyeBilgileriStore.formData.internetSitesi"
|
||||
label="İnternet Sitesi"
|
||||
:invalidText="uyeBilgileriStore.invalidTexts.internetSitesi"
|
||||
minlength="6"
|
||||
@keyup="OnKeyup" />
|
||||
<form-textarea
|
||||
modelKey="adres"
|
||||
v-model="uyeBilgileriStore.formData.adres"
|
||||
required
|
||||
label="Adres"
|
||||
minlength="4"
|
||||
:invalidText="uyeBilgileriStore.invalidTexts.adres"
|
||||
@keyup="OnKeyup" />
|
||||
<div class="form-item" v-if="uyeBilgileriStore.formChanged && !isNew">
|
||||
<button class="button-c button-save" @click="SaveData">Kaydet</button>
|
||||
<button class="button-c button-cancel" @click="CancelSave">Vazgeç</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-part form-title" v-if="isNew">
|
||||
<div class="form-title-buttons">
|
||||
<div class="button-c button-save" @click="SaveData">Kaydet</div>
|
||||
<router-link class="button-c button-cancel" to="/profil">Vazgeç</router-link>
|
||||
</div>
|
||||
</div>
|
||||
<panel-wrapper
|
||||
wide
|
||||
v-if="previewPanel"
|
||||
v-model="previewPanel"
|
||||
panel-title="Üye Bilgileri Önizleme">
|
||||
<template #panelContent>
|
||||
<panel-uye-onizleme />
|
||||
<panel-uye-onizleme shadow v-model:id="previewId" />
|
||||
</template>
|
||||
<template #footerButton>
|
||||
<div class="button-c button-save" @click="DownloadPDF">PDF İndir</div>
|
||||
<div class="button-c button-save" @click="PrintContent">Yazdır</div>
|
||||
</template>
|
||||
</panel-wrapper>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, onBeforeMount, computed, watch } from 'vue'
|
||||
import { usePDF } from 'vue3-pdfmake'
|
||||
|
||||
import PanelUyeOnizleme from '../panel/PanelUyeOnizleme.vue'
|
||||
import PanelWrapper from '@/components/PanelWrapper.vue'
|
||||
import UserApproveStates from '../content/UserApproveStates.vue'
|
||||
|
||||
export interface Props {
|
||||
isPreview?: boolean
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), { isPreview: false })
|
||||
|
||||
import { useUyeBilgileriStore } from '../../stores/UyeBilgileriStore'
|
||||
const uyeBilgileriStore = useUyeBilgileriStore()
|
||||
uyeBilgileriStore.ResetStore()
|
||||
|
||||
import { useRoute } from 'vue-router'
|
||||
const route = useRoute()
|
||||
import { useDataStore } from '@/stores/dataStore'
|
||||
const dataStore = useDataStore()
|
||||
import { useUsersStore } from '@/stores/usersStore'
|
||||
const usersStore = useUsersStore()
|
||||
import { useGlobalStore } from '@/stores/globalStore'
|
||||
const globalStore = useGlobalStore()
|
||||
import { useGlobalDataStore } from '@/stores/globalDataStore'
|
||||
const globalDataStore = useGlobalDataStore()
|
||||
import { useValidationStore } from '@/stores/validationStore'
|
||||
const validationStore = useValidationStore()
|
||||
import { usePreviewStore } from '@/stores/previewStore'
|
||||
const previewStore = usePreviewStore()
|
||||
import router from '@/router'
|
||||
|
||||
const loaded = ref<boolean>(false)
|
||||
const isNew = ref<boolean>(false)
|
||||
const previewPanel = ref<boolean>(false)
|
||||
const previewId = ref<number>(0)
|
||||
const yetkiliTipList = ref<Record<string, any>[]>([])
|
||||
|
||||
const SetYetkiliTipList = () => {
|
||||
Object.assign(yetkiliTipList.value, globalDataStore.customerTips)
|
||||
|
||||
let araciInd = yetkiliTipList.value.findIndex((p) => p.id === 23)
|
||||
yetkiliTipList.value.splice(araciInd, 1)
|
||||
}
|
||||
|
||||
const ilceDisabled = computed<boolean>(() => {
|
||||
return (
|
||||
uyeBilgileriStore.ilceList.length === 0 &&
|
||||
(uyeBilgileriStore.formData.ilceId === null ||
|
||||
uyeBilgileriStore.formData.ilceId === 0)
|
||||
)
|
||||
})
|
||||
const mahalleDisabled = computed<boolean>(() => {
|
||||
return uyeBilgileriStore.mahalleList.length === 0
|
||||
})
|
||||
|
||||
const OnKeyup = () => {
|
||||
uyeBilgileriStore.formChanged = true
|
||||
}
|
||||
const ChangeIl = (e: Event, v: string | number, d: Record<string, any>) => {
|
||||
uyeBilgileriStore.formData.ilceId = ''
|
||||
uyeBilgileriStore.ilceList = d.ilceler
|
||||
uyeBilgileriStore.formChanged = true
|
||||
}
|
||||
const ChangeIlce = (e: Event, v: string | number, d: Record<string, any>) => {
|
||||
uyeBilgileriStore.formData.mahalleId = ''
|
||||
uyeBilgileriStore.mahalleList = d.mahalleler
|
||||
uyeBilgileriStore.formChanged = true
|
||||
}
|
||||
|
||||
const SaveData = async () => {
|
||||
if (uyeBilgileriStore.FormCheck()) {
|
||||
uyeBilgileriStore.ResetFormItems()
|
||||
uyeBilgileriStore.formData.basvuruTipi = uyeBilgileriStore.formData.basvuruTipId
|
||||
var register: any = {}
|
||||
|
||||
if (isNew.value) {
|
||||
uyeBilgileriStore.formData.parentUserId = usersStore.userId
|
||||
|
||||
register = await dataStore.dataPost('Auth/register', {
|
||||
data: uyeBilgileriStore.formData
|
||||
})
|
||||
} else {
|
||||
register = await dataStore.dataPut(
|
||||
'Auth/Guncelleme/' + usersStore.selectedUserId(),
|
||||
{
|
||||
data: uyeBilgileriStore.formData
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
if (register !== 'errorfalse') {
|
||||
if (isNew.value) {
|
||||
usersStore.userSubApproveId = 0
|
||||
router.push(
|
||||
'/uyeler/detay/' +
|
||||
route.params.uyeId +
|
||||
'/yetkili-uye/detay/' +
|
||||
register.user.id
|
||||
)
|
||||
isNew.value = false
|
||||
}else{
|
||||
GetData()
|
||||
}
|
||||
uyeBilgileriStore.formChanged = false
|
||||
loaded.value = false
|
||||
}
|
||||
} else {
|
||||
uyeBilgileriStore.isFormValid = true
|
||||
}
|
||||
}
|
||||
|
||||
const CancelSave = () => {
|
||||
uyeBilgileriStore.RestoreForm()
|
||||
}
|
||||
|
||||
const GetData = async () => {
|
||||
let data: Record<string, any> | any = await dataStore.dataGet(
|
||||
'Auth/userbyuserid/' + usersStore.selectedUserId()
|
||||
)
|
||||
if (data !== 'errorfalse') {
|
||||
Object.assign(uyeBilgileriStore.formData, data)
|
||||
globalStore.selCustomerType = uyeBilgileriStore.formData.basvuruTipId
|
||||
usersStore.userMail = data.email
|
||||
uyeBilgileriStore.SetIlIlce()
|
||||
uyeBilgileriStore.SetbasvuruTip()
|
||||
|
||||
Object.assign(uyeBilgileriStore.safeData, uyeBilgileriStore.formData)
|
||||
loaded.value = true
|
||||
}
|
||||
}
|
||||
|
||||
const OpenPreviewPanel = () => {
|
||||
previewPanel.value = true
|
||||
}
|
||||
|
||||
const pdfmake = usePDF()
|
||||
const DownloadPDF = async () => {
|
||||
var pdfData: string = document.querySelector('.pdf-content')?.outerHTML || ''
|
||||
previewStore.CreatePdfFromHtml(pdfmake, pdfData)
|
||||
}
|
||||
const PrintContent = () => {
|
||||
previewStore.PrintContent(previewId.value)
|
||||
}
|
||||
onBeforeMount(async () => {
|
||||
if (route.name === 'UyeYetkiliYeni') isNew.value = true
|
||||
await dataStore.GetCustomerTipList()
|
||||
await dataStore.GetIlList()
|
||||
SetYetkiliTipList()
|
||||
if (!isNew.value) {
|
||||
await GetData()
|
||||
} else {
|
||||
uyeBilgileriStore.ResetStore()
|
||||
loaded.value = true
|
||||
}
|
||||
})
|
||||
|
||||
watch(
|
||||
() => route,
|
||||
(to) => {
|
||||
if(to.name === 'UyeYetkiliDetay'){
|
||||
GetData()
|
||||
}
|
||||
},
|
||||
{
|
||||
deep: true
|
||||
}
|
||||
)
|
||||
</script>
|
||||
114
src/module/uyeler/components/form/FormUyeDocuments.vue
Normal file
114
src/module/uyeler/components/form/FormUyeDocuments.vue
Normal file
@ -0,0 +1,114 @@
|
||||
<template>
|
||||
<div class="form-part">
|
||||
<div class="form-part-title">
|
||||
<h4>Gerekli Dokümanlar</h4>
|
||||
<div class="form-part-title-buttons">
|
||||
<icon-button
|
||||
v-if="
|
||||
!usersStore.isPanelUser &&
|
||||
(usersStore.selectedUserApproveId === 0 ||
|
||||
usersStore.selectedUserApproveId === 3)
|
||||
"
|
||||
icon="plus"
|
||||
class="ico-section ico-section-header-btn"
|
||||
@click="NewDocument" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-part-content" v-if="customerDocumentStore.loaded">
|
||||
<template v-if="customerDocumentStore.customerDocumentsList.length > 0">
|
||||
<div class="form-inner-comment waiting-d" v-if="customerDocumentStore.customerDocumentsList.length < 3">
|
||||
En az
|
||||
<strong>Ticaret Sicil Gazetesi, Vergi Levhası, İmza Sirküleri</strong>
|
||||
sisteme yüklenmiş olmalıdır.
|
||||
</div>
|
||||
<template v-for="(file, i) in customerDocumentStore.customerDocumentsList">
|
||||
<file-list-item
|
||||
:data="file"
|
||||
@click="EditDocument"
|
||||
:filePath="file.filePath"
|
||||
:editable="usersStore.selectedUserApproveId === 3 || usersStore.selectedUserApproveId === 0"
|
||||
title="title" />
|
||||
</template>
|
||||
</template>
|
||||
<template v-else>
|
||||
<template v-if="!usersStore.isPanelUser && usersStore.selectedUserApproveId !== 5">
|
||||
<div class="form-inner-comment">
|
||||
<span>
|
||||
Eklenmiş dosya bulunamadı. Üstteki butonu kullanarak dosya ekleyebilirsiniz.
|
||||
</span>
|
||||
<div class="form-inner-comment waiting-d">
|
||||
Üyelik kaydının incelenebilmesi için öncelikle
|
||||
<strong>Ticaret Sicil Gazetesi, Vergi Levhası, İmza Sirküleri</strong>
|
||||
sisteme yüklenmiş olmalıdır.
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<template v-else>
|
||||
<div class="form-inner-comment waiting-d">
|
||||
<template v-if="customerDocumentStore.customerDocumentsList.length === 0">
|
||||
Eklenmiş dosya bulunamadı. En az
|
||||
<strong>Ticaret Sicil Gazetesi, Vergi Levhası, İmza Sirküleri</strong>
|
||||
sisteme yüklenmiş olmalıdır.
|
||||
</template>
|
||||
<template
|
||||
v-if="
|
||||
customerDocumentStore.customerDocumentsList.length > 0 &&
|
||||
customerDocumentStore.customerDocumentsList.length < 3
|
||||
">
|
||||
En az
|
||||
<strong>Ticaret Sicil Gazetesi, Vergi Levhası, İmza Sirküleri</strong>
|
||||
sisteme yüklenmiş olmalıdır.
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
<panel-wrapper
|
||||
v-if="customerDocumentStore.documentPanel"
|
||||
v-model="customerDocumentStore.documentPanel"
|
||||
:panel-title="customerDocumentStore.isUpdate ? 'Dokümanı Düzenle' : 'Doküman Ekle'">
|
||||
<template #panelContent>
|
||||
<panel-user-document />
|
||||
</template>
|
||||
<template #footerButton>
|
||||
<div class="button-c button-save" @click="customerDocumentService.SaveDocument">
|
||||
{{ customerDocumentStore.isUpdate ? 'Kaydet' : 'Ekle' }}
|
||||
</div>
|
||||
</template>
|
||||
</panel-wrapper>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, onBeforeMount } from 'vue'
|
||||
|
||||
import PanelUserDocument from '../panel/PanelUserDocument.vue'
|
||||
import PanelWrapper from '@/components/PanelWrapper.vue'
|
||||
|
||||
import { useDataStore } from '@/stores/dataStore'
|
||||
const dataStore = useDataStore()
|
||||
import { useUsersStore } from '@/stores/usersStore'
|
||||
const usersStore = useUsersStore()
|
||||
|
||||
import { useCustomerDocumentStore } from '../../stores/customerDocumentStore'
|
||||
const customerDocumentStore = useCustomerDocumentStore()
|
||||
import { useCustomerDocumentService } from '../../service/customerDocumentService'
|
||||
const customerDocumentService = useCustomerDocumentService()
|
||||
|
||||
const NewDocument = () => {
|
||||
customerDocumentStore.ResetForm()
|
||||
customerDocumentStore.isUpdate = false
|
||||
customerDocumentStore.documentPanel = true
|
||||
}
|
||||
|
||||
const EditDocument = (d: object) => {
|
||||
Object.assign(customerDocumentStore.customerDocumentForm, d)
|
||||
customerDocumentStore.isUpdate = true
|
||||
customerDocumentStore.documentPanel = true
|
||||
}
|
||||
|
||||
onBeforeMount(async () => {
|
||||
usersStore.SetSelectedUser()
|
||||
|
||||
await customerDocumentService.GetDocumentList()
|
||||
})
|
||||
</script>
|
||||
92
src/module/uyeler/components/form/FormUyeIrtibatKisi.vue
Normal file
92
src/module/uyeler/components/form/FormUyeIrtibatKisi.vue
Normal file
@ -0,0 +1,92 @@
|
||||
<template>
|
||||
<div
|
||||
:class="['form-part', customerIrtibatValidationStore.formChanged ? 'changed' : '']">
|
||||
<div class="form-part-title">
|
||||
<h4>İrtibat Kurulacak Kişi</h4>
|
||||
<div class="form-part-title-buttons"></div>
|
||||
</div>
|
||||
<div class="form-part-content" v-if="customerIrtibatStore.loaded">
|
||||
<form-input
|
||||
modelKey="firstName"
|
||||
v-model="customerIrtibatStore.customerIrtibatForm.firstName"
|
||||
required
|
||||
half
|
||||
label="Ad"
|
||||
minlength="2"
|
||||
@keyup="FormChanged"
|
||||
:invalidText="customerIrtibatValidationStore.invalidTexts.firstName"
|
||||
@keydown="validationStore.allowLettersWithKeysExtra($event, /^[ ]*$/)" />
|
||||
|
||||
<form-input
|
||||
modelKey="lastName"
|
||||
v-model="customerIrtibatStore.customerIrtibatForm.lastName"
|
||||
required
|
||||
half
|
||||
label="Soyadı"
|
||||
minlength="2"
|
||||
:invalidText="customerIrtibatValidationStore.invalidTexts.lastName"
|
||||
@keyup="FormChanged"
|
||||
@keydown="validationStore.allowLettersWithKeysExtra($event, /^[ ]*$/)" />
|
||||
|
||||
<form-input
|
||||
type="email"
|
||||
modelKey="email"
|
||||
v-model="customerIrtibatStore.customerIrtibatForm.email"
|
||||
required
|
||||
half
|
||||
label="E-posta adresi"
|
||||
placeholder="eposta@alanadi.com"
|
||||
:invalidText="customerIrtibatValidationStore.invalidTexts.email"
|
||||
@keyup="FormChanged" />
|
||||
|
||||
<form-input
|
||||
type="tel"
|
||||
modelKey="phone"
|
||||
v-model="customerIrtibatStore.customerIrtibatForm.phone"
|
||||
required
|
||||
half
|
||||
label="Telefon Numarası"
|
||||
placeholder="5554443322"
|
||||
@keyup="FormChanged"
|
||||
@keydown="validationStore.allowNumbersWithKeys"
|
||||
maxlength="10"
|
||||
minlength="10"
|
||||
:invalidText="customerIrtibatValidationStore.invalidTexts.phone" />
|
||||
<div
|
||||
class="form-item"
|
||||
v-if="customerIrtibatStore.isNew || customerIrtibatValidationStore.formChanged">
|
||||
<button class="button-c button-save" @click="customerIrtibatService.SaveIrtibat">
|
||||
Kaydet
|
||||
</button>
|
||||
<button
|
||||
class="button-c button-cancel"
|
||||
@click="customerIrtibatStore.CancelSave"
|
||||
v-if="
|
||||
!customerIrtibatStore.isNew && customerIrtibatValidationStore.formChanged
|
||||
">
|
||||
Vazgeç
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { onBeforeMount } from 'vue'
|
||||
|
||||
import { useValidationStore } from '@/stores/validationStore'
|
||||
const validationStore = useValidationStore()
|
||||
import { useCustomerIrtibatStore } from '../../stores/customerIrtibatStore'
|
||||
const customerIrtibatStore = useCustomerIrtibatStore()
|
||||
import { useCustomerIrtibatValidationStore } from '../../validation/customerIrtibatValidationStore'
|
||||
const customerIrtibatValidationStore = useCustomerIrtibatValidationStore()
|
||||
import { useCustomerIrtibatService } from '../../service/customerIrtibatService'
|
||||
const customerIrtibatService = useCustomerIrtibatService()
|
||||
|
||||
const FormChanged = () => {
|
||||
customerIrtibatValidationStore.formChanged = true
|
||||
}
|
||||
|
||||
onBeforeMount(async () => {
|
||||
await customerIrtibatService.GetIrtibat()
|
||||
})
|
||||
</script>
|
||||
110
src/module/uyeler/components/form/FormUyeIrtibatKisileri.vue
Normal file
110
src/module/uyeler/components/form/FormUyeIrtibatKisileri.vue
Normal file
@ -0,0 +1,110 @@
|
||||
<template>
|
||||
<div
|
||||
class="form-inner-comment waiting-d"
|
||||
v-if="customerIrtibatStore.totalIrtibat === 0">
|
||||
<template v-if="usersStore.isPanelUser">
|
||||
En az 1 irtibat kişisi eklenmiş olmalıdır.
|
||||
</template>
|
||||
<template v-else>En az 1 adet irtabita kurulacak kişi eklemelisiniz.</template>
|
||||
</div>
|
||||
<list-table-content
|
||||
:tableHeader="tableHeader"
|
||||
:rowAction="EditIrtibat"
|
||||
:addAction="AddActionFunction()"
|
||||
formTitle="İrtibat Kurulacak Kişiler"
|
||||
v-model:totalRecord="customerIrtibatStore.totalIrtibat"
|
||||
listText="İrtibat Kurulacak Kişi"
|
||||
:apiList="
|
||||
'AppUserContactPerson/GetContactPersonAppUserId/' + usersStore.selectedUserId()
|
||||
"
|
||||
apiText="İrtibat Kurulacak Kişi Listesi"
|
||||
page="form"
|
||||
v-model:refresh="customerIrtibatStore.refreshList" />
|
||||
<panel-wrapper
|
||||
v-if="customerIrtibatStore.irtibatPanel"
|
||||
v-model="customerIrtibatStore.irtibatPanel"
|
||||
:panel-title="
|
||||
customerIrtibatStore.isUpdate ? 'İrtibat Kişisini Düzenle' : 'İrtibat Kişisi Ekle'
|
||||
">
|
||||
<template #panelContent>
|
||||
<panel-user-contact />
|
||||
</template>
|
||||
<template #footerButton>
|
||||
<div class="button-c button-save" @click="customerIrtibatService.SaveIrtibat">
|
||||
{{ customerIrtibatStore.isUpdate ? 'Kaydet' : 'Ekle' }}
|
||||
</div>
|
||||
</template>
|
||||
</panel-wrapper>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
|
||||
import PanelWrapper from '@/components/PanelWrapper.vue'
|
||||
import PanelUserContact from '../panel/PanelUserContact.vue'
|
||||
|
||||
import { useDataStore } from '@/stores/dataStore'
|
||||
const dataStore = useDataStore()
|
||||
import { useUsersStore } from '@/stores/usersStore'
|
||||
const usersStore = useUsersStore()
|
||||
import { useValidationStore } from '@/stores/validationStore'
|
||||
const validationStore = useValidationStore()
|
||||
|
||||
import { useCustomerIrtibatStore } from '../../stores/customerIrtibatStore'
|
||||
const customerIrtibatStore = useCustomerIrtibatStore()
|
||||
import { useCustomerIrtibatService } from '../../service/customerIrtibatService'
|
||||
const customerIrtibatService = useCustomerIrtibatService()
|
||||
|
||||
const dataPenel = ref<boolean>(false)
|
||||
const isUpdate = ref<boolean>(false)
|
||||
const refreshList = ref<boolean>(false)
|
||||
const totalRecords = ref<number | string>(0)
|
||||
|
||||
const tableHeader = ref<Record<string, any>>([
|
||||
{
|
||||
name: 'firstName',
|
||||
title: 'Adı',
|
||||
sort: true,
|
||||
style: { width: '25%' }
|
||||
},
|
||||
{
|
||||
name: 'lastName',
|
||||
title: 'Soyadı',
|
||||
sort: true,
|
||||
style: { width: '25%' }
|
||||
},
|
||||
{
|
||||
name: 'email',
|
||||
title: 'E-posta',
|
||||
sort: true,
|
||||
style: { width: '25%' }
|
||||
},
|
||||
{
|
||||
name: 'phone',
|
||||
title: 'Telefon Numarası',
|
||||
sort: true
|
||||
}
|
||||
])
|
||||
|
||||
const AddActionFunction = (): any => {
|
||||
if (
|
||||
usersStore.isPanelUser ||
|
||||
usersStore.selectedUserApproveId === 5 ||
|
||||
usersStore.selectedUserApproveId === 1 ||
|
||||
usersStore.selectedUserApproveId === 2
|
||||
) {
|
||||
return ''
|
||||
} else {
|
||||
return NewIrtibat as Function
|
||||
}
|
||||
}
|
||||
const NewIrtibat = () => {
|
||||
customerIrtibatStore.ResetForm()
|
||||
customerIrtibatStore.irtibatPanel = true
|
||||
}
|
||||
|
||||
const EditIrtibat = (data: any) => {
|
||||
Object.assign(customerIrtibatStore.customerIrtibatForm, data)
|
||||
customerIrtibatStore.isUpdate = true
|
||||
customerIrtibatStore.irtibatPanel = true
|
||||
}
|
||||
</script>
|
||||
122
src/module/uyeler/components/form/FormUyeOnay.vue
Normal file
122
src/module/uyeler/components/form/FormUyeOnay.vue
Normal file
@ -0,0 +1,122 @@
|
||||
<template>
|
||||
<div class="form-part form-title">
|
||||
<div class="form-title-buttons">
|
||||
<div class="button-c button-save" @click="SaveData">Kaydet</div>
|
||||
</div>
|
||||
</div>
|
||||
<div :class="['form-part', formChanged ? 'changed' : '']">
|
||||
<div class="form-part-title">
|
||||
<h4>Onay Durumu</h4>
|
||||
</div>
|
||||
<div class="form-part-content">
|
||||
<form-select
|
||||
label="İşlem"
|
||||
:listData="onayIslemTipleri"
|
||||
listText="tipAdi"
|
||||
listVal="islemTipiId"
|
||||
v-model="formData.onayDurumuIslemTipiId"
|
||||
required
|
||||
:invalidText="invalidTexts.onayDurumuIslemTipiId" />
|
||||
<form-file
|
||||
v-model="formData.file"
|
||||
elclass="panel-documents-item"
|
||||
:invalidText="invalidTexts.file" />
|
||||
<form-textarea
|
||||
v-model="formData.aciklama"
|
||||
:invalidText="invalidTexts.aciklama"
|
||||
label="Açıklama"
|
||||
@keyup="OnKeyup" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive, onBeforeMount, computed } from 'vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
const route = useRoute()
|
||||
import { useDataStore } from '@/stores/dataStore'
|
||||
const dataStore = useDataStore()
|
||||
import { useGlobalStore } from '@/stores/globalStore'
|
||||
const globalStore = useGlobalStore()
|
||||
import { useUsersStore } from '@/stores/usersStore'
|
||||
const usersStore = useUsersStore()
|
||||
import { useGlobalDataStore } from '@/stores/globalDataStore'
|
||||
const globalDataStore = useGlobalDataStore()
|
||||
import { useValidationStore } from '@/stores/validationStore'
|
||||
const validationStore = useValidationStore()
|
||||
import { useCustomerStore } from '../../stores/customerStore'
|
||||
const customerStore = useCustomerStore()
|
||||
|
||||
const loaded = ref<boolean>(false)
|
||||
const formChanged = ref<boolean>(false)
|
||||
const isFormValid = ref<boolean>(true)
|
||||
|
||||
const invalidTexts = ref<Record<string, any>>({})
|
||||
const onayIslemTipleri = ref<Record<string, any>[]>([])
|
||||
|
||||
const formData = reactive<Record<string, any>>({
|
||||
onayDurumuIslemTipiId: null,
|
||||
aciklama: ''
|
||||
})
|
||||
const OnKeyup = () => {
|
||||
formChanged.value = true
|
||||
}
|
||||
const IsFieldEmpty = (field: string, text: string) => {
|
||||
if (validationStore.checkEmpty(formData[field]) || formData[field] === 0) {
|
||||
invalidTexts.value[field] = text
|
||||
isFormValid.value = false
|
||||
} else {
|
||||
delete invalidTexts.value[field]
|
||||
}
|
||||
}
|
||||
|
||||
const UyeId = () => {
|
||||
if (route.name === 'UyeYetkiliDetay') return route.params.altUyeId
|
||||
else return usersStore.selectedUserId()
|
||||
}
|
||||
|
||||
const FormCheck = (): boolean => {
|
||||
IsFieldEmpty('onayDurumuIslemTipiId', 'İşlem tipi seçmelisiniz.')
|
||||
|
||||
return isFormValid.value
|
||||
}
|
||||
const SaveData = async () => {
|
||||
if (FormCheck()) {
|
||||
let form: any
|
||||
let dataForm = new FormData()
|
||||
dataForm.append('onayDurumuIslemTipiId', formData.onayDurumuIslemTipiId)
|
||||
dataForm.append('appUserId', String(UyeId()))
|
||||
dataForm.append('onaylayanKisiId', String(usersStore.userId))
|
||||
dataForm.append('file', formData.file)
|
||||
dataForm.append('aciklama', formData.aciklama)
|
||||
form = await dataStore.dataPost('AppUserOnayDurum/', {
|
||||
data: dataForm,
|
||||
headers: { 'Content-Type': 'multipart/form-data' },
|
||||
toast: { toast: 'Onay durumu başarıyla kaydedildi', type: 'success' }
|
||||
})
|
||||
|
||||
if (form !== 'errorfalse') {
|
||||
formChanged.value = false
|
||||
loaded.value = false
|
||||
if (route.name === 'UyeDetay')
|
||||
usersStore.userApproveId = formData.onayDurumuIslemTipiId
|
||||
else if (route.name === 'UyeYetkiliDetay')
|
||||
usersStore.userSubApproveId = formData.onayDurumuIslemTipiId
|
||||
Object.assign(formData, {})
|
||||
customerStore.uyeOnayRefresh = true
|
||||
}
|
||||
} else {
|
||||
isFormValid.value = true
|
||||
}
|
||||
}
|
||||
const RemoveIncelemeBekleniyor = () => {
|
||||
const removeAdminIndex: number[] = [6, 7]
|
||||
for (let i: number = 0; i < removeAdminIndex.length; i++) {
|
||||
let ind = onayIslemTipleri.value.findIndex((p) => p.islemTipiId === removeAdminIndex[i])
|
||||
if (ind >= 0) onayIslemTipleri.value.splice(ind, 1)
|
||||
}
|
||||
}
|
||||
onBeforeMount(async () => {
|
||||
onayIslemTipleri.value = await dataStore.dataGet('AppUserOnayDurumuIslemTipi')
|
||||
RemoveIncelemeBekleniyor()
|
||||
})
|
||||
</script>
|
||||
98
src/module/uyeler/components/form/FormUyeOnayLog.vue
Normal file
98
src/module/uyeler/components/form/FormUyeOnayLog.vue
Normal file
@ -0,0 +1,98 @@
|
||||
<template>
|
||||
<list-table-content
|
||||
v-if="loaded"
|
||||
:tableHeader="tableHeader"
|
||||
formTitle="Üye Onay Logları"
|
||||
listText="Kayıt"
|
||||
:apiList="'AppUserOnayDurum/AppUserOnayDurumList/' + userId"
|
||||
apiText="Üye Onay Log Listesi"
|
||||
page="form"
|
||||
:refresh="customerStore.uyeOnayRefresh" />
|
||||
</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 { useUsersStore } from '@/stores/usersStore'
|
||||
const usersStore = useUsersStore()
|
||||
import { useCustomerStore } from '../../stores/customerStore'
|
||||
const customerStore = useCustomerStore()
|
||||
import { useCustomerService } from '../../service/customerService'
|
||||
const customerService = useCustomerService()
|
||||
import { useRoute } from 'vue-router'
|
||||
const route = useRoute()
|
||||
|
||||
const loaded = ref<boolean>(false)
|
||||
|
||||
const userId = ref<string | number>('')
|
||||
|
||||
if (route.name === 'UyeYetkiliDetay') {
|
||||
userId.value = String(route.params.altUyeId)
|
||||
} else {
|
||||
if (usersStore.isPanelUser) userId.value = usersStore.selectedUserId()
|
||||
else userId.value = String(usersStore.userId)
|
||||
}
|
||||
|
||||
const customerOnayIslemTipleri = computed<Record<string, any>[]>(() => {
|
||||
return customerStore.onayIslemTipleri
|
||||
})
|
||||
|
||||
const tableHeader = ref<Record<string, any>[]>([
|
||||
{
|
||||
name: 'tarih',
|
||||
title: 'Tarih',
|
||||
compute: (v: Record<string, any>): string => {
|
||||
return dateStore.dateFormat({ pattern: 'dd-mm-yy', date: v.tarih })
|
||||
},
|
||||
sort: true,
|
||||
filter: {
|
||||
type: 'date',
|
||||
range: true
|
||||
},
|
||||
style:{width:'15%'}
|
||||
},
|
||||
{
|
||||
name: 'kisiAdi',
|
||||
title: 'Kişi',
|
||||
sort: true,
|
||||
style:{width:'20%'}
|
||||
},
|
||||
{
|
||||
name: 'islemTipi',
|
||||
title: 'İşlem',
|
||||
sort: true,
|
||||
filter: {
|
||||
type: 'select',
|
||||
data: customerOnayIslemTipleri,
|
||||
listVal: 'id',
|
||||
listText: 'tipAdi',
|
||||
filterId: 'islemTipId'
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'aciklama',
|
||||
title: 'Açıklama',
|
||||
sort: true,
|
||||
style:{width:'35%'}
|
||||
},
|
||||
{
|
||||
dosyaUrl: 'aciklama',
|
||||
title: 'Dosya',
|
||||
computeHtml: (v: Record<string, any>) => {
|
||||
if (v.dosyaUrl !== null && v.dosyaUrl !== undefined) {
|
||||
return globalStore.TableCellDocument(v.dosyaUrl)
|
||||
}
|
||||
}
|
||||
}
|
||||
])
|
||||
|
||||
onBeforeMount(async () => {
|
||||
await customerService.GetCustomerOnayIslemTipleri()
|
||||
|
||||
loaded.value = true
|
||||
})
|
||||
</script>
|
||||
47
src/module/uyeler/components/form/FormUyeOnayaGonder.vue
Normal file
47
src/module/uyeler/components/form/FormUyeOnayaGonder.vue
Normal file
@ -0,0 +1,47 @@
|
||||
<template>
|
||||
<div class="form-part form-title">
|
||||
<div class="form-title-buttons">
|
||||
<div class="button-c button-save" @click="SendForApprove">Onaya Gönder</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive, onBeforeMount, computed } from 'vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
const route = useRoute()
|
||||
import { useDataStore } from '@/stores/dataStore'
|
||||
const dataStore = useDataStore()
|
||||
import { useGlobalStore } from '@/stores/globalStore'
|
||||
const globalStore = useGlobalStore()
|
||||
import { useUsersStore } from '@/stores/usersStore'
|
||||
const usersStore = useUsersStore()
|
||||
import { useCustomerStore } from '../../stores/customerStore'
|
||||
const customerStore = useCustomerStore()
|
||||
|
||||
const formData = reactive<Record<string, any>>({
|
||||
onayDurumuIslemTipiId: 6,
|
||||
aciklama: '',
|
||||
file: ''
|
||||
})
|
||||
|
||||
const SendForApprove = async () => {
|
||||
let form: any
|
||||
let dataForm = new FormData()
|
||||
dataForm.append('onayDurumuIslemTipiId', formData.onayDurumuIslemTipiId)
|
||||
dataForm.append('appUserId', String(usersStore.selectedUserId()))
|
||||
dataForm.append('onaylayanKisiId', String(usersStore.userId))
|
||||
dataForm.append('file', formData.file)
|
||||
dataForm.append('aciklama', formData.aciklama)
|
||||
form = await dataStore.dataPost('AppUserOnayDurum/', {
|
||||
data: dataForm,
|
||||
headers: { 'Content-Type': 'multipart/form-data' },
|
||||
toast: { toast: 'Onay durumu başarıyla kaydedildi', type: 'success' }
|
||||
})
|
||||
|
||||
if (form !== 'errorfalse') {
|
||||
if (route.name === 'UyeDetay')
|
||||
usersStore.userApproveId = formData.onayDurumuIslemTipiId
|
||||
else usersStore.userSubApproveId = formData.onayDurumuIslemTipiId
|
||||
}
|
||||
}
|
||||
</script>
|
||||
126
src/module/uyeler/components/form/FormUyePicture.vue
Normal file
126
src/module/uyeler/components/form/FormUyePicture.vue
Normal file
@ -0,0 +1,126 @@
|
||||
<template>
|
||||
<div class="form-part">
|
||||
<div class="form-part-title">
|
||||
<h4>Profil Resmi</h4>
|
||||
</div>
|
||||
<div class="form-part-content">
|
||||
<template v-if="file.filePath !== '' && file.filePath !== null">
|
||||
<file-list-item
|
||||
:data="file"
|
||||
@click="ReplaceImage"
|
||||
onlyPreview
|
||||
:filePath="file.filePath" />
|
||||
</template>
|
||||
<template v-else>
|
||||
<template v-if="route.name === 'Profil' || (route.name === 'Profil' && !usersStore.isPanelUser)">
|
||||
<div class="form-item form-item-picture clickable" @click="picturePanel = true">
|
||||
<div class="image-c">
|
||||
<i class="ico-c">
|
||||
<svg>
|
||||
<use href="@/assets/images/icons.svg#plus"></use>
|
||||
</svg>
|
||||
</i>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<template v-else>
|
||||
<div class="form-inner-comment">
|
||||
Eklenmiş resim bulunamadı.
|
||||
</div>
|
||||
</template>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
<panel-wrapper
|
||||
v-if="picturePanel"
|
||||
v-model="picturePanel"
|
||||
panel-title="Profil Resmi Ekle">
|
||||
<template #panelContent>
|
||||
<panel-user-picture />
|
||||
</template>
|
||||
<template #footerButton>
|
||||
<div class="button-c button-save" @click="FileUpload">Ekle</div>
|
||||
</template>
|
||||
</panel-wrapper>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive, onBeforeMount } from 'vue'
|
||||
import PanelUserPicture from '../panel/PanelUserPicture.vue'
|
||||
import PanelWrapper from '@/components/PanelWrapper.vue'
|
||||
|
||||
import { useRoute } from 'vue-router'
|
||||
const route = useRoute()
|
||||
import { useDataStore } from '@/stores/dataStore'
|
||||
const dataStore = useDataStore()
|
||||
import { useGlobalStore } from '@/stores/globalStore'
|
||||
const globalStore = useGlobalStore()
|
||||
import { useValidationStore } from '@/stores/validationStore'
|
||||
const validationStore = useValidationStore()
|
||||
import { useUsersStore } from '@/stores/usersStore'
|
||||
const usersStore = useUsersStore()
|
||||
import { useCustomerStore } from '@/module/uyeler/stores/customerStore'
|
||||
const customerStore = useCustomerStore()
|
||||
|
||||
const picturePanel = ref<boolean>(false)
|
||||
const isUpdate = ref<boolean>(false)
|
||||
|
||||
const file = reactive<Record<string,any>>({
|
||||
title: '',
|
||||
filePath: ''
|
||||
})
|
||||
|
||||
const ReplaceImage = (d: object) => {
|
||||
Object.assign(dataStore.panelData, d)
|
||||
isUpdate.value = true
|
||||
picturePanel.value = true
|
||||
}
|
||||
|
||||
const GetData = async () => {
|
||||
let dt = await dataStore.dataGet('AppUserResim/AppUserId/' + usersStore.selectedUserId())
|
||||
if (dt !== 'errorfalse') {
|
||||
Object.assign(file, dt)
|
||||
if (usersStore.selectedUserId() === usersStore.userId)
|
||||
usersStore.profilePhoto = file.filePath
|
||||
}
|
||||
}
|
||||
|
||||
const FormCheck = (): boolean => {
|
||||
let check: any = true
|
||||
if (dataStore.panelData.file === null) {
|
||||
validationStore.panelInvalidText.file = 'Bir dosya seçmelisiniz'
|
||||
check = false
|
||||
} else delete validationStore.panelInvalidText.file
|
||||
if (check === '') check = true
|
||||
return check
|
||||
}
|
||||
|
||||
const FileUpload = async () => {
|
||||
if (FormCheck()) {
|
||||
const formData = new FormData()
|
||||
formData.append('file', dataStore.panelData.file)
|
||||
formData.append('appUserId', String(usersStore.selectedUserId()))
|
||||
let dt: any
|
||||
|
||||
if (!isUpdate.value) {
|
||||
dt = await dataStore.dataPost('AppUserResim/upload', {
|
||||
data: formData,
|
||||
headers: { 'Content-Type': 'multipart/form-data' }
|
||||
})
|
||||
} else {
|
||||
dt = await dataStore.dataPut('AppUserResim/' + dataStore.panelData.id, {
|
||||
data: formData,
|
||||
headers: { 'Content-Type': 'multipart/form-data' }
|
||||
})
|
||||
}
|
||||
if (dt !== 'errorfalse') {
|
||||
Object.assign(file, {})
|
||||
await GetData()
|
||||
picturePanel.value = false
|
||||
isUpdate.value = false
|
||||
}
|
||||
}
|
||||
}
|
||||
onBeforeMount(async () => {
|
||||
await GetData()
|
||||
})
|
||||
</script>
|
||||
19
src/module/uyeler/components/form/FormUyeTipleri.vue
Normal file
19
src/module/uyeler/components/form/FormUyeTipleri.vue
Normal file
@ -0,0 +1,19 @@
|
||||
<template>
|
||||
<list-table-content
|
||||
:tableHeader="tableHeader"
|
||||
:search="false"
|
||||
icon="customers"
|
||||
listText="Tip"
|
||||
title="Üye Tipleri"
|
||||
apiList="Auth/uyetipilist" />
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
|
||||
const tableHeader = ref<Record<string,any>[]>([
|
||||
{
|
||||
name: 'baslik',
|
||||
title: 'Üye Tipleri'
|
||||
}
|
||||
])
|
||||
</script>
|
||||
48
src/module/uyeler/components/panel/PanelUserContact.vue
Normal file
48
src/module/uyeler/components/panel/PanelUserContact.vue
Normal file
@ -0,0 +1,48 @@
|
||||
<template>
|
||||
<form-input
|
||||
modelKey="firstName"
|
||||
v-model="customerIrtibatStore.customerIrtibatForm.firstName"
|
||||
required
|
||||
label="Ad"
|
||||
minlength="2"
|
||||
:invalidText="customerIrtibatValidationStore.invalidTexts.firstName"
|
||||
@keydown="validationStore.allowLettersWithKeysExtra($event, /^[ ]*$/)" />
|
||||
|
||||
<form-input
|
||||
modelKey="lastName"
|
||||
v-model="customerIrtibatStore.customerIrtibatForm.lastName"
|
||||
required
|
||||
label="Soyadı"
|
||||
minlength="2"
|
||||
:invalidText="customerIrtibatValidationStore.invalidTexts.lastName"
|
||||
@keydown="validationStore.allowLettersWithKeysExtra($event, /^[ ]*$/)" />
|
||||
|
||||
<form-input
|
||||
type="email"
|
||||
modelKey="email"
|
||||
v-model="customerIrtibatStore.customerIrtibatForm.email"
|
||||
required
|
||||
label="E-posta adresi"
|
||||
placeholder="eposta@alanadi.com"
|
||||
:invalidText="customerIrtibatValidationStore.invalidTexts.email" />
|
||||
|
||||
<form-input
|
||||
type="tel"
|
||||
modelKey="phone"
|
||||
v-model="customerIrtibatStore.customerIrtibatForm.phone"
|
||||
required
|
||||
label="Telefon Numarası"
|
||||
placeholder="5554443322"
|
||||
@keydown="validationStore.allowNumbersWithKeys"
|
||||
maxlength="10"
|
||||
minlength="10"
|
||||
:invalidText="customerIrtibatValidationStore.invalidTexts.phone" />
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { useValidationStore } from '@/stores/validationStore'
|
||||
const validationStore = useValidationStore()
|
||||
import { useCustomerIrtibatStore } from '../../stores/customerIrtibatStore'
|
||||
const customerIrtibatStore = useCustomerIrtibatStore()
|
||||
import { useCustomerIrtibatValidationStore } from '../../validation/customerIrtibatValidationStore'
|
||||
const customerIrtibatValidationStore = useCustomerIrtibatValidationStore()
|
||||
</script>
|
||||
21
src/module/uyeler/components/panel/PanelUserDocument.vue
Normal file
21
src/module/uyeler/components/panel/PanelUserDocument.vue
Normal file
@ -0,0 +1,21 @@
|
||||
<template>
|
||||
<form-input
|
||||
v-model="customerDocumentStore.customerDocumentForm.title"
|
||||
label="Dosya Başlığı"
|
||||
modelKey="gercekSoyadi"
|
||||
minlength="2"
|
||||
:invalidText="customerDocumentValidationStore.invalidTexts.title"
|
||||
@keydown="validationStore.allowLettersWithKeysExtra($event, /^[ ]*$/)" />
|
||||
<form-file
|
||||
v-model="customerDocumentStore.customerDocumentForm.file"
|
||||
elclass="panel-documents-item"
|
||||
:invalidText="customerDocumentValidationStore.invalidTexts.file" />
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { useValidationStore } from '@/stores/validationStore'
|
||||
const validationStore = useValidationStore()
|
||||
import { useCustomerDocumentStore } from '../../stores/customerDocumentStore'
|
||||
const customerDocumentStore = useCustomerDocumentStore()
|
||||
import { useCustomerDocumentValidationStore } from '../../validation/customerDocumentValidationStore'
|
||||
const customerDocumentValidationStore = useCustomerDocumentValidationStore()
|
||||
</script>
|
||||
11
src/module/uyeler/components/panel/PanelUserPicture.vue
Normal file
11
src/module/uyeler/components/panel/PanelUserPicture.vue
Normal file
@ -0,0 +1,11 @@
|
||||
<template>
|
||||
<form-file
|
||||
v-model="dataStore.panelData.file"
|
||||
elclass="panel-documents-item"
|
||||
:invalidText="validationStore.panelInvalidText.file"/>
|
||||
</template>
|
||||
<script setup lang="ts">import { useDataStore } from '@/stores/dataStore'
|
||||
const dataStore = useDataStore()
|
||||
import { useValidationStore } from '@/stores/validationStore'
|
||||
const validationStore = useValidationStore()
|
||||
</script>
|
||||
24
src/module/uyeler/components/panel/PanelUyeOnizleme.vue
Normal file
24
src/module/uyeler/components/panel/PanelUyeOnizleme.vue
Normal file
@ -0,0 +1,24 @@
|
||||
<template>
|
||||
<div :class="['preview-content', 'pdf-content']" :id="'pre' + rnd">
|
||||
<uye-onizleme-display />
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted } from 'vue'
|
||||
|
||||
import UyeOnizlemeDisplay from '../display/UyeOnizlemeDisplay.vue'
|
||||
|
||||
export interface Props {
|
||||
id?: number
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {})
|
||||
const emit = defineEmits(['update:id'])
|
||||
|
||||
const rnd = ref<number>(Number(Math.floor(Math.random() * 1000000000)))
|
||||
const localId = ref<number>(rnd.value)
|
||||
|
||||
onMounted(() => {
|
||||
if (props.id !== undefined) emit('update:id', localId.value)
|
||||
})
|
||||
</script>
|
||||
7
src/module/uyeler/routes/index.ts
Normal file
7
src/module/uyeler/routes/index.ts
Normal file
@ -0,0 +1,7 @@
|
||||
import UyeDetay from '@/module/uyeler/routes/uye-detay'
|
||||
import UyeYetkili from '@/module/uyeler/routes/uye-yetkili'
|
||||
import UyeYetkiliYeni from '@/module/uyeler/routes/uye-yetkili-yeni'
|
||||
import UyeListe from '@/module/uyeler/routes/uye-liste'
|
||||
import UyeTipleri from '@/module/uyeler/routes/uye-tipleri'
|
||||
|
||||
export default [UyeDetay,UyeYetkili,UyeYetkiliYeni, UyeListe, UyeTipleri]
|
||||
10
src/module/uyeler/routes/uye-detay.ts
Normal file
10
src/module/uyeler/routes/uye-detay.ts
Normal file
@ -0,0 +1,10 @@
|
||||
import UyeDetay from '../views/UyeDetay.vue'
|
||||
|
||||
export default {
|
||||
path: '/uyeler/detay/:uyeId',
|
||||
name: 'UyeDetay',
|
||||
component: UyeDetay,
|
||||
meta: {
|
||||
authRequired: true
|
||||
}
|
||||
}
|
||||
11
src/module/uyeler/routes/uye-liste.ts
Normal file
11
src/module/uyeler/routes/uye-liste.ts
Normal file
@ -0,0 +1,11 @@
|
||||
|
||||
import Uyeler from "@/module/uyeler/views/UyelerListe.vue";
|
||||
|
||||
export default {
|
||||
path: '/uyeler/uye-liste',
|
||||
name: 'UyeListe',
|
||||
component: Uyeler,
|
||||
meta: {
|
||||
authRequired: true
|
||||
}
|
||||
}
|
||||
10
src/module/uyeler/routes/uye-tipleri.ts
Normal file
10
src/module/uyeler/routes/uye-tipleri.ts
Normal file
@ -0,0 +1,10 @@
|
||||
import UyeTipleri from "@/module/uyeler/views/UyeTipleri.vue";
|
||||
|
||||
export default {
|
||||
path:'/uyeler/uye-tipleri',
|
||||
name:'UyeTipleri',
|
||||
component: UyeTipleri,
|
||||
meta: {
|
||||
authRequired: true
|
||||
}
|
||||
}
|
||||
10
src/module/uyeler/routes/uye-yetkili-yeni.ts
Normal file
10
src/module/uyeler/routes/uye-yetkili-yeni.ts
Normal file
@ -0,0 +1,10 @@
|
||||
import UyeYetkili from '../views/UyeYetkili.vue'
|
||||
|
||||
export default {
|
||||
path: '/uyeler/detay/:uyeId/yetkili-uye/yeni',
|
||||
name: 'UyeYetkiliYeni',
|
||||
component: UyeYetkili,
|
||||
meta: {
|
||||
authRequired: true
|
||||
}
|
||||
}
|
||||
10
src/module/uyeler/routes/uye-yetkili.ts
Normal file
10
src/module/uyeler/routes/uye-yetkili.ts
Normal file
@ -0,0 +1,10 @@
|
||||
import UyeYetkili from '../views/UyeYetkili.vue'
|
||||
|
||||
export default {
|
||||
path: '/uyeler/detay/:uyeId/yetkili-uye/detay/:altUyeId',
|
||||
name: 'UyeYetkiliDetay',
|
||||
component: UyeYetkili,
|
||||
meta: {
|
||||
authRequired: true
|
||||
}
|
||||
}
|
||||
72
src/module/uyeler/service/customerDocumentService.ts
Normal file
72
src/module/uyeler/service/customerDocumentService.ts
Normal file
@ -0,0 +1,72 @@
|
||||
import { defineStore } from 'pinia'
|
||||
import { useDataStore } from '@/stores/dataStore'
|
||||
import { useCustomerDocumentStore } from '../stores/customerDocumentStore'
|
||||
import { useCustomerDocumentValidationStore } from '../validation/customerDocumentValidationStore'
|
||||
import { useUsersStore } from '@/stores/usersStore'
|
||||
|
||||
export const useCustomerDocumentService = defineStore('customerDocumentService', () => {
|
||||
const dataStore = useDataStore()
|
||||
const customerDocumentStore = useCustomerDocumentStore()
|
||||
const customerDocumentValidationStore = useCustomerDocumentValidationStore()
|
||||
const usersStore = useUsersStore()
|
||||
|
||||
const GetDocumentList = async () => {
|
||||
customerDocumentStore.customerDocumentsList.splice(
|
||||
0,
|
||||
customerDocumentStore.customerDocumentsList.length
|
||||
)
|
||||
|
||||
let dt = await dataStore.dataGet(
|
||||
'AppUserDocument/AppUserId/' + usersStore.selectedUserId(),
|
||||
{
|
||||
params: {
|
||||
pageSize: 50
|
||||
}
|
||||
}
|
||||
)
|
||||
if (dt !== 'errorfalse') {
|
||||
customerDocumentStore.customerDocumentsList.splice(
|
||||
0,
|
||||
customerDocumentStore.customerDocumentsList.length,
|
||||
...dt
|
||||
)
|
||||
}
|
||||
setTimeout(() => {
|
||||
customerDocumentStore.loaded = true
|
||||
}, 30)
|
||||
}
|
||||
|
||||
const SaveDocument = async () => {
|
||||
if (customerDocumentValidationStore.FormCheck()) {
|
||||
const formData = new FormData()
|
||||
formData.append('file', customerDocumentStore.customerDocumentForm.file)
|
||||
formData.append('title', customerDocumentStore.customerDocumentForm.title)
|
||||
formData.append('appUserId', String(usersStore.selectedUserId()))
|
||||
let dt: any
|
||||
|
||||
if (!customerDocumentStore.isUpdate) {
|
||||
dt = await dataStore.dataPost('AppUserDocument/upload', {
|
||||
data: formData,
|
||||
headers: { 'Content-Type': 'multipart/form-data' }
|
||||
})
|
||||
} else {
|
||||
dt = await dataStore.dataPut(
|
||||
'AppUserDocument/' + customerDocumentStore.customerDocumentForm.id,
|
||||
{
|
||||
data: formData,
|
||||
headers: { 'Content-Type': 'multipart/form-data' }
|
||||
}
|
||||
)
|
||||
}
|
||||
if (dt !== 'errorfalse') {
|
||||
await GetDocumentList()
|
||||
customerDocumentStore.documentPanel = false
|
||||
customerDocumentStore.isUpdate = false
|
||||
}
|
||||
} else {
|
||||
customerDocumentValidationStore.isFormValid = true
|
||||
}
|
||||
}
|
||||
|
||||
return { GetDocumentList, SaveDocument }
|
||||
})
|
||||
78
src/module/uyeler/service/customerIrtibatService.ts
Normal file
78
src/module/uyeler/service/customerIrtibatService.ts
Normal file
@ -0,0 +1,78 @@
|
||||
import { defineStore } from 'pinia'
|
||||
import { useDataStore } from '@/stores/dataStore'
|
||||
import { useCustomerIrtibatStore } from '../stores/customerIrtibatStore'
|
||||
import { useCustomerIrtibatValidationStore } from '../validation/customerIrtibatValidationStore'
|
||||
import { useUsersStore } from '@/stores/usersStore'
|
||||
|
||||
export const useCustomerIrtibatService = defineStore('customerIrtibatService', () => {
|
||||
const dataStore = useDataStore()
|
||||
const customerIrtibatStore = useCustomerIrtibatStore()
|
||||
const customerIrtibatValidationStore = useCustomerIrtibatValidationStore()
|
||||
const usersStore = useUsersStore()
|
||||
|
||||
const GetAllIrtibatList = async (id?: number | string) => {
|
||||
let userId = id || usersStore.selectedUserId()
|
||||
let data: Record<string, any> | any = await dataStore.dataGet(
|
||||
'AppUserContactPerson/GetContactPersonAppUserId/' + userId + '?pageNumber=0'
|
||||
)
|
||||
|
||||
if (data !== 'errorfalse') {
|
||||
customerIrtibatStore.customerAllIrtibatList = data.data
|
||||
}
|
||||
setTimeout(() => {
|
||||
customerIrtibatStore.loaded = true
|
||||
}, 30)
|
||||
}
|
||||
|
||||
const GetIrtibat = async (id?: number | string) => {
|
||||
customerIrtibatStore.loaded = false
|
||||
let userId = id || usersStore.selectedUserId()
|
||||
let dt = await dataStore.dataGet(
|
||||
'AppUserContactPerson/GetContactPersonAppUserId/' + userId
|
||||
)
|
||||
if (dt !== 'errorfalse') {
|
||||
if (dt.data.length === 0) customerIrtibatStore.isNew = true
|
||||
|
||||
if (customerIrtibatStore.isNew) {
|
||||
customerIrtibatStore.ResetForm()
|
||||
} else {
|
||||
Object.assign(customerIrtibatStore.customerIrtibatForm, dt.data[0])
|
||||
customerIrtibatStore.SetSafeIrtibatData()
|
||||
}
|
||||
}
|
||||
|
||||
setTimeout(() => {
|
||||
customerIrtibatStore.loaded = true
|
||||
}, 30)
|
||||
}
|
||||
|
||||
const SaveIrtibat = async () => {
|
||||
if (customerIrtibatValidationStore.FormCheck()) {
|
||||
var res: any
|
||||
|
||||
if (customerIrtibatStore.isNew) {
|
||||
res = await dataStore.dataPost('AppUserContactPerson', {
|
||||
data: customerIrtibatStore.customerIrtibatForm
|
||||
})
|
||||
} else {
|
||||
res = await dataStore.dataPut(
|
||||
'AppUserContactPerson/' + customerIrtibatStore.customerIrtibatForm.id,
|
||||
{
|
||||
data: customerIrtibatStore.customerIrtibatForm
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
if (res !== 'errorfalse') {
|
||||
customerIrtibatStore.isNew = false
|
||||
customerIrtibatValidationStore.formChanged = false
|
||||
customerIrtibatStore.refreshList = true
|
||||
customerIrtibatStore.irtibatPanel = false
|
||||
}
|
||||
} else {
|
||||
customerIrtibatValidationStore.isFormValid = true
|
||||
}
|
||||
}
|
||||
|
||||
return { GetAllIrtibatList, GetIrtibat, SaveIrtibat }
|
||||
})
|
||||
32
src/module/uyeler/service/customerService.ts
Normal file
32
src/module/uyeler/service/customerService.ts
Normal file
@ -0,0 +1,32 @@
|
||||
import { defineStore } from 'pinia'
|
||||
import { useDataStore } from '@/stores/dataStore'
|
||||
import { useCustomerStore } from '../stores/customerStore'
|
||||
import { useUsersStore } from '@/stores/usersStore'
|
||||
import { useGlobalStore } from '@/stores/globalStore'
|
||||
|
||||
export const useCustomerService = defineStore('customerService', () => {
|
||||
const dataStore = useDataStore()
|
||||
const customerStore = useCustomerStore()
|
||||
const usersStore = useUsersStore()
|
||||
const globalStore = useGlobalStore()
|
||||
|
||||
const GetCustomerOnayIslemTipleri = async () => {
|
||||
if (customerStore.onayIslemTipleri.length === 0) {
|
||||
let data = await dataStore.dataGet('AppUserOnayDurumuIslemTipi')
|
||||
customerStore.onayIslemTipleri = data
|
||||
}
|
||||
}
|
||||
const GetCustomerData = async () => {
|
||||
let data: Record<string, any> | any = await dataStore.dataGet(
|
||||
'Auth/userbyuserid/' + usersStore.selectedUserId()
|
||||
)
|
||||
if (data !== 'errorfalse') {
|
||||
Object.assign(customerStore.customerForm, data)
|
||||
usersStore.userMail = data.email
|
||||
globalStore.selCustomerType = data.basvuruTipId
|
||||
customerStore.loaded = true
|
||||
}
|
||||
}
|
||||
|
||||
return { GetCustomerOnayIslemTipleri, GetCustomerData }
|
||||
})
|
||||
22
src/module/uyeler/service/uyeIrtibatKisiService.ts
Normal file
22
src/module/uyeler/service/uyeIrtibatKisiService.ts
Normal file
@ -0,0 +1,22 @@
|
||||
import { defineStore } from 'pinia'
|
||||
import { useDataStore } from '@/stores/dataStore'
|
||||
import { useUsersStore } from '@/stores/usersStore'
|
||||
import { useUyeIrtibatKisiStore } from '../stores/uyeIrtibatKisiStore'
|
||||
|
||||
export const useUyeIrtibatKisiService = defineStore('uyeIrtibatKisiService', () => {
|
||||
const dataStore = useDataStore()
|
||||
const usersStore = useUsersStore()
|
||||
const uyeIrtibatKisiStore = useUyeIrtibatKisiStore()
|
||||
|
||||
const GetAllIrtibatKisiler = async (id?: number | string) => {
|
||||
let userId = id || usersStore.selectedUserId()
|
||||
let data: Record<string, any> | any = await dataStore.dataGet(
|
||||
'AppUserContactPerson/GetContactPersonAppUserId/' + userId + '?pageNumber=0'
|
||||
)
|
||||
|
||||
if (data !== 'errorfalse') {
|
||||
uyeIrtibatKisiStore.uyeAllIrtibatKisiList = data.data
|
||||
}
|
||||
}
|
||||
return { GetAllIrtibatKisiler }
|
||||
})
|
||||
471
src/module/uyeler/stores/UyeBilgileriStore.ts
Normal file
471
src/module/uyeler/stores/UyeBilgileriStore.ts
Normal file
@ -0,0 +1,471 @@
|
||||
import { defineStore } from 'pinia'
|
||||
import { ref, reactive } from 'vue'
|
||||
import { useValidationStore } from '@/stores/validationStore'
|
||||
import { useGlobalDataStore } from '@/stores/globalDataStore'
|
||||
import { useRoute } from 'vue-router'
|
||||
|
||||
export const useUyeBilgileriStore = defineStore('uyeBilgileriStore', () => {
|
||||
const validationStore = useValidationStore()
|
||||
const globalDataStore = useGlobalDataStore()
|
||||
const route = useRoute()
|
||||
|
||||
const formChanged = ref<boolean>(false)
|
||||
const isFormValid = ref<boolean>(true)
|
||||
const invalidTexts = reactive<Record<string, any>>({})
|
||||
|
||||
const ilceList = ref<Record<string,any>[]>([])
|
||||
const mahalleList = ref<Record<string,any>[]>([])
|
||||
|
||||
const baseCustomerData = reactive<Record<string, any>>({
|
||||
basvuruTipId: null,
|
||||
gercekAdi: '',
|
||||
gercekSoyadi: '',
|
||||
gercekTCKN: '',
|
||||
gercekVergiDairesi: '',
|
||||
gercekVergiNo: '',
|
||||
gercekOdaKayitNo: '',
|
||||
gercekTicariUnvan: '',
|
||||
tuzelUnvan: '',
|
||||
tuzelVergiDairesi: '',
|
||||
tuzelVergiNo: '',
|
||||
tuzelSicilNo: '',
|
||||
dernekUnvan: '',
|
||||
dernekVergiDairesi: '',
|
||||
dernekVergiNo: '',
|
||||
dernekSicilNo: '',
|
||||
sirketUnvan: '',
|
||||
sirketVergiDairesi: '',
|
||||
sirketVergiNo: '',
|
||||
sirketSicilNo: '',
|
||||
sirketMersis: '',
|
||||
kamuUnvan: '',
|
||||
kamuVergiDairesi: '',
|
||||
kamuVergiNo: '',
|
||||
kamuSicilNo: '',
|
||||
email: '',
|
||||
telefonNumarasi: '',
|
||||
kvkk: false,
|
||||
uyelikSozlesmesi: false,
|
||||
ilId: null,
|
||||
ilceId: null,
|
||||
mahalleId: null,
|
||||
postaKodu: '',
|
||||
adres: '',
|
||||
internetSitesi: '',
|
||||
islemTipi: null,
|
||||
aciklama: '',
|
||||
parentUserId: null,
|
||||
password: '',
|
||||
confirmPassword: ''
|
||||
})
|
||||
|
||||
const formData = reactive<Record<string, any>>({})
|
||||
const safeData = reactive<Record<string, any>>({})
|
||||
|
||||
const ResetStore = () => {
|
||||
if (route.meta.authpage as boolean) {
|
||||
baseCustomerData.kvkk = false
|
||||
baseCustomerData.uyelikSozlesmesi = false
|
||||
baseCustomerData.password = ''
|
||||
baseCustomerData.confirmPassword = ''
|
||||
}
|
||||
Object.assign(formData, baseCustomerData)
|
||||
Object.assign(invalidTexts, {})
|
||||
ilceList.value = []
|
||||
mahalleList.value = []
|
||||
formChanged.value = false
|
||||
isFormValid.value = true
|
||||
}
|
||||
|
||||
const ChangeKullaniciTipi = (e: Event, d: string | number) => {
|
||||
/*var gercekData = {
|
||||
gercekAdi: '',
|
||||
gercekSoyadi: '',
|
||||
gercekTCKN: '',
|
||||
gercekVergiDairesi:'',
|
||||
gercekVergiNo:'',
|
||||
gercekTicariUnvan: ''
|
||||
}
|
||||
var tuzelData = {
|
||||
tuzelUnvan: '',
|
||||
tuzelVergiDairesi: '',
|
||||
tuzelVergiNo: '',
|
||||
tuzelSicilNo: ''
|
||||
}
|
||||
var dernekData = {
|
||||
dernekUnvan: '',
|
||||
dernekVergiDairesi: '',
|
||||
dernekVergiNo: '',
|
||||
dernekSicilNo: ''
|
||||
}
|
||||
if (d === 1) {
|
||||
Object.assign(formData, gercekData)
|
||||
} else {
|
||||
Object.keys(gercekData).forEach((key) => {
|
||||
delete formData[key]
|
||||
})
|
||||
}
|
||||
if (d === 2) {
|
||||
Object.assign(formData, tuzelData)
|
||||
} else {
|
||||
Object.keys(tuzelData).forEach((key) => {
|
||||
delete formData[key]
|
||||
})
|
||||
}
|
||||
if (d === 3) {
|
||||
Object.assign(formData, dernekData)
|
||||
} else {
|
||||
Object.keys(dernekData).forEach((key) => {
|
||||
delete formData[key]
|
||||
})
|
||||
}*/
|
||||
formChanged.value = true
|
||||
}
|
||||
|
||||
const ResetFormItems = () => {
|
||||
if (formData.basvuruTipId === 18) {
|
||||
;(formData.tuzelUnvan = ''),
|
||||
(formData.tuzelVergiDairesi = ''),
|
||||
(formData.tuzelVergiNo = ''),
|
||||
(formData.tuzelSicilNo = ''),
|
||||
(formData.dernekUnvan = ''),
|
||||
(formData.dernekVergiDairesi = ''),
|
||||
(formData.dernekVergiNo = ''),
|
||||
(formData.dernekSicilNo = ''),
|
||||
(formData.sirketUnvan = ''),
|
||||
(formData.sirketVergiDairesi = ''),
|
||||
(formData.sirketVergiNo = ''),
|
||||
(formData.sirketSicilNo = ''),
|
||||
(formData.sirketMersis = ''),
|
||||
(formData.kamuUnvan = ''),
|
||||
(formData.kamuVergiDairesi = ''),
|
||||
(formData.kamuVergiNo = ''),
|
||||
(formData.kamuSicilNo = '')
|
||||
} else if (formData.basvuruTipId === 21) {
|
||||
;(formData.gercekAdi = ''),
|
||||
(formData.gercekSoyadi = ''),
|
||||
(formData.gercekTCKN = ''),
|
||||
(formData.gercekVergiDairesi = ''),
|
||||
(formData.gercekVergiNo = ''),
|
||||
(formData.gercekOdaKayitNo = ''),
|
||||
(formData.gercekTicariUnvan = ''),
|
||||
(formData.dernekUnvan = ''),
|
||||
(formData.dernekVergiDairesi = ''),
|
||||
(formData.dernekVergiNo = ''),
|
||||
(formData.dernekSicilNo = ''),
|
||||
(formData.sirketUnvan = ''),
|
||||
(formData.sirketVergiDairesi = ''),
|
||||
(formData.sirketVergiNo = ''),
|
||||
(formData.sirketSicilNo = ''),
|
||||
(formData.sirketMersis = ''),
|
||||
(formData.kamuUnvan = ''),
|
||||
(formData.kamuVergiDairesi = ''),
|
||||
(formData.kamuVergiNo = ''),
|
||||
(formData.kamuSicilNo = '')
|
||||
} else if (formData.basvuruTipId === 22) {
|
||||
;(formData.gercekAdi = ''),
|
||||
(formData.gercekSoyadi = ''),
|
||||
(formData.gercekTCKN = ''),
|
||||
(formData.gercekVergiDairesi = ''),
|
||||
(formData.gercekVergiNo = ''),
|
||||
(formData.gercekOdaKayitNo = ''),
|
||||
(formData.gercekTicariUnvan = ''),
|
||||
(formData.tuzelUnvan = ''),
|
||||
(formData.tuzelVergiDairesi = ''),
|
||||
(formData.tuzelVergiNo = ''),
|
||||
(formData.tuzelSicilNo = ''),
|
||||
(formData.sirketUnvan = ''),
|
||||
(formData.sirketVergiDairesi = ''),
|
||||
(formData.sirketVergiNo = ''),
|
||||
(formData.sirketSicilNo = ''),
|
||||
(formData.sirketMersis = ''),
|
||||
(formData.kamuUnvan = ''),
|
||||
(formData.kamuVergiDairesi = ''),
|
||||
(formData.kamuVergiNo = ''),
|
||||
(formData.kamuSicilNo = '')
|
||||
} else if (formData.basvuruTipId === 23) {
|
||||
;(formData.gercekAdi = ''),
|
||||
(formData.gercekSoyadi = ''),
|
||||
(formData.gercekTCKN = ''),
|
||||
(formData.gercekVergiDairesi = ''),
|
||||
(formData.gercekVergiNo = ''),
|
||||
(formData.gercekOdaKayitNo = ''),
|
||||
(formData.gercekTicariUnvan = ''),
|
||||
(formData.tuzelUnvan = ''),
|
||||
(formData.tuzelVergiDairesi = ''),
|
||||
(formData.tuzelVergiNo = ''),
|
||||
(formData.tuzelSicilNo = ''),
|
||||
(formData.dernekUnvan = ''),
|
||||
(formData.dernekVergiDairesi = ''),
|
||||
(formData.dernekVergiNo = ''),
|
||||
(formData.dernekSicilNo = ''),
|
||||
(formData.kamuUnvan = ''),
|
||||
(formData.kamuVergiDairesi = ''),
|
||||
(formData.kamuVergiNo = ''),
|
||||
(formData.kamuSicilNo = '')
|
||||
} else if (formData.basvuruTipId === 26) {
|
||||
;(formData.gercekAdi = ''),
|
||||
(formData.gercekSoyadi = ''),
|
||||
(formData.gercekTCKN = ''),
|
||||
(formData.gercekVergiDairesi = ''),
|
||||
(formData.gercekVergiNo = ''),
|
||||
(formData.gercekOdaKayitNo = ''),
|
||||
(formData.gercekTicariUnvan = ''),
|
||||
(formData.tuzelUnvan = ''),
|
||||
(formData.tuzelVergiDairesi = ''),
|
||||
(formData.tuzelVergiNo = ''),
|
||||
(formData.tuzelSicilNo = ''),
|
||||
(formData.dernekUnvan = ''),
|
||||
(formData.dernekVergiDairesi = ''),
|
||||
(formData.dernekVergiNo = ''),
|
||||
(formData.dernekSicilNo = ''),
|
||||
(formData.sirketUnvan = ''),
|
||||
(formData.sirketVergiDairesi = ''),
|
||||
(formData.sirketVergiNo = ''),
|
||||
(formData.sirketSicilNo = ''),
|
||||
(formData.sirketMersis = '')
|
||||
}
|
||||
}
|
||||
const SetIlIlce = () => {
|
||||
if (
|
||||
formData.ilceId !== undefined &&
|
||||
formData.ilceId !== null &&
|
||||
formData.ilceId !== ''
|
||||
) {
|
||||
let ilO = globalDataStore.ilList.filter((v: Record<string, any>) => {
|
||||
return v.id === formData.ilId
|
||||
})
|
||||
ilceList.value.splice(0, ilceList.value.length, ...(ilO[0]['ilceler'] as Record<string,any>[]))
|
||||
} else {
|
||||
formData.ilceId = ''
|
||||
}
|
||||
|
||||
if (
|
||||
formData.mahalleId !== undefined &&
|
||||
formData.mahalleId !== null &&
|
||||
formData.mahalleId !== ''
|
||||
) {
|
||||
let mahalleO = ilceList.value.filter((v: Record<string, any>) => {
|
||||
return v.id === formData.ilceId
|
||||
})
|
||||
mahalleList.value.splice(0, mahalleList.value.length, ...mahalleO[0]['mahalleler'])
|
||||
} else {
|
||||
formData.mahalleId = ''
|
||||
}
|
||||
}
|
||||
const SetbasvuruTip = () => {
|
||||
if (
|
||||
formData.basvuruTipId === undefined &&
|
||||
formData.basvuruTipId === null &&
|
||||
formData.basvuruTipId === ''
|
||||
)
|
||||
formData.basvuruTipId = 0
|
||||
}
|
||||
|
||||
const IsFieldEmpty = (field: string, text: string) => {
|
||||
if (validationStore.checkEmpty(formData[field])) {
|
||||
invalidTexts[field] = text
|
||||
isFormValid.value = false
|
||||
} else {
|
||||
delete invalidTexts[field]
|
||||
}
|
||||
}
|
||||
|
||||
const RestoreForm = () => {
|
||||
Object.assign(formData, safeData)
|
||||
formChanged.value = false
|
||||
}
|
||||
|
||||
const FormCheck = (): boolean => {
|
||||
IsFieldEmpty('basvuruTipId', 'Lütfen başvuru tipini seçiniz')
|
||||
|
||||
if (validationStore.checkEmpty(formData.email)) {
|
||||
invalidTexts.email = 'Eposta alanı boş bırakılamaz.'
|
||||
isFormValid.value = false
|
||||
} else {
|
||||
delete invalidTexts.email
|
||||
if (!validationStore.checkEmail(formData.email)) {
|
||||
invalidTexts.email =
|
||||
'Lütfen eposta adresinizi doğru formatta giriniz. Örn: isim@alanadi.td'
|
||||
isFormValid.value = false
|
||||
} else {
|
||||
delete invalidTexts.email
|
||||
}
|
||||
}
|
||||
|
||||
IsFieldEmpty('telefonNumarasi', 'Telefon alanı boş bırakılamaz')
|
||||
if (!validationStore.checkEmpty(formData.telefonNumarasi)) {
|
||||
if (formData.telefonNumarasi.length !== 10) {
|
||||
invalidTexts.telefonNumarasi =
|
||||
'Telefon numaranızı başında 0 olmadan 10 hane olarak giriniz.'
|
||||
isFormValid.value = false
|
||||
} else {
|
||||
delete invalidTexts.telefonNumarasi
|
||||
}
|
||||
}
|
||||
IsFieldEmpty('ilId', 'Lütfen il seçiniz')
|
||||
IsFieldEmpty('ilceId', 'Lütfen ilçe seçiniz')
|
||||
IsFieldEmpty('mahalleId', 'Lütfen mahalle seçiniz')
|
||||
IsFieldEmpty('adres', 'Adres alanı boş bırakılamaz')
|
||||
|
||||
if (formData.basvuruTipId === 18) {
|
||||
IsFieldEmpty('gercekAdi', 'Bu alan boş bırakılamaz')
|
||||
IsFieldEmpty('gercekSoyadi', 'Bu alan boş bırakılamaz')
|
||||
IsFieldEmpty('gercekTCKN', 'Bu alan boş bırakılamaz')
|
||||
if (!validationStore.checkEmpty(formData.gercekTCKN)) {
|
||||
if (formData.gercekTCKN.length !== 11) {
|
||||
invalidTexts.gercekTCKN =
|
||||
'Lütfen 11 hane olacak şekilde TC Kimlik Numaranızı yazınız'
|
||||
isFormValid.value = false
|
||||
} else {
|
||||
delete invalidTexts.gercekTCKN
|
||||
}
|
||||
}
|
||||
IsFieldEmpty('gercekVergiDairesi', 'Bu alan boş bırakılamaz')
|
||||
IsFieldEmpty('gercekVergiNo', 'Bu alan boş bırakılamaz')
|
||||
if (!validationStore.checkEmpty(formData.gercekVergiNo)) {
|
||||
if (formData.gercekVergiNo.length !== 11) {
|
||||
invalidTexts.gercekVergiNo = 'Vergi numaranızı 11 hane olarak giriniz.'
|
||||
isFormValid.value = false
|
||||
} else {
|
||||
delete invalidTexts.gercekVergiNo
|
||||
}
|
||||
}
|
||||
IsFieldEmpty('gercekOdaKayitNo', 'Bu alan boş bırakılamaz')
|
||||
}
|
||||
if (formData.basvuruTipId === 21) {
|
||||
IsFieldEmpty('tuzelUnvan', 'Bu alan boş bırakılamaz')
|
||||
IsFieldEmpty('tuzelVergiDairesi', 'Bu alan boş bırakılamaz')
|
||||
IsFieldEmpty('tuzelVergiNo', 'Bu alan boş bırakılamaz')
|
||||
if (!validationStore.checkEmpty(formData.tuzelVergiNo)) {
|
||||
if (formData.tuzelVergiNo.length < 10 || formData.tuzelVergiNo.length > 11) {
|
||||
invalidTexts.tuzelVergiNo = 'Vergi numaranızı kontrol ediniz.'
|
||||
isFormValid.value = false
|
||||
} else {
|
||||
delete invalidTexts.tuzelVergiNo
|
||||
}
|
||||
}
|
||||
IsFieldEmpty('tuzelSicilNo', 'Bu alan boş bırakılamaz')
|
||||
}
|
||||
|
||||
if (formData.basvuruTipId === 22) {
|
||||
IsFieldEmpty('dernekUnvan', 'Bu alan boş bırakılamaz')
|
||||
IsFieldEmpty('dernekVergiDairesi', 'Bu alan boş bırakılamaz')
|
||||
IsFieldEmpty('dernekVergiNo', 'Bu alan boş bırakılamaz')
|
||||
if (!validationStore.checkEmpty(formData.dernekVergiNo)) {
|
||||
if (formData.dernekVergiNo.length < 10 || formData.dernekVergiNo.length > 11) {
|
||||
invalidTexts.dernekVergiNo = 'Vergi numaranızı kontrol ediniz'
|
||||
isFormValid.value = false
|
||||
} else {
|
||||
delete invalidTexts.dernekVergiNo
|
||||
}
|
||||
}
|
||||
IsFieldEmpty('dernekSicilNo', 'Bu alan boş bırakılamaz')
|
||||
}
|
||||
|
||||
if (formData.basvuruTipId === 23) {
|
||||
IsFieldEmpty('sirketUnvan', 'Bu alan boş bırakılamaz')
|
||||
IsFieldEmpty('sirketVergiDairesi', 'Bu alan boş bırakılamaz')
|
||||
IsFieldEmpty('sirketVergiNo', 'Bu alan boş bırakılamaz')
|
||||
|
||||
if (!validationStore.checkEmpty(formData.sirketVergiNo)) {
|
||||
if (formData.sirketVergiNo.length < 10 || formData.sirketVergiNo.length > 11) {
|
||||
invalidTexts.sirketVergiNo = 'Vergi numaranızı kontrol ediniz'
|
||||
isFormValid.value = false
|
||||
} else {
|
||||
delete invalidTexts.sirketVergiNo
|
||||
}
|
||||
}
|
||||
IsFieldEmpty('sirketSicilNo', 'Bu alan boş bırakılamaz')
|
||||
}
|
||||
|
||||
if (formData.basvuruTipId === 26) {
|
||||
IsFieldEmpty('kamuUnvan', 'Bu alan boş bırakılamaz')
|
||||
IsFieldEmpty('kamuVergiDairesi', 'Bu alan boş bırakılamaz')
|
||||
IsFieldEmpty('kamuVergiNo', 'Bu alan boş bırakılamaz')
|
||||
if (!validationStore.checkEmpty(formData.kamuVergiNo)) {
|
||||
if (formData.kamuVergiNo.length < 10 || formData.kamuVergiNo.length > 11) {
|
||||
invalidTexts.kamuVergiNo = 'Vergi numaranızı kontrol ediniz.'
|
||||
isFormValid.value = false
|
||||
} else {
|
||||
delete invalidTexts.kamuVergiNo
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!validationStore.checkEmpty(formData.postaKodu)) {
|
||||
if (formData.postaKodu.length !== 5) {
|
||||
invalidTexts.postaKodu = 'Posta kodu 5 hane olmalıdır.'
|
||||
isFormValid.value = false
|
||||
} else {
|
||||
delete invalidTexts.postaKodu
|
||||
}
|
||||
}
|
||||
|
||||
if (route.meta.authpage as boolean) {
|
||||
IsFieldEmpty('password', 'Bir parola belirlemelisiniz')
|
||||
IsFieldEmpty(
|
||||
'confirmPassword',
|
||||
'Lütfen bu alana girdiğiniz parolayı tekrar giriniz.'
|
||||
)
|
||||
|
||||
if (!validationStore.checkEmpty(formData.password)) {
|
||||
if (formData.password.length < 6) {
|
||||
invalidTexts.password = 'Girdiğiniz parola en az 6 haneli olmalıdır.'
|
||||
} else {
|
||||
delete invalidTexts.password
|
||||
}
|
||||
}
|
||||
|
||||
if (!validationStore.checkEmpty(formData.confirmPassword)) {
|
||||
if (formData.confirmPassword.length < 6) {
|
||||
invalidTexts.confirmPassword =
|
||||
'Girdiğiniz parola doğrulama değeri en az 6 haneli olmalıdır.'
|
||||
} else {
|
||||
delete invalidTexts.password
|
||||
}
|
||||
|
||||
if (formData.confirmPassword !== formData.password) {
|
||||
invalidTexts.confirmPassword =
|
||||
'Girdiğiniz değer Parola alanı ile aynı olmalıdır'
|
||||
isFormValid.value = false
|
||||
} else {
|
||||
delete invalidTexts.confirmPassword
|
||||
}
|
||||
}
|
||||
|
||||
if (!formData.kvkk) {
|
||||
invalidTexts.kvkk = 'KVKK aydınlatma metnini kabul etmelisiniz'
|
||||
isFormValid.value = false
|
||||
} else {
|
||||
delete invalidTexts.kvkk
|
||||
}
|
||||
|
||||
if (!formData.uyelikSozlesmesi) {
|
||||
invalidTexts.uyelikSozlesmesi = 'Üyelik sözleşmesini kabul etmelisiniz'
|
||||
isFormValid.value = false
|
||||
} else {
|
||||
delete invalidTexts.uyelikSozlesmesi
|
||||
}
|
||||
}
|
||||
|
||||
return isFormValid.value
|
||||
}
|
||||
|
||||
return {
|
||||
formChanged,
|
||||
isFormValid,
|
||||
invalidTexts,
|
||||
ilceList,
|
||||
mahalleList,
|
||||
formData,
|
||||
safeData,
|
||||
ResetStore,
|
||||
ChangeKullaniciTipi,
|
||||
SetIlIlce,
|
||||
SetbasvuruTip,
|
||||
ResetFormItems,
|
||||
RestoreForm,
|
||||
FormCheck
|
||||
}
|
||||
})
|
||||
34
src/module/uyeler/stores/customerDocumentStore.ts
Normal file
34
src/module/uyeler/stores/customerDocumentStore.ts
Normal file
@ -0,0 +1,34 @@
|
||||
import { defineStore } from 'pinia'
|
||||
import { ref,reactive } from 'vue'
|
||||
import { useUsersStore } from '@/stores/usersStore'
|
||||
|
||||
export const useCustomerDocumentStore = defineStore('customerDocumentStore', () => {
|
||||
const usersStore = useUsersStore()
|
||||
|
||||
const customerDocumentsList = ref<Record<string, any>[]>([])
|
||||
const customerDocumentBaseForm = reactive<Record<string, any>>({
|
||||
file: null,
|
||||
cekilisId: usersStore.selectedUserId(),
|
||||
title: ''
|
||||
})
|
||||
const customerDocumentForm = reactive<Record<string, any>>({})
|
||||
const customerDocumentSafeForm = reactive<Record<string, any>>({})
|
||||
const isUpdate = ref<boolean>(false)
|
||||
const documentPanel = ref<boolean>(false)
|
||||
const loaded = ref<boolean>(false)
|
||||
|
||||
const ResetForm = () => {
|
||||
Object.assign(customerDocumentForm, customerDocumentBaseForm)
|
||||
}
|
||||
|
||||
return {
|
||||
customerDocumentsList,
|
||||
customerDocumentBaseForm,
|
||||
customerDocumentForm,
|
||||
customerDocumentSafeForm,
|
||||
isUpdate,
|
||||
documentPanel,
|
||||
loaded,
|
||||
ResetForm
|
||||
}
|
||||
})
|
||||
67
src/module/uyeler/stores/customerIrtibatStore.ts
Normal file
67
src/module/uyeler/stores/customerIrtibatStore.ts
Normal file
@ -0,0 +1,67 @@
|
||||
import { defineStore } from 'pinia'
|
||||
import { ref, reactive } from 'vue'
|
||||
import { useUsersStore } from '@/stores/usersStore'
|
||||
import { useCustomerIrtibatValidationStore } from '../validation/customerIrtibatValidationStore'
|
||||
|
||||
export const useCustomerIrtibatStore = defineStore('customerIrtibatStore', () => {
|
||||
const usersStore = useUsersStore()
|
||||
const customerIrtibatValidationStore = useCustomerIrtibatValidationStore()
|
||||
|
||||
const customerAllIrtibatList = ref<Record<string, any>[]>([])
|
||||
|
||||
const customerIrtibatBaseForm = reactive<Record<string, any>>({
|
||||
appUserId: usersStore.selectedUserId(),
|
||||
firstName: '',
|
||||
lastName: '',
|
||||
email: '',
|
||||
phone: ''
|
||||
})
|
||||
|
||||
const customerIrtibatForm = reactive<Record<string, any>>({})
|
||||
const customerIrtibatSafeForm = reactive<Record<string, any>>({})
|
||||
const isUpdate = ref<boolean>(false)
|
||||
const refreshList = ref<boolean>(false)
|
||||
const irtibatPanel = ref<boolean>(false)
|
||||
const loaded = ref<boolean>(false)
|
||||
const totalIrtibat = ref<number>(0)
|
||||
const isNew = ref<boolean>(false)
|
||||
|
||||
const ResetForm = () => {
|
||||
Object.assign(customerIrtibatForm, customerIrtibatBaseForm)
|
||||
customerIrtibatForm.appUserId = usersStore.selectedUserId()
|
||||
delete customerIrtibatForm.id
|
||||
}
|
||||
const SetSafeIrtibatData = () => {
|
||||
Object.assign(customerIrtibatSafeForm, customerIrtibatForm)
|
||||
}
|
||||
const RestoreData = () => {
|
||||
Object.assign(customerIrtibatForm, customerIrtibatSafeForm)
|
||||
}
|
||||
const CancelSave = () => {
|
||||
RestoreData()
|
||||
customerIrtibatValidationStore.formChanged = false
|
||||
}
|
||||
const ResetData = () => {
|
||||
isNew.value = false
|
||||
isUpdate.value = false
|
||||
loaded.value = false
|
||||
Object.assign(customerIrtibatForm, {})
|
||||
}
|
||||
return {
|
||||
customerAllIrtibatList,
|
||||
customerIrtibatBaseForm,
|
||||
customerIrtibatForm,
|
||||
customerIrtibatSafeForm,
|
||||
isUpdate,
|
||||
refreshList,
|
||||
irtibatPanel,
|
||||
loaded,
|
||||
totalIrtibat,
|
||||
isNew,
|
||||
ResetForm,
|
||||
SetSafeIrtibatData,
|
||||
RestoreData,
|
||||
CancelSave,
|
||||
ResetData
|
||||
}
|
||||
})
|
||||
136
src/module/uyeler/stores/customerStore.ts
Normal file
136
src/module/uyeler/stores/customerStore.ts
Normal file
@ -0,0 +1,136 @@
|
||||
import { defineStore } from 'pinia'
|
||||
import { ref, reactive, computed } from 'vue'
|
||||
import { useUsersStore } from '@/stores/usersStore'
|
||||
|
||||
export const useCustomerStore = defineStore('customerStore', () => {
|
||||
const usersStore = useUsersStore()
|
||||
|
||||
const customerMail = ref<string>('')
|
||||
const selectedCustomer = ref<number>(0)
|
||||
const selectedSubCustomer = ref<number>(0)
|
||||
const customerApproveId = ref<number | null>(null)
|
||||
const subCustomerApproveId = ref<number | null>(null)
|
||||
const onayIslemTipleri = ref<Record<string, any>[]>([])
|
||||
const uyeOnayRefresh = ref<boolean>(false)
|
||||
|
||||
const customerBaseForm = reactive<Record<string, any>>({
|
||||
appUserId: usersStore.selectedUserId,
|
||||
firstName: '',
|
||||
lastName: '',
|
||||
email: '',
|
||||
phone: ''
|
||||
})
|
||||
const customerForm = reactive<Record<string, any>>({})
|
||||
const customerSafeForm = reactive<Record<string, any>>({})
|
||||
const isUpdate = ref<boolean>(false)
|
||||
const loaded = ref<boolean>(false)
|
||||
const isNew = ref<boolean>(false)
|
||||
|
||||
const GetUnvan = (v: Record<string, any>): string => {
|
||||
switch (v.basvuruTipId) {
|
||||
case 18: {
|
||||
return `${v.gercekAdi} ${v.gercekSoyadi} (${v.gercekTicariUnvan})`
|
||||
}
|
||||
case 21: {
|
||||
return v.tuzelUnvan
|
||||
}
|
||||
case 22: {
|
||||
return v.dernekUnvan
|
||||
}
|
||||
case 23: {
|
||||
return v.sirketUnvan
|
||||
}
|
||||
case 26: {
|
||||
return v.kamuUnvan
|
||||
}
|
||||
default: {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const CellStatusClass = (d: number): string => {
|
||||
switch (d) {
|
||||
case 1: {
|
||||
return 'back-grad-waiting'
|
||||
}
|
||||
case 2: {
|
||||
return 'back-grad-waiting'
|
||||
}
|
||||
case 3: {
|
||||
return 'back-grad-next'
|
||||
}
|
||||
case 4: {
|
||||
return 'back-grad-ok'
|
||||
}
|
||||
case 5: {
|
||||
return 'back-grad-alert'
|
||||
}
|
||||
case 6: {
|
||||
return 'back-grad-beforeok'
|
||||
}
|
||||
case 7: {
|
||||
return 'back-grad-change'
|
||||
}
|
||||
default: {
|
||||
return 'back-grad-new'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const CellStatusName = (d: number): string => {
|
||||
const tip: Record<string, any> = onayIslemTipleri.value.filter(
|
||||
(v: Record<string, any>) => v.id === d
|
||||
)
|
||||
|
||||
if (tip[0] !== undefined) return tip[0].tipAdi
|
||||
else return 'Yeni Üye'
|
||||
}
|
||||
|
||||
const customerApproved = computed<boolean>(() => {
|
||||
return customerApproveId.value === 4
|
||||
})
|
||||
|
||||
const subCustomerApproved = computed<boolean>(() => {
|
||||
return subCustomerApproveId.value === 4
|
||||
})
|
||||
|
||||
const ResetForm = () => {
|
||||
Object.assign(customerForm, customerBaseForm)
|
||||
}
|
||||
const SetSafeIrtibatData = () => {
|
||||
Object.assign(customerSafeForm, customerForm)
|
||||
}
|
||||
const RestoreData = () => {
|
||||
Object.assign(customerForm, customerSafeForm)
|
||||
}
|
||||
const CancelSave = () => {
|
||||
RestoreData()
|
||||
//customerIrtibatValidationStore.formChanged = false
|
||||
}
|
||||
|
||||
return {
|
||||
customerMail,
|
||||
selectedCustomer,
|
||||
selectedSubCustomer,
|
||||
customerApproveId,
|
||||
customerApproved,
|
||||
subCustomerApproveId,
|
||||
subCustomerApproved,
|
||||
onayIslemTipleri,
|
||||
uyeOnayRefresh,
|
||||
customerBaseForm,
|
||||
customerForm,
|
||||
customerSafeForm,
|
||||
isUpdate,
|
||||
loaded,
|
||||
isNew,
|
||||
GetUnvan,
|
||||
CellStatusClass,
|
||||
CellStatusName,
|
||||
ResetForm,
|
||||
SetSafeIrtibatData,
|
||||
RestoreData,
|
||||
CancelSave
|
||||
}
|
||||
})
|
||||
8
src/module/uyeler/stores/uyeIrtibatKisiStore.ts
Normal file
8
src/module/uyeler/stores/uyeIrtibatKisiStore.ts
Normal file
@ -0,0 +1,8 @@
|
||||
import { defineStore } from 'pinia'
|
||||
import { ref } from 'vue'
|
||||
|
||||
export const useUyeIrtibatKisiStore = defineStore('uyeIrtibatKisiStore', () => {
|
||||
const uyeAllIrtibatKisiList = ref<Record<string, any>[]>([])
|
||||
|
||||
return { uyeAllIrtibatKisiList }
|
||||
})
|
||||
@ -0,0 +1,44 @@
|
||||
import { defineStore } from 'pinia'
|
||||
import { ref, reactive } from 'vue'
|
||||
import { useValidationStore } from '@/stores/validationStore'
|
||||
import { useCustomerDocumentStore } from '../stores/customerDocumentStore'
|
||||
|
||||
export const useCustomerDocumentValidationStore = defineStore(
|
||||
'customerDocumentValidationStore',
|
||||
() => {
|
||||
const customerDocumentStore = useCustomerDocumentStore()
|
||||
const validationStore = useValidationStore()
|
||||
|
||||
const formChanged = ref<boolean>(false)
|
||||
const isFormValid = ref<boolean>(true)
|
||||
const invalidTexts = reactive<Record<string, any>>({})
|
||||
|
||||
const FormCheck = (): boolean => {
|
||||
Object.assign(invalidTexts, {})
|
||||
|
||||
validationStore.IsFieldEmpty(
|
||||
customerDocumentStore.customerDocumentForm,
|
||||
invalidTexts,
|
||||
'title',
|
||||
'Döküman için bir başlık belirtmelisiniz.'
|
||||
)
|
||||
|
||||
validationStore.IsFieldEmpty(
|
||||
customerDocumentStore.customerDocumentForm,
|
||||
invalidTexts,
|
||||
'file',
|
||||
'Bir döküman eklemelisiniz.'
|
||||
)
|
||||
|
||||
isFormValid.value = Object.keys(invalidTexts).length === 0
|
||||
return isFormValid.value
|
||||
}
|
||||
|
||||
return {
|
||||
formChanged,
|
||||
isFormValid,
|
||||
invalidTexts,
|
||||
FormCheck
|
||||
}
|
||||
}
|
||||
)
|
||||
@ -0,0 +1,78 @@
|
||||
import { defineStore } from 'pinia'
|
||||
import { ref, reactive } from 'vue'
|
||||
import { useValidationStore } from '@/stores/validationStore'
|
||||
import { useCustomerIrtibatStore } from '../stores/customerIrtibatStore'
|
||||
|
||||
export const useCustomerIrtibatValidationStore = defineStore(
|
||||
'customerIrtibatValidationStore',
|
||||
() => {
|
||||
const customerIrtibatStore = useCustomerIrtibatStore()
|
||||
const validationStore = useValidationStore()
|
||||
|
||||
const formChanged = ref<boolean>(false)
|
||||
const isFormValid = ref<boolean>(true)
|
||||
const invalidTexts = reactive<Record<string, any>>({})
|
||||
|
||||
const FormCheck = (): boolean => {
|
||||
Object.assign(invalidTexts, {})
|
||||
|
||||
validationStore.IsFieldEmpty(
|
||||
customerIrtibatStore.customerIrtibatForm,
|
||||
invalidTexts,
|
||||
'firstName',
|
||||
'Lütfen adını giriniz.'
|
||||
)
|
||||
|
||||
validationStore.IsFieldEmpty(
|
||||
customerIrtibatStore.customerIrtibatForm,
|
||||
invalidTexts,
|
||||
'lastName',
|
||||
'Lütfen soyadını giriniz.'
|
||||
)
|
||||
|
||||
validationStore.IsFieldEmpty(
|
||||
customerIrtibatStore.customerIrtibatForm,
|
||||
invalidTexts,
|
||||
'phone',
|
||||
'Lütfen telefon numarasını giriniz'
|
||||
)
|
||||
|
||||
if (!validationStore.checkEmpty(customerIrtibatStore.customerIrtibatForm.email)) {
|
||||
if (customerIrtibatStore.customerIrtibatForm.phone.length !== 10) {
|
||||
isFormValid.value = false
|
||||
invalidTexts.phone =
|
||||
'Lütfen telefon numarasını başında 0 olmadan 10 haneli olarak giriniz.'
|
||||
} else {
|
||||
delete invalidTexts.phone
|
||||
}
|
||||
}
|
||||
|
||||
validationStore.IsFieldEmpty(
|
||||
customerIrtibatStore.customerIrtibatForm,
|
||||
invalidTexts,
|
||||
'email',
|
||||
'Lütfen e-posta adresini giriniz'
|
||||
)
|
||||
|
||||
if (!validationStore.checkEmpty(customerIrtibatStore.customerIrtibatForm.email)) {
|
||||
if (!validationStore.checkEmail(customerIrtibatStore.customerIrtibatForm.email)) {
|
||||
isFormValid.value = false
|
||||
invalidTexts.email =
|
||||
'Lütfen eposta adresinizi doğru formatta giriniz. Örn: isim@alanadi.td'
|
||||
} else {
|
||||
delete invalidTexts.email
|
||||
}
|
||||
}
|
||||
|
||||
isFormValid.value = Object.keys(invalidTexts).length === 0
|
||||
return isFormValid.value
|
||||
}
|
||||
|
||||
return {
|
||||
formChanged,
|
||||
isFormValid,
|
||||
invalidTexts,
|
||||
FormCheck
|
||||
}
|
||||
}
|
||||
)
|
||||
82
src/module/uyeler/views/UyeDetay.vue
Normal file
82
src/module/uyeler/views/UyeDetay.vue
Normal file
@ -0,0 +1,82 @@
|
||||
<template>
|
||||
<AdminLayout>
|
||||
<Breadcrumb currentPageText="Üye Detay" />
|
||||
<tabs :tabList="tabList">
|
||||
<template #uyebilgileri>
|
||||
<tab-uye-bilgileri />
|
||||
</template>
|
||||
<template #yetkilikurum>
|
||||
<tab-uye-yetkili-oldugu-kisi-kurum />
|
||||
</template>
|
||||
<template #piyangolar>
|
||||
<tab-uye-piyangolar />
|
||||
</template>
|
||||
<template #uyeloglari>
|
||||
<tab-uye-loglari />
|
||||
</template>
|
||||
<template #onaydurumu><tab-uye-onay-durumu /></template>
|
||||
</tabs>
|
||||
</AdminLayout>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, onBeforeMount, onBeforeUpdate, watch } from 'vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
const route = useRoute()
|
||||
import { useGlobalStore } from '@/stores/globalStore'
|
||||
const globalStore = useGlobalStore()
|
||||
import { useUsersStore } from '@/stores/usersStore'
|
||||
const usersStore = useUsersStore()
|
||||
import { useDataStore } from '@/stores/dataStore'
|
||||
const dataStore = useDataStore()
|
||||
|
||||
import AdminLayout from '@/layouts/AdminLayout.vue'
|
||||
import TabUyeBilgileri from '../components/TabUyeBilgileri.vue'
|
||||
import TabUyePiyangolar from '../components/TabUyePiyangolar.vue'
|
||||
import TabUyeYetkiliOlduguKisiKurum from '../components/TabUyeYetkiliOlduguKisiKurum.vue'
|
||||
import TabUyeLoglari from '../components/TabUyeLoglari.vue'
|
||||
import TabUyeOnayDurumu from '../components/TabUyeOnayDurumu.vue'
|
||||
const tabList = ref<Record<string, any>[]>([])
|
||||
|
||||
const CreateTabs = () => {
|
||||
tabList.value = []
|
||||
tabList.value.push({ text: 'Üye Bilgileri', id: 'uyebilgileri' })
|
||||
if (
|
||||
usersStore.isPanelUser &&
|
||||
route.name !== 'Profil' &&
|
||||
(usersStore.isAraciFirma || globalStore.selCustomerType === 23)
|
||||
) {
|
||||
let txt = usersStore.isPanelUser
|
||||
? 'Yetkili Olduğu Kişi/Kurum'
|
||||
: 'Yetkili Olduğum Kişi/Kurum'
|
||||
tabList.value.push({ text: txt, id: 'yetkilikurum' })
|
||||
}
|
||||
|
||||
if (usersStore.isPanelUser && route.name !== 'Profil') {
|
||||
tabList.value.push(
|
||||
{ text: 'Piyangolar', id: 'piyangolar' },
|
||||
{ text: 'Üye Logları', id: 'uyeloglari' },
|
||||
{ text: 'Onay Durumu', id: 'onaydurumu' }
|
||||
)
|
||||
}
|
||||
}
|
||||
onBeforeMount(async () => {
|
||||
usersStore.SetSelectedUser()
|
||||
let tip = await dataStore.dataGet('Auth/uyedurumkontrol/' + usersStore.selectedUserId())
|
||||
usersStore.userApproveId = tip.userIslemtipi
|
||||
|
||||
CreateTabs()
|
||||
})
|
||||
onBeforeUpdate(() => {
|
||||
CreateTabs()
|
||||
})
|
||||
|
||||
watch(
|
||||
() => globalStore.selCustomerType,
|
||||
() => {
|
||||
CreateTabs()
|
||||
},
|
||||
{
|
||||
deep: true
|
||||
}
|
||||
)
|
||||
</script>
|
||||
58
src/module/uyeler/views/UyeProfil.vue
Normal file
58
src/module/uyeler/views/UyeProfil.vue
Normal file
@ -0,0 +1,58 @@
|
||||
<template>
|
||||
<AdminLayout>
|
||||
<Breadcrumb currentPageText="Üye Detay" />
|
||||
<tabs :tabList="tabList" v-if="loaded">
|
||||
<template #uyebilgileri>
|
||||
<tab-uye-bilgileri />
|
||||
</template>
|
||||
<template #yetkilikisikurum>
|
||||
<tab-uye-yetkili-oldugu-kisi-kurum />
|
||||
</template>
|
||||
<template #onaydurumu>
|
||||
<tab-uye-onay-durumu v-if="usersStore.isPanelUser" />
|
||||
<tab-uye-onay-durumu-user v-else />
|
||||
</template>
|
||||
</tabs>
|
||||
</AdminLayout>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, onBeforeMount, watch } from 'vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
const route = useRoute()
|
||||
import { useGlobalStore } from '@/stores/globalStore'
|
||||
const globalStore = useGlobalStore()
|
||||
import { useUsersStore } from '@/stores/usersStore'
|
||||
const usersStore = useUsersStore()
|
||||
import { useDataStore } from '@/stores/dataStore'
|
||||
const dataStore = useDataStore()
|
||||
|
||||
import AdminLayout from '@/layouts/AdminLayout.vue'
|
||||
import TabUyeBilgileri from '../components/TabUyeBilgileri.vue'
|
||||
import TabUyeYetkiliOlduguKisiKurum from '../components/TabUyeYetkiliOlduguKisiKurum.vue'
|
||||
import TabUyeOnayDurumu from '../components/TabUyeOnayDurumu.vue'
|
||||
import TabUyeOnayDurumuUser from '../components/TabUyeOnayDurumuUser.vue'
|
||||
|
||||
const loaded = ref<boolean>(false)
|
||||
const tabList = ref<Record<string, any>[]>([])
|
||||
|
||||
const CreateTabs = () => {
|
||||
tabList.value.push({ text: 'Üye Bilgileri', id: 'uyebilgileri' })
|
||||
if (usersStore.isAraciFirma && usersStore.userApproveId === 4)
|
||||
tabList.value.push({ text: 'Yetkili Olduğum Kişi/Kurum', id: 'yetkilikisikurum' })
|
||||
|
||||
if (!usersStore.isPanelUser) tabList.value.push({ text: 'Onay Durumu', id: 'onaydurumu' })
|
||||
}
|
||||
|
||||
onBeforeMount(() => {
|
||||
CreateTabs()
|
||||
loaded.value = true
|
||||
})
|
||||
|
||||
watch(
|
||||
() => usersStore.userApproveId,
|
||||
() => {
|
||||
tabList.value = []
|
||||
CreateTabs()
|
||||
}
|
||||
)
|
||||
</script>
|
||||
12
src/module/uyeler/views/UyeTipleri.vue
Normal file
12
src/module/uyeler/views/UyeTipleri.vue
Normal file
@ -0,0 +1,12 @@
|
||||
<template>
|
||||
<AdminLayout>
|
||||
<Breadcrumb current-page-text="Üye Tipleri" />
|
||||
<section class="section-list form-inner-content-left">
|
||||
<form-uye-tipleri />
|
||||
</section>
|
||||
</AdminLayout>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import AdminLayout from '@/layouts/AdminLayout.vue'
|
||||
import FormUyeTipleri from '../components/form/FormUyeTipleri.vue'
|
||||
</script>
|
||||
42
src/module/uyeler/views/UyeYetkili.vue
Normal file
42
src/module/uyeler/views/UyeYetkili.vue
Normal file
@ -0,0 +1,42 @@
|
||||
<template>
|
||||
<AdminLayout>
|
||||
<Breadcrumb currentPageText="Yetkili Olunan Kişi/Kurum Detay" />
|
||||
<tabs :tabList="tabList">
|
||||
<template #kisikurumbilgileri>
|
||||
<tab-yetkili-uye-bilgileri />
|
||||
</template>
|
||||
<template #onaydurumu>
|
||||
<tab-uye-onay-durumu v-if="usersStore.isPanelUser" />
|
||||
<tab-uye-onay-durumu-user v-else />
|
||||
</template>
|
||||
</tabs>
|
||||
</AdminLayout>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, onBeforeMount } from 'vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
const route = useRoute()
|
||||
import { useUsersStore } from '@/stores/usersStore'
|
||||
const usersStore = useUsersStore()
|
||||
import { useDataStore } from '@/stores/dataStore'
|
||||
const dataStore = useDataStore()
|
||||
|
||||
import AdminLayout from '@/layouts/AdminLayout.vue'
|
||||
import TabYetkiliUyeBilgileri from '../components/TabYetkiliUyeBilgileri.vue'
|
||||
import TabUyeOnayDurumu from '../components/TabUyeOnayDurumu.vue'
|
||||
import TabUyeOnayDurumuUser from '../components/TabUyeOnayDurumuUser.vue'
|
||||
|
||||
const tabList = ref<Record<string, any>[]>([
|
||||
{ text: 'Kişi/Kurum Bilgileri', id: 'kisikurumbilgileri' }
|
||||
])
|
||||
tabList.value.push({ text: 'Onay Durumu', id: 'onaydurumu' })
|
||||
|
||||
onBeforeMount(async () => {
|
||||
usersStore.SetSelectedUser()
|
||||
|
||||
if (route.name !== 'UyeYetkiliYeni') {
|
||||
let tip = await dataStore.dataGet('Auth/uyedurumkontrol/' + route.params.altUyeId)
|
||||
usersStore.userSubApproveId = tip.userIslemtipi
|
||||
}
|
||||
})
|
||||
</script>
|
||||
134
src/module/uyeler/views/UyelerListe.vue
Normal file
134
src/module/uyeler/views/UyelerListe.vue
Normal file
@ -0,0 +1,134 @@
|
||||
<template>
|
||||
<AdminLayout>
|
||||
<Breadcrumb current-page-text="Üyeler Listesi" />
|
||||
<section class="section-list">
|
||||
<list-table-content
|
||||
v-if="loaded"
|
||||
:tableHeader="tableHeader"
|
||||
:rowAction="rwAction"
|
||||
icon="customers"
|
||||
title="Üyeler"
|
||||
listText="Üye"
|
||||
apiList="Auth/UyelerList"
|
||||
apiText="Üye Listesi" />
|
||||
</section>
|
||||
</AdminLayout>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, computed, onBeforeMount } from 'vue'
|
||||
import AdminLayout from '@/layouts/AdminLayout.vue'
|
||||
import router from '@/router'
|
||||
|
||||
import { useGlobalStore } from '@/stores/globalStore'
|
||||
const globalStore = useGlobalStore()
|
||||
import { useDataStore } from '@/stores/dataStore'
|
||||
const dataStore = useDataStore()
|
||||
import { useDateStore } from '@/stores/dateStore'
|
||||
const dateStore = useDateStore()
|
||||
import { useCustomerStore } from '../stores/customerStore'
|
||||
const customerStore = useCustomerStore()
|
||||
import { useCustomerService } from '../service/customerService'
|
||||
const customerService = useCustomerService()
|
||||
import { useUsersStore } from '@/stores/usersStore'
|
||||
const usersStore = useUsersStore()
|
||||
import { useGlobalDataStore } from '@/stores/globalDataStore'
|
||||
const globalDataStore = useGlobalDataStore()
|
||||
|
||||
const loaded = ref<boolean>(false)
|
||||
|
||||
const ilList = computed<Record<string, any>[]>(() => {
|
||||
return globalDataStore.ilList
|
||||
})
|
||||
|
||||
const customerOnayIslemTipleri = computed<Record<string, any>[]>(() => {
|
||||
return customerStore.onayIslemTipleri
|
||||
})
|
||||
|
||||
const customerTips = computed<Record<string, any>[]>(() => {
|
||||
return globalDataStore.customerTips
|
||||
})
|
||||
|
||||
const tableHeader = ref<Record<string, any>[]>([
|
||||
{
|
||||
name: 'olusturmaTarihi',
|
||||
title: 'Kayıt Tarihi',
|
||||
sort: true,
|
||||
compute: (v: Record<string, any>): string => {
|
||||
if (v.olusturmatarihi === null) return ''
|
||||
else return dateStore.dateFormat({ date: v.olusturmatarihi })
|
||||
},
|
||||
filter: {
|
||||
type: 'date',
|
||||
range: true
|
||||
},
|
||||
style: { width: '10%' }
|
||||
},
|
||||
{
|
||||
name: 'basvuruTipi',
|
||||
title: 'Kullanıcı Tipi',
|
||||
sort: true,
|
||||
filter: {
|
||||
type: 'select',
|
||||
data: customerTips,
|
||||
listVal: 'id',
|
||||
listText: 'baslik',
|
||||
filterId: 'basvuruTipId'
|
||||
},
|
||||
style: { width: '10%' }
|
||||
},
|
||||
{
|
||||
name: 'unvan',
|
||||
title: 'Ünvan',
|
||||
style: { width: '20%' }
|
||||
},
|
||||
{ name: 'email', title: 'Email', sort: true, style: { width: '10%' } },
|
||||
{ name: 'telefonNumarasi', title: 'Telefon' },
|
||||
{
|
||||
name: 'il',
|
||||
title: 'İl',
|
||||
sort: true,
|
||||
filter: {
|
||||
type: 'select',
|
||||
data: ilList,
|
||||
listVal: 'id',
|
||||
listText: 'ad',
|
||||
filterId: 'ilId'
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'ilce',
|
||||
title: 'İlçe',
|
||||
sort: true
|
||||
},
|
||||
{
|
||||
name: 'islemTipi',
|
||||
title: 'Durum',
|
||||
sort: true,
|
||||
computeHtml: (v: Record<string, any>): string => {
|
||||
return `<span class='back-grad ${customerStore.CellStatusClass(v.islemTipId)}'>
|
||||
${v.islemTipi}
|
||||
</span>`
|
||||
},
|
||||
filter: {
|
||||
type: 'select',
|
||||
data: customerOnayIslemTipleri,
|
||||
listVal: 'id',
|
||||
listText: 'tipAdi',
|
||||
filterId: 'islemTipId'
|
||||
},
|
||||
style: { width: '10%' }
|
||||
}
|
||||
])
|
||||
const rwAction = (row: any) => {
|
||||
if (usersStore.isPanelUser) globalStore.selCustomerType = row.basvuruTipId
|
||||
router.push('detay/' + row.id)
|
||||
}
|
||||
|
||||
onBeforeMount(async () => {
|
||||
await dataStore.GetIlList()
|
||||
await dataStore.GetCustomerTipList()
|
||||
await customerService.GetCustomerOnayIslemTipleri()
|
||||
|
||||
loaded.value = true
|
||||
})
|
||||
</script>
|
||||
Reference in New Issue
Block a user