This commit is contained in:
Juhász Ervin 2025-01-01 23:06:17 +01:00
parent 98b1c11be6
commit 2658719822
20 changed files with 4668 additions and 4342 deletions

56
app.vue
View File

@ -12,7 +12,9 @@ const nuxtApp = useNuxtApp()
const categoriesStore = useCategoriesStore()
const placeStore = useMyPlacesStore()
const authStore = useAuthStore()
const configStore = useMyConfigStore()
const userToken = ref('')
async function loadData() {
const { data } = await useFetch('https://olcsoberauto.hu/rest/init',
{
@ -23,10 +25,17 @@ async function loadData() {
)
if (data.value?.user) {
authStore.user = { id: 1, name: 'Juhász Ervin', email: 'ervinstyle@gmail.com' }
authStore.user = data.value.user
console.log(data.value.user)
}
authStore.user = { id: 1, name: 'Juhász Ervin', email: 'ervinstyle@gmail.com' }
if (data.value?.config) {
configStore.config = data.value.config
}
if (data.value?.states) {
configStore.states = data.value.states
}
if (data.value?.categories) {
categoriesStore.categories = data.value.categories
@ -34,7 +43,14 @@ async function loadData() {
}
}
nuxtApp.hook('app:mounted', async () => {
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()
})
@ -43,15 +59,41 @@ nuxtApp.hook('app:mounted', async () => {
<style>
html {
font-size: 18px;
font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
font-family: "Roboto", serif;
}
.text-center{
.text-center {
text-align: center;
}
.text-start{
.text-start {
text-align: start;
}
.text-end{
.text-end {
text-align: end;
}
.card-loading {
position: absolute;
display: flex;
justify-content: center;
align-items: center;
left: 0;
top: 0;
width: 100%;
height: 100%;
backdrop-filter: blur(5px);
z-index: 1;
}
.p-inputotp-input.p-inputtext-sm {
width: 2rem;
}
.p-message {
outline: none;
border-left: 4px;
border-style: solid;
}
</style>

756
assets/styles/fonts.css Normal file
View File

@ -0,0 +1,756 @@
/* cyrillic-ext */
@font-face {
font-family: 'Roboto';
font-style: italic;
font-weight: 100;
font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v32/KFOiCnqEu92Fr1Mu51QrEz0dL_nz.woff2) format('woff2');
unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
font-family: 'Roboto';
font-style: italic;
font-weight: 100;
font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v32/KFOiCnqEu92Fr1Mu51QrEzQdL_nz.woff2) format('woff2');
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek-ext */
@font-face {
font-family: 'Roboto';
font-style: italic;
font-weight: 100;
font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v32/KFOiCnqEu92Fr1Mu51QrEzwdL_nz.woff2) format('woff2');
unicode-range: U+1F00-1FFF;
}
/* greek */
@font-face {
font-family: 'Roboto';
font-style: italic;
font-weight: 100;
font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v32/KFOiCnqEu92Fr1Mu51QrEzMdL_nz.woff2) format('woff2');
unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
font-family: 'Roboto';
font-style: italic;
font-weight: 100;
font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v32/KFOiCnqEu92Fr1Mu51QrEz8dL_nz.woff2) format('woff2');
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
font-family: 'Roboto';
font-style: italic;
font-weight: 100;
font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v32/KFOiCnqEu92Fr1Mu51QrEz4dL_nz.woff2) format('woff2');
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
font-family: 'Roboto';
font-style: italic;
font-weight: 100;
font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v32/KFOiCnqEu92Fr1Mu51QrEzAdLw.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
font-family: 'Roboto';
font-style: italic;
font-weight: 300;
font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v32/KFOjCnqEu92Fr1Mu51TjASc3CsTKlA.woff2) format('woff2');
unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
font-family: 'Roboto';
font-style: italic;
font-weight: 300;
font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v32/KFOjCnqEu92Fr1Mu51TjASc-CsTKlA.woff2) format('woff2');
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek-ext */
@font-face {
font-family: 'Roboto';
font-style: italic;
font-weight: 300;
font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v32/KFOjCnqEu92Fr1Mu51TjASc2CsTKlA.woff2) format('woff2');
unicode-range: U+1F00-1FFF;
}
/* greek */
@font-face {
font-family: 'Roboto';
font-style: italic;
font-weight: 300;
font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v32/KFOjCnqEu92Fr1Mu51TjASc5CsTKlA.woff2) format('woff2');
unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
font-family: 'Roboto';
font-style: italic;
font-weight: 300;
font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v32/KFOjCnqEu92Fr1Mu51TjASc1CsTKlA.woff2) format('woff2');
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
font-family: 'Roboto';
font-style: italic;
font-weight: 300;
font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v32/KFOjCnqEu92Fr1Mu51TjASc0CsTKlA.woff2) format('woff2');
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
font-family: 'Roboto';
font-style: italic;
font-weight: 300;
font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v32/KFOjCnqEu92Fr1Mu51TjASc6CsQ.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
font-family: 'Roboto';
font-style: italic;
font-weight: 400;
font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v32/KFOkCnqEu92Fr1Mu51xFIzIFKw.woff2) format('woff2');
unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
font-family: 'Roboto';
font-style: italic;
font-weight: 400;
font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v32/KFOkCnqEu92Fr1Mu51xMIzIFKw.woff2) format('woff2');
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek-ext */
@font-face {
font-family: 'Roboto';
font-style: italic;
font-weight: 400;
font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v32/KFOkCnqEu92Fr1Mu51xEIzIFKw.woff2) format('woff2');
unicode-range: U+1F00-1FFF;
}
/* greek */
@font-face {
font-family: 'Roboto';
font-style: italic;
font-weight: 400;
font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v32/KFOkCnqEu92Fr1Mu51xLIzIFKw.woff2) format('woff2');
unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
font-family: 'Roboto';
font-style: italic;
font-weight: 400;
font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v32/KFOkCnqEu92Fr1Mu51xHIzIFKw.woff2) format('woff2');
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
font-family: 'Roboto';
font-style: italic;
font-weight: 400;
font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v32/KFOkCnqEu92Fr1Mu51xGIzIFKw.woff2) format('woff2');
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
font-family: 'Roboto';
font-style: italic;
font-weight: 400;
font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v32/KFOkCnqEu92Fr1Mu51xIIzI.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
font-family: 'Roboto';
font-style: italic;
font-weight: 500;
font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v32/KFOjCnqEu92Fr1Mu51S7ACc3CsTKlA.woff2) format('woff2');
unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
font-family: 'Roboto';
font-style: italic;
font-weight: 500;
font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v32/KFOjCnqEu92Fr1Mu51S7ACc-CsTKlA.woff2) format('woff2');
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek-ext */
@font-face {
font-family: 'Roboto';
font-style: italic;
font-weight: 500;
font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v32/KFOjCnqEu92Fr1Mu51S7ACc2CsTKlA.woff2) format('woff2');
unicode-range: U+1F00-1FFF;
}
/* greek */
@font-face {
font-family: 'Roboto';
font-style: italic;
font-weight: 500;
font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v32/KFOjCnqEu92Fr1Mu51S7ACc5CsTKlA.woff2) format('woff2');
unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
font-family: 'Roboto';
font-style: italic;
font-weight: 500;
font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v32/KFOjCnqEu92Fr1Mu51S7ACc1CsTKlA.woff2) format('woff2');
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
font-family: 'Roboto';
font-style: italic;
font-weight: 500;
font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v32/KFOjCnqEu92Fr1Mu51S7ACc0CsTKlA.woff2) format('woff2');
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
font-family: 'Roboto';
font-style: italic;
font-weight: 500;
font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v32/KFOjCnqEu92Fr1Mu51S7ACc6CsQ.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
font-family: 'Roboto';
font-style: italic;
font-weight: 700;
font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v32/KFOjCnqEu92Fr1Mu51TzBic3CsTKlA.woff2) format('woff2');
unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
font-family: 'Roboto';
font-style: italic;
font-weight: 700;
font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v32/KFOjCnqEu92Fr1Mu51TzBic-CsTKlA.woff2) format('woff2');
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek-ext */
@font-face {
font-family: 'Roboto';
font-style: italic;
font-weight: 700;
font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v32/KFOjCnqEu92Fr1Mu51TzBic2CsTKlA.woff2) format('woff2');
unicode-range: U+1F00-1FFF;
}
/* greek */
@font-face {
font-family: 'Roboto';
font-style: italic;
font-weight: 700;
font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v32/KFOjCnqEu92Fr1Mu51TzBic5CsTKlA.woff2) format('woff2');
unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
font-family: 'Roboto';
font-style: italic;
font-weight: 700;
font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v32/KFOjCnqEu92Fr1Mu51TzBic1CsTKlA.woff2) format('woff2');
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
font-family: 'Roboto';
font-style: italic;
font-weight: 700;
font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v32/KFOjCnqEu92Fr1Mu51TzBic0CsTKlA.woff2) format('woff2');
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
font-family: 'Roboto';
font-style: italic;
font-weight: 700;
font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v32/KFOjCnqEu92Fr1Mu51TzBic6CsQ.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
font-family: 'Roboto';
font-style: italic;
font-weight: 900;
font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v32/KFOjCnqEu92Fr1Mu51TLBCc3CsTKlA.woff2) format('woff2');
unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
font-family: 'Roboto';
font-style: italic;
font-weight: 900;
font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v32/KFOjCnqEu92Fr1Mu51TLBCc-CsTKlA.woff2) format('woff2');
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek-ext */
@font-face {
font-family: 'Roboto';
font-style: italic;
font-weight: 900;
font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v32/KFOjCnqEu92Fr1Mu51TLBCc2CsTKlA.woff2) format('woff2');
unicode-range: U+1F00-1FFF;
}
/* greek */
@font-face {
font-family: 'Roboto';
font-style: italic;
font-weight: 900;
font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v32/KFOjCnqEu92Fr1Mu51TLBCc5CsTKlA.woff2) format('woff2');
unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
font-family: 'Roboto';
font-style: italic;
font-weight: 900;
font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v32/KFOjCnqEu92Fr1Mu51TLBCc1CsTKlA.woff2) format('woff2');
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
font-family: 'Roboto';
font-style: italic;
font-weight: 900;
font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v32/KFOjCnqEu92Fr1Mu51TLBCc0CsTKlA.woff2) format('woff2');
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
font-family: 'Roboto';
font-style: italic;
font-weight: 900;
font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v32/KFOjCnqEu92Fr1Mu51TLBCc6CsQ.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 100;
font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v32/KFOkCnqEu92Fr1MmgVxFIzIFKw.woff2) format('woff2');
unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 100;
font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v32/KFOkCnqEu92Fr1MmgVxMIzIFKw.woff2) format('woff2');
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek-ext */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 100;
font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v32/KFOkCnqEu92Fr1MmgVxEIzIFKw.woff2) format('woff2');
unicode-range: U+1F00-1FFF;
}
/* greek */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 100;
font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v32/KFOkCnqEu92Fr1MmgVxLIzIFKw.woff2) format('woff2');
unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 100;
font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v32/KFOkCnqEu92Fr1MmgVxHIzIFKw.woff2) format('woff2');
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 100;
font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v32/KFOkCnqEu92Fr1MmgVxGIzIFKw.woff2) format('woff2');
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 100;
font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v32/KFOkCnqEu92Fr1MmgVxIIzI.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 300;
font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v32/KFOlCnqEu92Fr1MmSU5fCRc4EsA.woff2) format('woff2');
unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 300;
font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v32/KFOlCnqEu92Fr1MmSU5fABc4EsA.woff2) format('woff2');
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek-ext */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 300;
font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v32/KFOlCnqEu92Fr1MmSU5fCBc4EsA.woff2) format('woff2');
unicode-range: U+1F00-1FFF;
}
/* greek */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 300;
font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v32/KFOlCnqEu92Fr1MmSU5fBxc4EsA.woff2) format('woff2');
unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 300;
font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v32/KFOlCnqEu92Fr1MmSU5fCxc4EsA.woff2) format('woff2');
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 300;
font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v32/KFOlCnqEu92Fr1MmSU5fChc4EsA.woff2) format('woff2');
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 300;
font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v32/KFOlCnqEu92Fr1MmSU5fBBc4.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v32/KFOmCnqEu92Fr1Mu72xKOzY.woff2) format('woff2');
unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v32/KFOmCnqEu92Fr1Mu5mxKOzY.woff2) format('woff2');
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek-ext */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v32/KFOmCnqEu92Fr1Mu7mxKOzY.woff2) format('woff2');
unicode-range: U+1F00-1FFF;
}
/* greek */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v32/KFOmCnqEu92Fr1Mu4WxKOzY.woff2) format('woff2');
unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v32/KFOmCnqEu92Fr1Mu7WxKOzY.woff2) format('woff2');
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v32/KFOmCnqEu92Fr1Mu7GxKOzY.woff2) format('woff2');
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v32/KFOmCnqEu92Fr1Mu4mxK.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 500;
font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v32/KFOlCnqEu92Fr1MmEU9fCRc4EsA.woff2) format('woff2');
unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 500;
font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v32/KFOlCnqEu92Fr1MmEU9fABc4EsA.woff2) format('woff2');
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek-ext */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 500;
font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v32/KFOlCnqEu92Fr1MmEU9fCBc4EsA.woff2) format('woff2');
unicode-range: U+1F00-1FFF;
}
/* greek */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 500;
font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v32/KFOlCnqEu92Fr1MmEU9fBxc4EsA.woff2) format('woff2');
unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 500;
font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v32/KFOlCnqEu92Fr1MmEU9fCxc4EsA.woff2) format('woff2');
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 500;
font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v32/KFOlCnqEu92Fr1MmEU9fChc4EsA.woff2) format('woff2');
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 500;
font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v32/KFOlCnqEu92Fr1MmEU9fBBc4.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 700;
font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v32/KFOlCnqEu92Fr1MmWUlfCRc4EsA.woff2) format('woff2');
unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 700;
font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v32/KFOlCnqEu92Fr1MmWUlfABc4EsA.woff2) format('woff2');
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek-ext */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 700;
font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v32/KFOlCnqEu92Fr1MmWUlfCBc4EsA.woff2) format('woff2');
unicode-range: U+1F00-1FFF;
}
/* greek */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 700;
font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v32/KFOlCnqEu92Fr1MmWUlfBxc4EsA.woff2) format('woff2');
unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 700;
font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v32/KFOlCnqEu92Fr1MmWUlfCxc4EsA.woff2) format('woff2');
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 700;
font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v32/KFOlCnqEu92Fr1MmWUlfChc4EsA.woff2) format('woff2');
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 700;
font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v32/KFOlCnqEu92Fr1MmWUlfBBc4.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 900;
font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v32/KFOlCnqEu92Fr1MmYUtfCRc4EsA.woff2) format('woff2');
unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 900;
font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v32/KFOlCnqEu92Fr1MmYUtfABc4EsA.woff2) format('woff2');
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek-ext */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 900;
font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v32/KFOlCnqEu92Fr1MmYUtfCBc4EsA.woff2) format('woff2');
unicode-range: U+1F00-1FFF;
}
/* greek */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 900;
font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v32/KFOlCnqEu92Fr1MmYUtfBxc4EsA.woff2) format('woff2');
unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 900;
font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v32/KFOlCnqEu92Fr1MmYUtfCxc4EsA.woff2) format('woff2');
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 900;
font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v32/KFOlCnqEu92Fr1MmYUtfChc4EsA.woff2) format('woff2');
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 900;
font-display: swap;
src: url(https://fonts.gstatic.com/s/roboto/v32/KFOlCnqEu92Fr1MmYUtfBBc4.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

View File

@ -8,12 +8,13 @@
const minutes = ref()
const seconds = ref()
const interval = ref()
const props = defineProps({ expired: { type: Date } })
const props = defineProps(['expired'])
const emits = defineEmits(['end'])
const tmp = ref()
function startCountdown() {
let now = new Date()
const end = props.expired
const end = new Date(props.expired)
console.log(end)
let diff = (end.getTime() - now.getTime()) / 1000
minutes.value = Math.floor(diff / 60)
seconds.value = Math.floor(diff - (minutes.value * 60))
@ -41,7 +42,7 @@ function startCountdown() {
}
}, 1000)
}
onBeforeMount(() => {
onMounted(() => {
startCountdown()
})

View File

@ -0,0 +1,27 @@
export default defineNuxtRouteMiddleware(async(to, from) => {
const authStore = useAuthStore()
const token = useCookie('_auth')
await authStore.getData()
let navigate: any = false
/** Belépett */
if (authStore.user) {
if (to.fullPath.match(/^\/login/gi)) {
navigate = '/'
}
} else {
navigate = '/login'
if (to.fullPath.match(/^\/login/gi)) {
navigate = false
}
if (to.fullPath.match(/^\/page/gi)) {
navigate = false
}
}
if (navigate) {
return navigateTo(navigate)
}
})

View File

@ -1,15 +0,0 @@
export default defineNuxtRouteMiddleware((to, from) => {
const authStore = useAuthStore()
if(to.fullPath!='/login'){
if(!authStore.user){
return navigateTo('/login')
}
}else{
if(authStore.user){
return navigateTo('/')
}
}
console.log(authStore.user)
console.log(to)
})

View File

@ -5,8 +5,9 @@ export default defineNuxtConfig({
devServer:{
host:'0.0.0.0'
},
ssr:false,
modules: ["@primevue/nuxt-module", "@pinia/nuxt"],
css: ['@/assets/styles/tailwind.css', '@/assets/styles/base.css'],
css: ['@/assets/styles/tailwind.css', '@/assets/styles/base.css', '@/assets/styles/fonts.css'],
primevue: {
options: { theme: 'none' ,pt:{
card:{ root:'shadowl-lg', body:'p-2'}

View File

@ -1 +1,85 @@
<template></template>
<script setup>
const auth = useAuthStore()
const config = useMyConfigStore()
const menuShow=ref()
const user = computed(() => {
return auth.user
})
const rentals = computed(() => {
return auth.rentals
})
const states = computed(() => {
return config.states
})
function getStateName(id) {
if(id=='0'){
return 'Visszaigazolásra vár'
}
let match = states.value?.filter(x => { if (x.id == id) { return true } })
if (match?.length > 0) {
return match[0].name
}
}
function getYear(date) {
}
function getMont(date) {
}
</script>
<template>
<div class="min-h-12 bg-neutral-800 flex justify-between">
<div @click="$router.push({path:'/'})"
class="bg-neutral-800 h-12 flex items-center shadow-lg bg-gradient-to-r from-neutral-800 dark:from-neutral-900 to-transparent">
<img src="/euro_cars_rent_a_car_logo.png" class="h-8 mx-3" />
</div>
<div>
<Drawer v-model:visible="menuShow" header=" " position="right" :pt="{root:'border-0'}">
<div>{{ auth.user.nev }}</div>
<div>{{ auth.user.email }}</div>
<div>Profilom</div>
<div>Foglalásaim</div>
</Drawer>
<Button variant="link" icon="pi pi-user" @click="$router.push({path:'/profile'})"></Button>
<Button variant="link" icon="pi pi-bars" @click="menuShow=true"></Button>
</div>
</div>
<div v-if="!rentals">
<div>
Jelenleg nincs foglalásod
</div>
<Button @click="$router.push({ path: '/rent' })">Foglalás</Button>
</div>
<div v-for="rent in rentals" class="p-2">
<div class="p-card border-t border-t-4 border-primary">
<div class="ps-3">{{ getStateName(rent.status) }}</div>
<div v-if="rent.jaratszam" class="text-end text-xs pe-3"><span class="">járatszám:</span><b>{{ rent.jaratszam }}</b></div>
<div class="flex items-baseline flex-row">
<div class="text-center p-2 w-full items-top">
<div class="text-xs">{{ rent.auto_felvetel_datum }}</div>
<div class="text-2xl">{{ rent.auto_felvetel_idopont }}</div>
<div class="text-xs">{{ rent.auto_felvetel_hely }}</div>
</div>
<div class="w-4"></div>
<div class="text-center p-2 w-full">
<div class="text-xs">{{ rent.auto_leadas_datum }}</div>
<div class="text-2xl">{{ rent.auto_leadas_idopont }}</div>
<div class="text-xs">{{ rent.auto_leadas_hely }}</div>
</div>
</div>
</div>
</div>
<div class="py-5 px-3 ">
<Button class="w-full" variant="success" icon="pi pi-plus" @click="$router.push({path:'/rent'})">Új foglalás</Button>
</div>
</template>

View File

@ -1,158 +1,18 @@
<script setup>
const auth = useAuthStore()
const account = ref('ervinstyle@gmail.com')
const loginCode = ref()
const loginCodePrefix = ref('QW')
const isLoading = ref(false)
const state = ref()
const codeExpire = ref()
const errorMessage = ref()
const successMessage = ref()
async function sendAccount() {
errorMessage.value = false
successMessage.value = false
isLoading.value = true
const { data } = await useFetch('https://olcsoberauto.hu/rest/authRequest', {
method: "post",
body: {
account: account.value
}
})
if(data.value?.error){
errorMessage.value = data.value.message
}
if (data.value?.success) {
state.value = 'codeRequest'
loginCodePrefix.value = data.value.codePrefix
codeExpire.value = new Date(data.value.codeExpire)
account.value = data.value.account
if(data.value?.message){
successMessage.value = data.value.message
}
}
isLoading.value = false
}
function codeExpired() {
state.value = null
loginCodePrefix.value = null
}
function changeCode(){
if(loginCode.value.length === 4){
sendCode()
}
}
async function sendCode() {
isLoading.value = true
errorMessage.value = false
successMessage.value = false
const { data } = await useFetch('https://olcsoberauto.hu/rest/tokenRequest', {
method: "post",
body: {
account: account.value,
code: loginCode.value,
code_prefix: loginCodePrefix.value
}
})
if (data.value?.error) {
errorMessage.value = data.value?.message
}
if (data.value?.success) {
state.value = 'logged'
if (data.value?.message) {
successMessage.value = data.value?.message
}
if (data.value?.token) {
window.localStorage.setItem('userToken', data.value.token)
return navigateTo('/')
}
}
isLoading.value = false
}
</script>
<style>
.card-loading {
position: absolute;
display: flex;
justify-content: center;
align-items: center;
left: 0;
top: 0;
width: 100%;
height: 100%;
backdrop-filter: blur(5px);
z-index: 1;
}
.p-inputotp-input.p-inputtext-sm {
width: 2rem;
}
.p-message {
outline: none;
border-left: 4px;
border-style: solid;
}
</style>
<template>
<div>
<div class="min-h-dvh px-5 pb-5">
<div class="flex flex-col gap-3 items-center justify-center text-center">
<div
class="w-48 bg-neutral-600 h-48 p-5 flex items-end rounded-ee-xl rounded-es-xl shadow-lg bg-gradient-to-b from-neutral-300 dark:from-black to-transparent">
<img src="/euro_cars_rent_a_car_logo.png" class="w-full" />
</div>
<Message class="w-full" severity="error" v-if="errorMessage">{{ errorMessage }}</Message>
<Message class="w-full" severity="success" v-if="successMessage">{{ successMessage }}</Message>
<div v-if="state === 'codeRequest'">
<div class="p-2">
Add meg a kódot amit a(z) <b>{{ account }}</b> e-mail címre küldött ki rendszerünk.
</div>
<Card>
<template #content>
<div class="flex flex-wrap justify-center gap-1 items-center p-2 relative">
<CardLoading v-if="isLoading" />
<InputOtp v-model="loginCodePrefix" :length="2" style="gap: 1" disabled size="small">
</InputOtp>
<div><i class="pi pi-minus"></i></div>
<InputOtp v-model="loginCode" :length="4" style="gap: 1" size="small" @change="changeCode($event)"></InputOtp>
</div>
</template>
</Card>
<div class="p-2">
A kód még <b>
<Countdown :expired="codeExpire" @end="codeExpired()" />
</b> percig érvényes. Lejárat után új kódot kell igényelned.
</div>
<Alert>
{{ errorMessage }}
</Alert>
<Button @click="sendCode()" class="w-full" icon="pi pi-check-circles">Kód küldése</Button>
<Button @click="sendAccount()" variant="link" class="w-full mt-3" icon="pi pi-check-circles">Új kód kérése</Button>
</div>
<div v-if="!state">
<h1 class="text-2xl py-3">Kérjük, add meg az e-mail címedet</h1>
<div>Ha már korábban volt foglalásod vagy regisztrációd akkor azt az e-mail címet add meg.</div>
<Card class="w-full max-w-sm m-auto mt-3">
<template #content>
<div class="flex flex-col gap-5 items-center p-2 relative w-full">
<CardLoading v-if="isLoading" />
<FloatLabel variant="on" class="w-full">
<InputText id="email_label" v-model="account" autocomplete="off" class="w-full" />
<label for="email_label">E-mail cím</label>
</FloatLabel>
<Button @click="sendAccount()" class="w-full" icon="pi pi-check-circles">Megadom az e-mail
címem</Button>
</div>
</template>
</Card>
</div>
<div class="flex flex-col gap-3 items-center justify-center text-center">
<div @click="$router.push({path:'/'})"
class="w-48 bg-neutral-600 p-5 flex items-end rounded-ee-xl rounded-es-xl shadow-lg bg-gradient-to-b from-neutral-300 dark:from-black to-transparent">
<img src="/euro_cars_rent_a_car_logo.png" class="w-full" />
</div>
<NuxtPage />
</div>
</div>
</div>
</template>
<script lang="ts" setup>
</script>
<style></style>

111
pages/login/code.vue Normal file
View File

@ -0,0 +1,111 @@
<script lang="ts" setup>
const auth = useAuthStore()
const loginCode = ref()
const loginCodePrefix = ref()
const codeExpire = ref()
const account = ref()
const isLoading = ref(false)
const charcode = ref()
const errorMessage = ref()
const successMessage = ref()
const router = useRouter()
const token = useCookie('_auth')
async function sendCode() {
isLoading.value = true
errorMessage.value = false
successMessage.value = false
const { data } = await useFetch('https://olcsoberauto.hu/rest/tokenRequest', {
method: "post",
body: {
account: account.value,
code: loginCode.value,
code_prefix: loginCodePrefix.value
}
})
if (data.value?.error) {
errorMessage.value = data.value?.message
}
if (data.value?.success) {
if (data.value?.message) {
successMessage.value = data.value?.message
}
if (data.value?.token) {
token.value = data.value.token
window.localStorage.removeItem('codePrefix')
window.localStorage.removeItem('codeExpire')
if (data.value?.user) {
auth.user = data.value.user
}
return navigateTo('/')
}
}
isLoading.value = false
}
function codeExpired() {
console.log('Code expired!')
loginCodePrefix.value = null
codeExpire.value = null
router.push({path:'/login'})
}
function changeCode() {
if (loginCode.value.length === 4) {
sendCode()
}
}
onMounted(()=>{
loginCodePrefix.value = window.localStorage.getItem('codePrefix')
codeExpire.value = window.localStorage.getItem('codeExpire')
account.value = window.localStorage.getItem('account')
window.document.addEventListener('keydown', function(e){
console.log(e)
charcode.value = e.key
if(e.key === 'Backspace' && loginCode.value.length > 0){
loginCode.value = loginCode.value.substr(0,loginCode.value.length-1)
}
})
})
</script>
<template>
<div>
<Message class="w-full" severity="error" v-if="errorMessage">{{ errorMessage }}</Message>
<Message class="w-full" severity="success" v-if="successMessage">{{ successMessage }}</Message>
<div class="p-2">
Add meg a kódot amit a(z) <b>{{ account }}</b> e-mail címre küldött ki rendszerünk.
</div>
<Card>
<template #content>
<div class="flex flex-wrap justify-center gap-1 items-center p-2 relative">
<CardLoading v-if="isLoading" />
<InputOtp v-model="loginCodePrefix" :length="2" style="gap: 1" disabled size="small">
</InputOtp>
<div><i class="pi pi-minus"></i></div>
<InputOtp v-model="loginCode" :length="4" style="gap: 1" size="small" @change="changeCode($event)" integer-only></InputOtp>
</div>
</template>
</Card>
<div class="p-2">
A kód még <b>
<Countdown v-if="codeExpire" :expired="codeExpire" @end="codeExpired()" />
</b> percig érvényes. Lejárat után új kódot kell igényelned.
</div>
<Alert>
{{ errorMessage }}
</Alert>
<Button @click="sendCode()" class="w-full" icon="pi pi-check-circles">Kód küldése</Button>
<Button @click="$router.push({path:'/login'})" variant="link" class="w-full mt-3" icon="pi pi-check-circles">Új kód kérése</Button>
</div>
</template>
<style></style>

76
pages/login/index.vue Normal file
View File

@ -0,0 +1,76 @@
<template>
<div>
<Message class="w-full" severity="error" v-if="errorMessage">{{ errorMessage }}</Message>
<Message class="w-full" severity="success" v-if="successMessage">{{ successMessage }}</Message>
<h1 class="text-2xl py-3">Kérjük, add meg az e-mail címedet</h1>
<div>Ha már korábban volt foglalásod vagy regisztrációd akkor azt az e-mail címet add meg.</div>
<Card class="w-full max-w-sm m-auto mt-3">
<template #content>
<div class="flex flex-col gap-5 items-center p-2 relative w-full">
<CardLoading v-if="isLoading" />
<FloatLabel variant="on" class="w-full">
<InputText id="email_label" v-model="account" autocomplete="off" class="w-full" />
<label for="email_label">E-mail cím</label>
</FloatLabel>
<div class="text-xs">Az e-mail cím megadásával elfogadod a felhasználási feltételeinket. Az
adatvédelemről az Adatvédelmi nyilatkozat linken olvashatsz.</div>
<Button @click="sendAccount()" class="w-full" icon="pi pi-check-circles">Megadom az e-mail
címem</Button>
</div>
</template>
</Card>
<div class="text-center text-xs mt-5" v-if="configStore?.config">
<NuxtLink :to="'/page/' + configStore?.config?.adatvedelem_id">Adatvédelmi nyilatkozat</NuxtLink>
</div>
</div>
</template>
<script lang="ts" setup>
const configStore = useMyConfigStore()
const errorMessage = ref()
const successMessage = ref()
const isLoading = ref()
const account = ref()
const router = useRouter()
async function sendAccount() {
errorMessage.value = false
successMessage.value = false
isLoading.value = true
const { data } = await useFetch('https://olcsoberauto.hu/rest/authRequest', {
method: "post",
body: {
account: account.value
}
})
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
}
router.push({ path: '/login/code',force:true })
}
isLoading.value = false
}
onMounted(() => {
account.value = window.localStorage.getItem('account')
})
</script>
<style></style>

37
pages/page/[id].vue Normal file
View File

@ -0,0 +1,37 @@
<template>
<div>
<div class="flex items-center border-b mb-3 border-color">
<Button icon="pi pi-arrow-left" variant="link" @click="$router.go(-1)"></Button>
<h1>{{ Title }}</h1>
<Skeleton width="85%" v-if="isLoading"></Skeleton>
</div>
<div class="m-3">
<div v-if="isLoading">
<Skeleton></Skeleton>
<Skeleton width="85%" class="my-2"></Skeleton>
<Skeleton width="75%"></Skeleton>
</div>
<div v-html="Content"></div>
</div>
</div>
</template>
<script lang="ts" setup>
const Title = ref()
const Content = ref()
const route = useRoute()
const isLoading = ref(true)
onMounted(async()=>{
const {data} = await useFetch('https://olcsoberauto.hu/rest/getPage', { query:{id:route.params.id}})
if(data.value?.success){
Title.value = data.value?.page.post_title
Content.value = data.value?.page.post_content
}
isLoading.value = false
})
</script>
<style>
</style>

69
pages/profile/index.vue Normal file
View File

@ -0,0 +1,69 @@
<template>
<div>
<div class="flex justify-between items-center">
<Button @click="$router.back()" link icon="pi pi-arrow-left"></Button>
<div class="px-3">Adataim</div>
</div>
<div class="p-3 space-y-3">
<FloatLabel variant="on">
<InputText id="name" v-model="user.nev" class="w-full"/>
<label for="name">Név</label>
</FloatLabel>
<FloatLabel variant="on">
<InputText id="email" v-model="user.email" class="w-full"/>
<label for="email">E-mail</label>
</FloatLabel>
<FloatLabel variant="on">
<InputText id="telefon" v-model="user.telefon" class="w-full"/>
<label for="telefon">Telefon</label>
</FloatLabel>
<FloatLabel variant="on">
<InputText id="anyja_neve" v-model="user.anyja_neve" class="w-full"/>
<label for="anyja_neve">Anyja neve</label>
</FloatLabel>
<FloatLabel variant="on">
<InputText id="szuletesi_hely" v-model="user.szuletesi_hely" class="w-full"/>
<label for="szuletesi_hely">Születési hely</label>
</FloatLabel>
<FloatLabel variant="on">
<DatePicker show-icon date-format="yy-mm-dd" id="szuletesi_ido" v-model="user.szuletesi_ido" class="w-full"/>
<label for="szuletesi_ido">Születési idő</label>
</FloatLabel>
<FloatLabel variant="on">
<InputText id="nemzetiseg" v-model="user.nemzetiseg" class="w-full"/>
<label for="nemzetiseg">Állampolgárság</label>
</FloatLabel>
<FloatLabel variant="on">
<InputText id="szigszam" v-model="user.szigszam" class="w-full"/>
<label for="szigszam">Személyi igazolvány / Útlevél száma</label>
</FloatLabel>
<FloatLabel variant="on">
<InputText id="jogositvany_szama" v-model="user.jogositvany_szama" class="w-full"/>
<label for="jogositvany_szama">Jogosítvány száma</label>
</FloatLabel>
<FloatLabel variant="on">
<InputText id="lakcim" v-model="user.lakcim" class="w-full"/>
<label for="lakcim">Lakcím</label>
</FloatLabel>
<FloatLabel variant="on">
<InputText id="tartozkodasicim" v-model="user.tartozkodasicim" class="w-full"/>
<label for="tartozkodasicim">Tartózkodási cím</label>
</FloatLabel>
<div class="">
<Button @click="save()" class="max-sm:w-full min-w-20" icon="pi pi-save">Adatok mentése</Button>
</div>
</div>
{{ user }}
</div>
</template>
<script lang="ts" setup>
const { user } = useAuthStore()
async function save(){
}
</script>
<style></style>

View File

@ -1,7 +1,7 @@
<template>
<div>
<div class="flex justify-between items-center">
<Button @click="navigateTo(prevPage)" link icon="pi pi-arrow-left"></Button>
<Button @click="$router.back()" link icon="pi pi-arrow-left"></Button>
<div class="px-3">{{ $route?.meta?.title }}</div>
</div>
<!-- <Stepper value="1" linear>
@ -12,10 +12,13 @@
</StepList>
</Stepper> -->
<NuxtPage />
<!-- <pre>{{ rent }}</pre> -->
</div>
</template>
<script lang="ts" setup>
const {rent} = useAuthStore()
const prevPage = ref()
definePageMeta({
pageTransition: {

View File

@ -1,10 +1,6 @@
<template>
<div>
<div class="py-3" style="text-align: center;">
Válassz egy kategóriát
</div>
<div class="flex flex-col gap-3 p-3">
<Card v-for="categori in categories" :pt="{ root: 'mb-3' }">
<template #content>
@ -24,6 +20,7 @@
<script lang="ts" setup>
definePageMeta({
rentStep: 2,
title:'Válassz egy kategóriát'
})
const categoriestStore = useCategoriesStore()

View File

@ -1,13 +1,13 @@
<template>
<div>
<div class="flex flex-col p-3">
Autóbérlés kezdete
<InputText type="date" />
<DatePicker inline :min-date="(new Date())" v-model="rent.auto_felvetel_datum"/>
</div>
<div class="flex flex-col p-3">
Időpont
<InputText type="time" />
<Dropdown :options="timeList" v-model="rent.auto_felvetel_idopont" />
</div>
<div class="p-3">
<Button @click="next()" class="max-sm:w-full min-w-20">Tovább</Button>
@ -17,12 +17,24 @@
</template>
<script lang="ts" setup>
const {rent} = useAuthStore()
definePageMeta({
rentStep: 0,
rentStep: 2,
title:'Autóbérlés kezdete'
})
function next() {
navigateTo('/rent/place-from')
}
const timeList = computed(()=>{
let a = []
for(let i=0; i<24; i++){
a.push(i+':00')
a.push(i+':30')
}
return a
})
</script>
<style></style>

16
pages/rent/jaratszam.vue Normal file
View File

@ -0,0 +1,16 @@
<template>
<div>
Járatszám
<InputText></InputText>
<NuxtLink>Nem adok meg járatszámot</NuxtLink>
</div>
</template>
<script lang="ts" setup>
</script>
<style>
</style>

View File

@ -1,7 +1,7 @@
<template>
<div>
<div class="flex flex-col gap-3 p-3">
<Card v-for="place in places" :pt="{ root: 'mb-3' }">
<Card v-for="place in places" :pt="{ root: (rent.auto_felvetel_hely == place) ? 'bg-primary-500 text-white mb-3' : 'mb-3' }">
<template #content>
<div class="flex gap-3">
<div class="flex justify-center items-center text-3xl font-bold" style="width: 56px; font-size: 32px;">
@ -15,26 +15,21 @@
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 256 256"><path fill="currentColor" d="M248 208h-16V96a8 8 0 0 0 0-16h-48V48a8 8 0 0 0 0-16H40a8 8 0 0 0 0 16v160H24a8 8 0 0 0 0 16h224a8 8 0 0 0 0-16M216 96v112h-32V96ZM56 48h112v160h-24v-48a8 8 0 0 0-8-8H88a8 8 0 0 0-8 8v48H56Zm72 160H96v-40h32ZM72 80a8 8 0 0 1 8-8h16a8 8 0 0 1 0 16H80a8 8 0 0 1-8-8m48 0a8 8 0 0 1 8-8h16a8 8 0 0 1 0 16h-16a8 8 0 0 1-8-8m-48 40a8 8 0 0 1 8-8h16a8 8 0 0 1 0 16H80a8 8 0 0 1-8-8m48 0a8 8 0 0 1 8-8h16a8 8 0 0 1 0 16h-16a8 8 0 0 1-8-8"/></svg>
</template>
</div>
<div>
<div class="w-full" @click="next(place)" >
<div class="text-sm"><b>{{ place.name }}</b></div>
<div class="text-sm">{{ place.address }}</div>
<div class="text-sm" v-if="place.price > 0">+{{ HUFormat.format(place.price) }}</div>
<div class="text-sm text-end" v-if="place.price > 0">+{{ HUFormat.format(place.price) }}</div>
</div>
</div>
</template>
</Card>
</div>
<div class="p-3 flex gap-2">
<Button @click="next()"
class="max-sm:w-full min-w-20">Tovább</Button>
</div>
</div>
</template>
<script lang="ts" setup>
const {rent} = useAuthStore()
definePageMeta({
rentStep: 1,
title:'Autófelvétel helye'
@ -51,7 +46,8 @@ let HUFormat = new Intl.NumberFormat('hu-HU', {
maximumFractionDigits: 0
});
function next() {
function next(val) {
rent.auto_felvetel_hely=val
navigateTo('/rent/category')
}

File diff suppressed because it is too large Load Diff

View File

@ -2,6 +2,24 @@ import { defineStore } from 'pinia'
export const useAuthStore = defineStore({
id: 'AuthStore',
state: () => ({ user:null }),
actions: {}
state: () => ({ user: null,rentals:null,rent:{} }),
actions: {
async getData() {
const token = useCookie('_auth')
if (token.value) {
const { data } = await useFetch('https://olcsoberauto.hu/rest/me',
{
headers: {
'auth-key': token.value
}
}
)
if(data.value?.user){
this.user = data.value.user
this.rentals = data.value.rentals
}
}
}
}
})

11
stores/config.ts Normal file
View File

@ -0,0 +1,11 @@
import { defineStore } from 'pinia'
export const useMyConfigStore = defineStore({
id: 'myConfigStore',
state: () => ({ config: null, states:null }),
actions: {
async fetchData(){
}
}
})