Compare commits
9 Commits
6e2f77f576
...
sifremi-si
| Author | SHA1 | Date | |
|---|---|---|---|
| b5a297e10c | |||
| 5d49f96c98 | |||
| 3355085a1d | |||
| 095f877224 | |||
| 2b3b09c88b | |||
| 0e3c6e658f | |||
| cab06c51a2 | |||
| 5e83a11ecc | |||
| 07c73d39db |
@ -5,7 +5,7 @@
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"localdev": "vite",
|
||||
"localdev": "vite --mode localdev",
|
||||
"build": "run-p type-check \"build-only {@}\" --",
|
||||
"buildtest": "run-p type-check \"build-only-test {@}\" --",
|
||||
"preview": "vite preview",
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
</h1>
|
||||
<div class="section-header-buttons-c">
|
||||
<icon-button
|
||||
toRoute="/piyangolar/piyango-listesi"
|
||||
@click="goToListWithFilter"
|
||||
icon="list"
|
||||
iconClass="ico-section ico-section-header-btn" />
|
||||
</div>
|
||||
@ -60,9 +60,11 @@
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
import { useDateStore } from '@/stores/dateStore'
|
||||
import { useRouter } from 'vue-router'
|
||||
import icourl from '@/assets/images/icons.svg'
|
||||
|
||||
const dateStore = useDateStore()
|
||||
const router = useRouter()
|
||||
|
||||
const props = defineProps<{
|
||||
tableData: Record<string, any>
|
||||
@ -76,6 +78,7 @@
|
||||
dateKey: string
|
||||
iconBack: string
|
||||
total: number
|
||||
filterParams?: Record<string, any>
|
||||
}>()
|
||||
const totalData = ref<number>(props.total)
|
||||
|
||||
@ -92,4 +95,18 @@
|
||||
const OnClick = (e: Event, row: object) => {
|
||||
emit('click', row)
|
||||
}
|
||||
|
||||
const goToListWithFilter = () => {
|
||||
const query: Record<string, any> = {}
|
||||
|
||||
// Filtre parametrelerini query'ye ekle
|
||||
if (props.filterParams) {
|
||||
Object.assign(query, props.filterParams)
|
||||
}
|
||||
|
||||
router.push({
|
||||
path: '/piyangolar/piyango-listesi',
|
||||
query: query
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="breadcrumb-wrapper">
|
||||
<icon-button
|
||||
@click="$router.go(-1)"
|
||||
@click="props.go ? $router.push(go!) : $router.go(-1)"
|
||||
icon="arrow"
|
||||
classList="breadcrumbs-back breadcrumb-link" />
|
||||
<div class="breadcrumbs-list">
|
||||
@ -13,5 +13,6 @@
|
||||
<script setup lang="ts">
|
||||
const props = defineProps<{
|
||||
currentPageText: string
|
||||
go?: string
|
||||
}>()
|
||||
</script>
|
||||
|
||||
@ -138,7 +138,8 @@
|
||||
</div>
|
||||
<data-table-pagination
|
||||
v-if="pagination !== undefined && showPagination && !isPreview"
|
||||
v-model:pagination="localPagination" />
|
||||
v-model:pagination="localPagination"
|
||||
:isUseRoute="isUseRoute" />
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive, computed, watch } from 'vue'
|
||||
@ -146,6 +147,9 @@
|
||||
import { useGlobalStore } from '@/stores/globalStore'
|
||||
import icourl from '@/assets/images/icons.svg'
|
||||
const globalStore = useGlobalStore()
|
||||
import { useRouter, useRoute } from 'vue-router'
|
||||
const router = useRouter()
|
||||
const route = useRoute()
|
||||
|
||||
interface ITableHead {
|
||||
[key: string]: any
|
||||
@ -178,12 +182,14 @@
|
||||
rowActions?: Record<string, any>[]
|
||||
actionFixed?: boolean
|
||||
rowActionStyle?: string
|
||||
isUseRoute?: boolean
|
||||
}
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
tableData: () => [],
|
||||
rowNumber: false,
|
||||
isPreview: false,
|
||||
actionFixed: false
|
||||
actionFixed: false,
|
||||
isUseRoute: false
|
||||
})
|
||||
|
||||
const emit = defineEmits(['update:sortData', 'update:pagination'])
|
||||
@ -254,9 +260,19 @@
|
||||
localSort.value.sortColumn = d.name
|
||||
localSort.value.sortOrder = 'desc'
|
||||
}
|
||||
if (props.isUseRoute) {
|
||||
router.push({
|
||||
query: {
|
||||
...route.query,
|
||||
sortColumn: localSort.value.sortColumn,
|
||||
sortOrder: localSort.value.sortOrder
|
||||
}
|
||||
})
|
||||
}
|
||||
emit('update:sortData', localSort.value)
|
||||
}
|
||||
}
|
||||
|
||||
const CellData = (d: Record<string, any>, key: string): any => {
|
||||
if (d[key] === null) return d
|
||||
else return d[key]
|
||||
|
||||
@ -29,10 +29,13 @@
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, computed } from 'vue'
|
||||
import { ref, onBeforeMount, watch } from 'vue'
|
||||
import type { Ref } from 'vue'
|
||||
import { useGlobalStore } from '@/stores/globalStore'
|
||||
import { useValidationStore } from '@/stores/validationStore'
|
||||
import { useRouter, useRoute } from 'vue-router'
|
||||
const router = useRouter()
|
||||
const route = useRoute()
|
||||
|
||||
const globalStore = useGlobalStore()
|
||||
const validationStore = useValidationStore()
|
||||
@ -45,9 +48,11 @@
|
||||
|
||||
export interface Props {
|
||||
pagination: IPagination
|
||||
isUseRoute?: boolean
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
isUseRoute: false
|
||||
})
|
||||
|
||||
const emit = defineEmits(['update:pagination'])
|
||||
@ -66,6 +71,14 @@
|
||||
if (Number(pageNumber.value) < totalPage()) pageNumber.value++
|
||||
}
|
||||
localPagination.value.pageNumber = pageNumber.value
|
||||
if (props.isUseRoute) {
|
||||
router.push({
|
||||
query: {
|
||||
...route.query,
|
||||
pageNumber: pageNumber.value
|
||||
}
|
||||
})
|
||||
}
|
||||
emit('update:pagination', localPagination.value)
|
||||
}
|
||||
|
||||
@ -85,4 +98,22 @@
|
||||
localPagination.value.pageNumber = pageNumber.value
|
||||
emit('update:pagination', localPagination.value)
|
||||
}
|
||||
const SetPageNumber = () => {
|
||||
if (props.isUseRoute) {
|
||||
if (route.query.pageNumber !== undefined && route.query.pageNumber !== '') {
|
||||
localPagination.value.pageNumber = pageNumber.value = Number(
|
||||
route.query.pageNumber
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
onBeforeMount(() => {
|
||||
SetPageNumber()
|
||||
})
|
||||
watch(
|
||||
() => route.query.pageNumber,
|
||||
() => {
|
||||
SetPageNumber()
|
||||
}
|
||||
)
|
||||
</script>
|
||||
|
||||
@ -214,9 +214,8 @@
|
||||
} else {
|
||||
let text = props.listData.filter((v: Record<string, any>) => {
|
||||
let val = props.listVal !== undefined ? v[props.listVal] : v
|
||||
return localValue.value === val
|
||||
return String(localValue.value) === String(val)
|
||||
})[0]
|
||||
|
||||
return text !== undefined
|
||||
? props.listText !== undefined
|
||||
? text[props.listText]
|
||||
@ -357,7 +356,7 @@
|
||||
|
||||
const SetSelectedOption = () => {
|
||||
selectedOption.value = props.listData.filter((v: Record<string, any>) => {
|
||||
return v[props.listVal as string] === props.modelValue
|
||||
return String(v[props.listVal as string]) === String(props.modelValue)
|
||||
})[0]
|
||||
}
|
||||
|
||||
|
||||
@ -120,13 +120,17 @@
|
||||
:isPreview="isPreview"
|
||||
:rowActions="rowActions"
|
||||
:actionFixed="actionFixed"
|
||||
:rowActionStyle="rowActionStyle" />
|
||||
:rowActionStyle="rowActionStyle"
|
||||
:isUseRoute="isUseRoute" />
|
||||
</slot>
|
||||
</div>
|
||||
|
||||
<panel-wrapper v-if="filterPanel" v-model="filterPanel" :panel-title="'Filtreleme'">
|
||||
<template #panelContent>
|
||||
<panel-filter :filterHead="tableHeader" v-model:filterParams="localFilterParams" />
|
||||
<panel-filter
|
||||
:filterHead="tableHeader"
|
||||
v-model:filterParams="localFilterParams"
|
||||
:isUseRoute="isUseRoute" />
|
||||
</template>
|
||||
<template #footerButton>
|
||||
<div class="button-c button-save" @click="FilterData">Filtrele</div>
|
||||
@ -140,8 +144,11 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive, onBeforeMount, watch, computed } from 'vue'
|
||||
import { ref, reactive, onBeforeMount, watch, computed, nextTick } from 'vue'
|
||||
import axios from 'axios'
|
||||
import { useRouter, useRoute } from 'vue-router'
|
||||
const router = useRouter()
|
||||
const route = useRoute()
|
||||
|
||||
import { useGlobalStore } from '@/stores/globalStore'
|
||||
const globalStore = useGlobalStore()
|
||||
@ -201,6 +208,7 @@
|
||||
rowActions?: Record<string, any>[]
|
||||
actionFixed?: boolean
|
||||
rowActionStyle?: string
|
||||
isUseRoute?: boolean
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
@ -213,7 +221,8 @@
|
||||
search: true,
|
||||
rowNumber: false,
|
||||
isPreview: false,
|
||||
actionFixed:false
|
||||
actionFixed: false,
|
||||
isUseRoute: false
|
||||
})
|
||||
|
||||
const emit = defineEmits([
|
||||
@ -238,6 +247,7 @@
|
||||
const localPagination = ref<IPagination>({} as IPagination)
|
||||
const localTotalValues = reactive<Record<string, any>>({})
|
||||
const searchFieldPos = ref<string>('')
|
||||
const localLoaded = ref<boolean>(false)
|
||||
|
||||
if (props.totalValues !== undefined) Object.assign(localTotalValues, props.totalValues)
|
||||
|
||||
@ -265,8 +275,26 @@
|
||||
}
|
||||
|
||||
const FilterData = async () => {
|
||||
Object.keys(filterParams).forEach((k) => {
|
||||
delete filterParams[k]
|
||||
})
|
||||
Object.assign(filterParams, localFilterParams.value)
|
||||
EqualObjects(filterParams, localFilterParams.value)
|
||||
|
||||
if (props.isUseRoute) {
|
||||
Object.keys(route.query).forEach((k) => {
|
||||
if (k.includes('Filters[')) delete route.query[k]
|
||||
})
|
||||
const q = {
|
||||
query: {
|
||||
...route.query
|
||||
}
|
||||
}
|
||||
Object.keys(filterParams).forEach((f, k) => {
|
||||
q.query['Filters[' + f + ']'] = filterParams[f].op + filterParams[f].val
|
||||
})
|
||||
router.push(q)
|
||||
}
|
||||
setTimeout(async () => {
|
||||
await GetLocalData()
|
||||
filterPanel.value = false
|
||||
@ -289,6 +317,11 @@
|
||||
const RemoveFilterKey = (k: string) => {
|
||||
delete localFilterParams.value[k]
|
||||
delete filterParams[k]
|
||||
const query: Record<string, any> = { ...route.query }
|
||||
Object.keys(query).forEach((q) => {
|
||||
if (q.includes(k)) delete query[q]
|
||||
})
|
||||
router.push({ query: query })
|
||||
GetLocalData()
|
||||
}
|
||||
const RemoveSearch = () => {
|
||||
@ -296,8 +329,127 @@
|
||||
searched.value = false
|
||||
GetLocalData()
|
||||
}
|
||||
const pageNumberChanging = ref<boolean>(false)
|
||||
const sortChanging = ref<boolean>(false)
|
||||
const searchChanging = ref<boolean>(false)
|
||||
const filterChanging = ref<boolean>(false)
|
||||
|
||||
const RoutePageControl = () => {
|
||||
if (props.isUseRoute) {
|
||||
const q = { ...route.query }
|
||||
pageNumberChanging.value = true
|
||||
|
||||
if (q.pageNumber !== undefined && q.pageNumber !== '') {
|
||||
localPagination.value.pageNumber = Number(q.pageNumber)
|
||||
} else {
|
||||
q.pageNumber = String(1)
|
||||
localPagination.value.pageNumber = localPagination.value.pageNumber || 1
|
||||
}
|
||||
|
||||
router.push({ query: q })
|
||||
nextTick(() => {
|
||||
pageNumberChanging.value = false
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
const RouteSortControl = () => {
|
||||
if (props.isUseRoute) {
|
||||
const q = { ...route.query }
|
||||
sortChanging.value = true
|
||||
if (q.sortOrder !== undefined && q.sortOrder !== null && q.sortOrder !== '') {
|
||||
localSort.value.sortColumn = q.sortColumn as string
|
||||
localSort.value.sortOrder = q.sortOrder as string
|
||||
} else {
|
||||
delete q.sortOrder
|
||||
delete q.sortColumn
|
||||
delete localSort.value.sortColumn
|
||||
delete localSort.value.sortOrder
|
||||
}
|
||||
router.push({ query: q })
|
||||
nextTick(() => {
|
||||
sortChanging.value = false
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
const RouteSearchControl = () => {
|
||||
if (props.isUseRoute) {
|
||||
const q = { ...route.query }
|
||||
searchChanging.value = true
|
||||
if (
|
||||
q.searchString !== undefined &&
|
||||
q.searchString !== null &&
|
||||
q.searchString !== ''
|
||||
) {
|
||||
localQuery.value = q.searchString as string
|
||||
} else {
|
||||
localQuery.value = ''
|
||||
delete q.searchString
|
||||
}
|
||||
router.push({ query: q })
|
||||
nextTick(() => {
|
||||
searchChanging.value = false
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
const RouteFilterControl = () => {
|
||||
if (props.isUseRoute) {
|
||||
const q = { ...route.query }
|
||||
localFilterParams.value = {}
|
||||
Object.keys(filterParams).forEach((k) => {
|
||||
delete filterParams[k]
|
||||
})
|
||||
filterChanging.value = true
|
||||
if (Object.keys(route.query).length > 0) {
|
||||
Object.keys(route.query).forEach((key) => {
|
||||
if (key.includes('Filters[')) {
|
||||
const newKey = key.match(/(?<=\[)[^\]]+(?=\])/)![0]
|
||||
filterParams[newKey] = {}
|
||||
localFilterParams.value[newKey] = {}
|
||||
|
||||
filterParams[newKey].op = (route.query[key]! as string).charAt(0)
|
||||
localFilterParams.value[newKey].op = (route.query[key]! as string).charAt(0)
|
||||
|
||||
filterParams[newKey].val = (route.query[key]! as string).slice(1)
|
||||
localFilterParams.value[newKey].val = (route.query[key]! as string).slice(1)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
props.tableHeader.forEach((head: Record<string, any>) => {
|
||||
if (head.filter !== undefined) {
|
||||
Object.keys(filterParams).forEach((key) => {
|
||||
if (
|
||||
(head.filter.filterId !== undefined && key === head.filter.filterId) ||
|
||||
key === head.name
|
||||
) {
|
||||
filterParams[key].title = head.title
|
||||
localFilterParams.value[key].title = head.title
|
||||
if (
|
||||
head.filter.type === 'select' &&
|
||||
head.filter.data !== undefined &&
|
||||
head.filter.data.length > 0
|
||||
) {
|
||||
const forText = head.filter.data.find((o: Record<string, any>) => {
|
||||
return String(o[head.filter.listVal]) === String(filterParams[key].val)
|
||||
})
|
||||
filterParams[key].text = forText[head.filter.listText]
|
||||
localFilterParams.value[key].text = forText[head.filter.listText]
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
nextTick(() => {
|
||||
filterChanging.value = false
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
const GetLocalData = async () => {
|
||||
console.log("GetLocalData",selectedExport.value)
|
||||
localLoaded.value = false
|
||||
if (selectedExport.value !== null) {
|
||||
let exportUrl = ''
|
||||
let fileType = ''
|
||||
@ -316,8 +468,6 @@
|
||||
fileName = 'export.xlsx'
|
||||
}
|
||||
|
||||
console.log("dataStore",dataStore)
|
||||
|
||||
// Axios ile dosya indirme - interceptor otomatik olarak token ekleyecek
|
||||
try {
|
||||
const response = await axios.get(exportUrl, {
|
||||
@ -392,6 +542,9 @@
|
||||
}
|
||||
emit('update:refresh', false)
|
||||
}
|
||||
nextTick(() => {
|
||||
localLoaded.value = true
|
||||
})
|
||||
}
|
||||
const OpenMobileButtons = () => {
|
||||
searchForm.value = false
|
||||
@ -422,6 +575,14 @@
|
||||
const SearchQuery = () => {
|
||||
if (props.apiList !== undefined) GetLocalData()
|
||||
else emit('update:query', localQuery.value)
|
||||
if (props.isUseRoute) {
|
||||
router.push({
|
||||
query: {
|
||||
...route.query,
|
||||
searchString: localQuery.value
|
||||
}
|
||||
})
|
||||
}
|
||||
searchForm.value = false
|
||||
searched.value = true
|
||||
}
|
||||
@ -429,9 +590,39 @@
|
||||
searchForm.value = false
|
||||
mobileButtons.value = false
|
||||
}
|
||||
|
||||
// Filtre başlığını almak için yardımcı fonksiyon
|
||||
const getFilterTitle = (key: string): string => {
|
||||
const filterTitles: Record<string, string> = {
|
||||
'durumId': 'Durum',
|
||||
'piyangoAmacId': 'Piyango Amacı',
|
||||
'cekilisYontemiId': 'Çekiliş Yöntemi'
|
||||
}
|
||||
return filterTitles[key] || key
|
||||
}
|
||||
|
||||
onBeforeMount(() => {
|
||||
if (globalStore.screenWidth >= globalStore.breakPoints.tabletp)
|
||||
mobileButtons.value = true
|
||||
RoutePageControl()
|
||||
RouteSortControl()
|
||||
RouteSearchControl()
|
||||
RouteFilterControl()
|
||||
|
||||
// URL query parametrelerini kontrol et ve filtreleri uygula (ilk istekten önce)
|
||||
if (Object.keys(route.query).length > 0) {
|
||||
Object.keys(route.query).forEach(key => {
|
||||
const value = route.query[key]
|
||||
if (value && typeof value === 'string') {
|
||||
// Filtre parametresini filterParams'a ekle
|
||||
filterParams[key] = {
|
||||
val: value,
|
||||
op: '=',
|
||||
title: getFilterTitle(key)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
if (props.apiList !== undefined) GetLocalData()
|
||||
|
||||
@ -439,18 +630,38 @@
|
||||
})
|
||||
|
||||
watch(
|
||||
() => localSort.value,
|
||||
() => [localSort.value],
|
||||
() => {
|
||||
if (!sortChanging.value) GetLocalData()
|
||||
},
|
||||
{ deep: true }
|
||||
)
|
||||
watch(
|
||||
() => [route],
|
||||
() => {
|
||||
RoutePageControl()
|
||||
RouteSortControl()
|
||||
RouteSearchControl()
|
||||
RouteFilterControl()
|
||||
GetLocalData()
|
||||
},
|
||||
{ deep: true }
|
||||
)
|
||||
|
||||
watch(
|
||||
() => localPagination.value.pageNumber,
|
||||
() => {
|
||||
if (!pageNumberChanging.value) {
|
||||
GetLocalData()
|
||||
}
|
||||
}
|
||||
)
|
||||
watch(
|
||||
() => localPagination.value.pageNumber,
|
||||
() => {
|
||||
if (!pageNumberChanging.value) {
|
||||
GetLocalData()
|
||||
}
|
||||
}
|
||||
)
|
||||
watch(
|
||||
() => props.refresh,
|
||||
@ -461,8 +672,9 @@
|
||||
watch(
|
||||
() => localQuery.value,
|
||||
() => {
|
||||
if (props.apiList !== undefined && localQuery.value.length === 0) GetLocalData()
|
||||
else if (localQuery.value.length === 0) emit('update:query', localQuery.value)
|
||||
if (props.apiList !== undefined && localQuery.value.length === 0) {
|
||||
if (!searchChanging.value) GetLocalData()
|
||||
} else if (localQuery.value.length === 0) emit('update:query', localQuery.value)
|
||||
}
|
||||
)
|
||||
watch(
|
||||
|
||||
@ -49,7 +49,7 @@
|
||||
:listVal="filter.filter.listVal"
|
||||
:extraData="filter"
|
||||
:label="filter.title"
|
||||
v-model="localFilterData[filter.filter.filterId || filter.name]"
|
||||
v-model="localFilterData[filter.filter.filterId || filter.name] as number"
|
||||
@change="UpdateFilterSelect"
|
||||
clearable />
|
||||
</div>
|
||||
@ -58,11 +58,15 @@
|
||||
</template>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive, onBeforeMount } from 'vue'
|
||||
import { ref, reactive, onBeforeMount, nextTick } from 'vue'
|
||||
import { useRouter, useRoute } from 'vue-router'
|
||||
const router = useRouter()
|
||||
const route = useRoute()
|
||||
|
||||
const props = defineProps<{
|
||||
filterHead: Record<string, any>
|
||||
filterParams: Record<string, any>
|
||||
isUseRoute?: boolean
|
||||
}>()
|
||||
|
||||
const emit = defineEmits(['update:filterParams'])
|
||||
@ -117,6 +121,7 @@
|
||||
}
|
||||
emit('update:filterParams', localFilterParams)
|
||||
}
|
||||
|
||||
onBeforeMount(() => {
|
||||
createFilterData()
|
||||
})
|
||||
|
||||
@ -32,19 +32,24 @@
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, computed, onMounted, watch } from 'vue'
|
||||
import { ref, computed, onMounted, onBeforeMount, watch } from 'vue'
|
||||
import { useGlobalStore } from '@/stores/globalStore'
|
||||
const globalStore = useGlobalStore()
|
||||
import { useRouter, useRoute } from 'vue-router'
|
||||
const router = useRouter()
|
||||
const route = useRoute()
|
||||
|
||||
interface TabObj {
|
||||
[key: string]: any
|
||||
text: string
|
||||
id: string
|
||||
}
|
||||
|
||||
const props = defineProps<{
|
||||
export interface Props {
|
||||
tabList: TabObj[]
|
||||
}>()
|
||||
isUseRoute?: boolean
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), { isUseRoute: false })
|
||||
|
||||
const currentTab = ref<number>(0)
|
||||
const rnd = ref<number>(Math.ceil(Number(Math.random() * 1000000000)))
|
||||
@ -79,6 +84,11 @@
|
||||
} else {
|
||||
currentTab.value = Number(d)
|
||||
}
|
||||
if (props.isUseRoute) {
|
||||
router.push({
|
||||
params: { ...route.params, tabid: props.tabList[currentTab.value].id }
|
||||
})
|
||||
}
|
||||
CalculateNavPosition()
|
||||
}
|
||||
const TabWidth = () => {
|
||||
@ -96,14 +106,31 @@
|
||||
TabWidth()
|
||||
CalculateNavPosition()
|
||||
}
|
||||
const RouteTabControl = () => {
|
||||
if (props.isUseRoute) {
|
||||
if (route.params.tabid !== undefined && route.params.tabid !== '') {
|
||||
currentTab.value = props.tabList.findIndex((t) => t.id === route.params.tabid)
|
||||
}
|
||||
}
|
||||
}
|
||||
onMounted(() => {
|
||||
TabWidth()
|
||||
window.addEventListener('resize', Resize)
|
||||
})
|
||||
onBeforeMount(() => {
|
||||
RouteTabControl()
|
||||
})
|
||||
watch(
|
||||
() => globalStore.sideMenu,
|
||||
() => {
|
||||
TabWidth()
|
||||
}
|
||||
)
|
||||
watch(
|
||||
() => route.params.tabid,
|
||||
(t) => {
|
||||
RouteTabControl()
|
||||
},
|
||||
{ immediate: true }
|
||||
)
|
||||
</script>
|
||||
|
||||
@ -48,7 +48,7 @@ axios.interceptors.response.use(
|
||||
const token = sessionStorage.getItem(usersStore.userStorageKeys.TOKEN)
|
||||
if (token !== undefined) {
|
||||
usersStore.ResetUserData()
|
||||
router.push('/login')
|
||||
router.push('/giris')
|
||||
}
|
||||
}
|
||||
return Promise.reject(error)
|
||||
|
||||
@ -71,7 +71,7 @@
|
||||
let dt = await dataStore.dataPost('Auth/logout')
|
||||
}
|
||||
usersStore.ResetUserData()
|
||||
router.push('/login')
|
||||
router.push('/giris')
|
||||
}
|
||||
|
||||
const closeProfileMenu = (e: Event) => {
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import ForgotPassword from '@/module/auth/views/ForgotPassword.vue'
|
||||
|
||||
export default {
|
||||
path: '/forgot-password',
|
||||
path: '/sifremi-unuttum',
|
||||
name: 'ForgotPassword',
|
||||
component: ForgotPassword,
|
||||
meta: {
|
||||
|
||||
@ -1,11 +1,6 @@
|
||||
import Login from "@/module/auth/routes/login";
|
||||
import Register from "@/module/auth/routes/register";
|
||||
import ForgotPassword from "@/module/auth/routes/forgot-password";
|
||||
|
||||
export default [
|
||||
Login,
|
||||
Register,
|
||||
ForgotPassword
|
||||
]
|
||||
|
||||
import Login from '@/module/auth/routes/login'
|
||||
import Register from '@/module/auth/routes/register'
|
||||
import ForgotPassword from '@/module/auth/routes/forgot-password'
|
||||
import ResetPassword from '@/module/auth/routes/reset-password'
|
||||
|
||||
export default [Login, Register, ForgotPassword, ResetPassword]
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import Login from '@/module/auth/views/Login.vue'
|
||||
|
||||
export default {
|
||||
path: '/login',
|
||||
path: '/giris',
|
||||
name: 'Login',
|
||||
component: Login,
|
||||
meta: {
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import Register from '@/module/auth/views/Register.vue'
|
||||
|
||||
export default {
|
||||
path: '/register',
|
||||
path: '/kayit-ol',
|
||||
name: 'Register',
|
||||
component: Register,
|
||||
meta: {
|
||||
|
||||
10
src/module/auth/routes/reset-password.ts
Normal file
10
src/module/auth/routes/reset-password.ts
Normal file
@ -0,0 +1,10 @@
|
||||
import ResetPassword from '@/module/auth/views/ResetPassword.vue'
|
||||
|
||||
export default {
|
||||
path: '/sifreyi-sifirla',
|
||||
name: 'ResetPassword',
|
||||
component: ResetPassword,
|
||||
meta: {
|
||||
authpage: true
|
||||
}
|
||||
}
|
||||
@ -1,17 +1,59 @@
|
||||
import { defineStore } from 'pinia'
|
||||
import { useDataStore } from '@/stores/dataStore'
|
||||
import { useAuthStore } from '../stores/authStore'
|
||||
import { useAuthValidationStore } from '../validation/authValidationStore'
|
||||
import { useUsersStore } from '@/stores/usersStore'
|
||||
import router from '@/router'
|
||||
|
||||
export const useAppService = defineStore('appService', () => {
|
||||
export const useAuthService = defineStore('authService', () => {
|
||||
const dataStore = useDataStore()
|
||||
const authStore = useAuthStore()
|
||||
const authValidationStore = useAuthValidationStore()
|
||||
const usersStore = useUsersStore()
|
||||
|
||||
const GetAAuthRoleList = async () => {
|
||||
if (authStore.rolesList.length === 0) {
|
||||
let data = await dataStore.dataGet('Auth/rolelistesi')
|
||||
authStore.rolesList = data
|
||||
}
|
||||
}
|
||||
|
||||
return {GetAAuthRoleList}
|
||||
const Login = async () => {
|
||||
if (authValidationStore.LoginFormCheck()) {
|
||||
let login = await dataStore.dataPost('Auth/login', {
|
||||
data: authStore.loginData
|
||||
})
|
||||
Object.assign(authStore.loginData, authStore.safeLoginData)
|
||||
if (login !== 'errorfalse') {
|
||||
await usersStore.SetUserSessionData(login)
|
||||
await usersStore.SetUserData()
|
||||
|
||||
if (usersStore.isPanelUser) {
|
||||
router.push('/')
|
||||
} else {
|
||||
if (usersStore.userStatus === 0 || usersStore.userStatus === null) {
|
||||
router.push('/profil')
|
||||
} else {
|
||||
router.push('/')
|
||||
}
|
||||
}
|
||||
} else {
|
||||
authValidationStore.loginMessageType = 'alert'
|
||||
authValidationStore.loginMessage =
|
||||
'Kullanıcı adı veya şifrenizi yanlış girdiniz. Lütfen kontrol edip tekrar deneyiniz.'
|
||||
authValidationStore.isLoginMessage = true
|
||||
}
|
||||
} else {
|
||||
authValidationStore.isLoginFormValid = true
|
||||
}
|
||||
}
|
||||
|
||||
const ResetPassword = async () => {
|
||||
if (authValidationStore.ResetPasswordFormCheck()) {
|
||||
let dt: any
|
||||
|
||||
dt = await dataStore.dataPost('ResetPassword', {
|
||||
data: authStore.resetPasswordForm
|
||||
})
|
||||
if (dt !== 'errorfalse') {
|
||||
}
|
||||
} else {
|
||||
authValidationStore.isResetPasswordFormValid = true
|
||||
}
|
||||
}
|
||||
|
||||
return { Login, ResetPassword }
|
||||
})
|
||||
|
||||
@ -5,8 +5,15 @@ export const useAuthStore = defineStore('authStore', () => {
|
||||
const loginData = reactive<Record<string, any>>({ username: '', password: '' })
|
||||
const safeLoginData = reactive<Record<string, any>>({})
|
||||
const rolesList = ref<Record<string, any>[]>([])
|
||||
const resetCheckData = ref<string>('')
|
||||
|
||||
const resetPasswordForm = reactive<Record<string, any>>({
|
||||
newPassword: '',
|
||||
newPasswordRepeat: '',
|
||||
check: ''
|
||||
})
|
||||
|
||||
Object.assign(safeLoginData, loginData)
|
||||
|
||||
return { loginData, safeLoginData, rolesList }
|
||||
return { loginData, safeLoginData, rolesList, resetPasswordForm, resetCheckData }
|
||||
})
|
||||
|
||||
@ -1,46 +0,0 @@
|
||||
import { defineStore } from 'pinia'
|
||||
import { ref, reactive } from 'vue'
|
||||
import { useAuthStore } from './authStore'
|
||||
import { useValidationStore } from '@/stores/validationStore'
|
||||
|
||||
export const useAuthValidationStore = defineStore('authValidationStore', () => {
|
||||
const authStore = useAuthStore()
|
||||
const validationStore = useValidationStore()
|
||||
|
||||
const isFormValid = ref<boolean>(true)
|
||||
const isLoginMessage = ref<boolean>(false)
|
||||
const loginMessageType = ref<string>('success')
|
||||
const loginMessage = ref<string>('')
|
||||
const registerMessage = ref<string>('')
|
||||
const invalidTexts = reactive<Record<string, any>>({})
|
||||
|
||||
const FormCheck = (): boolean => {
|
||||
Object.assign(invalidTexts, {})
|
||||
|
||||
validationStore.IsFieldEmpty(
|
||||
authStore.loginData,
|
||||
invalidTexts,
|
||||
'username',
|
||||
'Kullanıcı adı alanını doldurmalısınız. Örn: isim@alanadi.td'
|
||||
)
|
||||
validationStore.IsFieldEmpty(
|
||||
authStore.loginData,
|
||||
invalidTexts,
|
||||
'password',
|
||||
'Lütfen şifrenizi giriniz.'
|
||||
)
|
||||
|
||||
isFormValid.value = Object.keys(invalidTexts).length === 0
|
||||
return isFormValid.value
|
||||
}
|
||||
|
||||
return {
|
||||
isFormValid,
|
||||
invalidTexts,
|
||||
isLoginMessage,
|
||||
loginMessageType,
|
||||
loginMessage,
|
||||
registerMessage,
|
||||
FormCheck
|
||||
}
|
||||
})
|
||||
89
src/module/auth/validation/authValidationStore.ts
Normal file
89
src/module/auth/validation/authValidationStore.ts
Normal file
@ -0,0 +1,89 @@
|
||||
import { defineStore } from 'pinia'
|
||||
import { ref, reactive } from 'vue'
|
||||
import { useValidationStore } from '@/stores/validationStore'
|
||||
import { useAuthStore } from '../stores/authStore'
|
||||
|
||||
export const useAuthValidationStore = defineStore('authValidationStore', () => {
|
||||
const validationStore = useValidationStore()
|
||||
const authStore = useAuthStore()
|
||||
|
||||
const isLoginMessage = ref<boolean>(false)
|
||||
const loginMessageType = ref<string>('success')
|
||||
const loginMessage = ref<string>('')
|
||||
const registerMessage = ref<string>('')
|
||||
|
||||
const loginInvalidTexts = reactive<Record<string, any>>({})
|
||||
const isLoginFormValid = ref<boolean>(true)
|
||||
const resetPasswordFormChanged = ref<boolean>(false)
|
||||
const isResetPasswordFormValid = ref<boolean>(true)
|
||||
const resetPasswordInvalidTexts = reactive<Record<string, any>>({})
|
||||
|
||||
const LoginFormCheck = (): boolean => {
|
||||
Object.assign(loginInvalidTexts, {})
|
||||
|
||||
validationStore.IsFieldEmpty(
|
||||
authStore.loginData,
|
||||
loginInvalidTexts,
|
||||
'username',
|
||||
'Kullanıcı adı alanını doldurmalısınız. Örn: isim@alanadi.td'
|
||||
)
|
||||
validationStore.IsFieldEmpty(
|
||||
authStore.loginData,
|
||||
loginInvalidTexts,
|
||||
'password',
|
||||
'Lütfen şifrenizi giriniz.'
|
||||
)
|
||||
|
||||
isLoginFormValid.value = Object.keys(loginInvalidTexts).length === 0
|
||||
return isLoginFormValid.value
|
||||
}
|
||||
|
||||
const ResetPasswordFormCheck = (): boolean => {
|
||||
Object.assign(resetPasswordInvalidTexts, {})
|
||||
|
||||
validationStore.IsFieldEmpty(
|
||||
authStore.resetPasswordForm,
|
||||
resetPasswordInvalidTexts,
|
||||
'newPassword',
|
||||
'Lütfen yeni şifrenizi giriniz.'
|
||||
)
|
||||
|
||||
validationStore.IsFieldEmpty(
|
||||
authStore.resetPasswordForm,
|
||||
resetPasswordInvalidTexts,
|
||||
'newPasswordRepeat',
|
||||
'Lütfen yeni şifrenizi tekrar giriniz.'
|
||||
)
|
||||
|
||||
if (
|
||||
!validationStore.checkEmpty(authStore.resetPasswordForm.newPassword) &&
|
||||
!validationStore.checkEmpty(authStore.resetPasswordForm.newPasswordRepeat)
|
||||
) {
|
||||
if (
|
||||
authStore.resetPasswordForm.newPassword !==
|
||||
authStore.resetPasswordForm.newPasswordRepeat
|
||||
) {
|
||||
isResetPasswordFormValid.value = false
|
||||
resetPasswordInvalidTexts.newPasswordRepeat =
|
||||
'Şifrenizi tekrar doğru girdiğinizden emin olunuz.'
|
||||
}
|
||||
}
|
||||
|
||||
isResetPasswordFormValid.value = Object.keys(resetPasswordInvalidTexts).length === 0
|
||||
return isResetPasswordFormValid.value
|
||||
}
|
||||
|
||||
return {
|
||||
isLoginMessage,
|
||||
loginMessageType,
|
||||
loginMessage,
|
||||
loginInvalidTexts,
|
||||
registerMessage,
|
||||
isLoginFormValid,
|
||||
resetPasswordFormChanged,
|
||||
isResetPasswordFormValid,
|
||||
resetPasswordInvalidTexts,
|
||||
LoginFormCheck,
|
||||
ResetPasswordFormCheck
|
||||
}
|
||||
})
|
||||
@ -24,7 +24,7 @@
|
||||
</button>
|
||||
</form>
|
||||
<div class="login-nav login-nav-back">
|
||||
<RouterLink to="/login">< Geri</RouterLink>
|
||||
<RouterLink to="/giris">< Geri</RouterLink>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@ -3,14 +3,12 @@
|
||||
<section class="section-login">
|
||||
<div class="login-header">
|
||||
<div class="logo-header">
|
||||
<img
|
||||
src="@/assets/images/cekilisevi-logo-n.png"
|
||||
alt="MPI Çekiliş Evi"/>
|
||||
<img src="@/assets/images/cekilisevi-logo-n.png" alt="MPI Çekiliş Evi" />
|
||||
</div>
|
||||
<h1>Giriş Yap</h1>
|
||||
</div>
|
||||
<div class="section-content">
|
||||
<form action="#" id="login-form" @submit.prevent="Login">
|
||||
<form action="#" id="login-form" @submit.prevent="authService.Login">
|
||||
<form-input
|
||||
type="email"
|
||||
modelKey="username"
|
||||
@ -18,12 +16,11 @@
|
||||
required
|
||||
label="Kullanıcı Adı (e-posta adresi)"
|
||||
placeholder="eposta@alanadi.com"
|
||||
:invalidText="authValidationStore.invalidTexts.username" />
|
||||
:invalidText="authValidationStore.loginInvalidTexts.username" />
|
||||
|
||||
<form-input
|
||||
type="password"
|
||||
label="Şifre"
|
||||
|
||||
v-model="authStore.loginData.password"
|
||||
required />
|
||||
|
||||
@ -32,63 +29,37 @@
|
||||
v-if="authValidationStore.isLoginMessage">
|
||||
<span>{{ authValidationStore.loginMessage }}</span>
|
||||
</div>
|
||||
<button class="button-c button-second button-login" type="submit">
|
||||
<button
|
||||
class="button-c button-second button-login"
|
||||
type="submit"
|
||||
@submit="authService.Login"
|
||||
@click="authService.Login">
|
||||
Giriş Yap
|
||||
</button>
|
||||
</form>
|
||||
<div class="login-nav">
|
||||
<RouterLink to="/forgot-password">Şifremi Unuttum</RouterLink>
|
||||
<RouterLink to="/register">Kaydol</RouterLink>
|
||||
<RouterLink to="/sifremi-unuttum">Şifremi Unuttum</RouterLink>
|
||||
<RouterLink to="/kayit-ol">Kayıt Ol</RouterLink>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</GuestLayout>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { onBeforeMount, reactive, ref } from 'vue'
|
||||
import { onBeforeMount } from 'vue'
|
||||
|
||||
import { useUsersStore } from '@/stores/usersStore'
|
||||
const usersStore = useUsersStore()
|
||||
import { useDataStore } from '@/stores/dataStore'
|
||||
const dataStore = useDataStore()
|
||||
import { useAuthStore } from '../stores/authStore'
|
||||
const authStore = useAuthStore()
|
||||
import { useAuthValidationStore } from '../stores/authValidationStore'
|
||||
import { useAuthValidationStore } from '../validation/authValidationStore'
|
||||
const authValidationStore = useAuthValidationStore()
|
||||
import { useAuthService } from '../services/authService'
|
||||
const authService = useAuthService()
|
||||
import router from '@/router'
|
||||
|
||||
import GuestLayout from '@/layouts/GuestLayout.vue'
|
||||
|
||||
const Login = async () => {
|
||||
if (authValidationStore.FormCheck()) {
|
||||
let login = await dataStore.dataPost('Auth/login', {
|
||||
data: authStore.loginData
|
||||
})
|
||||
Object.assign(authStore.loginData, authStore.safeLoginData)
|
||||
if (login !== 'errorfalse') {
|
||||
await usersStore.SetUserSessionData(login)
|
||||
await usersStore.SetUserData()
|
||||
|
||||
if (usersStore.isPanelUser) {
|
||||
router.push('/')
|
||||
} else {
|
||||
if (usersStore.userStatus === 0 || usersStore.userStatus === null) {
|
||||
router.push('/profil')
|
||||
} else {
|
||||
router.push('/')
|
||||
}
|
||||
}
|
||||
} else {
|
||||
authValidationStore.loginMessageType = 'alert'
|
||||
authValidationStore.loginMessage =
|
||||
'Kullanıcı adı veya şifrenizi yanlış girdiniz. Lütfen kontrol edip tekrar deneyiniz.'
|
||||
authValidationStore.isLoginMessage = true
|
||||
}
|
||||
} else {
|
||||
authValidationStore.isFormValid = true
|
||||
}
|
||||
}
|
||||
|
||||
onBeforeMount(() => {
|
||||
if (usersStore.userIsAuth) router.push('/')
|
||||
})
|
||||
|
||||
@ -339,7 +339,7 @@
|
||||
</button>
|
||||
</form>
|
||||
<div class="login-nav login-nav-back">
|
||||
<RouterLink to="/login">< Geri</RouterLink>
|
||||
<RouterLink to="/giris">< Geri</RouterLink>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@ -355,7 +355,7 @@
|
||||
const globalDataStore = useGlobalDataStore()
|
||||
import { useValidationStore } from '@/stores/validationStore'
|
||||
const validationStore = useValidationStore()
|
||||
import { useAuthValidationStore } from '../stores/authValidationStore'
|
||||
import { useAuthValidationStore } from '../validation/authValidationStore'
|
||||
const authValidationStore = useAuthValidationStore()
|
||||
import router from '@/router'
|
||||
|
||||
@ -413,7 +413,7 @@
|
||||
'Başarıyla kayıt oldunuz. Kullanıcı adı ve şifreniz ile giriş yapabilirsiniz.'
|
||||
authValidationStore.isLoginMessage = true
|
||||
|
||||
router.push('/login')
|
||||
router.push('/giris')
|
||||
}
|
||||
} else {
|
||||
uyeBilgileriStore.isFormValid = true
|
||||
|
||||
62
src/module/auth/views/ResetPassword.vue
Normal file
62
src/module/auth/views/ResetPassword.vue
Normal file
@ -0,0 +1,62 @@
|
||||
<template>
|
||||
<GuestLayout>
|
||||
<section class="section-login">
|
||||
<div class="login-header">
|
||||
<div class="logo-header">
|
||||
<img src="@/assets/images/cekilisevi-logo-n.png" alt="MPI Çekiliş Evi" />
|
||||
</div>
|
||||
<h1>Şifremi Sıfırla</h1>
|
||||
</div>
|
||||
<div class="section-content">
|
||||
<form id="sifremi-unuttum" @submit.prevent="authService.ResetPassword">
|
||||
<form-input
|
||||
type="password"
|
||||
modelKey="newPassword"
|
||||
v-model="authStore.resetPasswordForm.newPassword"
|
||||
required
|
||||
label="Yeni Şifre"
|
||||
placeholder="Yeni Şifre"
|
||||
:invalidText="authValidationStore.resetPasswordInvalidTexts.newPassword" />
|
||||
<form-input
|
||||
type="password"
|
||||
modelKey="newPasswordRepeat"
|
||||
v-model="authStore.resetPasswordForm.newPasswordRepeat"
|
||||
required
|
||||
label="Yeni Şifre Tekrar"
|
||||
placeholder="Yeni Şifre Tekrar"
|
||||
:invalidText="
|
||||
authValidationStore.resetPasswordInvalidTexts.newPasswordRepeat
|
||||
" />
|
||||
<button
|
||||
class="button-c button-second button-login"
|
||||
type="submit"
|
||||
@submit="authService.ResetPassword"
|
||||
@click="authService.ResetPassword">
|
||||
Şifremi Sıfırla
|
||||
</button>
|
||||
</form>
|
||||
<div class="login-nav login-nav-back">
|
||||
<RouterLink to="/giris">< Geri</RouterLink>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</GuestLayout>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { onMounted } from 'vue'
|
||||
import GuestLayout from '@/layouts/GuestLayout.vue'
|
||||
import { useAuthStore } from '../stores/authStore'
|
||||
const authStore = useAuthStore()
|
||||
import { useAuthService } from '../services/authService'
|
||||
const authService = useAuthService()
|
||||
import { useAuthValidationStore } from '../validation/authValidationStore'
|
||||
const authValidationStore = useAuthValidationStore()
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
onMounted(() => {
|
||||
if (route.query && route.query.check !== undefined)
|
||||
authStore.resetCheckData = route.query.check as string
|
||||
else router.push('/giris')
|
||||
})
|
||||
</script>
|
||||
@ -8,7 +8,8 @@
|
||||
:rowAction="OpenUser"
|
||||
:apiList="'Katilimci/ByCekilisId/' + piyangoStore.selectedLottery"
|
||||
v-model:pagination="paginationData"
|
||||
v-model:refresh="piyangoKatilimciStore.refreshPiyangoKatilimciList">
|
||||
v-model:refresh="piyangoKatilimciStore.refreshPiyangoKatilimciList"
|
||||
isUseRoute>
|
||||
<template #extraButtons>
|
||||
<button
|
||||
class="button-c"
|
||||
@ -117,14 +118,9 @@
|
||||
import PanelKatilimciDocument from '@/module/cekilisler/components/panel/PanelKatilimciDocument.vue'
|
||||
import PanelPiyangoKatilimci from '@/module/cekilisler/components/panel/PanelPiyangoKatilimci.vue'
|
||||
|
||||
import { useDateStore } from '@/stores/dateStore'
|
||||
|
||||
const dateStore = useDateStore()
|
||||
import { useUsersStore } from '@/stores/usersStore'
|
||||
|
||||
const usersStore = useUsersStore()
|
||||
import { useDataStore } from '@/stores/dataStore'
|
||||
|
||||
const dataStore = useDataStore()
|
||||
import { usePiyangoStore } from '../stores/piyangoStore'
|
||||
|
||||
@ -152,6 +148,8 @@
|
||||
const uploadProgressValue = ref(0)
|
||||
const uploadProgressPanel = ref(false)
|
||||
|
||||
const connectionId = ref('')
|
||||
|
||||
const tableHeader = ref<Record<string, any>[]>([
|
||||
{
|
||||
name: 'cekilisKatilimSiraNo',
|
||||
@ -256,7 +254,8 @@
|
||||
else return ''
|
||||
})
|
||||
|
||||
const AddNewDocument = () => {
|
||||
const AddNewDocument = async () => {
|
||||
connectionId.value = await connectToHub()
|
||||
dataStore.panelData = {
|
||||
title: '',
|
||||
file: ''
|
||||
@ -281,7 +280,7 @@
|
||||
piyangoKatilimciStore.katilimciUserPanel = true
|
||||
}
|
||||
const FileUpload = async () => {
|
||||
const connectionId = await connectToHub()
|
||||
// Mevcut bağlantıyı kullan (AddNewDocument'te açıldı)
|
||||
|
||||
// Progress modal'ı aç
|
||||
uploadProgressValue.value = 0
|
||||
@ -306,7 +305,7 @@
|
||||
)
|
||||
console.log(dataStore.panelData)
|
||||
const response = await dataStore.dataPost(
|
||||
`Katilimci/ExcelleYukle/${piyangoStore.selectedLottery}?connectionId=${connectionId}`,
|
||||
`Katilimci/ExcelleYukle/${piyangoStore.selectedLottery}?connectionId=${connectionId.value}`,
|
||||
{
|
||||
data: formData,
|
||||
headers: { 'Content-Type': 'multipart/form-data' }
|
||||
@ -320,25 +319,6 @@
|
||||
uploadProgressPanel.value = false
|
||||
}
|
||||
}
|
||||
// const FileUpload = async () => {
|
||||
// if (true) {
|
||||
// const formData = new FormData()
|
||||
// formData.append('excelFile', dataStore.panelData.file)
|
||||
// let dt: any
|
||||
//
|
||||
// dt = await dataStore.dataPost(
|
||||
// `Katilimci/ExcelleYukle/${piyangoStore.selectedLottery}?connectionId=${connectionId}`,
|
||||
// {
|
||||
// data: formData,
|
||||
// headers: { 'Content-Type': 'multipart/form-data' }
|
||||
// }
|
||||
// )
|
||||
// if (dt !== 'errorfalse') {
|
||||
// piyangoKatilimciStore.refreshPiyangoKatilimciList = true
|
||||
// piyangoKatilimciStore.katilimciFilePanel = false
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
const DeleteAllButton = () => {
|
||||
dialogStore.CreateDialog({
|
||||
title: 'Tüm Katılımcıları Sil',
|
||||
@ -350,7 +330,7 @@
|
||||
{
|
||||
label: 'Tüm katılımcıları Sil',
|
||||
type: 'alert',
|
||||
function: () => DeleteAll
|
||||
function: () => DeleteAll()
|
||||
}
|
||||
]
|
||||
})
|
||||
|
||||
@ -7,6 +7,7 @@
|
||||
listText="Talihli"
|
||||
:apiList="'Katilimci/AsilYedek/' + piyangoStore.selectedLottery"
|
||||
v-model:refresh='refreshList'
|
||||
isUseRoute
|
||||
>
|
||||
<template #extraButtons>
|
||||
<a href='/data/ornek-talihli-listesi.xlsx' target='_blank' class='button-c' v-if='piyangoStore.lotteryData.cekilisYontemi =="Fiziksel"'>
|
||||
|
||||
@ -10,7 +10,8 @@
|
||||
:apiList="
|
||||
'TeminantStates/GetTeminantStateCekilisList/' + piyangoStore.selectedLottery
|
||||
"
|
||||
v-model:refresh="piyangoTeminatStore.refreshList" />
|
||||
v-model:refresh="piyangoTeminatStore.refreshList"
|
||||
isUseRoute/>
|
||||
</section>
|
||||
<panel-wrapper
|
||||
wide
|
||||
|
||||
@ -19,6 +19,7 @@
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-inner-comment waiting-d" v-if="!loaded">Yükleniyor, lütfen bekleyiniz...</div>
|
||||
<piyango-bilgileri-display-content v-if="loaded" :isPreview="isPreview" />
|
||||
</div>
|
||||
<panel-wrapper
|
||||
|
||||
@ -29,6 +29,9 @@
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-inner-comment waiting-d" v-if="!loaded">
|
||||
Yükleniyor, lütfen bekleyiniz...
|
||||
</div>
|
||||
<div class="form-part-content" v-if="loaded">
|
||||
<lottery-states :piyangoAmac="piyangoStore.lotteryData.amacpiyangoId" />
|
||||
<template v-if="!piyangoStore.isNew">
|
||||
@ -106,7 +109,7 @@
|
||||
'/uyeler/detay/' +
|
||||
piyangoStore.lotteryData.baglisirketId +
|
||||
'/yetkili-uye/detay/' +
|
||||
piyangoStore.lotteryData.duzenleyenId
|
||||
piyangoStore.lotteryData.duzenleyenId+'/kisi-kurum-bilgileri'
|
||||
"
|
||||
class="button-c">
|
||||
Üyeyi Kontrol Et
|
||||
@ -541,7 +544,7 @@
|
||||
piyangoStore.lotteryApprove = 0
|
||||
piyangoStore.isNew = false
|
||||
piyangoStore.ResetLotteryData()
|
||||
router.push('/piyangolar/detay/' + form.id)
|
||||
router.push('/piyangolar/detay/' + form.id + '/piyango-bilgileri')
|
||||
} else {
|
||||
GetData()
|
||||
}
|
||||
|
||||
@ -82,9 +82,7 @@
|
||||
},
|
||||
{
|
||||
name: 'aciklama',
|
||||
title: 'Açıklama',
|
||||
sort: true,
|
||||
style: { width: '30%' }
|
||||
title: 'Açıklama'
|
||||
},
|
||||
{
|
||||
dosyaUrl: 'aciklama',
|
||||
@ -95,7 +93,19 @@
|
||||
}
|
||||
},
|
||||
style: { width: '20%' }
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'izinSayisi',
|
||||
title: 'İzin Sayısı'
|
||||
},
|
||||
{
|
||||
name: 'izinTarihi',
|
||||
title: 'İzin Tarihi'
|
||||
},
|
||||
{
|
||||
name: 'izinAciklamasi',
|
||||
title: 'İzin Açıklaması'
|
||||
},
|
||||
])
|
||||
|
||||
const EditOnay = (d: Record<string, any>) => {
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
listVal="id"
|
||||
v-model="selectedIkramiye"
|
||||
:invalidText="
|
||||
piyangoDosyaKapamaValidationStore.ikramiyeInvalidTexts.taahhutEdilenIkramiye
|
||||
piyangoDosyaKapamaValidationStore.ikramiyeInvalidTexts.tahhutEdilenIkramiye
|
||||
">
|
||||
<template #activator="data">
|
||||
{{
|
||||
@ -35,7 +35,7 @@
|
||||
', ' +
|
||||
data.optionData.model +
|
||||
' (' +
|
||||
data.activatorData.asilTalihliAdedi +
|
||||
data.optionData.asilTalihliAdedi +
|
||||
' adet)'
|
||||
}}
|
||||
</template>
|
||||
@ -123,12 +123,11 @@
|
||||
piyangoIkramiyeStore.piyangoAllIkramiyeData.forEach((item) => {
|
||||
if (
|
||||
`${item.cinsi}, ${item.marka}, ${item.model}, (${item.asilTalihliAdedi} adet)` ===
|
||||
piyangoDosyaKapamaStore.dosyaKapamaIkramiyeData.taahhutEdilenIkramiye
|
||||
piyangoDosyaKapamaStore.dosyaKapamaIkramiyeData.tahhutEdilenIkramiye
|
||||
) {
|
||||
selectedIkramiye.value = item.id
|
||||
}
|
||||
})
|
||||
|
||||
totalIkramiye.value = piyangoIkramiyeStore.piyangoAllIkramiyeData.reduce(
|
||||
(acc, item) => acc + (item.asilTalihliAdedi || 0),
|
||||
0
|
||||
|
||||
@ -2,4 +2,4 @@ import piyangoListe from '@/module/cekilisler/routes/piyango-liste'
|
||||
import piyangoYeni from '@/module/cekilisler/routes/piyango-yeni'
|
||||
import piyangoDetay from '@/module/cekilisler/routes/piyango-detay'
|
||||
|
||||
export default [piyangoListe, piyangoYeni, piyangoDetay]
|
||||
export default [piyangoListe, piyangoYeni, ...piyangoDetay]
|
||||
|
||||
@ -1,10 +1,19 @@
|
||||
import PiyangoDetay from '@/module/cekilisler/views/PiyangoDetay.vue'
|
||||
|
||||
export default {
|
||||
path: '/piyangolar/detay/:piyangoId',
|
||||
export default [
|
||||
{
|
||||
path: '/piyangolar/detay/:piyangoId/',
|
||||
redirect: (to:Record<string,any>) => ({
|
||||
name: 'PiyangoDetay',
|
||||
params: { piyangoId: to.params.piyangoId, tabid: 'piyango-bilgileri' }
|
||||
})
|
||||
},
|
||||
{
|
||||
path: '/piyangolar/detay/:piyangoId/:tabid',
|
||||
name: 'PiyangoDetay',
|
||||
component: PiyangoDetay,
|
||||
meta: {
|
||||
authRequired: true
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@ -18,8 +18,8 @@ export const usePiyangoDosyaKapamaService = defineStore(
|
||||
)
|
||||
|
||||
if (data !== 'errorfalse' || data.data.id === undefined) {
|
||||
Object.assign(piyangoDosyaKapamaStore.dosyaKapamaData, data.data)
|
||||
Object.assign(piyangoDosyaKapamaStore.safeDosyaKapamaData, data.data)
|
||||
Object.assign(piyangoDosyaKapamaStore.dosyaKapamaData, data)
|
||||
Object.assign(piyangoDosyaKapamaStore.safeDosyaKapamaData, data)
|
||||
piyangoDosyaKapamaStore.isNew = false
|
||||
setTimeout(() => {
|
||||
piyangoDosyaKapamaStore.loaded = true
|
||||
|
||||
@ -1,19 +1,33 @@
|
||||
import * as signalR from '@microsoft/signalr'
|
||||
import { v4 as uuidv4 } from 'uuid'
|
||||
|
||||
let connection: signalR.HubConnection
|
||||
let connectionId = ''
|
||||
|
||||
export const connectToHub = async () => {
|
||||
console.log('Connecting to SignalR Hub...')
|
||||
// Mevcut bağlantı varsa kapat
|
||||
if (connection && connection.state === signalR.HubConnectionState.Connected) {
|
||||
await connection.stop()
|
||||
}
|
||||
|
||||
connection = new signalR.HubConnectionBuilder()
|
||||
.withUrl(import.meta.env.VITE_SOCKET_URL, {
|
||||
withCredentials: false // Bu zorunlu, yoksa cookie vs gönderilmez
|
||||
}) // backend adresine göre düzenle
|
||||
withCredentials: true,
|
||||
skipNegotiation: true, // WebSocket kullanırken negotiation atlanabilir
|
||||
transport: signalR.HttpTransportType.WebSockets
|
||||
})
|
||||
.withAutomaticReconnect()
|
||||
.build()
|
||||
|
||||
// Eventleri ekle
|
||||
onProgress((data) => console.log('progress', data))
|
||||
onInsertProgress((data) => console.log('insert progress', data))
|
||||
onCompleted((data) => console.log('completed', data))
|
||||
onError((data) => console.log('error', data))
|
||||
|
||||
await connection.start()
|
||||
connectionId = connection.connectionId || uuidv4() // SignalR id'si ya da frontend'de de guid üretilebilir
|
||||
connectionId = await connection.invoke<string>('GetConnectionId')
|
||||
console.log('Connected to SignalR Hub with Connection ID:', connectionId)
|
||||
return connectionId
|
||||
}
|
||||
|
||||
|
||||
@ -91,13 +91,14 @@ export const usePiyangoStore = defineStore('piyangoStore', () => {
|
||||
|
||||
const duzenleyenLink = computed<string | null>(() => {
|
||||
if (lotteryData.baglisirketId === null && lotteryData.duzenleyenId !== null)
|
||||
return '/uyeler/detay/' + lotteryData.duzenleyenId
|
||||
return '/uyeler/detay/' + lotteryData.duzenleyenId + '/uye-bilgileri'
|
||||
else if (lotteryData.duzenleyenId !== null && lotteryData.baglisirketId !== null)
|
||||
return (
|
||||
'/uyeler/detay/' +
|
||||
araciUyeData.baglisirketId +
|
||||
lotteryData.baglisirketId +
|
||||
'/yetkili-uye/detay/' +
|
||||
lotteryData.duzenleyenId
|
||||
lotteryData.duzenleyenId +
|
||||
'/kisi-kurum-bilgileri'
|
||||
)
|
||||
else return null
|
||||
})
|
||||
|
||||
@ -37,6 +37,7 @@ export const usePiyangoDosyaKapamaValidationStore = defineStore(
|
||||
'tahhutEdilenIkramiye',
|
||||
'Lütfen taahhüt edilen ikramiyeyi seçiniz.'
|
||||
)
|
||||
|
||||
if (
|
||||
validationStore.checkEmpty(
|
||||
piyangoDosyaKapamaStore.dosyaKapamaIkramiyeData.tahhutEdilenIkramiyeAdet
|
||||
@ -52,14 +53,39 @@ export const usePiyangoDosyaKapamaValidationStore = defineStore(
|
||||
piyangoDosyaKapamaStore.dosyaKapamaIkramiyeData.teslimEdilenIkramiyeAsil
|
||||
) &&
|
||||
validationStore.checkEmpty(
|
||||
piyangoDosyaKapamaStore.dosyaKapamaIkramiyeData.teslimEdilenIkramiyeAsil
|
||||
piyangoDosyaKapamaStore.dosyaKapamaIkramiyeData.teslimEdilenIkramiyeYedek
|
||||
)
|
||||
) {
|
||||
isIkramiyeFormValid.value = false
|
||||
ikramiyeInvalidTexts.teslimEdilenIkramiyeAsil =
|
||||
'En az 1 asil veya yedek talihli adedi girmelisiniz'
|
||||
'Yedek ve asil talihli alanlarının en az biri dolu olmalıdır'
|
||||
ikramiyeInvalidTexts.teslimEdilenIkramiyeYedek =
|
||||
'En az 1 asil veya yedek talihli adedi girmelisiniz'
|
||||
'Yedek ve asil talihli alanlarının en az biri dolu olmalıdır'
|
||||
}
|
||||
|
||||
if (
|
||||
!validationStore.checkEmpty(
|
||||
piyangoDosyaKapamaStore.dosyaKapamaIkramiyeData.teslimEdilenIkramiyeAsil
|
||||
) &&
|
||||
!validationStore.checkEmpty(
|
||||
piyangoDosyaKapamaStore.dosyaKapamaIkramiyeData.teslimEdilenIkramiyeYedek
|
||||
)
|
||||
) {
|
||||
if (
|
||||
Number(
|
||||
piyangoDosyaKapamaStore.dosyaKapamaIkramiyeData.teslimEdilenIkramiyeAsil
|
||||
) +
|
||||
Number(
|
||||
piyangoDosyaKapamaStore.dosyaKapamaIkramiyeData.teslimEdilenIkramiyeYedek
|
||||
) !==
|
||||
Number(piyangoDosyaKapamaStore.dosyaKapamaIkramiyeData.tahhutEdilenIkramiyeAdet)
|
||||
) {
|
||||
isIkramiyeFormValid.value = false
|
||||
ikramiyeInvalidTexts.teslimEdilenIkramiyeAsil =
|
||||
'Asil ve yedek talihli toplamları, toplam ikramiye adedi kadar olmalıdır.'
|
||||
ikramiyeInvalidTexts.teslimEdilenIkramiyeYedek =
|
||||
'Asil ve yedek talihli toplamları, toplam ikramiye adedi kadar olmalıdır.'
|
||||
}
|
||||
}
|
||||
|
||||
validationStore.IsFieldEmpty(
|
||||
@ -69,6 +95,20 @@ export const usePiyangoDosyaKapamaValidationStore = defineStore(
|
||||
'Alınmayan ikramiye adedi boş olamaz. En az 1 asil veya yedek ikramiye adedi giriniz.'
|
||||
)
|
||||
|
||||
if (
|
||||
!validationStore.checkEmpty(
|
||||
piyangoDosyaKapamaStore.dosyaKapamaIkramiyeData.alinmayanIkramiye
|
||||
)
|
||||
) {
|
||||
if (
|
||||
Number(piyangoDosyaKapamaStore.dosyaKapamaIkramiyeData.alinmayanIkramiye) < 0
|
||||
) {
|
||||
isIkramiyeFormValid.value = false
|
||||
ikramiyeInvalidTexts.alinmayanIkramiye =
|
||||
'Teslim edilen asil ve yedek ikramiye toplamları, toplam ikramiye kadar olmalıdır.'
|
||||
}
|
||||
}
|
||||
|
||||
isIkramiyeFormValid.value = Object.keys(ikramiyeInvalidTexts).length === 0
|
||||
return isIkramiyeFormValid.value
|
||||
}
|
||||
|
||||
@ -167,7 +167,19 @@ export const usePiyangoValidationStore = defineStore('piyangoValidationStore', (
|
||||
}
|
||||
})
|
||||
const ikramiyeTeslimMin = computed((): Date => {
|
||||
return piyangoStore.lotteryData.yedekSonBasvuruTarihi
|
||||
var date: Date = new Date()
|
||||
|
||||
if (piyangoStore.lotteryData.amacpiyangoId !== 2) {
|
||||
date = new Date(piyangoStore.lotteryData.yedekSonBasvuruTarihi)
|
||||
} else {
|
||||
date = new Date(piyangoStore.lotteryData.asilSonBasvuruTarihi)
|
||||
}
|
||||
var year = date.getFullYear()
|
||||
var month = date.getMonth()
|
||||
var day = date.getDate()
|
||||
|
||||
let newDate = new Date(year, month, day + 1)
|
||||
return newDate
|
||||
})
|
||||
const ikramiyeTeslimMax = computed((): Date => {
|
||||
var date: Date = new Date()
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<AdminLayout>
|
||||
<Breadcrumb currentPageText="Piyango Detay" />
|
||||
<tabs :tabList="tabList" v-if="loaded">
|
||||
<template #piyangobilgileri>
|
||||
<Breadcrumb currentPageText="Piyango Detay" go="/piyangolar/piyango-listesi" />
|
||||
<tabs :tabList="tabList" v-if="loaded" isUseRoute>
|
||||
<template #piyango-bilgileri>
|
||||
<tab-piyango-bilgileri-display
|
||||
v-if="
|
||||
usersStore.isPanelUser ||
|
||||
@ -12,21 +12,23 @@
|
||||
" />
|
||||
<tab-piyango-bilgileri v-else />
|
||||
</template>
|
||||
<template #katilimcilistesi><tab-piyango-katilimci-listesi /></template>
|
||||
<template #katilim-listesi><tab-piyango-katilimci-listesi /></template>
|
||||
<template #talihliler><tab-piyango-talihli-listesi /></template>
|
||||
<template #itirazsikayet><tab-piyango-itiraz /></template>
|
||||
<template #piyangologlari><tab-piyango-loglari /></template>
|
||||
<template #itiraz-sikayet><tab-piyango-itiraz /></template>
|
||||
<template #piyango-loglari><tab-piyango-loglari /></template>
|
||||
<template #yetkilendirme v-if="usersStore.isPanelUser">
|
||||
<tab-piyango-yetkilendirme />
|
||||
</template>
|
||||
<template #onaydurumu>
|
||||
<template #onay-durumu>
|
||||
<tab-piyango-onay-durumu v-if="usersStore.isPanelUser" />
|
||||
<tab-piyango-onay-durumu-user v-else />
|
||||
</template>
|
||||
<template #teminatlistesi>
|
||||
<template #teminat-listesi>
|
||||
<tab-piyango-teminat-durumu />
|
||||
</template>
|
||||
<template #dosyakapama v-if="usersStore.isPanelUser && piyangoStore.lotteryDrawState">
|
||||
<template
|
||||
#dosya-kapama
|
||||
v-if="usersStore.isPanelUser && piyangoStore.lotteryDrawState">
|
||||
<tab-piyango-dosya-kapama />
|
||||
</template>
|
||||
</tabs>
|
||||
@ -59,7 +61,7 @@
|
||||
|
||||
const loaded = ref<boolean>(false)
|
||||
const tabList = ref<Record<string, any>[]>([
|
||||
{ text: 'Piyango Bilgileri', id: 'piyangobilgileri' }
|
||||
{ text: 'Piyango Bilgileri', id: 'piyango-bilgileri' }
|
||||
])
|
||||
|
||||
const CreateTabs = () => {
|
||||
@ -74,25 +76,25 @@
|
||||
piyangoStore.lotteryPurposeId !== 3
|
||||
) {
|
||||
tabList.value.push(
|
||||
{ text: 'Katılım Listesi', id: 'katilimcilistesi' },
|
||||
{ text: 'Katılım Listesi', id: 'katilim-listesi' },
|
||||
{ text: 'Talihliler', id: 'talihliler' },
|
||||
{ text: 'İtiraz/Şikayet', id: 'itirazsikayet' }
|
||||
{ text: 'İtiraz/Şikayet', id: 'itiraz-sikayet' }
|
||||
)
|
||||
}
|
||||
if (usersStore.isPanelUser) {
|
||||
tabList.value.push(
|
||||
{ text: 'Piyango Logları', id: 'piyangologlari' },
|
||||
{ text: 'Piyango Logları', id: 'piyango-loglari' },
|
||||
{ text: 'Yetkilendirme', id: 'yetkilendirme' }
|
||||
)
|
||||
}
|
||||
tabList.value.push({ text: 'Onay Durumu', id: 'onaydurumu' })
|
||||
tabList.value.push({ text: 'Onay Durumu', id: 'onay-durumu' })
|
||||
|
||||
if (piyangoStore.lotteryApprove !== 0 && piyangoStore.lotteryPurposeId !== 3) {
|
||||
tabList.value.push({ text: 'Teminat Listesi', id: 'teminatlistesi' })
|
||||
tabList.value.push({ text: 'Teminat Listesi', id: 'teminat-listesi' })
|
||||
}
|
||||
|
||||
if (usersStore.isPanelUser && piyangoStore.lotteryDrawState) {
|
||||
tabList.value.push({ text: 'Dosya Kapama', id: 'dosyakapama' })
|
||||
tabList.value.push({ text: 'Dosya Kapama', id: 'dosya-kapama' })
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<AdminLayout>
|
||||
<Breadcrumb currentPageText="Piyango Listesi" />
|
||||
<Breadcrumb currentPageText="Piyango Listesi" go="/"/>
|
||||
<div
|
||||
class="form-inner-comment waiting-d"
|
||||
v-if="!usersStore.isPanelUser && usersStore.userApproveId !== 4">
|
||||
@ -17,12 +17,14 @@
|
||||
listText="Piyango"
|
||||
:addRoute="addApiControl"
|
||||
:apiList="apiList"
|
||||
apiText="Piyango Listesi" />
|
||||
apiText="Piyango Listesi"
|
||||
isUseRoute/>
|
||||
</section>
|
||||
</AdminLayout>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, computed, onBeforeMount } from 'vue'
|
||||
import { ref, computed, onBeforeMount, onMounted } from 'vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
|
||||
import AdminLayout from '@/layouts/AdminLayout.vue'
|
||||
import { useDateStore } from '@/stores/dateStore'
|
||||
@ -38,6 +40,7 @@
|
||||
const piyangoServices = usePiyangoServices()
|
||||
|
||||
import router from '@/router'
|
||||
const route = useRoute()
|
||||
|
||||
const loaded = ref<boolean>(false)
|
||||
const apiList = ref<string>('')
|
||||
@ -230,7 +233,7 @@
|
||||
|
||||
// tablodan herhangi bir satır tıklayınca çalısır
|
||||
const OpenPiyango = (row: any) => {
|
||||
router.push('detay/' + row.id)
|
||||
router.push('detay/' + row.id+'/piyango-bilgileri')
|
||||
}
|
||||
|
||||
onBeforeMount(async () => {
|
||||
@ -240,4 +243,13 @@
|
||||
|
||||
loaded.value = true
|
||||
})
|
||||
|
||||
onMounted(() => {
|
||||
// URL query parametrelerini kontrol et ve filtreleri uygula
|
||||
if (route.query.durumId) {
|
||||
// Filtre parametresini ListTableContent bileşenine iletmek için
|
||||
// Bu parametre otomatik olarak ListTableContent tarafından işlenecek
|
||||
console.log('Durum filtresi uygulanıyor:', route.query.durumId)
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
@ -8,7 +8,8 @@
|
||||
title="Piyangolar"
|
||||
listText="Piyango"
|
||||
:apiList="apiList"
|
||||
apiText="Piyango Listesi" />
|
||||
apiText="Piyango Listesi"
|
||||
isUseRoute />
|
||||
</section>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
@ -154,7 +155,8 @@
|
||||
if (v.atanmis) {
|
||||
return `<strong class="back-grad back-grad-sevk-ok">
|
||||
${v.atananlar}
|
||||
</strong>`}else{
|
||||
</strong>`
|
||||
} else {
|
||||
return `<span class="back-grad back-grad-sevk">
|
||||
Sevk Edilmemiş</span>`
|
||||
}
|
||||
@ -164,7 +166,7 @@
|
||||
|
||||
// tablodan herhangi bir satır tıklayınca çalısır
|
||||
const rwAction = (row: any) => {
|
||||
router.push('/piyangolar/detay/' + row.id)
|
||||
router.push('/piyangolar/detay/' + row.id + '/piyango-bilgileri')
|
||||
}
|
||||
|
||||
onBeforeMount(async () => {
|
||||
|
||||
@ -6,7 +6,7 @@ import kullaniciAyarlari from './kullanici-ayarlari'
|
||||
|
||||
export default [
|
||||
kullanciYeni,
|
||||
kullaniciDetay,
|
||||
...kullaniciDetay,
|
||||
kullaniciListesi,
|
||||
kullaniciRolleri,
|
||||
kullaniciAyarlari
|
||||
|
||||
@ -1,10 +1,19 @@
|
||||
import KullaniciDetay from '@/module/kullanicilar/views/KullaniciDetay.vue'
|
||||
|
||||
export default {
|
||||
export default [
|
||||
{
|
||||
path: '/kullanicilar/detay/:kullaniciId',
|
||||
redirect: (to: Record<string, any>) => ({
|
||||
name: 'PiyangoDetay',
|
||||
params: { kullaniciId: to.params.kullaniciId, tabid: 'kullanici-bilgileri' }
|
||||
})
|
||||
},
|
||||
{
|
||||
path: '/kullanicilar/detay/:kullaniciId/:tabid',
|
||||
name: 'KullaniciDetay',
|
||||
component: KullaniciDetay,
|
||||
meta: {
|
||||
authRequired: true
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@ -1,14 +1,14 @@
|
||||
<template>
|
||||
<AdminLayout>
|
||||
<Breadcrumb currentPageText="Kullanıcı Detay" />
|
||||
<tabs :tabList="tabList">
|
||||
<template #kullanicibilgileri>
|
||||
<Breadcrumb currentPageText="Kullanıcı Detay" go="/kullanicilar/kullanici-liste"/>
|
||||
<tabs :tabList="tabList" isUseRoute>
|
||||
<template #kullanici-bilgileri>
|
||||
<tab-kullanici-bilgileri />
|
||||
</template>
|
||||
<template #yetkilioldugupiyangolar>
|
||||
<template #yetkili-oldugu-piyangolar>
|
||||
<tab-kullanici-yetkili-piyangolar />
|
||||
</template>
|
||||
<template #kullaniciloglari>
|
||||
<template #kullanici-loglari>
|
||||
<tab-kullanici-loglari />
|
||||
</template>
|
||||
</tabs>
|
||||
@ -28,8 +28,8 @@
|
||||
if (globalStore.selUser === 0) globalStore.selUser = Number(route.params.kullaniciId)
|
||||
|
||||
const tabList = ref<Record<string, any>[]>([
|
||||
{ text: 'Kullanıcı Bilgileri', id: 'kullanicibilgileri' },
|
||||
{ text: 'Yetkili Olduğu Piyangolar', id: 'yetkilioldugupiyangolar' },
|
||||
{ text: 'Kullanıcı Logları', id: 'kullaniciloglari' }
|
||||
{ text: 'Kullanıcı Bilgileri', id: 'kullanici-bilgileri' },
|
||||
{ text: 'Yetkili Olduğu Piyangolar', id: 'yetkili-oldugu-piyangolar' },
|
||||
{ text: 'Kullanıcı Logları', id: 'kullanici-loglari' }
|
||||
])
|
||||
</script>
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<AdminLayout>
|
||||
<Breadcrumb current-page-text="Kullanıcılar Listesi" />
|
||||
<Breadcrumb current-page-text="Kullanıcılar Listesi" go="/"/>
|
||||
<section class="section-list">
|
||||
<list-table-content
|
||||
v-if="loaded"
|
||||
@ -11,7 +11,8 @@
|
||||
listText="Kullanıcı"
|
||||
addRoute="yeni-kullanici"
|
||||
apiList="Auth/kullaniciList"
|
||||
apiText="Kullanıcı Listesi" />
|
||||
apiText="Kullanıcı Listesi"
|
||||
isUseRoute/>
|
||||
</section>
|
||||
</AdminLayout>
|
||||
</template>
|
||||
@ -88,7 +89,7 @@
|
||||
])
|
||||
const rwAction = (row: any) => {
|
||||
globalStore.selUser = row.id
|
||||
router.push('detay/' + row.id)
|
||||
router.push('detay/' + row.id+'/kullanici-bilgileri')
|
||||
}
|
||||
|
||||
onBeforeMount(async () => {
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
<div :class="['form-part']" id="display-bilgi">
|
||||
<div class="form-part-title">
|
||||
<h4>Piyango Bilgileri</h4>
|
||||
<div class="form-part-title-buttons" v-if="!isPreview">
|
||||
<div class="form-part-title-buttons" v-if="!isPreview && loaded">
|
||||
<button
|
||||
@click="BasvuruBedeliDialog"
|
||||
v-if="
|
||||
@ -24,11 +24,14 @@
|
||||
class="button-save">
|
||||
İzin Bedelini Muhasebeleştir
|
||||
</button>
|
||||
<router-link :to="'/piyangolar/detay/' + route.params.piyangoId" class="button-c">
|
||||
<router-link
|
||||
:to="'/piyangolar/detay/' + route.params.piyangoId + '/piyango-bilgileri'"
|
||||
class="button-c">
|
||||
Piyango Detayına Git
|
||||
</router-link>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-inner-comment waiting-d" v-if="!loaded">Yükleniyor, lütfen bekleyiniz...</div>
|
||||
<piyango-bilgileri-display-content v-if="loaded" :isPreview="isPreview" />
|
||||
|
||||
<!-- İzin Bedeli Modal -->
|
||||
@ -160,11 +163,13 @@
|
||||
const calculatedKdv = ref<number>(0)
|
||||
const calculatedOran = ref<number>(0)
|
||||
|
||||
const calculatedBasvuruKdv = computed<number>(
|
||||
() =>
|
||||
(Number(muhasebeSettingsStore.muhasebeSettingsForm.basvuruBedeli) *
|
||||
const calculatedBasvuruKdv = computed<number>(() =>
|
||||
muhasebeSettingsStore.muhasebeSettingsForm.basvuruBedeli !== undefined &&
|
||||
muhasebeSettingsStore.muhasebeSettingsForm.basvuruBedeliKdvOrani !== undefined
|
||||
? (Number(muhasebeSettingsStore.muhasebeSettingsForm.basvuruBedeli) *
|
||||
Number(muhasebeSettingsStore.muhasebeSettingsForm.basvuruBedeliKdvOrani)) /
|
||||
100
|
||||
: 0
|
||||
)
|
||||
|
||||
const GetData = async () => {
|
||||
@ -213,18 +218,13 @@
|
||||
}
|
||||
const GetIkramiyeTotalValues = async () => {
|
||||
console.log(piyangoStore, 'piyangoStore')
|
||||
let data = await dataStore.dataGet('Ikramiye/Cekilis/' + piyangoStore.selectedLottery)
|
||||
let data = await dataStore.dataGet('Ikramiye/Cekilis/' + piyangoStore.selectedLottery +'?pageNumber=0')
|
||||
//todo:page 0
|
||||
if (data !== 'errorfalse') {
|
||||
piyangoIkramiyeStore.totalIkramiyeValue = data.toplamdeger
|
||||
}
|
||||
}
|
||||
const BasvuruBedeliDialog = () => {
|
||||
console.log(muhasebeSettingsStore.muhasebeSettingsForm.basvuruBedeli)
|
||||
console.log(calculatedBasvuruKdv.value)
|
||||
console.log(
|
||||
Number(muhasebeSettingsStore.muhasebeSettingsForm.basvuruBedeli) +
|
||||
calculatedBasvuruKdv.value
|
||||
)
|
||||
dialogStore.CreateDialog({
|
||||
title: 'Başvuru Bedelini Muhasebeleştir',
|
||||
id: 'basvurubedelimuhasebelestir',
|
||||
@ -232,25 +232,40 @@
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Başvuru Bedeli:</td>
|
||||
<td>${globalStore.toTrLocale(
|
||||
<td>${
|
||||
muhasebeSettingsStore.muhasebeSettingsForm.basvuruBedeli !==
|
||||
undefined
|
||||
? globalStore.toTrLocale(
|
||||
muhasebeSettingsStore.muhasebeSettingsForm.basvuruBedeli
|
||||
)} ₺</td>
|
||||
)
|
||||
: 0
|
||||
} ₺</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>KDV (%${
|
||||
muhasebeSettingsStore.muhasebeSettingsForm.basvuruBedeliKdvOrani
|
||||
}):</td>
|
||||
<td>
|
||||
${globalStore.toTrLocale(calculatedBasvuruKdv.value)}
|
||||
${
|
||||
calculatedBasvuruKdv.value !== undefined
|
||||
? globalStore.toTrLocale(calculatedBasvuruKdv.value)
|
||||
: 0
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Toplam Bedel:</td>
|
||||
<td>
|
||||
${globalStore.toTrLocale(
|
||||
Number(muhasebeSettingsStore.muhasebeSettingsForm.basvuruBedeli) +
|
||||
calculatedBasvuruKdv.value
|
||||
)}
|
||||
${
|
||||
muhasebeSettingsStore.muhasebeSettingsForm.basvuruBedeli !==
|
||||
undefined
|
||||
? globalStore.toTrLocale(
|
||||
Number(
|
||||
muhasebeSettingsStore.muhasebeSettingsForm.basvuruBedeli
|
||||
) + calculatedBasvuruKdv.value
|
||||
)
|
||||
: 0
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
@ -260,12 +275,13 @@
|
||||
{
|
||||
label: 'Başvuru Bedelini Muhasebeleştir',
|
||||
type: 'alert',
|
||||
function: () => BasvuruBedeliMuhasebelestir
|
||||
function: () => BasvuruBedeliMuhasebelestir()
|
||||
}
|
||||
]
|
||||
})
|
||||
}
|
||||
const BasvuruBedeliMuhasebelestir = async () => {
|
||||
console.log('basvuru bedeli muhasebelestir')
|
||||
let data = await dataStore.dataGet(
|
||||
'MuhasebeSettings/BasvuruBedeli/' + piyangoStore.selectedLottery
|
||||
)
|
||||
|
||||
@ -5,7 +5,7 @@ import izinBedelOrani from './izin-bedel-orani'
|
||||
|
||||
export default [
|
||||
muhasebePiyangoListesi,
|
||||
muhasebePiyangoDetay,
|
||||
...muhasebePiyangoDetay,
|
||||
muhasebeAyarlar,
|
||||
izinBedelOrani,
|
||||
]
|
||||
|
||||
@ -1,10 +1,19 @@
|
||||
import MuhasebePiyangoDetay from '../views/MuhasebePiyangoDetay.vue'
|
||||
|
||||
export default {
|
||||
export default [
|
||||
{
|
||||
path: '/muhasebe/piyango-detay/:piyangoId',
|
||||
redirect: (to:Record<string,any>) => ({
|
||||
name: 'MuhasebePiyangoDetay',
|
||||
params: { piyangoId: to.params.piyangoId, tabid: 'piyango-bilgileri' }
|
||||
})
|
||||
},
|
||||
{
|
||||
path: '/muhasebe/piyango-detay/:piyangoId/:tabid',
|
||||
name: 'MuhasebePiyangoDetay',
|
||||
component: MuhasebePiyangoDetay,
|
||||
meta: {
|
||||
authRequired: true
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<AdminLayout>
|
||||
<Breadcrumb currentPageText="Muhasebe / Piyango Detay" />
|
||||
<tabs :tabList="tabList" v-if="loaded">
|
||||
<template #piyangobilgileri>
|
||||
<Breadcrumb currentPageText="Muhasebe / Piyango Detay" go="/muhasebe/piyango-listesi"/>
|
||||
<tabs :tabList="tabList" v-if="loaded" isUseRoute>
|
||||
<template #piyango-bilgileri>
|
||||
<tab-muhasebe-piyango-bilgileri-display />
|
||||
</template>
|
||||
</tabs>
|
||||
@ -25,7 +25,7 @@
|
||||
|
||||
const loaded = ref<boolean>(false)
|
||||
const tabList = ref<Record<string, any>[]>([
|
||||
{ text: 'Piyango Bilgileri', id: 'piyangobilgileri' }
|
||||
{ text: 'Piyango Bilgileri', id: 'piyango-bilgileri' }
|
||||
])
|
||||
|
||||
onBeforeMount(async () => {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<AdminLayout>
|
||||
<Breadcrumb currentPageText="Muhasebe / Piyango Listesi" />
|
||||
<Breadcrumb currentPageText="Muhasebe / Piyango Listesi" go="/" />
|
||||
<section class="section-list">
|
||||
<list-table-content
|
||||
v-if="loaded"
|
||||
@ -10,7 +10,8 @@
|
||||
title="Piyangolar"
|
||||
listText="Piyango"
|
||||
:apiList="'Cekilis/GetCekilislerListAtanan/' + usersStore.userId"
|
||||
apiText="Piyango Listesi" />
|
||||
apiText="Piyango Listesi"
|
||||
isUseRoute />
|
||||
</section>
|
||||
</AdminLayout>
|
||||
</template>
|
||||
@ -204,7 +205,7 @@
|
||||
|
||||
// tablodan herhangi bir satır tıklayınca çalısır
|
||||
const OpenPiyango = (row: any) => {
|
||||
router.push('/muhasebe/piyango-detay/' + row.id)
|
||||
router.push('/muhasebe/piyango-detay/' + row.id + '/piyango-bilgileri')
|
||||
}
|
||||
|
||||
onBeforeMount(async () => {
|
||||
|
||||
@ -8,7 +8,8 @@
|
||||
title="Sistem Günlüğü"
|
||||
listText="Log"
|
||||
apiList="Auth/GetOperationLogs"
|
||||
apiText="Sistem Günlüğü Listesi" />
|
||||
apiText="Sistem Günlüğü Listesi"
|
||||
isUseRoute />
|
||||
</section>
|
||||
</AdminLayout>
|
||||
</template>
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<AdminLayout>
|
||||
<Breadcrumb currentPageText="Menü Listesi" />
|
||||
<Breadcrumb currentPageText="Menü Listesi" go="/"/>
|
||||
<section class="section-list">
|
||||
<list-table-content
|
||||
:tableHeader="tableHeader"
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<AdminLayout>
|
||||
<Breadcrumb current-page-text="Menu Yonetimi" />
|
||||
<Breadcrumb current-page-text="Menu Yonetimi" go="/site-yonetimi/menu-listesi"/>
|
||||
<div class="form-content">
|
||||
<div class="form-inner-content form-inner-content-left">
|
||||
<div class="form-part">
|
||||
@ -12,6 +12,7 @@
|
||||
<div class="button-c button-save" @click="SaveMenu">Kaydet</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-inner-comment waiting-d" v-if="!loaded">Yükleniyor, lütfen bekleyiniz...</div>
|
||||
<div class="form-part-content">
|
||||
<template v-if="loaded">
|
||||
<template v-if="siteManagementMenuStore.menuContentList.length > 0">
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<AdminLayout>
|
||||
<Breadcrumb currentPageText="Popup Listesi" />
|
||||
<Breadcrumb currentPageText="Popup Listesi" go="/"/>
|
||||
<section class="section-list">
|
||||
<list-table-content
|
||||
:tableHeader="tableHeader"
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<AdminLayout>
|
||||
<Breadcrumb current-page-text="Menu Yonetimi" />
|
||||
<Breadcrumb current-page-text="Popup Yonetimi" />
|
||||
<div class="form-content">
|
||||
<div class="form-inner-content form-inner-content-left">
|
||||
<div class="form-part">
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<AdminLayout>
|
||||
<Breadcrumb currentPageText="Sayfa Detay" />
|
||||
<Breadcrumb currentPageText="Sayfa Detay" go="/site-yonetimi/sayfa-listesi"/>
|
||||
<div class="form-part form-title">
|
||||
<div class="form-title-buttons">
|
||||
<button
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<AdminLayout>
|
||||
<Breadcrumb current-page-text="Sayfa Listesi" />
|
||||
<Breadcrumb current-page-text="Sayfa Listesi" go="/" />
|
||||
<section class="section-list">
|
||||
<list-table-content
|
||||
:tableHeader="tableHeader"
|
||||
@ -13,7 +13,8 @@
|
||||
apiText="Sayfa Listesi"
|
||||
:refresh="refresh"
|
||||
:rowActions="rowActions"
|
||||
:rowActionStyle="'width:10%;'" />
|
||||
:rowActionStyle="'width:10%;'"
|
||||
isUseRoute />
|
||||
</section>
|
||||
</AdminLayout>
|
||||
</template>
|
||||
|
||||
@ -9,7 +9,8 @@
|
||||
listText="Piyango"
|
||||
:addRoute="PiyangoLink()"
|
||||
:apiList="apiList"
|
||||
apiText="Piyango Listesi" />
|
||||
apiText="Piyango Listesi"
|
||||
isUseRoute />
|
||||
</section>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
@ -176,7 +177,7 @@
|
||||
|
||||
// tablodan herhangi bir satır tıklayınca çalısır
|
||||
const rwAction = (row: any) => {
|
||||
router.push('/piyangolar/detay/' + row.id)
|
||||
router.push('/piyangolar/detay/' + row.id + '/piyango-bilgileri')
|
||||
}
|
||||
|
||||
onBeforeMount(async () => {
|
||||
|
||||
@ -8,14 +8,13 @@
|
||||
icon="draws"
|
||||
title="Yetkili Olduğu Kişi/Kurum"
|
||||
listText="Kayıt"
|
||||
:apiList="'Auth/userbyuserChildList/' + usersStore.selectedUserId()" />
|
||||
:apiList="'Auth/userbyuserChildList/' + usersStore.selectedUserId()"
|
||||
isUseRoute />
|
||||
</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'
|
||||
@ -125,7 +124,13 @@
|
||||
])
|
||||
|
||||
const rwAction = (row: any) => {
|
||||
router.push('/uyeler/detay/' + UyeId() + '/yetkili-uye/detay/' + row.id)
|
||||
router.push(
|
||||
'/uyeler/detay/' +
|
||||
UyeId() +
|
||||
'/yetkili-uye/detay/' +
|
||||
row.id +
|
||||
'/kisi-kurum-bilgileri'
|
||||
)
|
||||
}
|
||||
|
||||
onBeforeMount(async () => {
|
||||
|
||||
@ -485,7 +485,7 @@
|
||||
'/uyeler/detay/' +
|
||||
route.params.uyeId +
|
||||
'/yetkili-uye/detay/' +
|
||||
register.user.id
|
||||
register.user.id+'/kisi-kurum-bilgileri'
|
||||
)
|
||||
isNew.value = false
|
||||
}else{
|
||||
|
||||
@ -4,4 +4,4 @@ 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]
|
||||
export default [...UyeDetay,...UyeYetkili,UyeYetkiliYeni, UyeListe, UyeTipleri]
|
||||
|
||||
@ -1,10 +1,18 @@
|
||||
import UyeDetay from '../views/UyeDetay.vue'
|
||||
|
||||
export default {
|
||||
path: '/uyeler/detay/:uyeId',
|
||||
export default [
|
||||
{
|
||||
path: '/uyeler/detay/:uyeId',redirect: (to:Record<string,any>) => ({
|
||||
name: 'UyeDetay',
|
||||
params: { uyeId: to.params.uyeId, tabid: 'uye-bilgileri' }
|
||||
})
|
||||
},
|
||||
{
|
||||
path: '/uyeler/detay/:uyeId/:tabid',
|
||||
name: 'UyeDetay',
|
||||
component: UyeDetay,
|
||||
meta: {
|
||||
authRequired: true
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@ -1,10 +1,23 @@
|
||||
import UyeYetkili from '../views/UyeYetkili.vue'
|
||||
|
||||
export default {
|
||||
export default [
|
||||
{
|
||||
path: '/uyeler/detay/:uyeId/yetkili-uye/detay/:altUyeId',
|
||||
redirect: (to: Record<string, any>) => ({
|
||||
name: 'UyeYetkiliDetay',
|
||||
params: {
|
||||
uyeId: to.params.uyeId,
|
||||
altUyeId: to.params.altUyeId,
|
||||
tabid: 'kisi-kurum-bilgileri'
|
||||
}
|
||||
})
|
||||
},
|
||||
{
|
||||
path: '/uyeler/detay/:uyeId/yetkili-uye/detay/:altUyeId/:tabid',
|
||||
name: 'UyeYetkiliDetay',
|
||||
component: UyeYetkili,
|
||||
meta: {
|
||||
authRequired: true
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@ -1,20 +1,20 @@
|
||||
<template>
|
||||
<AdminLayout>
|
||||
<Breadcrumb currentPageText="Üye Detay" />
|
||||
<tabs :tabList="tabList">
|
||||
<template #uyebilgileri>
|
||||
<Breadcrumb currentPageText="Üye Detay" go="/uyeler/uye-liste" />
|
||||
<tabs :tabList="tabList" isUseRoute v-if="loaded">
|
||||
<template #uye-bilgileri>
|
||||
<tab-uye-bilgileri />
|
||||
</template>
|
||||
<template #yetkilikurum>
|
||||
<template #yetkili-kurum>
|
||||
<tab-uye-yetkili-oldugu-kisi-kurum />
|
||||
</template>
|
||||
<template #piyangolar>
|
||||
<tab-uye-piyangolar />
|
||||
</template>
|
||||
<template #uyeloglari>
|
||||
<template #uye-loglari>
|
||||
<tab-uye-loglari />
|
||||
</template>
|
||||
<template #onaydurumu><tab-uye-onay-durumu /></template>
|
||||
<template #onay-durumu><tab-uye-onay-durumu /></template>
|
||||
</tabs>
|
||||
</AdminLayout>
|
||||
</template>
|
||||
@ -36,10 +36,11 @@
|
||||
import TabUyeLoglari from '../components/TabUyeLoglari.vue'
|
||||
import TabUyeOnayDurumu from '../components/TabUyeOnayDurumu.vue'
|
||||
const tabList = ref<Record<string, any>[]>([])
|
||||
const loaded = ref<boolean>(false)
|
||||
|
||||
const CreateTabs = () => {
|
||||
tabList.value = []
|
||||
tabList.value.push({ text: 'Üye Bilgileri', id: 'uyebilgileri' })
|
||||
tabList.value.push({ text: 'Üye Bilgileri', id: 'uye-bilgileri' })
|
||||
if (
|
||||
usersStore.isPanelUser &&
|
||||
route.name !== 'Profil' &&
|
||||
@ -48,23 +49,26 @@
|
||||
let txt = usersStore.isPanelUser
|
||||
? 'Yetkili Olduğu Kişi/Kurum'
|
||||
: 'Yetkili Olduğum Kişi/Kurum'
|
||||
tabList.value.push({ text: txt, id: 'yetkilikurum' })
|
||||
tabList.value.push({ text: txt, id: 'yetkili-kurum' })
|
||||
}
|
||||
|
||||
if (usersStore.isPanelUser && route.name !== 'Profil') {
|
||||
tabList.value.push(
|
||||
{ text: 'Piyangolar', id: 'piyangolar' },
|
||||
{ text: 'Üye Logları', id: 'uyeloglari' },
|
||||
{ text: 'Onay Durumu', id: 'onaydurumu' }
|
||||
{ text: 'Üye Logları', id: 'uye-loglari' },
|
||||
{ text: 'Onay Durumu', id: 'onay-durumu' }
|
||||
)
|
||||
}
|
||||
}
|
||||
onBeforeMount(async () => {
|
||||
usersStore.SetSelectedUser()
|
||||
let tip = await dataStore.dataGet('Auth/uyedurumkontrol/' + usersStore.selectedUserId())
|
||||
let tip = await dataStore.dataGet(
|
||||
'Auth/uyedurumkontrol/' + usersStore.selectedUserId()
|
||||
)
|
||||
usersStore.userApproveId = tip.userIslemtipi
|
||||
|
||||
CreateTabs()
|
||||
loaded.value = true
|
||||
})
|
||||
onBeforeUpdate(() => {
|
||||
CreateTabs()
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<AdminLayout>
|
||||
<Breadcrumb currentPageText="Üye Detay" />
|
||||
<Breadcrumb currentPageText="Üye Profil" />
|
||||
<tabs :tabList="tabList" v-if="loaded">
|
||||
<template #uyebilgileri>
|
||||
<tab-uye-bilgileri />
|
||||
|
||||
@ -1,11 +1,13 @@
|
||||
<template>
|
||||
<AdminLayout>
|
||||
<Breadcrumb currentPageText="Yetkili Olunan Kişi/Kurum Detay" />
|
||||
<tabs :tabList="tabList">
|
||||
<template #kisikurumbilgileri>
|
||||
<Breadcrumb
|
||||
currentPageText="Yetkili Olunan Kişi/Kurum Detay"
|
||||
:go="'/uyeler/detay/' + route.params.uyeId + '/uye-bilgileri'" />
|
||||
<tabs :tabList="tabList" isUseRoute v-if="loaded">
|
||||
<template #kisi-kurum-bilgileri>
|
||||
<tab-yetkili-uye-bilgileri />
|
||||
</template>
|
||||
<template #onaydurumu>
|
||||
<template #onay-durumu>
|
||||
<tab-uye-onay-durumu v-if="usersStore.isPanelUser" />
|
||||
<tab-uye-onay-durumu-user v-else />
|
||||
</template>
|
||||
@ -26,10 +28,11 @@
|
||||
import TabUyeOnayDurumu from '../components/TabUyeOnayDurumu.vue'
|
||||
import TabUyeOnayDurumuUser from '../components/TabUyeOnayDurumuUser.vue'
|
||||
|
||||
const loaded = ref<boolean>(false)
|
||||
const tabList = ref<Record<string, any>[]>([
|
||||
{ text: 'Kişi/Kurum Bilgileri', id: 'kisikurumbilgileri' }
|
||||
{ text: 'Kişi/Kurum Bilgileri', id: 'kisi-kurum-bilgileri' }
|
||||
])
|
||||
tabList.value.push({ text: 'Onay Durumu', id: 'onaydurumu' })
|
||||
tabList.value.push({ text: 'Onay Durumu', id: 'onay-durumu' })
|
||||
|
||||
onBeforeMount(async () => {
|
||||
usersStore.SetSelectedUser()
|
||||
@ -38,5 +41,6 @@
|
||||
let tip = await dataStore.dataGet('Auth/uyedurumkontrol/' + route.params.altUyeId)
|
||||
usersStore.userSubApproveId = tip.userIslemtipi
|
||||
}
|
||||
loaded.value = true
|
||||
})
|
||||
</script>
|
||||
|
||||
@ -1,6 +1,9 @@
|
||||
<template>
|
||||
<AdminLayout>
|
||||
<Breadcrumb current-page-text="Üyeler Listesi" />
|
||||
<Breadcrumb current-page-text="Üyeler Listesi" go="/" />
|
||||
<div class="form-inner-comment waiting-d" v-if="!loaded">
|
||||
Yükleniyor, lütfen bekleyiniz...
|
||||
</div>
|
||||
<section class="section-list">
|
||||
<list-table-content
|
||||
v-if="loaded"
|
||||
@ -10,7 +13,8 @@
|
||||
title="Üyeler"
|
||||
listText="Üye"
|
||||
apiList="Auth/UyelerList"
|
||||
apiText="Üye Listesi" />
|
||||
apiText="Üye Listesi"
|
||||
isUseRoute />
|
||||
</section>
|
||||
</AdminLayout>
|
||||
</template>
|
||||
@ -121,7 +125,7 @@
|
||||
])
|
||||
const rwAction = (row: any) => {
|
||||
if (usersStore.isPanelUser) globalStore.selCustomerType = row.basvuruTipId
|
||||
router.push('detay/' + row.id)
|
||||
router.push('detay/' + row.id + '/uye-bilgileri')
|
||||
}
|
||||
|
||||
onBeforeMount(async () => {
|
||||
|
||||
@ -39,7 +39,7 @@ router.beforeEach((to, from) => {
|
||||
const usersStore = useUsersStore()
|
||||
|
||||
if (to.meta.authRequired && !usersStore.userIsAuth && from.name !== 'Login') {
|
||||
router.push('/login')
|
||||
router.push('/giris')
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@ -16,7 +16,7 @@ export const useGlobalStore = defineStore('globalStore', () => {
|
||||
tablet: 992,
|
||||
tabletp: 768
|
||||
})
|
||||
const perPage = ref<number>(25)
|
||||
const perPage = ref<number>(10)
|
||||
const selUser = ref<number>(0)
|
||||
const selAuthUser = ref<number>(0)
|
||||
const selCustomer = ref<number>(0)
|
||||
|
||||
@ -10,7 +10,8 @@
|
||||
iconBack="waiting"
|
||||
:tableData="onayBekleyenPiyango"
|
||||
lineRoute="piyangolar/detay/"
|
||||
lineRouteKey="id" />
|
||||
lineRouteKey="id"
|
||||
:filterParams="{ durumId: 0 }" />
|
||||
<dash-piyango-liste
|
||||
v-if="loaded"
|
||||
title="İtiraz/Şikayet Edilen Piyangolar"
|
||||
@ -21,7 +22,8 @@
|
||||
iconBack="alert"
|
||||
:tableData="itirazEdilenPiyango"
|
||||
lineRoute="piyangolar/detay/"
|
||||
lineRouteKey="id" />
|
||||
lineRouteKey="id"
|
||||
:filterParams="{ durumId: 1 }" />
|
||||
|
||||
<dash-piyango-liste
|
||||
v-if="loaded"
|
||||
@ -33,7 +35,8 @@
|
||||
iconBack="next"
|
||||
:tableData="yaklasanPiyango"
|
||||
lineRoute="piyangolar/detay/"
|
||||
lineRouteKey="id" />
|
||||
lineRouteKey="id"
|
||||
:filterParams="{ baslangicTarihi: '>' + new Date().toISOString().split('T')[0] }"/>
|
||||
|
||||
<dash-piyango-liste
|
||||
v-if="loaded"
|
||||
@ -45,7 +48,8 @@
|
||||
iconBack="ok"
|
||||
:tableData="bitenPiyango"
|
||||
lineRoute="piyangolar/detay/"
|
||||
lineRouteKey="id" />
|
||||
lineRouteKey="id"
|
||||
:filterParams="{ bitisTarihi: '<' + new Date().toISOString().split('T')[0] }" />
|
||||
</AdminLayout>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
|
||||
Reference in New Issue
Block a user