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


TypeScript service.IdlObject.id方法代碼示例

本文整理匯總了TypeScript中@eg/core/idl.service.IdlObject.id方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript service.IdlObject.id方法的具體用法?TypeScript service.IdlObject.id怎麽用?TypeScript service.IdlObject.id使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在@eg/core/idl.service.IdlObject的用法示例。


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

示例1: holdForChanged

    holdForChanged() {
        this.user = null;

        if (this.holdFor === 'patron') {
            if (this.userBarcode) {
                this.userBarcodeChanged();
            }
        } else {
            // To bypass the dupe check.
            this.currentUserBarcode = '_' + this.requestor.id();
            this.getUser(this.requestor.id());
        }
    }
開發者ID:StephenGWills,項目名稱:Evergreen,代碼行數:13,代碼來源:hold.component.ts

示例2: saveTree

    // Server API deletes and recreates the tree on update.
    // It manages parent/child relationships via the children array.
    // We only need send the current tree in a form the API recognizes.
    saveTree(): Promise<any> {


        const compileTree = (node?: TreeNode) => {

            if (!node) { node = this.tree.rootNode; }

            const point = node.callerData.point;

            node.children.forEach(child =>
                point.children().push(compileTree(child)));

            return point;
        };

        const rootPoint: IdlObject = compileTree();

        return this.net.request(
            'open-ils.vandelay',
            'open-ils.vandelay.match_set.update',
            this.auth.token(), this.matchSet_.id(), rootPoint
        ).toPromise().then(
            ok => this.refreshTree(),
            err => console.error(err)
        );
    }
開發者ID:evergreen-library-system,項目名稱:Evergreen,代碼行數:29,代碼來源:match-set-expression.component.ts

示例3: exportQueue

    // Download a queue as a MARC file.
    exportQueue(queue: IdlObject, nonImported?: boolean) {

        const etype = queue.queue_type().match(/auth/) ? 'auth' : 'bib';

        let url =
          `${VANDELAY_EXPORT_PATH}?type=${etype}&queueid=${queue.id()}`;

        let saveName = queue.name();

        if (nonImported) {
            url += '&nonimported=1';
            saveName += '_nonimported';
        }

        saveName += '.mrc';

        this.http.get(url, {responseType: 'text'}).subscribe(
            data => {
                saveAs(
                    new Blob([data], {type: 'application/octet-stream'}),
                    saveName
                );
            },
            err  => {
                console.error(err);
            }
        );
    }
開發者ID:StephenGWills,項目名稱:Evergreen,代碼行數:29,代碼來源:vandelay.service.ts

示例4: Number

        .subscribe(summary => {
            summary.metabibId = Number(metabib.id());
            summary.metabibRecords =
                metabib.source_maps().map(m => Number(m.source()));

            let promise;

            if (relatedBibIds.length > 0) {

                // Grab data for MR bib summary augmentation
                promise = this.pcrud.search('mraf', {id: relatedBibIds})
                    .pipe(tap(attr => summary.record.mattrs().push(attr)))
                    .toPromise();
            } else {

                // Metarecord has only one constituent bib.
                promise = Promise.resolve();
            }

            promise.then(() => {

                // Re-compile with augmented data
                summary.compileRecordAttrs();

                // Fetch holdings data for the metarecord
                this.getHoldingsSummary(metabib.id(), orgId, orgDepth, true)
                .then(holdingsSummary => {
                    summary.holdingsSummary = holdingsSummary;
                    observer.next(summary);
                    observer.complete();
                });
            });
        });
開發者ID:StephenGWills,項目名稱:Evergreen,代碼行數:33,代碼來源:bib-record.service.ts

示例5:

 (part: IdlObject) => {
     this.editDialog.mode = 'update';
     this.editDialog.recId = part.id();
     this.editDialog.open().then(
         ok => this.partsGrid.reload(),
         err => {}
     );
 }
開發者ID:StephenGWills,項目名稱:Evergreen,代碼行數:8,代碼來源:parts.component.ts

示例6: refreshTree

    refreshTree(): Promise<any> {
        if (!this.matchSet_) { return Promise.resolve(); }

        return this.pcrud.search('vmsp',
            {match_set: this.matchSet_.id()}, {},
            {atomic: true, authoritative: true}
        ).toPromise().then(points => this.ingestMatchPoints(points));
    }
開發者ID:StephenGWills,項目名稱:Evergreen,代碼行數:8,代碼來源:match-set-expression.component.ts

示例7:

 (matchSet: IdlObject) => {
     this.editDialog.mode = 'update';
     this.editDialog.recId = matchSet.id();
     this.editDialog.open({size: 'lg'}).then(
         ok => this.grid.reload(),
         err => {}
     );
 }
開發者ID:StephenGWills,項目名稱:Evergreen,代碼行數:8,代碼來源:match-set-list.component.ts

示例8: constructor

 constructor(record: IdlObject, orgId: number, orgDepth: number) {
     this.id = record.id();
     this.record = record;
     this.orgId = orgId;
     this.orgDepth = orgDepth;
     this.display = {};
     this.attributes = {};
     this.bibCallNumber = null;
 }
開發者ID:jamesrf,項目名稱:Evergreen,代碼行數:9,代碼來源:bib-record.service.ts

示例9: placeOneHold

    placeOneHold(ctx: HoldContext, override?: boolean): Promise<any> {

        ctx.processing = true;
        const selectedFormats = this.mrSelectorsToFilters(ctx);

        return this.holds.placeHold({
            holdTarget: ctx.holdTarget,
            holdType: this.holdType,
            recipient: this.user.id(),
            requestor: this.requestor.id(),
            pickupLib: this.pickupLib,
            override: override,
            notifyEmail: this.notifyEmail, // bool
            notifyPhone: this.notifyPhone ? this.phoneValue : null,
            notifySms: this.notifySms ? this.smsValue : null,
            smsCarrier: this.notifySms ? this.smsCarrier : null,
            thawDate: this.suspend ? this.activeDate : null,
            frozen: this.suspend,
            holdableFormats: selectedFormats

        }).toPromise().then(
            request => {
                console.log('hold returned: ', request);
                ctx.lastRequest = request;
                ctx.processing = false;

                // If this request failed and was not already an override,
                // see of this user has permission to override.
                if (!request.override &&
                    !request.result.success && request.result.evt) {

                    const txtcode = request.result.evt.textcode;
                    const perm = txtcode + '.override';

                    return this.perm.hasWorkPermHere(perm).then(
                        permResult => ctx.canOverride = permResult[perm]);
                }
            },
            error => {
                ctx.processing = false;
                console.error(error);
            }
        );
    }
開發者ID:StephenGWills,項目名稱:Evergreen,代碼行數:44,代碼來源:hold.component.ts

示例10:

            promise.then(() => {

                // Re-compile with augmented data
                summary.compileRecordAttrs();

                // Fetch holdings data for the metarecord
                this.getHoldingsSummary(metabib.id(), orgId, orgDepth, true)
                .then(holdingsSummary => {
                    summary.holdingsSummary = holdingsSummary;
                    observer.next(summary);
                    observer.complete();
                });
            });
開發者ID:StephenGWills,項目名稱:Evergreen,代碼行數:13,代碼來源:bib-record.service.ts


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