updated to allow new appeals to work post ph merge

This commit is contained in:
2026-02-23 12:46:15 +00:00
parent 43c692a959
commit 21eceff8df
4 changed files with 88 additions and 60 deletions
+32 -16
View File
@@ -1288,22 +1288,38 @@ export const getAllProgressBlobs = async (containerName) => {
for await (const blob of containerClient.findBlobsByTags( for await (const blob of containerClient.findBlobsByTags(
"blobType='Appeal'" "blobType='Appeal'"
)) { )) {
blob.name.split("/")[1].indexOf("_appeal.json") > 0 && const namePart = blob.name.split("/")[1] ?? "";
blob.name.split("/")[1].indexOf("undefined") < 0 &&
blobObj.push({ // keep your existing name filters
"name": blob.name.split("/")[1], if (
"path": blob.name, namePart.indexOf("_appeal.json") <= 0 ||
//"versionId": blob.versionId, namePart.indexOf("undefined") >= 0
"caseObj": )
blob.name.split("/")[0] + continue;
"/" +
blob.name.split("/")[0] + // existence check (filters out soft-deleted / stale index hits)
"_case.json" const blobClient = containerClient.getBlobClient(blob.name);
// "isCurrentVersion": blob.isCurrentVersion, try {
// "contentLength": blob.properties.contentLength, await blobClient.getProperties();
// "contentType": blob.contentType, } catch (e) {
// "lastModified": blob.properties.lastModified, // errors usually expose statusCode
}); if (e?.statusCode === 404) continue;
throw e;
}
blobObj.push({
"name": blob.name.split("/")[1],
"path": blob.name,
//"versionId": blob.versionId,
"caseObj":
blob.name.split("/")[0] +
"/" +
blob.name.split("/")[0] +
"_case.json"
// "isCurrentVersion": blob.isCurrentVersion,
// "contentLength": blob.properties.contentLength,
// "contentType": blob.contentType,
// "lastModified": blob.properties.lastModified,
});
} }
// console.log( // console.log(
@@ -6,17 +6,17 @@ import { parseCookies } from "nookies";
import { connect } from "react-redux"; import { connect } from "react-redux";
import { import {
deleteAwaitingSubmissionsFromBlob, deleteAwaitingSubmissionsFromBlob,
getAwaitingSubmissionFromBlobProxy, getAwaitingSubmissionFromBlobProxy
} from "../../actions"; } from "../../actions";
import { getFormCollectionByID } from "../../components/utils"; import { getFormCollectionByID } from "../../components/utils";
import transLookup from "../../data/lookuptranslations.json"; import transLookup from "../../data/lookuptranslations.json";
import { import {
setAwaitingSubmissionDetails, setAwaitingSubmissionDetails,
setAwaitingSubmissionFromBlob, setAwaitingSubmissionFromBlob
} from "../../store/awaitingSubmission/action"; } from "../../store/awaitingSubmission/action";
import { import {
setCurrentReference, setCurrentReference,
setCurrentView, setCurrentView
} from "../../store/currentView/action"; } from "../../store/currentView/action";
const AwaitingSubmissionFromBlob = (props) => { const AwaitingSubmissionFromBlob = (props) => {
@@ -149,7 +149,7 @@ const AwaitingSubmissionFromBlob = (props) => {
"appealType": "appealType":
showTopThreeArr[key] showTopThreeArr[key]
.pinswg_appealcasetype, .pinswg_appealcasetype
}); });
}} }}
> >
@@ -195,7 +195,7 @@ const AwaitingSubmissionFromBlob = (props) => {
<div className="cardModuleReference"> <div className="cardModuleReference">
<b>{t("myportal:lpa-reference-label")}:</b>{" "} <b>{t("myportal:lpa-reference-label")}:</b>{" "}
{ {
showTopThreeArr[key] showTopThreeArrDets[key]
.pinswg_lpaapplicationreference .pinswg_lpaapplicationreference
} }
</div> </div>
@@ -211,7 +211,7 @@ const AwaitingSubmissionFromBlob = (props) => {
).value + ).value +
'")].value_cy', '")].value_cy',
json: transLookup, json: transLookup,
eval: true, eval: true
}) })
: getFormCollectionByID( : getFormCollectionByID(
showTopThreeArr[key] showTopThreeArr[key]
@@ -223,32 +223,38 @@ const AwaitingSubmissionFromBlob = (props) => {
{_.isEmpty(showTopThreeArr) {_.isEmpty(showTopThreeArr)
? t("myportal:case-address-not-entered") ? t("myportal:case-address-not-entered")
: _.isEmpty(showTopThreeArr[index]) : _.isEmpty(showTopThreeArr[index])
? t("myportal:case-address-not-entered") ? t(
: _.isEmpty(showTopThreeArr[index]) "myportal:case-address-not-entered"
? t("myportal:case-address-not-entered") )
: _.isEmpty( : _.isEmpty(showTopThreeArr[index])
showTopThreeArr[index] ? t(
.pinswg_siteaddressline1 "myportal:case-address-not-entered"
) )
? t("myportal:case-address-not-entered") : _.isEmpty(
: showTopThreeArr[index] showTopThreeArr[index]
.pinswg_siteaddressline1 + .pinswg_siteaddressline1
(!_.isEmpty( )
showTopThreeArr[index] ? t(
.pinswg_siteaddressline2 "myportal:case-address-not-entered"
) )
? ", " + : showTopThreeArr[index]
showTopThreeArr[index] .pinswg_siteaddressline1 +
.pinswg_siteaddressline2 (!_.isEmpty(
: "") + showTopThreeArr[index]
(!_.isEmpty( .pinswg_siteaddressline2
showTopThreeArr[index] )
.pinswg_siteaddresstown ? ", " +
) showTopThreeArr[index]
? ", " + .pinswg_siteaddressline2
showTopThreeArr[index] : "") +
.pinswg_siteaddresstown (!_.isEmpty(
: "")} showTopThreeArr[index]
.pinswg_siteaddresstown
)
? ", " +
showTopThreeArr[index]
.pinswg_siteaddresstown
: "")}
</div> </div>
{showTopThreeArr[key].pinswg_appellantagent != {showTopThreeArr[key].pinswg_appellantagent !=
null && ( null && (
@@ -257,7 +263,8 @@ const AwaitingSubmissionFromBlob = (props) => {
.pinswg_appellantagent != .pinswg_appellantagent !=
846040000 && ( 846040000 && (
<b> <b>
{t("myportal:raised-by-label")}:{" "} {t("myportal:raised-by-label")}
:{" "}
</b> </b>
)} )}
{showTopThreeArr[key] {showTopThreeArr[key]
@@ -280,7 +287,8 @@ const AwaitingSubmissionFromBlob = (props) => {
846040000 && ( 846040000 && (
<div className="cardModuleReference"> <div className="cardModuleReference">
<b> <b>
{t("myportal:on-behalf-of-label")}:{" "} {t("myportal:on-behalf-of-label")}
:{" "}
</b> </b>
{showTopThreeArr[key] {showTopThreeArr[key]
.pinswg_appellantfirstname + .pinswg_appellantfirstname +
@@ -303,7 +311,7 @@ const AwaitingSubmissionFromBlob = (props) => {
] + ] +
'")].value_cy', '")].value_cy',
json: transLookup, json: transLookup,
eval: true, eval: true
}) })
: showTopThreeArr[key][ : showTopThreeArr[key][
"pinswg_lpaname" "pinswg_lpaname"
@@ -361,7 +369,7 @@ const AwaitingSubmissionFromBlob = (props) => {
onClick={() => { onClick={() => {
setCurrentView({ setCurrentView({
"viewName": "Awaiting Submission", "viewName": "Awaiting Submission",
"viewKey": "awaitingSubmissionDetails", "viewKey": "awaitingSubmissionDetails"
}); });
}} }}
> >
@@ -387,7 +395,7 @@ const mapDispatchToProps = (dispatch) => {
}, },
setAwaitingSubmissionDetails: (awaitingSubmissionDetails) => { setAwaitingSubmissionDetails: (awaitingSubmissionDetails) => {
dispatch(setAwaitingSubmissionDetails(awaitingSubmissionDetails)); dispatch(setAwaitingSubmissionDetails(awaitingSubmissionDetails));
}, }
}; };
}; };
@@ -1,6 +1,6 @@
import { import {
downloadAllProgressFiles, downloadAllProgressFiles,
getAllProgressBlobs, getAllProgressBlobs
} from "../../../actions/azurestorage"; } from "../../../actions/azurestorage";
import _ from "lodash"; import _ from "lodash";
import nextConnect from "next-connect"; import nextConnect from "next-connect";
@@ -40,8 +40,8 @@ ApiProxy.get(async (req, res) => {
export const config = { export const config = {
api: { api: {
bodyParser: false, bodyParser: false
}, }
}; };
export default ApiProxy; export default ApiProxy;
+8 -4
View File
@@ -364,7 +364,7 @@ let Home = (props) => {
const selectedObj = jsonpath({ const selectedObj = jsonpath({
path: "$..[?(@ && @.attributevalue=='" + apt + "')]", path: "$..[?(@ && @.attributevalue=='" + apt + "')]",
json: optionsStr, json: optionsStr,
eval: true, eval: true
}); });
const title = selectedObj?.[0]?.value; const title = selectedObj?.[0]?.value;
@@ -389,6 +389,7 @@ let Home = (props) => {
formTitle={formTitle} formTitle={formTitle}
mandatoryFieldsData={props.formData?.mandatoryFieldsData} mandatoryFieldsData={props.formData?.mandatoryFieldsData}
propsForChildren={props} propsForChildren={props}
docsOffline={props.docsOffline}
/> />
</NewAppealPageShell> </NewAppealPageShell>
); );
@@ -406,7 +407,10 @@ export const getServerSideProps = wrapper.getServerSideProps(
hydrateNewAppealStore(store, ctx.query, result); hydrateNewAppealStore(store, ctx.query, result);
return { return {
props: { url: process.env.NEXTAUTH_URL }, props: {
url: process.env.NEXTAUTH_URL,
docsOffline: process.env.DOCAPI_OFFLINE || false
}
}; };
} }
); );
@@ -418,7 +422,7 @@ const mapStateToProps = (state) => {
formData: state.formData, formData: state.formData,
appealType: state.appealType, appealType: state.appealType,
form: state.form, form: state.form,
accountDetails: state.accountDetails, accountDetails: state.accountDetails
}; };
}; };
@@ -430,7 +434,7 @@ const mapDispatchToProps = (dispatch) => {
}, },
setCaseReference: (refno) => { setCaseReference: (refno) => {
// dispatch(setCaseReferenceAction(refno)); // optional later // dispatch(setCaseReferenceAction(refno)); // optional later
}, }
}; };
}; };