Merged PR 1138: adjusted ordering of sequence to complete
adjusted ordering of sequence to complete Related work items: #11021
This commit is contained in:
@@ -1740,6 +1740,7 @@ export const sendCaseCompleteMessage = async (containerID, caseReference) => {
|
||||
|
||||
return axios(config)
|
||||
.then((res) => {
|
||||
console.log("sendCaseCompleteMessage: ", res.data);
|
||||
return res.data;
|
||||
})
|
||||
.catch((error) => {
|
||||
|
||||
@@ -78,7 +78,7 @@ const AwaitingSubmissionFromBlob = (props) => {
|
||||
<div className="cardModuleReference">
|
||||
<b>{t("myportal:temp-reference")}:</b>
|
||||
{showTopThreeArr[key].hasOwnProperty(
|
||||
"appealCompletes"
|
||||
"appealComplete"
|
||||
) ? (
|
||||
<b>
|
||||
{showTopThreeArr[index].pinswg_name}
|
||||
|
||||
@@ -18,7 +18,7 @@ import {
|
||||
getThumbnailIconByExtension,
|
||||
bytesToSize,
|
||||
} from "../utils";
|
||||
import { generateAppealPDF } from "../../actions";
|
||||
import { generateAppealPDF, sendCaseCompleteMessage } from "../../actions";
|
||||
|
||||
let BuildCheckSection = (props) => {
|
||||
useEffect(() => {
|
||||
@@ -118,6 +118,29 @@ let BuildCheckSection = (props) => {
|
||||
return labelTrans;
|
||||
};
|
||||
|
||||
const finaliseAppeal = async () => {
|
||||
console.log("finalising appeal:");
|
||||
await generateAppealPDF(
|
||||
pdfObj,
|
||||
props.props.accountDetails.containerID,
|
||||
props.appealType.caseReference.ticketnumber,
|
||||
router.query.appealtypes,
|
||||
pdfObj.filesList
|
||||
// props.appealType.fileList
|
||||
)
|
||||
.then((data) => {
|
||||
console.log("have generated pdf:", data);
|
||||
sendCaseCompleteMessage(
|
||||
props.props.accountDetails.containerID,
|
||||
props.appealType.caseReference.ticketnumber
|
||||
);
|
||||
})
|
||||
.then((data) => {
|
||||
console.log("have sent comple message :", data);
|
||||
setCurrentSection(9999);
|
||||
});
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="govuk-grid-row" key={1222}>
|
||||
<div className="govuk-grid-column-full">
|
||||
@@ -254,15 +277,7 @@ let BuildCheckSection = (props) => {
|
||||
className="govuk-button"
|
||||
data-module="govuk-button"
|
||||
onClick={() => {
|
||||
generateAppealPDF(
|
||||
pdfObj,
|
||||
props.props.accountDetails.containerID,
|
||||
props.appealType.caseReference.ticketnumber,
|
||||
router.query.appealtypes,
|
||||
pdfObj.filesList
|
||||
// props.appealType.fileList
|
||||
),
|
||||
setCurrentSection(9999);
|
||||
finaliseAppeal();
|
||||
}}
|
||||
>
|
||||
{t("newappeal:submit-appeal-button")}
|
||||
|
||||
@@ -62,10 +62,10 @@ let CompleteAppeal = (props) => {
|
||||
};
|
||||
sendEmail(templateId, emailAddress, personalisation, reference);
|
||||
|
||||
sendCaseCompleteMessage(
|
||||
props.props.accountDetails.containerID,
|
||||
props.appealType.caseReference.ticketnumber
|
||||
);
|
||||
// sendCaseCompleteMessage(
|
||||
// props.props.accountDetails.containerID,
|
||||
// props.appealType.caseReference.ticketnumber
|
||||
// );
|
||||
|
||||
console.log("patching///////////////");
|
||||
//
|
||||
|
||||
@@ -27,28 +27,48 @@ ApiProxy.get(async (req, res) => {
|
||||
"&tempcaseref=" +
|
||||
tempCaseRef;
|
||||
|
||||
// const blobProgress = await getProgressBlobs(
|
||||
// containerName,
|
||||
// tempCaseRef
|
||||
// ).then((data) => {
|
||||
// return downloadProgressFile(containerName, data.path, tempCaseRef);
|
||||
// });
|
||||
const blobProgress = await getProgressBlobs(
|
||||
containerName,
|
||||
tempCaseRef
|
||||
).then((data) => {
|
||||
return downloadProgressFile(containerName, data.path, tempCaseRef);
|
||||
});
|
||||
|
||||
// Object.assign(blobProgress, {
|
||||
// "appealComplete": true,
|
||||
// });
|
||||
Object.assign(blobProgress, {
|
||||
"appealComplete": true,
|
||||
});
|
||||
|
||||
//http: if (hashAPIPath(checkquerypath) == "&hash=" + checkHash) {
|
||||
await createCaseCompleteMessage(containerName, tempCaseRef)
|
||||
.then((data) => {
|
||||
//createBlob(JSON.stringify(blobProgress), containerName, tempCaseRef);
|
||||
|
||||
await createBlob(JSON.stringify(blobProgress), containerName, tempCaseRef)
|
||||
.then(() => {
|
||||
createCaseCompleteMessage(containerName, tempCaseRef);
|
||||
return res.status(200).json(data);
|
||||
})
|
||||
.catch((error) => {
|
||||
//console.log(error);
|
||||
|
||||
console.log(
|
||||
"///////////////////////\n createCaseCompleteMessage:",
|
||||
error,
|
||||
"///////////////////////\n"
|
||||
);
|
||||
return res.status(400).json(error);
|
||||
});
|
||||
|
||||
// await createCaseCompleteMessage(containerName, tempCaseRef)
|
||||
// .then((data) => {
|
||||
// console.log(data);
|
||||
// createBlob(
|
||||
// JSON.stringify(blobProgress),
|
||||
// containerName,
|
||||
// tempCaseRef
|
||||
// );
|
||||
// return res.status(200).json(data);
|
||||
// })
|
||||
// .catch((error) => {
|
||||
// console.log(error);
|
||||
|
||||
// return res.status(400).json(error);
|
||||
// });
|
||||
});
|
||||
|
||||
export const config = {
|
||||
|
||||
@@ -186,8 +186,8 @@ export default async function handler(req, res) {
|
||||
blobProgress.pinswg_name
|
||||
).then((data) => {
|
||||
console.log(
|
||||
"///////////////////////////////////\nfile created: " + data,
|
||||
`/files/${blobProgress.pinswg_name}.pdf`,
|
||||
"///////////////////////////////////\nfile created: " +
|
||||
`/files/${blobProgress.pinswg_name}.pdf`,
|
||||
"\n/////////////////////////"
|
||||
);
|
||||
return res.status(200).json({
|
||||
|
||||
Reference in New Issue
Block a user