- {divisions.filter(division => {
- if (division.divisionname.toLowerCase() === 'communications') {
+ ) : bcgovcode == "MSD" ? (
+
r.isselected)[0]?.attributes
+ .divisions[0].divisionid
+ }
+ divisionModalTagValue={divisionModalTagValue}
+ divisions={tagList}
+ />
+ ) : (
+
+ {divisions
+ .filter((division) => {
+ if (
+ division.divisionname.toLowerCase() ===
+ "communications"
+ ) {
return false;
- } else if (filterValue > -1 && filterValue !== division.divisionid) {
+ } else if (
+ filterValue > -1 &&
+ filterValue !== division.divisionid
+ ) {
return true;
- } else if (records.filter(r => r.isselected)[0]?.attributes.divisions[0].divisionid !== division.divisionid) {
+ } else if (
+ records.filter((r) => r.isselected)[0]
+ ?.attributes.divisions[0].divisionid !==
+ division.divisionid
+ ) {
return true;
} else {
return false;
}
- }).map(division =>
+ })
+ .map((division) => (
{setDivisionModalTagValue(division.divisionid)}}
- clicked={divisionModalTagValue === division.divisionid}
+ onClick={(e) => {
+ setDivisionModalTagValue(
+ division.divisionid
+ );
+ }}
+ clicked={
+ divisionModalTagValue ===
+ division.divisionid
+ }
/>
- )}
-
- :
-
- {divisions.filter(division => {
- if (division.divisionname.toLowerCase() === 'communications') {
- return false;
- } else if (filterValue > -1 && filterValue !== division.divisionid) {
- return true;
- } else if (records.filter(r => r.isselected)[0]?.attributes.divisions[0].divisionid !== division.divisionid) {
- return true;
- } else {
- return false;
- }
- }).map(division =>
- {setDivisionModalTagValue(division.divisionid)}}
- clicked={divisionModalTagValue === division.divisionid}
- />
- )}
-
}
- >}
+ ))}
+
+ )
+ ) : (
+
+ {divisions
+ .filter((division) => {
+ if (
+ division.divisionname.toLowerCase() ===
+ "communications"
+ ) {
+ return false;
+ } else if (
+ filterValue > -1 &&
+ filterValue !== division.divisionid
+ ) {
+ return true;
+ } else if (
+ records.filter((r) => r.isselected)[0]
+ ?.attributes.divisions[0].divisionid !==
+ division.divisionid
+ ) {
+ return true;
+ } else {
+ return false;
+ }
+ })
+ .map((division) => (
+ {
+ setDivisionModalTagValue(division.divisionid);
+ }}
+ clicked={
+ divisionModalTagValue === division.divisionid
+ }
+ />
+ ))}
+
+ )}
+ >
+ )}