import {Pager} from '@eg/share/util/pager';
import {StoreService} from '@eg/core/store.service';
import {ServerStoreService} from '@eg/core/server-store.service';
-import {PrecatCheckoutDialogComponent} from './precat-dialog.component';
+import {PrecatCheckoutDialogComponent} from '@eg/staff/share/circ/precat-dialog.component';
import {AudioService} from '@eg/share/util/audio.service';
import {CopyAlertsDialogComponent
} from '@eg/staff/share/holdings/copy-alerts-dialog.component';
switch (result.evt.textcode) {
case 'ITEM_NOT_CATALOGED':
- this.audio.play('error.checkout.no_cataloged');
this.handlePrecat(result);
break;
}
import {EditComponent} from './edit.component';
import {EditToolbarComponent} from './edit-toolbar.component';
import {BcSearchComponent} from './bcsearch.component';
-import {PrecatCheckoutDialogComponent} from './precat-dialog.component';
import {BarcodesModule} from '@eg/staff/share/barcodes/barcodes.module';
import {ItemsComponent} from './items.component';
EditComponent,
EditToolbarComponent,
BcSearchComponent,
- ItemsComponent,
- PrecatCheckoutDialogComponent
+ ItemsComponent
],
imports: [
StaffCommonModule,
+++ /dev/null
-<ng-template #dialogContent>
- <div class="modal-header bg-info">
- <h4 i18n>Barcode "{{barcode}}" was mis-scanned or is a non-cataloged item.</h4>
- <button type="button" class="close"
- i18n-aria-label aria-label="Close" (click)="close()">
- <span aria-hidden="true">×</span>
- </button>
- </div>
- <div class="modal-body">
-
- <div class="row">
- <div class="col-lg-4" i18n>Title</div>
- <div class="col-lg-8">
- <input class="form-control" [(ngModel)]="values.dummy_title"
- id='precat-title-input' i18n-placeholder placeholder="Title..."/>
- </div>
- </div>
-
- <div class="row mt-2">
- <div class="col-lg-4" i18n>Author</div>
- <div class="col-lg-8">
- <input class="form-control" [(ngModel)]="values.dummy_author"
- i18n-placeholder placeholder="Author..."/>
- </div>
- </div>
-
- <div class="row mt-2">
- <div class="col-lg-4" i18n>ISBN</div>
- <div class="col-lg-8">
- <input class="form-control" [(ngModel)]="values.dummy_isbn"
- i18n-placeholder placeholder="ISBN..."/>
- </div>
- </div>
-
- <div class="row mt-2">
- <div class="col-lg-4" i18n>Circulation Modifier</div>
- <div class="col-lg-8">
- <eg-combobox idlClass="ccm"
- i18n-placeholder placeholder="Circulation Modifier..."
- (onChange)="values.circ_modifier = $event ? $event.id : null">
- </eg-combobox>
- </div>
- </div>
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-success" (click)="close(values)"
- [disabled]="!hasPerm || !values.dummy_title" i18n>Submit</button>
- <button type="button" class="btn btn-warning" (click)="close()" i18n>Cancel</button>
- </div>
-</ng-template>
+++ /dev/null
-import {Component, OnInit, Input} from '@angular/core';
-import {Observable} from 'rxjs';
-import {DialogComponent} from '@eg/share/dialog/dialog.component';
-import {NgbModal, NgbModalOptions} from '@ng-bootstrap/ng-bootstrap';
-import {ComboboxEntry} from '@eg/share/combobox/combobox.component';
-import {PermService} from '@eg/core/perm.service';
-
-/**
- * Precat checkout dialog
- */
-
-@Component({
- selector: 'eg-precat-checkout-dialog',
- templateUrl: 'precat-dialog.component.html'
-})
-
-export class PrecatCheckoutDialogComponent extends DialogComponent implements OnInit {
-
- @Input() barcode = '';
-
- circModifier: ComboboxEntry;
- hasPerm = false;
-
- values = {
- dummy_title: null,
- dummy_author: null,
- dummy_isbn: null,
- circ_modifier: null
- };
-
- constructor(
- private perm: PermService,
- private modal: NgbModal) {
- super(modal);
- }
-
- ngOnInit() {
- this.onOpen$.subscribe(_ => {
- this.perm.hasWorkPermHere('CREATE_PRECAT')
- .then(perms => this.hasPerm = perms['CREATE_PRECAT']);
-
- setTimeout(() => {
- const node = document.getElementById('precat-title-input');
- if (node) { node.focus(); }
- });
- });
- }
-}
-
-
-
import {CircService} from './circ.service';
import {CircGridComponent} from './grid.component';
import {DueDateDialogComponent} from './due-date-dialog.component';
+import {PrecatCheckoutDialogComponent} from './precat-dialog.component';
@NgModule({
declarations: [
CircGridComponent,
- DueDateDialogComponent
+ DueDateDialogComponent,
+ PrecatCheckoutDialogComponent
],
imports: [
StaffCommonModule,
HoldingsModule
],
exports: [
- CircGridComponent
+ CircGridComponent,
+ PrecatCheckoutDialogComponent
],
providers: [
CircService
switch (evt.textcode) {
case 'ITEM_NOT_CATALOGED':
+ this.audio.play('error.checkout.no_cataloged');
// alert, etc.
}
--- /dev/null
+<ng-template #dialogContent>
+ <div class="modal-header bg-info">
+ <h4 i18n>Barcode "{{barcode}}" was mis-scanned or is a non-cataloged item.</h4>
+ <button type="button" class="close"
+ i18n-aria-label aria-label="Close" (click)="close()">
+ <span aria-hidden="true">×</span>
+ </button>
+ </div>
+ <div class="modal-body">
+
+ <div class="row">
+ <div class="col-lg-4" i18n>Title</div>
+ <div class="col-lg-8">
+ <input class="form-control" [(ngModel)]="values.dummy_title"
+ id='precat-title-input' i18n-placeholder placeholder="Title..."/>
+ </div>
+ </div>
+
+ <div class="row mt-2">
+ <div class="col-lg-4" i18n>Author</div>
+ <div class="col-lg-8">
+ <input class="form-control" [(ngModel)]="values.dummy_author"
+ i18n-placeholder placeholder="Author..."/>
+ </div>
+ </div>
+
+ <div class="row mt-2">
+ <div class="col-lg-4" i18n>ISBN</div>
+ <div class="col-lg-8">
+ <input class="form-control" [(ngModel)]="values.dummy_isbn"
+ i18n-placeholder placeholder="ISBN..."/>
+ </div>
+ </div>
+
+ <div class="row mt-2">
+ <div class="col-lg-4" i18n>Circulation Modifier</div>
+ <div class="col-lg-8">
+ <eg-combobox idlClass="ccm"
+ i18n-placeholder placeholder="Circulation Modifier..."
+ (onChange)="values.circ_modifier = $event ? $event.id : null">
+ </eg-combobox>
+ </div>
+ </div>
+ </div>
+ <div class="modal-footer">
+ <button type="button" class="btn btn-success" (click)="close(values)"
+ [disabled]="!hasPerm || !values.dummy_title" i18n>Submit</button>
+ <button type="button" class="btn btn-warning" (click)="close()" i18n>Cancel</button>
+ </div>
+</ng-template>
--- /dev/null
+import {Component, OnInit, Input} from '@angular/core';
+import {Observable} from 'rxjs';
+import {DialogComponent} from '@eg/share/dialog/dialog.component';
+import {NgbModal, NgbModalOptions} from '@ng-bootstrap/ng-bootstrap';
+import {ComboboxEntry} from '@eg/share/combobox/combobox.component';
+import {PermService} from '@eg/core/perm.service';
+
+/**
+ * Precat checkout dialog
+ */
+
+@Component({
+ selector: 'eg-precat-checkout-dialog',
+ templateUrl: 'precat-dialog.component.html'
+})
+
+export class PrecatCheckoutDialogComponent extends DialogComponent implements OnInit {
+
+ @Input() barcode = '';
+
+ circModifier: ComboboxEntry;
+ hasPerm = false;
+
+ values = {
+ dummy_title: null,
+ dummy_author: null,
+ dummy_isbn: null,
+ circ_modifier: null
+ };
+
+ constructor(
+ private perm: PermService,
+ private modal: NgbModal) {
+ super(modal);
+ }
+
+ ngOnInit() {
+ this.onOpen$.subscribe(_ => {
+ this.perm.hasWorkPermHere('CREATE_PRECAT')
+ .then(perms => this.hasPerm = perms['CREATE_PRECAT']);
+
+ setTimeout(() => {
+ const node = document.getElementById('precat-title-input');
+ if (node) { node.focus(); }
+ });
+ });
+ }
+}
+
+
+