2
2
< h4 *ngIf ="condition.type "> {{ stringIndex }}. {{ condition.type.label }}</ h4 >
3
3
< app-application-type-pill [type] ="statusLabel "> </ app-application-type-pill >
4
4
</ div >
5
- < div class =" grid-3 ">
5
+ < div [ngClass] =" isThreeColumn ? ' grid-3' : 'grid-2' ">
6
6
< div >
7
7
< div class ="subheading2 "> Component to Condition</ div >
8
8
< span class ="component-labels "> {{ condition.componentLabelsStr }}</ span >
@@ -17,14 +17,6 @@ <h4 *ngIf="condition.type">{{ stringIndex }}. {{ condition.type.label }}</h4>
17
17
> </ app-no-data >
18
18
</ div >
19
19
20
- < div *ngIf ="showSingleDateField ">
21
- < div class ="subheading2 "> {{ singleDateLabel }}</ div >
22
- {{ singleDateFormated }}
23
- < app-no-data
24
- *ngIf ="singleDateFormated === null || singleDateFormated === undefined "
25
- > </ app-no-data >
26
- </ div >
27
-
28
20
< div *ngIf ="showSecurityAmountField ">
29
21
< div class ="subheading2 "> Security Amount</ div >
30
22
{{ condition.securityAmount }}
@@ -82,23 +74,146 @@ <h4 *ngIf="condition.type">{{ stringIndex }}. {{ condition.type.label }}</h4>
82
74
</ div >
83
75
</ div >
84
76
</ div >
77
+ </ div >
78
+
79
+ < div class ="dates-container " *ngIf ="condition.dates !== undefined && condition.type?.isDateChecked ">
80
+ < ng-container *ngIf ="showSingleDateField; else showMultipleDateTable ">
81
+ < ng-container *ngIf ="singleDateLabel === 'Due Date'; else showEndDateContainer ">
82
+ < div class ="single-table ">
83
+ < div class ="single-table-header ">
84
+ < div class ="single-column single-due ">
85
+ < div class ="subheading2 "> Due</ div >
86
+ </ div >
87
+ < div class ="single-column single-completed ">
88
+ < div class ="subheading2 "> Completed</ div >
89
+ </ div >
90
+ < div class ="single-column single-comment ">
91
+ < div class ="subheading2 "> Comment</ div >
92
+ </ div >
93
+ </ div >
94
+
95
+ < hr class ="divider " />
96
+
97
+ < div class ="single-table-row ">
98
+ < div class ="single-column single-due ">
99
+ < app-inline-datepicker
100
+ [value] ="condition.dates[0].date ?? undefined "
101
+ (save) ="updateDate(condition.dates[0].uuid!, 'date', $event) "
102
+ > </ app-inline-datepicker >
103
+ </ div >
104
+ < div class ="single-column single-completed ">
105
+ < app-inline-datepicker
106
+ [value] ="condition.dates[0].completedDate ?? undefined "
107
+ (save) ="updateDate(condition.dates[0].uuid!, 'completedDate', $event) "
108
+ > </ app-inline-datepicker >
109
+ </ div >
110
+ < div class ="single-column single-comment ">
111
+ < app-inline-text
112
+ [value] ="condition.dates[0].comment ?? undefined "
113
+ (save) ="updateDate(condition.dates[0].uuid!, 'comment', $event) "
114
+ > </ app-inline-text >
115
+ </ div >
116
+ </ div >
117
+ < hr class ="divider " />
118
+ </ div >
119
+ </ ng-container >
120
+ < ng-template #showEndDateContainer >
121
+ < div class ="single-table ">
122
+ < div class ="single-table-header ">
123
+ < div class ="single-column single-end ">
124
+ < div class ="subheading2 "> End Date</ div >
125
+ </ div >
126
+ </ div >
127
+
128
+ < hr class ="divider " />
129
+
130
+ < div class ="single-table-row ">
131
+ < div class ="single-column single-end ">
132
+ < app-inline-datepicker
133
+ [value] ="condition.dates[0].date ?? undefined "
134
+ (save) ="updateDate(condition.dates[0].uuid!, 'date', $event) "
135
+ > </ app-inline-datepicker >
136
+ </ div >
137
+ </ div >
138
+ < hr class ="divider " />
139
+ </ div >
140
+ </ ng-template >
141
+ </ ng-container >
142
+
143
+ < ng-template #showMultipleDateTable >
144
+ < table mat-table [dataSource] ="dataSource " matSort class ="multiple-table " style ="width: 100% ">
145
+ < ng-container matColumnDef ="index ">
146
+ < th mat-header-cell *matHeaderCellDef class ="multiple-index "> #</ th >
147
+ < td mat-cell *matCellDef ="let element "> {{ element.index }}</ td >
148
+ </ ng-container >
85
149
86
- < div class ="full-width ">
87
- < div class ="subheading2 "> Description</ div >
88
- < span
89
- class ="decision-condition-description "
90
- [id] ="condition.uuid + 'Description' "
91
- [ngClass] ="{ 'ellipsis-3': !isReadMoreClicked } "
92
- > {{ condition.description }}</ span
150
+ < ng-container matColumnDef ="due ">
151
+ < th mat-header-cell *matHeaderCellDef mat-sort-header class ="multiple-due "> Due</ th >
152
+ < td mat-cell *matCellDef ="let element ">
153
+ < app-inline-datepicker
154
+ [value] ="condition.dates[element.index - 1].date ?? undefined "
155
+ (save) ="updateDate(condition.dates[element.index - 1].uuid!, 'date', $event) "
156
+ > </ app-inline-datepicker >
157
+ </ td >
158
+ </ ng-container >
159
+
160
+ < ng-container matColumnDef ="completed ">
161
+ < th mat-header-cell *matHeaderCellDef mat-sort-header class ="multiple-completed "> Completed</ th >
162
+ < td mat-cell *matCellDef ="let element ">
163
+ < app-inline-datepicker
164
+ [value] ="condition.dates[element.index - 1].completedDate ?? undefined "
165
+ (save) ="updateDate(condition.dates[element.index - 1].uuid!, 'completedDate', $event) "
166
+ > </ app-inline-datepicker >
167
+ </ td >
168
+ </ ng-container >
169
+
170
+ < ng-container matColumnDef ="comment ">
171
+ < th mat-header-cell *matHeaderCellDef class ="multiple-comment "> Comment</ th >
172
+ < td mat-cell *matCellDef ="let element " class ="wrap-text ">
173
+ < app-inline-text
174
+ [value] ="condition.dates[element.index - 1].comment ?? undefined "
175
+ (save) ="updateDate(condition.dates[element.index - 1].uuid!, 'comment', $event) "
176
+ > </ app-inline-text >
177
+ </ td >
178
+ </ ng-container >
179
+
180
+ < ng-container matColumnDef ="action ">
181
+ < th mat-header-cell *matHeaderCellDef class ="multiple-action "> Action</ th >
182
+ < td mat-cell *matCellDef ="let element ">
183
+ < button mat-icon-button color ="primary " (click) ="onDeleteDate(element.uuid) " *ngIf ="dates.length > 1 ">
184
+ < mat-icon > delete</ mat-icon >
185
+ </ button >
186
+ </ td >
187
+ </ ng-container >
188
+
189
+ < tr mat-header-row *matHeaderRowDef ="displayColumns "> </ tr >
190
+ < tr mat-row *matRowDef ="let row; columns: displayColumns "> </ tr >
191
+ </ table >
192
+
193
+ < button type ="button " mat-stroked-button color ="primary " class ="add-date-btn " (click) ="addNewDate() ">
194
+ + DUE DATES
195
+ </ button >
196
+ </ ng-template >
197
+ </ div >
198
+
199
+ < div
200
+ class ="full-width "
201
+ [ngClass] ="{ 'description-no-date-container': !(condition.dates !== undefined && condition.type?.isDateChecked) } "
202
+ >
203
+ < div class ="subheading2 "> Description</ div >
204
+ < span
205
+ class ="decision-condition-description "
206
+ [id] ="condition.uuid + 'Description' "
207
+ [ngClass] ="{ 'ellipsis-3': !isReadMoreClicked } "
208
+ > {{ condition.description }}</ span
209
+ >
210
+ < app-no-data *ngIf ="condition.description === null || condition.description === undefined "> </ app-no-data >
211
+ < div class ="read-more ">
212
+ < a
213
+ (click) ="onToggleReadMore() "
214
+ (keypress) ="onToggleReadMore() "
215
+ [ngClass] ="{ 'display-none': !isReadMoreVisible || !condition.description } "
216
+ > {{ isReadMoreClicked ? 'Read Less' : 'Read More' }}</ a
93
217
>
94
- < app-no-data *ngIf ="condition.description === null || condition.description === undefined "> </ app-no-data >
95
- < div class ="read-more ">
96
- < a
97
- (click) ="onToggleReadMore() "
98
- (keypress) ="onToggleReadMore() "
99
- [ngClass] ="{ 'display-none': !isReadMoreVisible || !condition.description } "
100
- > {{ isReadMoreClicked ? 'Read Less' : 'Read More' }}</ a
101
- >
102
- </ div >
103
218
</ div >
104
219
</ div >
0 commit comments