Compare commits
No commits in common. "a3df38263ed0a4293c194d4c710cc72813553c38" and "e96f07a7fb481d9f4bcbbb6cb1f5be77ad45811c" have entirely different histories.
a3df38263e
...
e96f07a7fb
|
@ -31,7 +31,7 @@ decoration.route('/')
|
||||||
if (req.query.q) {
|
if (req.query.q) {
|
||||||
filter.name = {$regex: req.query.q, $options: 'i'}
|
filter.name = {$regex: req.query.q, $options: 'i'}
|
||||||
}
|
}
|
||||||
DecorationModel.find(filter, {}, {sort: {fraction: 'asc', isMedal: 'asc', sortingNumber: 'asc', name: 'asc'}}, (err, items) => {
|
DecorationModel.find(filter, {}, {sort: {fraction: 'asc', sortingNumber: 'asc', name: 'asc'}}, (err, items) => {
|
||||||
if (err) {
|
if (err) {
|
||||||
err.status = codes.servererror;
|
err.status = codes.servererror;
|
||||||
return next(err);
|
return next(err);
|
||||||
|
|
|
@ -56,9 +56,7 @@ users.route('/')
|
||||||
if (!nameQuery || (nameQuery && user.username.toLowerCase().includes(nameQuery.toLowerCase()))) {
|
if (!nameQuery || (nameQuery && user.username.toLowerCase().includes(nameQuery.toLowerCase()))) {
|
||||||
getExtendedUser(user, next, (extUser) => {
|
getExtendedUser(user, next, (extUser) => {
|
||||||
// filter by fraction
|
// filter by fraction
|
||||||
if (!fractionFilter ||
|
if (!fractionFilter || (fractionFilter && extUser.squad && extUser.squad.fraction.toLowerCase() === fractionFilter)) {
|
||||||
(fractionFilter && extUser.squad && extUser.squad.fraction.toLowerCase() === fractionFilter) ||
|
|
||||||
(fractionFilter && fractionFilter === 'unassigned' && !extUser.squad)) {
|
|
||||||
resUsers.push(extUser);
|
resUsers.push(extUser);
|
||||||
} else {
|
} else {
|
||||||
rowsLength -= 1;
|
rowsLength -= 1;
|
||||||
|
@ -176,7 +174,7 @@ users.route('/:id')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
.put(apiAuthenticationMiddleware, (req, res, next) => {
|
.put(apiAuthenticationMiddleware, (req, res,next) => {
|
||||||
// first check that the given element id is the same as the URL id
|
// first check that the given element id is the same as the URL id
|
||||||
if (!req.body || req.body._id !== req.params.id) {
|
if (!req.body || req.body._id !== req.params.id) {
|
||||||
// the URL does not fit the given element
|
// the URL does not fit the given element
|
||||||
|
|
|
@ -11,12 +11,9 @@
|
||||||
"postinstall": "npm install --prefix ./static && npm install --prefix ./api",
|
"postinstall": "npm install --prefix ./static && npm install --prefix ./api",
|
||||||
"mongodb": "mongod --dbpath ./mongodb-data",
|
"mongodb": "mongod --dbpath ./mongodb-data",
|
||||||
"test": "npm test --prefix ./api",
|
"test": "npm test --prefix ./api",
|
||||||
"e2e": "npm run deploy-static && concurrently \"npm run e2e --prefix ./api\" \"$(npm bin)/wait-on -t 60000 http://localhost:3001/ && npm run e2e --prefix ./static\" --success first --kill-others",
|
"e2e": "npm run deploy-static && concurrently \"npm run e2e --prefix ./api\" \"npm run e2e --prefix ./static\""
|
||||||
"start-e2e": "npm run deploy-static && npm run e2e --prefix ./api",
|
|
||||||
"test-e2e": "npm run e2e --prefix ./static"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"concurrently": "^3.4.0",
|
"concurrently": "^3.4.0"
|
||||||
"wait-on": "^2.0.2"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,14 +20,6 @@
|
||||||
#fractRadioOpfor
|
#fractRadioOpfor
|
||||||
(change)="filterSquadsByFraction(query.value, fractRadioOpfor.value)">CSAT
|
(change)="filterSquadsByFraction(query.value, fractRadioOpfor.value)">CSAT
|
||||||
</label>
|
</label>
|
||||||
<br>
|
|
||||||
<label class="radio-inline" style="padding-top: 8px;">
|
|
||||||
<input type="radio" name="fractSelect" value="global"
|
|
||||||
[(ngModel)]="fractionRadioSelect"
|
|
||||||
#fractRadioGlobal
|
|
||||||
(change)="filterSquadsByFraction(query.value, fractRadioGlobal.value)">Global
|
|
||||||
</label>
|
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
<a class="pull-right btn btn-success" (click)="openNewSquadForm()">
|
<a class="pull-right btn btn-success" (click)="openNewSquadForm()">
|
||||||
Neue Auszeichnung hinzufügen
|
Neue Auszeichnung hinzufügen
|
||||||
|
|
|
@ -25,10 +25,10 @@
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
border-left: thin solid lightgrey;
|
border-left: thin solid lightgrey;
|
||||||
padding: 20px 0 0 50px;
|
padding-left: 50px;
|
||||||
|
padding-top: 20px;
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
bottom: 10px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.form-group {
|
.form-group {
|
||||||
|
@ -36,7 +36,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
h3 {
|
h3 {
|
||||||
margin: 80px 0 20px -20px;
|
margin-bottom: 20px;
|
||||||
|
margin-left: -20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
label {
|
label {
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
required
|
required
|
||||||
style="min-width: 200px;">
|
style="min-width: 200px;">
|
||||||
<option *ngFor="let deco of decorations" [value]="deco._id">
|
<option *ngFor="let deco of decorations" [value]="deco._id">
|
||||||
{{deco.fraction == 'BLUFOR'? 'NATO' : deco.fraction == 'OPFOR'? 'CSAT' : 'Global'}}: {{deco.name}}
|
{{deco.fraction == 'BLUFOR'? 'NATO' : 'CSAT'}}: {{deco.name}}
|
||||||
</option>
|
</option>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
|
@ -20,13 +20,6 @@
|
||||||
#fractRadioOpfor
|
#fractRadioOpfor
|
||||||
(change)="filterUsersByFraction(query.value, fractRadioOpfor.value)">CSAT
|
(change)="filterUsersByFraction(query.value, fractRadioOpfor.value)">CSAT
|
||||||
</label>
|
</label>
|
||||||
<br>
|
|
||||||
<label class="radio-inline" style="padding-top: 8px;">
|
|
||||||
<input type="radio" name="fractSelect" value="unassigned"
|
|
||||||
[(ngModel)]="fractionRadioSelect"
|
|
||||||
#fractRadioUnassigned
|
|
||||||
(change)="filterUsersByFraction(query.value, fractRadioUnassigned.value)">Ohne Squad
|
|
||||||
</label>
|
|
||||||
</form>
|
</form>
|
||||||
<a class="pull-right btn btn-success" (click)="openNewUserForm()">
|
<a class="pull-right btn btn-success" (click)="openNewUserForm()">
|
||||||
Neuen Teilnehmer hinzufügen
|
Neuen Teilnehmer hinzufügen
|
||||||
|
|
Loading…
Reference in New Issue