Skip to content

Commit

Permalink
feat(FN-3819): review markups
Browse files Browse the repository at this point in the history
  • Loading branch information
Zain Kassam committed Jan 31, 2025
1 parent 4274fdb commit 1b38c7d
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ export const generateFeeRecordCorrectionRequestEmailParameters = (
reportPeriod: ReportPeriod,
exporter: string,
requestedByUserEmail: string,
recipient: string,
paymentOfficerTeamName: string,
paymentOfficerTeamEmails: string[],
): FeeRecordCorrectionRequestEmails => {
const reportPeriodString = getFormattedReportPeriodWithLongMonth(reportPeriod);

return {
emails: [...paymentOfficerTeamEmails, requestedByUserEmail],
variables: {
recipient,
recipient: paymentOfficerTeamName,
reportPeriod: reportPeriodString,
exporterName: exporter,
reasonsList: formatReasonsAsBulletedListForEmail(reasons),
Expand All @@ -53,9 +53,9 @@ export const generateFeeRecordCorrectionRequestEmailParameters = (
* @param reasons - The reasons for the record correction request
* @param reportPeriod - The report period of the fee's report
* @param exporter - The exporter of the fee record
* @param bankId - The id of the bank
* @param requestedByUserEmail - The email of the TFM user who is
* requesting the correction
* @param requestedByUserEmail - The email of the TFM user who is requesting the correction
* @param paymentOfficerTeamName - The name of the bank payment officer team
* @param paymentOfficerTeamEmails - The email addresses of the bank payment officer team
* @returns A promise that resolves to an object containing the email addresses
* that were notified.
*/
Expand All @@ -64,15 +64,15 @@ export const sendFeeRecordCorrectionRequestEmails = async (
reportPeriod: ReportPeriod,
exporter: string,
requestedByUserEmail: string,
recipient: string,
paymentOfficerTeamName: string,
paymentOfficerTeamEmails: string[],
): Promise<FeeRecordCorrectionRequestEmailAddresses> => {
const { emails, variables } = generateFeeRecordCorrectionRequestEmailParameters(
reasons,
reportPeriod,
exporter,
requestedByUserEmail,
recipient,
paymentOfficerTeamName,
paymentOfficerTeamEmails,
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ export class AddFeeRecordCorrectionTable1732803141766 implements MigrationInterf
"dateRequested" datetime2 NOT NULL CONSTRAINT "DF_489233b45b51a528c7c12d9e999" DEFAULT getdate(),
"isCompleted" bit NOT NULL,
"feeRecordId" int NOT NULL,
"bankTeamName" nvarchar(500),
"bankTeamEmails" nvarchar(1000),
"requestedByUserId" nvarchar(255) NOT NULL,
"requestedByUserFirstname" nvarchar(255) NOT NULL,
"requestedByUserLastname" nvarchar(255) NOT NULL,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { MigrationInterface, QueryRunner } from 'typeorm';

export class AddFeeRecordCorrectionBankTeamNameAndEmailsColumns1738320805938 implements MigrationInterface {
name = 'AddFeeRecordCorrectionBankTeamNameAndEmailsColumns1738320805938';

public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`
ALTER TABLE "FeeRecordCorrection"
ADD "bankTeamName" nvarchar(500) NOT NULL
`);
await queryRunner.query(`
ALTER TABLE "FeeRecordCorrection"
ADD "bankTeamEmails" nvarchar(1000) NOT NULL
`);
}

public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`
ALTER TABLE "FeeRecordCorrection" DROP COLUMN "bankTeamEmails"
`);
await queryRunner.query(`
ALTER TABLE "FeeRecordCorrection" DROP COLUMN "bankTeamName"
`);
}
}

0 comments on commit 1b38c7d

Please sign in to comment.