implemented notification component and logic
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<template lang="pug">
|
||||
|
||||
p {{ state }}
|
||||
//- p {{ state }}
|
||||
|
||||
MonthPicker(:selectedMonth="selectedMonth" :selectedYear="selectedYear" @getMonth="selectedMonth = $event" @getYear="selectedYear = $event")
|
||||
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
<template>
|
||||
|
||||
<br />
|
||||
|
||||
<img src="/src/assets/logo.png">
|
||||
<form class="m-auto">
|
||||
<h1 class="h3 mb-3">Bitte einloggen</h1>
|
||||
@@ -24,22 +27,26 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { useUser } from '@/stores/user'
|
||||
import { onMounted, reactive } from 'vue'
|
||||
import { useNotifications } from '@/stores/notifications'
|
||||
import { reactive } from 'vue'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { useRouter } from 'vue-router'
|
||||
|
||||
const userStore = useUser()
|
||||
const noteStore = useNotifications()
|
||||
|
||||
const router = useRouter()
|
||||
|
||||
const input = reactive({
|
||||
username: '',
|
||||
password: ''
|
||||
})
|
||||
|
||||
onMounted(() => {
|
||||
|
||||
})
|
||||
|
||||
async function onClick() {
|
||||
|
||||
userStore.login(input.username, input.password)
|
||||
if(await userStore.login(input.username, input.password)) {
|
||||
router.push({name: 'Home'})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user