feature/projects-all-the-way-down #3323

Merged
konrad merged 123 commits from feature/projects-all-the-way-down into main 2023-05-30 10:09:40 +00:00
Showing only changes of commit 4ab547810c - Show all commits

View File

@ -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
  • 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?

- 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.

Done.
// 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({