add timebomb feature

This commit is contained in:
tiago.kayaya
2021-10-27 08:45:37 +01:00
parent 5c942e6e9b
commit ae9bc339c9
12 changed files with 153 additions and 27 deletions
@@ -21,6 +21,10 @@
</ion-label>
</div>
</div>
<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">{{countDownDate(room.customFields.countDownDate, room._id)}}</ion-label>
</div>
</div>
</ion-toolbar>
</ion-header>
@@ -237,9 +237,15 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
return this.timeService.showDateDuration(start);
}
countDownDate(date:any, roomId:string){
return this.timeService.countDownDate(date, roomId);
}
getRoomInfo(){
this.showLoader = true;
this.chatService.getRoomInfo(this.roomId).subscribe(room=>{
console.log(room);
this.room = room['room'];
if(this.room.name){
this.roomName = this.room.name.split('-').join(' ');