rename TaskModel to BoardModel for accuracy
This commit is contained in:
@@ -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
|
||||
@@ -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
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import * as React from "bloatless-react";
|
||||
|
||||
import TaskModel, { BoardInfoFileContent } from "../../Model/Files/taskModel";
|
||||
import BoardModel, { BoardInfoFileContent } from "../../Model/Files/boadModel";
|
||||
|
||||
import { Color } from "../../colors";
|
||||
import StorageModel from "../../Model/Global/storageModel";
|
||||
@@ -79,7 +79,7 @@ export default class BoardViewModel {
|
||||
// methods
|
||||
saveSettings = (): void => {
|
||||
const newBoardInfoFileContent: BoardInfoFileContent =
|
||||
TaskModel.createBoardInfoFileContent(
|
||||
BoardModel.createBoardInfoFileContent(
|
||||
this.boardInfo.fileId,
|
||||
this.name.value,
|
||||
this.color.value
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import * as React from "bloatless-react";
|
||||
|
||||
import TaskModel, {
|
||||
import BoardModel, {
|
||||
BoardInfoFileContent,
|
||||
BoardInfoFileContentReference,
|
||||
} from "../../Model/Files/taskModel";
|
||||
} from "../../Model/Files/boadModel";
|
||||
|
||||
import BoardViewModel from "./boardViewModel";
|
||||
import ChatViewModel from "../Chat/chatViewModel";
|
||||
@@ -14,7 +14,7 @@ import { checkMatchesObjectStructure } from "../../Model/Utility/typeSafety";
|
||||
|
||||
export default class TaskPageViewModel {
|
||||
storageModel: StorageModel;
|
||||
taskModel: TaskModel;
|
||||
taskModel: BoardModel;
|
||||
|
||||
chatViewModel: ChatViewModel;
|
||||
|
||||
@@ -153,7 +153,7 @@ export default class TaskPageViewModel {
|
||||
|
||||
// init
|
||||
constructor(
|
||||
taskModel: TaskModel,
|
||||
taskModel: BoardModel,
|
||||
storageModel: StorageModel,
|
||||
chatViewModel: ChatViewModel
|
||||
) {
|
||||
|
||||
Reference in New Issue
Block a user