rename TaskModel to BoardModel for accuracy

This commit is contained in:
marlon-erler
2024-07-24 00:12:45 +02:00
parent a1d88967d7
commit 29c69dc15e
4 changed files with 13 additions and 13 deletions
@@ -1,4 +1,4 @@
// thile file is responsible for managing task files within chats.
// thile file is responsible for managing boards within chats and tasks within boards.
import {
DATA_VERSION,
@@ -12,7 +12,7 @@ import { HandlerManager } from "../Utility/utility";
import StorageModel from "../Global/storageModel";
import { v4 } from "uuid";
export default class TaskModel {
export default class BoardModel {
storageModel: StorageModel;
chatModel: ChatModel;
fileModel: FileModel;
@@ -82,7 +82,7 @@ export default class TaskModel {
// boards
createBoard = (name: string): BoardInfoFileContent => {
const boardInfoFileContent: BoardInfoFileContent =
TaskModel.createBoardInfoFileContent(v4(), name, Color.Standard);
BoardModel.createBoardInfoFileContent(v4(), name, Color.Standard);
this.updateBoard(boardInfoFileContent);
return boardInfoFileContent;
};
@@ -129,7 +129,7 @@ export default class TaskModel {
//tasks
createTask = (boardId: string, name: string): void => {
const taskFileContent: TaskFileContent = TaskModel.createTaskFileContent(
const taskFileContent: TaskFileContent = BoardModel.createTaskFileContent(
v4(),
name,
boardId
+3 -3
View File
@@ -9,15 +9,15 @@ import {
} from "../Utility/utility";
import StorageModel, { filePaths } from "../Global/storageModel";
import BoardModel from "./boadModel";
import ChatModel from "../Chat/chatModel";
import TaskModel from "./taskModel";
import { v4 } from "uuid";
export default class FileModel {
chatModel: ChatModel;
storageModel: StorageModel;
taskModel: TaskModel;
taskModel: BoardModel;
fileContentHandlerManager: HandlerManager<FileContent<string>> = new HandlerManager();
@@ -140,7 +140,7 @@ export default class FileModel {
this.chatModel = chatModel;
this.storageModel = storageModel;
this.taskModel = new TaskModel(this.storageModel, chatModel, this);
this.taskModel = new BoardModel(this.storageModel, chatModel, this);
}
// utility