From fb5c5561e96097d3632df0bf3c4b64f7c29784a1 Mon Sep 17 00:00:00 2001 From: Patrick Fic Date: Wed, 17 May 2023 12:21:14 -0700 Subject: [PATCH 01/22] Resolve translations issues. --- bodyshop_translations.babel | 445 ++++++++++++++++++++++ client/src/translations/en_us/common.json | 58 +-- client/src/translations/es/common.json | 28 ++ client/src/translations/fr/common.json | 28 ++ 4 files changed, 530 insertions(+), 29 deletions(-) diff --git a/bodyshop_translations.babel b/bodyshop_translations.babel index 57c7a23e9..ce4109975 100644 --- a/bodyshop_translations.babel +++ b/bodyshop_translations.babel @@ -1009,6 +1009,27 @@ + + smspaymentreminder + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + suggesteddates false @@ -1516,6 +1537,27 @@ + + failedpayment + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + jobassignmentchange false @@ -18261,6 +18303,325 @@ + + job_payments + + + buttons + + + goback + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + + + proceedtopayment + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + + + refundpayment + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + + + + + notifications + + + error + + + description + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + + + title + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + + + + + + + titles + + + amount + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + + + dateOfPayment + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + + + descriptions + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + + + payer + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + + + payername + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + + + paymentid + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + + + paymenttype + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + + + refundamount + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + + + transactionid + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + + + + + joblines @@ -31328,6 +31689,27 @@ + + entercardpayment + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + enterpayment false @@ -31559,6 +31941,27 @@ + + paymentremindersms + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + phonebook false @@ -42161,6 +42564,48 @@ + + purchase_return_ratio_grouped_by_vendor_detail + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + + + purchase_return_ratio_grouped_by_vendor_summary + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + purchases_by_cost_center_detail false diff --git a/client/src/translations/en_us/common.json b/client/src/translations/en_us/common.json index 25508060d..a8c5bd86f 100644 --- a/client/src/translations/en_us/common.json +++ b/client/src/translations/en_us/common.json @@ -60,10 +60,10 @@ "nodateselected": "No date has been selected.", "priorappointments": "Previous Appointments", "reminder": "This is {{shopname}} reminding you about an appointment on {{date}} at {{time}}. Please let us know if you are not able to make the appointment. We look forward to seeing you soon. ", - "smspaymentreminder": "This is {{shopname}} reminding you about your remaining balance of {{amount}}. To pay for the said balance click the link {{payment_link}}. Thank you very much.", "scheduledfor": "Scheduled appointment for: ", "severalerrorsfound": "Several jobs have issues which may prevent accurate smart scheduling. Click to expand.", "smartscheduling": "Smart Scheduling", + "smspaymentreminder": "This is {{shopname}} reminding you about your remaining balance of {{amount}}. To pay for the said balance click the link {{payment_link}}. Thank you very much.", "suggesteddates": "Suggested Dates" }, "successes": { @@ -104,6 +104,7 @@ "admin_jobunvoid": "ADMIN: Job has been unvoided.", "billposted": "Bill with invoice number {{invoice_number}} posted.", "billupdated": "Bill with invoice number {{invoice_number}} updated.", + "failedpayment": "Failed payment", "jobassignmentchange": "Employee {{name}} assigned to {{operation}}", "jobassignmentremoved": "Employee assignment removed for {{operation}}", "jobchecklist": "Checklist type \"{{type}}\" completed. In production set to {{inproduction}}. Status set to {{status}}.", @@ -119,8 +120,7 @@ "jobspartsorder": "Parts order {{order_number}} added to job.", "jobspartsreturn": "Parts return {{order_number}} added to job.", "jobstatuschange": "Job status changed to {{status}}.", - "jobsupplement": "Job supplement imported.", - "failedpayment": "Failed payment" + "jobsupplement": "Job supplement imported." } }, "billlines": { @@ -956,30 +956,6 @@ "priorsuccesfulexport": "This record has previously been exported successfully. Please make sure it has already been deleted in the target system." } }, - "job_payments": { - "buttons": { - "refundpayment": "Refund Payment", - "proceedtopayment": "Proceed to Payment", - "goback": "Go Back" - }, - "titles": { - "descriptions": "Payment Details", - "payer": "Payer", - "payername": "Payer Name", - "amount": "Amount", - "dateOfPayment": "Date of Payment", - "transactionid": "Transaction ID", - "paymentid": "Payment Reference ID", - "paymenttype": "Payment Type", - "refundamount": "Refund Amount" - }, - "notifications": { - "error": { - "title": "Error placing refund", - "description": "Please try again. Make sure the refund amount does not exceeds the payment amount." - } - } - }, "general": { "actions": { "add": "Add", @@ -1159,6 +1135,30 @@ "updated": "Inventory line updated." } }, + "job_payments": { + "buttons": { + "goback": "Go Back", + "proceedtopayment": "Proceed to Payment", + "refundpayment": "Refund Payment" + }, + "notifications": { + "error": { + "description": "Please try again. Make sure the refund amount does not exceeds the payment amount.", + "title": "Error placing refund" + } + }, + "titles": { + "amount": "Amount", + "dateOfPayment": "Date of Payment", + "descriptions": "Payment Details", + "payer": "Payer", + "payername": "Payer Name", + "paymentid": "Payment Reference ID", + "paymenttype": "Payment Type", + "refundamount": "Refund Amount", + "transactionid": "Transaction ID" + } + }, "joblines": { "actions": { "converttolabor": "Convert amount to Labor.", @@ -1864,9 +1864,8 @@ "customers": "Customers", "dashboard": "Dashboard", "enterbills": "Enter Bills", - "enterpayment": "Enter Payments", - "paymentremindersms": "Send Payment Reminder via SMS", "entercardpayment": "Enter Card Payments", + "enterpayment": "Enter Payments", "entertimeticket": "Enter Time Tickets", "export": "Export", "export-logs": "Export Logs", @@ -1877,6 +1876,7 @@ "newjob": "Create New Job", "owners": "Owners", "parts-queue": "Parts Queue", + "paymentremindersms": "Send Payment Reminder via SMS", "phonebook": "Phonebook", "productionboard": "Production Board - Visual", "productionlist": "Production Board - List", diff --git a/client/src/translations/es/common.json b/client/src/translations/es/common.json index 27525eff9..6ae1a03de 100644 --- a/client/src/translations/es/common.json +++ b/client/src/translations/es/common.json @@ -63,6 +63,7 @@ "scheduledfor": "Cita programada para:", "severalerrorsfound": "", "smartscheduling": "", + "smspaymentreminder": "", "suggesteddates": "" }, "successes": { @@ -103,6 +104,7 @@ "admin_jobunvoid": "", "billposted": "", "billupdated": "", + "failedpayment": "", "jobassignmentchange": "", "jobassignmentremoved": "", "jobchecklist": "", @@ -1133,6 +1135,30 @@ "updated": "" } }, + "job_payments": { + "buttons": { + "goback": "", + "proceedtopayment": "", + "refundpayment": "" + }, + "notifications": { + "error": { + "description": "", + "title": "" + } + }, + "titles": { + "amount": "", + "dateOfPayment": "", + "descriptions": "", + "payer": "", + "payername": "", + "paymentid": "", + "paymenttype": "", + "refundamount": "", + "transactionid": "" + } + }, "joblines": { "actions": { "converttolabor": "", @@ -1838,6 +1864,7 @@ "customers": "Clientes", "dashboard": "", "enterbills": "", + "entercardpayment": "", "enterpayment": "", "entertimeticket": "", "export": "", @@ -1849,6 +1876,7 @@ "newjob": "", "owners": "propietarios", "parts-queue": "", + "paymentremindersms": "", "phonebook": "", "productionboard": "", "productionlist": "", diff --git a/client/src/translations/fr/common.json b/client/src/translations/fr/common.json index 5fdda7707..43b1799a6 100644 --- a/client/src/translations/fr/common.json +++ b/client/src/translations/fr/common.json @@ -63,6 +63,7 @@ "scheduledfor": "Rendez-vous prévu pour:", "severalerrorsfound": "", "smartscheduling": "", + "smspaymentreminder": "", "suggesteddates": "" }, "successes": { @@ -103,6 +104,7 @@ "admin_jobunvoid": "", "billposted": "", "billupdated": "", + "failedpayment": "", "jobassignmentchange": "", "jobassignmentremoved": "", "jobchecklist": "", @@ -1133,6 +1135,30 @@ "updated": "" } }, + "job_payments": { + "buttons": { + "goback": "", + "proceedtopayment": "", + "refundpayment": "" + }, + "notifications": { + "error": { + "description": "", + "title": "" + } + }, + "titles": { + "amount": "", + "dateOfPayment": "", + "descriptions": "", + "payer": "", + "payername": "", + "paymentid": "", + "paymenttype": "", + "refundamount": "", + "transactionid": "" + } + }, "joblines": { "actions": { "converttolabor": "", @@ -1838,6 +1864,7 @@ "customers": "Les clients", "dashboard": "", "enterbills": "", + "entercardpayment": "", "enterpayment": "", "entertimeticket": "", "export": "", @@ -1849,6 +1876,7 @@ "newjob": "", "owners": "Propriétaires", "parts-queue": "", + "paymentremindersms": "", "phonebook": "", "productionboard": "", "productionlist": "", From 2e763f1dd5685762c324e1fca4fb99ad7f36dcb1 Mon Sep 17 00:00:00 2001 From: Patrick Fic Date: Wed, 9 Aug 2023 20:14:44 -0700 Subject: [PATCH 02/22] Minor updates to intellipay processing. --- .../card-payment-modal.component..jsx | 6 ++-- .../job-payments/job-payments.component.jsx | 1 + client/src/graphql/jobs.queries.js | 1 - client/src/graphql/payments.queries.js | 9 ++++++ client/src/translations/en_us/common.json | 28 ------------------- server/intellipay/intellipay.js | 11 ++++---- 6 files changed, 19 insertions(+), 37 deletions(-) diff --git a/client/src/components/card-payment-modal/card-payment-modal.component..jsx b/client/src/components/card-payment-modal/card-payment-modal.component..jsx index 8e19c2a61..c34c201e2 100644 --- a/client/src/components/card-payment-modal/card-payment-modal.component..jsx +++ b/client/src/components/card-payment-modal/card-payment-modal.component..jsx @@ -136,10 +136,10 @@ const CardPaymentModalComponent = ({ }, update(cache, { data }) { cache.modify({ - id: cache.identify({ id: jobid, __typename: "jobs" }), + id: cache.identify({ id: values.jobid, __typename: "jobs" }), fields: { - payments(payments) { - return [...data.insert_payments.returning, ...payments]; + payments(cachedPayments) { + return [...data.insert_payments.returning, ...cachedPayments]; }, }, }); diff --git a/client/src/components/job-payments/job-payments.component.jsx b/client/src/components/job-payments/job-payments.component.jsx index 65943905d..9c85faf6a 100644 --- a/client/src/components/job-payments/job-payments.component.jsx +++ b/client/src/components/job-payments/job-payments.component.jsx @@ -209,6 +209,7 @@ export function JobPayments({ > {t("menus.header.enterpayment")} +