fix: don't show child projects when the project is only a favorite
This commit is contained in:
parent
b567146d69
commit
0a17df87e9
@ -22,6 +22,7 @@
|
||||
<ProjectsNavigationItem
|
||||
:project="project"
|
||||
:is-loading="projectUpdating[project.id]"
|
||||
:can-collapse="canCollapse"
|
||||
/>
|
||||
</template>
|
||||
</draggable>
|
||||
@ -42,6 +43,7 @@ import {useProjectStore} from '@/stores/projects'
|
||||
const props = defineProps<{
|
||||
modelValue?: IProject[],
|
||||
canEditOrder: boolean,
|
||||
canCollapse?: boolean,
|
||||
}>()
|
||||
const emit = defineEmits(['update:modelValue'])
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
>
|
||||
<section>
|
||||
<BaseButton
|
||||
v-if="childProjects?.length > 0"
|
||||
v-if="canCollapse && childProjects?.length > 0"
|
||||
@click="childProjectsOpen = !childProjectsOpen"
|
||||
class="collapse-project-button"
|
||||
>
|
||||
@ -46,7 +46,7 @@
|
||||
<span class="list-setting-spacer" v-else></span>
|
||||
</section>
|
||||
<ProjectsNavigation
|
||||
v-if="childProjectsOpen"
|
||||
v-if="childProjectsOpen && canCollapse"
|
||||
v-model="childProjects"
|
||||
:can-edit-order="true"
|
||||
/>
|
||||
@ -69,6 +69,7 @@ import ProjectsNavigation from '@/components/home/ProjectsNavigation.vue'
|
||||
const props = defineProps<{
|
||||
project: IProject,
|
||||
isLoading?: boolean,
|
||||
canCollapse?: boolean,
|
||||
}>()
|
||||
|
||||
const projectStore = useProjectStore()
|
||||
|
@ -51,11 +51,11 @@
|
||||
<Loading variant="small" v-if="projectsLoading"/>
|
||||
<template v-else>
|
||||
<nav class="menu" v-if="favoriteProjects">
|
||||
<ProjectsNavigation :model-value="favoriteProjects" :can-edit-order="false"/>
|
||||
<ProjectsNavigation :model-value="favoriteProjects" :can-edit-order="false" :can-collapse="false"/>
|
||||
</nav>
|
||||
|
||||
<nav class="menu">
|
||||
<ProjectsNavigation :model-value="projects" :can-edit-order="true"/>
|
||||
<ProjectsNavigation :model-value="projects" :can-edit-order="true" :can-collapse="true"/>
|
||||
</nav>
|
||||
</template>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user