Compare commits
No commits in common. "f03d75d9d830bbfc99b45fcd7009b1f13a411dba" and "df7edc873cbf577e690231ba44b11945ecb5612b" have entirely different histories.
f03d75d9d8
...
df7edc873c
|
@ -5,6 +5,8 @@ Campaign entity
|
|||
## Properties
|
||||
+ _id:`5abd55ea9e30a76bfef747d6` (string, required) - unique id of the campaign
|
||||
+ title: `Ein Kessel Buntes` (string, required) - display title of the campaign
|
||||
+ fractionMappingBlufor: `BLUFOR` (enum[string], required) - mapping for Blufor fraction across the campaign
|
||||
+ fractionMappingOpfor: `OPFOR` (enum[string], required) - mapping for Opfor fraction across the campaign
|
||||
+ timestamp: `2017-05-17T19:44:28.751Z` (string, required) - creation date
|
||||
+ updatedAt: `"2017-05-17T19:44:28.751Z` (string, required) - version date
|
||||
+ __v: 0 (number, required) - version number
|
||||
|
|
|
@ -6,8 +6,6 @@ A war as used in statistics
|
|||
+ title: `Battle No.1` (string, required) - the display neme of the war
|
||||
+ date: `2018-02-24T20:01:25.825Z` (string, required) - war start timestamp
|
||||
+ endDate: `2018-02-24T22:31:26.855Z` (string, required) - war end timestamp
|
||||
+ fractionMappingBlufor: `BLUFOR` (enum[string], required) - display name mapping for Blufor fraction
|
||||
+ fractionMappingOpfor: `OPFOR` (enum[string], required) - display name mapping for Opfor fraction
|
||||
+ ptBlufor: 11 (number, required) - final points fraction Blufor
|
||||
+ ptOpfor: 12 (number, required) - final points fraction Opfor
|
||||
+ playersBlufor: 36 (number, required) - player count of fraction Blufor
|
||||
|
|
|
@ -8,6 +8,16 @@ const CampaignSchema = new Schema({
|
|||
type: String,
|
||||
required: true,
|
||||
},
|
||||
fractionMappingBlufor: {
|
||||
type: String,
|
||||
enum: ['BLUFOR', 'OPFOR', 'ARF', 'SWORD'],
|
||||
default: 'BLUFOR',
|
||||
},
|
||||
fractionMappingOpfor: {
|
||||
type: String,
|
||||
enum: ['BLUFOR', 'OPFOR', 'ARF', 'SWORD'],
|
||||
default: 'OPFOR',
|
||||
},
|
||||
}, {
|
||||
collection: 'campaign',
|
||||
timestamps: {createdAt: 'timestamp'},
|
||||
|
|
|
@ -14,16 +14,6 @@ const WarSchema = new Schema({
|
|||
endDate: {
|
||||
type: Date,
|
||||
},
|
||||
fractionMappingBlufor: {
|
||||
type: String,
|
||||
enum: ['BLUFOR', 'OPFOR', 'ARF', 'SWORD'],
|
||||
default: 'BLUFOR',
|
||||
},
|
||||
fractionMappingOpfor: {
|
||||
type: String,
|
||||
enum: ['BLUFOR', 'OPFOR', 'ARF', 'SWORD'],
|
||||
default: 'OPFOR',
|
||||
},
|
||||
ptBlufor: {
|
||||
type: Number,
|
||||
get: (v) => Math.round(v),
|
||||
|
|
|
@ -37,11 +37,7 @@ decorationRouter.route('/')
|
|||
.get((req, res, next) => {
|
||||
const filter = {};
|
||||
if (req.query.fractFilter) {
|
||||
filter.fraction = {
|
||||
'$in': req.query.fractFilter
|
||||
.toUpperCase()
|
||||
.split(','),
|
||||
};
|
||||
filter.fraction = req.query.fractFilter.toUpperCase();
|
||||
}
|
||||
if (req.query.q) {
|
||||
filter.name = {$regex: req.query.q, $options: 'i'};
|
||||
|
|
|
@ -168,6 +168,7 @@ users.route('/:id')
|
|||
res.locals.items = item;
|
||||
} else {
|
||||
err.status = codes.wrongrequest;
|
||||
console.log(err);
|
||||
err.message += ' in fields: ' + Object.getOwnPropertyNames(err.errors);
|
||||
}
|
||||
|
||||
|
|
|
@ -19,7 +19,8 @@ const {exec} = require('child_process');
|
|||
// cluster mode
|
||||
const cluster = require('cluster');
|
||||
const envWorkerNum = process.env.NODE_WORKER_COUNT;
|
||||
const numWorkers = (envWorkerNum) ? envWorkerNum : 2;
|
||||
const cpuCount = require('os').cpus().length;
|
||||
const numWorkers = (envWorkerNum) ? envWorkerNum : cpuCount;
|
||||
|
||||
// own modules
|
||||
const config = require('./config/config');
|
||||
|
|
|
@ -72,7 +72,7 @@ const parseWarLog = (lineArray, war) => {
|
|||
'Qilin (Unbewaffnet)', 'Qilin (Bewaffnet)', 'Ifrit',
|
||||
'Tempest-Transporter', 'Tempest-Transporter (abgedeckt)', 'Tempest Sanitätsfahrzeug',
|
||||
'Remote Designator [CSAT]', 'UBF Saif',
|
||||
'Quad Bike', 'HuntIR', 'Offroad',
|
||||
'Quad Bike', 'HuntIR',
|
||||
];
|
||||
|
||||
const addPlayerIfNotExists = (inputPlayer, steamUUID) => {
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
[(ngModel)]="appUserSquadId">
|
||||
<option [value]="null">{{'user.submit.field.squad.not.assigned' | translate}}</option>
|
||||
<option *ngFor="let squad of squads" [ngValue]="squad._id">
|
||||
{{squad.fraction == 'BLUFOR'? fraction.ARF : fraction.SWORD}}: {{squad.name}}
|
||||
{{squad.fraction == 'BLUFOR'? fraction.BLUFOR : fraction.OPFOR}}: {{squad.name}}
|
||||
</option>
|
||||
</select>
|
||||
<show-error displayName="{{'user.submit.field.squad' | translate}}" controlPath="squad"></show-error>
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
<a>{{appUser.username}}</a>
|
||||
</span>
|
||||
<br>
|
||||
<small *ngIf="appUser.squad && appUser.squad.fraction == 'OPFOR'">{{fraction.SWORD}} - {{appUser.squad.name}}</small>
|
||||
<small *ngIf="appUser.squad && appUser.squad.fraction == 'BLUFOR'">{{fraction.ARF}} - {{appUser.squad.name}}</small>
|
||||
<small *ngIf="appUser.squad && appUser.squad.fraction == 'OPFOR'">{{fraction.OPFOR}} - {{appUser.squad.name}}</small>
|
||||
<small *ngIf="appUser.squad && appUser.squad.fraction == 'BLUFOR'">{{fraction.BLUFOR}} - {{appUser.squad.name}}</small>
|
||||
<small *ngIf="!appUser.squad">{{'users.list.item.label.no.squad' | translate}}</small>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -35,10 +35,12 @@
|
|||
</div>
|
||||
|
||||
<div class="div-table-row" [style.display]="decoPreviewDisplay" style="margin-top: 5px; margin-bottom:10px">
|
||||
<div class="decoration-preview">
|
||||
<div class="col-sm-1 decoration-preview">
|
||||
<img class="center-block" #decoPreview>
|
||||
</div>
|
||||
<div style="border-radius: 0px 15px 15px 0px; font-style: oblique; padding: 0 10px" #decoDescription>
|
||||
<div class="col-sm-2"
|
||||
style="border-radius: 0px 15px 15px 0px; font-style: oblique" #decoDescription>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -7,7 +7,6 @@ import {DecorationService} from '../../services/army-management/decoration.servi
|
|||
import {UserService} from '../../services/army-management/user.service';
|
||||
import {LoginService} from '../../services/app-user-service/login-service';
|
||||
import {SnackBarService} from '../../services/user-interface/snack-bar/snack-bar.service';
|
||||
import {Fraction} from '../../utils/fraction.enum';
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -48,13 +47,7 @@ export class RequestAwardComponent implements OnInit {
|
|||
this.userService.findUsers({squadId: currentUser.squad._id}).subscribe(users => {
|
||||
this.users = users;
|
||||
});
|
||||
|
||||
const selectableFractions = [
|
||||
(currentUser.squad.fraction === Fraction.BLUFOR) ? Fraction.ARF : Fraction.SWORD,
|
||||
currentUser.squad.fraction
|
||||
];
|
||||
|
||||
this.decorationService.findDecorations('', selectableFractions).subscribe(decorations => {
|
||||
this.decorationService.findDecorations('', currentUser.squad.fraction).subscribe(decorations => {
|
||||
this.decorations = decorations;
|
||||
});
|
||||
}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
export enum Fraction {
|
||||
ARF = 'ARF',
|
||||
COLOR_ARF = '#336699',
|
||||
COLOR_ARF = '#668866',
|
||||
SWORD = 'SWORD',
|
||||
COLOR_SWORD = '#8b8b8b',
|
||||
COLOR_SWORD = '#9499a1',
|
||||
BLUFOR = 'NATO',
|
||||
OPFOR = 'CSAT',
|
||||
COLOR_BLUFOR = '#3c5fa1',
|
||||
|
@ -13,5 +13,5 @@ export enum Fraction {
|
|||
COLOR_OPFOR_DARK = '#890F0F',
|
||||
COLOR_OPFOR_LIGHT = '#fb5555',
|
||||
COLOR_OPFOR_GREY = '#955c5f',
|
||||
COLOR_NEUTRAL = '#222222',
|
||||
COLOR_NEUTRAL = '#666666',
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue