Merge branch 'master' into feature/remote-unused_fields

# Conflicts:
#	src/main/webapp/app/entities/force/force.component.html
This commit is contained in:
mitch 2022-03-05 06:50:40 -05:00
commit 3cd4c617b6
9 changed files with 306 additions and 190 deletions

View File

@ -7,7 +7,6 @@ import {JhiDataUtils} from "ng-jhipster";
selector: 'jhi-army-detail-desktop',
templateUrl: './army-detail-desktop.component.html'
})
// @ts-ignore
export class ArmyDetailDesktopComponent extends ArmyDetailComponent {
constructor(protected dataUtils: JhiDataUtils,
protected activatedRoute: ActivatedRoute) {

View File

@ -7,7 +7,6 @@ import {JhiDataUtils} from "ng-jhipster";
selector: 'jhi-army-detail-mobile',
templateUrl: './army-detail-mobile.html'
})
// @ts-ignore
export class ArmyDetailMobileComponent extends ArmyDetailComponent {
constructor(protected dataUtils: JhiDataUtils,
protected activatedRoute: ActivatedRoute) {

View File

@ -0,0 +1,225 @@
<div class="someMoreStuff" *ngFor="let unitLocal of units">
<div class="unit">
<div class="row">
<div class="col-md-3">
UNIT NAME:
</div>
<div class="col-md-6">
<span>{{ unitLocal.unitName }}</span>
</div>
</div>
<div class="row">
<div class="col-md-3">
BATTLEFIELD ROLE:
</div>
<div class="col-md-6">
{{unitLocal.battlefieldRole}}
</div>
</div>
<div class="row">
<div class="col-md-3">
CRUSADE FACTION:
</div>
<div class="col-md-6">
more information
</div>
</div>
<div class="row">
<div class="col-md-3">
SELECTABLE KEYWORDS:
</div>
<div class="col-md-6">
some more information
</div>
</div>
</div>
<div class="unit" padding-top="20px">
<div class="row">
<div class="col-md-3">
UNIT TYPE:
</div>
<div class="col-md-6">
<span>{{unitLocal.unitBookName}}</span>
</div>
</div>
<div class="row">
<div class="col-md-3">
EQUIPMENT:
</div>
<div class="col-md-6">
<span>{{ unitLocal.equipment }}</span>
</div>
</div>
<div class="row">
<div class="col-md-3">
PSYCHIC POWERS:
</div>
<div class="col-md-6">
<span>{{ unitLocal.psychicPowersTaken }}</span>
</div>
</div>
<div class="row">
<div class="col-md-3">
WARLORD TRAITS:
</div>
<div class="col-md-6">
<span>{{ unitLocal.warlordTraits }}</span>
</div>
</div>
<div class="row">
<div class="col-md-3">
RELICS:
</div>
<div class="col-md-6">
<span>{{ unitLocal.relics }}</span>
</div>
</div>
</div>
<p> Entries below should remain blank when the unit is first added to your Order of Battle. Fill these entries out as you play with the unit and when it has earned any Battle Honours or Battle Scars.</p>
<div class="unit-header" align="center">
COMBAT TALLIES
</div>
<div class="row">
<div class="col-md-2">
<strong>BATTLES PLAYED:</strong>
</div>
<div class="col-3">
<span>{{ unitLocal.battlesPlayed }}</span>
</div>
<div class="col-md-2">
<strong>BATTLES SURVIVED:</strong>
</div>
<div class="col-3">
<span>{{ unitLocal.battlesSurvived }}</span>
</div>
</div>
<div class="unit">
<div class="row">
<div class="col-md-2" style="border: 1px solid black"></div>
<div class="col-md-4" style="border: 1px solid black">
<strong>...During this battle:</strong>
</div>
<div class="col-md-4" style="border: 1px solid black">
<strong>...In total:</strong>
</div>
</div>
<div class="row">
<div class="col-md-2" style="border: 1px solid black">
Enemy units destroyed:
</div>
<div class="col-md-4" style="border: 1px solid black">
<!-- <input type="number" class="form-control" name="enemyUnitsDestroyed"-->
<!-- formControlName="enemyUnitsDestroyed"/>-->
</div>
<div class="col-md-4" style="border: 1px solid black">
{{ unitLocal.enemyUnitsDestroyed }}
</div>
</div>
<div class="row">
<div class="col-md-2" style="border: 1px solid black">
Enemy units destroyed with psychic powers:
</div>
<div class="col-md-4" style="border: 1px solid black">
<!-- <input type="number" class="form-control" name="enemyPsychicDestroyed"-->
<!-- formControlName="enemyPsychicDestroyed"/>-->
</div>
<div class="col-md-4" style="border: 1px solid black">
{{ unitLocal.enemyPsychicDestroyed }}
</div>
</div>
<div class="row">
<div class="col-md-2" style="border: 1px solid black">
Enemy units destroyed with ranged weapons:
</div>
<div class="col-md-4" style="border: 1px solid black">
<!-- <input type="number" class="form-control" name="enemyRangedDestroyed"-->
<!-- formControlName="enemyRangedDestroyed"/>-->
</div>
<div class="col-md-4" style="border: 1px solid black">
{{ unitLocal.enemyRangedDestroyed }}
</div>
</div>
<div class="row">
<div class="col-md-2" style="border: 1px solid black">
Enemy units destroyed with melee weapons:
</div>
<div class="col-md-4" style="border: 1px solid black">
<!-- <input type="number" class="form-control" name="enemyMeleeDestroyed"-->
<!-- formControlName="enemyMeleeDestroyed"/>-->
</div>
<div class="col-md-4" style="border: 1px solid black">
{{ unitLocal.enemyMeleeDestroyed }}
</div>
</div>
<div class="row">
<div class="col-md-2" style="border: 1px solid black">
Agenda 1 tally:
</div>
<div class="col-md-4" style="border: 1px solid black">
<!-- <input type="number" class="form-control" name="agendaOneTally"-->
<!-- formControlName="agendaOneTally"/>-->
</div>
<div class="col-md-4" style="border: 1px solid black">
<span>{{ unitLocal.agendaOneTally }}</span>
</div>
</div>
<div class="row">
<div class="col-md-2" style="border: 1px solid black">
Agenda 2 tally:
</div>
<div class="col-md-4" style="border: 1px solid black">
<!-- <input type="number" class="form-control" name="agendaTwoTally"-->
<!-- formControlName="agendaTwoTally"/>-->
</div>
<div class="col-md-4" style="border: 1px solid black">
<span>{{ unitLocal.agendaTwoTally }}</span>
</div>
</div>
<div class="row">
<div class="col-md-2" style="border: 1px solid black">
Agenda 3 tally:
</div>
<div class="col-md-4" style="border: 1px solid black">
<!-- <input type="number" class="form-control" name="agendaThreeTally"-->
<!-- formControlName="agendaThreeTally"/>-->
</div>
<div class="col-md-4" style="border: 1px solid black">
<span>{{ unitLocal.agendaThreeTally }}</span>
</div>
</div>
</div>
<div class="unit-header" align="center" >
RANK
</div>
<div class="unit-information" align="center">
<span style="color:#ff2b31; font-size: 150%">{{ unitLocal.rank }}</span>
</div>
<div class="row" style="border: 1px solid black" align="center">
Unit background and other information
</div>
<div class="row" style="border: 1px solid black">
<span>{{ unitLocal.unitDescription }}</span>
</div>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
</div>
<div class="row">
<button type="submit"
(click)="previousState()"
class="btn btn-info">
<fa-icon icon="arrow-left"></fa-icon>&nbsp;<span>Back</span>
</button>
<div class="row">
<button type="clear"
(click)="clearList()"
class="btn btn-danger">Clear</button>
</div>
</div>

View File

@ -0,0 +1,15 @@
import {Component} from "@angular/core";
import {ForceComponent} from "./force.component";
import {JhiDataUtils} from "ng-jhipster";
import {ActivatedRoute} from "@angular/router";
import {UnitArmyService} from "../unit-army/unit-army.service";
@Component({
selector: 'jhi-force-desktop',
templateUrl: './force-desktop.component.html'
})
export class ForceDesktopComponent extends ForceComponent {
constructor(protected dataUtils: JhiDataUtils, protected activatedRoute: ActivatedRoute, protected unitArmyService: UnitArmyService) {
super(dataUtils, activatedRoute, unitArmyService);
}
}

View File

@ -0,0 +1,36 @@
<div class="unit-list" *ngFor="let unitLocal of units">
<div class="unit">
<div class="col-md-6-mobile" style="width: 100%; justify-content: center">{{ unitLocal.unitName }}</div>
<br>
<div class="powers" *ngIf="unitLocal.warlordTraits"></div>
<!-- todo do I want this?-->
<div class="powers" *ngIf="unitLocal.psychicPowersTaken"></div>
<!-- todo do I want this?-->
<div class="powers" *ngIf="unitLocal.relics"></div>
<!-- todo do I want this?-->
<div class="powers" *ngIf="unitLocal.battleHonours"></div>
<!-- todo do I want this?-->
<div class="powers" *ngIf="unitLocal.battleScars"></div>
<!-- todo do I want this?-->
<div class="col-md-3-mobile" style="width: 50%">Units Destroyed</div>
<div class="col-md-3-mobile" style="width: 50%">With Psychic</div>
<div class="col-md-3-mobile" style="width: 50%">With Ranged</div>
<div class="col-md-3-mobile" style="width: 50%">With Melee</div>
<div class="col-md-3-mobile" style="width: 50%">Agenda 1</div>
<div class="col-md-3-mobile" style="width: 50%">Agenda 2</div>
<div class="col-md-3-mobile" style="width: 50%">Agenda 3</div>
</div>
</div>
<div class="row">
<button type="submit"
(click)="previousState()"
class="btn btn-info">
<fa-icon icon="arrow-left"></fa-icon>&nbsp;<span>Back</span>
</button>
<div class="row">
<button type="clear"
(click)="clearList()"
class="btn btn-danger">Clear</button>
</div>
</div>

View File

@ -0,0 +1,15 @@
import {Component} from "@angular/core";
import {ForceComponent} from "./force.component";
import {JhiDataUtils} from "ng-jhipster";
import {ActivatedRoute} from "@angular/router";
import {UnitArmyService} from "../unit-army/unit-army.service";
@Component({
selector: 'jhi-force-mobile',
templateUrl: './force-mobile.component.html'
})
export class ForceMobileComponent extends ForceComponent {
constructor(protected dataUtils: JhiDataUtils, protected activatedRoute: ActivatedRoute, protected unitArmyService: UnitArmyService) {
super(dataUtils, activatedRoute, unitArmyService);
}
}

View File

@ -1,189 +1,7 @@
<div class="someMoreStuff" *ngFor="let unitLocal of localUnits">
<div class="unit">
<div class="row">
<div class="col-md-3">
UNIT NAME:
</div>
<div class="col-md-6">
<span>{{ unitLocal.unitName }}</span>
</div>
</div>
<div class="row">
<div class="col-md-3">
BATTLEFIELD ROLE:
</div>
<div class="col-md-6">
{{unitLocal.battlefieldRole}}
</div>
</div>
<div class="row">
<div class="col-md-3">
CRUSADE FACTION:
</div>
<div class="col-md-6">
more information
</div>
</div>
<div class="row">
<div class="col-md-3">
SELECTABLE KEYWORDS:
</div>
<div class="col-md-6">
some more information
</div>
</div>
</div>
<div class="unit" padding-top="20px">
<div class="row">
<div class="col-md-3">
UNIT TYPE:
</div>
<div class="col-md-6">
<span>{{unitLocal.unitBookName}}</span>
</div>
</div>
<div class="row">
<div class="col-md-3">
EQUIPMENT:
</div>
<div class="col-md-6">
<span>{{ unitLocal.equipment }}</span>
</div>
</div>
<div class="row">
<div class="col-md-3">
PSYCHIC POWERS:
</div>
<div class="col-md-6">
<span>{{ unitLocal.psychicPowersTaken }}</span>
</div>
</div>
<div class="row">
<div class="col-md-3">
WARLORD TRAITS:
</div>
<div class="col-md-6">
<span>{{ unitLocal.warlordTraits }}</span>
</div>
</div>
<div class="row">
<div class="col-md-3">
RELICS:
</div>
<div class="col-md-6">
<span>{{ unitLocal.relics }}</span>
</div>
</div>
</div>
<p> Entries below should remain blank when the unit is first added to your Order of Battle. Fill these entries out as you play with the unit and when it has earned any Battle Honours or Battle Scars.</p>
<div class="unit-header" align="center">
COMBAT TALLIES
</div>
<div class="row">
<div class="col-md-2">
<strong>BATTLES PLAYED:</strong>
</div>
<div class="col-3">
<span>{{ unitLocal.battlesPlayed }}</span>
</div>
<div class="col-md-2">
<strong>BATTLES SURVIVED:</strong>
</div>
<div class="col-3">
<span>{{ unitLocal.battlesSurvived }}</span>
</div>
</div>
<div class="unit">
<div class="row">
<div class="col-md-2" style="border: 1px solid black"></div>
<div class="col-md-4" style="border: 1px solid black">
<strong>...During this battle:</strong>
</div>
<div class="col-md-4" style="border: 1px solid black">
<strong>...In total:</strong>
</div>
</div>
<div class="row">
<div class="col-md-2" style="border: 1px solid black">
Enemy units destroyed:
</div>
<div class="col-md-4" style="border: 1px solid black">
<!-- <input type="number" class="form-control" name="enemyUnitsDestroyed"-->
<!-- formControlName="enemyUnitsDestroyed"/>-->
</div>
<div class="col-md-4" style="border: 1px solid black">
{{ unitLocal.enemyUnitsDestroyed }}
</div>
</div>
<div class="row">
<div class="col-md-2" style="border: 1px solid black">
Enemy units destroyed with psychic powers:
</div>
<div class="col-md-4" style="border: 1px solid black">
<!-- <input type="number" class="form-control" name="enemyPsychicDestroyed"-->
<!-- formControlName="enemyPsychicDestroyed"/>-->
</div>
<div class="col-md-4" style="border: 1px solid black">
{{ unitLocal.enemyPsychicDestroyed }}
</div>
</div>
<div class="row">
<div class="col-md-2" style="border: 1px solid black">
Enemy units destroyed with ranged weapons:
</div>
<div class="col-md-4" style="border: 1px solid black">
<!-- <input type="number" class="form-control" name="enemyRangedDestroyed"-->
<!-- formControlName="enemyRangedDestroyed"/>-->
</div>
<div class="col-md-4" style="border: 1px solid black">
{{ unitLocal.enemyRangedDestroyed }}
</div>
</div>
<div class="row">
<div class="col-md-2" style="border: 1px solid black">
Enemy units destroyed with melee weapons:
</div>
<div class="col-md-4" style="border: 1px solid black">
<!-- <input type="number" class="form-control" name="enemyMeleeDestroyed"-->
<!-- formControlName="enemyMeleeDestroyed"/>-->
</div>
<div class="col-md-4" style="border: 1px solid black">
{{ unitLocal.enemyMeleeDestroyed }}
</div>
</div>
</div>
<div class="unit-header" align="center" >
RANK
</div>
<div class="unit-information" align="center">
<span style="color:#ff2b31; font-size: 150%">{{ unitLocal.rank }}</span>
</div>
<div class="row" style="border: 1px solid black" align="center">
Unit background and other information
</div>
<div class="row" style="border: 1px solid black">
<span>{{ unitLocal.unitDescription }}</span>
</div>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<div class="desktop-container" *ngIf="!isMobileResolution; else mobileContainer">
<jhi-force-desktop></jhi-force-desktop>
</div>
<div class="row">
<button type="submit"
(click)="previousState()"
class="btn btn-info">
<fa-icon icon="arrow-left"></fa-icon>&nbsp;<span>Back</span>
</button>
<div class="row">
<button type="clear"
(click)="clearList()"
class="btn btn-danger">Clear</button>
</div>
</div>
<ng-template #mobileContainer>
<jhi-force-mobile></jhi-force-mobile>
</ng-template>

View File

@ -6,6 +6,7 @@ import { JhiDataUtils } from 'ng-jhipster';
import { LocalStorageService } from 'ngx-webstorage';
import { IUnitArmy, UnitArmy } from '../../shared/model/unit-army.model';
import { UnitArmyService } from '../unit-army/unit-army.service';
import {ResponsiveService} from "../../responsive.service";
@Component({
selector: 'jhi-force',
@ -16,11 +17,14 @@ export class ForceComponent implements OnInit {
public forceList: number[];
Iunits?: IUnitArmy[];
units?: UnitArmy[] | null;
public isMobileResolution: boolean;
responsiveService: ResponsiveService = new ResponsiveService();
localUnits: IUnitArmy[] | [];
constructor(protected dataUtils: JhiDataUtils, protected activatedRoute: ActivatedRoute, protected unitArmyService: UnitArmyService) {
const localStorageList = localStorage.getItem('forceAddedListStored');
this.forceList = localStorageList ? JSON.parse(localStorageList) : [];
this.isMobileResolution = this.responsiveService.getMobileStatus();
this.localUnits = [];
}

View File

@ -4,9 +4,14 @@ import { RouterModule } from '@angular/router';
import { CrusadetrackerSharedModule } from 'app/shared/shared.module';
import { ForceComponent } from './force.component';
import { forceRoute } from './force.route';
import {ForceDesktopComponent} from "./force-desktop.component";
import {ForceMobileComponent} from "./force-mobile.component";
@NgModule({
imports: [CrusadetrackerSharedModule, RouterModule.forChild(forceRoute)],
declarations: [ForceComponent],
declarations: [ForceComponent,
ForceDesktopComponent,
ForceMobileComponent
]
})
export class CrusadetrackerForceModule {}