Added battles tied tally
This commit is contained in:
parent
aa721c5a55
commit
f954180b1d
@ -56,6 +56,9 @@ public class Army implements Serializable {
|
|||||||
@Column(name = "battles_won")
|
@Column(name = "battles_won")
|
||||||
private Long battlesWon;
|
private Long battlesWon;
|
||||||
|
|
||||||
|
@Column(name = "battles_tied")
|
||||||
|
private Long battlesTied;
|
||||||
|
|
||||||
@ManyToOne(optional = false)
|
@ManyToOne(optional = false)
|
||||||
@NotNull
|
@NotNull
|
||||||
@JsonIgnoreProperties(value = "armies", allowSetters = true)
|
@JsonIgnoreProperties(value = "armies", allowSetters = true)
|
||||||
@ -230,6 +233,20 @@ public class Army implements Serializable {
|
|||||||
this.battlesWon = battlesWon;
|
this.battlesWon = battlesWon;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Long getBattlesTied() {
|
||||||
|
return battlesTied;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Army battlesTied(Long battlesTied) {
|
||||||
|
this.battlesTied = battlesTied;
|
||||||
|
return this;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBattlesTied(Long battlesTied) {
|
||||||
|
this.battlesTied = battlesTied;
|
||||||
|
}
|
||||||
|
|
||||||
// public Long getCodexSpecificPoints() {
|
// public Long getCodexSpecificPoints() {
|
||||||
// return codexSpecificPoints;
|
// return codexSpecificPoints;
|
||||||
// }
|
// }
|
||||||
@ -278,6 +295,7 @@ public class Army implements Serializable {
|
|||||||
// ", armyCodexSpecificPoints=" + getCodexSpecificPoints() +
|
// ", armyCodexSpecificPoints=" + getCodexSpecificPoints() +
|
||||||
", battleTally=" + getBattleTally() +
|
", battleTally=" + getBattleTally() +
|
||||||
", battlesWon=" + getBattlesWon() +
|
", battlesWon=" + getBattlesWon() +
|
||||||
|
", battlesTied=" + getBattlesTied() +
|
||||||
"}";
|
"}";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,11 +2,10 @@ package com.warhammer.service.dto;
|
|||||||
|
|
||||||
import com.warhammer.domain.UnitArmy;
|
import com.warhammer.domain.UnitArmy;
|
||||||
|
|
||||||
import javax.persistence.Column;
|
import javax.persistence.Lob;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.NotNull;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import javax.persistence.Lob;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A DTO for the {@link com.warhammer.domain.Army} entity.
|
* A DTO for the {@link com.warhammer.domain.Army} entity.
|
||||||
@ -39,6 +38,8 @@ public class ArmyDTO implements Serializable {
|
|||||||
|
|
||||||
private Long battlesWon;
|
private Long battlesWon;
|
||||||
|
|
||||||
|
private Long battlesTied;
|
||||||
|
|
||||||
private Set<UnitArmy> units;
|
private Set<UnitArmy> units;
|
||||||
|
|
||||||
public Long getId() {
|
public Long getId() {
|
||||||
@ -121,6 +122,14 @@ public class ArmyDTO implements Serializable {
|
|||||||
this.battlesWon = battlesWon;
|
this.battlesWon = battlesWon;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Long getBattlesTied() {
|
||||||
|
return battlesTied;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBattlesTied(Long battlesTied) {
|
||||||
|
this.battlesTied = battlesTied;
|
||||||
|
}
|
||||||
|
|
||||||
public String getOwnerLogin() {
|
public String getOwnerLogin() {
|
||||||
return ownerLogin;
|
return ownerLogin;
|
||||||
}
|
}
|
||||||
@ -177,6 +186,7 @@ public class ArmyDTO implements Serializable {
|
|||||||
", requisition=" + getRequisition() +
|
", requisition=" + getRequisition() +
|
||||||
", battleTally=" + getBattleTally() +
|
", battleTally=" + getBattleTally() +
|
||||||
", battlesWon=" + getBattlesWon() +
|
", battlesWon=" + getBattlesWon() +
|
||||||
|
", battlesTied=" + getBattlesTied() +
|
||||||
", ownerId=" + getOwnerId() +
|
", ownerId=" + getOwnerId() +
|
||||||
", ownerLogin='" + getOwnerLogin() + "'" +
|
", ownerLogin='" + getOwnerLogin() + "'" +
|
||||||
", units='" + getUnits() +
|
", units='" + getUnits() +
|
||||||
|
@ -0,0 +1,22 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<databaseChangeLog
|
||||||
|
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
|
||||||
|
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.9.xsd
|
||||||
|
http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd">
|
||||||
|
|
||||||
|
<property name="autoIncrement" value="true"/>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Update the entity UnitArmy.
|
||||||
|
to remove entity UnitBase
|
||||||
|
-->
|
||||||
|
<changeSet id="20200727033716_added_entity_Army.xml-1" author="mitch" runOnChange="true">
|
||||||
|
<addColumn tableName="army">
|
||||||
|
<column name="battles_tied" type="bigint">
|
||||||
|
<constraints nullable="true" />
|
||||||
|
</column>
|
||||||
|
</addColumn>
|
||||||
|
</changeSet>
|
||||||
|
</databaseChangeLog>
|
@ -24,6 +24,8 @@
|
|||||||
<include file="config/liquibase/changelog/20210808083300_add_codex_points.xml" relativeToChangelogFile="false"/>
|
<include file="config/liquibase/changelog/20210808083300_add_codex_points.xml" relativeToChangelogFile="false"/>
|
||||||
<include file="config/liquibase/changelog/20210808130500_add_army_race.xml" relativeToChangelogFile="false"/>
|
<include file="config/liquibase/changelog/20210808130500_add_army_race.xml" relativeToChangelogFile="false"/>
|
||||||
<include file="config/liquibase/changelog/20220304184800_remove_agenda_unit_army.xml" relativeToChangelogFile="false"/>
|
<include file="config/liquibase/changelog/20220304184800_remove_agenda_unit_army.xml" relativeToChangelogFile="false"/>
|
||||||
|
<include file="config/liquibase/changelog/20220313104800_remove_unused_kill_tally.xml" relativeToChangelogFile="false"/>
|
||||||
|
<include file="config/liquibase/changelog/20220315083700_add_tie_tally.xml" relativeToChangelogFile="false"/>
|
||||||
<!-- jhipster-needle-liquibase-add-constraints-changelog - JHipster will add liquibase constraints changelogs here -->
|
<!-- jhipster-needle-liquibase-add-constraints-changelog - JHipster will add liquibase constraints changelogs here -->
|
||||||
<!-- jhipster-needle-liquibase-add-incremental-changelog - JHipster will add incremental liquibase changelogs here -->
|
<!-- jhipster-needle-liquibase-add-incremental-changelog - JHipster will add incremental liquibase changelogs here -->
|
||||||
</databaseChangeLog>
|
</databaseChangeLog>
|
||||||
|
@ -35,16 +35,18 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-2" style="border: 1px solid black; color: whitesmoke; background-color: #2d2d2d;">BATTLE TALLY</div>
|
<div class="col-md-1" style="border: 1px solid black; color: whitesmoke; background-color: #2d2d2d;">BATTLE TALLY</div>
|
||||||
<div class="col-md-2" style="border: 1px solid black; color: whitesmoke; background-color: #2d2d2d;">BATTLES WON</div>
|
<div class="col-md-1" style="border: 1px solid black; color: whitesmoke; background-color: #2d2d2d;">BATTLES WON</div>
|
||||||
|
<div class="col-md-1" style="border: 1px solid black; color: whitesmoke; background-color: #2d2d2d;">BATTLES TIED</div>
|
||||||
<div class="col-md-2" style="border: 1px solid black; color: whitesmoke; background-color: #2d2d2d;">REQUISITION POINTS</div>
|
<div class="col-md-2" style="border: 1px solid black; color: whitesmoke; background-color: #2d2d2d;">REQUISITION POINTS</div>
|
||||||
<div class="col-md-2" style="border: 1px solid black; color: whitesmoke; background-color: #2d2d2d;">SUPPLY USED</div>
|
<div class="col-md-2" style="border: 1px solid black; color: whitesmoke; background-color: #2d2d2d;">SUPPLY USED</div>
|
||||||
<div class="col-md-2" style="border: 1px solid black; color: whitesmoke; background-color: #2d2d2d;">SUPPLY LIMIT</div>
|
<div class="col-md-2" style="border: 1px solid black; color: whitesmoke; background-color: #2d2d2d;">SUPPLY LIMIT</div>
|
||||||
<div class="col-md-2" style="border: 1px solid black; color: whitesmoke; background-color: #2d2d2d;">FORCE POINTS</div>
|
<div class="col-md-2" style="border: 1px solid black; color: whitesmoke; background-color: #2d2d2d;">FORCE POINTS</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-2" style="border: 1px solid black;">{{ army.battleTally }}</div>
|
<div class="col-md-1" style="border: 1px solid black;">{{ army.battleTally }}</div>
|
||||||
<div class="col-md-2" style="border: 1px solid black;">{{ army.battlesWon }}</div>
|
<div class="col-md-1" style="border: 1px solid black;">{{ army.battlesWon }}</div>
|
||||||
|
<div class="col-md-1" style="border: 1px solid black;">{{ army.battlesTied }}</div>
|
||||||
<div class="col-md-2" style="border: 1px solid black; background: whitesmoke; color: #0f0f0f;">
|
<div class="col-md-2" style="border: 1px solid black; background: whitesmoke; color: #0f0f0f;">
|
||||||
{{ army.requisition }}
|
{{ army.requisition }}
|
||||||
</div>
|
</div>
|
||||||
|
@ -21,6 +21,10 @@
|
|||||||
<div class="col-md-3-mobile">Victory</div>
|
<div class="col-md-3-mobile">Victory</div>
|
||||||
<div class="col-md-6-mobile">{{army.battlesWon}}</div>
|
<div class="col-md-6-mobile">{{army.battlesWon}}</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-3-mobile">Tied</div>
|
||||||
|
<div class="col-md-6-mobile">{{army.battlesTied}}</div>
|
||||||
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-3-mobile">RP:</div>
|
<div class="col-md-3-mobile">RP:</div>
|
||||||
<div class="col-md-6-mobile">{{army.requisition}}</div>
|
<div class="col-md-6-mobile">{{army.requisition}}</div>
|
||||||
|
@ -71,6 +71,12 @@
|
|||||||
formControlName="battlesWon"/>
|
formControlName="battlesWon"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="form-control-label" for="field_battlesTied">battleTied</label>
|
||||||
|
<input type="number" class="form-control" name="battlesTied" id="field_battlesTied"
|
||||||
|
formControlName="battlesTied"/>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="form-control-label" for="field_owner">Owner</label>
|
<label class="form-control-label" for="field_owner">Owner</label>
|
||||||
<select class="form-control" id="field_owner" name="owner" formControlName="ownerId">
|
<select class="form-control" id="field_owner" name="owner" formControlName="ownerId">
|
||||||
|
@ -32,6 +32,7 @@ export class ArmyUpdateComponent implements OnInit {
|
|||||||
// armyCodexSpecificPoints: [],
|
// armyCodexSpecificPoints: [],
|
||||||
battleTally: [],
|
battleTally: [],
|
||||||
battlesWon: [],
|
battlesWon: [],
|
||||||
|
battlesTied: [],
|
||||||
ownerId: [null, Validators.required],
|
ownerId: [null, Validators.required],
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -65,6 +66,7 @@ export class ArmyUpdateComponent implements OnInit {
|
|||||||
// armyCodexSpecificPoints: army.armyCodexSpecificPoints,
|
// armyCodexSpecificPoints: army.armyCodexSpecificPoints,
|
||||||
battleTally: army.battleTally,
|
battleTally: army.battleTally,
|
||||||
battlesWon: army.battlesWon,
|
battlesWon: army.battlesWon,
|
||||||
|
battlesTied: army.battlesTied,
|
||||||
ownerId: army.ownerId,
|
ownerId: army.ownerId,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -114,6 +116,7 @@ export class ArmyUpdateComponent implements OnInit {
|
|||||||
// armyCodexSpecificPoints: this.editForm.get(['armyCodexSpecificPoints'])!.value,
|
// armyCodexSpecificPoints: this.editForm.get(['armyCodexSpecificPoints'])!.value,
|
||||||
battleTally: this.editForm.get(['battleTally'])!.value,
|
battleTally: this.editForm.get(['battleTally'])!.value,
|
||||||
battlesWon: this.editForm.get(['battlesWon'])!.value,
|
battlesWon: this.editForm.get(['battlesWon'])!.value,
|
||||||
|
battlesTied: this.editForm.get(['battlesTied'])!.value,
|
||||||
ownerId: this.editForm.get(['ownerId'])!.value,
|
ownerId: this.editForm.get(['ownerId'])!.value,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -48,6 +48,7 @@
|
|||||||
<td>{{ army.requisition }}</td>
|
<td>{{ army.requisition }}</td>
|
||||||
<td>{{ army.battleTally }}</td>
|
<td>{{ army.battleTally }}</td>
|
||||||
<td>{{ army.battlesWon }}</td>
|
<td>{{ army.battlesWon }}</td>
|
||||||
|
<td>{{ army.battlesTied }}</td>
|
||||||
<td>
|
<td>
|
||||||
{{ army.ownerLogin }}
|
{{ army.ownerLogin }}
|
||||||
</td>
|
</td>
|
||||||
|
@ -13,6 +13,7 @@ export interface IArmy {
|
|||||||
// armyCodexSpecificPoints?: number;
|
// armyCodexSpecificPoints?: number;
|
||||||
battleTally?: number;
|
battleTally?: number;
|
||||||
battlesWon?: number;
|
battlesWon?: number;
|
||||||
|
battlesTied?: number;
|
||||||
ownerLogin?: string;
|
ownerLogin?: string;
|
||||||
ownerId?: number;
|
ownerId?: number;
|
||||||
units?: IUnitArmy[];
|
units?: IUnitArmy[];
|
||||||
@ -34,6 +35,7 @@ export class Army implements IArmy {
|
|||||||
// public armyCodexSpecificPoints?: number,
|
// public armyCodexSpecificPoints?: number,
|
||||||
public battleTally?: number,
|
public battleTally?: number,
|
||||||
public battlesWon?: number,
|
public battlesWon?: number,
|
||||||
|
public battlesTied?: number,
|
||||||
public units?: IUnitArmy[]
|
public units?: IUnitArmy[]
|
||||||
) {
|
) {
|
||||||
this.armyPointsOrPL = this.armyPointsOrPL || false;
|
this.armyPointsOrPL = this.armyPointsOrPL || false;
|
||||||
|
Loading…
Reference in New Issue
Block a user