Skip to content

Commit e6b6f4a

Browse files
authored
Merge pull request #2635 from bcgov/2526-document-type-updates
Update doc types
2 parents e6fcfdf + cb8fe21 commit e6b6f4a

File tree

6 files changed

+60
-4
lines changed

6 files changed

+60
-4
lines changed

alcs-frontend/src/app/features/compliance-and-enforcement/details/chronology/chronology.component.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,7 @@ export class ComplianceAndEnforcementChronologyComponent implements OnInit, Afte
3939
documentOptions: DocumentUploadDialogOptions = {
4040
allowedVisibilityFlags: [],
4141
allowsFileEdit: true,
42-
allowedDocumentSources: Object.values(DOCUMENT_SOURCE),
43-
allowedDocumentTypes: Object.values(DOCUMENT_TYPE),
44-
defaultDocumentType: DOCUMENT_TYPE.CORRESPONDENCE_FROM_PUBLIC,
42+
defaultDocumentSource: DOCUMENT_SOURCE.PUBLIC,
4543
};
4644

4745
fileNumber?: string;

alcs-frontend/src/app/features/compliance-and-enforcement/details/property-maps/property-maps.component.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ export const mapsDocumentOptions: DocumentUploadDialogData = {
3636
DOCUMENT_TYPE.AMENDMENT_MAP,
3737
DOCUMENT_TYPE.CAPABILITY_MAP,
3838
DOCUMENT_TYPE.TENURE_MAP,
39+
DOCUMENT_TYPE.GOOGLE_EARTH_FILE,
3940
],
4041
};
4142

alcs-frontend/src/app/features/compliance-and-enforcement/details/responsible-parties/responsible-parties.component.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ export const ownershipDocumentOptions: DocumentUploadDialogData = {
3636
DOCUMENT_TYPE.CORPORATE_SUMMARY,
3737
DOCUMENT_TYPE.BC_ASSESSMENT_REPORT,
3838
DOCUMENT_TYPE.SURVEY_PLAN,
39+
DOCUMENT_TYPE.BC_ASSESSMENT_REPORT,
3940
],
4041
};
4142

alcs-frontend/src/app/features/compliance-and-enforcement/draft/draft.component.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ export class DraftComponent implements OnInit, AfterViewInit, OnDestroy {
7878
DOCUMENT_TYPE.CORPORATE_SUMMARY,
7979
DOCUMENT_TYPE.BC_ASSESSMENT_REPORT,
8080
DOCUMENT_TYPE.SURVEY_PLAN,
81+
DOCUMENT_TYPE.BC_ASSESSMENT_REPORT,
8182
],
8283
};
8384

alcs-frontend/src/app/shared/document/document.dto.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,11 @@ export enum DOCUMENT_TYPE {
3939
// C&E
4040
COMPLAINT = 'CMPL',
4141
BC_ASSESSMENT_REPORT = 'BCAR',
42-
CORRESPONDENCE_FROM_PUBLIC = 'CORP',
42+
CORRESPONDENCE = 'CORP',
43+
C_AND_E_NOTICE = 'CAEL',
44+
C_AND_E_ORDER = 'CEOO',
45+
C_AND_E_INSPECTION = 'INSP',
46+
GOOGLE_EARTH_FILE = 'GEFI',
4347

4448
// Maps
4549
ALC_CONTEXT_MAP = 'LMAP',
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
import { MigrationInterface, QueryRunner } from 'typeorm';
2+
3+
export class UpdateDocTypes1763605146030 implements MigrationInterface {
4+
public async up(queryRunner: QueryRunner): Promise<void> {
5+
queryRunner.query(`
6+
update
7+
alcs.document_code dc
8+
set
9+
label = case
10+
when code = 'CORP' then 'Correspondence'
11+
when code = 'CAEL' then 'C&E Notice'
12+
when code = 'CEOO' then 'C&E Order'
13+
else dc.label
14+
end;
15+
`);
16+
17+
queryRunner.query(`
18+
insert into
19+
alcs.document_code (
20+
audit_created_by,
21+
label,
22+
code,
23+
description,
24+
oats_code
25+
)
26+
values (
27+
'migration_seed',
28+
'BC Assessment Report',
29+
'BCAR',
30+
'BC Assessment Report',
31+
'BCAR'
32+
),
33+
(
34+
'migration_seed',
35+
'C&E Inspection Report',
36+
'INSP',
37+
'C&E Inspection Report',
38+
'INSP'
39+
),
40+
(
41+
'migration_seed',
42+
'Google Earth File',
43+
'GEFI',
44+
'Google Earth File',
45+
'GEFI'
46+
);
47+
`);
48+
}
49+
50+
public async down(queryRunner: QueryRunner): Promise<void> {}
51+
}

0 commit comments

Comments
 (0)