Deprecated following as non standardEntity checks, inventoryitems, spaces
This commit is contained in:
@@ -76,6 +76,8 @@ const loadOptions = async () => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
console.log(optionsToLoad)
|
||||||
|
|
||||||
for await(const option of optionsToLoad) {
|
for await(const option of optionsToLoad) {
|
||||||
if(option.option === "countrys") {
|
if(option.option === "countrys") {
|
||||||
loadedOptions.value[option.option] = (await supabase.from("countrys").select()).data
|
loadedOptions.value[option.option] = (await supabase.from("countrys").select()).data
|
||||||
@@ -154,24 +156,196 @@ const contentChanged = (content, datapoint) => {
|
|||||||
<UForm
|
<UForm
|
||||||
class="p-5"
|
class="p-5"
|
||||||
>
|
>
|
||||||
|
<div class="flex flex-row">
|
||||||
|
<div
|
||||||
|
v-for="columnName in dataType.inputColumns"
|
||||||
|
class="w-1/2 mr-5"
|
||||||
|
>
|
||||||
|
<UDivider>{{columnName}}</UDivider>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Die Form Group darf nur in der ersten bearbeitet werden und muss dann runterkopiert werden
|
||||||
|
-->
|
||||||
|
|
||||||
|
<UFormGroup
|
||||||
|
v-for="datapoint in dataType.templateColumns.filter(i => i.inputType && i.inputColumn === columnName)"
|
||||||
|
:label="datapoint.label"
|
||||||
|
>
|
||||||
|
<template #help>
|
||||||
|
<component
|
||||||
|
v-if="datapoint.helpComponent"
|
||||||
|
:is="datapoint.helpComponent"
|
||||||
|
:item="props.item"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
<div v-if="datapoint.key.includes('.')">
|
||||||
|
<UInput
|
||||||
|
v-if="['text','number'].includes(datapoint.inputType)"
|
||||||
|
v-model="props.item[datapoint.key.split('.')[0]][datapoint.key.split('.')[1]]"
|
||||||
|
:disabled="datapoint.disabledFunction ? datapoint.disabledFunction(props.item) : false"
|
||||||
|
:type="datapoint.inputType"
|
||||||
|
:placeholder="datapoint.inputIsNumberRange ? 'Leer lassen für automatisch generierte Nummer' : ''"
|
||||||
|
/>
|
||||||
|
<UToggle
|
||||||
|
v-else-if="datapoint.inputType === 'bool'"
|
||||||
|
v-model="props.item[datapoint.key.split('.')[0]][datapoint.key.split('.')[1]]"
|
||||||
|
:disabled="datapoint.disabledFunction ? datapoint.disabledFunction(props.item) : false"
|
||||||
|
/>
|
||||||
|
<USelectMenu
|
||||||
|
v-else-if="datapoint.inputType === 'select'"
|
||||||
|
v-model="props.item[datapoint.key.split('.')[0]][datapoint.key.split('.')[1]]"
|
||||||
|
:disabled="datapoint.disabledFunction ? datapoint.disabledFunction(props.item) : false"
|
||||||
|
:option-attribute="datapoint.selectOptionAttribute"
|
||||||
|
:value-attribute="datapoint.selectValueAttribute || 'id'"
|
||||||
|
:options="datapoint.selectManualOptions || loadedOptions[datapoint.selectDataType]"
|
||||||
|
: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]]"
|
||||||
|
:disabled="datapoint.disabledFunction ? datapoint.disabledFunction(props.item) : false"
|
||||||
|
rows="4"
|
||||||
|
/>
|
||||||
|
<UPopover :popper="{ placement: 'bottom-start' }" v-else-if="datapoint.inputType === 'date'">
|
||||||
|
<UButton
|
||||||
|
icon="i-heroicons-calendar-days-20-solid"
|
||||||
|
:label="props.item[datapoint.key.split('.')[0]][datapoint.key.split('.')[1]] ? dayjs(props.item[datapoint.key.split('.')[0]][datapoint.key.split('.')[1]]).format('DD.MM.YYYY') : 'Datum auswählen'"
|
||||||
|
variant="outline"
|
||||||
|
:disabled="datapoint.disabledFunction ? datapoint.disabledFunction(props.item) : false"
|
||||||
|
|
||||||
|
/>
|
||||||
|
|
||||||
|
<template #panel="{ close }">
|
||||||
|
<LazyDatePicker
|
||||||
|
v-model="props.item[datapoint.key.split('.')[0]][datapoint.key.split('.')[1]]" @close="close"
|
||||||
|
:disabled="datapoint.disabledFunction ? datapoint.disabledFunction(props.item) : false"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</UPopover>
|
||||||
|
<!-- TODO: DISABLED FOR TIPTAP -->
|
||||||
|
<Tiptap
|
||||||
|
v-else-if="datapoint.inputType === 'editor'"
|
||||||
|
@updateContent="(i) => contentChanged(i,datapoint)"
|
||||||
|
:preloadedContent="props.item[datapoint.key.split('.')[0]][datapoint.key.split('.')[1]].html"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div v-else>
|
||||||
|
<UInput
|
||||||
|
v-if="['text','number'].includes(datapoint.inputType)"
|
||||||
|
v-model="props.item[datapoint.key]"
|
||||||
|
:disabled="datapoint.disabledFunction ? datapoint.disabledFunction(props.item) : false"
|
||||||
|
:type="datapoint.inputType"
|
||||||
|
:placeholder="datapoint.inputIsNumberRange ? 'Leer lassen für automatisch generierte Nummer' : ''"
|
||||||
|
/>
|
||||||
|
<UToggle
|
||||||
|
v-else-if="datapoint.inputType === 'bool'"
|
||||||
|
v-model="props.item[datapoint.key]"
|
||||||
|
:disabled="datapoint.disabledFunction ? datapoint.disabledFunction(props.item) : false"
|
||||||
|
/>
|
||||||
|
<USelectMenu
|
||||||
|
v-else-if="datapoint.inputType === 'select'"
|
||||||
|
v-model="props.item[datapoint.key]"
|
||||||
|
:disabled="datapoint.disabledFunction ? datapoint.disabledFunction(props.item) : false"
|
||||||
|
:option-attribute="datapoint.selectOptionAttribute"
|
||||||
|
:value-attribute="datapoint.selectValueAttribute || 'id'"
|
||||||
|
:options="datapoint.selectManualOptions || loadedOptions[datapoint.selectDataType]"
|
||||||
|
:searchable="datapoint.selectSearchAttributes"
|
||||||
|
: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]"
|
||||||
|
:disabled="datapoint.disabledFunction ? datapoint.disabledFunction(props.item) : false"
|
||||||
|
rows="4"
|
||||||
|
/>
|
||||||
|
<UPopover :popper="{ placement: 'bottom-start' }" v-else-if="datapoint.inputType === 'date'">
|
||||||
|
<UButton
|
||||||
|
icon="i-heroicons-calendar-days-20-solid"
|
||||||
|
:label="props.item[datapoint.key] ? dayjs(props.item[datapoint.key]).format('DD.MM.YYYY') : 'Datum auswählen'"
|
||||||
|
variant="outline"
|
||||||
|
:disabled="datapoint.disabledFunction ? datapoint.disabledFunction(props.item) : false"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<template #panel="{ close }">
|
||||||
|
<LazyDatePicker
|
||||||
|
v-model="props.item[datapoint.key]" @close="close"
|
||||||
|
:disabled="datapoint.disabledFunction ? datapoint.disabledFunction(props.item) : false"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</UPopover>
|
||||||
|
<Tiptap
|
||||||
|
v-else-if="datapoint.inputType === 'editor'"
|
||||||
|
@updateContent="(i) => contentChanged(i,datapoint)"
|
||||||
|
:preloadedContent="props.item[datapoint.key].html"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
v-if="profileStore.ownTenant.ownFields"
|
||||||
|
>
|
||||||
|
<UDivider
|
||||||
|
class="mt-3"
|
||||||
|
>Eigene Felder</UDivider>
|
||||||
|
|
||||||
|
<UFormGroup
|
||||||
|
v-for="field in profileStore.ownTenant.ownFields.contracts"
|
||||||
|
:key="field.key"
|
||||||
|
:label="field.label"
|
||||||
|
>
|
||||||
|
<UInput
|
||||||
|
v-if="field.type === 'text'"
|
||||||
|
v-model="props.item.ownFields[field.key]"
|
||||||
|
/>
|
||||||
|
<USelectMenu
|
||||||
|
v-else-if="field.type === 'select'"
|
||||||
|
:options="field.options"
|
||||||
|
v-model="props.item.ownFields[field.key]"
|
||||||
|
/>
|
||||||
|
</UFormGroup>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</UFormGroup>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<UFormGroup
|
<UFormGroup
|
||||||
v-for="datapoint in dataType.templateColumns.filter(i => i.inputType)"
|
v-for="datapoint in dataType.templateColumns.filter(i => i.inputType && i.inputColumn === columnName)"
|
||||||
:label="datapoint.label"
|
:label="datapoint.label"
|
||||||
>
|
>
|
||||||
|
<template #help>
|
||||||
|
<component
|
||||||
|
v-if="datapoint.helpComponent"
|
||||||
|
:is="datapoint.helpComponent"
|
||||||
|
:item="props.item"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
<div v-if="datapoint.key.includes('.')">
|
<div v-if="datapoint.key.includes('.')">
|
||||||
<UInput
|
<UInput
|
||||||
v-if="['text','number'].includes(datapoint.inputType)"
|
v-if="['text','number'].includes(datapoint.inputType)"
|
||||||
v-model="props.item[datapoint.key.split('.')[0]][datapoint.key.split('.')[1]]"
|
v-model="props.item[datapoint.key.split('.')[0]][datapoint.key.split('.')[1]]"
|
||||||
|
:disabled="datapoint.disabledFunction ? datapoint.disabledFunction(props.item) : false"
|
||||||
:type="datapoint.inputType"
|
:type="datapoint.inputType"
|
||||||
:placeholder="datapoint.inputIsNumberRange ? 'Leer lassen für automatisch generierte Nummer' : ''"
|
:placeholder="datapoint.inputIsNumberRange ? 'Leer lassen für automatisch generierte Nummer' : ''"
|
||||||
/>
|
/>
|
||||||
<UToggle
|
<UToggle
|
||||||
v-else-if="datapoint.inputType === 'bool'"
|
v-else-if="datapoint.inputType === 'bool'"
|
||||||
v-model="props.item[datapoint.key.split('.')[0]][datapoint.key.split('.')[1]]"
|
v-model="props.item[datapoint.key.split('.')[0]][datapoint.key.split('.')[1]]"
|
||||||
|
:disabled="datapoint.disabledFunction ? datapoint.disabledFunction(props.item) : false"
|
||||||
/>
|
/>
|
||||||
<USelectMenu
|
<USelectMenu
|
||||||
v-else-if="datapoint.inputType === 'select'"
|
v-else-if="datapoint.inputType === 'select'"
|
||||||
v-model="props.item[datapoint.key.split('.')[0]][datapoint.key.split('.')[1]]"
|
v-model="props.item[datapoint.key.split('.')[0]][datapoint.key.split('.')[1]]"
|
||||||
|
:disabled="datapoint.disabledFunction ? datapoint.disabledFunction(props.item) : false"
|
||||||
:option-attribute="datapoint.selectOptionAttribute"
|
:option-attribute="datapoint.selectOptionAttribute"
|
||||||
:value-attribute="datapoint.selectValueAttribute || 'id'"
|
:value-attribute="datapoint.selectValueAttribute || 'id'"
|
||||||
:options="datapoint.selectManualOptions || loadedOptions[datapoint.selectDataType]"
|
:options="datapoint.selectManualOptions || loadedOptions[datapoint.selectDataType]"
|
||||||
@@ -186,6 +360,7 @@ const contentChanged = (content, datapoint) => {
|
|||||||
<UTextarea
|
<UTextarea
|
||||||
v-else-if="datapoint.inputType === 'textarea'"
|
v-else-if="datapoint.inputType === 'textarea'"
|
||||||
v-model="props.item[datapoint.key.split('.')[0]][datapoint.key.split('.')[1]]"
|
v-model="props.item[datapoint.key.split('.')[0]][datapoint.key.split('.')[1]]"
|
||||||
|
:disabled="datapoint.disabledFunction ? datapoint.disabledFunction(props.item) : false"
|
||||||
rows="4"
|
rows="4"
|
||||||
/>
|
/>
|
||||||
<UPopover :popper="{ placement: 'bottom-start' }" v-else-if="datapoint.inputType === 'date'">
|
<UPopover :popper="{ placement: 'bottom-start' }" v-else-if="datapoint.inputType === 'date'">
|
||||||
@@ -193,12 +368,18 @@ const contentChanged = (content, datapoint) => {
|
|||||||
icon="i-heroicons-calendar-days-20-solid"
|
icon="i-heroicons-calendar-days-20-solid"
|
||||||
:label="props.item[datapoint.key.split('.')[0]][datapoint.key.split('.')[1]] ? dayjs(props.item[datapoint.key.split('.')[0]][datapoint.key.split('.')[1]]).format('DD.MM.YYYY') : 'Datum auswählen'"
|
:label="props.item[datapoint.key.split('.')[0]][datapoint.key.split('.')[1]] ? dayjs(props.item[datapoint.key.split('.')[0]][datapoint.key.split('.')[1]]).format('DD.MM.YYYY') : 'Datum auswählen'"
|
||||||
variant="outline"
|
variant="outline"
|
||||||
|
:disabled="datapoint.disabledFunction ? datapoint.disabledFunction(props.item) : false"
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<template #panel="{ close }">
|
<template #panel="{ close }">
|
||||||
<LazyDatePicker v-model="props.item[datapoint.key.split('.')[0]][datapoint.key.split('.')[1]]" @close="close" />
|
<LazyDatePicker
|
||||||
|
v-model="props.item[datapoint.key.split('.')[0]][datapoint.key.split('.')[1]]" @close="close"
|
||||||
|
:disabled="datapoint.disabledFunction ? datapoint.disabledFunction(props.item) : false"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
</UPopover>
|
</UPopover>
|
||||||
|
<!-- TODO: DISABLED FOR TIPTAP -->
|
||||||
<Tiptap
|
<Tiptap
|
||||||
v-else-if="datapoint.inputType === 'editor'"
|
v-else-if="datapoint.inputType === 'editor'"
|
||||||
@updateContent="(i) => contentChanged(i,datapoint)"
|
@updateContent="(i) => contentChanged(i,datapoint)"
|
||||||
@@ -209,16 +390,19 @@ const contentChanged = (content, datapoint) => {
|
|||||||
<UInput
|
<UInput
|
||||||
v-if="['text','number'].includes(datapoint.inputType)"
|
v-if="['text','number'].includes(datapoint.inputType)"
|
||||||
v-model="props.item[datapoint.key]"
|
v-model="props.item[datapoint.key]"
|
||||||
|
:disabled="datapoint.disabledFunction ? datapoint.disabledFunction(props.item) : false"
|
||||||
:type="datapoint.inputType"
|
:type="datapoint.inputType"
|
||||||
:placeholder="datapoint.inputIsNumberRange ? 'Leer lassen für automatisch generierte Nummer' : ''"
|
:placeholder="datapoint.inputIsNumberRange ? 'Leer lassen für automatisch generierte Nummer' : ''"
|
||||||
/>
|
/>
|
||||||
<UToggle
|
<UToggle
|
||||||
v-else-if="datapoint.inputType === 'bool'"
|
v-else-if="datapoint.inputType === 'bool'"
|
||||||
v-model="props.item[datapoint.key]"
|
v-model="props.item[datapoint.key]"
|
||||||
|
:disabled="datapoint.disabledFunction ? datapoint.disabledFunction(props.item) : false"
|
||||||
/>
|
/>
|
||||||
<USelectMenu
|
<USelectMenu
|
||||||
v-else-if="datapoint.inputType === 'select'"
|
v-else-if="datapoint.inputType === 'select'"
|
||||||
v-model="props.item[datapoint.key]"
|
v-model="props.item[datapoint.key]"
|
||||||
|
:disabled="datapoint.disabledFunction ? datapoint.disabledFunction(props.item) : false"
|
||||||
:option-attribute="datapoint.selectOptionAttribute"
|
:option-attribute="datapoint.selectOptionAttribute"
|
||||||
:value-attribute="datapoint.selectValueAttribute || 'id'"
|
:value-attribute="datapoint.selectValueAttribute || 'id'"
|
||||||
:options="datapoint.selectManualOptions || loadedOptions[datapoint.selectDataType]"
|
:options="datapoint.selectManualOptions || loadedOptions[datapoint.selectDataType]"
|
||||||
@@ -234,6 +418,7 @@ const contentChanged = (content, datapoint) => {
|
|||||||
<UTextarea
|
<UTextarea
|
||||||
v-else-if="datapoint.inputType === 'textarea'"
|
v-else-if="datapoint.inputType === 'textarea'"
|
||||||
v-model="props.item[datapoint.key]"
|
v-model="props.item[datapoint.key]"
|
||||||
|
:disabled="datapoint.disabledFunction ? datapoint.disabledFunction(props.item) : false"
|
||||||
rows="4"
|
rows="4"
|
||||||
/>
|
/>
|
||||||
<UPopover :popper="{ placement: 'bottom-start' }" v-else-if="datapoint.inputType === 'date'">
|
<UPopover :popper="{ placement: 'bottom-start' }" v-else-if="datapoint.inputType === 'date'">
|
||||||
@@ -241,10 +426,14 @@ const contentChanged = (content, datapoint) => {
|
|||||||
icon="i-heroicons-calendar-days-20-solid"
|
icon="i-heroicons-calendar-days-20-solid"
|
||||||
:label="props.item[datapoint.key] ? dayjs(props.item[datapoint.key]).format('DD.MM.YYYY') : 'Datum auswählen'"
|
:label="props.item[datapoint.key] ? dayjs(props.item[datapoint.key]).format('DD.MM.YYYY') : 'Datum auswählen'"
|
||||||
variant="outline"
|
variant="outline"
|
||||||
|
:disabled="datapoint.disabledFunction ? datapoint.disabledFunction(props.item) : false"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<template #panel="{ close }">
|
<template #panel="{ close }">
|
||||||
<LazyDatePicker v-model="props.item[datapoint.key]" @close="close" />
|
<LazyDatePicker
|
||||||
|
v-model="props.item[datapoint.key]" @close="close"
|
||||||
|
:disabled="datapoint.disabledFunction ? datapoint.disabledFunction(props.item) : false"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
</UPopover>
|
</UPopover>
|
||||||
<Tiptap
|
<Tiptap
|
||||||
|
|||||||
@@ -155,7 +155,7 @@ const links = computed(() => {
|
|||||||
}] : [],
|
}] : [],
|
||||||
... role.checkRight("inventoryitems") ? [{
|
... role.checkRight("inventoryitems") ? [{
|
||||||
label: "Inventar",
|
label: "Inventar",
|
||||||
to: "/inventoryitems",
|
to: "/standardEntity/inventoryitems",
|
||||||
icon: "i-heroicons-puzzle-piece"
|
icon: "i-heroicons-puzzle-piece"
|
||||||
}] : [],
|
}] : [],
|
||||||
]
|
]
|
||||||
@@ -205,7 +205,7 @@ const links = computed(() => {
|
|||||||
},
|
},
|
||||||
... role.checkRight("checks") ? [{
|
... role.checkRight("checks") ? [{
|
||||||
label: "Überprüfungen",
|
label: "Überprüfungen",
|
||||||
to: "/checks",
|
to: "/standardEntity/checks",
|
||||||
icon: "i-heroicons-magnifying-glass"
|
icon: "i-heroicons-magnifying-glass"
|
||||||
},] : [],
|
},] : [],
|
||||||
... role.checkRight("projects") ? [{
|
... role.checkRight("projects") ? [{
|
||||||
|
|||||||
@@ -8,8 +8,9 @@ const props = defineProps({
|
|||||||
})
|
})
|
||||||
|
|
||||||
const profileStore = useProfileStore()
|
const profileStore = useProfileStore()
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<span>{{props.row.profile ? profileStore.getProfileById(props.row.profile).fullName : ''}}</span>
|
<span v-if="props.row.profile">{{props.row.profile.id ? profileStore.getProfileById(props.row.profile.id).fullName : profileStore.getProfileById(props.row.profile).fullName}}</span>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
13
components/columnRenderings/usePlanning.vue
Normal file
13
components/columnRenderings/usePlanning.vue
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
<script setup>
|
||||||
|
const props = defineProps({
|
||||||
|
row: {
|
||||||
|
type: Object,
|
||||||
|
required: true,
|
||||||
|
default: {}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<span>{{props.row.usePlanning ? 'Ja' : 'Nein'}}</span>
|
||||||
|
</template>
|
||||||
13
components/columnRenderings/vehicle.vue
Normal file
13
components/columnRenderings/vehicle.vue
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
<script setup>
|
||||||
|
const props = defineProps({
|
||||||
|
row: {
|
||||||
|
type: Object,
|
||||||
|
required: true,
|
||||||
|
default: {}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<span v-if="props.row.vehicle">{{props.row.vehicle.id ? props.row.vehicle.licensePlate : ''}}</span>
|
||||||
|
</template>
|
||||||
13
components/helpRenderings/quantity.vue
Normal file
13
components/helpRenderings/quantity.vue
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
<script setup>
|
||||||
|
const props = defineProps({
|
||||||
|
item: {
|
||||||
|
type: Object,
|
||||||
|
required: true,
|
||||||
|
default: {}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<span>{{props.item.serialNumber ? 'Menge deaktiviert durch Eingabe der Seriennummer' : 'Für Einzelartikel Menge gleich 0'}}</span>
|
||||||
|
</template>
|
||||||
270
stores/data.js
270
stores/data.js
@@ -23,6 +23,10 @@ import project from "~/components/columnRenderings/project.vue";
|
|||||||
import created_at from "~/components/columnRenderings/created_at.vue";
|
import created_at from "~/components/columnRenderings/created_at.vue";
|
||||||
import profile from "~/components/columnRenderings/profile.vue";
|
import profile from "~/components/columnRenderings/profile.vue";
|
||||||
import profiles from "~/components/columnRenderings/profiles.vue";
|
import profiles from "~/components/columnRenderings/profiles.vue";
|
||||||
|
import vehicle from "~/components/columnRenderings/vehicle.vue"
|
||||||
|
import usePlanning from "~/components/columnRenderings/usePlanning.vue"
|
||||||
|
|
||||||
|
import quantity from "~/components/helpRenderings/quantity.vue"
|
||||||
|
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
export const useDataStore = defineStore('data', () => {
|
export const useDataStore = defineStore('data', () => {
|
||||||
@@ -787,9 +791,104 @@ export const useDataStore = defineStore('data', () => {
|
|||||||
spaces: {
|
spaces: {
|
||||||
label: "Lagerplätze",
|
label: "Lagerplätze",
|
||||||
labelSingle: "Lagerplatz",
|
labelSingle: "Lagerplatz",
|
||||||
|
isStandardEntity: true,
|
||||||
|
supabaseSelectWithInformation: "*, documents(*)",
|
||||||
|
supabaseSortColumn: "spaceNumber",
|
||||||
redirect: true,
|
redirect: true,
|
||||||
numberRangeHolder: "spaceNumber",
|
numberRangeHolder: "spaceNumber",
|
||||||
historyItemHolder: "space"
|
historyItemHolder: "space",
|
||||||
|
filters:[],
|
||||||
|
inputColumns: [
|
||||||
|
"Allgemeines",
|
||||||
|
"Ort"
|
||||||
|
],
|
||||||
|
templateColumns: [
|
||||||
|
{
|
||||||
|
key: "name",
|
||||||
|
label: "Name",
|
||||||
|
inputType: "text",
|
||||||
|
title: true,
|
||||||
|
inputColumn: "Allgemeines"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 'spaceNumber',
|
||||||
|
label: "Lagerplatznr.",
|
||||||
|
inputType: "text",
|
||||||
|
inputIsNumberRange: true,
|
||||||
|
inputColumn: "Allgemeines"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "type",
|
||||||
|
label: "Typ",
|
||||||
|
inputType: "select",
|
||||||
|
selectManualOptions: ["Standort","Regalplatz", "Kiste", "Palettenplatz", "Sonstiges"],
|
||||||
|
inputColumn: "Allgemeines"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "parentSpace",
|
||||||
|
label: "Übergeordneter Lagerplatz",
|
||||||
|
inputType: "select",
|
||||||
|
selectDataType: "spaces",
|
||||||
|
selectOptionAttribute: "spaceNumber",
|
||||||
|
selectValueAttribute: "id",
|
||||||
|
inputColumn: "Allgemeines"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "infoData.streetNumber",
|
||||||
|
label: "Straße + Hausnummer",
|
||||||
|
inputType: "text",
|
||||||
|
disabledInTable: true,
|
||||||
|
inputColumn: "Ort"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "infoData.special",
|
||||||
|
label: "Adresszusatz",
|
||||||
|
inputType: "text",
|
||||||
|
disabledInTable: true,
|
||||||
|
inputColumn: "Ort"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "infoData.zip",
|
||||||
|
label: "Postleitzahl",
|
||||||
|
inputType: "number",
|
||||||
|
disabledInTable: true,
|
||||||
|
inputColumn: "Ort"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "infoData.city",
|
||||||
|
label: "Stadt",
|
||||||
|
inputType: "text",
|
||||||
|
disabledInTable: true,
|
||||||
|
inputColumn: "Ort"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "infoData.country",
|
||||||
|
label: "Land",
|
||||||
|
inputType: "select",
|
||||||
|
selectDataType: "countrys",
|
||||||
|
selectOptionAttribute: "name",
|
||||||
|
selectValueAttribute: "name",
|
||||||
|
disabledInTable: true,
|
||||||
|
inputColumn: "Ort"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "address",
|
||||||
|
label: "Adresse",
|
||||||
|
component: address
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "description",
|
||||||
|
label: "Beschreibung",
|
||||||
|
inputType: "textarea",
|
||||||
|
}
|
||||||
|
],
|
||||||
|
showTabs: [
|
||||||
|
{
|
||||||
|
label: 'Informationen',
|
||||||
|
}, {
|
||||||
|
label: 'Dokumente',
|
||||||
|
},{label: 'Inventarartikel'}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
users: {
|
users: {
|
||||||
label: "Benutzer",
|
label: "Benutzer",
|
||||||
@@ -807,8 +906,127 @@ export const useDataStore = defineStore('data', () => {
|
|||||||
inventoryitems: {
|
inventoryitems: {
|
||||||
label: "Inventarartikel",
|
label: "Inventarartikel",
|
||||||
labelSingle: "Inventarartikel",
|
labelSingle: "Inventarartikel",
|
||||||
|
isStandardEntity: true,
|
||||||
|
supabaseSelectWithInformation: "*, documents(*), vendor(id,name), currentSpace(id,name)",
|
||||||
redirect: true,
|
redirect: true,
|
||||||
numberRangeHolder: "articleNumber"
|
numberRangeHolder: "articleNumber",
|
||||||
|
inputColumns: [
|
||||||
|
"Allgemeines",
|
||||||
|
"Anschaffung"
|
||||||
|
],
|
||||||
|
filters:[],
|
||||||
|
templateColumns: [
|
||||||
|
{
|
||||||
|
key: "name",
|
||||||
|
label: "Name",
|
||||||
|
title: true,
|
||||||
|
inputType: "text",
|
||||||
|
inputColumn: "Allgemeines"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "usePlanning",
|
||||||
|
label: "In Plantafel anzeigen",
|
||||||
|
inputType: "bool",
|
||||||
|
inputColumn: "Allgemeines",
|
||||||
|
component: usePlanning
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "description",
|
||||||
|
label: "Beschreibung",
|
||||||
|
inputType: "textarea",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "currentSpace",
|
||||||
|
label: "Aktueller Lagerplatz",
|
||||||
|
inputType: "select",
|
||||||
|
selectDataType: "spaces",
|
||||||
|
selectOptionAttribute: "name",
|
||||||
|
selectSearchAttributes: ['name'],
|
||||||
|
inputColumn: "Allgemeines"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "articleNumber",
|
||||||
|
label: "Artikelnummer",
|
||||||
|
inputType: "text",
|
||||||
|
inputIsNumberRange: true,
|
||||||
|
inputColumn: "Allgemeines"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "serialNumber",
|
||||||
|
label: "Seriennummer",
|
||||||
|
inputType: "text",
|
||||||
|
inputColumn: "Allgemeines"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "purchaseDate",
|
||||||
|
label: "Kaufdatum",
|
||||||
|
inputType: "date",
|
||||||
|
inputColumn: "Anschaffung"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "vendor",
|
||||||
|
label: "Lieferant",
|
||||||
|
inputType: "select",
|
||||||
|
selectDataType: "vendors",
|
||||||
|
selectOptionAttribute: "name",
|
||||||
|
selectSearchAttributes: ['name'],
|
||||||
|
inputColumn: "Anschaffung"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "quantity",
|
||||||
|
label: "Menge",
|
||||||
|
inputType: "number",
|
||||||
|
inputColumn: "Allgemeines",
|
||||||
|
disabledFunction: function (item) {
|
||||||
|
return item.serialNumber
|
||||||
|
},
|
||||||
|
helpComponent: quantity
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "purchasePrice",
|
||||||
|
label: "Kaufpreis",
|
||||||
|
inputType: "number",
|
||||||
|
inputStepSize: "0.01",
|
||||||
|
inputColumn: "Anschaffung"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "maunfacturer",
|
||||||
|
label: "Hersteller",
|
||||||
|
inputType: "text",
|
||||||
|
inputColumn: "Anschaffung"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "manufacturerNumber",
|
||||||
|
label: "Herstellernummer",
|
||||||
|
inputType: "text",
|
||||||
|
inputColumn: "Anschaffung"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "profiles",
|
||||||
|
label: "Berechtigte Benutzer",
|
||||||
|
inputType: "select",
|
||||||
|
selectDataType: "profiles",
|
||||||
|
selectOptionAttribute: "fullName",
|
||||||
|
selectSearchAttributes: ['fullName'],
|
||||||
|
selectMultiple: true,
|
||||||
|
component: profiles
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "currentValue",
|
||||||
|
label: "Aktueller Wert",
|
||||||
|
inputType: "number",
|
||||||
|
inputStepSize: "0.01",
|
||||||
|
inputColumn: "Anschaffung"
|
||||||
|
},
|
||||||
|
|
||||||
|
],
|
||||||
|
showTabs: [
|
||||||
|
{
|
||||||
|
label: 'Informationen',
|
||||||
|
}, {
|
||||||
|
label: 'Dokumente',
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
services: {
|
services: {
|
||||||
label: "Leistungen",
|
label: "Leistungen",
|
||||||
@@ -958,8 +1176,54 @@ export const useDataStore = defineStore('data', () => {
|
|||||||
checks: {
|
checks: {
|
||||||
label: "Überprüfungen",
|
label: "Überprüfungen",
|
||||||
labelSingle: "Überprüfung",
|
labelSingle: "Überprüfung",
|
||||||
|
isStandardEntity: true,
|
||||||
|
supabaseSelectWithInformation: "*, vehicle(id,licensePlate), profile(id, fullName), inventoryitem(name), documents(*)",
|
||||||
redirect: true,
|
redirect: true,
|
||||||
historyItemHolder: "check"
|
historyItemHolder: "check",
|
||||||
|
filters: [],
|
||||||
|
templateColumns: [
|
||||||
|
{
|
||||||
|
key: "name",
|
||||||
|
label: "Name",
|
||||||
|
title: true,
|
||||||
|
inputType: "text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "vehicle",
|
||||||
|
label: "Fahrzeug",
|
||||||
|
component: vehicle,
|
||||||
|
inputType: "select",
|
||||||
|
selectDataType: "vehicles",
|
||||||
|
selectOptionAttribute: "licensePlate",
|
||||||
|
selectSearchAttributes: ['licensePlate'],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "profile",
|
||||||
|
label: "Person",
|
||||||
|
component: profile,
|
||||||
|
inputType: "select",
|
||||||
|
selectDataType: "profiles",
|
||||||
|
selectOptionAttribute: "fullName",
|
||||||
|
selectSearchAttributes: ['fullName'],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "inventoryitem",
|
||||||
|
label: "Inventarartikel",
|
||||||
|
inputType: "select",
|
||||||
|
selectDataType: "inventoryitems",
|
||||||
|
selectOptionAttribute: "name",
|
||||||
|
selectSearchAttributes: ['name'],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "notes",
|
||||||
|
label: "Notizen",
|
||||||
|
inputType: "textarea"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
showTabs: [
|
||||||
|
{
|
||||||
|
label: 'Informationen',
|
||||||
|
}, {label: 'Dokumente'}, {label: 'Ausführungen'}]
|
||||||
},
|
},
|
||||||
roles: {
|
roles: {
|
||||||
label: "Rollen",
|
label: "Rollen",
|
||||||
|
|||||||
Reference in New Issue
Block a user