This commit is contained in:
tiago.kayaya
2021-09-01 17:14:57 +01:00
parent c7f8d5a583
commit adecc6ebd0
5 changed files with 23 additions and 13 deletions
+7 -7
View File
@@ -17,7 +17,7 @@
<div class="main-content">
<!-- Toolbar -->
<ion-progress-bar type="indeterminate" *ngIf="showLoader"></ion-progress-bar>
<div>
<!-- Calendar is here -->
<div class="calendar-segment-{{profile}}" [class.calendar-segment-pr-force]="loggeduser.Profile =='PR'">
@@ -219,7 +219,7 @@
</div>
</div>
</div>
<div class="fs-timeline flex-grow-1 d-none d-md-block d-md-block text-black pr-20 width-100 height-100 overflow-y-auto" *ngIf="loggeduser.Profile == 'MDGPR'">
<div *ngFor="let events of TimelineMDList | keyvalue;" >
@@ -229,7 +229,7 @@
</div>
<div *ngFor="let event of events.value" class="EventListBox" >
<div class="d-flex content-mdgpr-{{event.event.CalendarName}} mt-10 cursor-pointer" (click)="eventClicked(event)"
<div class="d-flex content-mdgpr-{{event.event.CalendarName}} mt-10 cursor-pointer item-hover" (click)="eventClicked(event)"
*ngIf="viewEventMonth <= dateMonth(event) && showEventBox(event)">
<div class="schedule-time" *ngIf="!event.event.IsAllDayEvent">
@@ -271,7 +271,7 @@
<div *ngFor="let event of events.value" class="EventListBox" >
<div class="d-flex content-pr-{{event.event.CalendarName}} mt-10 cursor-pointer" (click)="eventClicked(event)"
<div class="d-flex content-pr-{{event.event.CalendarName}} mt-10 cursor-pointer item-hover" (click)="eventClicked(event)"
*ngIf="viewEventMonth <= dateMonth(event) && showEventBox(event) ">
<div class="schedule-time" *ngIf="!event.event.IsAllDayEvent">
@@ -327,7 +327,7 @@
</div>
<!-- New -->
<app-new-event *ngIf="mobileComponent.showAddNewEvent"
<app-new-event *ngIf="mobileComponent.showAddNewEvent"
[profile]="profile"
[selectedSegment]=segment
[taskParticipants]="taskParticipants"
@@ -345,7 +345,7 @@
></app-new-event>
<!-- Edit -->
<app-edit-event *ngIf="mobileComponent.showEditEvent"
<app-edit-event *ngIf="mobileComponent.showEditEvent"
[taskParticipants]="taskParticipants"
[taskParticipantsCc]="taskParticipantsCc"
[profile]="profile"
@@ -432,4 +432,4 @@
</div>
</ion-content>
</ion-content>
+13 -3
View File
@@ -1,6 +1,7 @@
import { AfterViewChecked, AfterViewInit, Component, ElementRef, OnDestroy, OnInit, ViewChild } from '@angular/core';
import {ActivatedRoute, Router} from '@angular/router'
import { ModalController, NavParams, PopoverController } from '@ionic/angular';
import { map } from 'rxjs/operators';
import { ContactsPage } from 'src/app/pages/chat/messages/contacts/contacts.page';
import { AlertService } from 'src/app/services/alert.service';
import { AuthService } from 'src/app/services/auth.service';
@@ -151,7 +152,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
loadMessages() {
this.showLoader = true;
const roomId = this.roomId
this.chatService.getRoomMessages(this.roomId).subscribe(res => {
/* console.log(res); */
this.messages = res['messages'].reverse();
@@ -252,9 +253,18 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
}
async serverLongPull() {
alert('YAS')
const roomId = this.roomId
this.chatService.getRoomMessages(roomId).subscribe(async res => {
this.chatService.getRoomMessages(roomId).subscribe(res=>{
console.log(res);
})
/* this.chatService.getRoomMessages(roomId).subscribe(async res => {
if (res == 502) {
// Connection timeout
@@ -287,7 +297,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
//this.loadMessages()
await this.serverLongPull();
}
});
}); */
}
}
+1 -1
View File
@@ -102,7 +102,7 @@ export class LoginPage implements OnInit {
if (attempt) {
await this.authService.loginChat(this.userattempt);
await this.getToken();
this.router.navigate(['/pin']);
}
+1 -1
View File
@@ -99,7 +99,7 @@ export class ChatService {
let opts = {
headers: this.headers,
params: params
params: params,
}
return this.http.get(environment.apiChatUrl+'im.history', opts);
}
@@ -33,7 +33,7 @@
<!-- </div> -->
<ion-list class="width-100" *ngSwitchCase="'MDGPR'" >
<div
class="item ion-no-padding width-100 cursor-pointer"
class="item item-hover ion-no-padding width-100 cursor-pointer"
*ngFor="let event of eventsMDGPRList"
(click)="openApproveModal(event.serialNumber, event)"
>