diff --git a/app.vue b/app.vue index 37d51ef..fbc6d71 100644 --- a/app.vue +++ b/app.vue @@ -13,13 +13,13 @@ const categoriesStore = useCategoriesStore() const placeStore = useMyPlacesStore() const authStore = useAuthStore() const configStore = useMyConfigStore() -const userToken = ref('') +const token = useCookie('_auth') async function loadData() { const { data } = await useFetch('https://olcsoberauto.hu/rest/init', { headers: { - 'auth-key': userToken.value + 'auth-key': token.value } } ) @@ -43,15 +43,8 @@ async function loadData() { } } -nuxtApp.hooks.hook('app:created', async () => { - console.log('created') - // userToken.value = window.localStorage.getItem('userToken') - // await loadData() -}) - nuxtApp.hooks.hook('app:mounted', async () => { console.log('mounted...') - userToken.value = window.localStorage.getItem('userToken') await loadData() }) @@ -96,4 +89,10 @@ html { border-left: 4px; border-style: solid; } +.p-disabled, .p-component:disabled{ + opacity: 0.2; +} +pre{ + font-size: 13px; +} \ No newline at end of file diff --git a/components/RentStep.vue b/components/RentStep.vue new file mode 100644 index 0000000..a5a8ab1 --- /dev/null +++ b/components/RentStep.vue @@ -0,0 +1,27 @@ + + + + + + + + + + \ No newline at end of file diff --git a/composables/localeDateString.ts b/composables/localeDateString.ts new file mode 100644 index 0000000..5bf88eb --- /dev/null +++ b/composables/localeDateString.ts @@ -0,0 +1,10 @@ +export const useLocaleDateString = (d:any) => { + let _d = d + if(typeof d === "string"){ + let _d = new Date(d) + } + if(typeof _d === 'object'){ + console.log(typeof _d) + return _d.toLocaleDateString() + } +} diff --git a/nuxt.config.ts b/nuxt.config.ts index 91713a6..e0fe03f 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -6,7 +6,7 @@ export default defineNuxtConfig({ host:'0.0.0.0' }, ssr:false, - modules: ["@primevue/nuxt-module", "@pinia/nuxt"], + modules: ["@primevue/nuxt-module", "@pinia/nuxt", "@nuxt/icon"], css: ['@/assets/styles/tailwind.css', '@/assets/styles/base.css', '@/assets/styles/fonts.css'], primevue: { options: { theme: 'none' ,pt:{ diff --git a/package.json b/package.json index 8332501..ff8e254 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,7 @@ }, "devDependencies": { "@iconify-json/ph": "^1.2.2", + "@nuxt/icon": "1.10.3", "@pinia/nuxt": "0.9.0", "@primevue/nuxt-module": "^4.2.5", "autoprefixer": "^10.4.20", diff --git a/pages/index.vue b/pages/index.vue index dcd6dc0..45bffb5 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -1,7 +1,9 @@ - - - + + + - - {{ auth.user.nev }} - {{ auth.user.email }} - Profilom - Foglalásaim - - - + + + + {{ auth.user.nev }} + {{ auth.user.email }} + + + + + Adataim + + {{ p.label }} + + + Kijelentketés + + + + + - + + + + Jelenleg nincs foglalásod - Foglalás {{ getStateName(rent.status) }} - járatszám:{{ rent.jaratszam }} + járatszám:{{ + rent.jaratszam + }} {{ rent.auto_felvetel_datum }} @@ -78,7 +107,8 @@ function getMont(date) { - Új foglalás + Új + foglalás diff --git a/pages/page/[id].vue b/pages/page/[id].vue index 0b0ae12..62e0dad 100644 --- a/pages/page/[id].vue +++ b/pages/page/[id].vue @@ -1,11 +1,11 @@ - + {{ Title }} - + diff --git a/pages/profile/index.vue b/pages/profile/index.vue index ac4e9fd..7a6e27c 100644 --- a/pages/profile/index.vue +++ b/pages/profile/index.vue @@ -6,62 +6,63 @@ Adataim + - + Név - + E-mail - + Telefon - + Anyja neve - + Születési hely - + Születési idő - + Állampolgárság - + Személyi igazolvány / Útlevél száma - + Jogosítvány száma - + Lakcím - + Tartózkodási cím - - - Adatok mentése + + + Adatok mentése + - - {{ user }} diff --git a/pages/rent.vue b/pages/rent.vue index 77be790..e3ee96a 100644 --- a/pages/rent.vue +++ b/pages/rent.vue @@ -1,9 +1,10 @@ - - + + {{ $route?.meta?.title }} +