File tree Expand file tree Collapse file tree 1 file changed +25
-1
lines changed Expand file tree Collapse file tree 1 file changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -332,6 +332,7 @@ function DashboardContent() {
332
332
333
333
334
334
if ( ! dataConfig . showPortalOrgs ) {
335
+ // load the URLS, but still need the orgs
335
336
fetch ( configData . SERVER_URL + "main/urls" )
336
337
. then (
337
338
response => {
@@ -345,8 +346,31 @@ function DashboardContent() {
345
346
setShowDialog ( false ) ;
346
347
}
347
348
)
348
- } else {
349
349
350
+ // even if the portal screen doesn't have orgs, still need to load them
351
+ fetch ( configData . SERVER_URL + "main/orgs" )
352
+ . then ( response => {
353
+ return response . json ( )
354
+ } )
355
+ . then ( dataOrgs => {
356
+ if ( config . enableApprovals ) {
357
+ function loadLeaf ( root , llocalOrgsById ) {
358
+ llocalOrgsById [ root . id ] = root ;
359
+ for ( var i = 0 ; i < root . subOrgs . length ; i ++ ) {
360
+ loadLeaf ( root . subOrgs [ i ] , llocalOrgsById ) ;
361
+ }
362
+ }
363
+
364
+
365
+ var localOrgsById = { } ;
366
+
367
+ loadLeaf ( dataOrgs , localOrgsById ) ;
368
+
369
+ setOrgsById ( localOrgsById ) ;
370
+ setOrgs ( dataOrgs ) ;
371
+ } } ) ;
372
+ } else {
373
+ // load the orgs and links per org
350
374
351
375
fetch ( configData . SERVER_URL + "main/orgs" )
352
376
. then ( response => {
You can’t perform that action at this time.
0 commit comments