-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Created Courses Final Inscriptions New & Show Views (#95)
- Add translation messages - Created style for the view
- Loading branch information
1 parent
98350b9
commit b5bc34a
Showing
9 changed files
with
401 additions
and
115 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
app/scripts/controllers/courses/CoursesFinalInscriptionNewCtrl.js
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
'use strict'; | ||
|
||
define(['paw'], function(paw) { | ||
paw.controller('CoursesFinalInscriptionNewCtrl', ['$routeParams', '$window', '$filter', function($routeParams, $window, $filter) { | ||
var _this = this; | ||
var courseId = $routeParams.courseId; | ||
this.new = function(finalInscription) { | ||
// Make Api request | ||
var parsedDate = $filter('date')(finalInscription.finalExamDate, 'yyyy-MM-ddTHH:mm:ss'); | ||
}; | ||
|
||
this.cancel = function() { | ||
$window.history.back(); | ||
}; | ||
|
||
this.currentDate = new Date(); | ||
|
||
this.course = { | ||
courseId: '72.03', | ||
credits: 3, | ||
name: 'Introducción a Informática', | ||
semester: 1 | ||
}; | ||
}]); | ||
}); |
62 changes: 62 additions & 0 deletions
62
app/scripts/controllers/courses/CoursesFinalInscriptionShowCtrl.js
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
'use strict'; | ||
|
||
define(['paw'], function(paw) { | ||
paw.controller('CoursesFinalInscriptionShowCtrl', ['$routeParams', function($routeParams) { | ||
var _this = this; | ||
var courseId = $routeParams.courseId; | ||
var inscriptionId = $routeParams.inscriptionId; | ||
|
||
this.formatDate = function(finalExamDate) { | ||
var date = finalExamDate.split('T')[0]; | ||
var time = finalExamDate.split('T')[1]; | ||
return date.split('-')[2] + '/' + date.split('-')[1] + '/' + date.split('-')[0] + ' ' + time; | ||
}; | ||
|
||
this.course = { | ||
courseId: '72.03', | ||
credits: 3, | ||
name: 'Introducción a Informática', | ||
semester: 1, | ||
inscription: { | ||
id: '1', | ||
courseId: '93.42', | ||
vacancy: '12', | ||
maxVacancy: '50', | ||
finalExamDate: '2017-01-20T18:45', | ||
state: 'OPEN', | ||
students: [ | ||
{ | ||
firstName: 'Matías', | ||
lastName: 'Mercado', | ||
docket: '55019' | ||
}, | ||
{ | ||
firstName: 'Facundo', | ||
lastName: 'Mercado', | ||
docket: '51202' | ||
}, | ||
{ | ||
firstName: 'Gibar', | ||
lastName: 'Sin', | ||
docket: '54655' | ||
}, | ||
{ | ||
firstName: 'Obi Wan', | ||
lastName: 'Kenobi', | ||
docket: '12000' | ||
}, | ||
{ | ||
firstName: 'Darth', | ||
lastName: 'Vader', | ||
docket: '66666' | ||
}, | ||
{ | ||
firstName: 'Luke', | ||
lastName: 'Skywalker', | ||
docket: '53222' | ||
} | ||
] | ||
} | ||
}; | ||
}]); | ||
}); |
This file contains 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 characters
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,109 +1,119 @@ | ||
'use strict'; | ||
|
||
define([], function() { | ||
return { | ||
defaultRoutePath: '/', | ||
routes: { | ||
'/': { | ||
templateUrl: 'views/home.html', | ||
controller: 'HomeCtrl' | ||
}, | ||
'/login': { | ||
templateUrl: 'views/login.html', | ||
controller: 'LoginCtrl' | ||
}, | ||
'/students': { | ||
templateUrl: 'views/students/index.html', | ||
controller: 'StudentsIndexCtrl', | ||
relativePath: '/students' | ||
}, | ||
'/students/new': { | ||
templateUrl: 'views/students/new.html', | ||
controller: 'StudentsNewCtrl', | ||
relativePath: '/students' | ||
}, | ||
'/admins/new': { | ||
templateUrl: 'views/admins/new.html', | ||
controller: 'AdminsNewCtrl', | ||
relativePath: '/admins' | ||
}, | ||
'/students/:docket': { | ||
templateUrl: 'views/students/show.html', | ||
controller: 'StudentsShowCtrl', | ||
relativePath: '/students' | ||
}, | ||
'/students/:docket/edit': { | ||
templateUrl: 'views/students/edit.html', | ||
controller: 'StudentsEditCtrl', | ||
relativePath: '/students' | ||
}, | ||
'/courses': { | ||
templateUrl: 'views/courses/index.html', | ||
controller: 'CoursesIndexCtrl', | ||
relativePath: '/courses' | ||
}, | ||
'/courses/:courseId': { | ||
templateUrl: 'views/courses/show.html', | ||
controller: 'CoursesShowCtrl', | ||
relativePath: '/courses' | ||
}, | ||
'/courses/:courseId/students': { | ||
templateUrl: 'views/courses/students_index.html', | ||
controller: 'CoursesStudentsIndexCtrl', | ||
relativePath: '/courses' | ||
}, | ||
'/courses/:courseId/students/passed': { | ||
templateUrl: 'views/courses/students_passed.html', | ||
controller: 'CoursesStudentsPassedCtrl', | ||
relativePath: '/courses' | ||
}, | ||
'/courses/:courseId/correlatives/new': { | ||
templateUrl: 'views/courses/correlatives_new.html', | ||
controller: 'CoursesCorrelativesNewCtrl', | ||
relativePath: '/courses' | ||
}, | ||
'/students/:docket/courses': { | ||
templateUrl: 'views/students/courses_index.html', | ||
controller: 'StudentsCoursesIndexCtrl', | ||
relativePath: '/students' | ||
}, | ||
'/students/:docket/inscriptions': { | ||
templateUrl: 'views/students/inscriptions.html', | ||
controller: 'StudentsInscriptionsCtrl', | ||
relativePath: '/students' | ||
}, | ||
'/courses/:courseId/edit': { | ||
templateUrl: 'views/courses/edit.html', | ||
controller: 'CoursesEditCtrl', | ||
relativePath: '/courses' | ||
}, | ||
'/courses/new': { | ||
templateUrl: 'views/courses/new.html', | ||
controller: 'CoursesNewCtrl', | ||
relativePath: '/courses' | ||
}, | ||
'/students/:docket/final_inscriptions': { | ||
templateUrl: '/views/students/final_inscriptions.html', | ||
controller: 'StudentsFinalInscriptionsCtrl', | ||
relativePath: '/students' | ||
}, | ||
'/admins': { | ||
templateUrl: 'views/admins/index.html', | ||
controller: 'AdminsIndexCtrl', | ||
relativePath: '/admins' | ||
}, | ||
'/admins/:adminDni': { | ||
templateUrl: '/views/admins/show.html', | ||
controller: 'AdminsShowCtrl', | ||
relativePath: '/admins' | ||
}, | ||
'/user/change_password': { | ||
templateUrl: 'views/user/change_password.html', | ||
controller: 'UserChangePasswordCtrl', | ||
relativePath: '/user' | ||
} | ||
/* ===== yeoman hook ===== */ | ||
/* Do not remove these commented lines! Needed for auto-generation */ | ||
} | ||
}; | ||
return { | ||
defaultRoutePath: '/', | ||
routes: { | ||
'/': { | ||
templateUrl: 'views/home.html', | ||
controller: 'HomeCtrl' | ||
}, | ||
'/login': { | ||
templateUrl: 'views/login.html', | ||
controller: 'LoginCtrl' | ||
}, | ||
'/students': { | ||
templateUrl: 'views/students/index.html', | ||
controller: 'StudentsIndexCtrl', | ||
relativePath: '/students' | ||
}, | ||
'/students/new': { | ||
templateUrl: 'views/students/new.html', | ||
controller: 'StudentsNewCtrl', | ||
relativePath: '/students' | ||
}, | ||
'/admins/new': { | ||
templateUrl: 'views/admins/new.html', | ||
controller: 'AdminsNewCtrl', | ||
relativePath: '/admins' | ||
}, | ||
'/students/:docket': { | ||
templateUrl: 'views/students/show.html', | ||
controller: 'StudentsShowCtrl', | ||
relativePath: '/students' | ||
}, | ||
'/students/:docket/edit': { | ||
templateUrl: 'views/students/edit.html', | ||
controller: 'StudentsEditCtrl', | ||
relativePath: '/students' | ||
}, | ||
'/courses': { | ||
templateUrl: 'views/courses/index.html', | ||
controller: 'CoursesIndexCtrl', | ||
relativePath: '/courses' | ||
}, | ||
'/courses/:courseId': { | ||
templateUrl: 'views/courses/show.html', | ||
controller: 'CoursesShowCtrl', | ||
relativePath: '/courses' | ||
}, | ||
'/courses/:courseId/students': { | ||
templateUrl: 'views/courses/students_index.html', | ||
controller: 'CoursesStudentsIndexCtrl', | ||
relativePath: '/courses' | ||
}, | ||
'/courses/:courseId/students/passed': { | ||
templateUrl: 'views/courses/students_passed.html', | ||
controller: 'CoursesStudentsPassedCtrl', | ||
relativePath: '/courses' | ||
}, | ||
'/courses/:courseId/correlatives/new': { | ||
templateUrl: 'views/courses/correlatives_new.html', | ||
controller: 'CoursesCorrelativesNewCtrl', | ||
relativePath: '/courses' | ||
}, | ||
'/students/:docket/courses': { | ||
templateUrl: 'views/students/courses_index.html', | ||
controller: 'StudentsCoursesIndexCtrl', | ||
relativePath: '/students' | ||
}, | ||
'/students/:docket/inscriptions': { | ||
templateUrl: 'views/students/inscriptions.html', | ||
controller: 'StudentsInscriptionsCtrl', | ||
relativePath: '/students' | ||
}, | ||
'/courses/:courseId/edit': { | ||
templateUrl: 'views/courses/edit.html', | ||
controller: 'CoursesEditCtrl', | ||
relativePath: '/courses' | ||
}, | ||
'/courses/new': { | ||
templateUrl: 'views/courses/new.html', | ||
controller: 'CoursesNewCtrl', | ||
relativePath: '/courses' | ||
}, | ||
'/students/:docket/final_inscriptions': { | ||
templateUrl: '/views/students/final_inscriptions.html', | ||
controller: 'StudentsFinalInscriptionsCtrl', | ||
relativePath: '/students' | ||
}, | ||
'/admins': { | ||
templateUrl: 'views/admins/index.html', | ||
controller: 'AdminsIndexCtrl', | ||
relativePath: '/admins' | ||
}, | ||
'/admins/:adminDni': { | ||
templateUrl: '/views/admins/show.html', | ||
controller: 'AdminsShowCtrl', | ||
relativePath: '/admins' | ||
}, | ||
'/user/change_password': { | ||
templateUrl: 'views/user/change_password.html', | ||
controller: 'UserChangePasswordCtrl', | ||
relativePath: '/user' | ||
}, | ||
'/courses/:courseId/final_inscriptions/new': { | ||
templateUrl: 'views/courses/final_inscriptions_new.html', | ||
controller: 'CoursesFinalInscriptionNewCtrl', | ||
relativePath: '/courses' | ||
}, | ||
'/courses/:courseId/final_inscriptions/:inscriptionId': { | ||
templateUrl: 'views/courses/final_inscriptions_show.html', | ||
controller: 'CoursesFinalInscriptionShowCtrl', | ||
relativePath: '/courses' | ||
} | ||
/* ===== yeoman hook ===== */ | ||
/* Do not remove these commented lines! Needed for auto-generation */ | ||
} | ||
}; | ||
}); |
This file contains 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 characters
Oops, something went wrong.