forked from presidio-oss/specif-ai
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtask-list.component.html
106 lines (102 loc) · 3.33 KB
/
task-list.component.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
<div class="container mx-auto px-4 py-2">
<div
class="grid grid-cols-12 gap-4"
*ngIf="selectedUserStory$ | async as selectedUserStory"
>
<div class="col-span-4 p-4 bg-white rounded-lg shadow">
<h1 class="text-lg font-semibold">
{{ selectedUserStory.id }}:
{{ selectedUserStory?.name }}
</h1>
<p class="mt-6 text-sm">
{{
selectedUserStory?.description?.includes("Acceptance Criteria:")
? selectedUserStory.description.split("Acceptance Criteria:")[0]
: selectedUserStory?.description
}}
</p>
<div
*ngIf="
selectedUserStory?.description &&
selectedUserStory?.description?.includes('Acceptance Criteria:')
"
>
<h4 class="text-sm mt-4 font-medium">Acceptance Criteria:</h4>
<p class="text-sm">
{{ selectedUserStory.description.split("Acceptance Criteria:")[1] }}
</p>
</div>
</div>
<div class="col-span-8 p-4 bg-white rounded-lg shadow">
<div class="flex items-center justify-between gap-4">
<div class="flex items-center">
<h2 class="text-md font-semibold text-gray-600">Tasks</h2>
<app-badge [badgeText]="(taskList$ | async)?.length || 0"></app-badge>
</div>
<div class="flex justify-between space-x-4">
<ng-container *ngIf="taskList$ | async as taskList">
<app-button
[buttonContent]="
taskList.length > 0 ? 'Regenerate Tasks' : 'Generate Tasks'
"
theme="secondary"
size="sm"
rounded="lg"
(click)="addExtraContext(taskList.length > 0)"
/>
</ng-container>
<app-button
buttonContent="Add New"
theme="primary"
size="sm"
rounded="lg"
(click)="navigateToAddTask()"
/>
</div>
</div>
<app-search-input
*ngIf="taskList$ | async as taskList"
placeholder="Search..."
(searchChange)="onSearch($event)"
></app-search-input>
<div class="task-list-section-height">
<ng-container
class="overflow-y-auto"
*ngIf="filteredTaskList$ | async as taskList"
>
<app-list-item
[payload]="{
description: task.acceptance,
name: task.list,
id: task.id,
jiraTicketId: task.subTaskTicketId,
}"
[tag]="task.id"
*ngFor="let task of taskList"
(click)="navigateToEditTask(task.id, selectedUserStory?.id)"
>
<div class="absolute top-4 right-4">
<app-button
theme="secondary_outline"
size="xs"
rounded="lg"
[isIconButton]="true"
icon="heroDocumentDuplicate"
(click)="copyTaskContent($event, task)"
matTooltip="Copy"
/>
</div>
</app-list-item>
<div
class="flex items-center justify-center"
*ngIf="taskList.length === 0"
>
<h1 class="font-semibold w-full text-center mt-3">
No Tasks Available.
</h1>
</div>
</ng-container>
</div>
</div>
</div>
</div>