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(
"blobType='Appeal'"
)) {
blob.name.split("/")[1].indexOf("_appeal.json") > 0 &&
blob.name.split("/")[1].indexOf("undefined") < 0 &&
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,
});
const namePart = blob.name.split("/")[1] ?? "";
// keep your existing name filters
if (
namePart.indexOf("_appeal.json") <= 0 ||
namePart.indexOf("undefined") >= 0
)
continue;
// existence check (filters out soft-deleted / stale index hits)
const blobClient = containerClient.getBlobClient(blob.name);
try {
await blobClient.getProperties();
} catch (e) {
// 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(
@@ -6,17 +6,17 @@ import { parseCookies } from "nookies";
import { connect } from "react-redux";
import {
deleteAwaitingSubmissionsFromBlob,
getAwaitingSubmissionFromBlobProxy,
getAwaitingSubmissionFromBlobProxy
} from "../../actions";
import { getFormCollectionByID } from "../../components/utils";
import transLookup from "../../data/lookuptranslations.json";
import {
setAwaitingSubmissionDetails,
setAwaitingSubmissionFromBlob,
setAwaitingSubmissionFromBlob
} from "../../store/awaitingSubmission/action";
import {
setCurrentReference,
setCurrentView,
setCurrentView
} from "../../store/currentView/action";
const AwaitingSubmissionFromBlob = (props) => {
@@ -149,7 +149,7 @@ const AwaitingSubmissionFromBlob = (props) => {
"appealType":
showTopThreeArr[key]
.pinswg_appealcasetype,
.pinswg_appealcasetype
});
}}
>
@@ -195,7 +195,7 @@ const AwaitingSubmissionFromBlob = (props) => {
<div className="cardModuleReference">
<b>{t("myportal:lpa-reference-label")}:</b>{" "}
{
showTopThreeArr[key]
showTopThreeArrDets[key]
.pinswg_lpaapplicationreference
}
</div>
@@ -211,7 +211,7 @@ const AwaitingSubmissionFromBlob = (props) => {
).value +
'")].value_cy',
json: transLookup,
eval: true,
eval: true
})
: getFormCollectionByID(
showTopThreeArr[key]
@@ -223,32 +223,38 @@ const AwaitingSubmissionFromBlob = (props) => {
{_.isEmpty(showTopThreeArr)
? t("myportal:case-address-not-entered")
: _.isEmpty(showTopThreeArr[index])
? t("myportal:case-address-not-entered")
: _.isEmpty(showTopThreeArr[index])
? t("myportal:case-address-not-entered")
: _.isEmpty(
showTopThreeArr[index]
.pinswg_siteaddressline1
)
? t("myportal:case-address-not-entered")
: showTopThreeArr[index]
.pinswg_siteaddressline1 +
(!_.isEmpty(
showTopThreeArr[index]
.pinswg_siteaddressline2
)
? ", " +
showTopThreeArr[index]
.pinswg_siteaddressline2
: "") +
(!_.isEmpty(
showTopThreeArr[index]
.pinswg_siteaddresstown
)
? ", " +
showTopThreeArr[index]
.pinswg_siteaddresstown
: "")}
? t(
"myportal:case-address-not-entered"
)
: _.isEmpty(showTopThreeArr[index])
? t(
"myportal:case-address-not-entered"
)
: _.isEmpty(
showTopThreeArr[index]
.pinswg_siteaddressline1
)
? t(
"myportal:case-address-not-entered"
)
: showTopThreeArr[index]
.pinswg_siteaddressline1 +
(!_.isEmpty(
showTopThreeArr[index]
.pinswg_siteaddressline2
)
? ", " +
showTopThreeArr[index]
.pinswg_siteaddressline2
: "") +
(!_.isEmpty(
showTopThreeArr[index]
.pinswg_siteaddresstown
)
? ", " +
showTopThreeArr[index]
.pinswg_siteaddresstown
: "")}
</div>
{showTopThreeArr[key].pinswg_appellantagent !=
null && (
@@ -257,7 +263,8 @@ const AwaitingSubmissionFromBlob = (props) => {
.pinswg_appellantagent !=
846040000 && (
<b>
{t("myportal:raised-by-label")}:{" "}
{t("myportal:raised-by-label")}
:{" "}
</b>
)}
{showTopThreeArr[key]
@@ -280,7 +287,8 @@ const AwaitingSubmissionFromBlob = (props) => {
846040000 && (
<div className="cardModuleReference">
<b>
{t("myportal:on-behalf-of-label")}:{" "}
{t("myportal:on-behalf-of-label")}
:{" "}
</b>
{showTopThreeArr[key]
.pinswg_appellantfirstname +
@@ -303,7 +311,7 @@ const AwaitingSubmissionFromBlob = (props) => {
] +
'")].value_cy',
json: transLookup,
eval: true,
eval: true
})
: showTopThreeArr[key][
"pinswg_lpaname"
@@ -361,7 +369,7 @@ const AwaitingSubmissionFromBlob = (props) => {
onClick={() => {
setCurrentView({
"viewName": "Awaiting Submission",
"viewKey": "awaitingSubmissionDetails",
"viewKey": "awaitingSubmissionDetails"
});
}}
>
@@ -387,7 +395,7 @@ const mapDispatchToProps = (dispatch) => {
},
setAwaitingSubmissionDetails: (awaitingSubmissionDetails) => {
dispatch(setAwaitingSubmissionDetails(awaitingSubmissionDetails));
},
}
};
};
@@ -1,6 +1,6 @@
import {
downloadAllProgressFiles,
getAllProgressBlobs,
getAllProgressBlobs
} from "../../../actions/azurestorage";
import _ from "lodash";
import nextConnect from "next-connect";
@@ -40,8 +40,8 @@ ApiProxy.get(async (req, res) => {
export const config = {
api: {
bodyParser: false,
},
bodyParser: false
}
};
export default ApiProxy;
+8 -4
View File
@@ -364,7 +364,7 @@ let Home = (props) => {
const selectedObj = jsonpath({
path: "$..[?(@ && @.attributevalue=='" + apt + "')]",
json: optionsStr,
eval: true,
eval: true
});
const title = selectedObj?.[0]?.value;
@@ -389,6 +389,7 @@ let Home = (props) => {
formTitle={formTitle}
mandatoryFieldsData={props.formData?.mandatoryFieldsData}
propsForChildren={props}
docsOffline={props.docsOffline}
/>
</NewAppealPageShell>
);
@@ -406,7 +407,10 @@ export const getServerSideProps = wrapper.getServerSideProps(
hydrateNewAppealStore(store, ctx.query, result);
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,
appealType: state.appealType,
form: state.form,
accountDetails: state.accountDetails,
accountDetails: state.accountDetails
};
};
@@ -430,7 +434,7 @@ const mapDispatchToProps = (dispatch) => {
},
setCaseReference: (refno) => {
// dispatch(setCaseReferenceAction(refno)); // optional later
},
}
};
};