import {defineStore} from 'pinia' import dayjs from "dayjs" //import {typeOf} from "uri-js/dist/esnext/util"; import projecttype from "~/components/columnRenderings/projecttype.vue" import customer from "~/components/columnRenderings/customer.vue" import contact from "~/components/columnRenderings/contact.vue" import plant from "~/components/columnRenderings/plant.vue" import vendor from "~/components/columnRenderings/vendor.vue" import active from "~/components/columnRenderings/active.vue" import sellingPrice from "~/components/columnRenderings/sellingPrice.vue"; import unit from "~/components/columnRenderings/unit.vue"; import isCompany from "~/components/columnRenderings/isCompany.vue" 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"; import vehicle from "~/components/columnRenderings/vehicle.vue" import usePlanning from "~/components/columnRenderings/usePlanning.vue" import sellingPriceComposedMaterial from "~/components/columnRenderings/sellingPriceComposedMaterial.vue" import sellingPriceComposedWorker from "~/components/columnRenderings/sellingPriceComposedWorker.vue" import sellingPriceComposedTotal from "~/components/columnRenderings/sellingPriceComposedTotal.vue" import startDate from "~/components/columnRenderings/startDate.vue" import endDate from "~/components/columnRenderings/endDate.vue" import startDateTime from "~/components/columnRenderings/startDateTime.vue" import endDateTime from "~/components/columnRenderings/endDateTime.vue" import serviceCategories from "~/components/columnRenderings/serviceCategories.vue" import phase from "~/components/columnRenderings/phase.vue" import vehiclesWithLoad from "~/components/columnRenderings/vehiclesWithLoad.vue" import inventoryitemsWithLoad from "~/components/columnRenderings/inventoryitemsWithLoad.vue" import inventoryitemgroupsWithLoad from "~/components/columnRenderings/inventoryitemgroupsWithLoad.vue" import space from "~/components/columnRenderings/space.vue" import driver from "~/components/columnRenderings/driver.vue" import quantity from "~/components/helpRenderings/quantity.vue" import {useFunctions} from "~/composables/useFunctions.js"; import signDate from "~/components/columnRenderings/signDate.vue"; import sepaDate from "~/components/columnRenderings/sepaDate.vue"; // @ts-ignore export const useDataStore = defineStore('data', () => { const dataTypes = { tasks: { isArchivable: true, label: "Aufgaben", labelSingle: "Aufgabe", isStandardEntity: true, redirect: true, historyItemHolder: "task", selectWithInformation: "*, plant(*), project(*), customer(*)", filters: [ { name: "Nur Offene Aufgaben", default: true, "filterFunction": function (row) { if(row.categorie !== "Erledigt") { return true } else { return false } } },{ name: "Archivierte ausblenden", default: true, "filterFunction": function (row) { if(!row.archived) { return true } else { return false } } } ], templateColumns: [ { key: "created_at", label: "Erstellt am", component: created_at, inputColumn: "Allgemeines", sortable: true },{ key: "name", label: "Name", title: true, required: true, inputType: "text", inputColumn: "Allgemeines", sortable: true },{ key: "categorie", label: "Kategorie", required: true, inputType: "select", selectValueAttribute: "label", selectManualOptions: [ {label:"Offen"}, {label:"In Bearbeitung"}, {label:"Abgeschlossen"} ], inputColumn: "Allgemeines", sortable: true },{ key: "profile", label: "Mitarbeiter", component: profile, inputType: "select", selectDataType: "profiles", selectOptionAttribute: "fullName", selectSearchAttributes: ['fullName'], inputColumn: "Zuweisungen" },{ key: "project", label: "Projekt", component: project, inputType: "select", selectDataType: "projects", selectOptionAttribute: "name", selectSearchAttributes: ['name'], inputColumn: "Zuweisungen" },{ key: "customer", label: "Kunde", component: customer, inputType: "select", selectDataType: "customers", selectOptionAttribute: "name", selectSearchAttributes: ['name'], inputColumn: "Zuweisungen" },{ key: "plant", label: "Objekt", component: plant, inputType: "select", selectDataType: "plants", selectOptionAttribute: "name", selectSearchAttributes: ['name'], inputColumn: "Zuweisungen" },{ key: "description", label: "Beschreibung", inputColumn: "Allgemeines" }, ], inputColumns: [ "Allgemeines", "Zuweisungen" ], showTabs: [{label: 'Informationen'},{label: 'Wiki'}] }, customers: { isArchivable: true, label: "Kunden", labelSingle: "Kunde", isStandardEntity: true, redirect:true, numberRangeHolder: "customerNumber", historyItemHolder: "customer", sortColumn: "customerNumber", selectWithInformation: "*, projects(*), plants(*), contracts(*), contacts(*), createddocuments(*, statementallocations(*)), files(*), events(*)", filters: [{ name: "Archivierte ausblenden", default: true, "filterFunction": function (row) { if(!row.archived) { return true } else { return false } } }], inputColumns: [ "Allgemeines", "Kontaktdaten" ], templateColumns: [ { key: 'customerNumber', label: "Kundennummer", inputIsNumberRange: true, inputType: "text", inputColumn: "Allgemeines", sortable: true }, { key: "isCompany", label: "Firmenkunde", component: isCompany, inputType: "bool", inputColumn: "Allgemeines" }, { key: "name", label: "Firmenname", required: true, title: true, inputType: "text", disabledFunction: function (item) { return !item.isCompany }, showFunction: function (item) { return item.isCompany }, inputColumn: "Allgemeines", sortable: true, maxLength: 20, distinct: true, }, { key: "nameAddition", label: "Firmenname Zusatz", inputType: "text", disabledFunction: function (item) { return !item.isCompany }, showFunction: function (item) { return item.isCompany }, inputColumn: "Allgemeines", maxLength: 20, distinct: true, },{ key: "salutation", label: "Anrede", inputType: "text", inputChangeFunction: function (row) { row.name = `${row.salutation ? (row.salutation + " ") : ""}${row.title ? (row.title + " ") : ""}${row.firstname ? (row.firstname + " ") : ""}${row.lastname}`; }, disabledFunction: function (item) { return item.isCompany }, showFunction: function (item) { return !item.isCompany }, inputColumn: "Allgemeines", sortable: true, distinct: true },{ key: "title", label: "Titel", inputType: "text", inputChangeFunction: function (row) { row.name = `${row.salutation ? (row.salutation + " ") : ""}${row.title ? (row.title + " ") : ""}${row.firstname ? (row.firstname + " ") : ""}${row.lastname}`; }, disabledFunction: function (item) { return item.isCompany }, showFunction: function (item) { return !item.isCompany }, inputColumn: "Allgemeines" },{ key: "firstname", label: "Vorname",//TODO: Add Conditional Rendering to Datatypes title: true, inputType: "text", inputChangeFunction: function (row) { row.name = `${row.salutation ? (row.salutation + " ") : ""}${row.title ? (row.title + " ") : ""}${row.firstname ? (row.firstname + " ") : ""}${row.lastname}`; }, disabledFunction: function (item) { return item.isCompany }, showFunction: function (item) { return !item.isCompany }, inputColumn: "Allgemeines" },{ key: "lastname", label: "Nachname", title: true, inputType: "text", inputChangeFunction: function (row) { row.name = `${row.salutation ? (row.salutation + " ") : ""}${row.title ? (row.title + " ") : ""}${row.firstname ? (row.firstname + " ") : ""}${row.lastname}`; }, disabledFunction: function (item) { return item.isCompany }, showFunction: function (item) { return !item.isCompany }, inputColumn: "Allgemeines" },{ key: "active", label: "Aktiv", component: active, inputType: "bool", inputColumn: "Allgemeines", sortable: true, distinct: true }, { key: "customPaymentDays", label: "Zahlungsziel in Tagen", inputType: "number", inputColumn: "Allgemeines", sortable: true },{ key: "custom_payment_type", label: "Zahlungsart", inputType: "select", selectValueAttribute:"key", selectOptionAttribute: "label", selectManualOptions: [ {label:'Überweisung', key: 'transfer'}, {label:'SEPA Lastschrift', key: 'direct-debit'}, ], inputColumn: "Allgemeines", sortable: true }, { key: "customSurchargePercentage", label: "Individueller Aufschlag", inputType: "number", inputColumn: "Allgemeines", sortable: true }, { key: "infoData.street", label: "Straße + Hausnummer", inputType: "text", disabledInTable: true, inputColumn: "Kontaktdaten" }, { key: "infoData.special", label: "Adresszusatz", inputType: "text", disabledInTable: true, inputColumn: "Kontaktdaten" }, { key: "infoData.zip", label: "Postleitzahl", inputType: "text", inputChangeFunction: async function (row) { const zip = String(row.infoData.zip || "").replace(/\D/g, "") row.infoData.zip = zip if ([4, 5].includes(zip.length)) { const zipData = await useFunctions().useZipCheck(zip) row.infoData.zip = zipData?.zip || row.infoData.zip row.infoData.city = zipData?.short || row.infoData.city } }, disabledInTable: true, inputColumn: "Kontaktdaten", sortable: true }, { key: "infoData.city", label: "Stadt", inputType: "text", disabledInTable: true, inputColumn: "Kontaktdaten", sortable: true }, { key: "infoData.country", label: "Land", inputType: "select", selectDataType: "countrys", selectOptionAttribute: "name", selectValueAttribute: "name", disabledInTable: true, inputColumn: "Kontaktdaten", sortable: true }, { key: "address", label: "Adresse", component: address, inputColumn: "Kontaktdaten" }, { key: "infoData.tel", label: "Telefon", inputType: "text", inputColumn: "Kontaktdaten" }, { key: "infoData.email", label: "E-Mail", inputType: "text", inputColumn: "Kontaktdaten" }, { key: "infoData.invoiceEmail", label: "E-Mail für Rechnungen", inputType: "text", inputColumn: "Kontaktdaten" }, { key: "infoData.web", label: "Web", inputType: "text", inputColumn: "Kontaktdaten" }, { key: "infoData.ustid", label: "USt-Id", inputType: "text", inputColumn: "Kontaktdaten" }, { key: "notes", label: "Notizen", inputType: "textarea", inputColumn: "Allgemeines" }, /*{ key: "profiles", label: "Berechtigte Benutzer", inputType: "select", selectDataType: "profiles", selectOptionAttribute: "fullName", selectSearchAttributes: ['fullName'], selectMultiple: true,/!* component: profiles,*!/ inputColumn: "Allgemeines" },*/ ], showTabs: [{label: 'Informationen'},{label: 'Ansprechpartner'},{label: 'Dateien'},{label: 'Ausgangsbelege'},{label: 'Projekte'},{label: 'Objekte'},{label: 'Termine'},{label: 'Verträge'},{label: 'Wiki'}] }, contacts: { isArchivable: true, label: "Kontakte", labelSingle: "Kontakt", isStandardEntity: true, redirect:true, historyItemHolder: "contact", selectWithInformation: "*, customer(*), vendor(*)", filters: [{ name: "Archivierte ausblenden", default: true, "filterFunction": function (row) { if(!row.archived) { return true } else { return false } } }], templateColumns: [ { key: "fullName", label: "Name", title: true, sortable: true },{ key: "salutation", label: "Anrede", inputType: "text", inputChangeFunction: function (row) { row.fullName = `${row.firstName} ${row.lastName}` }, sortable: true },{ key: "title", label: "Titel", inputType: "text", inputChangeFunction: function (row) { row.fullName = `${row.firstName} ${row.lastName}` } },{ key: "firstName", label: "Vorname", inputType: "text", inputChangeFunction: function (row) { row.fullName = `${row.firstName} ${row.lastName}` } },{ key: "lastName", label: "Nachname", required: true, inputType: "text", inputChangeFunction: function (row) { row.fullName = `${row.firstName} ${row.lastName}` } }, { key: "active", label: "Aktiv", component: active, inputType: "bool", sortable: true }, { key: "customer", label: "Kunde", component: customer, inputType: "select", selectDataType: "customers", selectOptionAttribute: "name", selectSearchAttributes: ['name'], secondInfo: true, secondInfoKey: "name" }, { key: "vendor", label: "Lieferant", component: vendor, inputType: "select", selectDataType: "vendors", selectOptionAttribute: "name", selectSearchAttributes: ['name'], secondInfo: true, secondInfoKey: "name" }, { key: "role", label: "Rolle", inputType: "text" }, { key: "email", label: "E-Mail", inputType: "text", }, { key: "phoneMobile", label: "Mobil", inputType: "text", }, { key: "phoneHome", label: "Festnetz", inputType: "text", }, { key: "birthday", label: "Geburtstag", inputType: "date", sortable: true }, { key: "notes", label: "Notizen", inputType: "textarea", }, ], showTabs:[ { label: 'Informationen', },{ label: 'Wiki', } ] }, contracts: { isArchivable: true, label: "Verträge", labelSingle: "Vertrag", isStandardEntity: true, numberRangeHolder: "contractNumber", redirect:true, filters:[{ name: "Archivierte ausblenden", default: true, "filterFunction": function (row) { if(!row.archived) { return true } else { return false } } }], inputColumns: [ "Allgemeines", "Abrechnung" ], selectWithInformation: "*, customer(*), files(*)", templateColumns: [ { key: 'contractNumber', label: "Vertragsnummer", inputIsNumberRange: true, inputType: "text", inputColumn: "Allgemeines", sortable: true }, { key: "name", required: true, label: "Name", title: true, inputType: "text", inputColumn: "Allgemeines", sortable: true },{ key: "active", label: "Aktiv", component: active, inputType: "bool", inputColumn: "Allgemeines", sortable: true },{ key: "recurring", label: "Wiederkehrend", component: recurring, inputType: "bool", inputColumn: "Allgemeines", sortable: true },{ key: 'customer', label: "Kunde", required: true, component: customer, inputType: "select", selectDataType: "customers", selectOptionAttribute: "name", selectSearchAttributes: ['name'], inputColumn: "Allgemeines" },{ key: 'contact', label: "Ansprechpartner", component: contact, inputType: "select", selectDataType: "contacts", selectDataTypeFilter: function (i,item) { return i.customer === item.customer }, selectOptionAttribute: "fullName", selectSearchAttributes: ['fullName'], inputColumn: "Allgemeines" },{ key: 'duration', label: "mindest Vertragslaufzeit", inputType: "select", selectValueAttribute:"label", selectManualOptions: [ {label:'12 Monate'}, {label:'24 Monate'}, {label:'36 Monate'}, {label:'48 Monate'}, ], inputColumn: "Allgemeines", sortable: true },{ key: 'invoiceDispatch', label: "Rechnungsversand", inputType: "select", selectValueAttribute: "label", selectManualOptions: [ {label:'E-Mail'}, {label:'Post'} ], inputColumn: "Abrechnung", sortable: true },{ key: 'paymentType', label: "Zahlungsart", inputType: "select", selectValueAttribute: "label", selectManualOptions: [ {label:'Einzug'}, {label:'Überweisung'} ], inputColumn: "Abrechnung" },{ key: 'startDate', label: "Vertragsstart", inputType: "date", inputColumn: "Allgemeines", component: startDate, sortable: true },{ key: 'endDate', label: "Vertragsende", inputType: "date", inputColumn: "Allgemeines", component: endDate, sortable: true },{ key: 'signDate', label: "Unterschrieben am", inputType: "date", inputColumn: "Allgemeines", component: signDate, sortable: true },{ key: 'sepaDate', label: "SEPA Datum", inputType: "date", inputColumn: "Abrechnung", component: sepaDate },{ key: 'sepaRef', label: "Mandatsreferenz", inputType: "text", inputColumn: "Abrechnung" },{ key: 'bankingIban', label: "IBAN", inputType: "text", inputColumn: "Abrechnung" },{ key: 'bankingOwner', label: "Inhaber", inputType: "text", inputColumn: "Abrechnung" },{ key: 'bankingName', label: "Bank", inputType: "text", inputColumn: "Abrechnung" },{ key: 'bankingBIC', label: "BIC", inputType: "text", inputColumn: "Abrechnung" },{ key: "notes", label: "Notizen", inputType: "textarea", } ], showTabs: [{label: 'Informationen'},{label: 'Dateien'},{label: 'Wiki'}] }, absencerequests: { isArchivable: true, label: "Abwesenheiten", labelSingle: "Abwesenheit", isStandardEntity: true, sortColumn:"startDate", sortAscending: false, selectWithInformation: "*", historyItemHolder: "absencerequest", redirect:true, filters:[{ name: "Archivierte ausblenden", default: true, "filterFunction": function (row) { if(!row.archived) { return true } else { return false } } }], templateColumns:[ { key: "approved", label: "Genehmigt", inputType: "select", selectValueAttribute: "label", selectManualOptions: [ {label:"Offen"}, {label:"Genehmigt"}, {label:"Abgelehnt"} ] },{ key: "name", label: "Name", required: true, inputType: "text", title: true }, { key: "profile", label: "Mitarbeiter", required: true, inputType: "select", selectDataType: "profiles", selectOptionAttribute: "fullName", selectSearchAttributes: ['fullName'], component: profile },{ key: "reason", label: "Grund", inputType: "select", required: true, selectValueAttribute: "label", selectManualOptions: [ {label:"Urlaub"}, {label:"Berufsschule"}, {label:"Schlechtwetter"}, {label:"Saison Kurzarbeitergeld"}, {label:"unbezahlter Urlaub"}, {label:"Überstundenausgleich"}, {label:"Sonderurlaub(bezahlt)"}, {label:"Schulung"}, {label:"Mutterschutz"}, {label:"Krankheit ab 2. Tag (mit Attest)"}, {label:"Krankheit 1 Tag (mit Attest)"}, {label:"Krankheit"}, {label:"Kind krank - Kinderbetreuung"}, {label:"Elternzeit"}, ] },{ key: "startDate", required: true, label: "Start", inputType: "date", component: startDate, sortable: true },{ key: "endDate", required: true, label: "Ende", inputType: "date", component: endDate, sortable: true },{ key: "note", label: "Notizen", inputType: "textarea" } ], showTabs: [{label: 'Informationen'}] }, plants: { isArchivable: true, label: "Objekte", labelSingle: "Objekt", isStandardEntity: true, redirect:true, historyItemHolder: "plant", sortColumn:"name", selectWithInformation: "*, customer(id,name)", filters: [{ name: "Archivierte ausblenden", default: true, "filterFunction": function (row) { if(!row.archived) { return true } else { return false } } }], templateColumns: [ { key: "name", label: "Name", required: true, inputType: "text", title: true, sortable: true }, { key: "customer", label: "Kunde", component: customer, inputType: "select", selectDataType: "customers", selectOptionAttribute: "name", selectSearchAttributes: ['name'], },{ key: "description", label: "Beschreibung", inputType:"editor", component: description }, ], showTabs: [ { label: "Informationen" },{ label: "Projekte" },{ label: "Aufgaben" },{ label: "Dateien" },{ label: "Wiki" }] }, products: { isArchivable: true, label: "Artikel", labelSingle: "Artikel", isStandardEntity: true, redirect:true, selectWithInformation: "*, unit(name)", historyItemHolder: "product", filters: [{ name: "Archivierte ausblenden", default: true, "filterFunction": function (row) { if(!row.archived) { return true } else { return false } } }], templateColumns: [ { key: "name", label:"Name", required: true, title: true, inputType: "text" }, { key: "manufacturer", label: "Hersteller", inputType: "text" }, { key: "unit", label: "Einheit", required: true, component: unit, inputType: "select", selectDataType: "units", selectOptionAttribute: "name", selectSearchAttributes: ['name'], }, { key: "purchase_price", label: "Einkaufspreis", component: purchasePrice, inputType: "number", inputTrailing: "EUR", inputChangeFunction: function (row) { console.log(row) if(row.markup_percentage) { row.selling_price = (row.purchase_price * (1+row.markup_percentage/100)).toFixed(4) } else { row.selling_price = Number(row.purchase_price.toFixed(4)) } } },{ key: "markup_percentage", label: "Aufschlag", inputType: "number", inputTrailing: "%", inputChangeFunction: function (row) { console.log(row) if(row.purchase_price && ! row.selling_price) { row.selling_price = (row.purchase_price * (1+row.markup_percentage/100)).toFixed(4) } else if(row.selling_price && !row.purchase_price) { row.purchase_price = (row.selling_price / (1+row.markup_percentage/100)).toFixed(4) } else { row.selling_price = (row.purchase_price * (1+row.markup_percentage/100)).toFixed(4) } } },{ key: "selling_price", label: "Verkaufpreispreis", required: true, component: sellingPrice, inputType: "number", inputTrailing: "EUR", inputChangeFunction: function (row) { console.log(row) if(row.purchase_price ) { row.markup_percentage = ((row.selling_price / row.purchase_price - 1) * 100 ).toFixed(2) } else{ row.purchase_price = (row.selling_price / (1+row.markup_percentage/100)).toFixed(4) } } },{ key: "tax_percentage", label: "Umsatzsteuer", inputType: "select", selectOptionAttribute: "label", selectValueAttribute: 'key', required: true, selectManualOptions: [ {label: "19 %", key: 19}, {label: "7 %", key: 7}, {label: "0 %", key: 0}] }, /*{ key: "tags", label: "Tags" },*/ { key: "productcategories", label: "Artikelkategorien", inputType: "select", selectDataType: "productcategories", selectOptionAttribute: "name", selectSearchAttributes: ['name'], selectMultiple: true }, { key: "description", label: "Beschreibung", inputType:"textarea" }, ], showTabs: [ { label: "Informationen", },{ label: "Wiki", } ] }, projects: { isArchivable: true, label: "Projekte", labelSingle: "Projekt", isStandardEntity: true, redirect:true, historyItemHolder: "project", numberRangeHolder: "projectNumber", selectWithInformation: "*, customer(id,name), plant(id,name), projecttype(name, id), tasks(*, project(id,name), customer(id,name), plant(id,name)), files(*), createddocuments(*, statementallocations(*)), events(*), times(*, profile(id, fullName))", sortColumn: "projectNumber", filters: [ { name: "Nur Offene Projekte", default: true, "filterFunction": function (row) { if(row.phases && row.phases.length > 0) { return row.phases.find(i => i.active).label !== "Abgeschlossen" //return phase.label !== "Abgeschlossen"; } else { return true } } }, { name: "Archivierte ausblenden", default: true, "filterFunction": function (row) { if(!row.archived) { return true } else { return false } } } ], templateColumns: [ { key: "projectNumber", label: "Projektnummer", sortable: true }, { key: "projecttype", label: "Typ", required: true, component: projecttype, inputType: "select", selectDataType: "projecttypes", selectOptionAttribute: "name", selectSearchAttributes: ['name'], inputChangeFunction: function (item,loadedOptions = {}) { item.phases = loadedOptions.projecttypes.find(i => i.id === item.projecttype).initialPhases }, sortable: true },{ key: "active_phase", label: "Phase", distinct:true },{ key: "name", label: "Name", required: true, title: true, inputType: "text", sortable: true }, { key: "customer", label: "Kunde", component: customer, required: true, inputType: "select", selectDataType: "customers", selectOptionAttribute: "name", selectSearchAttributes: ['name'], secondInfo: true, secondInfoKey: "name", },{ key: "plant", label: "Objekt", component: plant, inputType: "select", selectDataType: "plants", selectOptionAttribute: "name", selectSearchAttributes: ['name'], },{ key: "customerRef", label: "Referenz des Kunden", inputType: "text" },{ key: "notes", label: "Notizen", inputType: "textarea" }, /*{ key: "profiles", label: "Berechtigte Benutzer", inputType: "select", selectDataType: "profiles", selectOptionAttribute: "fullName", selectSearchAttributes: ['fullName'], selectMultiple: true,/!* component: profiles,*!/ inputColumn: "Allgemeines" },*/], showTabs: [ { key: "information", label: "Informationen" }, { key: "phases", label: "Phasen" },{ key: "tasks", label: "Aufgaben" },{ key: "files", label: "Dateien" },{ label: "Zeiten" },{ label: "Ausgangsbelege" },{ label: "Termine" },{ label: "Wiki" }/*,{ key: "timetracking", label: "Zeiterfassung" },{ key: "events", label: "Termine" },{ key: "material", label: "Material" }*/] }, vehicles: { isArchivable: true, label: "Fahrzeuge", labelSingle: "Fahrzeug", isStandardEntity: true, redirect:true, historyItemHolder: "vehicle", sortColumn:"licensePlate", selectWithInformation: "*, checks(*), files(*)", filters:[{ name: "Archivierte ausblenden", default: true, "filterFunction": function (row) { if(!row.archived) { return true } else { return false } } }], templateColumns:[ { key: 'active', label: "Aktiv", component: active, inputType: "bool", sortable: true },{ key: 'license_plate', label: "Kennzeichen", required: true, inputType: "text", title: true, sortable: true },{ key: 'vin', label: "Identifikationnummer", inputType: "text" }, { key: "type", label: "Typ", inputType: "text" }, /*{ key: "driver", label: "Fahrer", inputType: "select", selectDataType: "auth_users", selectOptionAttribute: "fullName", component: driver },*/ { key: "tank_size", label: "Tankvolumen", unit: "L", inputType: "number" }, { key: "build_year", label: "Baujahr", inputType: "number" }, { key: "towing_capacity", label: "Anhängelast", unit: "Kg", inputType: "number", sortable: true }, { key: "color", label: "Farbe", inputType: "text" }, { key: "power_in_kw", label: "Leistung", unit: "kW", inputType: "number", sortable: true }, /*{ key: "profiles", label: "Berechtigte Benutzer", inputType: "select", selectDataType: "profiles", selectOptionAttribute: "fullName", selectSearchAttributes: ['fullName'], selectMultiple: true,/!* component: profiles,*!/ inputColumn: "Allgemeines" },*/ ], showTabs: [ { label: 'Informationen', }, { label: 'Dateien', }, { label: 'Überprüfungen', }, { label: 'Wiki', } ] }, vendors: { isArchivable: true, label: "Lieferanten", labelSingle: "Lieferant", isStandardEntity: true, redirect:true, numberRangeHolder: "vendorNumber", historyItemHolder: "vendor", sortColumn: "vendorNumber", selectWithInformation: "*, contacts(*)", filters: [{ name: "SEPA nicht erteilt", "filterFunction": function (row) { return !row.hasSEPA }, },{ name: "Archivierte ausblenden", default: true, "filterFunction": function (row) { if(!row.archived) { return true } else { return false } } }], templateColumns: [ { key: 'vendorNumber', label: "Lieferantennummer", inputType: "text", inputIsNumberRange: true, sortable: true }, { key: "name", required: true, label: "Name", title: true, inputType: "text", sortable: true }, { key: "infoData.streetNumber", label: "Straße + Hausnummer", inputType: "text", disabledInTable: true }, { key: "infoData.special", label: "Adresszusatz", inputType: "text", disabledInTable: true }, { key: "infoData.zip", label: "Postleitzahl", inputType: "text", disabledInTable: true, inputChangeFunction: async function (row) { const zip = String(row.infoData.zip || "").replace(/\D/g, "") row.infoData.zip = zip if ([4, 5].includes(zip.length)) { const zipData = await useFunctions().useZipCheck(zip) row.infoData.zip = zipData?.zip || row.infoData.zip row.infoData.city = zipData?.short || row.infoData.city } }, }, { key: "infoData.city", label: "Stadt", inputType: "text", disabledInTable: true }, { key: "infoData.country", label: "Land", inputType: "select", selectDataType: "countrys", selectOptionAttribute: "name", selectValueAttribute: "name", disabledInTable: true }, { key: "address", label: "Adresse", component: address }, { key: "infoData.tel", label: "Telefon", inputType: "text" }, { key: "infoData.email", label: "E-Mail", inputType: "text" }, { key: "infoData.web", label: "Web", inputType: "text" }, { key: "infoData.ustid", label: "USt-Id", inputType: "text" }, { key: "hasSEPA", label: "SEPA Mandat erteilt", inputType: "bool", component: sepa }, { key: "defaultPaymentMethod", label: "Standard Zahlungsmethode", inputType: "select", selectValueAttribute: "label", selectManualOptions: [ {label:"Einzug"}, {label:"Überweisung"}, {label:"Kreditkarte"}, ], }, { key: "notes", label: "Notizen", inputType: "textarea" }, /*{ key: "profiles", label: "Berechtigte Benutzer", inputType: "select", selectDataType: "profiles", selectOptionAttribute: "fullName", selectSearchAttributes: ['fullName'], selectMultiple: true,/!* component: profiles,*!/ inputColumn: "Allgemeines" },*/ ], showTabs: [ { label: 'Informationen', },{ label: 'Ansprechpartner', }, { label: 'Dateien', }, { label: 'Wiki', } ] }, messages: { label: "Nachrichten", labelSingle: "Nachricht" }, spaces: { isArchivable: true, label: "Lagerplätze", labelSingle: "Lagerplatz", isStandardEntity: true, selectWithInformation: "*, files(*)", sortColumn: "spaceNumber", redirect: true, numberRangeHolder: "spaceNumber", historyItemHolder: "space", filters:[{ name: "Archivierte ausblenden", default: true, "filterFunction": function (row) { if(!row.archived) { return true } else { return false } } }], inputColumns: [ "Allgemeines", "Ort" ], templateColumns: [ { key: "name", label: "Name", inputType: "text", required: true, title: true, inputColumn: "Allgemeines", sortable: true }, { key: 'space_number', label: "Lagerplatznr.", inputType: "text", inputIsNumberRange: true, inputColumn: "Allgemeines", sortable: true }, { key: "type", label: "Typ", inputType: "select", required: true, selectValueAttribute: "label", selectManualOptions: [ {label:"Standort"}, {label:"Regalplatz"}, {label:"Kiste"}, {label:"Palettenplatz"}, {label:"Sonstiges"} ], inputColumn: "Allgemeines", sortable: true }, { key: "parent_space", label: "Übergeordneter Lagerplatz", inputType: "select", selectDataType: "spaces", selectOptionAttribute: "spaceNumber", selectValueAttribute: "id", inputColumn: "Allgemeines" }, { key: "info_data.streetNumber", label: "Straße + Hausnummer", inputType: "text", disabledInTable: true, inputColumn: "Ort" }, { key: "info_data.special", label: "Adresszusatz", inputType: "text", disabledInTable: true, inputColumn: "Ort" }, { key: "info_data.zip", label: "Postleitzahl", inputType: "text", disabledInTable: true, inputColumn: "Ort", inputChangeFunction: async function (row) { const zip = String(row.info_data.zip || "").replace(/\D/g, "") row.info_data.zip = zip if ([4, 5].includes(zip.length)) { const zipData = await useFunctions().useZipCheck(zip) row.info_data.zip = zipData?.zip || row.info_data.zip row.info_data.city = zipData?.short || row.info_data.city } }, }, { key: "info_data.city", label: "Stadt", inputType: "text", disabledInTable: true, inputColumn: "Ort" }, { key: "info_data.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: 'Dateien', },{label: 'Inventarartikel'},{label: 'Wiki'} ] }, users: { label: "Benutzer", labelSingle: "Benutzer" }, createddocuments: { isArchivable: true, label: "Dokumente", labelSingle: "Dokument", selectWithInformation: "*, files(*), statementallocations(*)", filters: [ { name: "Archivierte ausblenden", default: true, "filterFunction": function (row) { if(!row.archived) { return true } else { return false } } } ], templateColumns: [ { key: "customer", distinct: true } ] }, tickets: { isArchivable: true, label: "Tickets", labelSingle: "Ticket", }, ticketmessages: { isArchivable: true, label: "Nachrichten", labelSingle: "Nachricht", }, files: { isArchivable: true, label: "Dateien", labelSingle: "Datei", selectWithInformation: "*", }, folders: { isArchivable: true, label: "Ordner", labelSingle: "Ordner", selectWithInformation: "*", }, incominginvoices: { label: "Eingangsrechnungen", labelSingle: "Eingangsrechnung", redirect:true, filters: [ { name: "Archivierte ausblenden", default: true, "filterFunction": function (row) { if(!row.archived) { return true } else { return false } } } ], templateColumns: [ { key: 'reference', label: "Referenz:", sortable: true, }, { key: 'state', label: "Status:" }, { key: "date", label: "Datum", sortable: true, }, { key: "vendor", label: "Lieferant", }, { key: "amount", label: "Betrag", }, { key: "dueDate", label: "Fälligkeitsdatum", sortable: true, }, { key: "paid", label: "Bezahlt" }, { key: "paymentType", label: "Zahlart", sortable: true, }, { key: "description", label: "Beschreibung" } ] }, inventoryitems: { isArchivable: true, label: "Inventarartikel", labelSingle: "Inventarartikel", isStandardEntity: true, selectWithInformation: "*, files(*), vendor(id,name), currentSpace(id,name)", redirect: true, numberRangeHolder: "articleNumber", historyItemHolder: "inventoryitem", inputColumns: [ "Allgemeines", "Anschaffung" ], filters:[{ name: "Archivierte ausblenden", default: true, "filterFunction": function (row) { if(!row.archived) { return true } else { return false } } }], templateColumns: [ { key: "name", label: "Name", title: true, required: true, inputType: "text", inputColumn: "Allgemeines", sortable: true }, { key: "usePlanning", label: "In Plantafel anzeigen", inputType: "bool", inputColumn: "Allgemeines", component: usePlanning, sortable: true }, { key: "description", label: "Beschreibung", inputType: "textarea", sortable: true }, { key: "currentSpace", label: "Aktueller Lagerplatz", inputType: "select", selectDataType: "spaces", selectOptionAttribute: "name", selectSearchAttributes: ['name'], inputColumn: "Allgemeines", component: space }, { key: "articleNumber", label: "Artikelnummer", inputType: "text", inputIsNumberRange: true, inputColumn: "Allgemeines", sortable: true }, { key: "serialNumber", label: "Seriennummer", inputType: "text", inputColumn: "Allgemeines" }, { key: "purchaseDate", label: "Kaufdatum", inputType: "date", inputColumn: "Anschaffung", sortable: true }, { key: "vendor", label: "Lieferant", inputType: "select", selectDataType: "vendors", selectOptionAttribute: "name", selectSearchAttributes: ['name'], inputColumn: "Anschaffung", component: vendor }, { key: "quantity", label: "Menge", inputType: "number", inputColumn: "Allgemeines", disabledFunction: function (item) { return item.serialNumber }, helpComponent: quantity, sortable: true }, { key: "purchase_price", label: "Kaufpreis", inputType: "number", inputStepSize: "0.01", inputColumn: "Anschaffung", sortable: true }, { key: "manufacturer", 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,*!/ inputColumn: "Allgemeines" },*/ { key: "currentValue", label: "Aktueller Wert", inputType: "number", inputStepSize: "0.01", inputColumn: "Anschaffung", sortable: true }, ], showTabs: [ { label: 'Informationen', }, { label: 'Dateien', }, { label: 'Wiki', } ] }, inventoryitemgroups: { isArchivable: true, label: "Inventarartikelgruppen", labelSingle: "Inventarartikelgruppe", isStandardEntity: true, historyItemHolder: "inventoryitemgroup", selectWithInformation: "*", redirect: true, filters:[{ name: "Archivierte ausblenden", default: true, "filterFunction": function (row) { if(!row.archived) { return true } else { return false } } }], templateColumns: [ { key: "name", label: "Name", title: true, required: true, inputType: "text", sortable: true }, { key: "description", label: "Beschreibung", inputType: "textarea" }, { key: "usePlanning", label: "In Plantafel anzeigen", inputType: "bool", component: usePlanning },{ key: "inventoryitems", label: "Inventarartikel", inputType: "select", selectDataType: "inventoryitems", selectOptionAttribute: "name", selectSearchAttributes: ['name'], selectMultiple: true, required: true, component: inventoryitemsWithLoad },/*{ key: "profiles", label: "Berechtigte Benutzer", inputType: "select", selectDataType: "profiles", selectOptionAttribute: "fullName", selectSearchAttributes: ['fullName'], selectMultiple: true,/!* component: profiles,*!/ inputColumn: "Allgemeines" },*/ ], showTabs: [ { label: 'Informationen', },{ label: 'Wiki', } ] }, documentboxes: { isArchivable: true, label: "Dokumentenboxen", labelSingle: "Dokumentenbox", isStandardEntity: true, selectWithInformation: "*, space(*), files(*)", redirect: true, numberRangeHolder: "key", historyItemHolder: "documentbox", inputColumns: [ "Allgemeines", ], filters:[{ name: "Archivierte ausblenden", default: true, "filterFunction": function (row) { if(!row.archived) { return true } else { return false } } }], templateColumns: [ { key: "space", label: "Aktueller Lagerplatz", inputType: "select", selectDataType: "spaces", selectOptionAttribute: "name", selectSearchAttributes: ['name'], inputColumn: "Allgemeines", component: space }, { key: "key", label: "Nummer", inputType: "text", inputIsNumberRange: true, inputColumn: "Allgemeines", title: true, required: true, }, /*{ key: "profiles", label: "Berechtigte Benutzer", inputType: "select", selectDataType: "profiles", selectOptionAttribute: "fullName", selectSearchAttributes: ['fullName'], selectMultiple: true,/!* component: profiles,*!/ inputColumn: "Allgemeines" },*/ ], showTabs: [ { label: 'Informationen', }, { label: 'Dateien', } ] }, services: { isArchivable: true, label: "Leistungen", labelSingle: "Leistung", isStandardEntity: true, redirect: true, selectWithInformation: "*, unit(*)", historyItemHolder: "service", filters: [{ name: "Archivierte ausblenden", default: true, "filterFunction": function (row) { if(!row.archived) { return true } else { return false } } }], templateColumns: [ { key: "name", label: "Name", required: true, title: true, inputType: "text", sortable: true }, { key: "unit", label: "Einheit", component: unit, inputType: "select", selectDataType: "units", selectOptionAttribute: "name", required: true, selectSearchAttributes: ['name'], }, { key: "sellingPrice", label: "Verkaufspreis", component: sellingPrice, }, { key: "taxPercentage", label: "Umsatzsteuer", inputType: "select", selectOptionAttribute: "label", selectValueAttribute: 'key', required: true, selectManualOptions: [ {label: "19 %", key: 19}, {label: "7 %", key: 7}, {label: "0 %", key: 0}] //TODO: Default Value }, { key: "servicecategories", label: "Leistungskategorien", inputType: "select", selectDataType: "servicecategories", selectOptionAttribute: "name", selectSearchAttributes: ['name'], selectMultiple: true, component: serviceCategories }, { key: "sellingPriceComposed.worker", label: "Verkaufspreis Personal pro Einheit", inputType: "number", inputTrailing: "EUR", inputChangeFunction: function (row) { if(row.sellingPriceComposed.worker) { row.sellingPriceComposed.total = row.sellingPriceComposed.worker + (row.sellingPriceComposed.material || 0) row.sellingPrice = row.sellingPriceComposed.total } }, component: sellingPriceComposedWorker }, { key: "sellingPriceComposed.material", label: "Verkaufspreis Material pro Einheit", inputType: "number", inputTrailing: "EUR", inputChangeFunction: function (row) { if(row.sellingPriceComposed.material) { row.sellingPriceComposed.total = (row.sellingPriceComposed.worker || 0) + row.sellingPriceComposed.material row.sellingPrice = row.sellingPriceComposed.total } }, component: sellingPriceComposedMaterial }, { key: "materialComposing", label: "Zusammensetzung Materialpreis pro Einheit", inputType: "materialComposing", }, { key: "personalComposing", label: "Zusammensetzung Personal pro Einheit", inputType: "personalComposing", }, { key: "sellingPriceComposed.total", label: "Verkaufspreis Gesamt pro Einheit", inputType: "number", inputTrailing: "EUR", required: true, /*disabledFunction: function (item) { return item.sellingPriceComposed.worker || item.sellingPriceComposed.material },*/ inputChangeFunction: function (row) { if(row.sellingPriceComposed.worker) { row.sellingPriceComposed.material = row.sellingPriceComposed.total - row.sellingPriceComposed.worker } else if(row.sellingPriceComposed.material) { row.sellingPriceComposed.worker = row.sellingPriceComposed.total - row.sellingPriceComposed.material } }, component: sellingPriceComposedTotal }, { key: "description", label: "Beschreibung", inputType:"textarea" }, ], showTabs: [ { label: 'Informationen', },{ label: 'Wiki', } ] }, hourrates: { isArchivable: true, label: "Stundensätze", labelSingle: "Stundensatz", isStandardEntity: true, redirect: true, selectWithInformation: "*", historyItemHolder: "hourrate", filters: [{ name: "Archivierte ausblenden", default: true, "filterFunction": function (row) { if(!row.archived) { return true } else { return false } } }], templateColumns: [ { key: "name", label: "Name", required: true, title: true, inputType: "text", sortable: true }, { key: "purchase_price", label: "Einkauspreis", inputType: "number", component: purchasePrice, sortable: true }, { key: "sellingPrice", label: "Verkaufspreis", inputType: "number", component: sellingPrice, sortable: true }, ], showTabs: [ { label: 'Informationen', },{ label: 'Wiki', } ] }, events: { isArchivable: true, label: "Termine", labelSingle: "Termin", isStandardEntity: true, historyItemHolder: "event", selectWithInformation: "*, project(id,name), customer(*)", redirect: true, filters:[{ name: "Archivierte ausblenden", default: true, "filterFunction": function (row) { if(!row.archived) { return true } else { return false } } }], templateColumns: [ { key: 'name', label: "Name", required: true, title: true, inputType: "text", sortable: true }, { key: "startDate", label: "Start", required: true, inputType: "datetime", component: startDateTime, sortable: true }, { key: "endDate", label: "Ende", required: true, inputType: "datetime", component: endDateTime, sortable: true },/*{ key: "eventtype", label: "Typ", inputType: "select", selectManualOptions: ["Umsetzung","Vor Ort Termin", "Büro", "Sonstiges"], },*/{ key: "link", label: "Link", inputType: "text" },{ key: "notes", label: "Notizen", inputType: "textarea" }, { key: "project", label: "Projekt", component: project, inputType: "select", selectDataType: "projects", selectOptionAttribute: "name", selectSearchAttributes: ['name'], },{ key: "vehicles", label: "Fahrzeuge", inputType: "select", selectDataType: "vehicles", selectOptionAttribute: "license_plate", selectSearchAttributes: ['license_plate'], selectMultiple: true, component: vehiclesWithLoad, },{ key: "inventoryitems", label: "Inventarartikel", inputType: "select", selectDataType: "inventoryitems", selectOptionAttribute: "name", selectSearchAttributes: ['name'], selectMultiple: true, component: inventoryitemsWithLoad },{ key: "inventoryitemgroups", label: "Inventarartikelgruppen", inputType: "select", selectDataType: "inventoryitemgroups", selectOptionAttribute: "name", selectSearchAttributes: ['name'], selectMultiple: true, component: inventoryitemgroupsWithLoad },{ key: "customer", label: "Kunde", inputType: "select", selectDataType: "customers", selectOptionAttribute: "name", selectSearchAttributes: ['name'], component: customer, },{ key: "vendor", label: "Lieferant", inputType: "select", selectDataType: "vendors", selectOptionAttribute: "name", selectSearchAttributes: ['name'], },{ key: "profiles", label: "Beteiligte Benutzer", inputType: "select", selectDataType: "profiles", selectOptionAttribute: "fullName", selectSearchAttributes: ['fullName'], selectMultiple: true, component: profiles } ], showTabs: [ { label: 'Informationen',},{ label: 'Wiki',} ] }, profiles: { label: "Mitarbeiter", labelSingle: "Mitarbeiter", redirect: true, historyItemHolder: "profile" }, workingtimes: { isArchivable: true, label: "Anwesenheiten", labelSingle: "Anwesenheit", redirect: true, redirectToList: true }, texttemplates: { isArchivable: true, label: "Textvorlagen", labelSingle: "Textvorlage" }, bankstatements: { isArchivable: true, label: "Kontobewegungen", labelSingle: "Kontobewegung", historyItemHolder: "bankStatement", }, statementallocations: { label: "Bankzuweisungen", labelSingle: "Bankzuweisung" }, productcategories: { isArchivable: true, label: "Artikelkategorien", labelSingle: "Artikelkategorie", isStandardEntity: true, redirect: true, sortColumn: "name", selectWithInformation: "*", filters: [{ name: "Archivierte ausblenden", default: true, "filterFunction": function (row) { if(!row.archived) { return true } else { return false } } }], templateColumns: [ { key: "name", label: "Name", required: true, title: true, inputType: "text", sortable: true }, { key: "description", label: "Beschreibung", inputType: "textarea" } ], showTabs: [ { label: 'Informationen', },{ label: 'Wiki', } ] }, servicecategories: { isArchivable: true, label: "Leistungskategorien", labelSingle: "Leistungskategorie", isStandardEntity: true, redirect: true, sortColumn: "name", selectWithInformation: "*", filters: [{ name: "Archivierte ausblenden", default: true, "filterFunction": function (row) { if(!row.archived) { return true } else { return false } } }], templateColumns: [ { key: "name", label: "Name", required: true, title: true, inputType: "text", sortable: true }, { key: "description", label: "Beschreibung", inputType: "textarea" } ], showTabs: [ { label: 'Informationen', },{ label: 'Wiki', } ] }, trackingtrips: { label: "Fahrten", labelSingle: "Fahrt", redirect: true, historyItemHolder: "trackingtrip", }, projecttypes: { isArchivable: true, label: "Projekttypen", labelSingle: "Projekttyp", redirect: true, historyItemHolder: "projecttype" }, checks: { isArchivable: true, label: "Überprüfungen", labelSingle: "Überprüfung", isStandardEntity: true, selectWithInformation: "*, vehicle(id,licensePlate), profile(id, fullName), inventoryitem(name), files(*)", redirect: true, historyItemHolder: "check", filters: [{ name: "Archivierte ausblenden", default: true, "filterFunction": function (row) { if(!row.archived) { return true } else { return false } } }], templateColumns: [ { key: "name", label: "Name", title: true, required: 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: "description", label: "Beschreibung", inputType: "textarea" } ], showTabs: [ { label: 'Informationen', }, {label: 'Dateien'}, {label: 'Ausführungen'}] }, roles: { label: "Rollen", labelSingle: "Rolle", redirect:true, historyItemHolder: "role", filters: [], templateColumns: [ { key: "name", label: "Name" }, { key: "description", label: "Beschreibung" } ] }, costcentres: { isArchivable: true, label: "Kostenstellen", labelSingle: "Kostenstelle", isStandardEntity: true, redirect:true, numberRangeHolder: "number", historyItemHolder: "costcentre", sortColumn: "number", selectWithInformation: "*, project(*), vehicle(*), inventoryitem(*)", filters: [{ name: "Archivierte ausblenden", default: true, "filterFunction": function (row) { if(!row.archived) { return true } else { return false } } }], templateColumns: [ { key: 'number', label: "Nummer", inputIsNumberRange: true, inputType: "text", sortable: true }, { key: "name", label: "Name", required: true, title: true, inputType: "text", sortable: true }, { key: "description", label: "Beschreibung", inputType: "textarea" }, { key: "vehicle", label: "Fahrzeug", component: vehicle, inputType: "select", selectDataType: "vehicles", selectOptionAttribute: "license_plate", selectSearchAttributes: ['license_plate','vin'], }, { key: "inventoryitem", label: "Inventarartikel", inputType: "select", selectDataType: "inventoryitems", selectOptionAttribute: "name", selectSearchAttributes: ['name'], }, { key: "project", label: "Projekt", component: project, inputType: "select", selectDataType: "projects", selectOptionAttribute: "name", selectSearchAttributes: ['name'], }, /*{ key: "profiles", label: "Berechtigte Benutzer", inputType: "select", selectDataType: "profiles", selectOptionAttribute: "fullName", selectSearchAttributes: ['fullName'], selectMultiple: true,/!* component: profiles,*!/ inputColumn: "Allgemeines" },*/ ], showTabs: [{label: 'Informationen'},{label: 'Auswertung Kostenstelle'}] }, ownaccounts: { isArchivable: true, label: "zusätzliche Buchungskonten", labelSingle: "zusätzliches Buchungskonto", isStandardEntity: true, redirect:true, historyItemHolder: "ownaccount", sortColumn: "number", selectWithInformation: "*, statementallocations(*, bs_id(*))", filters: [{ name: "Archivierte ausblenden", default: true, "filterFunction": function (row) { if(!row.archived) { return true } else { return false } } }], templateColumns: [ { key: 'number', label: "Nummer", inputType: "text", sortable: true }, { key: "name", label: "Name", required: true, title: true, inputType: "text", sortable: true }, { key: "description", label: "Beschreibung", inputType: "textarea" }, /*{ key: "profiles", label: "Berechtigte Benutzer", inputType: "select", selectDataType: "profiles", selectOptionAttribute: "fullName", selectSearchAttributes: ['fullName'], selectMultiple: true,/!* component: profiles,*!/ inputColumn: "Allgemeines" },*/ ], showTabs: [{label: 'Informationen'},{label: 'Buchungen'},{ label: 'Wiki', }] }, bankaccounts: { label: "Bankkonten", labelSingle: "Bankkonto", } } const documentTypesForCreation = ref({ invoices: { label: "Rechnungen", labelSingle: "Rechnung", }, serialInvoices: { label: "Serienrechnungen", labelSingle: "Serienrechnung", }, advanceInvoices: { label: "Abschlagsrechnungen", labelSingle: "Abschlagsrechnung" }, cancellationInvoices: { label: "Stornorechnungen", labelSingle: "Storno" }, quotes: { label: "Angebote", labelSingle: "Angebot" }, deliveryNotes: { label: "Lieferscheine", labelSingle: "Lieferschein" }, confirmationOrders: { label: "Auftragsbestätigungen", labelSingle: "Auftragsbestätigung" } }) return { dataTypes, documentTypesForCreation, } })