dialogTitle="Items Checked Out"
dialogBody="The selected items are checked out. Check them in before continuing?">
</eg-confirm-dialog>
+<eg-confirm-dialog #claimsNeverConfirm
+ i18n-dialogTitle i18n-dialogBody
+ dialogTitle="Claims Never Checked Out"
+ dialogBody="Mark {{claimsNeverCount}} items as Never Checked Out?">
+</eg-confirm-dialog>
<ng-template #titleTemplate let-r="row">
(onClick)="claimsReturned($event)"></eg-grid-toolbar-action>
<eg-grid-toolbar-action
+ group="Mark" i18n-group i18n-label label="Mark Claims Never Checked Out"
+ (onClick)="claimsNeverCheckedOut($event)"></eg-grid-toolbar-action>
+
+ <eg-grid-toolbar-action
group="Mark" i18n-group i18n-label label="Mark Lost (By Patron)"
(onClick)="markLost($event)"></eg-grid-toolbar-action>
cellTextGenerator: GridCellTextGenerator;
rowFlair: (row: CircGridEntry) => GridRowFlairEntry;
rowClass: (row: CircGridEntry) => string;
+ claimsNeverCount = 0;
nowDate: number = new Date().getTime();
private itemsOutConfirm: ConfirmDialogComponent;
@ViewChild('claimsReturnedConfirm')
private claimsReturnedConfirm: ConfirmDialogComponent;
+ @ViewChild('claimsNeverConfirm')
+ private claimsNeverConfirm: ConfirmDialogComponent;
@ViewChild('progressDialog')
private progressDialog: ProgressDialogComponent;
@ViewChild('claimsReturnedDialog')
}
);
}
+
+ claimsNeverCheckedOut(rows: CircGridEntry[]) {
+ const dialog = this.openProgressDialog(rows);
+
+ this.claimsNeverCount = rows.length;
+
+ this.claimsNeverConfirm.open().subscribe(confirmed => {
+ this.claimsNeverCount = 0;
+
+ if (!confirmed) {
+ dialog.close();
+ return;
+ }
+
+ this.circ.checkinBatch(
+ this.getCopyIds(rows), {claims_never_checked_out: true}
+ ).subscribe(
+ result => dialog.increment(),
+ err => console.error(err),
+ () => {
+ dialog.close();
+ this.emitReloadRequest();
+ }
+ );
+ });
+ }
}
ngOnInit() {
this.onOpen$.subscribe(_ => {
+
+ this.values.dummy_title = null;
+ this.values.dummy_author = null;
+ this.values.dummy_isbn = null;
+ this.values.circ_modifier = null;
+
this.perm.hasWorkPermHere('CREATE_PRECAT')
.then(perms => this.hasPerm = perms['CREATE_PRECAT']);