consider board ids for selection

This commit is contained in:
marlon-erler
2024-07-23 13:51:27 +02:00
parent a06e4498b9
commit 52b9eef54c
5 changed files with 46 additions and 31 deletions
+4 -4
View File
@@ -22,8 +22,8 @@ export default class TaskPageViewModel {
boardViewModels: React.MapState<BoardViewModel> = new React.MapState();
selectedBoard: React.State<BoardViewModel | undefined> = new React.State<
BoardViewModel | undefined
selectedBoardId: React.State<string | undefined> = new React.State<
string | undefined
>(undefined);
// guards
@@ -64,12 +64,12 @@ export default class TaskPageViewModel {
};
selectBoard = (boardViewModel: BoardViewModel): void => {
this.selectedBoard.value = boardViewModel;
this.selectedBoardId.value = boardViewModel.boardInfo.fileId;
this.chatViewModel.displayedColor.value = boardViewModel.color.value;
};
closeBoard = (): void => {
this.selectedBoard.value = undefined;
this.selectedBoardId.value = undefined;
this.chatViewModel.resetColor();
};