Last active
April 4, 2019 16:52
Revisions
-
jasonhofer revised this gist
Apr 4, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ import Ember from 'ember'; // This "redirects" '/programs/my-journey' to '/programs/my-journey/123' // (But only if the user is assigned to a program.) export default Ember.Route.extend({ beforeModel() { const programs = this.modelFor('certifications.my-training-programs'); -
jasonhofer revised this gist
Apr 4, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,5 @@ import Ember from 'ember'; // This "redirects" '/' to '/dashboard' export default Ember.Route.extend({ beforeModel() { this.replaceWith('dashboard'); -
jasonhofer revised this gist
Apr 4, 2019 . No changes.There are no files selected for viewing
-
jasonhofer revised this gist
Apr 4, 2019 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,6 @@ import Ember from 'ember'; // This "redirects" '/programs/my-journey' to '/programs/my-journey/123' // (But only if they user is assigned to a program.) export default Ember.Route.extend({ beforeModel() { const programs = this.modelFor('certifications.my-training-programs'); -
jasonhofer revised this gist
Apr 4, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,5 @@ import Ember from 'ember'; // This "redirects" '/programs' to '/programs/my-journey' export default Ember.Route.extend({ beforeModel() { this.replaceWith('certifications.my-training-programs'); -
jasonhofer revised this gist
Apr 4, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,5 @@ import Ember from 'ember'; // This "redirects" '/programs/my-journey/123/level' to '/programs/my-journey/123/level/1' export default Ember.Route.extend({ beforeModel() { const program = this.modelFor('training.program'); -
jasonhofer revised this gist
Apr 4, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,5 @@ import Ember from 'ember'; // This "redirects" '/programs/my-journey/123' to '/programs/my-journey/123/level' export default Ember.Route.extend({ beforeModel() { this.replaceWith('training.program.level', this.paramsFor('training.program').program_id); -
jasonhofer revised this gist
Apr 4, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,5 @@ import Ember from 'ember'; // This "redirects" '/programs/my-journey' to '/programs/my-journey/123' export default Ember.Route.extend({ beforeModel() { const programs = this.modelFor('certifications.my-training-programs'); -
jasonhofer revised this gist
Apr 4, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,5 @@ import Ember from 'ember'; // This redirects '/programs/my-journey' to '/programs/my-journey/123' export default Ember.Route.extend({ beforeModel() { const programs = this.modelFor('certifications.my-training-programs'); -
jasonhofer revised this gist
Apr 4, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,5 @@ import Ember from 'ember'; // This redirects '/programs/my-journey/123/level' to '/programs/my-journey/123/level/1' export default Ember.Route.extend({ beforeModel() { const program = this.modelFor('training.program'); -
jasonhofer revised this gist
Apr 4, 2019 . 2 changed files with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,5 @@ import Ember from 'ember'; // This redirects '/programs/my-journey/123' to '/programs/my-journey/123/level' export default Ember.Route.extend({ beforeModel() { this.replaceWith('training.program.level', this.paramsFor('training.program').program_id); This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,5 @@ import Ember from 'ember'; // This redirects when no level number is given in the URL (e.g. '/programs/my-journey/123/level') export default Ember.Route.extend({ beforeModel() { const program = this.modelFor('training.program'); -
jasonhofer revised this gist
Apr 4, 2019 . No changes.There are no files selected for viewing
-
jasonhofer revised this gist
Apr 4, 2019 . No changes.There are no files selected for viewing
-
jasonhofer revised this gist
Apr 4, 2019 . 1 changed file with 0 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,12 +1,10 @@ import Ember from 'ember'; export default Ember.Route.extend({ beforeModel() { const programs = this.modelFor('certifications.my-training-programs'); const primary = programs.filter(program => 'primary' === program.type)[0]; if (primary) { this.replaceWith('training.program', primary.id); } }, -
jasonhofer revised this gist
Apr 4, 2019 . 5 changed files with 6 additions and 7 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +0,0 @@ This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -15,7 +15,7 @@ Router.map(function() { this.route('certifications', {path: '/programs'}, function () { this.route('my-training-programs', {path: '/my-journey'}, function () { this.route('training.program', {path: '/:program_id', resetNamespace: true}, function () { this.route('level', {path: '/level'}); // "Redirects" to training.program-level this.route('training.program-level', {path: '/level/:level_num', resetNamespace: true}); }); }); This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,5 @@ {{!-- <h3>Certifications</h3> <hr> --}} {{outlet}} This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,9 @@ {{!-- <h4>My Programs</h4> | {{#each model as |program|}} {{program.title}} | {{/each}} <hr> --}} {{outlet}} This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,4 @@ <h4>{{model.title}}</h4> | {{#each model.levels as |level|}} {{#link-to 'training.program-level' model.id level.levelNum}}{{level.title}}{{/link-to}} | -
jasonhofer revised this gist
Apr 4, 2019 . 2 changed files with 0 additions and 10 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,8 +0,0 @@ This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,2 +0,0 @@ -
jasonhofer revised this gist
Apr 4, 2019 . 1 changed file with 8 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,8 @@ import Ember from 'ember'; export default Ember.Route.extend({ beforeModel() { const program = this.modelFor('training.program'); this.replaceWith('training.program-level', program.id, program.workingLevelNum || 1); }, }); -
jasonhofer revised this gist
Apr 4, 2019 . 4 changed files with 7 additions and 7 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,7 +4,7 @@ export default Ember.Route.extend({ mockStore: Ember.inject.service(), model(params) { const program = this.get('mockStore').findRecord('program', params.program_id); Ember.set(program, 'levels', this.get('mockStore').findLevels(program.id)); return program; }, }); This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,8 +1,7 @@ <h4>My Programs</h4> | {{#each model as |program|}} {{program.title}} | {{/each}} <hr> {{outlet}} This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,9 +1,8 @@ <h5>My Journey: {{model.title}}</h5> <hr> | {{#each model.levels as |level|}} {{#link-to 'training.program-level' model.id level.levelNum}}{{level.title}}{{/link-to}} | {{/each}} <hr> {{outlet}} This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,2 @@ <code>templates/training/program/level.hbs</code> <b>You should never see this</b> -
jasonhofer revised this gist
Apr 4, 2019 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import Ember from 'ember'; export default Ember.Route.extend({ beforeModel() { const program = this.modelFor('training.program'); this.replaceWith('training.program-level', program.id, program.workingLevelNum || 1); }, }); -
jasonhofer revised this gist
Apr 4, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,6 +3,6 @@ import Ember from 'ember'; export default Ember.Route.extend({ mockStore: Ember.inject.service(), model(params) { return this.get('mockStore').findLevelByNum(this.paramsFor('training.program').program_id, params.level_num); }, }); -
jasonhofer revised this gist
Apr 4, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1 +1 @@ <i>Level Title: <b>{{model.title}}</b></i> -
jasonhofer revised this gist
Apr 4, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1 +1 @@ <i>Level Title: {{model.title}}</i> -
jasonhofer revised this gist
Apr 4, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,7 +2,7 @@ <hr> <ul> {{#each model.levels as |level|}} <ul>{{#link-to 'training.program-level' model.id level.levelNum}}{{level.title}}{{/link-to}}</ul> {{/each}} </ul> <hr> -
jasonhofer revised this gist
Apr 4, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1 +1 @@ <i>{{model.title}}</i> -
jasonhofer revised this gist
Apr 4, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -20,7 +20,7 @@ export default Ember.Service.extend({ }, program: [ {id: 1, title: 'Program 1', levels: [1,2], type: 'secondary'}, {id: 2, title: 'Program 2', levels: [3,4,5], type: 'primary', workingLevelNum: 2}, ], -
jasonhofer revised this gist
Apr 4, 2019 . 2 changed files with 7 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,6 +3,6 @@ import Ember from 'ember'; export default Ember.Route.extend({ mockStore: Ember.inject.service(), model(params) { return this.get('mockStore').findLevelByNum('programLevel', this.paramsFor('training.program').program_id, params.level_num); }, }); This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -15,9 +15,13 @@ export default Ember.Service.extend({ return this.get('programLevel').filter(level => level.program === ~~programId); }, findLevelByNum(programId, levelNum) { return this.findLevels(programId).filter(level => level.levelNum === ~~levelNum)[0]; }, program: [ {id: 1, title: 'Program 1', levels: [1,2], type: 'secondary', workingLevelNum: 1}, {id: 2, title: 'Program 2', levels: [3,4,5], type: 'primary', workingLevelNum: 2}, ], programLevel: [ -
jasonhofer revised this gist
Apr 4, 2019 . 1 changed file with 8 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,8 @@ import Ember from 'ember'; export default Ember.Route.extend({ mockStore: Ember.inject.service(), model(params) { return this.get('mockStore').findLevelByNum('programLevel', params.level_num); }, }); -
jasonhofer revised this gist
Apr 4, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,7 +2,7 @@ <hr> <ul> {{#each model.levels as |level|}} <ul>{{#link-to 'training.program-level' model.id level.id}}{{level.title}}{{/link-to}}</ul> {{/each}} </ul> <hr> -
jasonhofer revised this gist
Apr 4, 2019 . 2 changed files with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -12,7 +12,7 @@ export default Ember.Service.extend({ }, findLevels(programId) { return this.get('programLevel').filter(level => level.program === ~~programId); }, program: [ This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,7 +2,7 @@ <hr> <ul> {{#each model.levels as |level|}} <ul>{{#link-to 'training.program-level' model.id level.id}}</ul> {{/each}} </ul> <hr> -
jasonhofer revised this gist
Apr 4, 2019 . 2 changed files with 9 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,6 +3,8 @@ import Ember from 'ember'; export default Ember.Route.extend({ mockStore: Ember.inject.service(), model(params) { const program = this.get('mockStore').findRecord('program', params.program_id); program.levels = this.get('mockStore').findLevels(program.id); return program; }, }); This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,9 @@ <h5>My Journey: {{model.title}}</h5> <hr> <ul> {{#each model.levels as |level|}} <ul>{{level.title}}</ul> {{/each}} </ul> <hr> {{outlet}}
NewerOlder