Some Changes
This commit is contained in:
@@ -151,7 +151,16 @@ const projectHours = () => {
|
||||
return hours.toFixed(2)
|
||||
}
|
||||
|
||||
const updateProject = async () => {
|
||||
let initialPhases = projecttypes.value.find(i => i.id === itemInfo.value.projecttype).initialPhases
|
||||
|
||||
if(oldItemInfo.value.phases.length === 0) {
|
||||
itemInfo.value.phases = initialPhases
|
||||
}
|
||||
|
||||
await dataStore.updateItem('projects',itemInfo.value,oldItemInfo.value)
|
||||
|
||||
}
|
||||
|
||||
const createProject = async () => {
|
||||
let initialPhases = projecttypes.value.find(i => i.id === itemInfo.value.projecttype).initialPhases
|
||||
@@ -245,7 +254,7 @@ const renderedPhases = computed(() => {
|
||||
<template #right>
|
||||
<UButton
|
||||
v-if="mode === 'edit'"
|
||||
@click="dataStore.updateItem('projects',itemInfo,oldItemInfo)"
|
||||
@click="updateProject"
|
||||
>
|
||||
Speichern
|
||||
</UButton>
|
||||
|
||||
Reference in New Issue
Block a user