From 3751a0b821684cbdbc78342a8e143ad887387b2f Mon Sep 17 00:00:00 2001 From: sniedzielski Date: Wed, 19 Jun 2024 16:11:55 +0200 Subject: [PATCH] CM-932: added make payment button for digital strategy --- src/actions.js | 10 +++++ .../BenefitConsumptionSearcherModal.js | 2 + .../PaymentApproveForPaymentSummary.js | 38 ++++++++++++++++++- src/reducer.js | 2 + src/translations/en.json | 1 + 5 files changed, 51 insertions(+), 2 deletions(-) diff --git a/src/actions.js b/src/actions.js index 3d88225..7d277c0 100644 --- a/src/actions.js +++ b/src/actions.js @@ -290,3 +290,13 @@ export function rejectPayroll(payroll, clientMutationLabel) { clientMutationLabel, ); } + +export function makePaymentForPayroll(payroll, clientMutationLabel) { + const payrollUuids = `ids: ["${payroll?.id}"]`; + return PERFORM_MUTATION( + MUTATION_SERVICE.PAYROLL.MAKE_PAYMENT, + payrollUuids, + ACTION_TYPE.MAKE_PAYMENT_PAYROLL, + clientMutationLabel, + ); +} diff --git a/src/components/payroll/BenefitConsumptionSearcherModal.js b/src/components/payroll/BenefitConsumptionSearcherModal.js index 12885ac..31fbfd6 100644 --- a/src/components/payroll/BenefitConsumptionSearcherModal.js +++ b/src/components/payroll/BenefitConsumptionSearcherModal.js @@ -38,6 +38,7 @@ function BenefitConsumptionSearcherModal({ 'benefitConsumption.dateDue', 'benefitConsumption.payedOnTime', 'benefitConsumption.paymentDate', + 'benefitConsumption.status', '', ]; @@ -68,6 +69,7 @@ function BenefitConsumptionSearcherModal({ ? '' : benefitAttachment?.bill?.datePayed ), + (benefitAttachment) => benefitAttachment?.benefit?.status, (benefitAttachment) => ( + )}