Create OrdersPage, load orders from backend, move NavDrawer items to Component
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { BannerStateEnum } from '@/data/enums/bannerStateEnum';
|
||||
import BannerModel from '@/data/models/bannerModel';
|
||||
import { useUserStore } from '@/data/stores/userStore';
|
||||
import axios from 'axios';
|
||||
@@ -17,18 +18,14 @@ function startLogin() {
|
||||
})
|
||||
.then(res => {
|
||||
if (res.status == 200) {
|
||||
banner.value.message = "Logged in!"
|
||||
banner.value.color = "green"
|
||||
banner.value.icon = "mdi-check"
|
||||
banner.value.bannerState = BannerStateEnum.LOGINSUCCESSFUL
|
||||
banner.value.show = true
|
||||
|
||||
userStore.userAccountId = res.data.userAccountId
|
||||
}
|
||||
})
|
||||
.catch(res => {
|
||||
banner.value.message = "Wrong Username or Password!"
|
||||
banner.value.color = "red"
|
||||
banner.value.icon = "mdi-alert-circle"
|
||||
banner.value.bannerState = BannerStateEnum.WRONGLOGIN
|
||||
banner.value.show = true
|
||||
})
|
||||
}
|
||||
@@ -39,23 +36,25 @@ function startLogin() {
|
||||
<v-container>
|
||||
<v-row>
|
||||
<v-col>
|
||||
<v-text-field :label="$t('username')" prepend-icon="mdi-account" clearable v-model="username"/>
|
||||
<v-text-field :label="$t('account.username')" prepend-icon="mdi-account" clearable v-model="username"/>
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
<v-row>
|
||||
<v-col>
|
||||
<v-text-field :label="$t('password')" prepend-icon="mdi-key" type="password" clearable v-model="password" />
|
||||
<v-text-field :label="$t('account.password')" prepend-icon="mdi-key" type="password"
|
||||
clearable v-model="password" />
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-container>
|
||||
|
||||
<v-card-actions>
|
||||
<v-btn variant="outlined" @click="showRegisterCard = true" color="primary" prepend-icon="mdi-plus">
|
||||
{{ $t('noAccountRegister') }}
|
||||
{{ $t('account.noAccountRegister') }}
|
||||
</v-btn>
|
||||
<v-spacer />
|
||||
<v-btn variant="outlined" append-icon="mdi-arrow-right" color="primary" @click="startLogin">{{ $t('login') }}</v-btn>
|
||||
<v-btn variant="outlined" append-icon="mdi-arrow-right" color="primary"
|
||||
@click="startLogin">{{ $t('menu.login') }}</v-btn>
|
||||
</v-card-actions>
|
||||
|
||||
</v-card>
|
||||
|
||||
Reference in New Issue
Block a user