Change date text and fix query for group member count.

This commit is contained in:
Georgi Prodanov 2017-02-28 12:07:19 +02:00
Родитель ea2f507816
Коммит 2f98ff6d81
5 изменённых файлов: 7 добавлений и 10 удалений

Просмотреть файл

@ -67,12 +67,9 @@ export class GroupsService {
}
getUserCountByGroup(userId: string): Promise<{GroupId: string, UserId: number}[]> {
return this.getUnjoinedGroups(userId)
.then(groups => {
let query = this._elProvider.getNewAggregateQuery();
query.groupBy('GroupId').count('UserId');
return this._membershipsData.aggregate(query);
})
let query = this._elProvider.getNewAggregateQuery();
query.groupBy('GroupId').count('UserId');
return this._membershipsData.aggregate(query)
.then((res: any) => res.result);
}

Просмотреть файл

@ -1,4 +1,4 @@
<StackLayout class="app-modal-cntnr" [ngClass]="{ 'no-fullscreen': !fullscreen }">
<StackLayout class="app-modal-cntnr" [ngClass]="{ 'no-fullscreen': !fullscreen, 'just-loading': justLoading }">
<Label *ngIf="title" class="app-modal-title" [text]="title" textWrap="true"></Label>
<Label *ngIf="text" class="app-modal-text" [text]="text" textWrap="true"></Label>

Просмотреть файл

@ -11,5 +11,5 @@ export const modalsTimeout = 3000;
export const extendedLoadingThreshold = 1500;
export const systemErrorMsgs = {
'Iterator timed out': 'We are unable to fulfill this request at this time. Please try again later'
'Iterator timed out': 'The operation took too long. Please try again later'
};

Просмотреть файл

@ -35,7 +35,7 @@ export class DateTimePickerModalComponent {
configureDatePicker(picker: DatePicker) {
let now = new Date();
let oneYear = 31536000000;
const oneYear = 31536000000;
picker.date = now;
if (!this._isEdit) {

Просмотреть файл

@ -64,7 +64,7 @@ export class EventListComponent implements OnInit {
let eventDate = this.getEventDate(event);
if (!eventDate) {
return 'TBD';
return 'DATE TBD';
}
let days = Math.round((eventDate.getTime() - Date.now()) / oneDay);