Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Commit 2f0c352

Browse files
committed
implemented creating projects
1 parent b89c020 commit 2f0c352

File tree

4 files changed

+34
-7
lines changed

4 files changed

+34
-7
lines changed

core/resources/Project.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
export default class Project {
22
constructor({
3-
name = "_No_Name_Provided_",
3+
name = "_No_Project_Name_Provided_",
44
parent_id,
55
color,
6-
favorite = false,
6+
favorite,
77
} = {}) {
88
this.name = name;
9+
//these are optional
910
this.parent_id = parent_id;
1011
this.color = color;
1112
this.favorite = favorite;

core/resources/Section.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
export default class Section {
2+
constructor({ name = "_No_Section_Name_Provided_", parent_id, order } = {}) {
3+
this.name = name;
4+
//these are optional
5+
this.parent_id = parent_id;
6+
this.order = order;
7+
}
8+
}

core/resources/Task.js

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,30 @@
11
export default class Task {
22
constructor({
33
content = "_NO_CONTENT_",
4-
due_string = "",
5-
due_lang = "",
6-
priority = 1,
4+
project_id,
5+
section_id,
6+
parent_id,
7+
order,
8+
label_ids,
9+
priority,
10+
due_string,
11+
due_date,
12+
due_datetime,
13+
due_lang,
14+
assignee,
715
} = {}) {
8-
this.priority = priority;
916
this.content = content;
17+
//these are optional
18+
this.project_id = project_id;
19+
this.section_id = section_id;
20+
this.parent_id = parent_id;
21+
this.order = order;
22+
this.label_ids = label_ids;
23+
this.priority = priority;
1024
this.due_string = due_string;
25+
this.due_date = due_date;
26+
this.due_datetime = due_datetime;
1127
this.due_lang = due_lang;
28+
this.assignee = assignee;
1229
}
1330
}

core/resources/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import Task from "./Task.js";
22
import Project from "./Project.js";
3+
import Section from "./Section.js";
34

4-
export { Task, Project };
5+
export { Task, Project, Section };

0 commit comments

Comments
 (0)