some cleanup and translation

This commit is contained in:
swtmply
2023-03-14 02:37:04 +08:00
parent 885e9c6958
commit 0617d79d19
3 changed files with 2879 additions and 2902 deletions

View File

@@ -1,29 +0,0 @@
import { gql } from "@apollo/client";
export const QUERY_ALL_PAYMENT_RESPONSE = gql`
query QUERY_ALL_PAYMENT_RESPONSE {
payment_response {
amount
bodyshopid
declinereason
ext_paymentid
id
jobid
paymentid
response
successful
}
}
`;
export const INSERT_PAYMENT_RESPONSE = gql`
mutation INSERT_PAYMENT_RESPONSE(
$paymentResponse: [payment_response_insert_input!]!
) {
insert_payment_response(objects: $paymentResponse) {
returning {
id
}
}
}
`;

View File

@@ -118,7 +118,8 @@
"jobspartsorder": "Parts order {{order_number}} added to job.", "jobspartsorder": "Parts order {{order_number}} added to job.",
"jobspartsreturn": "Parts return {{order_number}} added to job.", "jobspartsreturn": "Parts return {{order_number}} added to job.",
"jobstatuschange": "Job status changed to {{status}}.", "jobstatuschange": "Job status changed to {{status}}.",
"jobsupplement": "Job supplement imported." "jobsupplement": "Job supplement imported.",
"failedpayment": "Failed payment"
} }
}, },
"billlines": { "billlines": {
@@ -1839,6 +1840,7 @@
"dashboard": "Dashboard", "dashboard": "Dashboard",
"enterbills": "Enter Bills", "enterbills": "Enter Bills",
"enterpayment": "Enter Payments", "enterpayment": "Enter Payments",
"entercardpayment": "Enter Card Payments",
"entertimeticket": "Enter Time Tickets", "entertimeticket": "Enter Time Tickets",
"export": "Export", "export": "Export",
"export-logs": "Export Logs", "export-logs": "Export Logs",

View File

@@ -16,14 +16,18 @@ const url = process.env.NODE_ENV
: "https://test.cpteller.com/api/custapi.cfc?method=autoterminal"; : "https://test.cpteller.com/api/custapi.cfc?method=autoterminal";
exports.lightbox_credentials = async (req, res) => { exports.lightbox_credentials = async (req, res) => {
//req.user contains firebase decoded credentials
// can add bodyshopid to req.body
//Server side query to get API credentials for that shop and generatae link
try { try {
const options = { const options = {
method: "POST", method: "POST",
headers: { "content-type": "application/x-www-form-urlencoded" }, headers: { "content-type": "application/x-www-form-urlencoded" },
//TODO: Move these to environment variables/database. //TODO: Move these to environment variables/database.
data: qs.stringify({ data: qs.stringify({
merchantkey: "3B8068", merchantkey: "3B8068", //This should be dynamic
apikey: "Oepn2B.XqRgzAqHqvOOmYUxD2VW.vGSipi", apikey: "Oepn2B.XqRgzAqHqvOOmYUxD2VW.vGSipi", //This should be dynamic
operatingenv: operatingenv:
process.env.NODE_ENV === undefined process.env.NODE_ENV === undefined
? process.env.NODE_ENV ? process.env.NODE_ENV