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

ORV2-1346 #670

Merged
merged 57 commits into from
Oct 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
d60e03d
Consolidate user auth group types on frontend, refactor user auth gro…
zgong-gov Aug 23, 2023
04ce413
Merge branch 'main' into ORV2-1346
zgong-gov Aug 23, 2023
41d714c
Add Void Permit page and routes, add method to get permit by id, add …
zgong-gov Aug 29, 2023
50fe69b
Fix order of permit related controllers to be loaded
zgong-gov Aug 29, 2023
37ad339
Update styles for Banner, create and use context and hook for void pe…
zgong-gov Aug 31, 2023
255fdbc
Add revoke dialog and styles, change styles and layout for void permi…
zgong-gov Sep 1, 2023
99d12ae
Add finish void page and styles, refactor fee summary component
zgong-gov Sep 2, 2023
32916f9
Add transaction history table component
zgong-gov Sep 2, 2023
335c0a3
Merge branch 'main' into ORV2-1346
zgong-gov Sep 11, 2023
c64e600
Merge branch 'main' into ORV2-1346
zgong-gov Sep 12, 2023
5b09a47
Merge branch 'main' into ORV2-1346
zgong-gov Sep 13, 2023
7a67b3a
Merge branch 'main' into ORV2-1346, resolve conflicts
zgong-gov Sep 13, 2023
94ac741
Refactor code related to permit status on frontend
zgong-gov Sep 15, 2023
e689a83
Add validation rules and styles for reason input field for void and r…
zgong-gov Sep 15, 2023
9f59762
Refactor fee summary code, add permit history helper methods
zgong-gov Sep 16, 2023
a3e157d
Add missing fields to BE permit and history dtos, update FE transacti…
zgong-gov Sep 17, 2023
032fa07
Refactor error pages and styles, refactor and add permissions for per…
zgong-gov Sep 18, 2023
eeb15f1
Consolidate payment and refund method types, fix and refactor code re…
zgong-gov Sep 20, 2023
0a0e3f8
Merge branch 'main' into ORV2-1346
zgong-gov Sep 20, 2023
e01466e
Refactor finish void page and refund components and pages for reuse
zgong-gov Sep 21, 2023
32c8beb
Update v_7_ddl for introducing transaction type table
praju-aot Sep 21, 2023
53655e4
Refactor and move code into different folders for application related…
zgong-gov Sep 22, 2023
5e6678d
Merge branch 'main' into ORV2-1346
zgong-gov Sep 22, 2023
07a2324
Fix permit success page bugs for ORV2-1473, ORV2-813, ORV2-1436
zgong-gov Sep 22, 2023
e3e1443
Refactor term oversize form and vehicle saving code
zgong-gov Sep 22, 2023
df33391
Refactor permit review and payment components' code and styles
zgong-gov Sep 26, 2023
bd21c03
Refactor and consolidate permit types on the frontend
zgong-gov Sep 27, 2023
e413699
ORV2-1401 Clean up Payment Module
praju-aot Sep 27, 2023
b339f80
Merge remote-tracking branch 'origin/main' into ORV2-1401-v1
praju-aot Sep 27, 2023
3f05e83
Formatting
praju-aot Sep 27, 2023
547341b
Merge branch 'main' into ORV2-1346
zgong-gov Sep 27, 2023
81622bb
Remove unused redundant fee summary component
zgong-gov Sep 27, 2023
aee4c76
ORV2-1401 Issue permit
praju-aot Sep 27, 2023
37e75b0
Update documentation
praju-aot Sep 27, 2023
0914e09
Merge branch 'ORV2-1401-v1' into ORV2-1346, fix merge conflicts
zgong-gov Sep 28, 2023
59dc5c8
Changes for Date and user fields
gchauhan-aot Sep 28, 2023
f99cd68
linting and formatting
gchauhan-aot Sep 28, 2023
8d0e380
Changes for permit number and permit data table
gchauhan-aot Sep 29, 2023
8c43f05
formatting
gchauhan-aot Sep 29, 2023
cacd9b0
Merge branch 'main' into ORV2-1346
zgong-gov Sep 29, 2023
e2933e8
Merge branch 'ORV2-1401-v1' into ORV2-1346
zgong-gov Sep 29, 2023
811b4b1
Integrate frontend code with payment related backend logic
zgong-gov Sep 29, 2023
a484396
Refactor void and revoke types, complete void and revoke functionalit…
zgong-gov Sep 30, 2023
59ebdcb
ORV2-1401 Add Void Template
praju-aot Sep 30, 2023
c5737c3
Void permit bug fixes and pdf generation
praju-aot Sep 30, 2023
1679f48
Merge branch 'ORV2-1401-v1' into ORV2-1346, resolve conflicts
zgong-gov Oct 3, 2023
1d65654
Fix code smells
zgong-gov Oct 4, 2023
ca9c564
Merge branch 'main' into ORV2-1346
zgong-gov Oct 4, 2023
c1bef1e
Fix code smells
zgong-gov Oct 4, 2023
9f90fa5
Fix code smells
zgong-gov Oct 4, 2023
796c378
Merge remote-tracking branch 'origin/main' into ORV2-1346
praju-aot Oct 5, 2023
3106ec9
Code format, REVOKED template, Linting.
praju-aot Oct 5, 2023
1796242
Sonar cloud fixes
praju-aot Oct 5, 2023
fa97a80
Merge branch 'main' into ORV2-1346
zgong-gov Oct 5, 2023
100381a
Changes for ApprovalSoureId
gchauhan-aot Oct 5, 2023
4873c61
Merge branch 'ORV2-1346' of https://github.com/bcgov/onroutebc into O…
gchauhan-aot Oct 5, 2023
bfc9dd0
adding comment to new permit
gchauhan-aot Oct 5, 2023
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
2 changes: 2 additions & 0 deletions backend/dops/src/enum/template-name.enum.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
export enum TemplateName {
PERMIT_TROS = 'PERMIT_TROS',
PAYMENT_RECEIPT = 'PAYMENT_RECEIPT',
PERMIT_TROS_VOID = 'PERMIT_TROS_VOID',
PERMIT_TROS_REVOKED = 'PERMIT_TROS_REVOKED',
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export enum ApplicationStatus {
UNDER_REVIEW = 'UNDER_REVIEW',
WAITING_APPROVAL = 'WAITING_APPROVAL',
WAITING_PAYMENT = 'WAITING_PAYMENT',
PAYMENT_COMPLETE = 'PAYMENT_COMPLETE',
ISSUED = 'ISSUED',
SUPERSEDED = 'SUPERSEDED',
REVOKED = 'REVOKED',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export enum PaymentMethodType {
WEB = '1',
}
2 changes: 2 additions & 0 deletions backend/vehicles/src/common/enum/template-name.enum.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
export enum TemplateName {
PERMIT_TROS = 'PERMIT_TROS',
PAYMENT_RECEIPT = 'PAYMENT_RECEIPT',
PERMIT_TROS_VOID = 'PERMIT_TROS_VOID',
PERMIT_TROS_REVOKED = 'PERMIT_TROS_REVOKED',
}
9 changes: 9 additions & 0 deletions backend/vehicles/src/common/enum/transaction-type.enum.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
export enum TransactionType {
PURCHASE = 'P',
REFUND = 'R',
ZERO_AMOUNT = 'Z',
VOID_REFUND = 'VR',
VOID_PURHCASE = 'VC',
PRE_AUTH = 'PA',
PRE_AUTH_COMPLETION = 'PAC',
}
6 changes: 0 additions & 6 deletions backend/vehicles/src/common/interface/receipt.interface.ts

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
import { AutoMap } from '@automapper/classes';
import { ApiProperty } from '@nestjs/swagger';
import {
IsNumber,
IsOptional,
IsPositive,
IsString,
Length,
Max,
Min,
} from 'class-validator';

export class PaymentGatewayTransactionDto {
@AutoMap()
@ApiProperty({
example: '10000148',
description:
'Bambora-assigned eight-digit unique id number used to identify an individual transaction.',
})
@IsOptional()
@IsString()
pgTransactionId: string;

@AutoMap()
@ApiProperty({
example: '1',
description:
'Represents the approval result of a transaction. 0 = Transaction refused, 1 = Transaction approved',
})
@IsOptional()
@IsNumber()
@IsPositive()
pgApproved: number;

@AutoMap()
@ApiProperty({
example: 'TEST',
description:
'Represents the auth code of a transaction. If the transaction is approved this parameter will contain a unique bank-issued code.',
})
@IsOptional()
@IsString()
@Length(1, 32)
pgAuthCode: string;

@AutoMap()
@ApiProperty({
example: 'VI',
description: 'Represents the type of card used in the transaction.',
})
@IsOptional()
@IsString()
@Length(1, 2)
pgCardType: string;

@AutoMap()
@ApiProperty({
example: '6/23/2023 10:57:28 PM',
description:
'Represents the date and time that the transaction was processed.',
})
@IsOptional()
@IsString()
pgTransactionDate: string;

@AutoMap()
@ApiProperty({
example: '1',
description: 'Represents the card cvd match status.',
})
@IsOptional()
@IsNumber()
@IsPositive()
@Min(1)
@Max(6)
pgCvdId: number;

@AutoMap()
@ApiProperty({
example: 'CC',
description: 'Represents the payment method of a transaction.',
})
@IsOptional()
@IsString()
@Length(1, 2)
pgPaymentMethod: string;

@AutoMap()
@ApiProperty({
example: 111,
description:
'References a detailed approved/declined transaction response message.',
})
@IsOptional()
@IsNumber()
@IsPositive()
pgMessageId: number;

@AutoMap()
@ApiProperty({
example: 'Approved',
description:
'Represents basic approved/declined message for a transaction.',
})
@IsOptional()
@IsString()
@Length(1, 100)
pgMessageText: string;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { AutoMap } from '@automapper/classes';
import { ApiProperty } from '@nestjs/swagger';
import { IsNumber, IsNumberString, IsPositive } from 'class-validator';

export class CreateApplicationTransactionDto {
@AutoMap()
@ApiProperty({
description: 'Application/Permit Id.',
example: '1',
})
@IsNumberString()
applicationId: string;

@AutoMap()
@ApiProperty({
example: '30.00',
description: 'Represents the amount of the transaction.',
})
@IsNumber()
@IsPositive()
transactionAmount: number;
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,134 +1,41 @@
import { AutoMap } from '@automapper/classes';
import { ApiProperty } from '@nestjs/swagger';
import { IsNumber, IsString, MaxLength } from 'class-validator';

export class CreateTransactionDto {
// @AutoMap()
// @ApiProperty({
// example: '1',
// description: 'Unique identifier for the transaction metadata.',
// })
// transactionId: number;

@AutoMap()
@ApiProperty({
example: 'P',
description:
'Represents the original value sent to indicate the type of transaction to perform (i.e. P, R, VP, VR, PA, PAC, Q).',
})
@IsString()
@MaxLength(3)
transactionType: string;

@AutoMap()
@ApiProperty({
example: 'T-1687586193681',
description: 'Represents the auth code of a transaction.',
})
@IsString()
transactionOrderNumber: string;

@AutoMap()
@ApiProperty({
example: '10000148',
description:
'Bambora-assigned eight-digit unique id number used to identify an individual transaction.',
})
@IsNumber()
providerTransactionId: number;

@AutoMap()
@ApiProperty({
example: '30.00',
description: 'Represents the amount of the transaction.',
})
@IsNumber()
transactionAmount: number;

@AutoMap()
@ApiProperty({
example: '1',
description:
'Represents the approval result of a transaction. 0 = Transaction refused, 1 = Transaction approved',
})
@IsNumber()
approved: number;
import { ArrayMinSize, IsArray, IsEnum, ValidateNested } from 'class-validator';
import { TransactionType } from '../../../../common/enum/transaction-type.enum';
import { PaymentMethodType } from '../../../../common/enum/payment-method-type.enum';
import { CreateApplicationTransactionDto } from './create-application-transaction.dto';
import { Type } from 'class-transformer';
import { PaymentGatewayTransactionDto } from '../common/payment-gateway-transaction.dto';

export class CreateTransactionDto extends PaymentGatewayTransactionDto {
@AutoMap()
@ApiProperty({
example: 'TEST',
enum: TransactionType,
example: TransactionType.PURCHASE,
description:
'Represents the auth code of a transaction. If the transaction is approved this parameter will contain a unique bank-issued code.',
'Represents the original value sent to indicate the type of transaction to perform.',
})
@IsString()
authCode: string;
@IsEnum(TransactionType)
transactionTypeId: TransactionType;

@AutoMap()
@ApiProperty({
example: 'VI',
description: 'Represents the type of card used in the transaction.',
})
@IsString()
cardType: string;

@AutoMap()
@ApiProperty({
example: '6/23/2023 10:57:28 PM',
description:
'Represents the date and time that the transaction was processed.',
})
@IsString()
transactionDate: string;

@AutoMap()
@ApiProperty({
example: '1',
description: 'Represents the card cvd match status.',
})
@IsNumber()
cvdId: number;

@AutoMap()
@ApiProperty({
example: 'CC',
description: 'Represents the payment method of a transaction.',
})
@IsString()
paymentMethod: string;

@AutoMap()
@ApiProperty({
example: 1,
enum: PaymentMethodType,
example: PaymentMethodType.WEB,
description: 'The identifier of the user selected payment method.',
})
@IsNumber()
paymentMethodId: number;

@AutoMap()
@ApiProperty({
example: '111',
description:
'References a detailed approved/declined transaction response message.',
})
@IsString()
messageId: string;
@IsEnum(PaymentMethodType)
paymentMethodId: PaymentMethodType;

@AutoMap()
@ApiProperty({
example: 'Approved',
description:
'Represents basic approved/declined message for a transaction.',
description: 'The transaction details specific to application/permit.',
required: true,
type: [CreateApplicationTransactionDto],
})
@IsString()
messageText: string;

// @AutoMap()
// @ApiProperty({
// description: 'Application Ids.',
// isArray: true,
// type: String,
// example: ['1', '2'],
// })
// @IsNumberString({}, { each: true })
// applicationIds: string[];
@IsArray()
@ValidateNested({ each: true })
@ArrayMinSize(1)
@Type(() => CreateApplicationTransactionDto)
applicationDetails: CreateApplicationTransactionDto[];
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { PaymentGatewayTransactionDto } from '../common/payment-gateway-transaction.dto';

export class UpdatePaymentGatewayTransactionDto extends PaymentGatewayTransactionDto {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { CreateApplicationTransactionDto } from '../request/create-application-transaction.dto';

export class ReadApplicationTransactionDto extends CreateApplicationTransactionDto {}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { AutoMap } from '@automapper/classes';
import { PaymentGatewayTransactionDto } from '../common/payment-gateway-transaction.dto';
import { ApiProperty } from '@nestjs/swagger';

export class ReadPaymentGatewayTransactionDto extends PaymentGatewayTransactionDto {
@AutoMap()
@ApiProperty({
example: '1',
description: 'Unique identifier for the transaction metadata.',
})
transactionId: string;
}
Loading