cimek szétszedve
This commit is contained in:
parent
c3ffa53fcc
commit
00bb0b68f0
@ -82,4 +82,11 @@
|
||||
1767388089- 13:30
|
||||
1767389489- 0:04
|
||||
1767389854-280:04
|
||||
1767423731- 6:18
|
||||
1767423731- 15:01
|
||||
1767425256- 4:41
|
||||
1767427391- 51:16
|
||||
1767432205- 7:35
|
||||
1767447810- 11:06
|
||||
1767449176- 0:51
|
||||
1767451918- 2:19
|
||||
1767453092- 0:00
|
||||
|
||||
49
components/UserAddress.vue
Normal file
49
components/UserAddress.vue
Normal file
@ -0,0 +1,49 @@
|
||||
<template>
|
||||
<div class="space-y-3">
|
||||
<FloatLabel variant="on">
|
||||
<Select v-model="cim.orszag" inputId="orszag" :options="config.countries" option-value="iso_code_2"
|
||||
optionLabel="name" class="w-full" filter resetFilterOnHide resetFilterOnClear autoFilterFocus />
|
||||
<label for="orszag">Ország</label>
|
||||
</FloatLabel>
|
||||
|
||||
<div class="flex gap-2">
|
||||
<FloatLabel variant="on" class="w-1/3">
|
||||
<InputText id="tartozkodasicim" v-model="cim.iranyitoszam" class="w-full" :invalid="!cim.iranyitoszam" />
|
||||
<label for="tartozkodasicim">Irányítószám</label>
|
||||
</FloatLabel>
|
||||
<FloatLabel variant="on" class="w-2/3">
|
||||
<InputText id="tartozkodasicim" v-model="cim.telepules" class="w-full" :invalid="!cim.telepules" />
|
||||
<label for="tartozkodasicim">Település</label>
|
||||
</FloatLabel>
|
||||
</div>
|
||||
<FloatLabel variant="on">
|
||||
<InputText id="tartozkodasicim" v-model="cim.cim" class="w-full" :invalid="!cim.cim" />
|
||||
<label for="tartozkodasicim">Utca (közterület)</label>
|
||||
</FloatLabel>
|
||||
<div class="flex gap-2">
|
||||
<FloatLabel variant="on">
|
||||
<InputText id="tartozkodasicim" v-model="cim.hazszam" class="w-full" :invalid="!cim.hazszam" />
|
||||
<label for="tartozkodasicim">Házszám</label>
|
||||
</FloatLabel>
|
||||
<FloatLabel variant="on">
|
||||
<InputText id="tartozkodasicim" v-model="cim.emajto" class="w-full" />
|
||||
<label for="tartozkodasicim">Emelet/ajtó</label>
|
||||
</FloatLabel>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
const config = useMyConfigStore()
|
||||
const value = defineModel()
|
||||
const cim = ref({
|
||||
iranyitoszam: '',
|
||||
telepules: '',
|
||||
cim: '',
|
||||
hazszam: '',
|
||||
emajto: '',
|
||||
orszag: 'HU'
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss"></style>
|
||||
@ -1,8 +1,8 @@
|
||||
{
|
||||
"name": "eurocars-rent",
|
||||
"type": "module",
|
||||
"version": "1.0.6",
|
||||
"versionCode": 6,
|
||||
"version": "1.0.7",
|
||||
"versionCode": 7,
|
||||
"scripts": {
|
||||
"build": "nuxt build",
|
||||
"dev": "nuxt dev",
|
||||
|
||||
@ -28,6 +28,9 @@ function getMont(date) {
|
||||
|
||||
}
|
||||
|
||||
import { Device } from '@capacitor/device';
|
||||
const deviceInfo = await Device.getInfo();
|
||||
const deviceId = await Device.getId();
|
||||
</script>
|
||||
<template>
|
||||
<AppMenu />
|
||||
@ -39,6 +42,8 @@ function getMont(date) {
|
||||
Jelenleg nincs foglalásod
|
||||
</div>
|
||||
</div>
|
||||
<pre>{{deviceId}}</pre>
|
||||
<pre>{{deviceInfo}}</pre>
|
||||
|
||||
<div v-for="rent in rentals" class="p-2">
|
||||
<div class="p-card border-t border-t-4 border-primary">
|
||||
|
||||
@ -27,6 +27,7 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
|
||||
const token = useAuthToken()
|
||||
const configStore = useMyConfigStore()
|
||||
const { apiFetch } = useApi()
|
||||
@ -37,47 +38,47 @@ const account = ref()
|
||||
const router = useRouter()
|
||||
|
||||
async function sendAccount() {
|
||||
errorMessage.value = false
|
||||
successMessage.value = false
|
||||
isLoading.value = true
|
||||
errorMessage.value = false
|
||||
successMessage.value = false
|
||||
isLoading.value = true
|
||||
|
||||
const { data } = await apiFetch('/authRequest', {
|
||||
method: "post",
|
||||
body: {
|
||||
account: account.value
|
||||
}
|
||||
})
|
||||
const { data } = await apiFetch('/authRequest', {
|
||||
method: "post",
|
||||
body: {
|
||||
account: account.value
|
||||
}
|
||||
})
|
||||
|
||||
if (data.value?.error) {
|
||||
errorMessage.value = data.value.message
|
||||
if (data.value?.error) {
|
||||
errorMessage.value = data.value.message
|
||||
}
|
||||
|
||||
if (data.value?.success) {
|
||||
|
||||
window.localStorage.setItem('codePrefix', data.value.codePrefix)
|
||||
window.localStorage.setItem('codeExpire', data.value.codeExpire)
|
||||
window.localStorage.setItem('account', data.value.account)
|
||||
|
||||
if (data.value?.message) {
|
||||
successMessage.value = data.value.message
|
||||
}
|
||||
|
||||
if (data.value?.success) {
|
||||
router.push({ path: '/login/code', force: true })
|
||||
}
|
||||
|
||||
window.localStorage.setItem('codePrefix', data.value.codePrefix)
|
||||
window.localStorage.setItem('codeExpire', data.value.codeExpire)
|
||||
window.localStorage.setItem('account', data.value.account)
|
||||
|
||||
if (data.value?.message) {
|
||||
successMessage.value = data.value.message
|
||||
}
|
||||
|
||||
router.push({ path: '/login/code',force:true })
|
||||
}
|
||||
|
||||
isLoading.value = false
|
||||
isLoading.value = false
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
// Ha már be van jelentkezve, irányítsuk a főoldalra
|
||||
const { loadToken, getToken } = useAuthToken()
|
||||
await loadToken()
|
||||
const token = getToken()
|
||||
if (token) {
|
||||
return navigateTo('/')
|
||||
}
|
||||
// Ha már be van jelentkezve, irányítsuk a főoldalra
|
||||
const { loadToken, getToken } = useAuthToken()
|
||||
await loadToken()
|
||||
const token = getToken()
|
||||
if (token) {
|
||||
return navigateTo('/')
|
||||
}
|
||||
|
||||
account.value = window.localStorage.getItem('account')
|
||||
account.value = window.localStorage.getItem('account')
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
@ -65,6 +65,11 @@
|
||||
:invalid="!user.tartozkodasicim" />
|
||||
<label for="tartozkodasicim">Tartózkodási cím</label>
|
||||
</FloatLabel>
|
||||
|
||||
<div>
|
||||
Lakcím:
|
||||
</div>
|
||||
<UserAddress v-model="lakcimData" />
|
||||
|
||||
<Dialog v-model:visible="showDialog" modal :header="dialogType === 'success' ? 'Sikeres' : 'Hiba'" :style="{ width: '20rem' }">
|
||||
<div class="flex items-center gap-3">
|
||||
@ -100,7 +105,7 @@ const showDialog = ref(false)
|
||||
const dialogType = ref<'success' | 'error'>('success')
|
||||
const dialogMessage = ref('')
|
||||
const dialogErrors = ref()
|
||||
|
||||
const lakcimData = ref()
|
||||
// Kötelező mezők listája
|
||||
const requiredFields = [
|
||||
'nev',
|
||||
|
||||
@ -41,6 +41,10 @@ export default defineNuxtPlugin(async (nuxtApp) => {
|
||||
placeStore.places = data.value.places
|
||||
}
|
||||
|
||||
if (data.value?.countries) {
|
||||
configStore.countries = data.value.countries
|
||||
}
|
||||
|
||||
// Csak natív platformon fut
|
||||
if (!Capacitor.isNativePlatform()) {
|
||||
return
|
||||
|
||||
Loading…
Reference in New Issue
Block a user