-
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.
- Loading branch information
1 parent
452a96f
commit 0063175
Showing
12 changed files
with
223 additions
and
12 deletions.
There are no files selected for viewing
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,30 @@ | ||
'use strict'; | ||
|
||
define(['paw'], function(paw) { | ||
paw.controller('StudentsShowCtrl', ['$routeParams', function($routeParams) { | ||
var _this = this; | ||
|
||
var docket = $routeParams.docket; // For future Service calls | ||
|
||
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' | ||
} | ||
}; | ||
}]); | ||
}); |
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,51 @@ | ||
// disable max-nested-callbacks linter for this test | ||
// it is good to have a good separation of contexts inside tests | ||
|
||
/* eslint-disable max-nested-callbacks */ | ||
|
||
'use strict'; | ||
|
||
define(['paw', | ||
'angular-mocks', | ||
'controllers/students/StudentsShowCtrl'], | ||
function() { | ||
describe('Students Show Ctrl', function() { | ||
beforeEach(module('paw')); | ||
|
||
var expectedStudent = { | ||
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' | ||
} | ||
}; | ||
|
||
var expectedDocket = {docket: '55019'}; | ||
|
||
var $controller, controller, $routeParams; | ||
|
||
beforeEach(inject( | ||
function(_$controller_, _$routeParams_) { | ||
$controller = _$controller_; | ||
$routeParams = _$routeParams_; | ||
controller = $controller('StudentsShowCtrl', {$routeParams: expectedDocket}); | ||
})); | ||
|
||
it('correctly fetch the student', function() { | ||
expect(controller.student).toEqual(expectedStudent); | ||
}); | ||
}); | ||
}); |
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 |
---|---|---|
|
@@ -5,7 +5,6 @@ html { | |
} | ||
|
||
body { | ||
font-family: 'Roboto', sans-serif; | ||
background: $alabaster; | ||
height: 100%; | ||
|
||
|
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,9 +1,9 @@ | ||
$navbarHeight: 50px; | ||
$topNavMaxWidth: 300px; | ||
$topNavDropdownMenuMaxWidth: 300px; | ||
$sidebarWidth: 225px; | ||
$sidebarWidth: 240px; | ||
$sidebarButtonHeight: 50px; | ||
$navbarZIndex: 1001; | ||
$sidebarZIndex: 1002; | ||
$containerPadding: 30px; | ||
$bootstrapMobileMaxWidth: 768px; | ||
$bootstrapMobileMaxWidth: 767px; |
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,24 @@ | ||
.students-show-container { | ||
.data-container { | ||
width: 100%; | ||
display: flex; | ||
flex-wrap: wrap; | ||
justify-content: space-between; | ||
|
||
.data-item { | ||
width: 240px; | ||
padding: 5px; | ||
|
||
.break-words { | ||
display: inline-block; | ||
word-wrap: break-word; /* Internet Explorer 5.5+ */ | ||
width: 230px; /* width is mandatory to make break-word work on Mozzila */ | ||
} | ||
} | ||
} | ||
|
||
.user-address-data { | ||
padding-top: 15px; | ||
border-top: 1px solid #eeeeee; | ||
} | ||
} |
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,89 @@ | ||
<div class='students-show-container' ng-controller='StudentsShowCtrl as controller'> | ||
<!-- 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='i18nProfile'></small> | ||
</h2> | ||
</div> | ||
<!-- /Page Heading --> | ||
|
||
<!-- User Data --> | ||
<div class='data-container'> | ||
<div class='data-item'> | ||
<p class='bold static-label' translate='i18nDni'></p> | ||
<p class='break-words'>{{controller.student.dni}}</p> | ||
</div> | ||
<div class='data-item'> | ||
<p class='bold static-label' translate='i18Docket'></p> | ||
<p class='break-words'>{{controller.student.docket}}</p> | ||
</div> | ||
<div class='data-item'> | ||
<p class='bold static-label' translate='i18nFirstName'></p> | ||
<p class='break-words'>{{controller.student.firstName}}</p> | ||
</div> | ||
<div class='data-item'> | ||
<p class='bold static-label' translate='i18nLastName'></p> | ||
<p class='break-words'>{{controller.student.lastName}}</p> | ||
</div> | ||
<div class='data-item'> | ||
<p class='bold static-label' translate='i18Birthday'></p> | ||
<p class='break-words'>{{controller.student.birthday}}</p> | ||
</div> | ||
<div class='data-item'> | ||
<p class='bold static-label' translate='i18Genre'></p> | ||
<p class='break-words'>{{controller.student.genre}}</p> | ||
</div> | ||
<div class='data-item'> | ||
<p class='bold static-label' translate='i18Telephone'></p> | ||
<p class='break-words'>{{controller.student.address.telephone}}</p> | ||
</div> | ||
<div class='data-item'> | ||
<p class='bold static-label' translate='i18Email'></p> | ||
<p class='break-words'>{{controller.student.email}}</p> | ||
</div> | ||
</div> | ||
<!-- /User Data --> | ||
|
||
<!-- Address Data --> | ||
<div class='data-container user-address-data'> | ||
<div class='data-item'> | ||
<p class='bold static-label' translate='i18Country'></p> | ||
<p class='break-words'>{{controller.student.address.country}}</p> | ||
</div> | ||
<div class='data-item'> | ||
<p class='bold static-label' translate='i18City'></p> | ||
<p class='break-words'>{{controller.student.address.city}}</p> | ||
</div> | ||
<div class='data-item'> | ||
<p class='bold static-label' translate='i18Neighborhood'></p> | ||
<p class='break-words'>{{controller.student.address.neighborhood}}</p> | ||
</div> | ||
<div class='data-item'> | ||
<p class='bold static-label' translate='i18Street'></p> | ||
<p class='break-words'>{{controller.student.address.street}}</p> | ||
</div> | ||
<div class='data-item'> | ||
<p class='bold static-label' translate='i18Number'></p> | ||
<p class='break-words'>{{controller.student.address.number}}</p> | ||
</div> | ||
<div class='data-item'> | ||
<p class='bold static-label' translate='i18Floor'></p> | ||
<p class='break-words'>{{controller.student.address.floor}}</p> | ||
</div> | ||
<div class='data-item'> | ||
<p class='bold static-label' translate='i18Door'></p> | ||
<p class='break-words'>{{controller.student.address.door}}</p> | ||
</div> | ||
<div class='data-item'> | ||
<p class='bold static-label' translate='i18ZipCode'></p> | ||
<p class='break-words'>{{controller.student.address.zipCode}}</p> | ||
</div> | ||
</div> | ||
<!-- /Address Data --> | ||
</div> |