Fixes 260
This commit is contained in:
parent
78e59d5f4c
commit
73e261e973
|
@ -33,7 +33,7 @@
|
||||||
|
|
||||||
<div *ngIf="!(searchField.value && cat.workflow_specs.length === 0)">
|
<div *ngIf="!(searchField.value && cat.workflow_specs.length === 0)">
|
||||||
<ng-container *ngIf="!(cat.id === null && cat.workflow_specs.length === 0)">
|
<ng-container *ngIf="!(cat.id === null && cat.workflow_specs.length === 0)">
|
||||||
<mat-expansion-panel hideToggle [expanded]="selectedSpec.category_id == cat.id">
|
<mat-expansion-panel hideToggle (opened)="selectCat(cat)" [expanded]="selectedSpec.category_id == cat.id">
|
||||||
<mat-expansion-panel-header>
|
<mat-expansion-panel-header>
|
||||||
<mat-panel-title>
|
<mat-panel-title>
|
||||||
{{cat.display_name}}
|
{{cat.display_name}}
|
||||||
|
|
|
@ -88,6 +88,10 @@ export class WorkflowSpecListComponent implements OnInit {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
selectCat(selectedCat?: WorkflowSpecCategory) {
|
||||||
|
this.selectedCat = selectedCat;
|
||||||
|
}
|
||||||
|
|
||||||
selectSpec(selectedSpec?: WorkflowSpec) {
|
selectSpec(selectedSpec?: WorkflowSpec) {
|
||||||
this.selectedSpec = selectedSpec;
|
this.selectedSpec = selectedSpec;
|
||||||
this.location.replaceState(environment.homeRoute + '/' + selectedSpec.name);
|
this.location.replaceState(environment.homeRoute + '/' + selectedSpec.name);
|
||||||
|
@ -200,7 +204,6 @@ export class WorkflowSpecListComponent implements OnInit {
|
||||||
this.workflowSpecsByCategory.push(cat);
|
this.workflowSpecsByCategory.push(cat);
|
||||||
this.workflowSpecsByCategory[i + 1].workflow_specs = [];
|
this.workflowSpecsByCategory[i + 1].workflow_specs = [];
|
||||||
});
|
});
|
||||||
|
|
||||||
this._loadWorkflowSpecs(selectedSpecName);
|
this._loadWorkflowSpecs(selectedSpecName);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -371,6 +374,9 @@ export class WorkflowSpecListComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
private _updateSpecDisplayOrders(specs: WorkflowSpec[]) {
|
private _updateSpecDisplayOrders(specs: WorkflowSpec[]) {
|
||||||
|
if (this.selectedCat.id !== this.selectedSpec.category.id) {
|
||||||
|
this.selectedSpec = specs[0];
|
||||||
|
}
|
||||||
let numUpdated = 0;
|
let numUpdated = 0;
|
||||||
specs.forEach((spec, j) => {
|
specs.forEach((spec, j) => {
|
||||||
const newSpec = createClone({ circles: true })(spec);
|
const newSpec = createClone({ circles: true })(spec);
|
||||||
|
|
Loading…
Reference in New Issue