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 fa71cec5c8 - Show all commits

View File

@ -151,13 +151,11 @@ async function saveProjectPosition(e: SortableEvent) {
projectAfter !== null ? projectAfter.position : null,
)
console.log({
position,
newIndex,
project: project.id,
projectBefore: projectBefore?.id,
projectAfter: projectAfter?.id,
})
if (project.parentProjectId !== parentProjectId) {
const parentProject = projectStore.getProjectById(project.parentProjectId)
const childProjectIndex = parentProject.childProjects.findIndex(p => p.id === project.id)
parentProject.childProjects.splice(childProjectIndex, 1)
}
try {
// create a copy of the project in order to not violate pinia manipulation