11< div class ="modal-header py-2 ">
22 < h5 class ="modal-title " id ="modal-basic-title ">
3- < fa-icon [icon] ="getIconType(task.type) " [ngClass] ="'task-icon-' + task.type "> </ fa-icon > New Task
3+ < fa-icon [icon] ="getIconType(task.type) " [ngClass] ="'task-icon-' + task.type "> </ fa-icon >
4+ {{ task.ready ? 'Edit Tak' : 'New Task' }}
45 </ h5 >
56 < button type ="button " class ="btn-close " aria-label ="Close " (click) ="close.emit() "> </ button >
67</ div >
@@ -22,34 +23,27 @@ <h5 class="modal-title" id="modal-basic-title">
2223 < b > Description:</ b >
2324 < textarea name ="description " class ="form-control form-control-sm " [(ngModel)] ="task.description "> </ textarea >
2425
25- < b > CheckList</ b >
26+ < b class =" mt-1 " > CheckList</ b >
2627 < hr />
2728 @if (hasSubTasks() && task.ready) {
2829 < div class ="progress ">
2930 < div class ="progress-bar " role ="progressbar " [style.width.%] ="getCheckedPercentage() " aria-valuenow ="getCheckedPercentage() " aria-valuemin ="0 " aria-valuemax ="100 ">
30- {{ getCheckedPercentage() }}%
31+ {{ getCheckedPercentage() | number: '1.0-2' }}%
3132 </ div >
3233 </ div >
3334 }
3435 @for(sub of task.subTasks; track $index; let i = $index) {
35- < div class ="d-flex mb-2 ">
36- @if (task.ready && !sub.edit) {
37- < input type ="checkbox " [(ngModel)] ="sub.checked " />
38- }
39- @if (sub.edit) {
40- < input type ="text " [(ngModel)] ="sub.title " class ="form-control form-control-sm w-auto " />
41- < button class ="btn btn-sm btn-success ms-2 " (click) ="sub.edit = false ">
42- < fa-icon [icon] ="faCheck "> </ fa-icon >
43- </ button >
44- } @else {
45- < b class ="p-1 "> {{sub.title}}</ b >
46- < button class ="btn btn-sm btn-primary ms-2 " (click) ="sub.edit = true ">
47- < fa-icon [icon] ="faPencil "> </ fa-icon >
48- </ button >
49- < button class ="btn btn-sm btn-danger ms-2 " (click) ="removeSubTask(i) ">
50- < fa-icon [icon] ="faTrash "> </ fa-icon >
51- </ button >
36+ < div class ="d-flex my-1 ">
37+ @if (task.ready) {
38+ < div class ="form-check ">
39+ < input [id] ="'check-sub-task' + i " class ="form-check-input " type ="checkbox " [(ngModel)] ="sub.checked " />
40+ < label [for] ="'check-sub-task' + i " class ="form-check-label "> </ label >
41+ </ div >
5242 }
43+ < input type ="text " [(ngModel)] ="sub.title " class ="form-control form-control-sm w-auto " />
44+ < button class ="btn btn-sm btn-danger ms-2 " (click) ="removeSubTask(i) ">
45+ < fa-icon [icon] ="faTrash "> </ fa-icon >
46+ </ button >
5347 </ div >
5448 }
5549 < button class ="btn btn-sm btn-primary mt-2 " (click) ="addSubTask() ">
0 commit comments