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 1111 v-model =" task"
1212 required
1313 /><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-->
1515 <input
1616 class =" task-input"
1717 id =" due-date"
@@ -87,7 +87,7 @@ const currentLocalDate: Date = new Date(
8787); // current date in local time zone
8888
8989export 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
9191 data() {
9292 return {
9393 task: " " ,
@@ -114,11 +114,11 @@ export default defineComponent({
114114 },
115115 methods: {
116116 /**
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.
118118 */
119119 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
122122 this .newId ++ ;
123123 this .task = " " ;
124124 this .dueDate = currentLocalDate .toISOString ().split (" T" )[0 ];
Original file line number Diff line number Diff line change 5252 })
5353 }}</span >
5454 </p >
55- <!-- show circular progress bar filled with level progress--> <ve-progress
55+ <!-- show the circular progress bar filled with level progress--> <ve-progress
5656 :progress =" getCurrentProgress"
5757 >Level
5858 <span id =" text-numeric-display" >{{
104104 >s</span
105105 ></span
106106 >
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
108108 v-if =" !task.isCompleted"
109109 @click =" completeTask(task.newId)"
110110 >
@@ -201,15 +201,15 @@ export default defineComponent({
201201 },
202202 methods: {
203203 /**
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
206206 */
207207 completeTask : function (id : number ): void {
208208 store .dispatch (" completeTask" , id );
209209 },
210210 /**
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
213213 */
214214 deleteTask : function (id : number ): void {
215215 store .dispatch (" deleteTask" , id );
Original file line number Diff line number Diff line change @@ -9,23 +9,19 @@ createApp({ render: () => h(App) })
99 . mount ( "#app" ) ;
1010/* eslint-disable */
1111store . dispatch ( "loadUser" ) . then (
12- ( success ) => {
13- //if user data is loaded successfully
12+ ( success ) => { //if user data is loaded successfully
1413 console . log ( "User data loaded successfully!" ) ;
1514 } ,
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)
1816 console . log ( "User data failed to load." ) ;
19- } ,
17+ }
2018) ; //load user data
2119store . dispatch ( "loadTasks" ) . then (
22- ( success ) => {
23- //if task list data is loaded successfully
20+ ( success ) => { //if task list data is loaded successfully
2421 console . log ( "Task list data loaded successfully!" ) ;
2522 } ,
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)
2824 console . log ( "Task list data failed to load." ) ;
29- } ,
25+ }
3026) ; //load task list data
31- /* eslint-enable */
27+ /* eslint-enable */
You can’t perform that action at this time.
0 commit comments