@hmcts/ccpay-web-component 6.2.7 → 6.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/lib/components/add-remission/add-remission.component.mjs +20 -6
- package/esm2022/lib/components/payment-view/payment-view.component.mjs +3 -1
- package/esm2022/lib/payment-lib.component.mjs +88 -2
- package/fesm2022/hmcts-ccpay-web-component.mjs +105 -2
- package/fesm2022/hmcts-ccpay-web-component.mjs.map +1 -1
- package/lib/components/add-remission/add-remission.component.d.ts +5 -4
- package/lib/payment-lib.component.d.ts +47 -0
- package/package.json +1 -1
|
@@ -1,18 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { FormBuilder, FormGroup
|
|
1
|
+
import { ChangeDetectorRef, EventEmitter, OnInit } from '@angular/core';
|
|
2
|
+
import { FormArray, FormBuilder, FormGroup } from '@angular/forms';
|
|
3
3
|
import { IFee } from '../../interfaces/IFee';
|
|
4
4
|
import { Router } from '@angular/router';
|
|
5
5
|
import { PaymentViewService } from '../../services/payment-view/payment-view.service';
|
|
6
|
-
import type { PaymentLibComponent } from '../../payment-lib.component';
|
|
7
6
|
import { IPayment } from '../../interfaces/IPayment';
|
|
8
7
|
import { RefundsService } from '../../services/refunds/refunds.service';
|
|
9
8
|
import { NotificationService } from '../../services/notification/notification.service';
|
|
10
9
|
import { IRefundReasons } from '../../interfaces/IRefundReasons';
|
|
11
10
|
import { IRefundContactDetails } from '../../interfaces/IRefundContactDetails';
|
|
12
|
-
import { ChangeDetectorRef } from '@angular/core';
|
|
13
11
|
import { IRemission } from '../../interfaces/IRemission';
|
|
14
12
|
import { OrderslistService } from '../../services/orderslist.service';
|
|
15
13
|
import { IPaymentGroup } from '../../interfaces/IPaymentGroup';
|
|
14
|
+
import type { PaymentLibComponent } from '../../payment-lib.component';
|
|
16
15
|
import * as i0 from "@angular/core";
|
|
17
16
|
type PaymentLibAlias = PaymentLibComponent;
|
|
18
17
|
export declare class AddRemissionComponent implements OnInit {
|
|
@@ -194,6 +193,8 @@ export declare class AddRemissionComponent implements OnInit {
|
|
|
194
193
|
hideNotificationPreview(): void;
|
|
195
194
|
getTemplateInstructionType(paymentReference: string, payment?: IPayment): void;
|
|
196
195
|
getRefundAmountToBeDisplayed(remission: IRemission): string;
|
|
196
|
+
getRefundAmountToBeDisplayedForContinueJourney(): string;
|
|
197
|
+
getRemissionAmountToBeDisplayed(remission: IRemission): string;
|
|
197
198
|
static ɵfac: i0.ɵɵFactoryDeclaration<AddRemissionComponent, never>;
|
|
198
199
|
static ɵcmp: i0.ɵɵComponentDeclaration<AddRemissionComponent, "ccpay-add-remission", never, { "fee": { "alias": "fee"; "required": false; }; "fees": { "alias": "fees"; "required": false; }; "payment": { "alias": "payment"; "required": false; }; "remission": { "alias": "remission"; "required": false; }; "ccdCaseNumber": { "alias": "ccdCaseNumber"; "required": false; }; "caseType": { "alias": "caseType"; "required": false; }; "viewCompStatus": { "alias": "viewCompStatus"; "required": false; }; "paymentGroupRef": { "alias": "paymentGroupRef"; "required": false; }; "isTurnOff": { "alias": "isTurnOff"; "required": false; }; "isRefundRemission": { "alias": "isRefundRemission"; "required": false; }; "isStrategicFixEnable": { "alias": "isStrategicFixEnable"; "required": false; }; "paidAmount": { "alias": "paidAmount"; "required": false; }; "isFromRefundListPage": { "alias": "isFromRefundListPage"; "required": false; }; "isFromPaymentDetailPage": { "alias": "isFromPaymentDetailPage"; "required": false; }; "isFromServiceRequestPage": { "alias": "isFromServiceRequestPage"; "required": false; }; "isFullyRefund": { "alias": "isFullyRefund"; "required": false; }; "feeamount": { "alias": "feeamount"; "required": false; }; "refundPaymentReference": { "alias": "refundPaymentReference"; "required": false; }; "isFromRefundStatusPage": { "alias": "isFromRefundStatusPage"; "required": false; }; "changeRefundReason": { "alias": "changeRefundReason"; "required": false; }; "isServiceRequest": { "alias": "isServiceRequest"; "required": false; }; "LOGGEDINUSERROLES": { "alias": "LOGGEDINUSERROLES"; "required": false; }; "orderDetail": { "alias": "orderDetail"; "required": false; }; "orderRef": { "alias": "orderRef"; "required": false; }; "orderStatus": { "alias": "orderStatus"; "required": false; }; "orderParty": { "alias": "orderParty"; "required": false; }; "orderCreated": { "alias": "orderCreated"; "required": false; }; "orderCCDEvent": { "alias": "orderCCDEvent"; "required": false; }; "takePayment": { "alias": "takepayment"; "required": false; }; "orderFeesTotal": { "alias": "orderFeesTotal"; "required": false; }; "orderTotalPayments": { "alias": "orderTotalPayments"; "required": false; }; "orderRemissionTotal": { "alias": "orderRemissionTotal"; "required": false; }; }, { "cancelRemission": "cancelRemission"; "refundListReason": "refundListReason"; "refundListAmount": "refundListAmount"; "refundFees": "refundFees"; }, never, never, true, never>;
|
|
199
200
|
}
|
|
@@ -6,6 +6,7 @@ import { IPayment } from './interfaces/IPayment';
|
|
|
6
6
|
import { IPaymentGroup } from "./interfaces/IPaymentGroup";
|
|
7
7
|
import { IRefundList } from "./interfaces/IRefundList";
|
|
8
8
|
import { IFee } from "./interfaces/IFee";
|
|
9
|
+
import { AddRetroRemissionRequest } from "./interfaces/AddRetroRemissionRequest";
|
|
9
10
|
import * as i0 from "@angular/core";
|
|
10
11
|
export declare class PaymentLibComponent implements OnInit {
|
|
11
12
|
private paymentLibService;
|
|
@@ -75,6 +76,52 @@ export declare class PaymentLibComponent implements OnInit {
|
|
|
75
76
|
constructor(paymentLibService: PaymentLibService, cd: ChangeDetectorRef, OrderslistService: OrderslistService);
|
|
76
77
|
ngAfterContentChecked(): void;
|
|
77
78
|
ngOnInit(): void;
|
|
79
|
+
/**
|
|
80
|
+
* Adds a remission to the payment group using data from the provided form group.
|
|
81
|
+
*
|
|
82
|
+
* This method checks if the `paymentGroup` is not null before attempting to add the remission.
|
|
83
|
+
* If the `paymentGroup` exists, a new remission is created using the values from the provided
|
|
84
|
+
* form group (`currentRemissionFormGroup`), and it is pushed into the `remissions` array of the payment group.
|
|
85
|
+
*
|
|
86
|
+
* @param {AddRetroRemissionRequest} currentRemissionFormGroup - The form group containing remission data
|
|
87
|
+
* (e.g., `hwf_amount`, `hwf_reference`).
|
|
88
|
+
*/
|
|
89
|
+
addRemission(currentRemissionFormGroup: AddRetroRemissionRequest): void;
|
|
90
|
+
/**
|
|
91
|
+
* This method is used to set the paymentGroup for the add remission journey.
|
|
92
|
+
* @param updatedPaymentGroup this is an updated paymentGroup version.
|
|
93
|
+
*/
|
|
94
|
+
addPaymentGroup(updatedPaymentGroup: IPaymentGroup): void;
|
|
95
|
+
/**
|
|
96
|
+
* Calculates the total remission amount for the current payment group.
|
|
97
|
+
*
|
|
98
|
+
* This method checks if the payment group contains any remissions and, if so,
|
|
99
|
+
* sums up the `hwf_amount` of all remissions using the `reduce()` method.
|
|
100
|
+
* If no remissions are found, it returns a default value of 0.
|
|
101
|
+
*
|
|
102
|
+
* @returns {number} The total remission amount, or 0 if no remissions are present.
|
|
103
|
+
*/
|
|
104
|
+
getTotalRemission(): number;
|
|
105
|
+
/**
|
|
106
|
+
* Calculates the total fee amount for the current payment group.
|
|
107
|
+
*
|
|
108
|
+
* This method checks if the payment group contains any fees and, if so,
|
|
109
|
+
* sums up the `calculated_amount` of all fees using the `reduce()` method.
|
|
110
|
+
* If no fees are found, it returns a default value of 0.
|
|
111
|
+
*
|
|
112
|
+
* @returns {number} The total fee amount, or 0 if no fees are present.
|
|
113
|
+
*/
|
|
114
|
+
getTotalFees(): number;
|
|
115
|
+
/**
|
|
116
|
+
* Calculates the total payment amount for the current payment group.
|
|
117
|
+
*
|
|
118
|
+
* This method checks if the payment group contains any payments and, if so,
|
|
119
|
+
* sums up the `amount` of all payments using the `reduce()` method.
|
|
120
|
+
* If no payments are found, it returns a default value of 0.
|
|
121
|
+
*
|
|
122
|
+
* @returns {number} The total payment amount, or 0 if no payments are present.
|
|
123
|
+
*/
|
|
124
|
+
getTotalPayments(): number;
|
|
78
125
|
/**
|
|
79
126
|
* This function is used to find out if the current refunds list are in progress for the fee passed as parameter
|
|
80
127
|
* @param fee this is the fee used to find out if the refunds are in progress.
|