Ticket Component

This commit is contained in:
2024-10-06 19:30:12 +02:00
parent 10c0d0838f
commit 4b2764e33c
47 changed files with 365 additions and 219 deletions

View File

@@ -1,8 +1,9 @@
<script setup lang="ts">
import { ref } from 'vue';
import cardView from '@/components/cardView.vue';
import outlinedButton from '@/components/outlinedButton.vue';
import cardView from '@/components/basics/cardView.vue';
import outlinedButton from '@/components/basics/outlinedButton.vue';
import { useAccountStore } from '@/data/stores/accountStore';
import { useRouter } from 'vue-router';
const accountStore = useAccountStore()
const showRegisterCard = defineModel("showRegisterCard", { type: Boolean, default: false })
@@ -11,6 +12,7 @@ const username = ref("duranduran")
const password = ref("H4nn0ver")
const usernameWrong = ref(false)
const passwordWrong = ref(false)
const router = useRouter()
async function startLogin() {
loginInProgress.value = true
@@ -29,6 +31,10 @@ async function startLogin() {
password.value != null && password.value.length > 0)
{
await accountStore.login(username.value, password.value)
if (accountStore.userAccount.id != undefined) {
router.push("/account/home")
}
// todo: Route to account home page
}