diff --git a/app/app.css b/app/app.css index d1262ba..c36c1f8 100644 --- a/app/app.css +++ b/app/app.css @@ -151,3 +151,10 @@ ActivityIndicator { .drawer .logo { width: 140; } + +.list-separator { + border-width: 0; + border-bottom-width: 1; + border-color: #c8c7cc; + height: 1; +} diff --git a/app/events/event-participants/event-participants.component.css b/app/events/event-participants/event-participants.component.css index b3b109a..232b89e 100644 --- a/app/events/event-participants/event-participants.component.css +++ b/app/events/event-participants/event-participants.component.css @@ -1,4 +1,23 @@ .cntnr { - height: 100%; - background-color: green; + height: 100%; + background-color: #fff; +} + +.content { + padding: 20; +} + +.info-label { + margin-bottom: 10; + font-size: 12; + color: #F4550F; + text-transform: uppercase; +} + +.group-wrp { + margin-bottom: 30; +} + +.no-voters { + padding: 10 0; } diff --git a/app/events/event-participants/event-participants.component.ts b/app/events/event-participants/event-participants.component.ts index 21ca539..211ab4f 100644 --- a/app/events/event-participants/event-participants.component.ts +++ b/app/events/event-participants/event-participants.component.ts @@ -1,6 +1,7 @@ import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { RouterExtensions } from 'nativescript-angular/router'; +import { Page } from 'ui/page'; import { AlertService, PlatformService, UsersService, EventsService, EventRegistrationsService } from '../../services'; import { User, Event, EventRegistration } from '../../shared/models'; @@ -28,7 +29,8 @@ export class EventParticipantsComponent implements OnInit { private _eventsService: EventsService, private _platform: PlatformService, private _routerExtensions: RouterExtensions, - private _regsService: EventRegistrationsService + private _regsService: EventRegistrationsService, + private _page: Page ) { this.isAndroid = this._platform.isAndroid; } @@ -41,11 +43,15 @@ export class EventParticipantsComponent implements OnInit { .then(p => this.participants = p); let eventPrm = this._eventsService.getById(eventId) - .then(e => this.event = e); - + .then(e => { + this.event = e; + this._page.actionBar.title = 'Participants for ' + this.event.Name; + }); + let regsPrm = this._regsService.getForEvent(eventId) .then(r => this.registrations = r); + Promise.all([eventPrm, participantsPrm, regsPrm]) .then(() => { this._groupParticipantsByDate(); @@ -101,7 +107,7 @@ export class EventParticipantsComponent implements OnInit { private _groupParticipantsByDate() { let usersById: any = {}; this.participants.forEach(u => usersById[u.Id] = u); - + this.registrations.forEach(reg => { let user: User = usersById[reg.UserId]; reg.Choices.forEach((c: any) => { diff --git a/app/events/event-participants/event-participants.template.html b/app/events/event-participants/event-participants.template.html index 4999ec7..fa17c18 100644 --- a/app/events/event-participants/event-participants.template.html +++ b/app/events/event-participants/event-participants.template.html @@ -1,28 +1,23 @@ - - - - - - - + + - - - + + + - + - - + + diff --git a/app/groups/group-members/group-members.component.css b/app/groups/group-members/group-members.component.css index b3b109a..310c75b 100644 --- a/app/groups/group-members/group-members.component.css +++ b/app/groups/group-members/group-members.component.css @@ -1,4 +1,12 @@ .cntnr { - height: 100%; - background-color: green; + height: 100%; + background-color: #fff; +} + +.content { + padding: 20; +} + +.no-admin { + padding: 10 0; } diff --git a/app/groups/group-members/group-members.component.ts b/app/groups/group-members/group-members.component.ts index 18d2570..7e05358 100644 --- a/app/groups/group-members/group-members.component.ts +++ b/app/groups/group-members/group-members.component.ts @@ -1,6 +1,7 @@ import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { RouterExtensions } from 'nativescript-angular/router'; +import { Page } from 'ui/page'; import { GroupsService, AlertService, PlatformService, UsersService } from '../../services'; import { User, Group } from '../../shared/models'; @@ -26,7 +27,8 @@ export class GroupMembersComponent implements OnInit { private _groupsService: GroupsService, private _usersService: UsersService, private _platform: PlatformService, - private _routerExtensions: RouterExtensions + private _routerExtensions: RouterExtensions, + private _page: Page ) { this.isAndroid = this._platform.isAndroid; } @@ -35,10 +37,13 @@ export class GroupMembersComponent implements OnInit { this._route.params.subscribe(p => { this._groupId = p['id']; let groupPrm = this._groupsService.getById(this._groupId) - .then(g => this.group = g); + .then(g => { + this.group = g; + this._page.actionBar.title = 'Members of ' + this.group.Name; + }); let membersPrm = this._groupsService.getGroupMembers(this._groupId) .then(members => this.members = members); - + Promise.all([this._usersService.currentUser(), groupPrm, membersPrm]) .then((result) => { let currentUser: User = result[0]; diff --git a/app/groups/group-members/group-members.template.html b/app/groups/group-members/group-members.template.html index 2ca0c5d..48b6851 100644 --- a/app/groups/group-members/group-members.template.html +++ b/app/groups/group-members/group-members.template.html @@ -1,21 +1,16 @@ - - - - - - - + + - + - + diff --git a/app/shared/user-display/user-display.component.css b/app/shared/user-display/user-display.component.css index a1933fb..f2895e0 100644 --- a/app/shared/user-display/user-display.component.css +++ b/app/shared/user-display/user-display.component.css @@ -7,11 +7,12 @@ background-color: rgba(0, 0, 0, .35); } -/* no image styles should go here, i guess */ -.list-wrapper >>> .icon { - /*font-size: 22; +.user-image, +.user-name { vertical-align: middle; - text-align: center; - color: rgba(255, 255, 255, .5); - background-color: rgba(0, 0, 0, .05);*/ +} + +.user-name { + margin-left: 5; + color: #000; } diff --git a/app/shared/user-list/user-list.component.css b/app/shared/user-list/user-list.component.css index e69de29..96c34d4 100644 --- a/app/shared/user-list/user-list.component.css +++ b/app/shared/user-list/user-list.component.css @@ -0,0 +1,22 @@ +.item { + padding: 10 0; +} + +.user-display, +.organizer { + vertical-align: middle; +} + +.organizer { + margin-left: 5; + font-size: 12; +} + +.user-display >>> Image, +.user-display >>> .no-image { + width: 30; + height: 30; + margin-right: 5; + border-radius: 15; + background-color: rgba(0, 0, 0, .35); +} diff --git a/app/shared/user-list/user-list.template.html b/app/shared/user-list/user-list.template.html index ef5515b..346020e 100644 --- a/app/shared/user-list/user-list.template.html +++ b/app/shared/user-list/user-list.template.html @@ -1,9 +1,12 @@ - +