From: Bill Erickson Date: Tue, 20 Jul 2021 21:25:51 +0000 (-0400) Subject: LP1936233 Item status actions menu X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=1b153cf1ce4d4e7c577acda696336178655f99b8;p=working%2FEvergreen.git LP1936233 Item status actions menu Signed-off-by: Bill Erickson --- diff --git a/Open-ILS/src/eg2/src/app/staff/cat/item/status.component.html b/Open-ILS/src/eg2/src/app/staff/cat/item/status.component.html index 944e3e794e..a888a8fcef 100644 --- a/Open-ILS/src/eg2/src/app/staff/cat/item/status.component.html +++ b/Open-ILS/src/eg2/src/app/staff/cat/item/status.component.html @@ -16,6 +16,7 @@ + + + + + + + + c.status() !== 14 /* Damaged */).map(c => c.id()); + + if (copyIds.length === 0) { return; } + + let modified = false; + + from(copyIds).pipe(concatMap(copyId => { + + this.markDamagedDialog.copyId = copyId; + return this.markDamagedDialog.open({size: 'lg'}) + .pipe(tap(ok => { if (ok) { modified = true; } })); + + })).toPromise().then(_ => this.load()); + } + + + discardWeed(copies: IdlObject[]) { + let modified = false; + + this.markItemsDialog.markAs = 'discard'; + this.markItemsDialog.copies = copies; + this.markItemsDialog.open() + .subscribe( + copyId => { + if (copyId !== null) { modified = true; } + }, + null, + () => { + if (modified) { this.load(); } + } + ); + } } diff --git a/Open-ILS/src/eg2/src/app/staff/share/holdings/holdings.module.ts b/Open-ILS/src/eg2/src/app/staff/share/holdings/holdings.module.ts index ab914a1827..2a56624333 100644 --- a/Open-ILS/src/eg2/src/app/staff/share/holdings/holdings.module.ts +++ b/Open-ILS/src/eg2/src/app/staff/share/holdings/holdings.module.ts @@ -11,6 +11,7 @@ import {ConjoinedItemsDialogComponent} from './conjoined-items-dialog.component' import {TransferItemsComponent} from './transfer-items.component'; import {TransferHoldingsComponent} from './transfer-holdings.component'; import {CopyAlertManagerDialogComponent} from './copy-alert-manager.component'; +import {MarkItemsDialogComponent} from './mark-items-dialog.component'; @NgModule({ declarations: [ @@ -22,6 +23,7 @@ import {CopyAlertManagerDialogComponent} from './copy-alert-manager.component'; ConjoinedItemsDialogComponent, TransferItemsComponent, TransferHoldingsComponent, + MarkItemsDialogComponent, CopyAlertManagerDialogComponent ], imports: [ @@ -37,6 +39,7 @@ import {CopyAlertManagerDialogComponent} from './copy-alert-manager.component'; ConjoinedItemsDialogComponent, TransferItemsComponent, TransferHoldingsComponent, + MarkItemsDialogComponent, CopyAlertManagerDialogComponent ], providers: [