Changed Sorting in Profiles to Lastname
Added Index Card check for Anwesenheiten Added Type Sorting to Receipts list
This commit is contained in:
@@ -29,6 +29,8 @@
|
|||||||
|
|
||||||
<UDashboardPanelContent>
|
<UDashboardPanelContent>
|
||||||
<UDashboardCard
|
<UDashboardCard
|
||||||
|
title="Anwesenheiten"
|
||||||
|
v-if="dataStore.getStartedWorkingTimes().length > 0"
|
||||||
>
|
>
|
||||||
<p v-for="time in dataStore.getStartedWorkingTimes()"><UIcon name="i-heroicons-check"/>{{dataStore.getProfileById(time.profile).fullName}}</p>
|
<p v-for="time in dataStore.getStartedWorkingTimes()"><UIcon name="i-heroicons-check"/>{{dataStore.getProfileById(time.profile).fullName}}</p>
|
||||||
</UDashboardCard>
|
</UDashboardCard>
|
||||||
|
|||||||
@@ -31,7 +31,20 @@
|
|||||||
<UCheckbox
|
<UCheckbox
|
||||||
v-model="showDrafts"
|
v-model="showDrafts"
|
||||||
label="Entwürfe Anzeigen"
|
label="Entwürfe Anzeigen"
|
||||||
|
class="my-auto mr-3"
|
||||||
/>
|
/>
|
||||||
|
<USelectMenu
|
||||||
|
v-model="selectedTypes"
|
||||||
|
icon="i-heroicons-adjustments-horizontal-solid"
|
||||||
|
:options="templateTypes"
|
||||||
|
multiple
|
||||||
|
class="hidden lg:block"
|
||||||
|
by="key"
|
||||||
|
>
|
||||||
|
<template #label>
|
||||||
|
Typ
|
||||||
|
</template>
|
||||||
|
</USelectMenu>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template #right>
|
<template #right>
|
||||||
@@ -179,6 +192,20 @@ const templateColumns = [
|
|||||||
const selectedColumns = ref(templateColumns)
|
const selectedColumns = ref(templateColumns)
|
||||||
const columns = computed(() => templateColumns.filter((column) => selectedColumns.value.includes(column)))
|
const columns = computed(() => templateColumns.filter((column) => selectedColumns.value.includes(column)))
|
||||||
|
|
||||||
|
const templateTypes = [
|
||||||
|
{
|
||||||
|
key: "invoices",
|
||||||
|
label: "Rechnungen"
|
||||||
|
}, {
|
||||||
|
key: "quotes",
|
||||||
|
label: "Angebote"
|
||||||
|
}, {
|
||||||
|
key: "deliveryNotes",
|
||||||
|
label: "Lieferscheine"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
const selectedTypes = ref(templateTypes)
|
||||||
|
const types = computed(() => templateTypes.filter((type) => selectedTypes.value.includes(type)))
|
||||||
|
|
||||||
const selectItem = (item) => {
|
const selectItem = (item) => {
|
||||||
console.log(item)
|
console.log(item)
|
||||||
@@ -220,6 +247,9 @@ const showDrafts = ref(false)
|
|||||||
const filteredRows = computed(() => {
|
const filteredRows = computed(() => {
|
||||||
let items = [...dataStore.incominginvoices.map(i => {return {...i, type: "incomingInvoice"}}),...dataStore.createddocuments]
|
let items = [...dataStore.incominginvoices.map(i => {return {...i, type: "incomingInvoice"}}),...dataStore.createddocuments]
|
||||||
|
|
||||||
|
console.log(items[0].type)
|
||||||
|
items = items.filter(i => types.value.find(x => x.key === i.type))
|
||||||
|
|
||||||
if(showDrafts.value === true) {
|
if(showDrafts.value === true) {
|
||||||
items = items.filter(i => i.state === "Entwurf")
|
items = items.filter(i => i.state === "Entwurf")
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -564,7 +564,7 @@ export const useDataStore = defineStore('data', () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function fetchProfiles () {
|
async function fetchProfiles () {
|
||||||
profiles.value = (await supabase.from("profiles").select().eq("tenant",currentTenant.value).order("fullName")).data
|
profiles.value = (await supabase.from("profiles").select().eq("tenant",currentTenant.value).order("lastName")).data
|
||||||
}
|
}
|
||||||
|
|
||||||
async function fetchOwnProfiles () {
|
async function fetchOwnProfiles () {
|
||||||
|
|||||||
Reference in New Issue
Block a user