Compare commits
5 Commits
0e3c6e658f
...
sifremi-si
| Author | SHA1 | Date | |
|---|---|---|---|
| b5a297e10c | |||
| 5d49f96c98 | |||
| 3355085a1d | |||
| 095f877224 | |||
| 2b3b09c88b |
@ -10,7 +10,7 @@
|
|||||||
</h1>
|
</h1>
|
||||||
<div class="section-header-buttons-c">
|
<div class="section-header-buttons-c">
|
||||||
<icon-button
|
<icon-button
|
||||||
toRoute="/piyangolar/piyango-listesi"
|
@click="goToListWithFilter"
|
||||||
icon="list"
|
icon="list"
|
||||||
iconClass="ico-section ico-section-header-btn" />
|
iconClass="ico-section ico-section-header-btn" />
|
||||||
</div>
|
</div>
|
||||||
@ -60,9 +60,11 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
import { useDateStore } from '@/stores/dateStore'
|
import { useDateStore } from '@/stores/dateStore'
|
||||||
|
import { useRouter } from 'vue-router'
|
||||||
import icourl from '@/assets/images/icons.svg'
|
import icourl from '@/assets/images/icons.svg'
|
||||||
|
|
||||||
const dateStore = useDateStore()
|
const dateStore = useDateStore()
|
||||||
|
const router = useRouter()
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
tableData: Record<string, any>
|
tableData: Record<string, any>
|
||||||
@ -76,6 +78,7 @@
|
|||||||
dateKey: string
|
dateKey: string
|
||||||
iconBack: string
|
iconBack: string
|
||||||
total: number
|
total: number
|
||||||
|
filterParams?: Record<string, any>
|
||||||
}>()
|
}>()
|
||||||
const totalData = ref<number>(props.total)
|
const totalData = ref<number>(props.total)
|
||||||
|
|
||||||
@ -92,4 +95,18 @@
|
|||||||
const OnClick = (e: Event, row: object) => {
|
const OnClick = (e: Event, row: object) => {
|
||||||
emit('click', row)
|
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>
|
</script>
|
||||||
|
|||||||
@ -590,6 +590,17 @@
|
|||||||
searchForm.value = false
|
searchForm.value = false
|
||||||
mobileButtons.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(() => {
|
onBeforeMount(() => {
|
||||||
if (globalStore.screenWidth >= globalStore.breakPoints.tabletp)
|
if (globalStore.screenWidth >= globalStore.breakPoints.tabletp)
|
||||||
mobileButtons.value = true
|
mobileButtons.value = true
|
||||||
@ -598,6 +609,21 @@
|
|||||||
RouteSearchControl()
|
RouteSearchControl()
|
||||||
RouteFilterControl()
|
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()
|
if (props.apiList !== undefined) GetLocalData()
|
||||||
|
|
||||||
window.addEventListener('resize', Resize)
|
window.addEventListener('resize', Resize)
|
||||||
|
|||||||
@ -48,7 +48,7 @@ axios.interceptors.response.use(
|
|||||||
const token = sessionStorage.getItem(usersStore.userStorageKeys.TOKEN)
|
const token = sessionStorage.getItem(usersStore.userStorageKeys.TOKEN)
|
||||||
if (token !== undefined) {
|
if (token !== undefined) {
|
||||||
usersStore.ResetUserData()
|
usersStore.ResetUserData()
|
||||||
router.push('/login')
|
router.push('/giris')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return Promise.reject(error)
|
return Promise.reject(error)
|
||||||
|
|||||||
@ -71,7 +71,7 @@
|
|||||||
let dt = await dataStore.dataPost('Auth/logout')
|
let dt = await dataStore.dataPost('Auth/logout')
|
||||||
}
|
}
|
||||||
usersStore.ResetUserData()
|
usersStore.ResetUserData()
|
||||||
router.push('/login')
|
router.push('/giris')
|
||||||
}
|
}
|
||||||
|
|
||||||
const closeProfileMenu = (e: Event) => {
|
const closeProfileMenu = (e: Event) => {
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import ForgotPassword from '@/module/auth/views/ForgotPassword.vue'
|
import ForgotPassword from '@/module/auth/views/ForgotPassword.vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
path: '/forgot-password',
|
path: '/sifremi-unuttum',
|
||||||
name: 'ForgotPassword',
|
name: 'ForgotPassword',
|
||||||
component: ForgotPassword,
|
component: ForgotPassword,
|
||||||
meta: {
|
meta: {
|
||||||
|
|||||||
@ -1,11 +1,6 @@
|
|||||||
import Login from "@/module/auth/routes/login";
|
import Login from '@/module/auth/routes/login'
|
||||||
import Register from "@/module/auth/routes/register";
|
import Register from '@/module/auth/routes/register'
|
||||||
import ForgotPassword from "@/module/auth/routes/forgot-password";
|
import ForgotPassword from '@/module/auth/routes/forgot-password'
|
||||||
|
import ResetPassword from '@/module/auth/routes/reset-password'
|
||||||
export default [
|
|
||||||
Login,
|
|
||||||
Register,
|
|
||||||
ForgotPassword
|
|
||||||
]
|
|
||||||
|
|
||||||
|
|
||||||
|
export default [Login, Register, ForgotPassword, ResetPassword]
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import Login from '@/module/auth/views/Login.vue'
|
import Login from '@/module/auth/views/Login.vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
path: '/login',
|
path: '/giris',
|
||||||
name: 'Login',
|
name: 'Login',
|
||||||
component: Login,
|
component: Login,
|
||||||
meta: {
|
meta: {
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import Register from '@/module/auth/views/Register.vue'
|
import Register from '@/module/auth/views/Register.vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
path: '/register',
|
path: '/kayit-ol',
|
||||||
name: 'Register',
|
name: 'Register',
|
||||||
component: Register,
|
component: Register,
|
||||||
meta: {
|
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 { defineStore } from 'pinia'
|
||||||
import { useDataStore } from '@/stores/dataStore'
|
import { useDataStore } from '@/stores/dataStore'
|
||||||
import { useAuthStore } from '../stores/authStore'
|
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 dataStore = useDataStore()
|
||||||
const authStore = useAuthStore()
|
const authStore = useAuthStore()
|
||||||
|
const authValidationStore = useAuthValidationStore()
|
||||||
|
const usersStore = useUsersStore()
|
||||||
|
|
||||||
const GetAAuthRoleList = async () => {
|
const Login = async () => {
|
||||||
if (authStore.rolesList.length === 0) {
|
if (authValidationStore.LoginFormCheck()) {
|
||||||
let data = await dataStore.dataGet('Auth/rolelistesi')
|
let login = await dataStore.dataPost('Auth/login', {
|
||||||
authStore.rolesList = data
|
data: authStore.loginData
|
||||||
}
|
})
|
||||||
}
|
Object.assign(authStore.loginData, authStore.safeLoginData)
|
||||||
|
if (login !== 'errorfalse') {
|
||||||
return {GetAAuthRoleList}
|
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 loginData = reactive<Record<string, any>>({ username: '', password: '' })
|
||||||
const safeLoginData = reactive<Record<string, any>>({})
|
const safeLoginData = reactive<Record<string, any>>({})
|
||||||
const rolesList = ref<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)
|
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>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
<div class="login-nav login-nav-back">
|
<div class="login-nav login-nav-back">
|
||||||
<RouterLink to="/login">< Geri</RouterLink>
|
<RouterLink to="/giris">< Geri</RouterLink>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|||||||
@ -3,14 +3,12 @@
|
|||||||
<section class="section-login">
|
<section class="section-login">
|
||||||
<div class="login-header">
|
<div class="login-header">
|
||||||
<div class="logo-header">
|
<div class="logo-header">
|
||||||
<img
|
<img src="@/assets/images/cekilisevi-logo-n.png" alt="MPI Çekiliş Evi" />
|
||||||
src="@/assets/images/cekilisevi-logo-n.png"
|
|
||||||
alt="MPI Çekiliş Evi"/>
|
|
||||||
</div>
|
</div>
|
||||||
<h1>Giriş Yap</h1>
|
<h1>Giriş Yap</h1>
|
||||||
</div>
|
</div>
|
||||||
<div class="section-content">
|
<div class="section-content">
|
||||||
<form action="#" id="login-form" @submit.prevent="Login">
|
<form action="#" id="login-form" @submit.prevent="authService.Login">
|
||||||
<form-input
|
<form-input
|
||||||
type="email"
|
type="email"
|
||||||
modelKey="username"
|
modelKey="username"
|
||||||
@ -18,12 +16,11 @@
|
|||||||
required
|
required
|
||||||
label="Kullanıcı Adı (e-posta adresi)"
|
label="Kullanıcı Adı (e-posta adresi)"
|
||||||
placeholder="eposta@alanadi.com"
|
placeholder="eposta@alanadi.com"
|
||||||
:invalidText="authValidationStore.invalidTexts.username" />
|
:invalidText="authValidationStore.loginInvalidTexts.username" />
|
||||||
|
|
||||||
<form-input
|
<form-input
|
||||||
type="password"
|
type="password"
|
||||||
label="Şifre"
|
label="Şifre"
|
||||||
|
|
||||||
v-model="authStore.loginData.password"
|
v-model="authStore.loginData.password"
|
||||||
required />
|
required />
|
||||||
|
|
||||||
@ -32,63 +29,37 @@
|
|||||||
v-if="authValidationStore.isLoginMessage">
|
v-if="authValidationStore.isLoginMessage">
|
||||||
<span>{{ authValidationStore.loginMessage }}</span>
|
<span>{{ authValidationStore.loginMessage }}</span>
|
||||||
</div>
|
</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
|
Giriş Yap
|
||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
<div class="login-nav">
|
<div class="login-nav">
|
||||||
<RouterLink to="/forgot-password">Şifremi Unuttum</RouterLink>
|
<RouterLink to="/sifremi-unuttum">Şifremi Unuttum</RouterLink>
|
||||||
<RouterLink to="/register">Kaydol</RouterLink>
|
<RouterLink to="/kayit-ol">Kayıt Ol</RouterLink>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</GuestLayout>
|
</GuestLayout>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { onBeforeMount, reactive, ref } from 'vue'
|
import { onBeforeMount } from 'vue'
|
||||||
|
|
||||||
import { useUsersStore } from '@/stores/usersStore'
|
import { useUsersStore } from '@/stores/usersStore'
|
||||||
const usersStore = useUsersStore()
|
const usersStore = useUsersStore()
|
||||||
import { useDataStore } from '@/stores/dataStore'
|
|
||||||
const dataStore = useDataStore()
|
|
||||||
import { useAuthStore } from '../stores/authStore'
|
import { useAuthStore } from '../stores/authStore'
|
||||||
const authStore = useAuthStore()
|
const authStore = useAuthStore()
|
||||||
import { useAuthValidationStore } from '../stores/authValidationStore'
|
import { useAuthValidationStore } from '../validation/authValidationStore'
|
||||||
const authValidationStore = useAuthValidationStore()
|
const authValidationStore = useAuthValidationStore()
|
||||||
|
import { useAuthService } from '../services/authService'
|
||||||
|
const authService = useAuthService()
|
||||||
import router from '@/router'
|
import router from '@/router'
|
||||||
|
|
||||||
import GuestLayout from '@/layouts/GuestLayout.vue'
|
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(() => {
|
onBeforeMount(() => {
|
||||||
if (usersStore.userIsAuth) router.push('/')
|
if (usersStore.userIsAuth) router.push('/')
|
||||||
})
|
})
|
||||||
|
|||||||
@ -339,7 +339,7 @@
|
|||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
<div class="login-nav login-nav-back">
|
<div class="login-nav login-nav-back">
|
||||||
<RouterLink to="/login">< Geri</RouterLink>
|
<RouterLink to="/giris">< Geri</RouterLink>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
@ -355,7 +355,7 @@
|
|||||||
const globalDataStore = useGlobalDataStore()
|
const globalDataStore = useGlobalDataStore()
|
||||||
import { useValidationStore } from '@/stores/validationStore'
|
import { useValidationStore } from '@/stores/validationStore'
|
||||||
const validationStore = useValidationStore()
|
const validationStore = useValidationStore()
|
||||||
import { useAuthValidationStore } from '../stores/authValidationStore'
|
import { useAuthValidationStore } from '../validation/authValidationStore'
|
||||||
const authValidationStore = useAuthValidationStore()
|
const authValidationStore = useAuthValidationStore()
|
||||||
import router from '@/router'
|
import router from '@/router'
|
||||||
|
|
||||||
@ -413,7 +413,7 @@
|
|||||||
'Başarıyla kayıt oldunuz. Kullanıcı adı ve şifreniz ile giriş yapabilirsiniz.'
|
'Başarıyla kayıt oldunuz. Kullanıcı adı ve şifreniz ile giriş yapabilirsiniz.'
|
||||||
authValidationStore.isLoginMessage = true
|
authValidationStore.isLoginMessage = true
|
||||||
|
|
||||||
router.push('/login')
|
router.push('/giris')
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
uyeBilgileriStore.isFormValid = true
|
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>
|
||||||
@ -148,6 +148,8 @@
|
|||||||
const uploadProgressValue = ref(0)
|
const uploadProgressValue = ref(0)
|
||||||
const uploadProgressPanel = ref(false)
|
const uploadProgressPanel = ref(false)
|
||||||
|
|
||||||
|
const connectionId = ref('')
|
||||||
|
|
||||||
const tableHeader = ref<Record<string, any>[]>([
|
const tableHeader = ref<Record<string, any>[]>([
|
||||||
{
|
{
|
||||||
name: 'cekilisKatilimSiraNo',
|
name: 'cekilisKatilimSiraNo',
|
||||||
@ -252,7 +254,8 @@
|
|||||||
else return ''
|
else return ''
|
||||||
})
|
})
|
||||||
|
|
||||||
const AddNewDocument = () => {
|
const AddNewDocument = async () => {
|
||||||
|
connectionId.value = await connectToHub()
|
||||||
dataStore.panelData = {
|
dataStore.panelData = {
|
||||||
title: '',
|
title: '',
|
||||||
file: ''
|
file: ''
|
||||||
@ -277,7 +280,7 @@
|
|||||||
piyangoKatilimciStore.katilimciUserPanel = true
|
piyangoKatilimciStore.katilimciUserPanel = true
|
||||||
}
|
}
|
||||||
const FileUpload = async () => {
|
const FileUpload = async () => {
|
||||||
const connectionId = await connectToHub()
|
// Mevcut bağlantıyı kullan (AddNewDocument'te açıldı)
|
||||||
|
|
||||||
// Progress modal'ı aç
|
// Progress modal'ı aç
|
||||||
uploadProgressValue.value = 0
|
uploadProgressValue.value = 0
|
||||||
@ -302,7 +305,7 @@
|
|||||||
)
|
)
|
||||||
console.log(dataStore.panelData)
|
console.log(dataStore.panelData)
|
||||||
const response = await dataStore.dataPost(
|
const response = await dataStore.dataPost(
|
||||||
`Katilimci/ExcelleYukle/${piyangoStore.selectedLottery}?connectionId=${connectionId}`,
|
`Katilimci/ExcelleYukle/${piyangoStore.selectedLottery}?connectionId=${connectionId.value}`,
|
||||||
{
|
{
|
||||||
data: formData,
|
data: formData,
|
||||||
headers: { 'Content-Type': 'multipart/form-data' }
|
headers: { 'Content-Type': 'multipart/form-data' }
|
||||||
@ -316,25 +319,6 @@
|
|||||||
uploadProgressPanel.value = false
|
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 = () => {
|
const DeleteAllButton = () => {
|
||||||
dialogStore.CreateDialog({
|
dialogStore.CreateDialog({
|
||||||
title: 'Tüm Katılımcıları Sil',
|
title: 'Tüm Katılımcıları Sil',
|
||||||
@ -346,7 +330,7 @@
|
|||||||
{
|
{
|
||||||
label: 'Tüm katılımcıları Sil',
|
label: 'Tüm katılımcıları Sil',
|
||||||
type: 'alert',
|
type: 'alert',
|
||||||
function: () => DeleteAll
|
function: () => DeleteAll()
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
|||||||
@ -19,6 +19,7 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</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" />
|
<piyango-bilgileri-display-content v-if="loaded" :isPreview="isPreview" />
|
||||||
</div>
|
</div>
|
||||||
<panel-wrapper
|
<panel-wrapper
|
||||||
|
|||||||
@ -29,6 +29,9 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</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">
|
<div class="form-part-content" v-if="loaded">
|
||||||
<lottery-states :piyangoAmac="piyangoStore.lotteryData.amacpiyangoId" />
|
<lottery-states :piyangoAmac="piyangoStore.lotteryData.amacpiyangoId" />
|
||||||
<template v-if="!piyangoStore.isNew">
|
<template v-if="!piyangoStore.isNew">
|
||||||
@ -106,7 +109,7 @@
|
|||||||
'/uyeler/detay/' +
|
'/uyeler/detay/' +
|
||||||
piyangoStore.lotteryData.baglisirketId +
|
piyangoStore.lotteryData.baglisirketId +
|
||||||
'/yetkili-uye/detay/' +
|
'/yetkili-uye/detay/' +
|
||||||
piyangoStore.lotteryData.duzenleyenId
|
piyangoStore.lotteryData.duzenleyenId+'/kisi-kurum-bilgileri'
|
||||||
"
|
"
|
||||||
class="button-c">
|
class="button-c">
|
||||||
Üyeyi Kontrol Et
|
Üyeyi Kontrol Et
|
||||||
|
|||||||
@ -82,9 +82,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'aciklama',
|
name: 'aciklama',
|
||||||
title: 'Açıklama',
|
title: 'Açıklama'
|
||||||
sort: true,
|
|
||||||
style: { width: '30%' }
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
dosyaUrl: 'aciklama',
|
dosyaUrl: 'aciklama',
|
||||||
@ -95,7 +93,19 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
style: { width: '20%' }
|
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>) => {
|
const EditOnay = (d: Record<string, any>) => {
|
||||||
|
|||||||
@ -9,7 +9,7 @@
|
|||||||
listVal="id"
|
listVal="id"
|
||||||
v-model="selectedIkramiye"
|
v-model="selectedIkramiye"
|
||||||
:invalidText="
|
:invalidText="
|
||||||
piyangoDosyaKapamaValidationStore.ikramiyeInvalidTexts.taahhutEdilenIkramiye
|
piyangoDosyaKapamaValidationStore.ikramiyeInvalidTexts.tahhutEdilenIkramiye
|
||||||
">
|
">
|
||||||
<template #activator="data">
|
<template #activator="data">
|
||||||
{{
|
{{
|
||||||
@ -123,7 +123,7 @@
|
|||||||
piyangoIkramiyeStore.piyangoAllIkramiyeData.forEach((item) => {
|
piyangoIkramiyeStore.piyangoAllIkramiyeData.forEach((item) => {
|
||||||
if (
|
if (
|
||||||
`${item.cinsi}, ${item.marka}, ${item.model}, (${item.asilTalihliAdedi} adet)` ===
|
`${item.cinsi}, ${item.marka}, ${item.model}, (${item.asilTalihliAdedi} adet)` ===
|
||||||
piyangoDosyaKapamaStore.dosyaKapamaIkramiyeData.taahhutEdilenIkramiye
|
piyangoDosyaKapamaStore.dosyaKapamaIkramiyeData.tahhutEdilenIkramiye
|
||||||
) {
|
) {
|
||||||
selectedIkramiye.value = item.id
|
selectedIkramiye.value = item.id
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,19 +1,33 @@
|
|||||||
import * as signalR from '@microsoft/signalr'
|
import * as signalR from '@microsoft/signalr'
|
||||||
import { v4 as uuidv4 } from 'uuid'
|
|
||||||
|
|
||||||
let connection: signalR.HubConnection
|
let connection: signalR.HubConnection
|
||||||
let connectionId = ''
|
let connectionId = ''
|
||||||
|
|
||||||
export const connectToHub = async () => {
|
export const connectToHub = async () => {
|
||||||
|
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()
|
connection = new signalR.HubConnectionBuilder()
|
||||||
.withUrl(import.meta.env.VITE_SOCKET_URL, {
|
.withUrl(import.meta.env.VITE_SOCKET_URL, {
|
||||||
withCredentials: false // Bu zorunlu, yoksa cookie vs gönderilmez
|
withCredentials: true,
|
||||||
}) // backend adresine göre düzenle
|
skipNegotiation: true, // WebSocket kullanırken negotiation atlanabilir
|
||||||
|
transport: signalR.HttpTransportType.WebSockets
|
||||||
|
})
|
||||||
.withAutomaticReconnect()
|
.withAutomaticReconnect()
|
||||||
.build()
|
.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()
|
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
|
return connectionId
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -91,13 +91,14 @@ export const usePiyangoStore = defineStore('piyangoStore', () => {
|
|||||||
|
|
||||||
const duzenleyenLink = computed<string | null>(() => {
|
const duzenleyenLink = computed<string | null>(() => {
|
||||||
if (lotteryData.baglisirketId === null && lotteryData.duzenleyenId !== 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)
|
else if (lotteryData.duzenleyenId !== null && lotteryData.baglisirketId !== null)
|
||||||
return (
|
return (
|
||||||
'/uyeler/detay/' +
|
'/uyeler/detay/' +
|
||||||
araciUyeData.baglisirketId +
|
lotteryData.baglisirketId +
|
||||||
'/yetkili-uye/detay/' +
|
'/yetkili-uye/detay/' +
|
||||||
lotteryData.duzenleyenId
|
lotteryData.duzenleyenId +
|
||||||
|
'/kisi-kurum-bilgileri'
|
||||||
)
|
)
|
||||||
else return null
|
else return null
|
||||||
})
|
})
|
||||||
|
|||||||
@ -37,6 +37,7 @@ export const usePiyangoDosyaKapamaValidationStore = defineStore(
|
|||||||
'tahhutEdilenIkramiye',
|
'tahhutEdilenIkramiye',
|
||||||
'Lütfen taahhüt edilen ikramiyeyi seçiniz.'
|
'Lütfen taahhüt edilen ikramiyeyi seçiniz.'
|
||||||
)
|
)
|
||||||
|
|
||||||
if (
|
if (
|
||||||
validationStore.checkEmpty(
|
validationStore.checkEmpty(
|
||||||
piyangoDosyaKapamaStore.dosyaKapamaIkramiyeData.tahhutEdilenIkramiyeAdet
|
piyangoDosyaKapamaStore.dosyaKapamaIkramiyeData.tahhutEdilenIkramiyeAdet
|
||||||
@ -52,14 +53,39 @@ export const usePiyangoDosyaKapamaValidationStore = defineStore(
|
|||||||
piyangoDosyaKapamaStore.dosyaKapamaIkramiyeData.teslimEdilenIkramiyeAsil
|
piyangoDosyaKapamaStore.dosyaKapamaIkramiyeData.teslimEdilenIkramiyeAsil
|
||||||
) &&
|
) &&
|
||||||
validationStore.checkEmpty(
|
validationStore.checkEmpty(
|
||||||
piyangoDosyaKapamaStore.dosyaKapamaIkramiyeData.teslimEdilenIkramiyeAsil
|
piyangoDosyaKapamaStore.dosyaKapamaIkramiyeData.teslimEdilenIkramiyeYedek
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
isIkramiyeFormValid.value = false
|
isIkramiyeFormValid.value = false
|
||||||
ikramiyeInvalidTexts.teslimEdilenIkramiyeAsil =
|
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 =
|
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(
|
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.'
|
'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
|
isIkramiyeFormValid.value = Object.keys(ikramiyeInvalidTexts).length === 0
|
||||||
return isIkramiyeFormValid.value
|
return isIkramiyeFormValid.value
|
||||||
}
|
}
|
||||||
|
|||||||
@ -23,7 +23,8 @@
|
|||||||
</AdminLayout>
|
</AdminLayout>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<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 AdminLayout from '@/layouts/AdminLayout.vue'
|
||||||
import { useDateStore } from '@/stores/dateStore'
|
import { useDateStore } from '@/stores/dateStore'
|
||||||
@ -39,6 +40,7 @@
|
|||||||
const piyangoServices = usePiyangoServices()
|
const piyangoServices = usePiyangoServices()
|
||||||
|
|
||||||
import router from '@/router'
|
import router from '@/router'
|
||||||
|
const route = useRoute()
|
||||||
|
|
||||||
const loaded = ref<boolean>(false)
|
const loaded = ref<boolean>(false)
|
||||||
const apiList = ref<string>('')
|
const apiList = ref<string>('')
|
||||||
@ -241,4 +243,13 @@
|
|||||||
|
|
||||||
loaded.value = true
|
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>
|
</script>
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
<div :class="['form-part']" id="display-bilgi">
|
<div :class="['form-part']" id="display-bilgi">
|
||||||
<div class="form-part-title">
|
<div class="form-part-title">
|
||||||
<h4>Piyango Bilgileri</h4>
|
<h4>Piyango Bilgileri</h4>
|
||||||
<div class="form-part-title-buttons" v-if="!isPreview">
|
<div class="form-part-title-buttons" v-if="!isPreview && loaded">
|
||||||
<button
|
<button
|
||||||
@click="BasvuruBedeliDialog"
|
@click="BasvuruBedeliDialog"
|
||||||
v-if="
|
v-if="
|
||||||
@ -31,6 +31,7 @@
|
|||||||
</router-link>
|
</router-link>
|
||||||
</div>
|
</div>
|
||||||
</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" />
|
<piyango-bilgileri-display-content v-if="loaded" :isPreview="isPreview" />
|
||||||
|
|
||||||
<!-- İzin Bedeli Modal -->
|
<!-- İzin Bedeli Modal -->
|
||||||
@ -162,11 +163,13 @@
|
|||||||
const calculatedKdv = ref<number>(0)
|
const calculatedKdv = ref<number>(0)
|
||||||
const calculatedOran = ref<number>(0)
|
const calculatedOran = ref<number>(0)
|
||||||
|
|
||||||
const calculatedBasvuruKdv = computed<number>(
|
const calculatedBasvuruKdv = computed<number>(() =>
|
||||||
() =>
|
muhasebeSettingsStore.muhasebeSettingsForm.basvuruBedeli !== undefined &&
|
||||||
(Number(muhasebeSettingsStore.muhasebeSettingsForm.basvuruBedeli) *
|
muhasebeSettingsStore.muhasebeSettingsForm.basvuruBedeliKdvOrani !== undefined
|
||||||
|
? (Number(muhasebeSettingsStore.muhasebeSettingsForm.basvuruBedeli) *
|
||||||
Number(muhasebeSettingsStore.muhasebeSettingsForm.basvuruBedeliKdvOrani)) /
|
Number(muhasebeSettingsStore.muhasebeSettingsForm.basvuruBedeliKdvOrani)) /
|
||||||
100
|
100
|
||||||
|
: 0
|
||||||
)
|
)
|
||||||
|
|
||||||
const GetData = async () => {
|
const GetData = async () => {
|
||||||
@ -215,18 +218,13 @@
|
|||||||
}
|
}
|
||||||
const GetIkramiyeTotalValues = async () => {
|
const GetIkramiyeTotalValues = async () => {
|
||||||
console.log(piyangoStore, 'piyangoStore')
|
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') {
|
if (data !== 'errorfalse') {
|
||||||
piyangoIkramiyeStore.totalIkramiyeValue = data.toplamdeger
|
piyangoIkramiyeStore.totalIkramiyeValue = data.toplamdeger
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const BasvuruBedeliDialog = () => {
|
const BasvuruBedeliDialog = () => {
|
||||||
console.log(muhasebeSettingsStore.muhasebeSettingsForm.basvuruBedeli)
|
|
||||||
console.log(calculatedBasvuruKdv.value)
|
|
||||||
console.log(
|
|
||||||
Number(muhasebeSettingsStore.muhasebeSettingsForm.basvuruBedeli) +
|
|
||||||
calculatedBasvuruKdv.value
|
|
||||||
)
|
|
||||||
dialogStore.CreateDialog({
|
dialogStore.CreateDialog({
|
||||||
title: 'Başvuru Bedelini Muhasebeleştir',
|
title: 'Başvuru Bedelini Muhasebeleştir',
|
||||||
id: 'basvurubedelimuhasebelestir',
|
id: 'basvurubedelimuhasebelestir',
|
||||||
@ -234,25 +232,40 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Başvuru Bedeli:</td>
|
<td>Başvuru Bedeli:</td>
|
||||||
<td>${globalStore.toTrLocale(
|
<td>${
|
||||||
|
muhasebeSettingsStore.muhasebeSettingsForm.basvuruBedeli !==
|
||||||
|
undefined
|
||||||
|
? globalStore.toTrLocale(
|
||||||
muhasebeSettingsStore.muhasebeSettingsForm.basvuruBedeli
|
muhasebeSettingsStore.muhasebeSettingsForm.basvuruBedeli
|
||||||
)} ₺</td>
|
)
|
||||||
|
: 0
|
||||||
|
} ₺</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>KDV (%${
|
<td>KDV (%${
|
||||||
muhasebeSettingsStore.muhasebeSettingsForm.basvuruBedeliKdvOrani
|
muhasebeSettingsStore.muhasebeSettingsForm.basvuruBedeliKdvOrani
|
||||||
}):</td>
|
}):</td>
|
||||||
<td>
|
<td>
|
||||||
${globalStore.toTrLocale(calculatedBasvuruKdv.value)}
|
${
|
||||||
|
calculatedBasvuruKdv.value !== undefined
|
||||||
|
? globalStore.toTrLocale(calculatedBasvuruKdv.value)
|
||||||
|
: 0
|
||||||
|
}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Toplam Bedel:</td>
|
<td>Toplam Bedel:</td>
|
||||||
<td>
|
<td>
|
||||||
${globalStore.toTrLocale(
|
${
|
||||||
Number(muhasebeSettingsStore.muhasebeSettingsForm.basvuruBedeli) +
|
muhasebeSettingsStore.muhasebeSettingsForm.basvuruBedeli !==
|
||||||
calculatedBasvuruKdv.value
|
undefined
|
||||||
)}
|
? globalStore.toTrLocale(
|
||||||
|
Number(
|
||||||
|
muhasebeSettingsStore.muhasebeSettingsForm.basvuruBedeli
|
||||||
|
) + calculatedBasvuruKdv.value
|
||||||
|
)
|
||||||
|
: 0
|
||||||
|
}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
@ -262,12 +275,13 @@
|
|||||||
{
|
{
|
||||||
label: 'Başvuru Bedelini Muhasebeleştir',
|
label: 'Başvuru Bedelini Muhasebeleştir',
|
||||||
type: 'alert',
|
type: 'alert',
|
||||||
function: () => BasvuruBedeliMuhasebelestir
|
function: () => BasvuruBedeliMuhasebelestir()
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const BasvuruBedeliMuhasebelestir = async () => {
|
const BasvuruBedeliMuhasebelestir = async () => {
|
||||||
|
console.log('basvuru bedeli muhasebelestir')
|
||||||
let data = await dataStore.dataGet(
|
let data = await dataStore.dataGet(
|
||||||
'MuhasebeSettings/BasvuruBedeli/' + piyangoStore.selectedLottery
|
'MuhasebeSettings/BasvuruBedeli/' + piyangoStore.selectedLottery
|
||||||
)
|
)
|
||||||
|
|||||||
@ -12,6 +12,7 @@
|
|||||||
<div class="button-c button-save" @click="SaveMenu">Kaydet</div>
|
<div class="button-c button-save" @click="SaveMenu">Kaydet</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-inner-comment waiting-d" v-if="!loaded">Yükleniyor, lütfen bekleyiniz...</div>
|
||||||
<div class="form-part-content">
|
<div class="form-part-content">
|
||||||
<template v-if="loaded">
|
<template v-if="loaded">
|
||||||
<template v-if="siteManagementMenuStore.menuContentList.length > 0">
|
<template v-if="siteManagementMenuStore.menuContentList.length > 0">
|
||||||
|
|||||||
@ -485,7 +485,7 @@
|
|||||||
'/uyeler/detay/' +
|
'/uyeler/detay/' +
|
||||||
route.params.uyeId +
|
route.params.uyeId +
|
||||||
'/yetkili-uye/detay/' +
|
'/yetkili-uye/detay/' +
|
||||||
register.user.id
|
register.user.id+'/kisi-kurum-bilgileri'
|
||||||
)
|
)
|
||||||
isNew.value = false
|
isNew.value = false
|
||||||
}else{
|
}else{
|
||||||
|
|||||||
@ -8,7 +8,7 @@ export default [
|
|||||||
params: {
|
params: {
|
||||||
uyeId: to.params.uyeId,
|
uyeId: to.params.uyeId,
|
||||||
altUyeId: to.params.altUyeId,
|
altUyeId: to.params.altUyeId,
|
||||||
tabid: 'piyango-bilgileri'
|
tabid: 'kisi-kurum-bilgileri'
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
@ -1,6 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<AdminLayout>
|
<AdminLayout>
|
||||||
<Breadcrumb current-page-text="Üyeler Listesi" go="/" />
|
<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">
|
<section class="section-list">
|
||||||
<list-table-content
|
<list-table-content
|
||||||
v-if="loaded"
|
v-if="loaded"
|
||||||
|
|||||||
@ -39,7 +39,7 @@ router.beforeEach((to, from) => {
|
|||||||
const usersStore = useUsersStore()
|
const usersStore = useUsersStore()
|
||||||
|
|
||||||
if (to.meta.authRequired && !usersStore.userIsAuth && from.name !== 'Login') {
|
if (to.meta.authRequired && !usersStore.userIsAuth && from.name !== 'Login') {
|
||||||
router.push('/login')
|
router.push('/giris')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@ -10,7 +10,8 @@
|
|||||||
iconBack="waiting"
|
iconBack="waiting"
|
||||||
:tableData="onayBekleyenPiyango"
|
:tableData="onayBekleyenPiyango"
|
||||||
lineRoute="piyangolar/detay/"
|
lineRoute="piyangolar/detay/"
|
||||||
lineRouteKey="id" />
|
lineRouteKey="id"
|
||||||
|
:filterParams="{ durumId: 0 }" />
|
||||||
<dash-piyango-liste
|
<dash-piyango-liste
|
||||||
v-if="loaded"
|
v-if="loaded"
|
||||||
title="İtiraz/Şikayet Edilen Piyangolar"
|
title="İtiraz/Şikayet Edilen Piyangolar"
|
||||||
@ -21,7 +22,8 @@
|
|||||||
iconBack="alert"
|
iconBack="alert"
|
||||||
:tableData="itirazEdilenPiyango"
|
:tableData="itirazEdilenPiyango"
|
||||||
lineRoute="piyangolar/detay/"
|
lineRoute="piyangolar/detay/"
|
||||||
lineRouteKey="id" />
|
lineRouteKey="id"
|
||||||
|
:filterParams="{ durumId: 1 }" />
|
||||||
|
|
||||||
<dash-piyango-liste
|
<dash-piyango-liste
|
||||||
v-if="loaded"
|
v-if="loaded"
|
||||||
@ -33,7 +35,8 @@
|
|||||||
iconBack="next"
|
iconBack="next"
|
||||||
:tableData="yaklasanPiyango"
|
:tableData="yaklasanPiyango"
|
||||||
lineRoute="piyangolar/detay/"
|
lineRoute="piyangolar/detay/"
|
||||||
lineRouteKey="id" />
|
lineRouteKey="id"
|
||||||
|
:filterParams="{ baslangicTarihi: '>' + new Date().toISOString().split('T')[0] }"/>
|
||||||
|
|
||||||
<dash-piyango-liste
|
<dash-piyango-liste
|
||||||
v-if="loaded"
|
v-if="loaded"
|
||||||
@ -45,7 +48,8 @@
|
|||||||
iconBack="ok"
|
iconBack="ok"
|
||||||
:tableData="bitenPiyango"
|
:tableData="bitenPiyango"
|
||||||
lineRoute="piyangolar/detay/"
|
lineRoute="piyangolar/detay/"
|
||||||
lineRouteKey="id" />
|
lineRouteKey="id"
|
||||||
|
:filterParams="{ bitisTarihi: '<' + new Date().toISOString().split('T')[0] }" />
|
||||||
</AdminLayout>
|
</AdminLayout>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
|||||||
Reference in New Issue
Block a user