@hmcts/ccpay-web-component 5.0.1-beta15 → 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 +77 -97
- 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/case-transactions/case-transactions.component.js +3 -3
- package/esm2015/lib/components/refund-status/refund-status.component.js +78 -87
- package/esm2015/lib/services/shared/error-handler.service.js +4 -1
- package/esm5/lib/components/case-transactions/case-transactions.component.js +3 -3
- package/esm5/lib/components/refund-status/refund-status.component.js +82 -100
- package/esm5/lib/services/shared/error-handler.service.js +4 -1
- package/fesm2015/hmcts-ccpay-web-component.js +78 -90
- package/fesm2015/hmcts-ccpay-web-component.js.map +1 -1
- package/fesm5/hmcts-ccpay-web-component.js +82 -103
- 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
|
@@ -221,6 +221,9 @@ var ErrorHandlerService = /** @class */ (function () {
|
|
|
221
221
|
errorMessage = err.error;
|
|
222
222
|
}
|
|
223
223
|
}
|
|
224
|
+
else if (err.status === 500) {
|
|
225
|
+
errorMessage = 'Internal server error';
|
|
226
|
+
}
|
|
224
227
|
else if (err.error.messsage === undefined) {
|
|
225
228
|
if (typeof err.error === 'object') {
|
|
226
229
|
errorMessage = JSON.parse(JSON.stringify(err.error)).error;
|
|
@@ -2839,7 +2842,7 @@ var CaseTransactionsComponent = /** @class */ (function () {
|
|
|
2839
2842
|
* @return {?}
|
|
2840
2843
|
*/
|
|
2841
2844
|
function (response) {
|
|
2842
|
-
_this.cpoDetails = JSON.parse(response).
|
|
2845
|
+
_this.cpoDetails = JSON.parse(response).content[0];
|
|
2843
2846
|
}), (/**
|
|
2844
2847
|
* @param {?} error
|
|
2845
2848
|
* @return {?}
|
|
@@ -2874,7 +2877,7 @@ var CaseTransactionsComponent = /** @class */ (function () {
|
|
|
2874
2877
|
* @return {?}
|
|
2875
2878
|
*/
|
|
2876
2879
|
function (response) {
|
|
2877
|
-
_this.cpoDetails = JSON.parse(response).
|
|
2880
|
+
_this.cpoDetails = JSON.parse(response).content[0];
|
|
2878
2881
|
}), (/**
|
|
2879
2882
|
* @param {?} error
|
|
2880
2883
|
* @return {?}
|
|
@@ -8065,11 +8068,9 @@ var IResubmitRefundRequest = /** @class */ (function () {
|
|
|
8065
8068
|
* @fileoverview added by tsickle
|
|
8066
8069
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
8067
8070
|
*/
|
|
8068
|
-
/** @type {?} */
|
|
8069
|
-
var BS_ENABLE_FLAG$4 = 'bulk-scan-enabling-fe';
|
|
8070
8071
|
var RefundStatusComponent = /** @class */ (function () {
|
|
8071
|
-
// allowedRolesToAccessRefund = ['payments-refund-approver', 'payments-refund'];
|
|
8072
8072
|
function RefundStatusComponent(formBuilder, refundService, paymentLibComponent, paymentViewService, router, OrderslistService$$1) {
|
|
8073
|
+
var _this = this;
|
|
8073
8074
|
this.formBuilder = formBuilder;
|
|
8074
8075
|
this.refundService = refundService;
|
|
8075
8076
|
this.paymentLibComponent = paymentLibComponent;
|
|
@@ -8093,6 +8094,19 @@ var RefundStatusComponent = /** @class */ (function () {
|
|
|
8093
8094
|
this.isRefundBtnDisabled = true;
|
|
8094
8095
|
this.isLastUpdatedByCurrentUser = true;
|
|
8095
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
|
+
});
|
|
8096
8110
|
}
|
|
8097
8111
|
/**
|
|
8098
8112
|
* @return {?}
|
|
@@ -8102,93 +8116,77 @@ var RefundStatusComponent = /** @class */ (function () {
|
|
|
8102
8116
|
*/
|
|
8103
8117
|
function () {
|
|
8104
8118
|
var _this = this;
|
|
8105
|
-
|
|
8106
|
-
|
|
8107
|
-
|
|
8108
|
-
|
|
8109
|
-
|
|
8110
|
-
|
|
8111
|
-
|
|
8112
|
-
|
|
8113
|
-
|
|
8114
|
-
|
|
8115
|
-
|
|
8116
|
-
* @return {?}
|
|
8117
|
-
*/
|
|
8118
|
-
function (data) { return _this.refundlist = data; }));
|
|
8119
|
-
this.OrderslistService.getCCDCaseNumberforRefund.subscribe((/**
|
|
8120
|
-
* @param {?} data
|
|
8121
|
-
* @return {?}
|
|
8122
|
-
*/
|
|
8123
|
-
function (data) { return _this.ccdCaseNumber = data; }));
|
|
8124
|
-
}
|
|
8125
|
-
else {
|
|
8126
|
-
this.viewName = 'refundstatuslist';
|
|
8127
|
-
this.refundService.getRefundStatusList(this.ccdCaseNumber).subscribe((/**
|
|
8128
|
-
* @param {?} refundList
|
|
8129
|
-
* @return {?}
|
|
8130
|
-
*/
|
|
8131
|
-
function (refundList) {
|
|
8132
|
-
_this.rejectedRefundList = refundList['refund_list'];
|
|
8133
|
-
})),
|
|
8134
|
-
(/**
|
|
8135
|
-
* @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
|
|
8136
8130
|
* @return {?}
|
|
8137
8131
|
*/
|
|
8138
|
-
function (
|
|
8139
|
-
|
|
8140
|
-
|
|
8141
|
-
|
|
8142
|
-
|
|
8143
|
-
|
|
8144
|
-
Validators.required,
|
|
8145
|
-
Validators.pattern('^[0-9]+(\.[0-9]{1,2})?$')
|
|
8146
|
-
])),
|
|
8147
|
-
refundReason: new FormControl('', Validators.compose([Validators.required])),
|
|
8148
|
-
reason: new FormControl()
|
|
8149
|
-
});
|
|
8150
|
-
if (this.refundlist !== undefined) {
|
|
8151
|
-
this.getRefundsStatusHistoryList();
|
|
8152
|
-
if (this.LOGGEDINUSERROLES.some((/**
|
|
8153
|
-
* @param {?} i
|
|
8154
|
-
* @return {?}
|
|
8155
|
-
*/
|
|
8156
|
-
function (i) { return i.includes('payments-refund-approver'); }))) {
|
|
8157
|
-
this.isProcessRefund = true;
|
|
8158
|
-
this.refundButtonState = this.refundlist.refund_status.name;
|
|
8159
|
-
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; }));
|
|
8160
8138
|
}
|
|
8161
|
-
|
|
8162
|
-
|
|
8163
|
-
|
|
8164
|
-
|
|
8165
|
-
|
|
8166
|
-
|
|
8167
|
-
|
|
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
|
+
}
|
|
8168
8183
|
}
|
|
8169
8184
|
}
|
|
8170
|
-
// }
|
|
8171
8185
|
};
|
|
8172
|
-
// check4AllowedRoles2AccessRefund = (): boolean => {
|
|
8173
|
-
// return this.allowedRolesToAccessRefund.some(role =>
|
|
8174
|
-
// this.LOGGEDINUSERROLES.indexOf(role) !== -1
|
|
8175
|
-
// );
|
|
8176
|
-
// }
|
|
8177
|
-
// check4AllowedRoles2AccessRefund = (): boolean => {
|
|
8178
|
-
// return this.allowedRolesToAccessRefund.some(role =>
|
|
8179
|
-
// this.LOGGEDINUSERROLES.indexOf(role) !== -1
|
|
8180
|
-
// );
|
|
8181
|
-
// }
|
|
8182
8186
|
/**
|
|
8183
8187
|
* @return {?}
|
|
8184
8188
|
*/
|
|
8185
|
-
RefundStatusComponent.prototype.getRefundsStatusHistoryList =
|
|
8186
|
-
// check4AllowedRoles2AccessRefund = (): boolean => {
|
|
8187
|
-
// return this.allowedRolesToAccessRefund.some(role =>
|
|
8188
|
-
// this.LOGGEDINUSERROLES.indexOf(role) !== -1
|
|
8189
|
-
// );
|
|
8190
|
-
// }
|
|
8191
|
-
/**
|
|
8189
|
+
RefundStatusComponent.prototype.getRefundsStatusHistoryList = /**
|
|
8192
8190
|
* @return {?}
|
|
8193
8191
|
*/
|
|
8194
8192
|
function () {
|
|
@@ -8236,29 +8234,10 @@ var RefundStatusComponent = /** @class */ (function () {
|
|
|
8236
8234
|
* @return {?}
|
|
8237
8235
|
*/
|
|
8238
8236
|
function () {
|
|
8239
|
-
var _this = this;
|
|
8240
8237
|
this.paymentLibComponent.isRefundStatusView = false;
|
|
8241
8238
|
//this.paymentLibComponent.TAKEPAYMENT = true;
|
|
8242
8239
|
this.paymentLibComponent.viewName = 'case-transactions';
|
|
8243
|
-
this.
|
|
8244
|
-
* @param {?} features
|
|
8245
|
-
* @return {?}
|
|
8246
|
-
*/
|
|
8247
|
-
function (features) {
|
|
8248
|
-
/** @type {?} */
|
|
8249
|
-
var result = JSON.parse(features).filter((/**
|
|
8250
|
-
* @param {?} feature
|
|
8251
|
-
* @return {?}
|
|
8252
|
-
*/
|
|
8253
|
-
function (feature) { return feature.uid === BS_ENABLE_FLAG$4; }));
|
|
8254
|
-
_this.paymentLibComponent.ISBSENABLE = result[0] ? result[0].enable : false;
|
|
8255
|
-
}), (/**
|
|
8256
|
-
* @param {?} err
|
|
8257
|
-
* @return {?}
|
|
8258
|
-
*/
|
|
8259
|
-
function (err) {
|
|
8260
|
-
_this.paymentLibComponent.ISBSENABLE = false;
|
|
8261
|
-
}));
|
|
8240
|
+
this.paymentLibComponent.ISBSENABLE = true;
|
|
8262
8241
|
/** @type {?} */
|
|
8263
8242
|
var partUrl = "selectedOption=" + this.paymentLibComponent.SELECTED_OPTION;
|
|
8264
8243
|
partUrl += this.bsPaymentDcnNumber ? "&dcn=" + this.bsPaymentDcnNumber : '';
|