tabs snuck into the source
authorJason Etheridge <phasefx@gmail.com>
Mon, 15 May 2023 06:48:01 +0000 (02:48 -0400)
committerJason Etheridge <phasefx@gmail.com>
Thu, 25 May 2023 16:45:32 +0000 (12:45 -0400)
Signed-off-by: Jason Etheridge <phasefx@gmail.com>
Open-ILS/src/eg2/src/app/staff/admin/server/custom-org-unit-trees.component.ts

index 3198fac..9abcc74 100644 (file)
@@ -69,49 +69,49 @@ export class CustomOrgUnitTreesComponent implements OnInit {
         }
     }
 
-       async loadCustomTree(purpose: string): Promise<any> {
-               const flesh = ['children', 'org_unit'];
-
-               let tree_type: IdlObject;
-               tree_type = await firstValueFrom(
-                       this.pcrud.search('aouct', { purpose: purpose })
-                               .pipe(
-                                       take(1),
-                                       defaultIfEmpty(undefined),
-                                       catchError(err => {
-                                               console.warn('caught from pcrud (aouct): 1', err);
-                                               return of(undefined);
-                                       })
-                               )
-               );
-
-               let tree_id: number;
-               if (tree_type) {
-                       tree_id = tree_type.id();
-               } else {
-                       tree_id = null;
-               }
-
-               let tree: IdlObject;
+    async loadCustomTree(purpose: string): Promise<any> {
+        const flesh = ['children', 'org_unit'];
+
+        let tree_type: IdlObject;
+        tree_type = await firstValueFrom(
+            this.pcrud.search('aouct', { purpose: purpose })
+            .pipe(
+                take(1),
+                defaultIfEmpty(undefined),
+                catchError(err => {
+                    console.warn('caught from pcrud (aouct): 1', err);
+                    return of(undefined);
+                })
+            )
+        );
+
+        let tree_id: number;
+        if (tree_type) {
+            tree_id = tree_type.id();
+        } else {
+            tree_id = null;
+        }
+
+        let tree: IdlObject;
         if (tree_id) {
             tree = await firstValueFrom(
                 this.pcrud.search('aouctn', {tree: tree_id, parent_node: null},
-                {flesh: -1, flesh_fields: {aouctn: flesh}}, {authoritative: true})
-                    .pipe(
-                        take(1),
-                        defaultIfEmpty(undefined),
-                        catchError(err => {
-                            console.warn('phasefx: caught from pcrud (aouctn): 2', err);
-                            return of(undefined);
-                        })
-                    )
+                    {flesh: -1, flesh_fields: {aouctn: flesh}}, {authoritative: true})
+                .pipe(
+                    take(1),
+                    defaultIfEmpty(undefined),
+                    catchError(err => {
+                        console.warn('phasefx: caught from pcrud (aouctn): 2', err);
+                        return of(undefined);
+                    })
+                )
             );
             this.ingestCustomTree(tree); // sets this.custom_tree as a side-effect
         } else {
             this.custom_tree = this.tree.clone(); // need to remember to create the aouct if needed upon saving
         }
         return this.custom_tree;
-       }
+    }
 
     // Translate the org unt type tree into a structure EgTree can use.
     ingestAouTree(aouTree: IdlObject) {