-
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 Students Final Inscriptions View (#86)
* Created Students Final Inscriptions View Added style for view
- Loading branch information
1 parent
9441df6
commit 756d525
Showing
6 changed files
with
195 additions
and
7 deletions.
There are no files selected for viewing
71 changes: 71 additions & 0 deletions
71
app/scripts/controllers/students/StudentsFinalInscriptionsCtrl.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,71 @@ | ||
'use strict'; | ||
|
||
define(['paw'], function(paw) { | ||
paw.controller('StudentsFinalInscriptionsCtrl', ['$routeParams', function($routeParams) { | ||
var _this = this; | ||
var docket = $routeParams.docket; // For future Service calls | ||
|
||
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.student = { | ||
docket: '55019', | ||
firstName: 'Matías', | ||
lastName: 'Mercado', | ||
email: 'mmercado@itba.edu.ar', | ||
genre: 'Masculino', | ||
dni: '38917403', | ||
birthday: '1995-05-04', | ||
address: { | ||
country: 'Argentina', | ||
city: 'Buenos Aires', | ||
neighborhood: 'Almagro', | ||
number: '682', | ||
street: 'Corrientes', | ||
floor: '2', | ||
door: 'A', | ||
telephone: '1544683390', | ||
zipCode: '1100' | ||
}, | ||
finalInscriptionsAvailable: [ | ||
{ | ||
id: '1', | ||
courseId: '93.42', | ||
vacancy: '12', | ||
maxVacancy: '50', | ||
finalExamDate: '2017-01-20T18:45', | ||
state: 'OPEN' | ||
}, | ||
{ | ||
id: '2', | ||
courseId: '93.42', | ||
vacancy: '6', | ||
maxVacancy: '50', | ||
finalExamDate: '2017-02-15T14:00', | ||
state: 'CLOSED' | ||
} | ||
], | ||
finalInscriptionsTaken: [ | ||
{ | ||
id: '1', | ||
courseId: '93.42', | ||
vacancy: '12', | ||
maxVacancy: '50', | ||
finalExamDate: '2017-01-20T18:45', | ||
state: 'OPEN' | ||
}, | ||
{ | ||
id: '2', | ||
courseId: '93.42', | ||
vacancy: '6', | ||
maxVacancy: '50', | ||
finalExamDate: '2017-02-15T14:00', | ||
state: 'CLOSED' | ||
} | ||
] | ||
}; | ||
}]); | ||
}); |
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
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
@import 'modules/variables/importer'; | ||
|
||
.students-final-inscriptions-container { | ||
.table { | ||
.actions-container { | ||
display: flex; | ||
flex-wrap: wrap; | ||
justify-content: flex-start; | ||
|
||
.btn { | ||
flex: 1; | ||
min-width: 175px; | ||
max-width: 200px; | ||
margin: 10px; | ||
margin-left: 0; | ||
} | ||
} | ||
} | ||
} |
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,89 @@ | ||
<div ng-controller='StudentsFinalInscriptionsCtrl as controller' class='students-final-inscriptions-container'> | ||
<!-- Page Heading --> | ||
<div class='page-header break-words'> | ||
<h1 class='inline'> | ||
<span translate='i18nStudents'></span> | ||
</h1> | ||
<h2 class='inline'> | ||
<span> - </span> | ||
<span> {{controller.student.firstName}} {{controller.student.lastName}}</span> | ||
<small> - </small> | ||
<small translate='i18nStudentFinals'></small> | ||
</h2> | ||
</div> | ||
<!-- /Page Heading --> | ||
|
||
<!-- Final Exams --> | ||
<h3 translate='i18nFinalExams' class='page-sub-header'></h3> | ||
<div class='table-responsive'> | ||
<table class='table table-hover'> | ||
<thead> | ||
<tr> | ||
<th translate='i18nFinalExamDate'></th> | ||
<th translate='i18nVacancy'></th> | ||
<th translate='i18nState'></th> | ||
<th translate='i18nActions'></th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr ng-hide='controller.student.finalInscriptionsAvailable.length > 0' class='bg-warning'> | ||
<td colspan='4' class='text-danger text-center' translate='i18nNoFinalExamsFound'></td> | ||
</tr> | ||
<tr ng-repeat='inscription in controller.student.finalInscriptionsAvailable'> | ||
<td>{{controller.formatDate(inscription.finalExamDate)}}</td> | ||
<td>{{ inscription.vacancy }}/{{ inscription.maxVacancy }}</td> | ||
<td ng-show="inscription.state == 'OPEN'" translate='i18nInscriptionOpen'></td> | ||
<td ng-show="inscription.state == 'CLOSED'" translate='i18nInscriptionClosed'></td> | ||
<td class='actions-container'> | ||
<a class='btn btn-default' role='button'> | ||
<span class='fa fa-info-circle' aria-hidden='true'></span> | ||
<span translate='i18nInformation'></span> | ||
</a> | ||
<a class='btn btn-info' role='button'> | ||
<span class='fa fa-list-alt' aria-hidden='true'></span> | ||
<span translate='i18nFinalEnroll'></span> | ||
</a> | ||
</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</div> | ||
<!-- /Final Exams --> | ||
|
||
<!-- Final Exams Taken --> | ||
<h3 translate='i18nFinalExamsTaken' class='page-sub-header'></h3> | ||
<div class='table-responsive'> | ||
<table class='table table-hover'> | ||
<thead> | ||
<tr> | ||
<th translate='i18nFinalExamDate'></th> | ||
<th translate='i18nVacancy'></th> | ||
<th translate='i18nState'></th> | ||
<th translate='i18nActions'></th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr ng-hide='controller.student.finalInscriptionsTaken.length > 0' class='bg-warning'> | ||
<td colspan='4' class='text-danger text-center' translate='i18nNoFinalExamsFound'></td> | ||
</tr> | ||
<tr ng-repeat='inscription in controller.student.finalInscriptionsTaken'> | ||
<td>{{controller.formatDate(inscription.finalExamDate)}}</td> | ||
<td>{{ inscription.vacancy }}/{{ inscription.maxVacancy }}</td> | ||
<td ng-show="inscription.state == 'OPEN'" translate='i18nInscriptionOpen'></td> | ||
<td ng-show="inscription.state == 'CLOSED'" translate='i18nInscriptionClosed'></td> | ||
<td class='actions-container'> | ||
<a class='btn btn-default' role='button'> | ||
<span class='fa fa-info-circle' aria-hidden='true'></span> | ||
<span translate='i18nInformation'></span> | ||
</a> | ||
<a class='btn btn-danger' role='button'> | ||
<span class='fa fa-list-alt' aria-hidden='true'></span> | ||
<span translate='i18nUnenroll'></span> | ||
</a> | ||
</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</div> | ||
<!-- /Final Exams Taken --> | ||
</div> |