Generalized table to not depend on project id

This commit is contained in:
2019-03-15 10:18:23 +01:00
parent 4f5eee6705
commit 479b844174
8 changed files with 63 additions and 35 deletions

View File

@@ -10,7 +10,7 @@ const TEMPLATE =`
<div id="col_main">
<component
:is="tableComponentName"
:projectId="projectId"
:project="project"
:selectedIds="selectedIds"
:canChangeSelectionCB="canChangeSelectionCB"
@selectItemsChanged="onSelectItemsChanged"
@@ -60,6 +60,7 @@ Vue.component('attract-app', {
return this.selectedItems.map(it => it.name);
},
tableComponentName() {
if(!this.project) return '';
switch (this.contextType) {
case 'assets': return AssetsTable.options.name;
case 'tasks': return TasksTable.options.name;