@hmcts/ccpay-web-component 5.0.1-beta94 → 5.0.1-beta98
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 +80 -35
- 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/add-remission/add-remission.component.js +87 -25
- package/esm5/lib/components/add-remission/add-remission.component.js +91 -33
- package/fesm2015/hmcts-ccpay-web-component.js +78 -24
- package/fesm2015/hmcts-ccpay-web-component.js.map +1 -1
- package/fesm5/hmcts-ccpay-web-component.js +82 -32
- package/fesm5/hmcts-ccpay-web-component.js.map +1 -1
- package/hmcts-ccpay-web-component.metadata.json +1 -1
- package/lib/components/add-remission/add-remission.component.d.ts +6 -0
- package/package.json +1 -1
|
@@ -6762,25 +6762,56 @@ var AddRemissionComponent = /** @class */ (function () {
|
|
|
6762
6762
|
/** @type {?} */
|
|
6763
6763
|
var remissionctrls = this.remissionForm.controls;
|
|
6764
6764
|
remissionctrls['refundDDReason'].setValue('Select a different reason', { onlySelf: true });
|
|
6765
|
-
if (this.
|
|
6766
|
-
/**
|
|
6767
|
-
|
|
6768
|
-
|
|
6769
|
-
|
|
6770
|
-
|
|
6771
|
-
|
|
6772
|
-
|
|
6773
|
-
|
|
6774
|
-
|
|
6775
|
-
|
|
6776
|
-
|
|
6777
|
-
|
|
6778
|
-
|
|
6779
|
-
|
|
6780
|
-
|
|
6765
|
+
if (this.isFromServiceRequestPage) {
|
|
6766
|
+
this.paymentViewService.getApportionPaymentDetails(this.paymentLibComponent.paymentReference).subscribe((/**
|
|
6767
|
+
* @param {?} paymentGroup
|
|
6768
|
+
* @return {?}
|
|
6769
|
+
*/
|
|
6770
|
+
function (paymentGroup) {
|
|
6771
|
+
/** @type {?} */
|
|
6772
|
+
var fees = [];
|
|
6773
|
+
paymentGroup.fees.forEach((/**
|
|
6774
|
+
* @param {?} fee
|
|
6775
|
+
* @return {?}
|
|
6776
|
+
*/
|
|
6777
|
+
function (fee) {
|
|
6778
|
+
_this.isRemissionsMatch = false;
|
|
6779
|
+
paymentGroup.remissions.forEach((/**
|
|
6780
|
+
* @param {?} rem
|
|
6781
|
+
* @return {?}
|
|
6782
|
+
*/
|
|
6783
|
+
function (rem) {
|
|
6784
|
+
if (rem.fee_code === fee.code) {
|
|
6785
|
+
_this.isRemissionsMatch = true;
|
|
6786
|
+
fee['remissions'] = rem;
|
|
6787
|
+
fees.push(fee);
|
|
6788
|
+
}
|
|
6789
|
+
}));
|
|
6790
|
+
if (!_this.isRemissionsMatch) {
|
|
6791
|
+
fees.push(fee);
|
|
6792
|
+
}
|
|
6781
6793
|
}));
|
|
6782
|
-
|
|
6783
|
-
|
|
6794
|
+
paymentGroup.fees = fees;
|
|
6795
|
+
_this.paymentFees = fees;
|
|
6796
|
+
_this.fees = fees;
|
|
6797
|
+
_this.paymentGroup = paymentGroup;
|
|
6798
|
+
_this.paymentGroup.payments = _this.paymentGroup.payments.filter((/**
|
|
6799
|
+
* @param {?} paymentGroupObj
|
|
6800
|
+
* @return {?}
|
|
6801
|
+
*/
|
|
6802
|
+
function (paymentGroupObj) { return paymentGroupObj['reference'].includes(_this.paymentLibComponent.paymentReference); }));
|
|
6803
|
+
/** @type {?} */
|
|
6804
|
+
var paymentAllocation = _this.paymentGroup.payments[0].payment_allocation;
|
|
6805
|
+
_this.isStatusAllocated = paymentAllocation.length > 0 && paymentAllocation[0].allocation_status === 'Allocated' || paymentAllocation.length === 0;
|
|
6806
|
+
_this.refundFeesList();
|
|
6807
|
+
}), (/**
|
|
6808
|
+
* @param {?} error
|
|
6809
|
+
* @return {?}
|
|
6810
|
+
*/
|
|
6811
|
+
function (error) { return _this.errorMessage = error; }));
|
|
6812
|
+
}
|
|
6813
|
+
if (this.fees && this.viewCompStatus === 'issuerefund') {
|
|
6814
|
+
this.refundFeesList();
|
|
6784
6815
|
}
|
|
6785
6816
|
if (this.viewCompStatus === '') {
|
|
6786
6817
|
this.viewStatus = 'main';
|
|
@@ -6824,6 +6855,32 @@ var AddRemissionComponent = /** @class */ (function () {
|
|
|
6824
6855
|
this.paymentReference = this.orderDetail[0].payments[0].reference;
|
|
6825
6856
|
}
|
|
6826
6857
|
};
|
|
6858
|
+
/**
|
|
6859
|
+
* @return {?}
|
|
6860
|
+
*/
|
|
6861
|
+
AddRemissionComponent.prototype.refundFeesList = /**
|
|
6862
|
+
* @return {?}
|
|
6863
|
+
*/
|
|
6864
|
+
function () {
|
|
6865
|
+
/** @type {?} */
|
|
6866
|
+
var creds = (/** @type {?} */ (this.remissionForm.controls.feesList));
|
|
6867
|
+
for (var i = 0; i < this.fees.length; i++) {
|
|
6868
|
+
creds.push(this.formBuilder.group({
|
|
6869
|
+
id: this.fees[i].id,
|
|
6870
|
+
code: this.fees[i].code,
|
|
6871
|
+
volume: this.fees[i].volume,
|
|
6872
|
+
calculated_amount: this.fees[i].calculated_amount,
|
|
6873
|
+
apportion_amount: this.fees[i].apportion_amount,
|
|
6874
|
+
ccd_case_number: this.fees[i].ccd_case_number,
|
|
6875
|
+
description: this.fees[i].description,
|
|
6876
|
+
net_amount: this.fees[i].net_amount,
|
|
6877
|
+
version: this.fees[i].version,
|
|
6878
|
+
amounttorefund: [''],
|
|
6879
|
+
selected: ['']
|
|
6880
|
+
}));
|
|
6881
|
+
}
|
|
6882
|
+
this.cd.detectChanges();
|
|
6883
|
+
};
|
|
6827
6884
|
Object.defineProperty(AddRemissionComponent.prototype, "feesList", {
|
|
6828
6885
|
get: /**
|
|
6829
6886
|
* @return {?}
|
|
@@ -6831,7 +6888,6 @@ var AddRemissionComponent = /** @class */ (function () {
|
|
|
6831
6888
|
function () {
|
|
6832
6889
|
/** @type {?} */
|
|
6833
6890
|
var dd = (/** @type {?} */ (this.remissionForm.get('feesList')));
|
|
6834
|
-
console.log(this.remissionForm.get('feesList'));
|
|
6835
6891
|
return (/** @type {?} */ (this.remissionForm.get('feesList')));
|
|
6836
6892
|
},
|
|
6837
6893
|
enumerable: true,
|
|
@@ -6864,21 +6920,11 @@ var AddRemissionComponent = /** @class */ (function () {
|
|
|
6864
6920
|
*/
|
|
6865
6921
|
function (item) { return item.get('selected').value === true; }));
|
|
6866
6922
|
};
|
|
6867
|
-
// validateRow(i){
|
|
6868
|
-
// return this.remissionForm.get('feesList').parent.controls['feesList'].controls[1].value['selected']
|
|
6869
|
-
// }
|
|
6870
|
-
// validateRow(i){
|
|
6871
|
-
// return this.remissionForm.get('feesList').parent.controls['feesList'].controls[1].value['selected']
|
|
6872
|
-
// }
|
|
6873
6923
|
/**
|
|
6874
6924
|
* @param {?} v1
|
|
6875
6925
|
* @return {?}
|
|
6876
6926
|
*/
|
|
6877
|
-
AddRemissionComponent.prototype.check_en =
|
|
6878
|
-
// validateRow(i){
|
|
6879
|
-
// return this.remissionForm.get('feesList').parent.controls['feesList'].controls[1].value['selected']
|
|
6880
|
-
// }
|
|
6881
|
-
/**
|
|
6927
|
+
AddRemissionComponent.prototype.check_en = /**
|
|
6882
6928
|
* @param {?} v1
|
|
6883
6929
|
* @return {?}
|
|
6884
6930
|
*/
|
|
@@ -6887,11 +6933,15 @@ var AddRemissionComponent = /** @class */ (function () {
|
|
|
6887
6933
|
var ele = (/** @type {?} */ (document.getElementById(v1)));
|
|
6888
6934
|
if (ele.checked) {
|
|
6889
6935
|
document.getElementById('feeAmount_' + v1).removeAttribute("disabled");
|
|
6890
|
-
document.getElementById('feeVolumeUpdated_' + v1)
|
|
6936
|
+
if (document.getElementById('feeVolumeUpdated_' + v1) !== null) {
|
|
6937
|
+
document.getElementById('feeVolumeUpdated_' + v1).removeAttribute("disabled");
|
|
6938
|
+
}
|
|
6891
6939
|
}
|
|
6892
6940
|
else {
|
|
6893
6941
|
document.getElementById('feeAmount_' + v1).setAttribute("disabled", "true");
|
|
6894
|
-
document.getElementById('feeVolumeUpdated_' + v1)
|
|
6942
|
+
if (document.getElementById('feeVolumeUpdated_' + v1) !== null) {
|
|
6943
|
+
document.getElementById('feeVolumeUpdated_' + v1).removeAttribute("disabled");
|
|
6944
|
+
}
|
|
6895
6945
|
}
|
|
6896
6946
|
};
|
|
6897
6947
|
/**
|