IO-2933 Resolve PR comments.
This commit is contained in:
@@ -337,13 +337,7 @@ const CardPaymentModalComponent = ({
|
|||||||
message.success(t("general.actions.copied"));
|
message.success(t("general.actions.copied"));
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div
|
<div>{paymentLink}</div>
|
||||||
onClick={() => {
|
|
||||||
//Copy the link.
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{paymentLink}
|
|
||||||
</div>
|
|
||||||
<CopyFilled />
|
<CopyFilled />
|
||||||
</Space>
|
</Space>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ export function PaymentsGenerateLink({ bodyshop, currentUser, callback, job, ope
|
|||||||
try {
|
try {
|
||||||
p = parsePhoneNumber(job.ownr_ph1 || "", "CA");
|
p = parsePhoneNumber(job.ownr_ph1 || "", "CA");
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log("Unable to part phone number");
|
console.log("Unable to parse phone number");
|
||||||
}
|
}
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
const response = await axios.post("/intellipay/generate_payment_url", {
|
const response = await axios.post("/intellipay/generate_payment_url", {
|
||||||
|
|||||||
@@ -95,8 +95,8 @@ const formatPriority = (priority) => {
|
|||||||
* @returns {{header, body: string, subHeader: string}}
|
* @returns {{header, body: string, subHeader: string}}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function getEndpoints() {
|
const getEndpoints = () =>
|
||||||
const endPoints = InstanceManager({
|
InstanceManager({
|
||||||
imex: process.env?.NODE_ENV === "test" ? "https://test.imex.online" : "https://imex.online",
|
imex: process.env?.NODE_ENV === "test" ? "https://test.imex.online" : "https://imex.online",
|
||||||
rome:
|
rome:
|
||||||
bodyshop.convenient_company === "promanager"
|
bodyshop.convenient_company === "promanager"
|
||||||
@@ -107,8 +107,7 @@ function getEndpoints() {
|
|||||||
? "https//test.romeonline.io"
|
? "https//test.romeonline.io"
|
||||||
: "https://romeonline.io"
|
: "https://romeonline.io"
|
||||||
});
|
});
|
||||||
return endPoints;
|
|
||||||
}
|
|
||||||
const generateTemplateArgs = (title, priority, description, dueDate, bodyshop, job, taskId) => {
|
const generateTemplateArgs = (title, priority, description, dueDate, bodyshop, job, taskId) => {
|
||||||
const endPoints = getEndpoints();
|
const endPoints = getEndpoints();
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -172,12 +172,9 @@ exports.postback = async (req, res) => {
|
|||||||
|
|
||||||
//Adding in the user email to the short pay email.
|
//Adding in the user email to the short pay email.
|
||||||
//Need to check this to ensure backwards compatibility for clients that don't update.
|
//Need to check this to ensure backwards compatibility for clients that don't update.
|
||||||
let partialPayments;
|
|
||||||
if (!Array.isArray(parsedComment)) {
|
const partialPayments = Array.isArray(parsedComment) ? parsedComment : parsedComment.payments;
|
||||||
partialPayments = parsedComment.payments;
|
|
||||||
} else {
|
|
||||||
partialPayments = parsedComment;
|
|
||||||
}
|
|
||||||
const jobs = await gqlClient.request(queries.GET_JOBS_BY_PKS, {
|
const jobs = await gqlClient.request(queries.GET_JOBS_BY_PKS, {
|
||||||
ids: partialPayments.map((p) => p.jobid)
|
ids: partialPayments.map((p) => p.jobid)
|
||||||
});
|
});
|
||||||
@@ -207,7 +204,7 @@ exports.postback = async (req, res) => {
|
|||||||
iprequest: values,
|
iprequest: values,
|
||||||
paymentResult
|
paymentResult
|
||||||
});
|
});
|
||||||
res.sendStatus(200);
|
|
||||||
if (values.origin === "OneLink" && parsedComment.userEmail) {
|
if (values.origin === "OneLink" && parsedComment.userEmail) {
|
||||||
//Send an email, it was a text to pay link.
|
//Send an email, it was a text to pay link.
|
||||||
const endPoints = getEndpoints();
|
const endPoints = getEndpoints();
|
||||||
@@ -226,6 +223,7 @@ exports.postback = async (req, res) => {
|
|||||||
.join("<br/>")
|
.join("<br/>")
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
res.sendStatus(200);
|
||||||
}
|
}
|
||||||
} else if (values.invoice) {
|
} else if (values.invoice) {
|
||||||
//This is a link email that's been sent out.
|
//This is a link email that's been sent out.
|
||||||
|
|||||||
Reference in New Issue
Block a user