Fix for missing Phases
All checks were successful
Build and Push Docker Images / build-backend (push) Successful in 23s
Build and Push Docker Images / build-frontend (push) Successful in 59s

This commit is contained in:
2026-03-25 15:19:33 +01:00
parent c29494dc0d
commit 01b4d0f973
2 changed files with 59 additions and 2 deletions

View File

@@ -1443,7 +1443,28 @@ export const useDataStore = defineStore('data', () => {
selectOptionAttribute: "name",
selectSearchAttributes: ['name'],
inputChangeFunction: function (item,loadedOptions = {}) {
item.phases = loadedOptions.projecttypes.find(i => i.id === item.projecttype).initialPhases
const selectedProjectType = loadedOptions.projecttypes?.find(i => i.id === item.projecttype)
if (!selectedProjectType || !Array.isArray(selectedProjectType.initialPhases)) {
item.phases = []
item.active_phase = null
return
}
const phases = selectedProjectType.initialPhases.map((phase, index) => ({
key: phase?.key || crypto.randomUUID(),
icon: phase?.icon || '',
label: phase?.label || '',
optional: Boolean(phase?.optional),
description: phase?.description || '',
quickactions: Array.isArray(phase?.quickactions) ? phase.quickactions.map((quickaction) => ({
...quickaction
})) : [],
active: index === 0
}))
item.phases = phases
item.active_phase = phases.find(i => i.active)?.label || null
},
sortable: true
},{