@hmcts/ccpay-web-component 5.0.2-beta73 → 5.0.2-beta76
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 +45 -72
- 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/payment-view/payment-view.component.js +36 -48
- package/esm2015/lib/components/service-request/service-request.component.js +13 -28
- package/esm5/lib/components/payment-view/payment-view.component.js +36 -48
- package/esm5/lib/components/service-request/service-request.component.js +13 -28
- package/fesm2015/hmcts-ccpay-web-component.js +47 -74
- package/fesm2015/hmcts-ccpay-web-component.js.map +1 -1
- package/fesm5/hmcts-ccpay-web-component.js +47 -74
- package/fesm5/hmcts-ccpay-web-component.js.map +1 -1
- package/package.json +1 -1
|
@@ -1402,35 +1402,35 @@ class PaymentViewComponent {
|
|
|
1402
1402
|
* @return {?}
|
|
1403
1403
|
*/
|
|
1404
1404
|
addRefundForRemission(payment, remission, fees) {
|
|
1405
|
-
if
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1405
|
+
//if(!this.chkIsIssueRefundBtnEnable(payment)) {
|
|
1406
|
+
this.payment = payment;
|
|
1407
|
+
this.paymentViewService.getApportionPaymentDetails(this.payment.reference).subscribe((/**
|
|
1408
|
+
* @param {?} paymentGroup
|
|
1409
|
+
* @return {?}
|
|
1410
|
+
*/
|
|
1411
|
+
paymentGroup => {
|
|
1412
|
+
this.paymentGroup = paymentGroup;
|
|
1413
|
+
this.paymentGroup.payments = this.paymentGroup.payments.filter((/**
|
|
1414
|
+
* @param {?} paymentGroupObj
|
|
1409
1415
|
* @return {?}
|
|
1410
1416
|
*/
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
*/
|
|
1417
|
-
paymentGroupObj => paymentGroupObj['reference'].includes(this.payment.reference)));
|
|
1418
|
-
this.payment = this.paymentGroup.payments[0];
|
|
1419
|
-
this.remissions = remission;
|
|
1420
|
-
this.remissionFeeAmt = fees.filter((/**
|
|
1421
|
-
* @param {?} data
|
|
1422
|
-
* @return {?}
|
|
1423
|
-
*/
|
|
1424
|
-
data => data.code === this.remissions['fee_code']))[0].net_amount;
|
|
1425
|
-
this.viewStatus = 'addrefundforremission';
|
|
1426
|
-
// const paymentAllocation = this.paymentGroup.payments[0].payment_allocation;
|
|
1427
|
-
// this.isStatusAllocated = paymentAllocation.length > 0 && paymentAllocation[0].allocation_status === 'Allocated' || paymentAllocation.length === 0;
|
|
1428
|
-
}), (/**
|
|
1429
|
-
* @param {?} error
|
|
1417
|
+
paymentGroupObj => paymentGroupObj['reference'].includes(this.payment.reference)));
|
|
1418
|
+
this.payment = this.paymentGroup.payments[0];
|
|
1419
|
+
this.remissions = remission;
|
|
1420
|
+
this.remissionFeeAmt = fees.filter((/**
|
|
1421
|
+
* @param {?} data
|
|
1430
1422
|
* @return {?}
|
|
1431
1423
|
*/
|
|
1432
|
-
|
|
1433
|
-
|
|
1424
|
+
data => data.code === this.remissions['fee_code']))[0].net_amount;
|
|
1425
|
+
this.viewStatus = 'addrefundforremission';
|
|
1426
|
+
// const paymentAllocation = this.paymentGroup.payments[0].payment_allocation;
|
|
1427
|
+
// this.isStatusAllocated = paymentAllocation.length > 0 && paymentAllocation[0].allocation_status === 'Allocated' || paymentAllocation.length === 0;
|
|
1428
|
+
}), (/**
|
|
1429
|
+
* @param {?} error
|
|
1430
|
+
* @return {?}
|
|
1431
|
+
*/
|
|
1432
|
+
(error) => this.errorMessage = error));
|
|
1433
|
+
//}
|
|
1434
1434
|
}
|
|
1435
1435
|
/**
|
|
1436
1436
|
* @param {?} paymentgrp
|
|
@@ -1484,14 +1484,10 @@ class PaymentViewComponent {
|
|
|
1484
1484
|
*/
|
|
1485
1485
|
chkIsIssueRefundBtnEnable(payment) {
|
|
1486
1486
|
if (payment !== null && payment !== undefined) {
|
|
1487
|
-
return payment.issue_refund;
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
// return true
|
|
1492
|
-
// } else {
|
|
1493
|
-
// return false;
|
|
1494
|
-
// }
|
|
1487
|
+
return payment.issue_refund && payment.refund_enable;
|
|
1488
|
+
}
|
|
1489
|
+
else {
|
|
1490
|
+
return false;
|
|
1495
1491
|
}
|
|
1496
1492
|
}
|
|
1497
1493
|
/**
|
|
@@ -1501,13 +1497,9 @@ class PaymentViewComponent {
|
|
|
1501
1497
|
chkIsAddRefundBtnEnable(remission) {
|
|
1502
1498
|
if (remission !== null && remission !== undefined) {
|
|
1503
1499
|
return remission.add_refund;
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
// return true
|
|
1508
|
-
// } else {
|
|
1509
|
-
// return false;
|
|
1510
|
-
// }
|
|
1500
|
+
}
|
|
1501
|
+
else {
|
|
1502
|
+
return false;
|
|
1511
1503
|
}
|
|
1512
1504
|
}
|
|
1513
1505
|
/**
|
|
@@ -1517,13 +1509,9 @@ class PaymentViewComponent {
|
|
|
1517
1509
|
chkIsAddRemissionBtnEnable(fee) {
|
|
1518
1510
|
if (fee !== null && fee !== undefined) {
|
|
1519
1511
|
return fee.add_remission && fee.remission_enable;
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
// return true
|
|
1524
|
-
// } else {
|
|
1525
|
-
// return false;
|
|
1526
|
-
// }
|
|
1512
|
+
}
|
|
1513
|
+
else {
|
|
1514
|
+
return false;
|
|
1527
1515
|
}
|
|
1528
1516
|
}
|
|
1529
1517
|
/**
|
|
@@ -9399,15 +9387,10 @@ class ServiceRequestComponent {
|
|
|
9399
9387
|
*/
|
|
9400
9388
|
chkIsIssueRefundBtnEnable(payment) {
|
|
9401
9389
|
if (payment !== null && payment !== undefined) {
|
|
9402
|
-
|
|
9403
|
-
|
|
9404
|
-
|
|
9405
|
-
|
|
9406
|
-
return true;
|
|
9407
|
-
}
|
|
9408
|
-
else {
|
|
9409
|
-
return false;
|
|
9410
|
-
}
|
|
9390
|
+
return payment.issue_refund && payment.refund_enable;
|
|
9391
|
+
}
|
|
9392
|
+
else {
|
|
9393
|
+
return false;
|
|
9411
9394
|
}
|
|
9412
9395
|
}
|
|
9413
9396
|
/**
|
|
@@ -9416,15 +9399,10 @@ class ServiceRequestComponent {
|
|
|
9416
9399
|
*/
|
|
9417
9400
|
chkIsAddRefundBtnEnable(remission) {
|
|
9418
9401
|
if (remission !== null && remission !== undefined) {
|
|
9419
|
-
|
|
9420
|
-
|
|
9421
|
-
|
|
9422
|
-
|
|
9423
|
-
return true;
|
|
9424
|
-
}
|
|
9425
|
-
else {
|
|
9426
|
-
return false;
|
|
9427
|
-
}
|
|
9402
|
+
return remission.add_refund;
|
|
9403
|
+
}
|
|
9404
|
+
else {
|
|
9405
|
+
return false;
|
|
9428
9406
|
}
|
|
9429
9407
|
}
|
|
9430
9408
|
/**
|
|
@@ -9433,15 +9411,10 @@ class ServiceRequestComponent {
|
|
|
9433
9411
|
*/
|
|
9434
9412
|
chkIsAddRemissionBtnEnable(fee) {
|
|
9435
9413
|
if (fee !== null && fee !== undefined) {
|
|
9436
|
-
|
|
9437
|
-
|
|
9438
|
-
|
|
9439
|
-
|
|
9440
|
-
return true;
|
|
9441
|
-
}
|
|
9442
|
-
else {
|
|
9443
|
-
return false;
|
|
9444
|
-
}
|
|
9414
|
+
return fee.add_remission && fee.remission_enable;
|
|
9415
|
+
}
|
|
9416
|
+
else {
|
|
9417
|
+
return false;
|
|
9445
9418
|
}
|
|
9446
9419
|
}
|
|
9447
9420
|
/**
|