Deprecated following as non standardEntity tasks, products, productcategories, services, servicecategories
This commit is contained in:
195
stores/data.js
195
stores/data.js
@@ -18,6 +18,11 @@ import address from "~/components/columnRenderings/address.vue"
|
||||
import sepa from "~/components/columnRenderings/sepa.vue"
|
||||
import recurring from "~/components/columnRenderings/recurring.vue"
|
||||
import description from "~/components/columnRenderings/description.vue"
|
||||
import purchasePrice from "~/components/columnRenderings/purchasePrice.vue";
|
||||
import project from "~/components/columnRenderings/project.vue";
|
||||
import created_at from "~/components/columnRenderings/created_at.vue";
|
||||
import profile from "~/components/columnRenderings/profile.vue";
|
||||
import profiles from "~/components/columnRenderings/profiles.vue";
|
||||
|
||||
// @ts-ignore
|
||||
export const useDataStore = defineStore('data', () => {
|
||||
@@ -32,8 +37,74 @@ export const useDataStore = defineStore('data', () => {
|
||||
tasks: {
|
||||
label: "Aufgaben",
|
||||
labelSingle: "Aufgabe",
|
||||
isStandardEntity: true,
|
||||
redirect: true,
|
||||
historyItemHolder: "task"
|
||||
historyItemHolder: "task",
|
||||
supabaseSelectWithInformation: "*, plant(*), project(*), customer(*)",
|
||||
filters: [
|
||||
{
|
||||
name: "Nur Offene Aufgaben",
|
||||
default: true,
|
||||
"filterFunction": function (row) {
|
||||
if(row.categorie !== "Erledigt") {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
templateColumns: [
|
||||
{
|
||||
key: "created_at",
|
||||
label: "Erstellt am",
|
||||
component: created_at,
|
||||
},{
|
||||
key: "name",
|
||||
label: "Name",
|
||||
title: true,
|
||||
inputType: "text"
|
||||
},{
|
||||
key: "categorie",
|
||||
label: "Kategorie"
|
||||
},{
|
||||
key: "profile",
|
||||
label: "Benutzer",
|
||||
component: profile,
|
||||
inputType: "select",
|
||||
selectDataType: "profiles",
|
||||
selectOptionAttribute: "fullName",
|
||||
selectSearchAttributes: ['fullName'],
|
||||
},{
|
||||
key: "project",
|
||||
label: "Projekt",
|
||||
component: project,
|
||||
inputType: "select",
|
||||
selectDataType: "projects",
|
||||
selectOptionAttribute: "name",
|
||||
selectSearchAttributes: ['name'],
|
||||
},{
|
||||
key: "customer",
|
||||
label: "Kunde",
|
||||
component: customer,
|
||||
inputType: "select",
|
||||
selectDataType: "customers",
|
||||
selectOptionAttribute: "name",
|
||||
selectSearchAttributes: ['name'],
|
||||
},{
|
||||
key: "plant",
|
||||
label: "Objekt",
|
||||
component: plant,
|
||||
inputType: "select",
|
||||
selectDataType: "plants",
|
||||
selectOptionAttribute: "name",
|
||||
selectSearchAttributes: ['name'],
|
||||
},{
|
||||
key: "description",
|
||||
label: "Beschreibung"
|
||||
},
|
||||
],
|
||||
showTabs: [{label: 'Informationen'}]
|
||||
},
|
||||
customers: {
|
||||
label: "Kunden",
|
||||
@@ -140,7 +211,8 @@ export const useDataStore = defineStore('data', () => {
|
||||
selectDataType: "profiles",
|
||||
selectOptionAttribute: "fullName",
|
||||
selectSearchAttributes: ['fullName'],
|
||||
selectMultiple: true
|
||||
selectMultiple: true,
|
||||
component: profiles
|
||||
},
|
||||
],
|
||||
showTabs: [{label: 'Informationen'},{label: 'Dokumente'},{label: 'Projekte'},{label: 'Objekte'},{label: 'Verträge'}]
|
||||
@@ -343,38 +415,64 @@ export const useDataStore = defineStore('data', () => {
|
||||
products: {
|
||||
label: "Artikel",
|
||||
labelSingle: "Artikel",
|
||||
isStandardEntity: true,
|
||||
redirect:true,
|
||||
supabaseSelectWithInformation: "*, unit(name)",
|
||||
filters: [],
|
||||
templateColumns: [
|
||||
{
|
||||
key: "name",
|
||||
label:"Name"
|
||||
},
|
||||
{
|
||||
key: "description",
|
||||
label: "Beschreibung"
|
||||
label:"Name",
|
||||
title: true,
|
||||
inputType: "text"
|
||||
},
|
||||
{
|
||||
key: "manufacturer",
|
||||
label: "Hersteller"
|
||||
label: "Hersteller",
|
||||
inputType: "text"
|
||||
},
|
||||
{
|
||||
key: "unit",
|
||||
label: "Einheit",
|
||||
component: unit
|
||||
component: unit,
|
||||
inputType: "select",
|
||||
selectDataType: "units",
|
||||
selectOptionAttribute: "name",
|
||||
selectSearchAttributes: ['name'],
|
||||
},
|
||||
{
|
||||
key: "purchasePrice",
|
||||
label: "Einkaufspreis",
|
||||
component: purchasePrice,
|
||||
inputType: "number"
|
||||
},{
|
||||
key: "sellingPrice",
|
||||
label: "Verkaufpreispreis",
|
||||
component: sellingPrice
|
||||
component: sellingPrice,
|
||||
inputType: "number"
|
||||
},
|
||||
{
|
||||
/*{
|
||||
key: "tags",
|
||||
label: "Tags"
|
||||
},
|
||||
},*/
|
||||
{
|
||||
key: "productcategories",
|
||||
label: "Artikelkategorien"
|
||||
label: "Artikelkategorien",
|
||||
inputType: "select",
|
||||
selectDataType: "productcategories",
|
||||
selectOptionAttribute: "name",
|
||||
selectSearchAttributes: ['name'],
|
||||
selectMultiple: true
|
||||
},
|
||||
{
|
||||
key: "description",
|
||||
label: "Beschreibung",
|
||||
inputType:"textarea"
|
||||
},
|
||||
],
|
||||
showTabs: [
|
||||
{
|
||||
label: "Informationen"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -389,7 +487,7 @@ export const useDataStore = defineStore('data', () => {
|
||||
supabaseSortColumn: "projectNumber",
|
||||
filters: [
|
||||
{
|
||||
name: "Abgeschlossen",
|
||||
name: "Nur Offene Projekte",
|
||||
default: true,
|
||||
"filterFunction": function (row) {
|
||||
if(row.phases && row.phases.length > 0) {
|
||||
@@ -453,7 +551,8 @@ export const useDataStore = defineStore('data', () => {
|
||||
selectDataType: "profiles",
|
||||
selectOptionAttribute: "fullName",
|
||||
selectSearchAttributes: ['fullName'],
|
||||
selectMultiple: true
|
||||
selectMultiple: true,
|
||||
component: profiles
|
||||
},],
|
||||
showTabs: [
|
||||
{
|
||||
@@ -551,7 +650,8 @@ export const useDataStore = defineStore('data', () => {
|
||||
selectDataType: "profiles",
|
||||
selectOptionAttribute: "fullName",
|
||||
selectSearchAttributes: ['fullName'],
|
||||
selectMultiple: true
|
||||
selectMultiple: true,
|
||||
component: profiles
|
||||
},
|
||||
],
|
||||
showTabs: [
|
||||
@@ -668,7 +768,8 @@ export const useDataStore = defineStore('data', () => {
|
||||
selectDataType: "profiles",
|
||||
selectOptionAttribute: "fullName",
|
||||
selectSearchAttributes: ['fullName'],
|
||||
selectMultiple: true
|
||||
selectMultiple: true,
|
||||
component: profiles
|
||||
},
|
||||
],
|
||||
showTabs: [
|
||||
@@ -712,22 +813,50 @@ export const useDataStore = defineStore('data', () => {
|
||||
services: {
|
||||
label: "Leistungen",
|
||||
labelSingle: "Leistung",
|
||||
isStandardEntity: true,
|
||||
redirect: true,
|
||||
supabaseSelectWithInformation: "*, unit(*)",
|
||||
filters: [],
|
||||
templateColumns: [
|
||||
{
|
||||
key: "name",
|
||||
label: "Name"
|
||||
label: "Name",
|
||||
title: true,
|
||||
inputType: "text"
|
||||
},
|
||||
{
|
||||
key: "unit",
|
||||
label: "Einheit",
|
||||
component: unit
|
||||
component: unit,
|
||||
inputType: "select",
|
||||
selectDataType: "units",
|
||||
selectOptionAttribute: "name",
|
||||
selectSearchAttributes: ['name'],
|
||||
},
|
||||
{
|
||||
key: "sellingPrice",
|
||||
label: "Verkaufspreis",
|
||||
component: sellingPrice
|
||||
component: sellingPrice,
|
||||
inputType: "number",
|
||||
},
|
||||
{
|
||||
key: "servicecategories",
|
||||
label: "Leistungskategorien",
|
||||
inputType: "select",
|
||||
selectDataType: "servicecategories",
|
||||
selectOptionAttribute: "name",
|
||||
selectSearchAttributes: ['name'],
|
||||
selectMultiple: true
|
||||
},
|
||||
{
|
||||
key: "description",
|
||||
label: "Beschreibung",
|
||||
inputType:"textarea"
|
||||
},
|
||||
],
|
||||
showTabs: [
|
||||
{
|
||||
label: 'Informationen',
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -765,32 +894,52 @@ export const useDataStore = defineStore('data', () => {
|
||||
productcategories: {
|
||||
label: "Artikelkategorien",
|
||||
labelSingle: "Artikelkategorie",
|
||||
isStandardEntity: true,
|
||||
redirect: true,
|
||||
supabaseSelectWithInformation: "*",
|
||||
filters: [],
|
||||
templateColumns: [
|
||||
{
|
||||
key: "name",
|
||||
label: "Name",
|
||||
title: true,
|
||||
inputType: "text"
|
||||
},
|
||||
{
|
||||
key: "description",
|
||||
label: "Beschreibung",
|
||||
inputType: "textarea"
|
||||
}
|
||||
],
|
||||
showTabs: [
|
||||
{
|
||||
label: 'Informationen',
|
||||
}
|
||||
]
|
||||
},
|
||||
servicecategories: {
|
||||
label: "Leistungskategorie",
|
||||
labelSingle: "Leistungskategorien",
|
||||
label: "Leistungskategorien",
|
||||
labelSingle: "Leistungskategorie",
|
||||
isStandardEntity: true,
|
||||
redirect: true,
|
||||
supabaseSelectWithInformation: "*",
|
||||
filters: [],
|
||||
templateColumns: [
|
||||
{
|
||||
key: "name",
|
||||
label: "Name",
|
||||
title: true,
|
||||
inputType: "text"
|
||||
},
|
||||
{
|
||||
key: "description",
|
||||
label: "Beschreibung",
|
||||
inputType: "textarea"
|
||||
}
|
||||
],
|
||||
showTabs: [
|
||||
{
|
||||
label: 'Informationen',
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -1273,7 +1422,7 @@ export const useDataStore = defineStore('data', () => {
|
||||
} else {
|
||||
let historyItem = {
|
||||
text: `${dataTypes[dataType].labelSingle} erstellt`,
|
||||
createdBy: activeProfile.value.id,
|
||||
createdBy: profileStore.activeProfile.id,
|
||||
tenant: profileStore.currentTenant
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user