Skip to content

Commit

Permalink
Release v1.2.0 (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
cdconn00 authored Feb 28, 2024
1 parent 9b03020 commit 6f12ff1
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 46 deletions.
8 changes: 4 additions & 4 deletions controllers/EventController.js
Original file line number Diff line number Diff line change
Expand Up @@ -316,28 +316,28 @@ router.put('/:slug', getUser, auth(['atm', 'datm', 'ec']), upload.single('banner
computedPositions.push({
pos,
type: thePos[2],
code: 'zab',
code: 'enroute',
})
}
if(['APP', 'DEP'].includes(thePos[2])) {
computedPositions.push({
pos,
type: thePos[2],
code: (thePos[1] === "PHX") ? 'p50app' : 'app',
code: (thePos[1] === "PHX") ? 'p50' : 'app',
})
}
if(['TWR'].includes(thePos[2])) {
computedPositions.push({
pos,
type: thePos[2],
code: (thePos[1] === "PHX") ? 'p50twr' : 'twr',
code: (thePos[1] === "PHX") ? 'kphxtower' : 'twr',
})
}
if(['GND', 'DEL'].includes(thePos[2])) {
computedPositions.push({
pos,
type: thePos[2],
code: (thePos[1] === "PHX") ? 'p50gnd' : 'gnd',
code: (thePos[1] === "PHX") ? 'kphxground' : 'gnd',
})
}
}
Expand Down
4 changes: 2 additions & 2 deletions controllers/FeedbackController.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import Notification from '../models/Notification.js';
import getUser from '../middleware/getUser.js';
import auth from '../middleware/auth.js';

router.get('/', getUser, auth(['atm', 'datm', 'ta']), async (req, res) => { // All feedback
router.get('/', getUser, auth(['atm', 'datm', 'ta', 'ec']), async (req, res) => { // All feedback
try {
const page = +req.query.page || 1;
const limit = +req.query.limit || 20;
Expand Down Expand Up @@ -85,7 +85,7 @@ router.get('/controllers', async ({res}) => { // Controller list on feedback pag
return res.json(res.stdRes);
});

router.get('/unapproved', getUser, auth(['atm', 'datm', 'ta']), async ({res}) => { // Get all unapproved feedback
router.get('/unapproved', getUser, auth(['atm', 'datm', 'ta', 'ec']), async ({res}) => { // Get all unapproved feedback
try {
const feedback = await Feedback.find({deletedAt: null, approved: false}).populate('controller', 'fname lname cid').sort({createdAt: 'desc'}).lean();
res.stdRes.data = feedback;
Expand Down
6 changes: 4 additions & 2 deletions models/TrainingMilestone.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ import m from 'mongoose';
const trainingMilestoneSchema = new m.Schema({
code: String,
name: String,
rating: Number,
certCode: String
rating: Number, // Legacy field, replaced by "availableAtRatings".
certCode: String, // Legacy field, replaced by "hiddenWhenControllerHasTierOne".
availableAtRatings: Array,
hiddenWhenControllerHasTierOne: Boolean
});

export default m.model('TrainingMilestone', trainingMilestoneSchema, 'trainingMilestones');
82 changes: 44 additions & 38 deletions seeds/certifications.json
Original file line number Diff line number Diff line change
@@ -1,43 +1,49 @@
[{
"name": "Minor Ground",
"code": "gnd",
[
{
"name": "KPHX GND",
"code": "kphxground",
"order": 4,
"class": "tier-one"
},
{
"name": "KPHX TWR",
"code": "kphxtower",
"order": 3,
"class": "tier-one"
},
{
"name": "P50",
"code": "p50",
"order": 2,
"class": "tier-one"
},
{
"name": "Enroute",
"code": "enroute",
"order": 1,
"class": "tier-one"
},
{
"name": "KABQ",
"code": "kabq",
"order": 1,
"class": "minor",
"facility": "gnd"
},{
"name": "Major Ground",
"code": "p50gnd",
"class": "tier-two"
},
{
"name": "KFLG",
"code": "kflg",
"order": 2,
"class": "major",
"facility": "gnd"
},{
"name": "Minor Tower",
"code": "twr",
"class": "tier-two"
},
{
"name": "KLUF",
"code": "kluf",
"order": 3,
"class": "minor",
"facility": "twr"
},{
"name": "Major Tower",
"code": "p50twr",
"class": "tier-two"
},
{
"name": "KSAF",
"code": "ksaf",
"order": 4,
"class": "major",
"facility": "twr"
},{
"name": "Minor Approach",
"code": "app",
"order": 5,
"class": "minor",
"facility": "app"
},{
"name": "Major Approach",
"code": "p50app",
"order": 6,
"class": "major",
"facility": "app"
},{
"name": "Albuquerque Center",
"code": "zab",
"order": 7,
"class": "center",
"facility": "ctr"
"class": "tier-two"
}]

0 comments on commit 6f12ff1

Please sign in to comment.