mirror of
https://gitlab.com/bramw/baserow.git
synced 2025-04-14 09:08:32 +00:00
Fix duplicating table and page in left sidebar
This commit is contained in:
parent
9015beef03
commit
7c7e693978
2 changed files with 38 additions and 0 deletions
web-frontend/modules
|
@ -25,6 +25,15 @@
|
||||||
:page="page"
|
:page="page"
|
||||||
></SidebarItemBuilder>
|
></SidebarItemBuilder>
|
||||||
</ul>
|
</ul>
|
||||||
|
<ul v-if="pendingJobs.length" class="tree__subs">
|
||||||
|
<component
|
||||||
|
:is="getPendingJobComponent(job)"
|
||||||
|
v-for="job in pendingJobs"
|
||||||
|
:key="job.id"
|
||||||
|
:job="job"
|
||||||
|
>
|
||||||
|
</component>
|
||||||
|
</ul>
|
||||||
<a
|
<a
|
||||||
v-if="
|
v-if="
|
||||||
$hasPermission(
|
$hasPermission(
|
||||||
|
@ -82,6 +91,13 @@ export default {
|
||||||
.map((page) => page)
|
.map((page) => page)
|
||||||
.sort((a, b) => a.order - b.order)
|
.sort((a, b) => a.order - b.order)
|
||||||
},
|
},
|
||||||
|
pendingJobs() {
|
||||||
|
return this.$store.getters['job/getAll'].filter((job) =>
|
||||||
|
this.$registry
|
||||||
|
.get('job', job.type)
|
||||||
|
.isJobPartOfApplication(job, this.application)
|
||||||
|
)
|
||||||
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
selected(application) {
|
selected(application) {
|
||||||
|
@ -102,6 +118,9 @@ export default {
|
||||||
notifyIf(error, 'page')
|
notifyIf(error, 'page')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
getPendingJobComponent(job) {
|
||||||
|
return this.$registry.get('job', job.type).getSidebarComponent()
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -39,6 +39,15 @@
|
||||||
:table="table"
|
:table="table"
|
||||||
></SidebarItem>
|
></SidebarItem>
|
||||||
</ul>
|
</ul>
|
||||||
|
<ul v-if="pendingJobs.length" class="tree__subs">
|
||||||
|
<component
|
||||||
|
:is="getPendingJobComponent(job)"
|
||||||
|
v-for="job in pendingJobs"
|
||||||
|
:key="job.id"
|
||||||
|
:job="job"
|
||||||
|
>
|
||||||
|
</component>
|
||||||
|
</ul>
|
||||||
<a
|
<a
|
||||||
v-if="
|
v-if="
|
||||||
$hasPermission(
|
$hasPermission(
|
||||||
|
@ -88,6 +97,13 @@ export default {
|
||||||
.map((table) => table)
|
.map((table) => table)
|
||||||
.sort((a, b) => a.order - b.order)
|
.sort((a, b) => a.order - b.order)
|
||||||
},
|
},
|
||||||
|
pendingJobs() {
|
||||||
|
return this.$store.getters['job/getAll'].filter((job) =>
|
||||||
|
this.$registry
|
||||||
|
.get('job', job.type)
|
||||||
|
.isJobPartOfApplication(job, this.application)
|
||||||
|
)
|
||||||
|
},
|
||||||
...mapGetters({ isAppSelected: 'application/isSelected' }),
|
...mapGetters({ isAppSelected: 'application/isSelected' }),
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -109,6 +125,9 @@ export default {
|
||||||
notifyIf(error, 'table')
|
notifyIf(error, 'table')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
getPendingJobComponent(job) {
|
||||||
|
return this.$registry.get('job', job.type).getSidebarComponent()
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Add table
Reference in a new issue