Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QA Fixes #2: 1871 #2073

Merged
merged 1 commit into from
Jan 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ <h3 class="card-title">
</ng-template>
</ng-container>
<ng-template #multipleDateColumn>
<span class="date-label">Due Date:</span>
<span class="date-label">Due Date: </span>
</ng-template>
<ng-container *ngIf="getDate(element.condition); else noDate">
{{ getDate(element.condition) }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,18 +155,26 @@ export class ApplicationDecisionConditionDialogComponent extends CardDialogCompo
if (condition.dates && condition.dates.length > 0) {
let minDueDate: ApplicationDecisionConditionDateDto | null = null;
let maxDueDate: ApplicationDecisionConditionDateDto | null = null;
let allDatesNull = true;

for (const date of condition.dates) {
if (!maxDueDate || date.date! > maxDueDate.date!) {
maxDueDate = date;
}
if (!date.completedDate) {
if (!minDueDate || date.date! < minDueDate.date!) {
minDueDate = date;
if (date.date !== null) {
allDatesNull = false;
if (!maxDueDate || date.date! > maxDueDate.date!) {
maxDueDate = date;
}
if (!date.completedDate) {
if (!minDueDate || date.date! < minDueDate.date!) {
minDueDate = date;
}
}
}
}

if (allDatesNull) {
return null;
}

const selectedDate = minDueDate || maxDueDate;
return selectedDate ? this.formatTimestamp(selectedDate.date!) : null;
}
Expand Down
Loading