add button to delete board

This commit is contained in:
marlon-erler
2024-07-23 14:31:50 +02:00
parent 4d55a4974a
commit 3142112cb8
5 changed files with 42 additions and 2 deletions
+5
View File
@@ -58,6 +58,11 @@ export default class BoardViewModel {
this.taskPageViewModel.chatViewModel.setDisplayedColor(this.color.value);
};
deleteBoard = (): void => {
this.taskPageViewModel.deleteBoard(this.boardInfo);
this.close();
};
// load
loadListRelevantData = (): void => {
this.name.value = this.boardInfo.name;
+6
View File
@@ -65,6 +65,12 @@ export default class TaskPageViewModel {
this.updateIndices();
};
deleteBoard = (boardInfoFileContent: BoardInfoFileContent): void => {
this.taskModel.deleteBoard(boardInfoFileContent.fileId);
this.boardViewModels.remove(boardInfoFileContent.fileId);
this.updateIndices();
};
// view
showBoardInList = (boardInfo: BoardInfoFileContent): void => {
const boardViewModel: BoardViewModel = new BoardViewModel(this, boardInfo);