Skip to content

Commit e3b3ee7

Browse files
authored
#2059 - Rename Item in Regulatory Dropdown Field for Institutions (#2077)
As a part of this PR, updated the **ITA** to **Skilled Trades BC** label in the Regulatory Program Dropdown of the Create Program Institution page. Screenshot of the dropdown menu for Create Program page: ![image](https://github.com/bcgov/SIMS/assets/7859295/033b037d-d32f-42c7-8051-18ea563bd1e8) Screenshot of the dropdown menu for Institution Create Profile page: <img width="1326" alt="image" src="https://github.com/bcgov/SIMS/assets/7859295/3be27320-32f4-41b9-8eaf-3046e8f634e6"> There is also database migration to change the existing **ita** values in the database to **skilledTradesBC** value for both the institutions and education programs relations.
1 parent 25b5203 commit e3b3ee7

8 files changed

+85
-8
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
import { MigrationInterface, QueryRunner } from "typeorm";
2+
import { getSQLFileData } from "../utilities/sqlLoader";
3+
4+
export class UpdateRegulatoryBodyCode1688501112255
5+
implements MigrationInterface
6+
{
7+
public async up(queryRunner: QueryRunner): Promise<void> {
8+
/*
9+
Update the regulating body ita to skilledTradesBC in education program relation.
10+
*/
11+
await queryRunner.query(
12+
getSQLFileData(
13+
"Update-regulatory-body-ita-code.sql",
14+
"EducationPrograms",
15+
),
16+
);
17+
/*
18+
Update the regulating body ita to skilledTradesBC in institution relation.
19+
*/
20+
await queryRunner.query(
21+
getSQLFileData("Update-regulatory-body-ita-code.sql", "Institution"),
22+
);
23+
}
24+
25+
public async down(queryRunner: QueryRunner): Promise<void> {
26+
/*
27+
Revert the regulatory body skilledTradesBC to ita in education program relation.
28+
*/
29+
await queryRunner.query(
30+
getSQLFileData(
31+
"Revert-regulatory-body-ita-code.sql",
32+
"EducationPrograms",
33+
),
34+
);
35+
/*
36+
Revert the regulatory body skilledTradesBC to ita in institution relation.
37+
*/
38+
await queryRunner.query(
39+
getSQLFileData("Revert-regulatory-body-ita-code.sql", "Institution"),
40+
);
41+
}
42+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/*
2+
Revert the regulatory body skilledTradesBC to ita in education programs relation.
3+
*/
4+
UPDATE
5+
sims.education_programs
6+
SET
7+
regulatory_body = 'ita'
8+
WHERE
9+
regulatory_body = 'skilledTradesBC';
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/*
2+
Update the regulatory body ita to skilledTradesBC in education programs relation.
3+
*/
4+
UPDATE
5+
sims.education_programs
6+
SET
7+
regulatory_body = 'skilledTradesBC'
8+
WHERE
9+
regulatory_body = 'ita';
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/*
2+
Revert the regulatory body skilledTradesBC to ita in institution relation.
3+
*/
4+
UPDATE
5+
sims.institutions
6+
SET
7+
regulating_body = 'ita'
8+
WHERE
9+
regulating_body = 'skilledTradesBC';
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/*
2+
Update the regulating body ita to skilledTradesBC in institution relation.
3+
*/
4+
UPDATE
5+
sims.institutions
6+
SET
7+
regulating_body = 'skilledTradesBC'
8+
WHERE
9+
regulating_body = 'ita';

sources/packages/forms/src/form-definitions/educationprogram.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -2865,8 +2865,8 @@
28652865
"value": "privateActLegislature"
28662866
},
28672867
{
2868-
"label": "ITA",
2869-
"value": "ita"
2868+
"label": "Skilled Trades BC",
2869+
"value": "skilledTradesBC"
28702870
},
28712871
{
28722872
"label": "ICBC",

sources/packages/forms/src/form-definitions/institutionprofile.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -608,8 +608,8 @@
608608
"value": "ptib"
609609
},
610610
{
611-
"label": "ITA",
612-
"value": "ita"
611+
"label": "Skilled Trades BC",
612+
"value": "skilledTradesBC"
613613
},
614614
{
615615
"value": "other",

sources/packages/forms/src/form-definitions/institutionprofilecreation.json

+3-4
Original file line numberDiff line numberDiff line change
@@ -1071,8 +1071,8 @@
10711071
"value": "ptib"
10721072
},
10731073
{
1074-
"label": "ITA",
1075-
"value": "ita"
1074+
"label": "Skilled Trades BC",
1075+
"value": "skilledTradesBC"
10761076
},
10771077
{
10781078
"value": "other",
@@ -1545,8 +1545,7 @@
15451545
"addons": [],
15461546
"inputType": "text",
15471547
"id": "eez2sc9",
1548-
"defaultValue": null,
1549-
"isNew": false
1548+
"defaultValue": null
15501549
}
15511550
],
15521551
"width": 6,

0 commit comments

Comments
 (0)