From 3288fbda6f09e21da8b96877a281166b17487403 Mon Sep 17 00:00:00 2001 From: alicia pritchett Date: Mon, 13 Sep 2021 14:28:11 -0400 Subject: [PATCH] Deprecate 'none' category --- .../workflow-spec-list/workflow-spec-list.component.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/app/workflow-spec-list/workflow-spec-list.component.ts b/src/app/workflow-spec-list/workflow-spec-list.component.ts index 1b5fa76..42fb134 100644 --- a/src/app/workflow-spec-list/workflow-spec-list.component.ts +++ b/src/app/workflow-spec-list/workflow-spec-list.component.ts @@ -224,6 +224,8 @@ export class WorkflowSpecListComponent implements OnInit { editCategoryDisplayOrder(catId: number, direction: string) { this.api.reorderWorkflowCategory(catId, direction).subscribe(cat_change => { + console.log('old wfsbycat is: ', this.workflowSpecsByCategory); + console.log('new wfsbycat is: ', cat_change); this.workflowSpecsByCategory = cat_change; }); } @@ -242,6 +244,9 @@ export class WorkflowSpecListComponent implements OnInit { this.categories = cats; // Add a container for specs without a category + /** + * Deprecated - no more 'None' + * this.workflowSpecsByCategory = [{ id: null, name: 'none', @@ -249,10 +254,11 @@ export class WorkflowSpecListComponent implements OnInit { workflow_specs: [], display_order: -1, // Display it at the top }]; + */ this.categories.forEach((cat, i) => { this.workflowSpecsByCategory.push(cat); - this.workflowSpecsByCategory[i + 1].workflow_specs = []; + this.workflowSpecsByCategory[i].workflow_specs = []; }); this._loadWorkflowSpecs(selectedSpecName); this._loadWorkflowLibraries();