Skip to content

Commit

Permalink
feat(branch-select): sort by branch name
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrianAndersen committed Oct 9, 2024
1 parent 423dfed commit 097012a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ export class BlcBranchSelectComponent implements OnInit {
this.branchService
.get()
.then((branches: Branch[]) => {
this.branches = branches;
this.branches = branches.sort((a, b) =>
a.name.localeCompare(b.name, "no")
);
this.selectAll();
})
.catch(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ export class CustomerItemDetailComponent implements OnInit {

private async getAllBranches() {
this._branchService.get().then((branches: Branch[]) => {
this.branches = branches;
this.branches = branches.sort((a, b) =>
a.name.localeCompare(b.name, "no")
);
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ export class OrderDetailCardComponent implements OnInit {

private async getAllBranches() {
this._branchService.get().then((branches: Branch[]) => {
this.branches = branches;
this.branches = branches.sort((a, b) =>
a.name.localeCompare(b.name, "no")
);
});
}

Expand Down

0 comments on commit 097012a

Please sign in to comment.