Merge branch 'devCorrected' into 'beta'
Added Archived Showing, See merge request fedeo/software!8
This commit is contained in:
@@ -85,7 +85,12 @@ const selectedFilters = ref(dataType.filters.filter(i => i.default).map(i => i.n
|
||||
|
||||
const filteredRows = computed(() => {
|
||||
|
||||
let tempItems = props.items
|
||||
let tempItems = props.items.map(i => {
|
||||
return {
|
||||
...i,
|
||||
class: i.archived ? 'bg-red-500/50 dark:bg-red-400/50' : null
|
||||
}
|
||||
})
|
||||
|
||||
if(selectedFilters.value.length > 0) {
|
||||
selectedFilters.value.forEach(filterName => {
|
||||
|
||||
@@ -7,10 +7,9 @@ const props = defineProps({
|
||||
}
|
||||
})
|
||||
|
||||
const profileStore = useProfileStore()
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<span v-if="props.row.driver">{{props.row.driver ? profileStore.getProfileById(props.row.driver).fullName : props.row.driver}}</span>
|
||||
<span v-if="props.row.driver">{{props.row.driver ? "" : props.row.driver}}</span>
|
||||
</template>
|
||||
|
||||
@@ -30,26 +30,7 @@
|
||||
</template>
|
||||
</UDashboardNavbar>
|
||||
<UDashboardToolbar>
|
||||
<template #left>
|
||||
<!-- <UCheckbox
|
||||
v-model="showDrafts"
|
||||
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"
|
||||
@change="tempStore.modifyFilter('createddocuments',selectedTypes)"
|
||||
>
|
||||
<template #label>
|
||||
Typ
|
||||
</template>
|
||||
</USelectMenu>
|
||||
</template>
|
||||
|
||||
|
||||
<template #right>
|
||||
<USelectMenu
|
||||
@@ -79,7 +60,6 @@
|
||||
</USelectMenu>
|
||||
</template>
|
||||
</UDashboardToolbar>
|
||||
{{sort}}
|
||||
<UTabs :items="selectedTypes" class="m-3">
|
||||
<template #item="{item}">
|
||||
<div style="height: 80vh; overflow-y: scroll">
|
||||
|
||||
@@ -126,13 +126,20 @@ const items = ref([])
|
||||
const selectedItem = ref(0)
|
||||
|
||||
const setupPage = async () => {
|
||||
items.value = await useEntities("createddocuments").select("*, customer(id,name)","documentDate")
|
||||
items.value = await useEntities("createddocuments").select("*, customer(id,name)","documentDate",undefined,true)
|
||||
}
|
||||
|
||||
const searchString = ref("")
|
||||
const filteredRows = computed(() => {
|
||||
|
||||
let temp = items.value.filter(i => i.type === "serialInvoices")
|
||||
|
||||
|
||||
let temp = items.value.filter(i => i.type === "serialInvoices").map(i => {
|
||||
return {
|
||||
...i,
|
||||
class: i.archived ? 'bg-red-500/50 dark:bg-red-400/50' : null
|
||||
}
|
||||
})
|
||||
|
||||
/*if(showDrafts.value === true) {
|
||||
temp = temp.filter(i => i.state === "Entwurf")
|
||||
|
||||
@@ -47,7 +47,7 @@ const setupPage = async (sort_column = null, sort_direction = null) => {
|
||||
console.log(item.value)
|
||||
} else if (mode.value === "list") {
|
||||
//Load Data for List
|
||||
items.value = await useEntities(type).select(dataType.supabaseSelectWithInformation, sort_column || dataType.supabaseSortColumn, sort_direction === "asc")
|
||||
items.value = await useEntities(type).select(dataType.supabaseSelectWithInformation, sort_column || dataType.supabaseSortColumn, sort_direction === "asc", true)
|
||||
}
|
||||
|
||||
loaded.value = true
|
||||
|
||||
@@ -1200,14 +1200,14 @@ export const useDataStore = defineStore('data', () => {
|
||||
label: "Typ",
|
||||
inputType: "text"
|
||||
},
|
||||
{
|
||||
/*{
|
||||
key: "driver",
|
||||
label: "Fahrer",
|
||||
inputType: "select",
|
||||
selectDataType: "profiles",
|
||||
selectDataType: "auth_users",
|
||||
selectOptionAttribute: "fullName",
|
||||
component: driver
|
||||
},
|
||||
},*/
|
||||
{
|
||||
key: "tankSize",
|
||||
label: "Tankvolumen",
|
||||
|
||||
Reference in New Issue
Block a user