add timebomb to mobile view

This commit is contained in:
tiago.kayaya
2021-10-28 15:40:41 +01:00
parent 2b442e76db
commit bccb4ed0d5
12 changed files with 151 additions and 169 deletions
+16 -10
View File
@@ -42,12 +42,16 @@ export class NewGroupPage implements OnInit {
_ionChange(event){
console.log(event);
console.log(event.detail.checked);
this.showDuration = event.detail.checked;
this.showDuration = event.detail.checked;
//this.thedate = new Date(2021, 10, 1, 10, 33, 30, 0);
this.thedate = new Date();
if(event.detail.checked){
this.thedate = new Date();
}
else{
this.thedate = '';
}
}
close(){
//this.modalController.dismiss();
console.log('close');
@@ -63,13 +67,15 @@ export class NewGroupPage implements OnInit {
this.addGroupMessage.emit(res['group']._id);
let countDownBody = {
"roomId": res['group']._id,
"customFields":{"countDownDate":this.thedate}
if(this.thedate){
let countDownBody = {
"roomId": res['group']._id,
"customFields":{"countDownDate":this.thedate}
}
this.chatService.setGroupCustomFields(countDownBody).subscribe(res=>{
console.log(res);
});
}
this.chatService.setGroupCustomFields(countDownBody).subscribe(res=>{
console.log(res);
});
});
}