diff --git a/controllers/EventController.js b/controllers/EventController.js index 8c37662..f593f1f 100644 --- a/controllers/EventController.js +++ b/controllers/EventController.js @@ -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', }) } } diff --git a/models/TrainingMilestone.js b/models/TrainingMilestone.js index 4611414..dce8e29 100644 --- a/models/TrainingMilestone.js +++ b/models/TrainingMilestone.js @@ -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'); \ No newline at end of file diff --git a/seeds/certifications.json b/seeds/certifications.json index d22c863..82e2fec 100644 --- a/seeds/certifications.json +++ b/seeds/certifications.json @@ -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" }] \ No newline at end of file