From 0f323b927c5faa121c8100c169176b7798c1941e Mon Sep 17 00:00:00 2001 From: acialini Date: Mon, 3 Jun 2024 15:14:06 +0200 Subject: [PATCH] fix: helpers --- ...entMethodCopy.js => getOnlinePaymentMethodContent.js} | 4 ++-- .../helpers/notices/getPhysicalPaymentMethodContent.js | 9 +++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) rename node/pdf-generate/helpers/notices/{getPaymentMethodCopy.js => getOnlinePaymentMethodContent.js} (69%) create mode 100644 node/pdf-generate/helpers/notices/getPhysicalPaymentMethodContent.js diff --git a/node/pdf-generate/helpers/notices/getPaymentMethodCopy.js b/node/pdf-generate/helpers/notices/getOnlinePaymentMethodContent.js similarity index 69% rename from node/pdf-generate/helpers/notices/getPaymentMethodCopy.js rename to node/pdf-generate/helpers/notices/getOnlinePaymentMethodContent.js index 436ab61..6b554ba 100644 --- a/node/pdf-generate/helpers/notices/getPaymentMethodCopy.js +++ b/node/pdf-generate/helpers/notices/getOnlinePaymentMethodContent.js @@ -1,4 +1,4 @@ -function getPaymentMethodCopy(website, app) { +function getOnlinePaymentMethodContent(website, app) { if (website && app) { return "sul sito o app dell'ente, "; } else if (website && !app) { @@ -10,4 +10,4 @@ function getPaymentMethodCopy(website, app) { } } -module.exports = getPaymentMethodCopy; +module.exports = getOnlinePaymentMethodContent; \ No newline at end of file diff --git a/node/pdf-generate/helpers/notices/getPhysicalPaymentMethodContent.js b/node/pdf-generate/helpers/notices/getPhysicalPaymentMethodContent.js new file mode 100644 index 0000000..810d965 --- /dev/null +++ b/node/pdf-generate/helpers/notices/getPhysicalPaymentMethodContent.js @@ -0,0 +1,9 @@ +function getOfflinePaymentMethodContent(location) { + if (location) { + return `${location}, `; + } else { + return null; + } +} + +module.exports = getOfflinePaymentMethodContent; \ No newline at end of file