From 794ff6aa2267871d7d406330e21595e9be6ec4d3 Mon Sep 17 00:00:00 2001 From: mitch Date: Fri, 4 Mar 2022 18:59:43 -0500 Subject: [PATCH] removed unused fields from db --- .../java/com/warhammer/domain/UnitArmy.java | 55 +------------------ ...20220304184800_remove_agenda_unit_army.xml | 26 +++++++++ .../resources/config/liquibase/master.xml | 1 + .../app/entities/army/army-detail-mobile.html | 30 +++++++--- .../app/entities/force/force.component.html | 36 ------------ .../unit-army/unit-army-detail.component.html | 36 ------------ .../unit-army/unit-army-detail.component.ts | 6 -- .../unit-army/unit-army-update.component.html | 18 ------ .../unit-army/unit-army-update.component.ts | 9 --- .../unit-army/unit-army.component.html | 3 - .../app/shared/model/unit-army.model.ts | 6 -- src/main/webapp/content/scss/global.scss | 9 +++ .../web/rest/UnitArmyResourceIT.java | 15 ----- 13 files changed, 59 insertions(+), 191 deletions(-) create mode 100644 src/main/resources/config/liquibase/changelog/20220304184800_remove_agenda_unit_army.xml diff --git a/src/main/java/com/warhammer/domain/UnitArmy.java b/src/main/java/com/warhammer/domain/UnitArmy.java index 50604ccd..11c9ac70 100644 --- a/src/main/java/com/warhammer/domain/UnitArmy.java +++ b/src/main/java/com/warhammer/domain/UnitArmy.java @@ -1,11 +1,9 @@ package com.warhammer.domain; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.warhammer.enums.Rank; import javax.persistence.*; -import javax.validation.constraints.*; - +import javax.validation.constraints.NotNull; import java.io.Serializable; /** @@ -40,15 +38,6 @@ public class UnitArmy implements Serializable { @Column(name = "enemy_psychic_destroyed") private Integer enemyPsychicDestroyed; - @Column(name = "agenda_one_tally") - private Long agendaOneTally; - - @Column(name = "agenda_two_tally") - private Long agendaTwoTally; - - @Column(name = "agenda_three_tally") - private Long agendaThreeTally; - @Column(name = "equipment") private String equipment; @@ -177,45 +166,6 @@ public class UnitArmy implements Serializable { this.enemyMeleeDestroyed = enemyMeleeDestroyed; } - public Long getAgendaOneTally() { - return agendaOneTally; - } - - public UnitArmy agendaOneTally(Long agendaOneTally) { - this.agendaOneTally = agendaOneTally; - return this; - } - - public void setAgendaOneTally(Long agendaOneTally) { - this.agendaOneTally = agendaOneTally; - } - - public Long getAgendaTwoTally() { - return agendaTwoTally; - } - - public UnitArmy agendaTwoTally(Long agendaTwoTally) { - this.agendaTwoTally = agendaTwoTally; - return this; - } - - public void setAgendaTwoTally(Long agendaTwoTally) { - this.agendaTwoTally = agendaTwoTally; - } - - public Long getAgendaThreeTally() { - return agendaThreeTally; - } - - public UnitArmy agendaThreeTally(Long agendaThreeTally) { - this.agendaThreeTally = agendaThreeTally; - return this; - } - - public void setAgendaThreeTally(Long agendaThreeTally) { - this.agendaThreeTally = agendaThreeTally; - } - public String getEquipment() { return equipment; } @@ -482,9 +432,6 @@ public class UnitArmy implements Serializable { ", enemyPsychicDestroyed=" + getEnemyPsychicDestroyed() + ", enemyRangedDestroyed=" + getEnemyRangedDestroyed() + ", enemyMeleeDestroyed=" + getEnemyMeleeDestroyed() + - ", agendaOneTally=" + getAgendaOneTally() + - ", agendaTwoTally=" + getAgendaTwoTally() + - ", agendaThreeTally=" + getAgendaThreeTally() + ", equipment='" + getEquipment() + "'" + ", psychicPowersTaken='" + getPsychicPowersTaken() + "'" + ", warlordTraits='" + getWarlordTraits() + "'" + diff --git a/src/main/resources/config/liquibase/changelog/20220304184800_remove_agenda_unit_army.xml b/src/main/resources/config/liquibase/changelog/20220304184800_remove_agenda_unit_army.xml new file mode 100644 index 00000000..e68d2c47 --- /dev/null +++ b/src/main/resources/config/liquibase/changelog/20220304184800_remove_agenda_unit_army.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/config/liquibase/master.xml b/src/main/resources/config/liquibase/master.xml index 2534f1e9..38da8746 100644 --- a/src/main/resources/config/liquibase/master.xml +++ b/src/main/resources/config/liquibase/master.xml @@ -23,6 +23,7 @@ + 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 1607a9f3..ee5e82ee 100644 --- a/src/main/webapp/app/entities/army/army-detail-mobile.html +++ b/src/main/webapp/app/entities/army/army-detail-mobile.html @@ -35,15 +35,17 @@ -
-
-
Name
-
PL
-
CP
-
-
-
+ +
+
+
+
Name
+
PL
+
CP
+
+
+
@@ -55,6 +57,18 @@ >BTN
+
+
Battle Honours
+
+
+
{{unit.battleHonours}}
+
+
+
Battle Scars
+
+
+
{{unit.battleScars}}
+
-
-
- Agenda 1 tally: -
-
- - -
-
- {{ unitLocal.agendaOneTally }} -
-
-
-
- Agenda 2 tally: -
-
- - -
-
- {{ unitLocal.agendaTwoTally }} -
-
-
-
- Agenda 3 tally: -
-
- - -
-
- {{ unitLocal.agendaThreeTally }} -
-
RANK diff --git a/src/main/webapp/app/entities/unit-army/unit-army-detail.component.html b/src/main/webapp/app/entities/unit-army/unit-army-detail.component.html index 1a115799..dc04728f 100644 --- a/src/main/webapp/app/entities/unit-army/unit-army-detail.component.html +++ b/src/main/webapp/app/entities/unit-army/unit-army-detail.component.html @@ -162,42 +162,6 @@ {{ unitArmy.enemyMeleeDestroyed }}
-
-
- Agenda 1 tally: -
-
- - -
-
- {{ unitArmy.agendaOneTally }} -
-
-
-
- Agenda 2 tally: -
-
- - -
-
- {{ unitArmy.agendaTwoTally }} -
-
-
-
- Agenda 3 tally: -
-
- - -
-
- {{ unitArmy.agendaThreeTally }} -
-
RANK diff --git a/src/main/webapp/app/entities/unit-army/unit-army-detail.component.ts b/src/main/webapp/app/entities/unit-army/unit-army-detail.component.ts index c492d245..48f967cb 100644 --- a/src/main/webapp/app/entities/unit-army/unit-army-detail.component.ts +++ b/src/main/webapp/app/entities/unit-army/unit-army-detail.component.ts @@ -88,9 +88,6 @@ export class UnitArmyDetailComponent implements OnInit { enemyPsychicDestroyed: unitArmy.enemyPsychicDestroyed, enemyRangedDestroyed: unitArmy.enemyRangedDestroyed, enemyMeleeDestroyed: unitArmy.enemyMeleeDestroyed, - agendaOneTally: unitArmy.agendaOneTally, - agendaTwoTally: unitArmy.agendaTwoTally, - agendaThreeTally: unitArmy.agendaThreeTally, equipment: unitArmy.equipment, psychicPowersTaken: unitArmy.psychicPowersTaken, warlordTraits: unitArmy.warlordTraits, @@ -136,9 +133,6 @@ export class UnitArmyDetailComponent implements OnInit { enemyPsychicDestroyed: this.editForm.get(['enemyPsychicDestroyed'])!.value, enemyRangedDestroyed: this.editForm.get(['enemyRangedDestroyed'])!.value, enemyMeleeDestroyed: this.editForm.get(['enemyMeleeDestroyed'])!.value, - agendaOneTally: this.editForm.get(['agendaOneTally'])!.value, - agendaTwoTally: this.editForm.get(['agendaTwoTally'])!.value, - agendaThreeTally: this.editForm.get(['agendaThreeTally'])!.value, equipment: this.editForm.get(['equipment'])!.value, psychicPowersTaken: this.editForm.get(['psychicPowersTaken'])!.value, warlordTraits: this.editForm.get(['warlordTraits'])!.value, 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 b8764e25..b99271df 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 @@ -72,24 +72,6 @@ formControlName="enemyMeleeDestroyed"/>
-
- - -
- -
- - -
- -
- - -
-
{{ unitArmy.enemyPsychicDestroyed }} {{ unitArmy.enemyRangedDestroyed }} {{ unitArmy.enemyMeleeDestroyed }} - {{ unitArmy.agendaOneTally }} - {{ unitArmy.agendaTwoTally }} - {{ unitArmy.agendaThreeTally }} {{ unitArmy.equipment }} {{ unitArmy.psychicPowersTaken }} {{ unitArmy.warlordTraits }} diff --git a/src/main/webapp/app/shared/model/unit-army.model.ts b/src/main/webapp/app/shared/model/unit-army.model.ts index ae006fdc..031e0f69 100644 --- a/src/main/webapp/app/shared/model/unit-army.model.ts +++ b/src/main/webapp/app/shared/model/unit-army.model.ts @@ -11,9 +11,6 @@ export interface IUnitArmy { enemyPsychicDestroyed?: number; enemyRangedDestroyed?: number; enemyMeleeDestroyed?: number; - agendaOneTally?: number; - agendaTwoTally?: number; - agendaThreeTally?: number; equipment?: string; psychicPowersTaken?: string; warlordTraits?: string; @@ -42,9 +39,6 @@ export class UnitArmy implements IUnitArmy { public enemyPsychicDestroyed?: number, public enemyRangedDestroyed?: number, public enemyMeleeDestroyed?: number, - public agendaOneTally?: number, - public agendaTwoTally?: number, - public agendaThreeTally?: number, public equipment?: string, public psychicPowersTaken?: string, public warlordTraits?: string, diff --git a/src/main/webapp/content/scss/global.scss b/src/main/webapp/content/scss/global.scss index 5f060599..0f68be78 100644 --- a/src/main/webapp/content/scss/global.scss +++ b/src/main/webapp/content/scss/global.scss @@ -209,6 +209,15 @@ entity detail page css border: 1px solid black; } +.col-md-6-mobile-header { + padding: 2px; + width: 60px; + font-weight: bold; + background-color: whitesmoke; + color: black; + border: 1px solid black; +} + .unit { padding: 8px; border-bottom: 1px solid #dddddd; diff --git a/src/test/java/com/warhammer/web/rest/UnitArmyResourceIT.java b/src/test/java/com/warhammer/web/rest/UnitArmyResourceIT.java index 6cd3e32d..a2a7d4e4 100644 --- a/src/test/java/com/warhammer/web/rest/UnitArmyResourceIT.java +++ b/src/test/java/com/warhammer/web/rest/UnitArmyResourceIT.java @@ -131,9 +131,6 @@ public class UnitArmyResourceIT { .enemyUnitsDestroyed(DEFAULT_ENEMY_UNITS_DESTROYED) .enemyRangedDestroyed(DEFAULT_ENEMY_RANGED_DESTROYED) .enemyMeleeDestroyed(DEFAULT_ENEMY_MELEE_DESTROYED) - .agendaOneTally(DEFAULT_AGENDA_ONE_TALLY) - .agendaTwoTally(DEFAULT_AGENDA_TWO_TALLY) - .agendaThreeTally(DEFAULT_AGENDA_THREE_TALLY) .equipment(DEFAULT_EQUIPMENT) .psychicPowersTaken(DEFAULT_PSYCHIC_POWERS_TAKEN) .warlordTraits(DEFAULT_WARLORD_TRAITS) @@ -174,9 +171,6 @@ public class UnitArmyResourceIT { .enemyUnitsDestroyed(UPDATED_ENEMY_UNITS_DESTROYED) .enemyRangedDestroyed(UPDATED_ENEMY_RANGED_DESTROYED) .enemyMeleeDestroyed(UPDATED_ENEMY_MELEE_DESTROYED) - .agendaOneTally(UPDATED_AGENDA_ONE_TALLY) - .agendaTwoTally(UPDATED_AGENDA_TWO_TALLY) - .agendaThreeTally(UPDATED_AGENDA_THREE_TALLY) .equipment(UPDATED_EQUIPMENT) .psychicPowersTaken(UPDATED_PSYCHIC_POWERS_TAKEN) .warlordTraits(UPDATED_WARLORD_TRAITS) @@ -230,9 +224,6 @@ public class UnitArmyResourceIT { assertThat(testUnitArmy.getEnemyUnitsDestroyed()).isEqualTo(DEFAULT_ENEMY_UNITS_DESTROYED); assertThat(testUnitArmy.getEnemyRangedDestroyed()).isEqualTo(DEFAULT_ENEMY_RANGED_DESTROYED); assertThat(testUnitArmy.getEnemyMeleeDestroyed()).isEqualTo(DEFAULT_ENEMY_MELEE_DESTROYED); - assertThat(testUnitArmy.getAgendaOneTally()).isEqualTo(DEFAULT_AGENDA_ONE_TALLY); - assertThat(testUnitArmy.getAgendaTwoTally()).isEqualTo(DEFAULT_AGENDA_TWO_TALLY); - assertThat(testUnitArmy.getAgendaThreeTally()).isEqualTo(DEFAULT_AGENDA_THREE_TALLY); assertThat(testUnitArmy.getEquipment()).isEqualTo(DEFAULT_EQUIPMENT); assertThat(testUnitArmy.getPsychicPowersTaken()).isEqualTo(DEFAULT_PSYCHIC_POWERS_TAKEN); assertThat(testUnitArmy.getWarlordTraits()).isEqualTo(DEFAULT_WARLORD_TRAITS); @@ -369,9 +360,6 @@ public class UnitArmyResourceIT { .enemyUnitsDestroyed(UPDATED_ENEMY_UNITS_DESTROYED) .enemyRangedDestroyed(UPDATED_ENEMY_RANGED_DESTROYED) .enemyMeleeDestroyed(UPDATED_ENEMY_MELEE_DESTROYED) - .agendaOneTally(UPDATED_AGENDA_ONE_TALLY) - .agendaTwoTally(UPDATED_AGENDA_TWO_TALLY) - .agendaThreeTally(UPDATED_AGENDA_THREE_TALLY) .equipment(UPDATED_EQUIPMENT) .psychicPowersTaken(UPDATED_PSYCHIC_POWERS_TAKEN) .warlordTraits(UPDATED_WARLORD_TRAITS) @@ -402,9 +390,6 @@ public class UnitArmyResourceIT { assertThat(testUnitArmy.getEnemyUnitsDestroyed()).isEqualTo(UPDATED_ENEMY_UNITS_DESTROYED); assertThat(testUnitArmy.getEnemyRangedDestroyed()).isEqualTo(UPDATED_ENEMY_RANGED_DESTROYED); assertThat(testUnitArmy.getEnemyMeleeDestroyed()).isEqualTo(UPDATED_ENEMY_MELEE_DESTROYED); - assertThat(testUnitArmy.getAgendaOneTally()).isEqualTo(UPDATED_AGENDA_ONE_TALLY); - assertThat(testUnitArmy.getAgendaTwoTally()).isEqualTo(UPDATED_AGENDA_TWO_TALLY); - assertThat(testUnitArmy.getAgendaThreeTally()).isEqualTo(UPDATED_AGENDA_THREE_TALLY); assertThat(testUnitArmy.getEquipment()).isEqualTo(UPDATED_EQUIPMENT); assertThat(testUnitArmy.getPsychicPowersTaken()).isEqualTo(UPDATED_PSYCHIC_POWERS_TAKEN); assertThat(testUnitArmy.getWarlordTraits()).isEqualTo(UPDATED_WARLORD_TRAITS);