feature/projects-all-the-way-down #3323
|
@ -111,12 +111,12 @@ export const useProjectStore = defineStore('project', () => {
|
|||
const projectService = new ProjectService()
|
||||
|
||||
try {
|
||||
await projectService.update(project)
|
||||
const updatedProject = await projectService.update(project)
|
||||
setProject(project)
|
||||
|
||||
// the returned project from projectService.update is the same!
|
||||
konrad marked this conversation as resolved
Outdated
|
||||
// in order to not create a manipulation in pinia store we have to create a new copy
|
||||
return klona(project)
|
||||
return updatedProject
|
||||
} catch (e) {
|
||||
// Reset the project state to the initial one to avoid confusion for the user
|
||||
setProject({
|
||||
|
|
Reference in New Issue
Block a user
Use returned value from update function. Then klona shouldn't be necessary, right?
If I set an id for
parentID
in the passed project: will this update the parents childProjects?Done.