Deprecated following as non standardEntity tasks, products, productcategories, services, servicecategories
This commit is contained in:
@@ -79,6 +79,8 @@ const loadOptions = async () => {
|
||||
for await(const option of optionsToLoad) {
|
||||
if(option.option === "countrys") {
|
||||
loadedOptions.value[option.option] = (await supabase.from("countrys").select()).data
|
||||
} else if(option.option === "units") {
|
||||
loadedOptions.value[option.option] = (await supabase.from("units").select()).data
|
||||
} else {
|
||||
loadedOptions.value[option.option] = (await useSupabaseSelect(option.option))
|
||||
|
||||
@@ -87,6 +89,8 @@ const loadOptions = async () => {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
console.log(loadedOptions.value)
|
||||
}
|
||||
|
||||
loadOptions()
|
||||
@@ -174,7 +178,11 @@ const contentChanged = (content, datapoint) => {
|
||||
:searchable="datapoint.selectSearchAttributes"
|
||||
:search-attributes="datapoint.selectSearchAttributes"
|
||||
:multiple="datapoint.selectMultiple"
|
||||
/>
|
||||
>
|
||||
<template #empty>
|
||||
Keine Optionen verfügbar
|
||||
</template>
|
||||
</USelectMenu>
|
||||
<UTextarea
|
||||
v-else-if="datapoint.inputType === 'textarea'"
|
||||
v-model="props.item[datapoint.key.split('.')[0]][datapoint.key.split('.')[1]]"
|
||||
@@ -218,7 +226,11 @@ const contentChanged = (content, datapoint) => {
|
||||
:search-attributes="datapoint.selectSearchAttributes"
|
||||
:multiple="datapoint.selectMultiple"
|
||||
searchable-placeholder="Suche..."
|
||||
/>
|
||||
>
|
||||
<template #empty>
|
||||
Keine Optionen verfügbar
|
||||
</template>
|
||||
</USelectMenu>
|
||||
<UTextarea
|
||||
v-else-if="datapoint.inputType === 'textarea'"
|
||||
v-model="props.item[datapoint.key]"
|
||||
|
||||
@@ -62,8 +62,6 @@ const searchString = ref('')
|
||||
|
||||
const selectableFilters = ref(dataType.filters.map(i => i.name))
|
||||
const selectedFilters = ref(dataType.filters.filter(i => i.default).map(i => i.name) || [])
|
||||
console.log(selectableFilters)
|
||||
console.log(selectedFilters)
|
||||
|
||||
const filteredRows = computed(() => {
|
||||
|
||||
@@ -132,6 +130,7 @@ const filteredRows = computed(() => {
|
||||
class="hidden lg:block"
|
||||
by="key"
|
||||
:color="selectedColumns.length !== dataType.templateColumns.filter(i => !i.disabledInTable).length ? 'primary' : 'white'"
|
||||
:ui-menu="{ width: 'min-w-max' }"
|
||||
>
|
||||
<template #label>
|
||||
Spalten
|
||||
@@ -144,6 +143,7 @@ const filteredRows = computed(() => {
|
||||
v-model="selectedFilters"
|
||||
:options="selectableFilters"
|
||||
:color="selectedFilters.length > 0 ? 'primary' : 'white'"
|
||||
:ui-menu="{ width: 'min-w-max' }"
|
||||
>
|
||||
<template #label>
|
||||
Filter
|
||||
@@ -159,6 +159,11 @@ const filteredRows = computed(() => {
|
||||
@select="(i) => router.push(`/standardEntity/${type}/show/${i.id}`) "
|
||||
:empty-state="{ icon: 'i-heroicons-circle-stack-20-solid', label: `Keine ${dataType.label} anzuzeigen` }"
|
||||
>
|
||||
<template
|
||||
v-for="column in dataType.templateColumns.filter(i => !i.disabledInTable)"
|
||||
v-slot:[`${column.key}-header`]="{row}">
|
||||
<span class="text-nowrap">{{column.label}}</span>
|
||||
</template>
|
||||
<template #name-data="{row}">
|
||||
<span
|
||||
v-if="row.id === filteredRows[selectedItem].id"
|
||||
|
||||
@@ -18,11 +18,11 @@ const links = computed(() => {
|
||||
icon: "i-heroicons-rectangle-stack",
|
||||
defaultOpen: false,
|
||||
children: [
|
||||
{
|
||||
... role.checkRight("tasks") ? [{
|
||||
label: "Aufgaben",
|
||||
to: "/tasks",
|
||||
to: "/standardEntity/tasks",
|
||||
icon: "i-heroicons-rectangle-stack"
|
||||
},
|
||||
}] : [],
|
||||
... profileStore.ownTenant.features.planningBoard ? [{
|
||||
label: "Plantafel",
|
||||
to: "/calendar/timeline",
|
||||
@@ -183,22 +183,22 @@ const links = computed(() => {
|
||||
children: [
|
||||
... role.checkRight("products") ? [{
|
||||
label: "Artikel",
|
||||
to: "/products",
|
||||
to: "/standardEntity/products",
|
||||
icon: "i-heroicons-puzzle-piece"
|
||||
}] : [],
|
||||
... role.checkRight("productcategories") ? [{
|
||||
label: "Artikelkategorien",
|
||||
to: "/productcategories",
|
||||
to: "/standardEntity/productcategories",
|
||||
icon: "i-heroicons-puzzle-piece"
|
||||
}] : [],
|
||||
... role.checkRight("services") ? [{
|
||||
label: "Leistungen",
|
||||
to: "/services",
|
||||
to: "/standardEntity/services",
|
||||
icon: "i-heroicons-puzzle-piece"
|
||||
}] : [],
|
||||
... role.checkRight("servicecategories") ? [{
|
||||
label: "Leistungskategorien",
|
||||
to: "/servicecategories",
|
||||
to: "/standardEntity/servicecategories",
|
||||
icon: "i-heroicons-puzzle-piece"
|
||||
}] : [],
|
||||
]
|
||||
|
||||
15
components/columnRenderings/created_at.vue
Normal file
15
components/columnRenderings/created_at.vue
Normal file
@@ -0,0 +1,15 @@
|
||||
<script setup>
|
||||
import dayjs from "dayjs";
|
||||
|
||||
const props = defineProps({
|
||||
row: {
|
||||
type: Object,
|
||||
required: true,
|
||||
default: {}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<span v-if="props.row.created_at">{{dayjs(props.row.created_at).format("DD.MM.YYYY HH:mm")}}</span>
|
||||
</template>
|
||||
15
components/columnRenderings/profile.vue
Normal file
15
components/columnRenderings/profile.vue
Normal file
@@ -0,0 +1,15 @@
|
||||
<script setup>
|
||||
const props = defineProps({
|
||||
row: {
|
||||
type: Object,
|
||||
required: true,
|
||||
default: {}
|
||||
}
|
||||
})
|
||||
|
||||
const profileStore = useProfileStore()
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<span>{{props.row.profile ? profileStore.getProfileById(props.row.profile).fullName : ''}}</span>
|
||||
</template>
|
||||
18
components/columnRenderings/profiles.vue
Normal file
18
components/columnRenderings/profiles.vue
Normal file
@@ -0,0 +1,18 @@
|
||||
<script setup>
|
||||
const props = defineProps({
|
||||
row: {
|
||||
type: Object,
|
||||
required: true,
|
||||
default: {}
|
||||
}
|
||||
})
|
||||
|
||||
const profileStore = useProfileStore()
|
||||
|
||||
const profiles = computed(() => props.row.profiles.map(id => profileStore.getProfileById(id).fullName).join(', '))
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<span>{{props.row.profiles ? profiles : ''}}</span>
|
||||
</template>
|
||||
13
components/columnRenderings/project.vue
Normal file
13
components/columnRenderings/project.vue
Normal file
@@ -0,0 +1,13 @@
|
||||
<script setup>
|
||||
const props = defineProps({
|
||||
row: {
|
||||
type: Object,
|
||||
required: true,
|
||||
default: {}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<span>{{props.row.project ? props.row.project.name : ''}}</span>
|
||||
</template>
|
||||
13
components/columnRenderings/purchasePrice.vue
Normal file
13
components/columnRenderings/purchasePrice.vue
Normal file
@@ -0,0 +1,13 @@
|
||||
<script setup>
|
||||
const props = defineProps({
|
||||
row: {
|
||||
type: Object,
|
||||
required: true,
|
||||
default: {}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<span>{{props.row.purchasePrice ? useCurrency(props.row.purchasePrice) : ''}}</span>
|
||||
</template>
|
||||
Reference in New Issue
Block a user