Skip to content

Commit

Permalink
Merge pull request #2012 from bcgov/feature/ALCS-2313-QA-1
Browse files Browse the repository at this point in the history
2312 QA 1
  • Loading branch information
trslater authored Dec 12, 2024
2 parents 6bc43e4 + 3360061 commit 5c0f3f6
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ <h4>{{ isEdit ? 'Edit' : 'Create' }} Decision Condition Type</h4>
class="condition-date-types"
>
<mat-radio-button [value]="DateType.SINGLE">Single - Select date label </mat-radio-button>
<div class="condition-fields-container" *ngIf="conditionTypeForm.value.dateType === 'single'">
<div class="condition-fields-container" *ngIf="conditionTypeForm.value.dateType === DateType.SINGLE">
<mat-button-toggle-group
id="singleDateLabelId"
formControlName="singleDateLabel"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ export class DecisionConditionTypesDialogComponent {
return (control: AbstractControl): Observable<{ [key: string]: any } | null> => {
return of(control.value).pipe(
debounceTime(300),
switchMap((isDateChecked) => {
switchMap(() => {
if (!this.conditionService) {
throw Error('Condition service not found');
}
Expand All @@ -155,9 +155,7 @@ export class DecisionConditionTypesDialogComponent {
map((conditions) =>
!control.value && conditions && this.hasAnyDates(conditions) ? { hasConditions: true } : null,
),
catchError((e) => {
return of({ hasConditions: true });
}),
catchError((e) => of({ hasConditions: true })),
);
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,6 @@ export class DecisionConditionComponent implements OnInit, OnChanges {
})
.beforeClosed()
.subscribe(async (dates: DueDate[]) => {
if (!this.uuid) {
return;
}
this.dates = dates.map((date) => ({
uuid: date.uuid,
date: date.date?.toDate().getTime(),
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { MigrationInterface, QueryRunner } from 'typeorm';

export class AddDateAndAdminFee1733774036308 implements MigrationInterface {
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(
`UPDATE "alcs"."application_decision_condition_type" SET "is_administrative_fee_amount_checked" = true, "date_type" = 'Single', "single_date_label" = 'Due Date' WHERE "code" NOT IN ('SRPT', 'UEND')`,
);
await queryRunner.query(
`UPDATE "alcs"."notice_of_intent_decision_condition_type" SET "is_administrative_fee_amount_checked" = true, "date_type" = 'Single', "single_date_label" = 'Due Date' WHERE "code" NOT IN ('SRPT', 'UEND')`,
);
}

public async down(queryRunner: QueryRunner): Promise<void> {
// N/A
}
}

0 comments on commit 5c0f3f6

Please sign in to comment.