LP#2003755 No Stat Cat Change Indication When Applying Template
authorDan Briem <dbriem@wlsmail.org>
Wed, 25 Jan 2023 04:11:08 +0000 (23:11 -0500)
committerGalen Charlton <gmc@equinoxOLI.org>
Mon, 13 Feb 2023 15:56:33 +0000 (10:56 -0500)
Add indicator styles on statistical category form fields when
they are applied by a template in the Angular Holdings Editor.

Signed-off-by: Dan Briem <dbriem@wlsmail.org>
Signed-off-by: Beth Willis <willis@noblenet.org>
Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
Open-ILS/src/eg2/src/app/staff/cat/volcopy/copy-attrs.component.ts

index ca4b317..624e7bc 100644 (file)
@@ -561,6 +561,11 @@ export class CopyAttrsComponent implements OnInit, AfterViewInit {
                     if (value[+catId] !== null) {
                         this.statCatValues[+catId] = value[+catId];
                         this.statCatChanged(+catId);
+                        // Indicate this value changed in the form
+                        const attr = this.batchAttrs.find(attr =>
+                            attr.name?.split('_').pop() === catId
+                        );
+                        if (attr) { attr.hasChanged = true; }
                     }
                 });
                 return;