Add DMS error WIP query.
This commit is contained in:
@@ -75,7 +75,7 @@ export function DmsPostForm({ bodyshop, socket, job, logsRef }) {
|
|||||||
jobid: job.id,
|
jobid: job.id,
|
||||||
txEnvelope: {
|
txEnvelope: {
|
||||||
...values,
|
...values,
|
||||||
SubscriptionID: "5b527d7d-baf3-40bc-adae-e7a541e37363" //bodyshop.cdk_dealerid
|
SubscriptionID: bodyshop.cdk_dealerid
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
@@ -96,16 +96,6 @@ export function DmsPostForm({ bodyshop, socket, job, logsRef }) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Card title={t("jobs.labels.dms.postingform")}>
|
<Card title={t("jobs.labels.dms.postingform")}>
|
||||||
<Button
|
|
||||||
onClick={() =>
|
|
||||||
wsssocket.emit("fortellis-export-job", {
|
|
||||||
txEnvelope: { test: 1, test2: 2, SubscriptionID: "5b527d7d-baf3-40bc-adae-e7a541e37363" },
|
|
||||||
jobid: job.id
|
|
||||||
})
|
|
||||||
}
|
|
||||||
>
|
|
||||||
Test
|
|
||||||
</Button>
|
|
||||||
<Form
|
<Form
|
||||||
form={form}
|
form={form}
|
||||||
layout="vertical"
|
layout="vertical"
|
||||||
|
|||||||
@@ -362,6 +362,13 @@ const FortellisActions = {
|
|||||||
type: "post",
|
type: "post",
|
||||||
apiName: "CDK Drive Post Accounts GL WIP",
|
apiName: "CDK Drive Post Accounts GL WIP",
|
||||||
},
|
},
|
||||||
|
QueryErrorWip: {
|
||||||
|
url: isProduction
|
||||||
|
? "https://api.fortellis.io/cdk/drive/glpost/errWIP"
|
||||||
|
: "https://api.fortellis.io/cdk-test/drive/glpost/errWIP",
|
||||||
|
type: "get",
|
||||||
|
apiName: "CDK Drive Post Accounts GL WIP",
|
||||||
|
},
|
||||||
ServiceHistoryInsert: {
|
ServiceHistoryInsert: {
|
||||||
url: isProduction
|
url: isProduction
|
||||||
? "https://api.fortellis.io/cdk/drive/post/service-vehicle-history-mgmt/v2/"
|
? "https://api.fortellis.io/cdk/drive/post/service-vehicle-history-mgmt/v2/"
|
||||||
|
|||||||
@@ -242,6 +242,8 @@ async function FortellisSelectedCustomer({ socket, redisHelpers, ioHelpers, sele
|
|||||||
"DEBUG",
|
"DEBUG",
|
||||||
`{6.1} Getting errors for Transaction ID ${DMSTransHeader.transID}`
|
`{6.1} Getting errors for Transaction ID ${DMSTransHeader.transID}`
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const DmsError = await QueryDmsErrWip({ socket, redisHelpers, JobData });
|
||||||
// socket.DmsError = await QueryDmsErrWip(socket);
|
// socket.DmsError = await QueryDmsErrWip(socket);
|
||||||
// //Delete the transaction
|
// //Delete the transaction
|
||||||
// CdkBase.createLogEvent(socket, "DEBUG", `{ 6.2 } Deleting Transaction ID ${ socket.DMSTransHeader.transID } `);
|
// CdkBase.createLogEvent(socket, "DEBUG", `{ 6.2 } Deleting Transaction ID ${ socket.DMSTransHeader.transID } `);
|
||||||
@@ -1161,34 +1163,32 @@ async function PostDmsBatchWip({ socket, redisHelpers, JobData }) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// async function QueryDmsErrWip(socket) {
|
async function QueryDmsErrWip({ socket, redisHelpers, JobData }) {
|
||||||
// try {
|
let DMSTransHeader;
|
||||||
// const soapClientAccountingGLInsertUpdate = await soap.createClientAsync(CdkWsdl.AccountingGLInsertUpdate);
|
try {
|
||||||
|
DMSTransHeader = await redisHelpers.getSessionTransactionData(socket.id, getTransactionType(JobData.id), FortellisCacheEnums.DMSTransHeader);
|
||||||
|
|
||||||
// const soapResponseAccountingGLInsertUpdate = await soapClientAccountingGLInsertUpdate.doErrWIPAsync({
|
|
||||||
// arg0: CDK_CREDENTIALS,
|
|
||||||
// arg1: { dealerId: socket.JobData.bodyshop.cdk_dealerid },
|
|
||||||
// arg2: socket.DMSTransHeader.transID
|
|
||||||
// });
|
|
||||||
|
|
||||||
// const [result, rawResponse, , rawRequest] = soapResponseAccountingGLInsertUpdate;
|
const result = await MakeFortellisCall({
|
||||||
|
...FortellisActions.QueryErrorWip,
|
||||||
|
headers: {},
|
||||||
|
redisHelpers,
|
||||||
|
socket,
|
||||||
|
jobid: JobData.id,
|
||||||
|
requestPathParams: DMSTransHeader.transID,
|
||||||
|
body: {
|
||||||
|
|
||||||
// CdkBase.createXmlEvent(socket, rawRequest, `soapClientAccountingGLInsertUpdate.doErrWIPAsync request.`);
|
}
|
||||||
|
});
|
||||||
// CdkBase.createLogEvent(
|
return result;
|
||||||
// socket,
|
} catch (error) {
|
||||||
// "DEBUG",
|
handleFortellisApiError(socket, error, "PostDmsBatchWip", {
|
||||||
// `soapClientAccountingGLInsertUpdate.doErrWIPAsync Result ${JSON.stringify(result, null, 2)}`
|
transId: DMSTransHeader?.transID,
|
||||||
// );
|
jobId: JobData.id
|
||||||
// CdkBase.createXmlEvent(socket, rawResponse, `soapClientAccountingGLInsertUpdate.doErrWIPAsync response.`);
|
});
|
||||||
// CheckCdkResponseForError(socket, soapResponseAccountingGLInsertUpdate);
|
throw error;
|
||||||
// const PostResult = result && result.return;
|
}
|
||||||
// return PostResult;
|
}
|
||||||
// } catch (error) {
|
|
||||||
// CdkBase.createLogEvent(socket, "ERROR", `Error in QueryDmsErrWip - ${error}`);
|
|
||||||
// throw new Error(error);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// async function DeleteDmsWip(socket) {
|
// async function DeleteDmsWip(socket) {
|
||||||
// try {
|
// try {
|
||||||
|
|||||||
Reference in New Issue
Block a user