added caseinvolvement api for rep

This commit is contained in:
2024-10-16 12:41:37 +01:00
parent fc4f5928ef
commit a1524c5018
14 changed files with 214 additions and 115 deletions
@@ -26,12 +26,20 @@ const RepAgent = (props) => {
setRepresentationSubmit,
currentView,
setRepFileName,
updateRepresentation,
} = props;
const { acceptedFiles, getRootProps, getInputProps } = useDropzone();
const [savingStatus, setSavingStatus] = useState(false);
setRepFileName(formObj.representationForm.values);
let filterFilesList =
props.currentView.caseReference.repDetails.filesList.filter(function (
el
) {
return el != null;
});
const files = acceptedFiles.map((file) => (
<li key={file.path}>
{file.path} - {file.size} bytes
@@ -175,28 +183,25 @@ const RepAgent = (props) => {
props.currentView.caseReference.repDetails
.filesList.length > 0 ? (
<div className="govuk-form-group govuk-!-margin-bottom-9">
{props.currentView.caseReference.repDetails.filesList.map(
(blob, i) => (
<div
key={blob.name + "_" + i}
className="govuk-!-margin-bottom-5 fileThumb "
>
<img
src={getThumbnailIconByExtension(
blob.name
)}
alt={blob.name}
width="50"
/>
{filterFilesList.map((blob, i) => (
<div
key={blob.name + "_" + i}
className="govuk-!-margin-bottom-5 fileThumb "
>
<img
src={getThumbnailIconByExtension(
blob.name
)}
alt={blob.name}
width="50"
/>
<span className="govuk-body govuk-!-font-size-14 govuk-!-padding-left-5">
{blob.name} (
{bytesToSize(blob.size)}
)
</span>
</div>
)
)}
<span className="govuk-body govuk-!-font-size-14 govuk-!-padding-left-5">
{blob.name} (
{bytesToSize(blob.size)})
</span>
</div>
))}
</div>
) : (
""
@@ -252,8 +257,8 @@ const RepAgent = (props) => {
className="govuk-button progress-save "
onClick={() => {
let valuesObj =
props.props.form[props.form].values ||
{};
props.props.props.form[props.form]
.values || {};
console.log("valuesobj:", valuesObj);