Skip to content

Commit a185a89

Browse files
authored
Merge pull request #2076 from bcgov/backport
Catch up backport
2 parents ce59d89 + 91940e0 commit a185a89

File tree

2 files changed

+58
-0
lines changed

2 files changed

+58
-0
lines changed

alcs-frontend/src/app/features/application/decision/decision-v2/decision-input/decision-components/decision-component/decision-component.component.html

+14
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,20 @@ <h5>{{ data.applicationDecisionComponentType?.label }}</h5>
1616
"
1717
class="row-no-flex"
1818
>
19+
<div class="full-width">
20+
<mat-form-field appearance="outline" class="row">
21+
<mat-label>ALR Area Impacted (ha)</mat-label>
22+
<input
23+
matInput
24+
min="0.01"
25+
mask="separator.5"
26+
thousandSeparator=","
27+
separatorLimit="9999999999"
28+
formControlName="alrArea"
29+
required
30+
/>
31+
</mat-form-field>
32+
</div>
1933
</div>
2034

2135
<div *ngIf="data.applicationDecisionComponentTypeCode === COMPONENT_TYPE.POFO" class="row-no-flex">
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
import { MigrationInterface, QueryRunner } from "typeorm";
2+
3+
export class AddingDateToConditions1737579030699 implements MigrationInterface {
4+
5+
public async up(queryRunner: QueryRunner): Promise<void> {
6+
await queryRunner.query(`
7+
WITH conditions AS
8+
(
9+
SELECT c.uuid, c.type_code, t.date_type, COUNT(d.uuid) AS dates_count
10+
FROM alcs.application_decision_condition c
11+
INNER JOIN alcs.application_decision_condition_type t ON t.code = c.type_code
12+
LEFT OUTER JOIN alcs.application_decision_condition_date d ON d.condition_uuid = c.uuid
13+
WHERE
14+
date_type = 'Single'
15+
GROUP BY c.uuid, c.type_code, t.date_type
16+
HAVING COUNT(d.uuid) = 0
17+
)
18+
INSERT INTO alcs.application_decision_condition_date
19+
(
20+
audit_created_at,
21+
audit_updated_at,
22+
audit_created_by,
23+
date,
24+
comment,
25+
condition_uuid,
26+
completed_date
27+
)
28+
SELECT
29+
now(),
30+
now(),
31+
'migration_seed',
32+
null,
33+
null,
34+
conditions.uuid,
35+
null
36+
FROM conditions;
37+
`);
38+
}
39+
40+
public async down(queryRunner: QueryRunner): Promise<void> {
41+
// N/A
42+
}
43+
44+
}

0 commit comments

Comments
 (0)