Skip to content

Commit 0d66cbc

Browse files
authored
feat: only show top level when multiple location entity (#1162)
* feat: only show top level when multiple location entity * lint fix
1 parent a5c5d77 commit 0d66cbc

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/app/shared/components/si/core/intacct-location-entity/intacct-location-entity.component.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,12 @@ export class IntacctLocationEntityComponent implements OnInit {
155155
workspace: this.workspaceId,
156156
detail: {}
157157
};
158-
this.locationEntityOptions = [topLevelOption].concat(locationEntities);
158+
159+
// Only add top level option if there are multiple location entities
160+
this.locationEntityOptions = locationEntities.length > 1
161+
? [topLevelOption].concat(locationEntities)
162+
: locationEntities;
163+
159164
this.setupLocationEntityMapping();
160165
});
161166
}

0 commit comments

Comments
 (0)