[Evergreen-dev] System OU in Splash page

Floyd, Angelia Lynn LFloyd1 at library.IN.gov
Wed Sep 23 18:01:02 EDT 2020


I am trying to update the splash page for eg2 (splash.component.html) with URL's that have include a sysOu() variable.
In the splash.component.html  I have the following.
            <div class="list-group-item border-0 p-2">
              <a href="/recon/{{sysOu()}}/index.html" target="_top" i18n>
<img src="/images_local/splash/recon.png" alt="" role="presentation"/>
Payment Reconciliation Reports
              </a>
            </div>

I have included both,
import {AuthService} from '@eg/core/auth.service';
import {OrgService} from '@eg/core/org.service';
and the constructor for them in the splash.component.ts.
with the following

        // This assumes the System OU is the parent org unit of the
    // workstation org unit.
    sysOu(): string {
        if (!this.auth.user()) { return ''; }
        const wsOu = this.org.get(this.auth.user().ws_ou());
        const sysOu = this.org.get(wsOu.parent_ou());
        return sysOu.shortname();
    }


When I run the ng build everything builds nicely.
Just when I try to access the page it is giving me

StaffSplashComponent.html:124 ERROR TypeError: _co.SysOu is not a function
    at Object.eval [as updateRenderer] (StaffSplashComponent.html:172)
    at Object.debugUpdateRenderer [as updateRenderer] (core.js:23937)
    at checkAndUpdateView (core.js:23312)
    at callViewAction (core.js:23548)
    at execComponentViewsAction (core.js:23490)
    at checkAndUpdateView (core.js:23313)
    at callViewAction (core.js:23548)
    at execEmbeddedViewsAction (core.js:23511)
    at checkAndUpdateView (core.js:23308)
    at callViewAction (core.js:23548)

What am I missing?
-----------------------------
Lynn Floyd
MIS Supervisor

Indiana State Library
https://www.in.gov/library/
315 W Ohio St
Indianapolis, IN 46202
317-232-3290
lfloyd1 at library.in.gov<mailto:lfloyd1 at library.in.gov>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.evergreen-ils.org/pipermail/evergreen-dev/attachments/20200923/54420b1f/attachment.html>


More information about the Evergreen-dev mailing list