From: Bill Erickson Date: Thu, 2 Jul 2020 15:00:03 +0000 (-0400) Subject: LPXXX Batch attr gets expandies X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=bab46e72721b2fe75e8981d5f7bb8d7af40f15b9;p=working%2FEvergreen.git LPXXX Batch attr gets expandies Signed-off-by: Bill Erickson --- diff --git a/Open-ILS/src/eg2/src/app/staff/share/holdings/batch-item-attr.component.html b/Open-ILS/src/eg2/src/app/staff/share/holdings/batch-item-attr.component.html index f364cd5b50..e27cc800b3 100644 --- a/Open-ILS/src/eg2/src/app/staff/share/holdings/batch-item-attr.component.html +++ b/Open-ILS/src/eg2/src/app/staff/share/holdings/batch-item-attr.component.html @@ -1,34 +1,48 @@
-
+
-
- - Yes - No - - - - <Unset> + *ngFor="let count of labelCounts | keyvalue; let idx = index"> + + ... + + +
+ + Yes + No - {{count.key | currency}} - - - - <Unset> + + + <Unset> + + {{count.key | currency}} - {{count.key}} - -
-
{{count.value}} copies
+ + + <Unset> + + {{count.key}} + +
+
{{count.value}} copies
+
diff --git a/Open-ILS/src/eg2/src/app/staff/share/holdings/batch-item-attr.component.ts b/Open-ILS/src/eg2/src/app/staff/share/holdings/batch-item-attr.component.ts index a72545454f..55519df57e 100644 --- a/Open-ILS/src/eg2/src/app/staff/share/holdings/batch-item-attr.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/share/holdings/batch-item-attr.component.ts @@ -46,6 +46,10 @@ export class BatchItemAttrComponent { // If true, null/undefined/empty-string display as @Input() emptyIsUnset: boolean; + // Lists larger than this will be partially hidden behind + // and expandy. + @Input() defaultDisplayCount = 7; + @Output() changesSaved: EventEmitter = new EventEmitter(); @Output() changesCanceled: EventEmitter = new EventEmitter(); @Output() valueCleared: EventEmitter = new EventEmitter(); @@ -55,6 +59,9 @@ export class BatchItemAttrComponent { hasChanged = false; + // Showing all entries? + expanded = false; + constructor() {} save() { @@ -74,6 +81,9 @@ export class BatchItemAttrComponent { this.valueCleared.emit(); } + bulky(): boolean { + return Object.keys(this.labelCounts).length > this.defaultDisplayCount; + } toggleEditMode() { if (this.readOnly) { return; }