@hmcts/ccpay-web-component 5.0.1-beta18 → 5.0.1-beta19
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/bundles/hmcts-ccpay-web-component.umd.js +71 -76
- package/bundles/hmcts-ccpay-web-component.umd.js.map +1 -1
- package/bundles/hmcts-ccpay-web-component.umd.min.js +1 -1
- package/bundles/hmcts-ccpay-web-component.umd.min.js.map +1 -1
- package/esm2015/lib/components/refund-status/refund-status.component.js +77 -68
- package/esm5/lib/components/refund-status/refund-status.component.js +81 -80
- package/fesm2015/hmcts-ccpay-web-component.js +72 -67
- package/fesm2015/hmcts-ccpay-web-component.js.map +1 -1
- package/fesm5/hmcts-ccpay-web-component.js +76 -79
- package/fesm5/hmcts-ccpay-web-component.js.map +1 -1
- package/lib/components/refund-status/refund-status.component.d.ts +2 -0
- package/package.json +1 -1
|
@@ -8069,8 +8069,8 @@ var IResubmitRefundRequest = /** @class */ (function () {
|
|
|
8069
8069
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
8070
8070
|
*/
|
|
8071
8071
|
var RefundStatusComponent = /** @class */ (function () {
|
|
8072
|
-
// allowedRolesToAccessRefund = ['payments-refund-approver', 'payments-refund'];
|
|
8073
8072
|
function RefundStatusComponent(formBuilder, refundService, paymentLibComponent, paymentViewService, router, OrderslistService$$1) {
|
|
8073
|
+
var _this = this;
|
|
8074
8074
|
this.formBuilder = formBuilder;
|
|
8075
8075
|
this.refundService = refundService;
|
|
8076
8076
|
this.paymentLibComponent = paymentLibComponent;
|
|
@@ -8094,6 +8094,19 @@ var RefundStatusComponent = /** @class */ (function () {
|
|
|
8094
8094
|
this.isRefundBtnDisabled = true;
|
|
8095
8095
|
this.isLastUpdatedByCurrentUser = true;
|
|
8096
8096
|
this.isProcessRefund = false;
|
|
8097
|
+
this.allowedRolesToAccessRefund = ['payments-refund-approver', 'payments-refund'];
|
|
8098
|
+
this.check4AllowedRoles2AccessRefund = (/**
|
|
8099
|
+
* @return {?}
|
|
8100
|
+
*/
|
|
8101
|
+
function () {
|
|
8102
|
+
return _this.allowedRolesToAccessRefund.some((/**
|
|
8103
|
+
* @param {?} role
|
|
8104
|
+
* @return {?}
|
|
8105
|
+
*/
|
|
8106
|
+
function (role) {
|
|
8107
|
+
return _this.LOGGEDINUSERROLES.indexOf(role) !== -1;
|
|
8108
|
+
}));
|
|
8109
|
+
});
|
|
8097
8110
|
}
|
|
8098
8111
|
/**
|
|
8099
8112
|
* @return {?}
|
|
@@ -8103,93 +8116,77 @@ var RefundStatusComponent = /** @class */ (function () {
|
|
|
8103
8116
|
*/
|
|
8104
8117
|
function () {
|
|
8105
8118
|
var _this = this;
|
|
8106
|
-
|
|
8107
|
-
|
|
8108
|
-
|
|
8109
|
-
|
|
8110
|
-
|
|
8111
|
-
|
|
8112
|
-
|
|
8113
|
-
|
|
8114
|
-
|
|
8115
|
-
|
|
8116
|
-
|
|
8117
|
-
* @return {?}
|
|
8118
|
-
*/
|
|
8119
|
-
function (data) { return _this.refundlist = data; }));
|
|
8120
|
-
this.OrderslistService.getCCDCaseNumberforRefund.subscribe((/**
|
|
8121
|
-
* @param {?} data
|
|
8122
|
-
* @return {?}
|
|
8123
|
-
*/
|
|
8124
|
-
function (data) { return _this.ccdCaseNumber = data; }));
|
|
8125
|
-
}
|
|
8126
|
-
else {
|
|
8127
|
-
this.viewName = 'refundstatuslist';
|
|
8128
|
-
this.refundService.getRefundStatusList(this.ccdCaseNumber).subscribe((/**
|
|
8129
|
-
* @param {?} refundList
|
|
8130
|
-
* @return {?}
|
|
8131
|
-
*/
|
|
8132
|
-
function (refundList) {
|
|
8133
|
-
_this.rejectedRefundList = refundList['refund_list'];
|
|
8134
|
-
})),
|
|
8135
|
-
(/**
|
|
8136
|
-
* @param {?} error
|
|
8119
|
+
if (this.check4AllowedRoles2AccessRefund()) {
|
|
8120
|
+
this.resetRemissionForm([false, false, false, false], 'All');
|
|
8121
|
+
this.bsPaymentDcnNumber = this.paymentLibComponent.bspaymentdcn;
|
|
8122
|
+
this.isCallFromRefundList = this.paymentLibComponent.isCallFromRefundList;
|
|
8123
|
+
// if(this.paymentLibComponent.isFromRefundStatusPage) {
|
|
8124
|
+
// this.viewName = 'reviewandsubmitview';
|
|
8125
|
+
// }
|
|
8126
|
+
if (this.paymentLibComponent.isRefundStatusView) {
|
|
8127
|
+
this.viewName = 'refundview';
|
|
8128
|
+
this.OrderslistService.getRefundView().subscribe((/**
|
|
8129
|
+
* @param {?} data
|
|
8137
8130
|
* @return {?}
|
|
8138
8131
|
*/
|
|
8139
|
-
function (
|
|
8140
|
-
|
|
8141
|
-
|
|
8142
|
-
|
|
8143
|
-
|
|
8144
|
-
|
|
8145
|
-
Validators.required,
|
|
8146
|
-
Validators.pattern('^[0-9]+(\.[0-9]{1,2})?$')
|
|
8147
|
-
])),
|
|
8148
|
-
refundReason: new FormControl('', Validators.compose([Validators.required])),
|
|
8149
|
-
reason: new FormControl()
|
|
8150
|
-
});
|
|
8151
|
-
if (this.refundlist !== undefined) {
|
|
8152
|
-
this.getRefundsStatusHistoryList();
|
|
8153
|
-
if (this.LOGGEDINUSERROLES.some((/**
|
|
8154
|
-
* @param {?} i
|
|
8155
|
-
* @return {?}
|
|
8156
|
-
*/
|
|
8157
|
-
function (i) { return i.includes('payments-refund-approver'); }))) {
|
|
8158
|
-
this.isProcessRefund = true;
|
|
8159
|
-
this.refundButtonState = this.refundlist.refund_status.name;
|
|
8160
|
-
return;
|
|
8132
|
+
function (data) { return _this.refundlist = data; }));
|
|
8133
|
+
this.OrderslistService.getCCDCaseNumberforRefund.subscribe((/**
|
|
8134
|
+
* @param {?} data
|
|
8135
|
+
* @return {?}
|
|
8136
|
+
*/
|
|
8137
|
+
function (data) { return _this.ccdCaseNumber = data; }));
|
|
8161
8138
|
}
|
|
8162
|
-
|
|
8163
|
-
|
|
8164
|
-
|
|
8165
|
-
|
|
8166
|
-
|
|
8167
|
-
|
|
8168
|
-
|
|
8139
|
+
else {
|
|
8140
|
+
this.viewName = 'refundstatuslist';
|
|
8141
|
+
this.refundService.getRefundStatusList(this.ccdCaseNumber).subscribe((/**
|
|
8142
|
+
* @param {?} refundList
|
|
8143
|
+
* @return {?}
|
|
8144
|
+
*/
|
|
8145
|
+
function (refundList) {
|
|
8146
|
+
_this.rejectedRefundList = refundList['refund_list'];
|
|
8147
|
+
})),
|
|
8148
|
+
(/**
|
|
8149
|
+
* @param {?} error
|
|
8150
|
+
* @return {?}
|
|
8151
|
+
*/
|
|
8152
|
+
function (error) {
|
|
8153
|
+
_this.errorMessage = error.replace(/"/g, "");
|
|
8154
|
+
});
|
|
8155
|
+
}
|
|
8156
|
+
this.refundStatusForm = this.formBuilder.group({
|
|
8157
|
+
amount: new FormControl('', Validators.compose([
|
|
8158
|
+
Validators.required,
|
|
8159
|
+
Validators.pattern('^[0-9]+(\.[0-9]{1,2})?$')
|
|
8160
|
+
])),
|
|
8161
|
+
refundReason: new FormControl('', Validators.compose([Validators.required])),
|
|
8162
|
+
reason: new FormControl()
|
|
8163
|
+
});
|
|
8164
|
+
if (this.refundlist !== undefined) {
|
|
8165
|
+
this.getRefundsStatusHistoryList();
|
|
8166
|
+
if (this.LOGGEDINUSERROLES.some((/**
|
|
8167
|
+
* @param {?} i
|
|
8168
|
+
* @return {?}
|
|
8169
|
+
*/
|
|
8170
|
+
function (i) { return i.includes('payments-refund-approver'); }))) {
|
|
8171
|
+
this.isProcessRefund = true;
|
|
8172
|
+
this.refundButtonState = this.refundlist.refund_status.name;
|
|
8173
|
+
return;
|
|
8174
|
+
}
|
|
8175
|
+
if (this.LOGGEDINUSERROLES.some((/**
|
|
8176
|
+
* @param {?} i
|
|
8177
|
+
* @return {?}
|
|
8178
|
+
*/
|
|
8179
|
+
function (i) { return i.includes('payments-refund'); }))) {
|
|
8180
|
+
this.isProcessRefund = false;
|
|
8181
|
+
this.refundButtonState = this.refundlist.refund_status.name;
|
|
8182
|
+
}
|
|
8169
8183
|
}
|
|
8170
8184
|
}
|
|
8171
|
-
// }
|
|
8172
8185
|
};
|
|
8173
|
-
// check4AllowedRoles2AccessRefund = (): boolean => {
|
|
8174
|
-
// return this.allowedRolesToAccessRefund.some(role =>
|
|
8175
|
-
// this.LOGGEDINUSERROLES.indexOf(role) !== -1
|
|
8176
|
-
// );
|
|
8177
|
-
// }
|
|
8178
|
-
// check4AllowedRoles2AccessRefund = (): boolean => {
|
|
8179
|
-
// return this.allowedRolesToAccessRefund.some(role =>
|
|
8180
|
-
// this.LOGGEDINUSERROLES.indexOf(role) !== -1
|
|
8181
|
-
// );
|
|
8182
|
-
// }
|
|
8183
8186
|
/**
|
|
8184
8187
|
* @return {?}
|
|
8185
8188
|
*/
|
|
8186
|
-
RefundStatusComponent.prototype.getRefundsStatusHistoryList =
|
|
8187
|
-
// check4AllowedRoles2AccessRefund = (): boolean => {
|
|
8188
|
-
// return this.allowedRolesToAccessRefund.some(role =>
|
|
8189
|
-
// this.LOGGEDINUSERROLES.indexOf(role) !== -1
|
|
8190
|
-
// );
|
|
8191
|
-
// }
|
|
8192
|
-
/**
|
|
8189
|
+
RefundStatusComponent.prototype.getRefundsStatusHistoryList = /**
|
|
8193
8190
|
* @return {?}
|
|
8194
8191
|
*/
|
|
8195
8192
|
function () {
|