reps defects

This commit is contained in:
2024-06-05 06:35:13 +01:00
parent 53e96b18bd
commit ef2e41a377
19 changed files with 262 additions and 201 deletions
+1 -1
View File
@@ -486,7 +486,7 @@ export const deleteBlobCase = async (containerName, blobName) => {
containerClient.deleteBlob(blob.name); containerClient.deleteBlob(blob.name);
} }
containerClient.deleteBlob(blobName); // containerClient.deleteBlob(blobName);
console.log(`deleted blob ${blobName}`); console.log(`deleted blob ${blobName}`);
for await (const blob of containerClient.listBlobsFlat()) { for await (const blob of containerClient.listBlobsFlat()) {
console.log(" ------ :", blob.name); console.log(" ------ :", blob.name);
+5 -4
View File
@@ -300,6 +300,7 @@ let MakeRepresentation = (props) => {
currentView.caseReference.appealType != 846040019 && currentView.caseReference.appealType != 846040019 &&
currentView.caseReference.appealType != 846040011 && currentView.caseReference.appealType != 846040011 &&
currentView.caseReference.appealType != 846040015 && currentView.caseReference.appealType != 846040015 &&
currentView.caseReference.appealType != 846040016 &&
todaysDate >= startDate && todaysDate >= startDate &&
todaysDate <= questionnaireDate && todaysDate <= questionnaireDate &&
buildArr.push("Questionnaire"); buildArr.push("Questionnaire");
@@ -922,10 +923,10 @@ let MakeRepresentation = (props) => {
var dataObj = values; var dataObj = values;
for (let key in dataObj) { // for (let key in dataObj) {
_.includes(key, "representationDocuments") == true && // _.includes(key, "representationDocuments") == true &&
delete dataObj[key]; // delete dataObj[key];
} // }
uploadRepFiles( uploadRepFiles(
dataObj, dataObj,
@@ -145,6 +145,7 @@ const RepAgent = (props) => {
<div className="govuk-form-group govuk-!-margin-bottom-9"> <div className="govuk-form-group govuk-!-margin-bottom-9">
<FileUploadField <FileUploadField
name={"representationDocuments"} name={"representationDocuments"}
id={"representationDocuments"}
label={t( label={t(
"myrepresentations:add-files-label" "myrepresentations:add-files-label"
)} )}
@@ -131,6 +131,7 @@ const RepAppellant = (props) => {
<div className="govuk-form-group govuk-!-margin-bottom-9"> <div className="govuk-form-group govuk-!-margin-bottom-9">
<FileUploadField <FileUploadField
name={"representationDocuments"} name={"representationDocuments"}
id={"representationDocuments"}
label={t( label={t(
"myrepresentations:add-files-label" "myrepresentations:add-files-label"
)} )}
@@ -493,7 +493,7 @@ export const RenderPickList = ({
{errorMsg} {errorMsg}
</span> </span>
)} )}
{value}
<div> <div>
<select <select
// {...input} // {...input}
@@ -1061,7 +1061,9 @@ export const RenderFileUpload = (field) => {
)} )}
{files && Array.isArray(files) && ( {files && Array.isArray(files) && (
<ul> <ul>
{files.map((file, i) => ( {files.map(
(file, i) =>
file.hasOwnProperty("name") && (
<div <div
key={file.name} key={file.name}
className="govuk-!-margin-bottom-5 fileThumb" className="govuk-!-margin-bottom-5 fileThumb"
@@ -1075,7 +1077,8 @@ export const RenderFileUpload = (field) => {
{file.name} ({bytesToSize(file.size)}) {file.name} ({bytesToSize(file.size)})
</span> </span>
</div> </div>
))} )
)}
</ul> </ul>
)} )}
{blobList.map((blob, i) => ( {blobList.map((blob, i) => (
@@ -1100,12 +1103,12 @@ export const RenderFileUpload = (field) => {
&minus; &minus;
</span> </span>
</div> </div>
<img <img
src={getThumbnailIconByExtension(blob.name)} src={getThumbnailIconByExtension(blob.name)}
alt={blob.name} alt={blob.name}
width="50" width="50"
/> />
<Link <Link
key={i} key={i}
scroll={false} scroll={false}
@@ -138,6 +138,7 @@ const RepInterestedPartyPerson = (props) => {
<div className="govuk-form-group govuk-!-margin-bottom-9"> <div className="govuk-form-group govuk-!-margin-bottom-9">
<FileUploadField <FileUploadField
name={"representationDocuments"} name={"representationDocuments"}
id={"representationDocuments"}
label={t( label={t(
"myrepresentations:add-files-label" "myrepresentations:add-files-label"
)} )}
@@ -381,6 +381,7 @@ let RepLPA = (props) => {
<div className="govuk-form-group govuk-!-margin-bottom-9"> <div className="govuk-form-group govuk-!-margin-bottom-9">
<FileUploadField <FileUploadField
name={"representationDocuments"} name={"representationDocuments"}
id={"representationDocuments"}
label={t( label={t(
"myrepresentations:add-files-label" "myrepresentations:add-files-label"
)} )}
@@ -88,6 +88,7 @@ const RepLandOwner = (props) => {
<div className="govuk-form-group govuk-!-margin-bottom-9"> <div className="govuk-form-group govuk-!-margin-bottom-9">
<FileUploadField <FileUploadField
name={"representationDocuments"} name={"representationDocuments"}
id={"representationDocuments"}
label={t( label={t(
"myrepresentations:add-files-label" "myrepresentations:add-files-label"
)} )}
@@ -1114,6 +1114,7 @@ let Enforcement_Questionnaire = (props) => {
<div className="govuk-form-group govuk-!-margin-bottom-9"> <div className="govuk-form-group govuk-!-margin-bottom-9">
<FileUploadField <FileUploadField
name={"representationDocuments"} name={"representationDocuments"}
id={"representationDocuments"}
label={t("myrepresentations:add-files-label")} label={t("myrepresentations:add-files-label")}
ticketnumber={props.props.caseReference} ticketnumber={props.props.caseReference}
hint={"sdsd"} hint={"sdsd"}
@@ -942,6 +942,7 @@ let S78_Questionnaire = (props) => {
<div className="govuk-form-group govuk-!-margin-bottom-9"> <div className="govuk-form-group govuk-!-margin-bottom-9">
<FileUploadField <FileUploadField
name={"representationDocuments"} name={"representationDocuments"}
id={"representationDocuments"}
label={t("myrepresentations:add-files-label")} label={t("myrepresentations:add-files-label")}
ticketnumber={props.props.caseReference} ticketnumber={props.props.caseReference}
hint={"sdsd"} hint={"sdsd"}
+6 -10
View File
@@ -1115,7 +1115,6 @@ const CaseSummary = (props) => {
} }
function showRepButton(appealType) { function showRepButton(appealType) {
console.log(appealType);
switch (appealType) { switch (appealType) {
case 846040012: case 846040012:
case 846040013: case 846040013:
@@ -1141,20 +1140,17 @@ const CaseSummary = (props) => {
: true; : true;
case 846040018: case 846040018:
console.log( let shouldShow =
props.searchResultsObj.searchDetailsObj[0].value[0] props.searchResultsObj.searchDetailsObj[0].value[0]
.pinswg_speacialistcaseprocess,
props.searchResultsObj.searchDetailsObj[0].value[0][
"pinswg_speacialistcaseprocess@OData.Community.Display.V1.FormattedValue"
],
isLPA
);
return props.searchResultsObj.searchDetailsObj[0].value[0]
.pinswg_speacialistcaseprocess == 846040000 && isLPA .pinswg_speacialistcaseprocess == 846040000 && isLPA
? true ? true
: props.searchResultsObj.searchDetailsObj[0].value[0]
.pinswg_speacialistcaseprocess == 846040001
? true
: false; : false;
return shouldShow;
case 846040019: case 846040019:
return showReps( return showReps(
props.searchResultsObj.searchDetailsObj[0].value[0] props.searchResultsObj.searchDetailsObj[0].value[0]
+15 -2
View File
@@ -14,6 +14,7 @@ import MyRepresentations from "./myportal/myrepresentations";
import SearchCases from "./myportal/searchcases"; import SearchCases from "./myportal/searchcases";
import UploadFile from "./myportal/uploadFile"; import UploadFile from "./myportal/uploadFile";
import WatchedCases from "./myportal/watchedcases"; import WatchedCases from "./myportal/watchedcases";
import _ from "lodash";
const MyPortal = (props) => { const MyPortal = (props) => {
const { showFileUpload, showLoginCheck } = props; const { showFileUpload, showLoginCheck } = props;
@@ -122,7 +123,12 @@ const MyPortal = (props) => {
} }
/> />
)} */} )} */}
{!isLPA && {!isLPA &&
_.has(props.awaitingSubmission, [
"awaitingSubmissionFromBlob",
"@odata.count",
]) &&
props.awaitingSubmission props.awaitingSubmission
.awaitingSubmissionFromBlob[ .awaitingSubmissionFromBlob[
"@odata.count" "@odata.count"
@@ -150,11 +156,18 @@ const MyPortal = (props) => {
myReps={false} myReps={false}
/> />
)} )}
{props.myRepresentations.myRepresentations[ {props.myRepresentations.hasOwnProperty(
"myRepresentations"
) &&
typeof props.myRepresentations
.myRepresentations != "undefined" &&
props.myRepresentations.myRepresentations[
"@odata.count" "@odata.count"
] > 0 && ( ] > 0 && (
<MyRepresentations <MyRepresentations
myRepresentations={props.myRepresentations} myRepresentations={
props.myRepresentations
}
isLPA={isLPA} isLPA={isLPA}
/> />
)} )}
@@ -317,7 +317,7 @@ const AwaitingSubmissionFromBlob = (props) => {
<TopThreeRow /> <TopThreeRow />
{props.awaitingSubmissionFromBlob["@odata.count"] > 3 && ( {props.awaitingSubmissionFromBlob["@odata.count"] > 1 && (
<div className="cardVieAll"> <div className="cardVieAll">
<Link <Link
href={ href={
+51 -11
View File
@@ -49,7 +49,6 @@ const ViewAllResults = (props) => {
const { const {
searchString, searchString,
searchResultsObj, searchResultsObj,
currentView,
setCurrentReference, setCurrentReference,
myportal, myportal,
setSearchResults, setSearchResults,
@@ -83,6 +82,14 @@ const ViewAllResults = (props) => {
return dateObj.toLocaleString(); return dateObj.toLocaleString();
}; };
let currentView = props.currentView.currentView;
console.log("currentView.viewKey:", typeof currentView.viewKey);
typeof currentView.viewKey == "undefined"
? console.log("no currentview")
: console.log("has currentview");
var resultsArr = var resultsArr =
currentView.viewKey == "awaitingSubmissionDetails" currentView.viewKey == "awaitingSubmissionDetails"
? props["awaitingSubmission"].awaitingSubmissionDetails.case ? props["awaitingSubmission"].awaitingSubmissionDetails.case
@@ -197,7 +204,7 @@ const ViewAllResults = (props) => {
setSearchDetails( setSearchDetails(
props.watchedCases props.watchedCases
.watchedCasesDetails .watchedCasesDetails
); ),
setCurrentReference({ setCurrentReference({
"ticketnumber": "ticketnumber":
resultsArr[key].ticketnumber, resultsArr[key].ticketnumber,
@@ -206,7 +213,8 @@ const ViewAllResults = (props) => {
"watchedCases" "watchedCases"
? currentView.viewKey == ? currentView.viewKey ==
"myRepresentations" "myRepresentations"
? resultsArr[key].caseRef ? resultsArr[key]
.caseRef
: resultsArr[key] : resultsArr[key]
.ticketnumber .ticketnumber
: resultsArr[key][ : resultsArr[key][
@@ -229,6 +237,10 @@ const ViewAllResults = (props) => {
currentView.viewKey == currentView.viewKey ==
"myRepresentations" && "myRepresentations" &&
resultsArr[key], resultsArr[key],
}),
setCurrentView({
"viewName": currentView.viewName,
"viewKey": currentView.viewKey,
}); });
}} }}
> >
@@ -620,7 +632,7 @@ const ViewAllResults = (props) => {
) && ) &&
deleteCaseItem( deleteCaseItem(
props.accountDetails.containerID, props.accountDetails.containerID,
item.pinswg_name item.ticketnumber
); );
}} }}
> >
@@ -851,6 +863,22 @@ const ViewAllResults = (props) => {
t("myportal:myrepresentations-card-title")} t("myportal:myrepresentations-card-title")}
</h1> </h1>
{resultsRowArr.length == 0 ? (
<h3>
{" "}
There are no{" "}
{currentView.viewKey ==
"awaitingSubmissionDetails" &&
t("myportal:awatitingsubmission-card-title")}
{currentView.viewKey == "watchedCases" &&
t("myportal:watchedcases-card-title")}
{currentView.viewKey == "myCases" &&
t("myportal:mycases-card-title")}
{currentView.viewKey == "myRepresentations" &&
t("myportal:myrepresentations-card-title")}{" "}
records
</h3>
) : (
<dl className="govuk-summary-list govuk-!-margin-bottom-9 results"> <dl className="govuk-summary-list govuk-!-margin-bottom-9 results">
<div className="govuk-summary-list__row results-headings"> <div className="govuk-summary-list__row results-headings">
<dd className="govuk-summary-list__key govuk-!-font-size-16 results_wider govuk-!-padding-left-2"> <dd className="govuk-summary-list__key govuk-!-font-size-16 results_wider govuk-!-padding-left-2">
@@ -882,14 +910,18 @@ const ViewAllResults = (props) => {
</button> </button>
</dd> </dd>
<dd className="govuk-summary-list__key govuk-!-font-size-16"> <dd className="govuk-summary-list__key govuk-!-font-size-16">
{t("search:searchresults-site-address-label")} {t(
"search:searchresults-site-address-label"
)}
</dd> </dd>
{currentView.viewKey == {currentView.viewKey ==
"awaitingSubmissionDetails" ? ( "awaitingSubmissionDetails" ? (
<dd className="govuk-summary-list__key govuk-!-font-size-16"> <dd className="govuk-summary-list__key govuk-!-font-size-16">
<button <button
type="button" type="button"
onClick={() => sortDataBy("createdon")} onClick={() =>
sortDataBy("createdon")
}
className={ className={
orderByState == "createdon" orderByState == "createdon"
? fieldSortState == "asc" ? fieldSortState == "asc"
@@ -905,7 +937,9 @@ const ViewAllResults = (props) => {
</dd> </dd>
) : ( ) : (
<dd className="govuk-summary-list__key govuk-!-font-size-16"> <dd className="govuk-summary-list__key govuk-!-font-size-16">
{t("search:searchresults-applicant-label")} {t(
"search:searchresults-applicant-label"
)}
</dd> </dd>
)} )}
<dd className="govuk-summary-list__key govuk-!-font-size-16"> <dd className="govuk-summary-list__key govuk-!-font-size-16">
@@ -931,7 +965,9 @@ const ViewAllResults = (props) => {
: `govuk-link govuk-link--no-underline govuk-!-font-weight-bold govuk-!-font-size-16` : `govuk-link govuk-link--no-underline govuk-!-font-weight-bold govuk-!-font-size-16`
} }
> >
{t("search:searchresults-authority-label")}{" "} {t(
"search:searchresults-authority-label"
)}{" "}
</button> </button>
</dd> </dd>
<dd className="govuk-summary-list__key govuk-!-font-size-16"> <dd className="govuk-summary-list__key govuk-!-font-size-16">
@@ -961,11 +997,14 @@ const ViewAllResults = (props) => {
)}{" "} )}{" "}
</button> </button>
) : ( ) : (
t("search:searchresults-case-type-label") t(
"search:searchresults-case-type-label"
)
)}{" "} )}{" "}
</dd> </dd>
<dd className="govuk-summary-list__key govuk-!-font-size-16"> <dd className="govuk-summary-list__key govuk-!-font-size-16">
{currentView.viewKey == "myRepresentations" ? ( {currentView.viewKey ==
"myRepresentations" ? (
<button <button
type="button" type="button"
onClick={() => onClick={() =>
@@ -1005,6 +1044,7 @@ const ViewAllResults = (props) => {
resultsRowArr resultsRowArr
)} )}
</dl> </dl>
)}
</div> </div>
</div> </div>
<div className="govuk-grid-row"> <div className="govuk-grid-row">
@@ -1025,7 +1065,7 @@ const ViewAllResults = (props) => {
const mapStateToProps = (state) => { const mapStateToProps = (state) => {
return { return {
//currentView: state.currentView, currentView: state.currentView,
accountDetails: state.accountDetails, accountDetails: state.accountDetails,
// search: state.search, // search: state.search,
// searchResultsObj: state.searchResultsObj, // searchResultsObj: state.searchResultsObj,
+2 -2
View File
@@ -2429,8 +2429,8 @@
"value_cy": "Unrhyw ddeunydd arall y byddwch yn ei ystyried yn berthnasol" "value_cy": "Unrhyw ddeunydd arall y byddwch yn ei ystyried yn berthnasol"
}, },
{ {
"value": "Cost of application", "value": "Cost application",
"value_cy": "Cost y cais" "value_cy": "Cais cost"
}, },
{ {
"value": "The S106 agreement or unilateral undertaking", "value": "The S106 agreement or unilateral undertaking",
+1 -1
View File
@@ -428,7 +428,7 @@
</row> </row>
<row> <row>
<labels> <labels>
<label description="Cost of application" ishareDocumentCode="000013" /> <label description="Cost application" ishareDocumentCode="000013" />
</labels> </labels>
<control id="pinswg_fileUpload14" classid="{16D63FD6-119B-4353-BDCA-18358721C3FE}" datafieldname="pinswg_fileUpload14" disabled="false" /> <control id="pinswg_fileUpload14" classid="{16D63FD6-119B-4353-BDCA-18358721C3FE}" datafieldname="pinswg_fileUpload14" disabled="false" />
</row> </row>
+2 -2
View File
@@ -26,7 +26,7 @@
"case-type-option-12": "Apeliadau cynllunio adeiladau rhestredig ac ardal gadwraeth", "case-type-option-12": "Apeliadau cynllunio adeiladau rhestredig ac ardal gadwraeth",
"advanced-search-title-label": "Chwiliad manwl", "advanced-search-title-label": "Chwiliad manwl",
"address-search-title-label": "Chwilio am achosion yn ôl cyfeiriad", "address-search-title-label": "Chwilio am achosion yn ôl cyfeiriad",
"applicant-label": "Apelydd/Ymgeisydd", "applicant-label": "Apelydd neu Ymgeisydd",
"other-party-label": "Parti Arall", "other-party-label": "Parti Arall",
"hearing-date-label": "Dyddiad y Gwrandawaid/Ymchwiliad", "hearing-date-label": "Dyddiad y Gwrandawaid/Ymchwiliad",
"site-visit-date-label": "Dyddiad yr Ymweliad ar Safle", "site-visit-date-label": "Dyddiad yr Ymweliad ar Safle",
@@ -55,7 +55,7 @@
"searchresults-case-reference-label": "Cyfeirnod yr Achos", "searchresults-case-reference-label": "Cyfeirnod yr Achos",
"searchresults-case-count-label": "Fe wnaethoch chi chwilio am", "searchresults-case-count-label": "Fe wnaethoch chi chwilio am",
"searchresults-site-address-label": "Cyfeiriad y Safle", "searchresults-site-address-label": "Cyfeiriad y Safle",
"searchresults-applicant-label": "Apelydd/Ymgeisydd", "searchresults-applicant-label": "Apelydd neu Ymgeisydd",
"searchresults-authority-label": "ACLl", "searchresults-authority-label": "ACLl",
"searchresults-case-type-label": "Math o Achos", "searchresults-case-type-label": "Math o Achos",
"searchresults-status-label": "Statws", "searchresults-status-label": "Statws",
+2 -2
View File
@@ -26,7 +26,7 @@
"case-type-option-12": "Planning Listed Building and Conservation Area Appeals", "case-type-option-12": "Planning Listed Building and Conservation Area Appeals",
"advanced-search-title-label": "Advanced search", "advanced-search-title-label": "Advanced search",
"address-search-title-label": "Search for cases by address", "address-search-title-label": "Search for cases by address",
"applicant-label": "Appellant/Applicant", "applicant-label": "Appellant or Applicant",
"other-party-label": "Other Party", "other-party-label": "Other Party",
"hearing-date-label": "Hearing/Enquiry date", "hearing-date-label": "Hearing/Enquiry date",
"site-visit-date-label": "Site visit date", "site-visit-date-label": "Site visit date",
@@ -55,7 +55,7 @@
"searchresults-case-reference-label": "Case reference", "searchresults-case-reference-label": "Case reference",
"searchresults-case-count-label": "You searched for", "searchresults-case-count-label": "You searched for",
"searchresults-site-address-label": "Site address", "searchresults-site-address-label": "Site address",
"searchresults-applicant-label": "Appellant/Applicant", "searchresults-applicant-label": "Appellant or Applicant",
"searchresults-authority-label": "Authority", "searchresults-authority-label": "Authority",
"searchresults-case-type-label": "Case type", "searchresults-case-type-label": "Case type",
"searchresults-status-label": "Status", "searchresults-status-label": "Status",
+1
View File
@@ -53,6 +53,7 @@ const Home = (props) => {
watchedCases={props.watchedCases} watchedCases={props.watchedCases}
myRepresentations={props.myRepresentations} myRepresentations={props.myRepresentations}
awaitingSubmission={props.awaitingSubmission} awaitingSubmission={props.awaitingSubmission}
accountDetails={props.accountDetails}
myportal={true} myportal={true}
/> />
</div> </div>