Tasks und Vertragstyp fix #17
All checks were successful
Build and Push Docker Images / build-backend (push) Successful in 30s
Build and Push Docker Images / build-frontend (push) Successful in 1m8s

This commit is contained in:
2026-02-15 22:02:16 +01:00
parent 087ba1126e
commit 3f8ce5daf7
23 changed files with 1037 additions and 24 deletions

View File

@@ -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",