From 983ecf1506b34ec5c2e37e96380acfa439e66960 Mon Sep 17 00:00:00 2001 From: sniedzielski <52816247+sniedzielski@users.noreply.github.com> Date: Thu, 20 Jun 2024 11:24:40 +0200 Subject: [PATCH] CM-932: added make payment button for digital strategy (#53) * CM-932: added make payment button for digital strategy * CM-932: removed console log --- src/actions.js | 10 +++++ .../BenefitConsumptionSearcherModal.js | 2 + .../PaymentApproveForPaymentSummary.js | 37 ++++++++++++++++++- src/reducer.js | 2 + src/translations/en.json | 1 + 5 files changed, 50 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) => ( + )}