本文整理汇总了TypeScript中@eg/core/idl.service.IdlService类的典型用法代码示例。如果您正苦于以下问题:TypeScript service.IdlService类的具体用法?TypeScript service.IdlService怎么用?TypeScript service.IdlService使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了service.IdlService类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。
示例1: addToNew
// Create a new bucket then add the record
addToNew() {
const bucket = this.idl.create('cbreb');
bucket.owner(this.auth.user().id());
bucket.name(this.newBucketName);
bucket.description(this.newBucketDesc);
bucket.btype(this.bucketType);
this.net.request(
'open-ils.actor',
'open-ils.actor.container.create',
this.auth.token(), 'biblio', bucket
).subscribe(bktId => {
const evt = this.evt.parse(bktId);
if (evt) {
this.toast.danger(evt.desc);
} else {
// make it find-able to the queue-add method which
// requires the bucket name.
bucket.id(bktId);
this.buckets.push(bucket);
this.addToBucket(bktId);
}
});
}
开发者ID:StephenGWills,项目名称:Evergreen,代码行数:26,代码来源:record-bucket-dialog.component.ts
示例2: 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
示例3:
this.createNew = () => {
const part = this.idl.create('bmp');
part.record(this.recId);
this.editDialog.record = part;
this.editDialog.mode = 'create';
this.editDialog.open().then(
ok => this.partsGrid.reload(),
err => {}
);
};
开发者ID:StephenGWills,项目名称:Evergreen,代码行数:12,代码来源:parts.component.ts
示例4: fetchHold
fetchHold() {
this.hold = null;
if (this.holdIds.length === 0) {
return;
} else if (this.isBatch()) {
// Use a dummy hold to store form values.
this.hold = this.idl.create('ahr');
} else {
// Form values are stored in the one hold we're editing.
this.pcrud.retrieve('ahr', this.holdIds[0])
.subscribe(hold => this.hold = hold);
}
}
开发者ID:StephenGWills,项目名称:Evergreen,代码行数:16,代码来源:manage.component.ts
示例5: addToBucket
// Add the record to the selected existing bucket
addToBucket(id: number) {
const item = this.idl.create('cbrebi');
item.bucket(id);
item.target_biblio_record_entry(this.recId);
this.net.request(
'open-ils.actor',
'open-ils.actor.container.item.create',
this.auth.token(), 'biblio', item
).subscribe(resp => {
const evt = this.evt.parse(resp);
if (evt) {
this.toast.danger(evt.toString());
} else {
this.close();
}
});
}
开发者ID:jamesrf,项目名称:Evergreen,代码行数:18,代码来源:record-bucket-dialog.component.ts
示例6: addRootNode
// When creating a new tree, add a stub boolean node
// as the root so the tree has something to render.
addRootNode() {
const point = this.idl.create('vmsp');
point.id(this.newId--);
point.isnew(true);
point.match_set(this.matchSet_.id());
point.children([]);
point.bool_op('AND');
const node: TreeNode = new TreeNode({
id: point.id(),
callerData: {point: point}
});
this.tree = new Tree(node);
this.setNodeLabel(node, point);
}
开发者ID:evergreen-library-system,项目名称:Evergreen,代码行数:19,代码来源:match-set-expression.component.ts
示例7: GridColumn
.forEach(field => {
const col = new GridColumn();
col.name = field.name;
col.label = field.label || field.name;
col.idlFieldDef = field;
col.idlClass = this.columnSet.idlClass;
col.datatype = field.datatype;
col.isIndex = (field.name === pkeyField);
col.isAuto = true;
if (this.showLinkSelectors) {
const selector = this.idl.getLinkSelector(
this.columnSet.idlClass, field.name);
if (selector) {
col.path = field.name + '.' + selector;
}
}
this.columnSet.add(col);
});
开发者ID:StephenGWills,项目名称:Evergreen,代码行数:20,代码来源:grid.ts
示例8: addToNew
// Create a new bucket then add the record
addToNew() {
const bucket = this.idl.create('cbreb');
bucket.owner(this.auth.user().id());
bucket.name(this.newBucketName);
bucket.description(this.newBucketDesc);
bucket.btype('staff_client');
this.net.request(
'open-ils.actor',
'open-ils.actor.container.create',
this.auth.token(), 'biblio', bucket
).subscribe(bktId => {
const evt = this.evt.parse(bktId);
if (evt) {
this.toast.danger(evt.desc);
} else {
this.addToBucket(bktId);
}
});
}
开发者ID:jamesrf,项目名称:Evergreen,代码行数:22,代码来源:record-bucket-dialog.component.ts
示例9: addChildNode
addChildNode() {
this.changesMade = true;
const pnode = this.tree.selectedNode();
const point = this.idl.create('vmsp');
point.id(this.newId--);
point.isnew(true);
point.parent(pnode.id);
point.match_set(this.matchSet_.id());
point.children([]);
const ptype = this.newPoint.values.pointType;
if (ptype === 'bool') {
point.bool_op(this.newPoint.values.boolOp);
} else {
if (ptype === 'attr') {
point.svf(this.newPoint.values.recordAttr);
} else if (ptype === 'marc') {
point.tag(this.newPoint.values.marcTag);
point.subfield(this.newPoint.values.marcSf);
} else if (ptype === 'heading') {
point.heading(true);
}
point.negate(this.newPoint.values.negate);
point.quality(this.newPoint.values.matchScore);
}
const node: TreeNode = new TreeNode({
id: point.id(),
callerData: {point: point}
});
// Match points are added to the DB only when the tree is saved.
this.setNodeLabel(node, point).then(() => pnode.children.push(node));
}
开发者ID:evergreen-library-system,项目名称:Evergreen,代码行数:40,代码来源:match-set-expression.component.ts
示例10: translate
translate() {
if (!this.translatedValue) { return; }
let entry;
if (this.existingTranslation) {
entry = this.existingTranslation;
entry.string(this.translatedValue);
this.pcrud.update(entry).toPromise().then(
ok => {
if (!this.nextString) {
this.close('Translation updated');
}
},
err => console.error(err)
);
return;
}
entry = this.idl.create('i18n');
entry.fq_field(this.fqField());
entry.identity_value(this.identValue());
entry.translation(this.selectedLocale);
entry.string(this.translatedValue);
this.pcrud.create(entry).toPromise().then(
ok => {
if (!this.nextString) {
this.close('Translation created');
}
},
err => console.error('Translation creation failed')
);
}
开发者ID:StephenGWills,项目名称:Evergreen,代码行数:36,代码来源:translate.component.ts
注:本文中的@eg/core/idl.service.IdlService类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论