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=807d1fbdca1d72e7637e5a7db97d6ffc45a9b243;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 fd1ec0f680..6baa785a02 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 @@ -15,6 +15,7 @@ import {TransferItemsComponent} from './transfer-items.component'; import {TransferHoldingsComponent} from './transfer-holdings.component'; import {BatchItemAttrComponent} from './batch-item-attr.component'; import {CopyAlertManagerDialogComponent} from './copy-alert-manager.component'; +import {MarkItemsDialogComponent} from './mark-items-dialog.component'; @NgModule({ declarations: [ @@ -30,6 +31,7 @@ import {CopyAlertManagerDialogComponent} from './copy-alert-manager.component'; TransferItemsComponent, TransferHoldingsComponent, BatchItemAttrComponent, + MarkItemsDialogComponent, CopyAlertManagerDialogComponent ], imports: [ @@ -49,6 +51,7 @@ import {CopyAlertManagerDialogComponent} from './copy-alert-manager.component'; TransferItemsComponent, TransferHoldingsComponent, BatchItemAttrComponent, + MarkItemsDialogComponent, CopyAlertManagerDialogComponent ], providers: [