Skip to content

Commit

Permalink
Merge pull request #5348 from bcgov/test-rook-RQ-FOIMOD-3300
Browse files Browse the repository at this point in the history
Fix observation #6 and #7 in FOIMOD-2976
  • Loading branch information
richard-aot authored Aug 2, 2024
2 parents d7e6187 + 15827ac commit 731b8f6
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,8 @@ const FileUploadForMCFPersonal = ({
},[person, fileType])

React.useEffect(() => {
setAdditionalTagList(searchSections(otherTagList, searchValue, tagValue));
},[searchValue, otherTagList, tagValue])
setAdditionalTagList(searchSections(otherTagList, searchValue, personalTag));
},[searchValue, otherTagList, personalTag])

const handleTrackingIDUpdate = (e) => {
handleTrackingIDChange(e.target.value);
Expand Down Expand Up @@ -707,12 +707,12 @@ const FileUploadForMCFPersonal = ({
value=""
multiple={multipleFiles}
accept={mimeTypes}
disabled={modalFor === "add" && !isPersonSelected}
disabled={modalFor === "add" && (!isPersonSelected || ((isMinistryCoordinator && tagValue == "")))}
/>
</div>
<div className="file-upload-column file-upload-column-3">
{(Object.entries(files).length === 0 && !multipleFiles) || multipleFiles ?
<button className="btn-add-files" type="button" onClick={handleUploadBtnClick} disabled={modalFor === "add" && !isPersonSelected}>
<button className="btn-add-files" type="button" onClick={handleUploadBtnClick} disabled={modalFor === "add" && (!isPersonSelected || ((isMinistryCoordinator && tagValue == "")))}>
Add Files
</button> : null}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,16 @@ const MCFPersonal = ({
}
},[showAllPeople, showAllVolumes])

React.useEffect(() => {
if(allPeople.length > 0 && personalAttributes.person !== "") {
setShowAllPeople( allPeople.filter(p => p.name==personalAttributes.person)[0].sortorder >= 5 );
}

if(allVolumes.length > 0 && personalAttributes.volume !== "") {
setShowAllVolumes( allVolumes.filter(v => v.name==personalAttributes.volume)[0].sortorder >= 5 );
}
},[personalAttributes])

React.useEffect(() => {
setAdditionalFileTypes(searchFileTypes(otherFileTypes, fileTypeSearchValue, personalAttributes?.filetype));
},[fileTypeSearchValue, otherFileTypes, personalAttributes])
Expand Down

0 comments on commit 731b8f6

Please sign in to comment.