Tasks und Vertragstyp fix #17
This commit is contained in:
@@ -4,6 +4,7 @@ import dayjs from "dayjs"
|
||||
|
||||
|
||||
import projecttype from "~/components/columnRenderings/projecttype.vue"
|
||||
import contracttype from "~/components/columnRenderings/contracttype.vue"
|
||||
import customer from "~/components/columnRenderings/customer.vue"
|
||||
import contact from "~/components/columnRenderings/contact.vue"
|
||||
import plant from "~/components/columnRenderings/plant.vue"
|
||||
@@ -53,7 +54,7 @@ export const useDataStore = defineStore('data', () => {
|
||||
isArchivable: true,
|
||||
label: "Aufgaben",
|
||||
labelSingle: "Aufgabe",
|
||||
isStandardEntity: true,
|
||||
isStandardEntity: false,
|
||||
redirect: true,
|
||||
historyItemHolder: "task",
|
||||
selectWithInformation: "*, plant(*), project(*), customer(*)",
|
||||
@@ -582,7 +583,7 @@ export const useDataStore = defineStore('data', () => {
|
||||
"Allgemeines",
|
||||
"Abrechnung"
|
||||
],
|
||||
selectWithInformation: "*, customer(*), files(*)",
|
||||
selectWithInformation: "*, customer(*), contracttype(*), files(*)",
|
||||
templateColumns: [
|
||||
{
|
||||
key: 'contractNumber',
|
||||
@@ -600,6 +601,23 @@ export const useDataStore = defineStore('data', () => {
|
||||
inputType: "text",
|
||||
inputColumn: "Allgemeines",
|
||||
sortable: true
|
||||
},{
|
||||
key: "contracttype",
|
||||
label: "Vertragstyp",
|
||||
component: contracttype,
|
||||
inputType: "select",
|
||||
selectDataType: "contracttypes",
|
||||
selectOptionAttribute: "name",
|
||||
selectSearchAttributes: ["name"],
|
||||
inputChangeFunction: function (item, loadedOptions = {}) {
|
||||
const selectedContractType = (loadedOptions.contracttypes || []).find(i => i.id === item.contracttype)
|
||||
if (!selectedContractType) return
|
||||
|
||||
item.paymentType = selectedContractType.paymentType || null
|
||||
item.recurring = Boolean(selectedContractType.recurring)
|
||||
item.billingInterval = selectedContractType.billingInterval || null
|
||||
},
|
||||
inputColumn: "Allgemeines"
|
||||
},{
|
||||
key: "active",
|
||||
label: "Aktiv",
|
||||
@@ -670,6 +688,19 @@ export const useDataStore = defineStore('data', () => {
|
||||
{label:'Überweisung'}
|
||||
],
|
||||
inputColumn: "Abrechnung"
|
||||
},{
|
||||
key: "billingInterval",
|
||||
label: "Abrechnungsintervall",
|
||||
inputType: "select",
|
||||
selectValueAttribute: "label",
|
||||
selectManualOptions: [
|
||||
{ label: "Monatlich" },
|
||||
{ label: "Quartalsweise" },
|
||||
{ label: "Halbjährlich" },
|
||||
{ label: "Jährlich" }
|
||||
],
|
||||
inputColumn: "Abrechnung",
|
||||
sortable: true
|
||||
},{
|
||||
key: 'startDate',
|
||||
label: "Vertragsstart",
|
||||
@@ -730,6 +761,75 @@ export const useDataStore = defineStore('data', () => {
|
||||
],
|
||||
showTabs: [{label: 'Informationen'},{label: 'Dateien'},{label: 'Wiki'}]
|
||||
},
|
||||
contracttypes: {
|
||||
isArchivable: true,
|
||||
label: "Vertragstypen",
|
||||
labelSingle: "Vertragstyp",
|
||||
isStandardEntity: true,
|
||||
redirect: true,
|
||||
sortColumn: "name",
|
||||
selectWithInformation: "*",
|
||||
historyItemHolder: "contracttype",
|
||||
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",
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
key: "paymentType",
|
||||
label: "Zahlart",
|
||||
inputType: "select",
|
||||
selectValueAttribute: "label",
|
||||
selectManualOptions: [
|
||||
{ label: "Einzug" },
|
||||
{ label: "Überweisung" }
|
||||
],
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
key: "billingInterval",
|
||||
label: "Abrechnungsintervall",
|
||||
inputType: "select",
|
||||
selectValueAttribute: "label",
|
||||
selectManualOptions: [
|
||||
{ label: "Monatlich" },
|
||||
{ label: "Quartalsweise" },
|
||||
{ label: "Halbjährlich" },
|
||||
{ label: "Jährlich" }
|
||||
],
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
key: "recurring",
|
||||
label: "Wiederkehrend",
|
||||
inputType: "bool",
|
||||
component: recurring,
|
||||
sortable: true
|
||||
}
|
||||
],
|
||||
showTabs: [{ label: "Informationen" }]
|
||||
},
|
||||
absencerequests: {
|
||||
isArchivable: true,
|
||||
label: "Abwesenheiten",
|
||||
|
||||
Reference in New Issue
Block a user