Merged PR 1104: appeal complete flag on new appeal
Related work items: #10561
This commit is contained in:
@@ -77,49 +77,57 @@ const AwaitingSubmissionFromBlob = (props) => {
|
|||||||
<div className="cardModuleDetails">
|
<div className="cardModuleDetails">
|
||||||
<div className="cardModuleReference">
|
<div className="cardModuleReference">
|
||||||
<b>{t("myportal:temp-reference")}:</b>
|
<b>{t("myportal:temp-reference")}:</b>
|
||||||
|
{showTopThreeArr[key].hasOwnProperty(
|
||||||
|
"appealComplete"
|
||||||
|
) ? (
|
||||||
|
<b>
|
||||||
|
{showTopThreeArr[index].pinswg_name}
|
||||||
|
</b>
|
||||||
|
) : (
|
||||||
|
<Link
|
||||||
|
href={
|
||||||
|
(router.locale == "cy"
|
||||||
|
? "/fymhorth"
|
||||||
|
: "/myportal") +
|
||||||
|
"/" +
|
||||||
|
urlname +
|
||||||
|
"?lpa=" +
|
||||||
|
showTopThreeArr[key][
|
||||||
|
"_pinswg_associatedlpa_value"
|
||||||
|
] +
|
||||||
|
"&apt=" +
|
||||||
|
showTopThreeArr[key]
|
||||||
|
.pinswg_appealcasetype +
|
||||||
|
"&casereference=" +
|
||||||
|
showTopThreeArr[key]
|
||||||
|
.pinswg_name +
|
||||||
|
"&inid=" +
|
||||||
|
showTopThreeArr[key].incidentid
|
||||||
|
}
|
||||||
|
className="govuk-link--no-underline"
|
||||||
|
data-id={index}
|
||||||
|
onClick={() => {
|
||||||
|
props.setCurrentReference({
|
||||||
|
"currentReference":
|
||||||
|
showTopThreeArr[key]
|
||||||
|
.ticketnumber,
|
||||||
|
|
||||||
<Link
|
"currentType":
|
||||||
href={
|
"awaitingSubmission",
|
||||||
(router.locale == "cy"
|
|
||||||
? "/fymhorth"
|
|
||||||
: "/myportal") +
|
|
||||||
"/" +
|
|
||||||
urlname +
|
|
||||||
"?lpa=" +
|
|
||||||
showTopThreeArr[key][
|
|
||||||
"_pinswg_associatedlpa_value"
|
|
||||||
] +
|
|
||||||
"&apt=" +
|
|
||||||
showTopThreeArr[key]
|
|
||||||
.pinswg_appealcasetype +
|
|
||||||
"&casereference=" +
|
|
||||||
showTopThreeArr[key].pinswg_name +
|
|
||||||
"&inid=" +
|
|
||||||
showTopThreeArr[key].incidentid
|
|
||||||
}
|
|
||||||
className="govuk-link--no-underline"
|
|
||||||
data-id={index}
|
|
||||||
onClick={() => {
|
|
||||||
props.setCurrentReference({
|
|
||||||
"currentReference":
|
|
||||||
showTopThreeArr[key]
|
|
||||||
.ticketnumber,
|
|
||||||
|
|
||||||
"currentType":
|
"incidentid":
|
||||||
"awaitingSubmission",
|
showTopThreeArr[key]
|
||||||
|
.incidentid,
|
||||||
|
|
||||||
"incidentid":
|
"appealType":
|
||||||
showTopThreeArr[key]
|
showTopThreeArr[key]
|
||||||
.incidentid,
|
.pinswg_appealcasetype,
|
||||||
|
});
|
||||||
"appealType":
|
}}
|
||||||
showTopThreeArr[key]
|
>
|
||||||
.pinswg_appealcasetype,
|
{showTopThreeArr[index].pinswg_name}
|
||||||
});
|
</Link>
|
||||||
}}
|
)}
|
||||||
>
|
|
||||||
{showTopThreeArr[index].pinswg_name}
|
|
||||||
</Link>
|
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<b>LPA reference:</b>{" "}
|
<b>LPA reference:</b>{" "}
|
||||||
@@ -227,34 +235,46 @@ const AwaitingSubmissionFromBlob = (props) => {
|
|||||||
showTopThreeArrDets[key].createdon
|
showTopThreeArrDets[key].createdon
|
||||||
)}
|
)}
|
||||||
</div>{" "}
|
</div>{" "}
|
||||||
|
{showTopThreeArr[key].hasOwnProperty(
|
||||||
|
"appealComplete"
|
||||||
|
) && (
|
||||||
|
<div className="cardModuleReference">
|
||||||
|
<b>Submission processing.....</b>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div className="">
|
{!showTopThreeArr[key].hasOwnProperty(
|
||||||
<button
|
"appealComplete"
|
||||||
title={t(
|
) && (
|
||||||
"case:do-you-want-to-delete-case-label"
|
<div className="">
|
||||||
)}
|
<button
|
||||||
className=" cardModuleRemoveCase govuk-link govuk-link--no-underline govuk-link--inverse "
|
title={t(
|
||||||
onClick={() => {
|
"case:do-you-want-to-delete-case-label"
|
||||||
confirm(
|
)}
|
||||||
t(
|
className=" cardModuleRemoveCase govuk-link govuk-link--no-underline govuk-link--inverse "
|
||||||
"case:do-you-want-to-delete-case-label"
|
onClick={() => {
|
||||||
) +
|
confirm(
|
||||||
showTopThreeArr[key]
|
|
||||||
.pinswg_name +
|
|
||||||
"?\n" +
|
|
||||||
t(
|
t(
|
||||||
"case:do-you-want-to-delete-case-disclaimer-label"
|
"case:do-you-want-to-delete-case-label"
|
||||||
)
|
) +
|
||||||
) &&
|
showTopThreeArr[key]
|
||||||
deleteCaseItem(
|
.pinswg_name +
|
||||||
props.containerID,
|
"?\n" +
|
||||||
showTopThreeArr[key].pinswg_name
|
t(
|
||||||
);
|
"case:do-you-want-to-delete-case-disclaimer-label"
|
||||||
}}
|
)
|
||||||
>
|
) &&
|
||||||
—
|
deleteCaseItem(
|
||||||
</button>
|
props.containerID,
|
||||||
</div>
|
showTopThreeArr[key]
|
||||||
|
.pinswg_name
|
||||||
|
);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
—
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
|
|||||||
@@ -109,14 +109,10 @@ let CompleteAppeal = (props) => {
|
|||||||
<div className="govuk-grid-row">
|
<div className="govuk-grid-row">
|
||||||
<div className="govuk-grid-column-two-thirds">
|
<div className="govuk-grid-column-two-thirds">
|
||||||
<div className="govuk-panel govuk-panel--confirmation">
|
<div className="govuk-panel govuk-panel--confirmation">
|
||||||
<h1 className="govuk-panel__title">Appeal complete</h1>
|
<h1 className="govuk-panel__title">
|
||||||
<div className="govuk-panel__body">
|
Appeal Submission complete
|
||||||
Your reference number
|
</h1>
|
||||||
<br />
|
<div className="govuk-panel__body"></div>
|
||||||
<strong>
|
|
||||||
{props.appealType.caseReference.ticketnumber}
|
|
||||||
</strong>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p className="govuk-body">
|
<p className="govuk-body">
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
import { hashAPIPath } from "../../../actions";
|
import { hashAPIPath } from "../../../actions";
|
||||||
import {
|
import {
|
||||||
getBlobs,
|
|
||||||
createCaseCompleteMessage,
|
createCaseCompleteMessage,
|
||||||
|
getProgressBlobs,
|
||||||
|
downloadProgressFile,
|
||||||
|
createBlob,
|
||||||
} from "../../../actions/azurestorage";
|
} from "../../../actions/azurestorage";
|
||||||
|
|
||||||
import nextConnect from "next-connect";
|
import nextConnect from "next-connect";
|
||||||
@@ -25,8 +27,20 @@ ApiProxy.get(async (req, res) => {
|
|||||||
"&tempcaseref=" +
|
"&tempcaseref=" +
|
||||||
tempCaseRef;
|
tempCaseRef;
|
||||||
|
|
||||||
|
const blobProgress = await getProgressBlobs(
|
||||||
|
containerName,
|
||||||
|
tempCaseRef
|
||||||
|
).then((data) => {
|
||||||
|
return downloadProgressFile(containerName, data.path, tempCaseRef);
|
||||||
|
});
|
||||||
|
|
||||||
|
Object.assign(blobProgress, {
|
||||||
|
"appealComplete": true,
|
||||||
|
});
|
||||||
|
|
||||||
//http: if (hashAPIPath(checkquerypath) == "&hash=" + checkHash) {
|
//http: if (hashAPIPath(checkquerypath) == "&hash=" + checkHash) {
|
||||||
await createCaseCompleteMessage(containerName, tempCaseRef).then((data) => {
|
await createCaseCompleteMessage(containerName, tempCaseRef).then((data) => {
|
||||||
|
createBlob(JSON.stringify(blobProgress), containerName, tempCaseRef);
|
||||||
return res.status(200).json(data);
|
return res.status(200).json(data);
|
||||||
});
|
});
|
||||||
// } else {
|
// } else {
|
||||||
|
|||||||
@@ -182,14 +182,14 @@ export default async function handler(req, res) {
|
|||||||
);
|
);
|
||||||
|
|
||||||
uploadPDFAppealFiles(
|
uploadPDFAppealFiles(
|
||||||
process.cwd() + `tmp/${appealBodyObj.pinswg_name}.pdf`,
|
process.cwd() + `/tmp/${appealBodyObj.pinswg_name}.pdf`,
|
||||||
containerID,
|
containerID,
|
||||||
appealBodyObj.pinswg_name
|
appealBodyObj.pinswg_name
|
||||||
);
|
);
|
||||||
|
|
||||||
// then remove from local folder
|
// then remove from local folder
|
||||||
|
|
||||||
//fs.unlinkSync(process.cwd() + `tmp/${appealBodyObj.repfile_name}.pdf`);
|
//fs.unlinkSync(process.cwd() + `/tmp/${appealBodyObj.repfile_name}.pdf`);
|
||||||
|
|
||||||
return res.status(200).json({
|
return res.status(200).json({
|
||||||
data: "success",
|
data: "success",
|
||||||
|
|||||||
@@ -219,19 +219,19 @@ export default function handler(req, res) {
|
|||||||
|
|
||||||
ReactPDF.render(
|
ReactPDF.render(
|
||||||
<MyDocument docProps={reqBodyobj} />,
|
<MyDocument docProps={reqBodyobj} />,
|
||||||
process.cwd() + `tmp/${reqBodyobj.repfile_name}.pdf`
|
process.cwd() + `/tmp/${reqBodyobj.repfile_name}.pdf`
|
||||||
);
|
);
|
||||||
|
|
||||||
// upload file to storage account
|
// upload file to storage account
|
||||||
uploadPDFRepFiles(
|
uploadPDFRepFiles(
|
||||||
process.cwd() + `tmp/${reqBodyobj.repfile_name}.pdf`,
|
process.cwd() + `/tmp/${reqBodyobj.repfile_name}.pdf`,
|
||||||
containerID,
|
containerID,
|
||||||
caseRef + "/" + reqBodyobj.repfile_name,
|
caseRef + "/" + reqBodyobj.repfile_name,
|
||||||
repType
|
repType
|
||||||
);
|
);
|
||||||
|
|
||||||
// remove from local folder
|
// remove from local folder
|
||||||
//fs.unlinkSync(process.cwd() + `tmp/${reqBodyobj.repfile_name}.pdf`);
|
//fs.unlinkSync(process.cwd() + `/tmp/${reqBodyobj.repfile_name}.pdf`);
|
||||||
|
|
||||||
return res.status(200).json({
|
return res.status(200).json({
|
||||||
data: "success",
|
data: "success",
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user