Fix display bug with inactive boards
This commit is contained in:
parent
085291ce94
commit
d4ca6f4f53
@ -68,18 +68,13 @@ export class AutoActions {
|
||||
settings.boardsChanged
|
||||
.subscribe((boards: Array<Board>) => {
|
||||
this.boards = boards;
|
||||
|
||||
boards.forEach(board => {
|
||||
if (!(+board.is_active)) {
|
||||
this.hasInactiveBoards = true;
|
||||
}
|
||||
});
|
||||
this.updateHasInactiveBoards();
|
||||
});
|
||||
|
||||
settings.actionsChanged
|
||||
.subscribe((actionList: Array<AutoAction>) => {
|
||||
this.autoActions = actionList;
|
||||
this.hasInactiveBoards = false;
|
||||
this.updateHasInactiveBoards();
|
||||
|
||||
this.autoActions.sort((a, b) => {
|
||||
let nameA = this.getBoardName(a.board_id),
|
||||
@ -332,6 +327,16 @@ export class AutoActions {
|
||||
});
|
||||
}
|
||||
|
||||
private updateHasInactiveBoards(): void {
|
||||
this.hasInactiveBoards = false;
|
||||
|
||||
this.boards.forEach(board => {
|
||||
if (!(+board.is_active)) {
|
||||
this.hasInactiveBoards = true;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private handleResponse(response: ApiResponse): void {
|
||||
response.alerts.forEach(alert => {
|
||||
this.notes.add(alert);
|
||||
|
Reference in New Issue
Block a user