add BoardViewModel

This commit is contained in:
marlon-erler
2024-07-23 00:57:40 +02:00
parent d35f2ff0ea
commit 267bdcfc73
6 changed files with 80 additions and 26 deletions
+31
View File
@@ -0,0 +1,31 @@
import * as React from "bloatless-react";
import { BoardInfoFileContent } from "../../Model/Files/taskModel";
import { Color } from "../../colors";
import TaskPageViewModel from "./taskPageViewModel";
export default class BoardViewModel {
taskPageViewModel: TaskPageViewModel;
// data
boardInfo: BoardInfoFileContent;
name: React.State<string> = new React.State("");
color: React.State<Color> = new React.State<Color>(Color.Standard);
// load
loadListRelevantData = (): void => {
this.name.value = this.boardInfo.name;
this.color.value = this.boardInfo.color;
}
loadData = (): void => {}
// init
constructor(taskPageViewModel: TaskPageViewModel, boardInfo: BoardInfoFileContent) {
this.taskPageViewModel = taskPageViewModel;
this.boardInfo = boardInfo;
this.loadListRelevantData();
}
}