From 33f9e2e15d94f916c74d11ece18faef4d355f636 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Tue, 22 Jun 2021 11:43:05 -0400 Subject: [PATCH] LP1929741 Batch of PO fixes * Avoid clearing the owning library during batch edit copy operations * Leverage combobox startsWith for distribution formulas * Disable the order ident selector so it cannot be modified after a PO is activated * Add some icons to the PO actions for more eye-grabbiness. Signed-off-by: Bill Erickson Signed-off-by: Galen Charlton Signed-off-by: Jane Sandberg --- .../staff/acq/lineitem/batch-copies.component.ts | 2 +- .../app/staff/acq/lineitem/copies.component.html | 2 +- .../acq/lineitem/lineitem-list.component.html | 3 +- .../staff/acq/lineitem/lineitem-list.component.ts | 4 +++ .../src/app/staff/acq/po/summary.component.html | 38 ++++++++++++++++------ 5 files changed, 36 insertions(+), 13 deletions(-) diff --git a/Open-ILS/src/eg2/src/app/staff/acq/lineitem/batch-copies.component.ts b/Open-ILS/src/eg2/src/app/staff/acq/lineitem/batch-copies.component.ts index 6c70aa3d4f..5adb6e3f00 100644 --- a/Open-ILS/src/eg2/src/app/staff/acq/lineitem/batch-copies.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/acq/lineitem/batch-copies.component.ts @@ -49,7 +49,7 @@ export class LineitemBatchCopiesComponent implements OnInit { batchApplyAttrs(copyTemplate: IdlObject) { BATCH_FIELDS.forEach(field => { const val = copyTemplate[field](); - if (val === undefined) { return; } + if (val === undefined || val === null) { return; } this.lineitem.lineitem_details().forEach(copy => { copy[field](val); copy.ischanged(true); // isnew() takes precedence diff --git a/Open-ILS/src/eg2/src/app/staff/acq/lineitem/copies.component.html b/Open-ILS/src/eg2/src/app/staff/acq/lineitem/copies.component.html index 3335cb4219..a29b178bff 100644 --- a/Open-ILS/src/eg2/src/app/staff/acq/lineitem/copies.component.html +++ b/Open-ILS/src/eg2/src/app/staff/acq/lineitem/copies.component.html @@ -15,7 +15,7 @@ diff --git a/Open-ILS/src/eg2/src/app/staff/acq/lineitem/lineitem-list.component.html b/Open-ILS/src/eg2/src/app/staff/acq/lineitem/lineitem-list.component.html index 7f027f7978..c471adef0c 100644 --- a/Open-ILS/src/eg2/src/app/staff/acq/lineitem/lineitem-list.component.html +++ b/Open-ILS/src/eg2/src/app/staff/acq/lineitem/lineitem-list.component.html @@ -290,7 +290,7 @@
diff --git a/Open-ILS/src/eg2/src/app/staff/acq/lineitem/lineitem-list.component.ts b/Open-ILS/src/eg2/src/app/staff/acq/lineitem/lineitem-list.component.ts index ce90fe93c4..941bc9f07a 100644 --- a/Open-ILS/src/eg2/src/app/staff/acq/lineitem/lineitem-list.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/acq/lineitem/lineitem-list.component.ts @@ -322,6 +322,10 @@ export class LineitemListComponent implements OnInit { ).subscribe(freshLi => this.ingestOneLi(freshLi, true)); } + canEditIdent(li: IdlObject): boolean { + return DELETABLE_STATES.includes(li.state()); + } + addBriefRecord() { } diff --git a/Open-ILS/src/eg2/src/app/staff/acq/po/summary.component.html b/Open-ILS/src/eg2/src/app/staff/acq/po/summary.component.html index 95bd00e294..e89d43e3a6 100644 --- a/Open-ILS/src/eg2/src/app/staff/acq/po/summary.component.html +++ b/Open-ILS/src/eg2/src/app/staff/acq/po/summary.component.html @@ -156,32 +156,50 @@