2024-07-09 11:35:48 +02:00
|
|
|
<template>
|
|
|
|
<div>
|
|
|
|
<v-toolbar
|
|
|
|
color="main"
|
|
|
|
dark
|
|
|
|
prominent
|
|
|
|
>
|
2024-07-09 17:51:16 +02:00
|
|
|
<img src="../assets/turbologo.svg" alt="logo" class="logo" width="75" />
|
|
|
|
<v-spacer></v-spacer>
|
|
|
|
<!-- Create, Delete, Edit -->
|
|
|
|
<div>
|
|
|
|
<v-btn icon class="mr-3" @click="add = true">
|
|
|
|
<Plus />
|
|
|
|
</v-btn>
|
|
|
|
<v-dialog
|
|
|
|
v-model="add"
|
|
|
|
width="600"
|
|
|
|
persistent
|
|
|
|
>
|
|
|
|
<v-card
|
|
|
|
max-width="600"
|
|
|
|
>
|
|
|
|
<v-card-title>
|
|
|
|
<span class="headline">Add License</span>
|
|
|
|
</v-card-title>
|
|
|
|
<v-card-subtitle>
|
|
|
|
<span> Add an extra License to the database</span>
|
|
|
|
</v-card-subtitle>
|
|
|
|
<v-card-text>
|
|
|
|
<div>
|
|
|
|
<v-text-field
|
|
|
|
label="License Name *"
|
|
|
|
v-model="addLicenseName"
|
|
|
|
variant="outlined"
|
|
|
|
required
|
|
|
|
></v-text-field>
|
|
|
|
<div>
|
|
|
|
<div class="mb-2">
|
|
|
|
<v-btn prepend-icon stacked variant="outlined">
|
|
|
|
<CalendarCheck/>
|
|
|
|
</v-btn>
|
|
|
|
</div>
|
|
|
|
<div class="mb-5">
|
|
|
|
<v-btn prepend-icon stacked variant="outlined">
|
|
|
|
<CalendarX/>
|
|
|
|
</v-btn>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<v-text-field
|
|
|
|
label="Amount (optional)"
|
|
|
|
v-model="addAmount"
|
|
|
|
variant="outlined"
|
|
|
|
></v-text-field>
|
|
|
|
<v-text-field
|
|
|
|
label="Notes (optional)"
|
|
|
|
v-model="addNotes"
|
|
|
|
variant="outlined"
|
|
|
|
></v-text-field>
|
2024-07-09 18:35:47 +02:00
|
|
|
<span class="dialogNote "> all fields marked with * are required </span>
|
2024-07-09 17:51:16 +02:00
|
|
|
</div>
|
|
|
|
</v-card-text>
|
|
|
|
<v-card-actions>
|
2024-07-09 18:35:47 +02:00
|
|
|
<v-row>
|
|
|
|
<v-col cols="10" align="right" no-gutters>
|
|
|
|
<v-btn
|
|
|
|
class="ms-auto"
|
|
|
|
text="Cancel"
|
|
|
|
@click="add = false"
|
|
|
|
></v-btn>
|
|
|
|
</v-col>
|
|
|
|
<v-col>
|
|
|
|
<v-btn
|
|
|
|
class="ms-auto"
|
|
|
|
text="Add"
|
|
|
|
@click="add = false"
|
|
|
|
></v-btn>
|
|
|
|
</v-col>
|
|
|
|
</v-row>
|
2024-07-09 17:51:16 +02:00
|
|
|
</v-card-actions>
|
|
|
|
</v-card>
|
|
|
|
</v-dialog>
|
|
|
|
|
|
|
|
|
|
|
|
<v-btn icon class="mr-3">
|
|
|
|
<Pencil />
|
|
|
|
</v-btn>
|
2024-07-09 13:07:33 +02:00
|
|
|
<v-btn icon class="mr-3">
|
2024-07-09 16:35:30 +02:00
|
|
|
<Trash2 />
|
2024-07-09 13:07:33 +02:00
|
|
|
</v-btn>
|
|
|
|
</div>
|
2024-07-09 16:35:30 +02:00
|
|
|
|
2024-07-09 17:51:16 +02:00
|
|
|
|
2024-07-09 16:35:30 +02:00
|
|
|
<!-- Search -->
|
2024-07-09 13:07:33 +02:00
|
|
|
<v-text-field
|
2024-07-09 11:35:48 +02:00
|
|
|
class="compact-form mr-2"
|
2024-07-08 15:22:23 +02:00
|
|
|
label="Search"
|
2024-07-08 13:18:54 +02:00
|
|
|
variant="solo"
|
2024-07-09 11:35:48 +02:00
|
|
|
density="compact"
|
2024-07-08 14:44:50 +02:00
|
|
|
prepend-inner-icon="mdi-magnify"
|
2024-07-08 13:18:54 +02:00
|
|
|
hide-details
|
|
|
|
single-line
|
|
|
|
clearable
|
|
|
|
rounded="pill"
|
2024-07-09 16:35:30 +02:00
|
|
|
></v-text-field>
|
|
|
|
|
|
|
|
<!-- Logout -->
|
2024-07-09 12:11:21 +02:00
|
|
|
<v-btn icon variant="outlined" @click="handlelogout">
|
2024-07-09 12:00:33 +02:00
|
|
|
<LogOut />
|
|
|
|
</v-btn>
|
2024-07-09 11:35:48 +02:00
|
|
|
</v-toolbar>
|
|
|
|
</div>
|
2024-07-09 12:00:33 +02:00
|
|
|
|
2024-07-08 13:18:54 +02:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
2024-07-09 12:11:21 +02:00
|
|
|
import { store } from '@/store';
|
2024-07-09 17:51:16 +02:00
|
|
|
import { Plus, LogOut, Trash2, Pencil, CalendarCheck, CalendarX } from 'lucide-vue-next';
|
|
|
|
import { ref } from 'vue';
|
|
|
|
import { useDate } from 'vuetify' // Used for unifying Date inputs to ISO
|
|
|
|
|
2024-07-09 12:11:21 +02:00
|
|
|
|
|
|
|
function handlelogout() {
|
|
|
|
console.log('logout');
|
|
|
|
store.setToken(null);
|
|
|
|
}
|
|
|
|
|
2024-07-09 17:51:16 +02:00
|
|
|
const add = ref(false);
|
|
|
|
// References for Add License Dialog
|
|
|
|
const addLicenseName = ref('');
|
|
|
|
const addAmount = ref('');
|
|
|
|
const addNotes = ref('');
|
|
|
|
|
|
|
|
|
2024-07-08 13:18:54 +02:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<style scoped>
|
2024-07-09 11:19:09 +02:00
|
|
|
.logo {
|
|
|
|
margin-right: 20%;
|
|
|
|
margin-left: 10px;
|
|
|
|
}
|
2024-07-08 13:18:54 +02:00
|
|
|
|
2024-07-09 17:51:16 +02:00
|
|
|
.dialogNote{
|
|
|
|
font-size: 13px;
|
|
|
|
color: grey;
|
|
|
|
}
|
|
|
|
|
2024-07-08 13:18:54 +02:00
|
|
|
</style>
|