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

#3831 - SINF restriction bridge mapping and rename to SINR #3846

Merged
merged 2 commits into from
Oct 30, 2024
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 @@ -326,7 +326,7 @@ export class StudentRestrictionService extends RecordDataModelService<StudentRes

const hasSINRestriction = await this.studentHasRestriction(
studentId,
RestrictionCode.SINF,
RestrictionCode.SINR,
);
if (hasSINRestriction) {
// The student already has an active SIN restriction, avoid adding it again.
Expand All @@ -351,7 +351,7 @@ export class StudentRestrictionService extends RecordDataModelService<StudentRes
const restriction =
await this.studentRestrictionSharedService.createRestrictionToSave(
studentId,
RestrictionCode.SINF,
RestrictionCode.SINR,
auditUserId,
applicationId,
);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { MigrationInterface, QueryRunner } from "typeorm";
import { getSQLFileData } from "../utilities/sqlLoader";

export class UpdateSINRestriction1730141787641 implements MigrationInterface {
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(
getSQLFileData("Update-sin-restriction.sql", "Restrictions"),
);
}

public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(
getSQLFileData("Rollback-update-sin-restriction.sql", "Restrictions"),
);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
-- Revert the updates for the restriction SINR
UPDATE
sims.restrictions
SET
restriction_code = 'SINF'
WHERE
restriction_code = 'SINR';
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
-- Update restriction_code for the restriction code SINF
UPDATE
sims.restrictions
SET
restriction_code = 'SINR'
WHERE
restriction_code = 'SINF';
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
100AESTSFAS TO SIMS BRIDGE 20211119142437
2001010101010JOHN FOUR 19980324900041310 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
40010101010100964351111TREE20180927
40010101010100964351111SINF20180927
40010101010100964351115CROW20180928
999000011431002573803010624
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export enum RestrictionCode {
* When a student has a temporary SIN and applies for a full-time/part-time application
* this restriction is applied case the SIN expiry date is before the offering end date.
*/
SINF = "SINF",
SINR = "SINR",
/**
* BCSL Lifetime Maximum is the student's cumulative full-time BCSL awards received over
* a lifetime. This restriction is added to a student when they reach BC lifetime maximum
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3084,7 +3084,7 @@
"id": "eaaszn"
},
{
"title": "Code SINF - Temporary Social Insurance Number (SIN) expiration",
"title": "Code SINR - Temporary Social Insurance Number (SIN) expiration",
"labelWidth": "",
"labelMargin": "",
"theme": "default",
Expand Down