當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript org.service.OrgService類代碼示例

本文整理匯總了TypeScript中@eg/core/org.service.OrgService的典型用法代碼示例。如果您正苦於以下問題:TypeScript service.OrgService類的具體用法?TypeScript service.OrgService怎麽用?TypeScript service.OrgService使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了service.OrgService類的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: resolve

    /**
     * Loads pre-auth data common to all applications.
     * No auth token is available at this level.  When needed, auth is
     * enforced by application/group-specific resolvers at lower levels.
     */
    resolve(
        route: ActivatedRouteSnapshot,
        state: RouterStateSnapshot): Promise<void> {

        OpenSRF.locale = this.locale.currentLocaleCode();

        this.idl.parseIdl();

        return this.org.fetchOrgs(); // anonymous PCRUD.
    }
開發者ID:StephenGWills,項目名稱:Evergreen,代碼行數:15,代碼來源:resolver.service.ts

示例2: getItemImportDefs

    getItemImportDefs(): Promise<IdlObject[]> {
        if (this.importItemAttrDefs) {
            return Promise.resolve(this.importItemAttrDefs);
        }

        const owners = this.org.ancestors(this.auth.user().ws_ou(), true);
        return this.pcrud.search('viiad', {owner: owners}, {}, {atomic: true})
        .toPromise().then(defs => {
            this.importItemAttrDefs = defs;
            return defs;
        });
    }
開發者ID:StephenGWills,項目名稱:Evergreen,代碼行數:12,代碼來源:vandelay.service.ts

示例3: getBillingTypes

 // Fetch-cache billing types
 async getBillingTypes(): Promise<any> {
     if (this.billingTypes.length > 1) {
         return Promise.resolve();
     }
     return this.pcrud.search('cbt',
         {owner: this.org.fullPath(this.auth.user().ws_ou(), true)},
         {}, {atomic: true}
     ).toPromise().then(bts => {
         this.billingTypes = bts
             .sort((a, b) => a.name() < b.name() ? -1 : 1)
             .map(bt => ({id: bt.id(), label: bt.name()}));
     });
 }
開發者ID:StephenGWills,項目名稱:Evergreen,代碼行數:14,代碼來源:mark-damaged-dialog.component.ts

示例4: getMergeProfiles

    getMergeProfiles(): Promise<IdlObject[]> {
        if (this.mergeProfiles) {
            return Promise.resolve(this.mergeProfiles);
        }

        const owners = this.org.ancestors(this.auth.user().ws_ou(), true);
        return this.pcrud.search('vmp',
            {owner: owners}, {order_by: {vmp: ['name']}}, {atomic: true})
        .toPromise().then(profiles => {
            this.mergeProfiles = profiles;
            return profiles;
        });
    }
開發者ID:StephenGWills,項目名稱:Evergreen,代碼行數:13,代碼來源:vandelay.service.ts

示例5: loadStartupData

    /**
     * Fetches data common to all staff interfaces.
     */
    loadStartupData(): Promise<void> {

        // Fetch settings needed globally.  This will cache the values
        // in the org service.
        return this.org.settings([
            'lib.timezone',
            'webstaff.format.dates',
            'webstaff.format.date_and_time',
            'ui.staff.max_recent_patrons'
        ]).then(settings => {
            this.format.wsOrgTimezone = settings['lib.timezone'];
            this.format.dateFormat = settings['webstaff.format.dates'];
            this.format.dateTimeFormat = settings['webstaff.format.date_and_time'];
        });
    }
開發者ID:jamesrf,項目名稱:Evergreen,代碼行數:18,代碼來源:resolver.service.ts

示例6: getBibTrashGroups

    getBibTrashGroups(): Promise<any> {
        if (this.bibTrashGroups) {
            return Promise.resolve(this.bibTrashGroups);
        }

        const owners = this.org.ancestors(this.auth.user().ws_ou(), true);

        return this.pcrud.search('vibtg',
            {always_apply : 'f', owner: owners},
            {vibtg : ['label']},
            {atomic: true}
        ).toPromise().then(groups => {
            this.bibTrashGroups = groups;
            return groups;
        });
    }
開發者ID:StephenGWills,項目名稱:Evergreen,代碼行數:16,代碼來源:vandelay.service.ts

示例7: ngOnInit

    ngOnInit() {
        this.org.settings('sms.enable').then(sets => {
            this.smsEnabled = sets['sms.enable'];
            if (!this.smsEnabled) { return; }

            this.pcrud.search('csc', {active: 't'}, {order_by: {csc: 'name'}})
            .subscribe(carrier => {
                this.smsCarriers.push({
                    id: carrier.id(),
                    label: carrier.name()
                });
            });
        });

        this.fetchHold();
    }
開發者ID:StephenGWills,項目名稱:Evergreen,代碼行數:16,代碼來源:manage.component.ts

示例8: applyUrlParams

    applyUrlParams(context: CatalogSearchContext, params: ParamMap): void {

        // Reset query/filter args.  The will be reconstructed below.
        context.reset();

        // These fields can be copied directly into place
        ['format', 'sort', 'available', 'global', 'identQuery', 'identQueryType']
        .forEach(field => {
            const val = params.get(field);
            if (val !== null) {
                context[field] = val;
            }
        });

        if (params.get('limit')) {
            context.pager.limit = +params.get('limit');
        }

        if (params.get('offset')) {
            context.pager.offset = +params.get('offset');
        }

        ['query', 'fieldClass', 'joinOp', 'matchOp'].forEach(field => {
            const arr = params.getAll(field);
            if (arr && arr.length) {
                context[field] = arr;
            }
        });

        CATALOG_CCVM_FILTERS.forEach(code => {
            const val = params.get(code);
            if (val) {
                context.ccvmFilters[code] = val.split(/,/);
            } else {
                context.ccvmFilters[code] = [''];
            }
        });

        params.getAll('facets').forEach(blob => {
            const facet = JSON.parse(blob);
            context.addFacet(new FacetFilter(facet.c, facet.n, facet.v));
        });

        if (params.get('org')) {
            context.searchOrg = this.org.get(+params.get('org'));
        }
    }
開發者ID:jamesrf,項目名稱:Evergreen,代碼行數:47,代碼來源:catalog-url.service.ts

示例9: getMatchSets

    // todo: differentiate between biblio and authority a la queue api
    getMatchSets(mtype: string): Promise<IdlObject[]> {

        const mstype = mtype.match(/bib/) ? 'biblio' : 'authority';

        if (this.matchSets[mtype]) {
            return Promise.resolve(this.matchSets[mtype]);
        } else {
            this.matchSets[mtype] = [];
        }

        const owners = this.org.ancestors(this.auth.user().ws_ou(), true);

        return this.pcrud.search('vms',
            {owner: owners, mtype: mstype}, {}, {atomic: true})
        .toPromise().then(sets => {
            this.matchSets[mtype] = sets;
            return sets;
        });
    }
開發者ID:StephenGWills,項目名稱:Evergreen,代碼行數:20,代碼來源:vandelay.service.ts

示例10: ngOnInit

    ngOnInit() {

        this.locale.supportedLocales().subscribe(
            l => this.locales.push(l),
            err => {},
            () => {
                this.currentLocale = this.locales.filter(
                    l => l.code() === this.locale.currentLocaleCode())[0];
            }
        );

        // NOTE: this can eventually go away.
        // Avoid attempts to fetch org settings if the user has not yet
        // logged in (e.g. this is the login page).
        if (this.user()) {
            this.org.settings('ui.staff.angular_catalog.enabled')
            .then(settings => this.showAngularCatalog =
                Boolean(settings['ui.staff.angular_catalog.enabled']));
        }
    }
開發者ID:StephenGWills,項目名稱:Evergreen,代碼行數:20,代碼來源:nav.component.ts


注:本文中的@eg/core/org.service.OrgService類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。