22151 multiple files issue

This commit is contained in:
2026-03-27 11:25:41 +00:00
parent 1b145dd90f
commit 2c4d645d56
4 changed files with 37 additions and 37 deletions
+3 -3
View File
@@ -1298,7 +1298,7 @@ export const getProgressBlobs = async (containerName, caseReference) => {
const appealBlobName = blobPathParts[1];
const contentLength = blob.properties.contentLength;
consoleLogger("getProgressBlobs in here", blobPathParts);
//consoleLogger("getProgressBlobs in here", blobPathParts);
blobObj.push({
"name": appealBlobName,
"path": blob.name,
@@ -1480,7 +1480,7 @@ export const getRepsFilesBlobs = async (
const repFileName = blobPathParts[3];
const contentLength = blob.properties.contentLength;
consoleLogger(blob.name);
//consoleLogger(blob.name);
blobObj.push({
"name": repFileName,
@@ -1509,7 +1509,7 @@ export const getRepsFilesBlobs = async (
})
});
}
consoleLogger("blobObj:", blobObj);
//consoleLogger("blobObj:", blobObj);
return blobObj;
};
+3 -9
View File
@@ -124,9 +124,7 @@ export const uploadFiles = async (
var queryUrl = "/api/file/upload";
try {
return await postSignedFileJson(queryUrl, formData, {
headers: { "content-type": "multipart/form-data" }
});
return await postSignedFileJson(queryUrl, formData);
} catch (error) {
consoleLogger(error);
}
@@ -146,9 +144,7 @@ export const uploadSingleFile = async (filesObj, containerID, casefolderID) => {
var queryUrl = "/api/file/uploadsinglefile";
try {
return await postSignedFileJson(queryUrl, formData, {
headers: { "content-type": "multipart/form-data" }
});
return await postSignedFileJson(queryUrl, formData);
} catch (error) {
consoleLogger(error);
}
@@ -169,9 +165,7 @@ export const uploadRepFiles = async (
var queryUrl = "/api/file/upload";
try {
return await postSignedFileJson(queryUrl, formData, {
headers: { "content-type": "multipart/form-data" }
});
return await postSignedFileJson(queryUrl, formData);
} catch (error) {
consoleLogger(error);
}
@@ -10,14 +10,14 @@ import {
RenderCondtionalRadioList,
RenderPickList,
RenderRichMultiline,
shouldDisableButton,
shouldDisableButton
} from "./representationElements";
import { useDropzone } from "react-dropzone";
import {
setRepresentationCapacity,
setRepresentationSubmit,
setFilesForRepresentations,
setFilesForRepresentations
} from "../../../store/currentView/action";
const RepInterestedPartyPerson = (props) => {
@@ -34,7 +34,7 @@ const RepInterestedPartyPerson = (props) => {
updateRepresentation,
setSavingStatus,
savingStatus,
setFilesForRepresentations,
setFilesForRepresentations
} = props;
const required = (value) => (value ? undefined : "Required");
@@ -104,7 +104,8 @@ const RepInterestedPartyPerson = (props) => {
.representationType == "Questionnaire"
? "Holiadur"
: formObj.representationForm.values
.representationType == "Statement"
.representationType ==
"Statement"
? "Datganiad"
: formObj.representationForm.values
.representationType ==
@@ -132,7 +133,7 @@ const RepInterestedPartyPerson = (props) => {
t(
"myrepresentations:questionnaire-yes"
),
t("myrepresentations:questionnaire-no"),
t("myrepresentations:questionnaire-no")
]}
id="representationOnBehalfOf"
className="govuk-radios__input"
@@ -242,7 +243,7 @@ const RepInterestedPartyPerson = (props) => {
data-module="govuk-button"
disabled={shouldDisableButton({
props,
formObj,
formObj
})}
>
{t("common:continue-button")}
@@ -303,7 +304,7 @@ const RepInterestedPartyPerson = (props) => {
);
}}
>
{t("common:save-exit-button")}
{t("common:save-exit-button")}sssss
</button>
)}
</div>
@@ -321,7 +322,7 @@ const mapDispatchToProps = (dispatch) => ({
dispatch(change(form, field, newValue)),
setFilesForRepresentations: (fileList) => {
dispatch(setFilesForRepresentations(fileList));
},
}
});
export default connect(
@@ -331,6 +332,6 @@ export default connect(
reduxForm({
form: "representationForm",
enableReinitialize: true,
destroyOnUnmount: false,
destroyOnUnmount: false
})(RepInterestedPartyPerson)
);
+14 -9
View File
@@ -13,7 +13,7 @@ import {
ReadOnlyfield,
RichMultiLinefield,
Textfield,
YesNofield,
YesNofield
} from "../elements";
export default function BuildField(props) {
@@ -42,19 +42,24 @@ export default function BuildField(props) {
setDocumentsList,
documentList,
maxSubField,
datafieldcontent,
datafieldcontent
} = props;
// Extract deeply nested props for convenience (avoid props.props.props all over)
// Defensive checks in case nested props don't exist
const appealType = props?.props?.props?.appealType || {};
const form = props?.props?.props?.form || {};
const formProps = props?.props?.props?.props?.form || {};
const setFilesForAppeal = props?.props?.props?.setFilesForAppeal;
const accountDetails = props?.props?.props?.props?.accountDetails || {};
const sectionProps = props?.props?.props || {};
const pageProps = sectionProps?.props || {};
const appealType = sectionProps.appealType || {};
const form = sectionProps.form || {};
const formProps = pageProps.form || sectionProps.form || {};
const setFilesForAppeal = sectionProps.setFilesForAppeal;
const accountDetails =
sectionProps.accountDetails || pageProps.accountDetails || {};
const ticketnumber = appealType.caseReference?.ticketnumber || "";
const fileList = appealType.fileList || {};
const containerID = accountDetails.containerID || "";
const containerID =
accountDetails.containerID || sectionProps.containerID || "";
// Mapping fieldType to components
const fieldTypeMap = {
@@ -230,7 +235,7 @@ export default function BuildField(props) {
parentFieldShowOnValue={parentFieldShowOnValue}
validation={validation}
/>
),
)
};
return (