Skip to content

Commit

Permalink
Fixed volunteer list.
Browse files Browse the repository at this point in the history
  • Loading branch information
vzickner committed Dec 24, 2015
1 parent 7d1a950 commit 18c1214
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 34 deletions.
14 changes: 8 additions & 6 deletions partials/organisation/volunteerList.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,13 @@ <h1>{{ 'Volunteers' | translate }}</h1>
<th>{{ 'Abilities' | translate }}</th>
</tr>
<tr ng-repeat="volunteer in ctrl.displayedVolunteers">
<td>{{volunteer.givenName}}</td>
<td>{{volunteer.surname}}</td>
<td>{{volunteer.address.zipCode}}</td>
<td>{{volunteer.phone}}</td>
<td>{{volunteer.email}}</td>
<td>{{volunteer.abilities}}</td>
<td>{{volunteer.user.givenName}}</td>
<td>{{volunteer.user.surname}}</td>
<td>{{volunteer.user.address.zipCode}}</td>
<td>{{volunteer.user.phone}}</td>
<td>{{volunteer.user.email}}</td>
<td><ul>
<li ng-repeat="ability in volunteer.abilities">{{ability.name}}</li>
</ul></td>
</tr>
</table>
64 changes: 36 additions & 28 deletions test/behaviour/mocks/volunteers.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@ module.exports = [
},
response: {
data: [{
id: 1,
givenName: 'Max 1',
surname: 'Mustermann 1',
address: {zipCode: '76133'},
phone: '01234 567890',
adult: true,
user: {
id: 1,
givenName: 'Max 1',
surname: 'Mustermann 1',
address: {zipCode: '76133'},
phone: '01234 567890',
adult: true
},
abilities: []
}, {
id: 1,
Expand All @@ -29,26 +31,30 @@ module.exports = [
path: '/volunteers',
method: 'POST',
data: {
givenName: 'Max',
surname: 'Mustermann',
address: {
zipCode: '76187'
},
phone: '0157812312335',
adult: true
user: {
givenName: 'Max',
surname: 'Mustermann',
address: {
zipCode: '76187'
},
phone: '0157812312335',
adult: true
}
}
},
response: {
status: 200,
data: [{
id: 42,
givenName: 'Max',
surname: 'Mustermann',
address: {
zipCode: '76187'
},
phone: '0157812312335',
adult: true
user: {
id: 42,
givenName: 'Max',
surname: 'Mustermann',
address: {
zipCode: '76187'
},
phone: '0157812312335',
adult: true
}
}]
}
},
Expand All @@ -57,13 +63,15 @@ module.exports = [
path: '/volunteers',
method: 'POST',
data: {
givenName: 'Max',
surname: 'Mustermann',
address: {
zipCode: '76187'
},
phone: '0157812312335',
adult: false
user: {
givenName: 'Max',
surname: 'Mustermann',
address: {
zipCode: '76187'
},
phone: '0157812312335',
adult: false
}
}
},
response: {
Expand Down

0 comments on commit 18c1214

Please sign in to comment.