From 884446e0314b4cdb6c2b70b29e3391f4fb0b57af Mon Sep 17 00:00:00 2001 From: vesem Date: Tue, 10 Aug 2021 17:33:43 -0400 Subject: [PATCH 1/7] local commit --- src/main/java/com/warhammer/domain/Army.java | 29 +++++++++-- .../java/com/warhammer/enums/ArmyRaces.java | 52 +++++++++++++++++++ .../com/warhammer/web/rest/ArmyResource.java | 5 +- .../20210808083300_add_codex_points.xml | 22 ++++++++ .../20210808130500_add_army_race.xml | 22 ++++++++ .../resources/config/liquibase/master.xml | 2 + .../entities/army/army-update.component.ts | 4 ++ .../app/entities/force/force.component.html | 2 +- .../app/entities/force/force.component.ts | 19 ++++++- .../webapp/app/shared/model/army.model.ts | 4 ++ 10 files changed, 151 insertions(+), 10 deletions(-) create mode 100644 src/main/java/com/warhammer/enums/ArmyRaces.java create mode 100644 src/main/resources/config/liquibase/changelog/20210808083300_add_codex_points.xml create mode 100644 src/main/resources/config/liquibase/changelog/20210808130500_add_army_race.xml diff --git a/src/main/java/com/warhammer/domain/Army.java b/src/main/java/com/warhammer/domain/Army.java index beab4258..6b07ae1a 100644 --- a/src/main/java/com/warhammer/domain/Army.java +++ b/src/main/java/com/warhammer/domain/Army.java @@ -1,12 +1,9 @@ package com.warhammer.domain; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import org.hibernate.annotations.Cache; -import org.hibernate.annotations.CacheConcurrencyStrategy; import javax.persistence.*; -import javax.validation.constraints.*; - +import javax.validation.constraints.NotNull; import java.io.Serializable; import java.util.HashSet; import java.util.Set; @@ -38,9 +35,15 @@ public class Army implements Serializable { @Column(name = "army_power_level") private Long armyPowerLevel; + @Column(name = "army_race") + private String armyRace; + @Column(name = "army_points") private Long armyPoints; + @Column(name = "codex_specific_points") + private Long codexSpecificPoints; + @Column(name = "army_points_or_pl") private Boolean armyPointsOrPL; @@ -227,6 +230,22 @@ public class Army implements Serializable { this.battlesWon = battlesWon; } + public Long getCodexSpecificPoints() { + return codexSpecificPoints; + } + + public void setCodexSpecificPoints(Long codexSpecificPoints) { + this.codexSpecificPoints = codexSpecificPoints; + } + + public String getArmyRace() { + return armyRace; + } + + public void setArmyRace(String armyRace) { + this.armyRace = armyRace; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -251,10 +270,12 @@ public class Army implements Serializable { ", armyDescription='" + getArmyDescription() + "'" + ", armyName='" + getArmyName() + "'" + ", armyFaction='" + getArmyFaction() + "'" + + ", armyRace='" + getArmyRace() + "'" + ", armyPowerLevel=" + getArmyPowerLevel() + ", armyPoints=" + getArmyPoints() + ", armyPointsOrPL='" + isArmyPointsOrPL() + "'" + ", requisition=" + getRequisition() + + ", armyCodexSpecificPoints=" + getCodexSpecificPoints() + ", battleTally=" + getBattleTally() + ", battlesWon=" + getBattlesWon() + "}"; diff --git a/src/main/java/com/warhammer/enums/ArmyRaces.java b/src/main/java/com/warhammer/enums/ArmyRaces.java new file mode 100644 index 00000000..870fda41 --- /dev/null +++ b/src/main/java/com/warhammer/enums/ArmyRaces.java @@ -0,0 +1,52 @@ +package com.warhammer.enums; + +import java.util.Arrays; +import java.util.List; + +public enum ArmyRaces { + ADEPTUS_ASTARTES("Space Marines", Arrays.asList("".split(","))), + GREY_KNIGHTS("Grey Knights", Arrays.asList("True Name Points".split(","))), + ADEPTAS_SORORITAS("Sisters of Battle", Arrays.asList("Saint Points, Martyr Points".split(","))), + ADEPTUS_CUSTODES("Custodians", Arrays.asList("".split(","))), + ADEPTUS_MECHANICUS("AdMech", Arrays.asList("Archeotech Parts".split(","))), + ASTRA_MILITARUM("Imperial Guard", Arrays.asList("".split(","))), + IMPERIAL_KNIGHTS("Imperial Knights", Arrays.asList("".split(","))), + CHAOS_DAEMONS("Daemons", Arrays.asList("".split(","))), + CHAOS_KNIGHTS("Chaos Knights", Arrays.asList("".split(","))), + CHAOS_SPACE_MARINES("Chaos Space Marines", Arrays.asList("".split(","))), + DEATH_GUARD("Death Guard", Arrays.asList("Virulence Points".split(","))), + THOUSAND_SONS("Thousand Sons", Arrays.asList("".split(","))), + CRAFTWORLDS("Eldaar", Arrays.asList("".split(","))), + DRUKHARI("Dark Eldaar", Arrays.asList("".split(","))), + YNNARI("Ynnari", Arrays.asList("".split(","))), + HARLEQUINS("Harlequins", Arrays.asList("".split(","))), + GENESTEALERS("Genestealers", Arrays.asList("".split(","))), + NECRONS("Necons", Arrays.asList("".split(","))), + ORKS("Orks", Arrays.asList("".split(","))), + TAU("Tau", Arrays.asList("".split(","))), + TYRANIDS("Tyranids", Arrays.asList("".split(","))); + + private String armyCommonName; + private List armyCodexSpecificPointName; + + ArmyRaces(String armyCommonName, List armyCodexSpecificPointName) { + this.armyCommonName = armyCommonName; + this.armyCodexSpecificPointName = armyCodexSpecificPointName; + } + + public String getArmyCommonName() { + return armyCommonName; + } + + public List getArmyCodexSpecificPointName() { + return armyCodexSpecificPointName; + } + + @Override + public String toString() { + return "ArmyRaces{" + + "armyCommonName='" + armyCommonName + '\'' + + ", armyCodexSpecificPointName=" + armyCodexSpecificPointName + + '}'; + } +} diff --git a/src/main/java/com/warhammer/web/rest/ArmyResource.java b/src/main/java/com/warhammer/web/rest/ArmyResource.java index 73747328..df8972b1 100644 --- a/src/main/java/com/warhammer/web/rest/ArmyResource.java +++ b/src/main/java/com/warhammer/web/rest/ArmyResource.java @@ -3,19 +3,16 @@ package com.warhammer.web.rest; import com.warhammer.domain.UnitArmy; import com.warhammer.security.SecurityUtils; import com.warhammer.service.ArmyService; -import com.warhammer.web.rest.errors.BadRequestAlertException; import com.warhammer.service.dto.ArmyDTO; - +import com.warhammer.web.rest.errors.BadRequestAlertException; import io.github.jhipster.web.util.HeaderUtil; import io.github.jhipster.web.util.ResponseUtil; -import org.checkerframework.checker.nullness.Opt; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Value; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; -import javax.swing.text.html.Option; import javax.validation.Valid; import java.net.URI; import java.net.URISyntaxException; diff --git a/src/main/resources/config/liquibase/changelog/20210808083300_add_codex_points.xml b/src/main/resources/config/liquibase/changelog/20210808083300_add_codex_points.xml new file mode 100644 index 00000000..b09e2c1f --- /dev/null +++ b/src/main/resources/config/liquibase/changelog/20210808083300_add_codex_points.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + diff --git a/src/main/resources/config/liquibase/changelog/20210808130500_add_army_race.xml b/src/main/resources/config/liquibase/changelog/20210808130500_add_army_race.xml new file mode 100644 index 00000000..6e65aaa1 --- /dev/null +++ b/src/main/resources/config/liquibase/changelog/20210808130500_add_army_race.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + diff --git a/src/main/resources/config/liquibase/master.xml b/src/main/resources/config/liquibase/master.xml index b21ffdc8..2534f1e9 100644 --- a/src/main/resources/config/liquibase/master.xml +++ b/src/main/resources/config/liquibase/master.xml @@ -21,6 +21,8 @@ + + diff --git a/src/main/webapp/app/entities/army/army-update.component.ts b/src/main/webapp/app/entities/army/army-update.component.ts index 0e286b2c..675d54f0 100644 --- a/src/main/webapp/app/entities/army/army-update.component.ts +++ b/src/main/webapp/app/entities/army/army-update.component.ts @@ -29,6 +29,7 @@ export class ArmyUpdateComponent implements OnInit { armyPoints: [], armyPointsOrPL: [], requisition: [], + armyCodexSpecificPoints: [], battleTally: [], battlesWon: [], ownerId: [null, Validators.required], @@ -61,6 +62,7 @@ export class ArmyUpdateComponent implements OnInit { armyPoints: army.armyPoints, armyPointsOrPL: army.armyPointsOrPL, requisition: army.requisition, + armyCodexSpecificPoints: army.armyCodexSpecificPoints, battleTally: army.battleTally, battlesWon: army.battlesWon, ownerId: army.ownerId, @@ -104,10 +106,12 @@ export class ArmyUpdateComponent implements OnInit { armyDescription: this.editForm.get(['armyDescription'])!.value, armyName: this.editForm.get(['armyName'])!.value, armyFaction: this.editForm.get(['armyFaction'])!.value, + armyRace: this.editForm.get(['armyRace'])!.value, armyPowerLevel: this.editForm.get(['armyPowerLevel'])!.value, armyPoints: this.editForm.get(['armyPoints'])!.value, armyPointsOrPL: this.editForm.get(['armyPointsOrPL'])!.value, requisition: this.editForm.get(['requisition'])!.value, + armyCodexSpecificPoints: this.editForm.get(['armyCodexSpecificPoints'])!.value, battleTally: this.editForm.get(['battleTally'])!.value, battlesWon: this.editForm.get(['battlesWon'])!.value, ownerId: this.editForm.get(['ownerId'])!.value, diff --git a/src/main/webapp/app/entities/force/force.component.html b/src/main/webapp/app/entities/force/force.component.html index ead69c6f..5bbb3b5d 100644 --- a/src/main/webapp/app/entities/force/force.component.html +++ b/src/main/webapp/app/entities/force/force.component.html @@ -1,4 +1,4 @@ -
+
diff --git a/src/main/webapp/app/entities/force/force.component.ts b/src/main/webapp/app/entities/force/force.component.ts index 876082c1..313b54a7 100644 --- a/src/main/webapp/app/entities/force/force.component.ts +++ b/src/main/webapp/app/entities/force/force.component.ts @@ -16,10 +16,12 @@ export class ForceComponent implements OnInit { public forceList: number[]; Iunits?: IUnitArmy[]; units?: UnitArmy[] | null; + localUnits: IUnitArmy[] | []; constructor(protected dataUtils: JhiDataUtils, protected activatedRoute: ActivatedRoute, protected unitArmyService: UnitArmyService) { const localStorageList = localStorage.getItem('forceAddedListStored'); this.forceList = localStorageList ? JSON.parse(localStorageList) : []; + this.localUnits = []; } ngOnInit(): void { @@ -28,7 +30,22 @@ export class ForceComponent implements OnInit { loadAll(): void { for (let lookupUnitId of this.forceList) { - this.unitArmyService.query(lookupUnitId).subscribe((res: HttpResponse) => (this.units = res.body)); + // @ts-ignore + this.unitArmyService.find(lookupUnitId).subscribe((res: HttpResponse) => (this.localUnits?.push(res.body))); + // this.unitArmyService.query(lookupUnitId).subscribe((res: HttpResponse) => (this.units = res.body)); + // console.log(this.units.)) + // console.log(lookupUnitId) + // console.log(this.units) + // this.unitArmyService.query(lookupUnitId).subscribe((res: HttpResponse) => (console.log(res.body))); + //this.units is full list of units + // @ts-ignore + // for (const _unit of this.units) { + // console.log(_unit.id) + // console.log(lookupUnitId) + // if (_unit.id === lookupUnitId) { + // this.localUnits.push(_unit); + // } + // } lookupUnitId = 1; } } diff --git a/src/main/webapp/app/shared/model/army.model.ts b/src/main/webapp/app/shared/model/army.model.ts index d074bf16..1f1c4bf2 100644 --- a/src/main/webapp/app/shared/model/army.model.ts +++ b/src/main/webapp/app/shared/model/army.model.ts @@ -5,10 +5,12 @@ export interface IArmy { armyDescription?: any; armyName?: string; armyFaction?: string; + armyRace?: string; armyPowerLevel?: number; armyPoints?: number; armyPointsOrPL?: boolean; requisition?: number; + armyCodexSpecificPoints?: number; battleTally?: number; battlesWon?: number; ownerLogin?: string; @@ -22,12 +24,14 @@ export class Army implements IArmy { public armyDescription?: any, public armyName?: string, public armyFaction?: string, + public armyRace?: string, public armyPowerLevel?: number, public armyPoints?: number, public armyPointsOrPL?: boolean, public ownerId?: number, public ownerLogin?: string, public requisition?: number, + public armyCodexSpecificPoints?: number, public battleTally?: number, public battlesWon?: number, public units?: IUnitArmy[] From 230648a968035ecc6b87b86c2ca7543d4898ac78 Mon Sep 17 00:00:00 2001 From: vesem Date: Tue, 10 Aug 2021 18:10:09 -0400 Subject: [PATCH 2/7] Added mail configuration --- src/main/resources/config/application-dev.yml | 14 ++++++++++---- src/main/resources/config/application-prod.yml | 14 ++++++++++---- src/main/resources/config/application.yml | 2 +- 3 files changed, 21 insertions(+), 9 deletions(-) diff --git a/src/main/resources/config/application-dev.yml b/src/main/resources/config/application-dev.yml index a92fe409..29b817ef 100644 --- a/src/main/resources/config/application-dev.yml +++ b/src/main/resources/config/application-dev.yml @@ -54,10 +54,16 @@ spring: # Remove 'faker' if you do not want the sample data to be loaded automatically contexts: dev mail: - host: localhost - port: 1025 - username: - password: + host: mail.nerdfortress.dev + port: 587 + username: crusadetracker@send.nerdfortress.dev #Replace this field with your Gmail username. + password: '!k$yzY9h42@D' #Replace this field with your Gmail password/App password. + protocol: smtp + tls: true + properties.mail.smtp: + auth: true + starttls.enable: true + ssl.trust: mail.nerdfortress.dev messages: cache-duration: PT1S # 1 second, see the ISO 8601 standard thymeleaf: diff --git a/src/main/resources/config/application-prod.yml b/src/main/resources/config/application-prod.yml index 9530afec..d48da496 100644 --- a/src/main/resources/config/application-prod.yml +++ b/src/main/resources/config/application-prod.yml @@ -50,10 +50,16 @@ spring: liquibase: contexts: prod mail: - host: localhost - port: 25 - username: - password: + host: mail.nerdfortress.dev + port: 587 + username: crusadetracker@send.nerdfortress.dev #Replace this field with your Gmail username. + password: '!k$yzY9h42@D' #Replace this field with your Gmail password/App password. + protocol: smtp + tls: true + properties.mail.smtp: + auth: true + starttls.enable: true + ssl.trust: mail.nerdfortress.dev thymeleaf: cache: true diff --git a/src/main/resources/config/application.yml b/src/main/resources/config/application.yml index 20539b0e..a23ef2b0 100644 --- a/src/main/resources/config/application.yml +++ b/src/main/resources/config/application.yml @@ -141,7 +141,7 @@ jhipster: # allow-credentials: true # max-age: 1800 mail: - from: crusadetracker@localhost + from: crusadetracker@send.nerdfortress.dev swagger: default-include-pattern: /api/.* title: crusadetracker API From dff58a7d0af2cf43067c59e100c8709575fc4111 Mon Sep 17 00:00:00 2001 From: vesem Date: Tue, 10 Aug 2021 18:47:20 -0400 Subject: [PATCH 3/7] Added mail configuration --- src/main/resources/config/application-prod.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/config/application-prod.yml b/src/main/resources/config/application-prod.yml index d48da496..d706ec42 100644 --- a/src/main/resources/config/application-prod.yml +++ b/src/main/resources/config/application-prod.yml @@ -116,7 +116,7 @@ jhipster: token-validity-in-seconds: 86400 token-validity-in-seconds-for-remember-me: 2592000 mail: # specific JHipster mail property, for standard properties see MailProperties - base-url: http://my-server-url-to-change # Modify according to your server's URL + base-url: https://crusadetracker.nerdfortress.dev # Modify according to your server's URL metrics: logs: # Reports metrics in the logs enabled: false From 04235ad967b7ff11fe3484c1253d38ac3380d2e9 Mon Sep 17 00:00:00 2001 From: vesem Date: Wed, 11 Aug 2021 07:30:39 -0400 Subject: [PATCH 4/7] Cascade delete on army --- .../warhammer/service/impl/ArmyServiceImpl.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/warhammer/service/impl/ArmyServiceImpl.java b/src/main/java/com/warhammer/service/impl/ArmyServiceImpl.java index 9ad03186..b2ea065c 100644 --- a/src/main/java/com/warhammer/service/impl/ArmyServiceImpl.java +++ b/src/main/java/com/warhammer/service/impl/ArmyServiceImpl.java @@ -1,24 +1,20 @@ package com.warhammer.service.impl; -import com.warhammer.domain.UnitArmy; -import com.warhammer.service.ArmyService; import com.warhammer.domain.Army; +import com.warhammer.domain.UnitArmy; import com.warhammer.repository.ArmyRepository; +import com.warhammer.service.ArmyService; import com.warhammer.service.dto.ArmyDTO; import com.warhammer.service.mapper.ArmyMapper; -import liquibase.pro.packaged.S; import org.slf4j.Logger; import org.slf4j.LoggerFactory; - import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.util.LinkedList; import java.util.List; import java.util.Optional; -import java.util.stream.Collector; import java.util.stream.Collectors; -import java.util.stream.Stream; /** * Service Implementation for managing {@link Army}. @@ -86,6 +82,12 @@ public class ArmyServiceImpl implements ArmyService { @Override public void delete(Long id) { log.debug("Request to delete Army : {}", id); + List units = this.findUnits(id); + if (!units.isEmpty()) { + units.forEach(unit -> + unitArmyService.delete(unit.getId()) + ); + } armyRepository.deleteById(id); } } From 9b20145e77f90a0e3e72853f10403192a5f489d4 Mon Sep 17 00:00:00 2001 From: vesem Date: Tue, 17 Aug 2021 07:32:53 -0400 Subject: [PATCH 5/7] fixes for army-update 500 error --- build.sh | 10 +++++ src/main/java/com/warhammer/domain/Army.java | 42 +++++++++---------- .../entities/army/army-update.component.ts | 8 ++-- .../webapp/app/shared/model/army.model.ts | 8 ++-- 4 files changed, 39 insertions(+), 29 deletions(-) create mode 100755 build.sh diff --git a/build.sh b/build.sh new file mode 100755 index 00000000..61a514e6 --- /dev/null +++ b/build.sh @@ -0,0 +1,10 @@ +#!/bin/bash +./mvnw -ntp clean -P-webpack +./mvnw -ntp checkstyle:check +./mvnw -ntp com.github.eirslett:frontend-maven-plugin:install-node-and-npm -DnodeVersion=v12.16.1 -DnpmVersion=6.14.5 +./mvnw -ntp com.github.eirslett:frontend-maven-plugin:npm +./mvnw test +./mvnw -ntp verify -P-webpack -Pprod -DskipTests +docker-compose build +#docker login -u \$doApi -p \$doApi registry.digitalocean.com +docker push registry.digitalocean.com/nerdfortress/crusadetracker diff --git a/src/main/java/com/warhammer/domain/Army.java b/src/main/java/com/warhammer/domain/Army.java index 6b07ae1a..c0b567f5 100644 --- a/src/main/java/com/warhammer/domain/Army.java +++ b/src/main/java/com/warhammer/domain/Army.java @@ -35,14 +35,14 @@ public class Army implements Serializable { @Column(name = "army_power_level") private Long armyPowerLevel; - @Column(name = "army_race") - private String armyRace; +// @Column(name = "army_race") +// private String armyRace; @Column(name = "army_points") private Long armyPoints; - @Column(name = "codex_specific_points") - private Long codexSpecificPoints; +// @Column(name = "codex_specific_points") +// private Long codexSpecificPoints; @Column(name = "army_points_or_pl") private Boolean armyPointsOrPL; @@ -230,21 +230,21 @@ public class Army implements Serializable { this.battlesWon = battlesWon; } - public Long getCodexSpecificPoints() { - return codexSpecificPoints; - } - - public void setCodexSpecificPoints(Long codexSpecificPoints) { - this.codexSpecificPoints = codexSpecificPoints; - } - - public String getArmyRace() { - return armyRace; - } - - public void setArmyRace(String armyRace) { - this.armyRace = armyRace; - } +// public Long getCodexSpecificPoints() { +// return codexSpecificPoints; +// } +// +// public void setCodexSpecificPoints(Long codexSpecificPoints) { +// this.codexSpecificPoints = codexSpecificPoints; +// } +// +// public String getArmyRace() { +// return armyRace; +// } +// +// public void setArmyRace(String armyRace) { +// this.armyRace = armyRace; +// } @Override public boolean equals(Object o) { @@ -270,12 +270,12 @@ public class Army implements Serializable { ", armyDescription='" + getArmyDescription() + "'" + ", armyName='" + getArmyName() + "'" + ", armyFaction='" + getArmyFaction() + "'" + - ", armyRace='" + getArmyRace() + "'" + +// ", armyRace='" + getArmyRace() + "'" + ", armyPowerLevel=" + getArmyPowerLevel() + ", armyPoints=" + getArmyPoints() + ", armyPointsOrPL='" + isArmyPointsOrPL() + "'" + ", requisition=" + getRequisition() + - ", armyCodexSpecificPoints=" + getCodexSpecificPoints() + +// ", armyCodexSpecificPoints=" + getCodexSpecificPoints() + ", battleTally=" + getBattleTally() + ", battlesWon=" + getBattlesWon() + "}"; diff --git a/src/main/webapp/app/entities/army/army-update.component.ts b/src/main/webapp/app/entities/army/army-update.component.ts index 675d54f0..97e7c9fc 100644 --- a/src/main/webapp/app/entities/army/army-update.component.ts +++ b/src/main/webapp/app/entities/army/army-update.component.ts @@ -29,7 +29,7 @@ export class ArmyUpdateComponent implements OnInit { armyPoints: [], armyPointsOrPL: [], requisition: [], - armyCodexSpecificPoints: [], + // armyCodexSpecificPoints: [], battleTally: [], battlesWon: [], ownerId: [null, Validators.required], @@ -62,7 +62,7 @@ export class ArmyUpdateComponent implements OnInit { armyPoints: army.armyPoints, armyPointsOrPL: army.armyPointsOrPL, requisition: army.requisition, - armyCodexSpecificPoints: army.armyCodexSpecificPoints, + // armyCodexSpecificPoints: army.armyCodexSpecificPoints, battleTally: army.battleTally, battlesWon: army.battlesWon, ownerId: army.ownerId, @@ -106,12 +106,12 @@ export class ArmyUpdateComponent implements OnInit { armyDescription: this.editForm.get(['armyDescription'])!.value, armyName: this.editForm.get(['armyName'])!.value, armyFaction: this.editForm.get(['armyFaction'])!.value, - armyRace: this.editForm.get(['armyRace'])!.value, + // armyRace: this.editForm.get(['armyRace'])!.value, armyPowerLevel: this.editForm.get(['armyPowerLevel'])!.value, armyPoints: this.editForm.get(['armyPoints'])!.value, armyPointsOrPL: this.editForm.get(['armyPointsOrPL'])!.value, requisition: this.editForm.get(['requisition'])!.value, - armyCodexSpecificPoints: this.editForm.get(['armyCodexSpecificPoints'])!.value, + // armyCodexSpecificPoints: this.editForm.get(['armyCodexSpecificPoints'])!.value, battleTally: this.editForm.get(['battleTally'])!.value, battlesWon: this.editForm.get(['battlesWon'])!.value, ownerId: this.editForm.get(['ownerId'])!.value, diff --git a/src/main/webapp/app/shared/model/army.model.ts b/src/main/webapp/app/shared/model/army.model.ts index 1f1c4bf2..ca46d6f6 100644 --- a/src/main/webapp/app/shared/model/army.model.ts +++ b/src/main/webapp/app/shared/model/army.model.ts @@ -5,12 +5,12 @@ export interface IArmy { armyDescription?: any; armyName?: string; armyFaction?: string; - armyRace?: string; + // armyRace?: string; armyPowerLevel?: number; armyPoints?: number; armyPointsOrPL?: boolean; requisition?: number; - armyCodexSpecificPoints?: number; + // armyCodexSpecificPoints?: number; battleTally?: number; battlesWon?: number; ownerLogin?: string; @@ -24,14 +24,14 @@ export class Army implements IArmy { public armyDescription?: any, public armyName?: string, public armyFaction?: string, - public armyRace?: string, + // public armyRace?: string, public armyPowerLevel?: number, public armyPoints?: number, public armyPointsOrPL?: boolean, public ownerId?: number, public ownerLogin?: string, public requisition?: number, - public armyCodexSpecificPoints?: number, + // public armyCodexSpecificPoints?: number, public battleTally?: number, public battlesWon?: number, public units?: IUnitArmy[] From 9a526990ec36c98dc7f16b25f91aef97573e4de9 Mon Sep 17 00:00:00 2001 From: mitch Date: Thu, 3 Mar 2022 22:42:04 -0500 Subject: [PATCH 6/7] Improved unit-detail view adding battle honours, battle scars, and rank --- .../army/army-detail-desktop.component.html | 26 ++++++++++++++----- 1 file changed, 19 insertions(+), 7 deletions(-) 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 a0239731..370550b3 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 @@ -61,21 +61,33 @@
-
CRUSADE CARDS
-
POWER RATING
-
CRUSADE POINTS
+
CRUSADE CARDS
+
RANK
+
POWER RATING
+
BATTLE HONOURS
+
BATTLE SCARS
+
CRUSADE POINTS
ADD TO FORCE
-
Unit {{rowIndex + 1}}:
-
+
+ Unit {{rowIndex + 1}}: {{ unit.unitName }}
-
+
+ {{ unit.rank }} +
+
{{ unit.unitPowerLevel }}
-
{{unit.crusadePointsUnit}}
+
+ {{ unit.battleHonours}} +
+
+ {{ unit.battleScars}} +
+
{{unit.crusadePointsUnit}}
From 12afd915a7d87e772828fd1dcc71cc37d29e4078 Mon Sep 17 00:00:00 2001 From: mitch Date: Thu, 3 Mar 2022 23:43:38 -0500 Subject: [PATCH 7/7] Added support for battlefield role in units --- .../unit-army/unit-army-update.component.html | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/main/webapp/app/entities/unit-army/unit-army-update.component.html b/src/main/webapp/app/entities/unit-army/unit-army-update.component.html index 7f2bdf86..b8764e25 100644 --- a/src/main/webapp/app/entities/unit-army/unit-army-update.component.html +++ b/src/main/webapp/app/entities/unit-army/unit-army-update.component.html @@ -17,6 +17,19 @@ formControlName="unitName"/>
+
+ + +
+