Skip to content

Commit

Permalink
Merge pull request #1206 from bcgov/dev-AH-FOIMOD-3246
Browse files Browse the repository at this point in the history
Ticket 2646/3246 - Release 11.0 / Consults Observation Fixes 4
  • Loading branch information
Aman-Hundal authored Nov 5, 2024
2 parents e7c44f1 + 70cc57d commit 9dfd13e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -244,10 +244,10 @@ const useSaveRedlineForSignoff = (initDocInstance, initDocViewer) => {
let incompatableList = [];

// Custom public bodies/consults do not exist in allPublicBodies data (BE program area data) and are stored as simple strings with pageflag data (in other array attribute).
// Therefore, if publicBodyInfo cannot be found in allPublicBodies, the publicbody is a custom one and we will create its 'divison' data in the FE with a random unique id (date.now()), and its publicBodyID (which is its name as a string) for consult package creation purposes
// Therefore, if publicBodyInfo cannot be found in allPublicBodies, the publicbody is a custom one and we will create its 'divison' data in the FE with a random unique id (Math.floor(Math.random() * 100000)), and its publicBodyID (which is its name as a string) for consult package creation purposes
const publicBodyInfo = allPublicBodies.find((body) => body.programareaid === publicBodyId);
newDocList.push({
divisionid: publicBodyInfo ? publicBodyInfo.programareaid : Date.now(),
divisionid: publicBodyInfo ? publicBodyInfo.programareaid : Math.floor(Math.random() * 100000),
divisionname: publicBodyInfo ? publicBodyInfo.name : publicBodyId,
documentlist: publicBodyDocList,
incompatableList: incompatableList,
Expand Down

0 comments on commit 9dfd13e

Please sign in to comment.