+
diff --git a/src/main/webapp/app/entities/army/army-detail.component.ts b/src/main/webapp/app/entities/army/army-detail.component.ts
index 11acd2d2..0cbde9b5 100644
--- a/src/main/webapp/app/entities/army/army-detail.component.ts
+++ b/src/main/webapp/app/entities/army/army-detail.component.ts
@@ -4,7 +4,7 @@ import { JhiDataUtils } from 'ng-jhipster';
import { LocalStorage } from 'ngx-webstorage';
import { IArmy } from 'app/shared/model/army.model';
-import { UnitArmy } from '../../shared/model/unit-army.model';
+import {IUnitArmy, UnitArmy} from '../../shared/model/unit-army.model';
import {DomSanitizer} from "@angular/platform-browser";
import {ResponsiveService} from "../../responsive.service";
@@ -46,6 +46,15 @@ export class ArmyDetailComponent implements OnInit {
console.log(msg);
}
+ sortUnits(unitArmy: IUnitArmy[] | undefined): Array | undefined {
+ if (unitArmy) {
+ // @ts-ignore
+ unitArmy.sort((a,b) => a.unitName.localeCompare(b.unitName));
+ return unitArmy
+ }
+ return unitArmy
+ }
+
calculatePoints(armylocal: IArmy): Number {
let total = 0;
if (armylocal['units']) {