1
0

fix: move parent project child id mutation to store

This commit is contained in:
kolaente
2023-04-12 10:45:56 +02:00
parent 6e095436e9
commit 26e3d42ed5
2 changed files with 9 additions and 6 deletions

View File

@ -92,12 +92,6 @@ async function saveProjectPosition(e: SortableEvent) {
projectAfter !== null ? projectAfter.position : null,
)
if (project.parentProjectId !== parentProjectId && project.parentProjectId > 0) {
const parentProject = projectStore.getProjectById(project.parentProjectId)
const childProjectIndex = parentProject.childProjectIds.findIndex(pId => pId === project.id)
parentProject.childProjectIds.splice(childProjectIndex, 1)
}
try {
// create a copy of the project in order to not violate pinia manipulation
await projectStore.updateProject({