feature/projects-all-the-way-down #3323
|
@ -8,13 +8,13 @@
|
|||
handle=".handle"
|
||||
tag="ul"
|
||||
dpschen marked this conversation as resolved
Outdated
|
||||
item-key="id"
|
||||
:disabled="!allowDrag"
|
||||
:disabled="!canEditOrder"
|
||||
:component-data="{
|
||||
type: 'transition-group',
|
||||
name: !drag ? 'flip-list' : null,
|
||||
class: [
|
||||
'menu-list can-be-hidden',
|
||||
{ 'dragging-disabled': !allowDrag }
|
||||
{ 'dragging-disabled': !canEditOrder }
|
||||
]
|
||||
}"
|
||||
>
|
||||
|
@ -68,7 +68,7 @@
|
|||
<ProjectsNavigation
|
||||
dpschen marked this conversation as resolved
Outdated
|
||||
v-if="!collapsedProjects[p.id]"
|
||||
dpschen
commented
Also don't render if there are no child projects. Also don't render if there are no child projects.
konrad
commented
But then it won't be possible to drag a project "under" a parent to make it a child of that parent. But then it won't be possible to drag a project "under" a parent to make it a child of that parent.
|
||||
v-model="p.childProjects"
|
||||
:allow-drag="true"
|
||||
:can-edit-order="true"
|
||||
/>
|
||||
</li>
|
||||
</template>
|
||||
|
@ -94,7 +94,7 @@ import {useProjectStore} from '@/stores/projects'
|
|||
|
||||
const props = defineProps<{
|
||||
modelValue: IProject[],
|
||||
allowDrag: boolean,
|
||||
canEditOrder: boolean,
|
||||
dpschen marked this conversation as resolved
Outdated
dpschen
commented
Should have a default value. When is Should have a default value.
When is `allowDrag === true`? In case this is related to edit rights we should align the variable names.
dpschen
commented
Just saw when it's true. Can we rename to the concrete action? Because the order might also be changed by something else than dragging in the future. How about Just saw when it's true. Can we rename to the concrete action? Because the order might also be changed by something else than dragging in the future. How about `canEditOrder`?
konrad
commented
I think that's a good idea. Renamed it. > Can we rename to the concrete action? Because the order might also be changed by something else than dragging in the future. How about canEditOrder?
I think that's a good idea. Renamed it.
|
||||
}>()
|
||||
dpschen
commented
Danger! This should be handled in the store! Probably it would be best to create a new store method. Something like Danger! This should be handled in the store!
Inline editing of parent project!
Probably it would be best to create a new store method. Something like `setOrder` or `changeOrder`.
konrad
commented
I was able to move the whole thing into the I was able to move the whole thing into the `updateProject` method of the store.
|
||||
const emit = defineEmits(['update:modelValue'])
|
||||
|
||||
|
|
|
@ -49,11 +49,11 @@
|
|||
</nav>
|
||||
|
||||
<nav class="menu" v-if="favoriteProjects">
|
||||
dpschen marked this conversation as resolved
Outdated
dpschen
commented
Move Move `v-if` to front
konrad
commented
Done Done
|
||||
<ProjectsNavigation v-model="favoriteProjects" :allow-drag="false"/>
|
||||
<ProjectsNavigation v-model="favoriteProjects" :can-edit-order="false"/>
|
||||
</nav>
|
||||
|
||||
<nav class="menu">
|
||||
<ProjectsNavigation v-model="projects" :allow-drag="true"/>
|
||||
<ProjectsNavigation v-model="projects" :can-edit-order="true"/>
|
||||
</nav>
|
||||
|
||||
<PoweredByLink/>
|
||||
|
|
Use
<menu>
(now I remembered the correct element).Done