本文整理汇总了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;未经允许,请勿转载。 |
请发表评论