forked from mindsmash/tiny-tasks
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from mohsammarraie/feature/mindsmash#29-user-ma…
…rk-task-as-done Feature/mindsmash#29 user mark task as done
- Loading branch information
Showing
13 changed files
with
124 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 18 additions & 2 deletions
20
src/main/webapp/app/tasks/task-list/task-list.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,26 @@ | ||
<mat-list data-cy="task-list"> | ||
<mat-list-item *ngFor="let task of tasks" class="mat-elevation-z1"> | ||
<mat-list-item *ngFor="let task of todoTasks" class="mat-elevation-z1" > | ||
<mat-icon mat-list-icon>assignment</mat-icon> | ||
<h4 mat-line>{{task.name}}</h4> | ||
<h4 mat-line class="todo">{{ task.status }}</h4> | ||
<p mat-line>ID: {{task.id}}</p> | ||
<button mat-icon-button color="primary"> | ||
<mat-icon aria-label="Delete task" (click)="delete(task)">delete</mat-icon> | ||
</button> | ||
<button mat-icon-button color="primary"> | ||
<mat-icon aria-label="done task" (click)="changeStatus(task)">done</mat-icon> | ||
</button> | ||
</mat-list-item> | ||
<mat-list-item *ngFor="let task of doneTasks" class="mat-elevation-z1" > | ||
<mat-icon mat-list-icon>assignment</mat-icon> | ||
<h4 mat-line>{{task.name}}</h4> | ||
<h4 mat-line class="done">{{ task.status }}</h4> | ||
<p mat-line>ID: {{task.id}}</p> | ||
<button mat-icon-button color="primary"> | ||
<mat-icon aria-label="Delete task" (click)="delete(task)">delete</mat-icon> | ||
</button> | ||
</mat-list-item> | ||
<button mat-icon-button color="primary" [disabled] = "task.status === 'Done'"> | ||
<mat-icon aria-label="done task" (click)="changeStatus(task)">done</mat-icon> | ||
</button> | ||
</mat-list-item> | ||
</mat-list> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,3 +11,11 @@ | |
p { | ||
color: rgba(0, 0, 0, 0.54); | ||
} | ||
|
||
.todo { | ||
color: #f5222d; | ||
} | ||
|
||
.done { | ||
color: #52c41a; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,5 @@ | |
export interface Task { | ||
id: string; | ||
name: string; | ||
status: string; | ||
} |