File tree Expand file tree Collapse file tree 4 files changed +101
-103
lines changed Expand file tree Collapse file tree 4 files changed +101
-103
lines changed Original file line number Diff line number Diff line change 11
11
v-model =" task"
12
12
required
13
13
/><br />
14
- Due date:<br /><!-- task due date must be on or after today date-->
14
+ Due date:<br /><!-- task due date must be on or after today's date-->
15
15
<input
16
16
class =" task-input"
17
17
id =" due-date"
@@ -87,7 +87,7 @@ const currentLocalDate: Date = new Date(
87
87
); // current date in local time zone
88
88
89
89
export default defineComponent ({
90
- // define component to default values when the task is created
90
+ // define the component to default values when the task is created
91
91
data() {
92
92
return {
93
93
task: " " ,
@@ -114,11 +114,11 @@ export default defineComponent({
114
114
},
115
115
methods: {
116
116
/**
117
- * Add task to task list when user presses the Add Task button.
117
+ * Add task to the task list when user presses the Add Task button.
118
118
*/
119
119
addTask : function (): void | TodoTask [] {
120
- this .dueDate = this .originalDueDate ; // set task due date to entered task original due date
121
- store .dispatch (" createTask" , this );
120
+ this .dueDate = this .originalDueDate ; // set the task due date to entered task original due date
121
+ store .dispatch (" createTask" , this ); // create the task to the user store
122
122
this .newId ++ ;
123
123
this .task = " " ;
124
124
this .dueDate = currentLocalDate .toISOString ().split (" T" )[0 ];
Original file line number Diff line number Diff line change 52
52
})
53
53
}}</span >
54
54
</p >
55
- <!-- show circular progress bar filled with level progress--> <ve-progress
55
+ <!-- show the circular progress bar filled with level progress--> <ve-progress
56
56
:progress =" getCurrentProgress"
57
57
>Level
58
58
<span id =" text-numeric-display" >{{
104
104
>s</span
105
105
></span
106
106
>
107
- <!-- don't show complete button if one-time task is completed--> <button
107
+ <!-- don't show the complete button if one-time task is completed--> <button
108
108
v-if =" !task.isCompleted"
109
109
@click =" completeTask(task.newId)"
110
110
>
@@ -201,15 +201,15 @@ export default defineComponent({
201
201
},
202
202
methods: {
203
203
/**
204
- * Complete task based on task ID.
205
- * @param id task ID
204
+ * Complete the task based on task ID.
205
+ * @param id the task ID
206
206
*/
207
207
completeTask : function (id : number ): void {
208
208
store .dispatch (" completeTask" , id );
209
209
},
210
210
/**
211
- * Delete task based on task ID.
212
- * @param id task ID
211
+ * Delete the task based on task ID.
212
+ * @param id the task ID
213
213
*/
214
214
deleteTask : function (id : number ): void {
215
215
store .dispatch (" deleteTask" , id );
Original file line number Diff line number Diff line change @@ -9,23 +9,19 @@ createApp({ render: () => h(App) })
9
9
. mount ( "#app" ) ;
10
10
/* eslint-disable */
11
11
store . dispatch ( "loadUser" ) . then (
12
- ( success ) => {
13
- //if user data is loaded successfully
12
+ ( success ) => { //if user data is loaded successfully
14
13
console . log ( "User data loaded successfully!" ) ;
15
14
} ,
16
- ( error ) => {
17
- //if user data is not loaded successfully (failed to load)
15
+ ( error ) => { //if user data is not loaded successfully (failed to load)
18
16
console . log ( "User data failed to load." ) ;
19
- } ,
17
+ }
20
18
) ; //load user data
21
19
store . dispatch ( "loadTasks" ) . then (
22
- ( success ) => {
23
- //if task list data is loaded successfully
20
+ ( success ) => { //if task list data is loaded successfully
24
21
console . log ( "Task list data loaded successfully!" ) ;
25
22
} ,
26
- ( error ) => {
27
- //if task list data is not loaded successfully (failed to load)
23
+ ( error ) => { //if task list data is not loaded successfully (failed to load)
28
24
console . log ( "Task list data failed to load." ) ;
29
- } ,
25
+ }
30
26
) ; //load task list data
31
- /* eslint-enable */
27
+ /* eslint-enable */
You can’t perform that action at this time.
0 commit comments