diff --git a/src/main/webapp/app/entities/army/army-detail-desktop.component.html b/src/main/webapp/app/entities/army/army-detail-desktop.component.html index 370550b3..f5f720b4 100644 --- a/src/main/webapp/app/entities/army/army-detail-desktop.component.html +++ b/src/main/webapp/app/entities/army/army-detail-desktop.component.html @@ -69,7 +69,7 @@
CRUSADE POINTS
ADD TO FORCE
-
+
Unit {{rowIndex + 1}}: diff --git a/src/main/webapp/app/entities/army/army-detail-mobile.html b/src/main/webapp/app/entities/army/army-detail-mobile.html index ee5e82ee..605ba550 100644 --- a/src/main/webapp/app/entities/army/army-detail-mobile.html +++ b/src/main/webapp/app/entities/army/army-detail-mobile.html @@ -35,7 +35,8 @@
-
+
+
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']) {