diff --git a/src/actions.js b/src/actions.js
index 94fdacb..6b8dc0c 100644
--- a/src/actions.js
+++ b/src/actions.js
@@ -766,6 +766,14 @@ export function fetchSystemData(economicUnit, startDate, endDate) {
) {
totalCount
}
+ printed: workerVoucher(
+ policyholder_Code: $economicUnitCode
+ status: PRINTED
+ dateCreated_Gte: $startDate
+ dateCreated_Lte: $endDate
+ ) {
+ totalCount
+ }
paid: bill(
subjectId: $economicUnitUuid
status: A_2
diff --git a/src/components/VoucherAcquirementPaymentModal.js b/src/components/VoucherAcquirementPaymentModal.js
index f86c9f7..27ef223 100644
--- a/src/components/VoucherAcquirementPaymentModal.js
+++ b/src/components/VoucherAcquirementPaymentModal.js
@@ -47,9 +47,11 @@ function VoucherAcquirementPaymentModal({
if (acquirementSummary?.errors) {
return (
- {acquirementSummary?.errors?.map((
- { message, extensions }, index
- ) => `${index + 1}. ${formatValidationError(message, extensions, formatMessage, formatMessageWithValues)}.`)}
+ {acquirementSummary?.errors?.map(
+ ({ message, extensions }, index) =>
+ // eslint-disable-next-line implicit-arrow-linebreak
+ `${index + 1}. ${formatValidationError(message, extensions, formatMessage, formatMessageWithValues)}.`,
+ )}
);
}
diff --git a/src/components/VoucherAssignmentConfirmModal.js b/src/components/VoucherAssignmentConfirmModal.js
index b0ddb46..e851220 100644
--- a/src/components/VoucherAssignmentConfirmModal.js
+++ b/src/components/VoucherAssignmentConfirmModal.js
@@ -47,8 +47,10 @@ function VoucherAssignmentConfirmModal({
return (
{assignmentSummary.errors
- .map(({ message, extensions }, index) =>
- `${index + 1}. ${formatValidationError(message, extensions, formatMessage, formatMessageWithValues)}`
+ .map(
+ ({ message, extensions }, index) =>
+ // eslint-disable-next-line implicit-arrow-linebreak
+ `${index + 1}. ${formatValidationError(message, extensions, formatMessage, formatMessageWithValues)}`,
)
.join('\n')}
diff --git a/src/hooks.js b/src/hooks.js
index 933397d..ae210bb 100644
--- a/src/hooks.js
+++ b/src/hooks.js
@@ -19,6 +19,7 @@ export const useSystemData = (economicUnit, startDate, endDate) => {
assigned: 0,
expired: 0,
cancelled: 0,
+ printed: 0,
},
payment: { paid: 0, unpaid: 0 },
});
@@ -44,6 +45,7 @@ export const useSystemData = (economicUnit, startDate, endDate) => {
assigned: payload.assigned.totalCount,
expired: payload.expired.totalCount,
cancelled: payload.cancelled.totalCount,
+ printed: payload.printed.totalCount,
},
payment: {
paid: payload.paid.totalCount,
diff --git a/src/translations/en.json b/src/translations/en.json
index 4ebea62..63a7e43 100644
--- a/src/translations/en.json
+++ b/src/translations/en.json
@@ -240,6 +240,7 @@
"workerVoucher.SystemData.voucher.assigned": "Assigned",
"workerVoucher.SystemData.voucher.expired": "Expired",
"workerVoucher.SystemData.voucher.cancelled": "Cancelled",
+ "workerVoucher.SystemData.voucher.printed": "Printed",
"workerVoucher.SystemData.payment.title": "Payments",
"workerVoucher.SystemData.payment.paid": "Paid",
"workerVoucher.SystemData.payment.unpaid": "Unpaid",
diff --git a/src/utils/utils.js b/src/utils/utils.js
index 3532d02..5f886d5 100644
--- a/src/utils/utils.js
+++ b/src/utils/utils.js
@@ -82,6 +82,6 @@ export const trimDate = (date) => {
export function formatValidationError(message, extensions, formatMessage, formatMessageWithValues) {
return extensions
- ? formatMessageWithValues(message, extensions)
- : formatMessage(message);
+ ? formatMessageWithValues(message, extensions)
+ : formatMessage(message);
}