@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
|
@@ -7957,8 +7957,8 @@
|
|
|
7957
7957
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
7958
7958
|
*/
|
|
7959
7959
|
var RefundStatusComponent = /** @class */ (function () {
|
|
7960
|
-
// allowedRolesToAccessRefund = ['payments-refund-approver', 'payments-refund'];
|
|
7961
7960
|
function RefundStatusComponent(formBuilder, refundService, paymentLibComponent, paymentViewService, router$$1, OrderslistService$$1) {
|
|
7961
|
+
var _this = this;
|
|
7962
7962
|
this.formBuilder = formBuilder;
|
|
7963
7963
|
this.refundService = refundService;
|
|
7964
7964
|
this.paymentLibComponent = paymentLibComponent;
|
|
@@ -7982,6 +7982,17 @@
|
|
|
7982
7982
|
this.isRefundBtnDisabled = true;
|
|
7983
7983
|
this.isLastUpdatedByCurrentUser = true;
|
|
7984
7984
|
this.isProcessRefund = false;
|
|
7985
|
+
this.allowedRolesToAccessRefund = ['payments-refund-approver', 'payments-refund'];
|
|
7986
|
+
this.check4AllowedRoles2AccessRefund = ( /**
|
|
7987
|
+
* @return {?}
|
|
7988
|
+
*/function () {
|
|
7989
|
+
return _this.allowedRolesToAccessRefund.some(( /**
|
|
7990
|
+
* @param {?} role
|
|
7991
|
+
* @return {?}
|
|
7992
|
+
*/function (role) {
|
|
7993
|
+
return _this.LOGGEDINUSERROLES.indexOf(role) !== -1;
|
|
7994
|
+
}));
|
|
7995
|
+
});
|
|
7985
7996
|
}
|
|
7986
7997
|
/**
|
|
7987
7998
|
* @return {?}
|
|
@@ -7991,89 +8002,73 @@
|
|
|
7991
8002
|
*/
|
|
7992
8003
|
function () {
|
|
7993
8004
|
var _this = this;
|
|
7994
|
-
|
|
7995
|
-
|
|
7996
|
-
|
|
7997
|
-
|
|
7998
|
-
|
|
7999
|
-
|
|
8000
|
-
|
|
8001
|
-
|
|
8002
|
-
|
|
8003
|
-
|
|
8004
|
-
|
|
8005
|
-
* @return {?}
|
|
8006
|
-
*/function (data) { return _this.refundlist = data; }));
|
|
8007
|
-
this.OrderslistService.getCCDCaseNumberforRefund.subscribe(( /**
|
|
8008
|
-
* @param {?} data
|
|
8009
|
-
* @return {?}
|
|
8010
|
-
*/function (data) { return _this.ccdCaseNumber = data; }));
|
|
8011
|
-
}
|
|
8012
|
-
else {
|
|
8013
|
-
this.viewName = 'refundstatuslist';
|
|
8014
|
-
this.refundService.getRefundStatusList(this.ccdCaseNumber).subscribe(( /**
|
|
8015
|
-
* @param {?} refundList
|
|
8016
|
-
* @return {?}
|
|
8017
|
-
*/function (refundList) {
|
|
8018
|
-
_this.rejectedRefundList = refundList['refund_list'];
|
|
8019
|
-
})),
|
|
8020
|
-
( /**
|
|
8021
|
-
* @param {?} error
|
|
8005
|
+
if (this.check4AllowedRoles2AccessRefund()) {
|
|
8006
|
+
this.resetRemissionForm([false, false, false, false], 'All');
|
|
8007
|
+
this.bsPaymentDcnNumber = this.paymentLibComponent.bspaymentdcn;
|
|
8008
|
+
this.isCallFromRefundList = this.paymentLibComponent.isCallFromRefundList;
|
|
8009
|
+
// if(this.paymentLibComponent.isFromRefundStatusPage) {
|
|
8010
|
+
// this.viewName = 'reviewandsubmitview';
|
|
8011
|
+
// }
|
|
8012
|
+
if (this.paymentLibComponent.isRefundStatusView) {
|
|
8013
|
+
this.viewName = 'refundview';
|
|
8014
|
+
this.OrderslistService.getRefundView().subscribe(( /**
|
|
8015
|
+
* @param {?} data
|
|
8022
8016
|
* @return {?}
|
|
8023
|
-
*/function (
|
|
8024
|
-
|
|
8025
|
-
|
|
8026
|
-
|
|
8027
|
-
|
|
8028
|
-
amount: new forms.FormControl('', forms.Validators.compose([
|
|
8029
|
-
forms.Validators.required,
|
|
8030
|
-
forms.Validators.pattern('^[0-9]+(\.[0-9]{1,2})?$')
|
|
8031
|
-
])),
|
|
8032
|
-
refundReason: new forms.FormControl('', forms.Validators.compose([forms.Validators.required])),
|
|
8033
|
-
reason: new forms.FormControl()
|
|
8034
|
-
});
|
|
8035
|
-
if (this.refundlist !== undefined) {
|
|
8036
|
-
this.getRefundsStatusHistoryList();
|
|
8037
|
-
if (this.LOGGEDINUSERROLES.some(( /**
|
|
8038
|
-
* @param {?} i
|
|
8039
|
-
* @return {?}
|
|
8040
|
-
*/function (i) { return i.includes('payments-refund-approver'); }))) {
|
|
8041
|
-
this.isProcessRefund = true;
|
|
8042
|
-
this.refundButtonState = this.refundlist.refund_status.name;
|
|
8043
|
-
return;
|
|
8017
|
+
*/function (data) { return _this.refundlist = data; }));
|
|
8018
|
+
this.OrderslistService.getCCDCaseNumberforRefund.subscribe(( /**
|
|
8019
|
+
* @param {?} data
|
|
8020
|
+
* @return {?}
|
|
8021
|
+
*/function (data) { return _this.ccdCaseNumber = data; }));
|
|
8044
8022
|
}
|
|
8045
|
-
|
|
8046
|
-
|
|
8047
|
-
|
|
8048
|
-
|
|
8049
|
-
|
|
8050
|
-
|
|
8023
|
+
else {
|
|
8024
|
+
this.viewName = 'refundstatuslist';
|
|
8025
|
+
this.refundService.getRefundStatusList(this.ccdCaseNumber).subscribe(( /**
|
|
8026
|
+
* @param {?} refundList
|
|
8027
|
+
* @return {?}
|
|
8028
|
+
*/function (refundList) {
|
|
8029
|
+
_this.rejectedRefundList = refundList['refund_list'];
|
|
8030
|
+
})),
|
|
8031
|
+
( /**
|
|
8032
|
+
* @param {?} error
|
|
8033
|
+
* @return {?}
|
|
8034
|
+
*/function (error) {
|
|
8035
|
+
_this.errorMessage = error.replace(/"/g, "");
|
|
8036
|
+
});
|
|
8037
|
+
}
|
|
8038
|
+
this.refundStatusForm = this.formBuilder.group({
|
|
8039
|
+
amount: new forms.FormControl('', forms.Validators.compose([
|
|
8040
|
+
forms.Validators.required,
|
|
8041
|
+
forms.Validators.pattern('^[0-9]+(\.[0-9]{1,2})?$')
|
|
8042
|
+
])),
|
|
8043
|
+
refundReason: new forms.FormControl('', forms.Validators.compose([forms.Validators.required])),
|
|
8044
|
+
reason: new forms.FormControl()
|
|
8045
|
+
});
|
|
8046
|
+
if (this.refundlist !== undefined) {
|
|
8047
|
+
this.getRefundsStatusHistoryList();
|
|
8048
|
+
if (this.LOGGEDINUSERROLES.some(( /**
|
|
8049
|
+
* @param {?} i
|
|
8050
|
+
* @return {?}
|
|
8051
|
+
*/function (i) { return i.includes('payments-refund-approver'); }))) {
|
|
8052
|
+
this.isProcessRefund = true;
|
|
8053
|
+
this.refundButtonState = this.refundlist.refund_status.name;
|
|
8054
|
+
return;
|
|
8055
|
+
}
|
|
8056
|
+
if (this.LOGGEDINUSERROLES.some(( /**
|
|
8057
|
+
* @param {?} i
|
|
8058
|
+
* @return {?}
|
|
8059
|
+
*/function (i) { return i.includes('payments-refund'); }))) {
|
|
8060
|
+
this.isProcessRefund = false;
|
|
8061
|
+
this.refundButtonState = this.refundlist.refund_status.name;
|
|
8062
|
+
}
|
|
8051
8063
|
}
|
|
8052
8064
|
}
|
|
8053
|
-
// }
|
|
8054
8065
|
};
|
|
8055
|
-
// check4AllowedRoles2AccessRefund = (): boolean => {
|
|
8056
|
-
// return this.allowedRolesToAccessRefund.some(role =>
|
|
8057
|
-
// this.LOGGEDINUSERROLES.indexOf(role) !== -1
|
|
8058
|
-
// );
|
|
8059
|
-
// }
|
|
8060
|
-
// check4AllowedRoles2AccessRefund = (): boolean => {
|
|
8061
|
-
// return this.allowedRolesToAccessRefund.some(role =>
|
|
8062
|
-
// this.LOGGEDINUSERROLES.indexOf(role) !== -1
|
|
8063
|
-
// );
|
|
8064
|
-
// }
|
|
8065
8066
|
/**
|
|
8066
8067
|
* @return {?}
|
|
8067
8068
|
*/
|
|
8068
|
-
RefundStatusComponent.prototype.getRefundsStatusHistoryList =
|
|
8069
|
-
|
|
8070
|
-
|
|
8071
|
-
// this.LOGGEDINUSERROLES.indexOf(role) !== -1
|
|
8072
|
-
// );
|
|
8073
|
-
// }
|
|
8074
|
-
/**
|
|
8075
|
-
* @return {?}
|
|
8076
|
-
*/
|
|
8069
|
+
RefundStatusComponent.prototype.getRefundsStatusHistoryList = /**
|
|
8070
|
+
* @return {?}
|
|
8071
|
+
*/
|
|
8077
8072
|
function () {
|
|
8078
8073
|
var _this = this;
|
|
8079
8074
|
if (this.refundlist !== undefined) {
|