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
@@ -30,12 +30,20 @@ const RepAppellant = (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;
});
return (
<>
<div className="govuk-grid-row">
@@ -154,27 +162,25 @@ const RepAppellant = (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>
) : (
""
@@ -230,8 +236,8 @@ const RepAppellant = (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);