Compare commits
9 Commits
feature/IO
...
release/20
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d835021069 | ||
|
|
c4b303aee1 | ||
|
|
fd04125ed1 | ||
|
|
87e8b2ce27 | ||
|
|
d52426f5f5 | ||
|
|
5e24404e82 | ||
|
|
64a280b111 | ||
|
|
cf393e8f9e | ||
|
|
0402156b4d |
@@ -395,32 +395,33 @@ export function ScheduleEventComponent({
|
||||
) : (
|
||||
<ScheduleManualEvent event={event} />
|
||||
)}
|
||||
{event.isintake && HasFeatureAccess({ featureName: "checklist", bodyshop }) ? (
|
||||
<Link
|
||||
to={{
|
||||
pathname: `/manage/jobs/${event.job && event.job.id}/intake`,
|
||||
search: `?appointmentId=${event.id}`
|
||||
}}
|
||||
>
|
||||
<Button disabled={event.arrived}>{t("appointments.actions.intake")}</Button>
|
||||
</Link>
|
||||
) : (
|
||||
<Popover //open={open}
|
||||
content={popMenu}
|
||||
open={popOverVisible}
|
||||
onOpenChange={setPopOverVisible}
|
||||
onClick={(e) => {
|
||||
if (event.job?.id) {
|
||||
e.stopPropagation();
|
||||
getJobDetails();
|
||||
}
|
||||
}}
|
||||
getPopupContainer={(trigger) => trigger.parentNode}
|
||||
trigger="click"
|
||||
>
|
||||
<Button disabled={event.arrived}>{t("jobs.actions.intake_quick")}</Button>
|
||||
</Popover>
|
||||
)}
|
||||
{event.job &&
|
||||
(HasFeatureAccess({ featureName: "checklist", bodyshop }) ? (
|
||||
<Link
|
||||
to={{
|
||||
pathname: `/manage/jobs/${event.job && event.job.id}/intake`,
|
||||
search: `?appointmentId=${event.id}`
|
||||
}}
|
||||
>
|
||||
<Button disabled={event.arrived}>{t("appointments.actions.intake")}</Button>
|
||||
</Link>
|
||||
) : (
|
||||
<Popover //open={open}
|
||||
content={popMenu}
|
||||
open={popOverVisible}
|
||||
onOpenChange={setPopOverVisible}
|
||||
onClick={(e) => {
|
||||
if (event.job?.id) {
|
||||
e.stopPropagation();
|
||||
getJobDetails();
|
||||
}
|
||||
}}
|
||||
getPopupContainer={(trigger) => trigger.parentNode}
|
||||
trigger="click"
|
||||
>
|
||||
<Button disabled={event.arrived}>{t("jobs.actions.intake_quick")}</Button>
|
||||
</Popover>
|
||||
))}
|
||||
</Space>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -42,7 +42,7 @@ export function JobsDocumentsContainer({
|
||||
variables: { jobId: jobId },
|
||||
fetchPolicy: "network-only",
|
||||
nextFetchPolicy: "network-only",
|
||||
skip: Imgproxy.treatment === "on" || !!billId
|
||||
skip: !!billId
|
||||
});
|
||||
|
||||
if (loading) return <LoadingSpinner />;
|
||||
|
||||
@@ -478,7 +478,7 @@ async function InsertJob(oauthClient, qbo_realmId, req, job, parentTierRef) {
|
||||
|
||||
exports.InsertJob = InsertJob;
|
||||
|
||||
async function QueryMetaData(oauthClient, qbo_realmId, req, bodyshopid) {
|
||||
async function QueryMetaData(oauthClient, qbo_realmId, req, bodyshopid, jobid) {
|
||||
const items = await oauthClient.makeApiCall({
|
||||
url: urlBuilder(qbo_realmId, "query", `select * From Item where active=true maxresults 1000`),
|
||||
method: "POST",
|
||||
@@ -492,6 +492,7 @@ async function QueryMetaData(oauthClient, qbo_realmId, req, bodyshopid) {
|
||||
name: "QueryItems",
|
||||
status: items.response?.status,
|
||||
bodyshopid,
|
||||
jobid: jobid,
|
||||
email: req.user.email
|
||||
})
|
||||
setNewRefreshToken(req.user.email, items);
|
||||
@@ -508,6 +509,7 @@ async function QueryMetaData(oauthClient, qbo_realmId, req, bodyshopid) {
|
||||
name: "QueryTaxCodes",
|
||||
status: taxCodes.response?.status,
|
||||
bodyshopid,
|
||||
jobid: jobid,
|
||||
email: req.user.email
|
||||
})
|
||||
const classes = await oauthClient.makeApiCall({
|
||||
@@ -523,6 +525,7 @@ async function QueryMetaData(oauthClient, qbo_realmId, req, bodyshopid) {
|
||||
name: "QueryClasses",
|
||||
status: classes.response?.status,
|
||||
bodyshopid,
|
||||
jobid: jobid,
|
||||
email: req.user.email
|
||||
})
|
||||
const taxCodeMapping = {};
|
||||
@@ -559,7 +562,7 @@ async function QueryMetaData(oauthClient, qbo_realmId, req, bodyshopid) {
|
||||
}
|
||||
|
||||
async function InsertInvoice(oauthClient, qbo_realmId, req, job, bodyshop, parentTierRef) {
|
||||
const { items, taxCodes, classes } = await QueryMetaData(oauthClient, qbo_realmId, req, job.shopid);
|
||||
const { items, taxCodes, classes } = await QueryMetaData(oauthClient, qbo_realmId, req, job.shopid, job.id);
|
||||
const InvoiceLineAdd = CreateInvoiceLines({
|
||||
bodyshop,
|
||||
jobs_by_pk: job,
|
||||
@@ -653,7 +656,7 @@ async function InsertInvoice(oauthClient, qbo_realmId, req, job, bodyshop, paren
|
||||
platform: "QBO",
|
||||
method: "POST",
|
||||
name: "InsertInvoice",
|
||||
status: result.status,
|
||||
status: result.response?.status,
|
||||
bodyshopid: job.shopid,
|
||||
jobid: job.id,
|
||||
email: req.user.email
|
||||
@@ -778,7 +781,7 @@ async function InsertInvoiceMultiPayerInvoice(
|
||||
platform: "QBO",
|
||||
method: "POST",
|
||||
name: "InsertInvoice",
|
||||
status: result.response.status,
|
||||
status: result.response?.status,
|
||||
bodyshopid: job.shopid,
|
||||
jobid: job.id,
|
||||
email: req.user.email
|
||||
|
||||
@@ -206,7 +206,7 @@ const createLogger = () => {
|
||||
jobid,
|
||||
paymentid,
|
||||
billid,
|
||||
status: status.toString() ?? "0",
|
||||
status: status?.toString() ?? "0",
|
||||
bodyshopid,
|
||||
email
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user