mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
Merge branch 'developer' of bitbucket.org:equilibriumito/gabinete-digital into developer
This commit is contained in:
@@ -23,9 +23,9 @@
|
||||
</ion-label>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="roomCountDownDate" class="d-flex align-items-center yellow-orange pl-10">
|
||||
<div *ngIf="room.customFields.countDownDate" class="d-flex align-items-center yellow-orange pl-10">
|
||||
<i class="far fa-clock font-15" ></i>
|
||||
<ion-label class="font-15 pl-10" color="warning">{{roomCountDownDate}}</ion-label>
|
||||
<ion-label class="font-15 pl-10" color="warning">{{countDownDate()}}</ion-label>
|
||||
</div>
|
||||
</div>
|
||||
</ion-toolbar>
|
||||
|
||||
@@ -56,7 +56,8 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
||||
currentPosition: any;
|
||||
startPosition: number;
|
||||
scrollToBottomBtn = false;
|
||||
roomCountDownDate:any;
|
||||
roomCountDownDate:string;
|
||||
roomCountDownTime:string;
|
||||
|
||||
@Input() roomId:string;
|
||||
@Output() closeAllDesktopComponents:EventEmitter<any> = new EventEmitter<any>();
|
||||
@@ -89,6 +90,8 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
||||
) {
|
||||
this.loggedUserChat = authService.ValidatedUserChat['data'];
|
||||
this.isGroupCreated = true;
|
||||
this.roomCountDownDate = "";
|
||||
this.roomCountDownTime = "";
|
||||
|
||||
}
|
||||
ngOnChanges(changes: SimpleChanges): void {
|
||||
@@ -100,49 +103,18 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
||||
this.loggedUser=this.loggedUserChat;
|
||||
this.getRoomInfo();
|
||||
this.serverLongPull();
|
||||
console.log(this.roomId);
|
||||
this.setStatus('online');
|
||||
this.getChatMembers();
|
||||
|
||||
/* pdfjs.Lib.getDocument('sample.pdf').promise.then((doc)=>{
|
||||
console.log(doc);
|
||||
|
||||
}) */
|
||||
//this.loadPDF();
|
||||
}
|
||||
|
||||
/* loadPDF() {
|
||||
const loadingTask = pdfjsLib.getDocument( this.pdfurl );
|
||||
loadingTask.promise.then((pdf) => {
|
||||
console.log( "pdf: ", pdf );
|
||||
console.log('PDF loaded');
|
||||
showDateDuration(start:any){
|
||||
return this.timeService.showDateDuration(start);
|
||||
}
|
||||
|
||||
// Fetch the first page
|
||||
var pageNumber = 1;
|
||||
pdf.getPage(pageNumber).then(function(page) {
|
||||
console.log('Page loaded');
|
||||
|
||||
var scale = 1.5;
|
||||
var viewport = page.getViewport({scale: scale});
|
||||
|
||||
// Prepare canvas using PDF page dimensions
|
||||
var canvas: any = document.getElementById('pdf_canvas');
|
||||
var context = canvas.getContext('2d');
|
||||
canvas.height = viewport.height;
|
||||
canvas.width = viewport.width;
|
||||
|
||||
// Render PDF page into canvas context
|
||||
var renderContext = {
|
||||
canvasContext: context,
|
||||
viewport: viewport
|
||||
};
|
||||
var renderTask = page.render(renderContext);
|
||||
renderTask.promise.then(function () {
|
||||
console.log('Page rendered');
|
||||
});
|
||||
});
|
||||
});
|
||||
} */
|
||||
countDownDate(){
|
||||
//this.roomCountDownTime = this.timeService.countDownDateTimer(this.roomCountDownDate, this.room._id);
|
||||
return this.timeService.countDownDateTimer(this.roomCountDownDate, this.roomId);
|
||||
}
|
||||
|
||||
setStatus(status:string){
|
||||
let body = {
|
||||
@@ -235,30 +207,19 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
||||
console.log('here watching');
|
||||
return this.roomId;
|
||||
}
|
||||
showDateDuration(start:any){
|
||||
return this.timeService.showDateDuration(start);
|
||||
}
|
||||
|
||||
countDownDate(date:any, roomId:string){
|
||||
return this.timeService.countDownDate(date, roomId);
|
||||
}
|
||||
async getRoomInfo(){
|
||||
let room = await this.chatService.getRoomInfo(this.roomId).toPromise();
|
||||
this.room=room['room'];
|
||||
if(this.room.name){
|
||||
this.roomName = this.room.name.split('-').join(' ');
|
||||
}
|
||||
|
||||
getRoomInfo(){
|
||||
this.showLoader = true;
|
||||
this.chatService.getRoomInfo(this.roomId).subscribe(room=>{
|
||||
console.log(room);
|
||||
if(this.room.customFields.countDownDate){
|
||||
this.roomCountDownDate = this.room.customFields.countDownDate;
|
||||
}
|
||||
|
||||
this.room = room['room'];
|
||||
if(this.room.name){
|
||||
this.roomName = this.room.name.split('-').join(' ');
|
||||
}
|
||||
if(this.room.customFields.countDownDate){
|
||||
this.roomCountDownDate = this.timeService.countDownDate(this.room.customFields.countDownDate, this.room._id);
|
||||
}
|
||||
this.getGroupContacts(this.room);
|
||||
//this.loadGroupMessages(this.room);
|
||||
this.showLoader = false;
|
||||
});
|
||||
this.getGroupContacts(this.room);
|
||||
}
|
||||
|
||||
getGroupContacts(room:any){
|
||||
|
||||
Reference in New Issue
Block a user