Alisa/web/src/components/ListViewElement.vue

128 lines
3 KiB
Vue
Raw Normal View History

<template>
2024-07-11 15:05:18 +02:00
<v-sheet elevation="4" width="96vw" rounded="lg" class="mt-3">
<v-expansion-panels>
<v-expansion-panel>
<v-expansion-panel-title>
<div class="mr-3">
{{ props.licenseName }}
</div>
<div
class="mr-3 d-flex align-self-center"
style="align-items: center"
>
<KeyRound class="mr-1" />
{{ props.licenseKey }}
</div>
<div
class="mr-3 d-flex align-self-center"
style="align-items: center"
>
<CalendarCheck />
2024-07-11 15:05:18 +02:00
<span>
{{
props.startDate
? props.startDate.toLocaleDateString()
: "Verfügbar"
}}
</span>
</div>
<div
class="mr-3 d-flex align-self-center"
style="align-items: center"
>
<CalendarX />
2024-07-11 15:05:18 +02:00
<span>
{{
props.endDate
? props.endDate.toLocaleDateString()
: "Ewig Verfügbar"
}}
</span>
</div>
<div
class="mr-3 d-flex align-self-center"
style="align-items: center"
>
<img
src="../assets/doublekey.svg"
alt="logo"
class="logo mr-1"
width="24"
/>
<span v-if="props.amount == null || props.amount == undefined">
<Infinity />
</span>
<span v-else>
{{ props.amount }}
</span>
</div>
</v-expansion-panel-title>
<v-expansion-panel-text>
2024-07-11 13:25:39 +02:00
Notes:
2024-07-11 15:18:33 +02:00
<div class="flex-nowrap d-flex" no-gutters>
<div
class="flex-grow-1 overflow-x-auto border-e-md align-self-end"
2024-07-11 15:05:18 +02:00
cols="10"
2024-07-11 10:59:22 +02:00
>
2024-07-11 15:05:18 +02:00
{{ props.notes }}
2024-07-11 15:18:33 +02:00
</div>
2024-07-11 10:59:22 +02:00
2024-07-11 15:18:33 +02:00
<div class="" cols="2" align="end">
2024-07-11 15:05:18 +02:00
<!-- -->
<!-- EDIT SECTION -->
<!-- -->
<v-btn class="mr-3" flat size="small">
<Pencil />
</v-btn>
<!-- -->
<!-- DELETE BTN -->
<!-- -->
<v-btn class="mr-3" flat size="small" color="red" variant="text">
<Trash />
</v-btn>
2024-07-11 15:18:33 +02:00
</div>
</div>
</v-expansion-panel-text>
</v-expansion-panel>
</v-expansion-panels>
</v-sheet>
</template>
<script setup lang="ts">
2024-07-11 15:05:18 +02:00
import {
Infinity,
KeyRound,
CalendarCheck,
CalendarX,
Pencil,
Trash,
Power,
} from "lucide-vue-next";
2024-07-11 13:25:39 +02:00
import { ref } from "vue";
2024-07-11 15:05:18 +02:00
const props = defineProps<{
licenseName: string;
licenseKey: string;
startDate: Date | null;
endDate: Date | null;
amount?: number;
notes?: string;
}>();
2024-07-11 13:25:39 +02:00
//
// EDIT SECTION
//
const edit = ref(false);
</script>
<style scoped>
.values {
display: flex;
align-items: center;
}
</style>