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
@@ -21,12 +21,12 @@
<ion-input [(ngModel)]="groupName" placeholder="Título"></ion-input>
</div>
<div *ngIf="true" class="item-container-no-border">
<div class="item-container-no-border">
<ion-checkbox (ionChange)="_ionChange($event)" color="primary"></ion-checkbox>
<ion-label>Grupo Ultra-secreto</ion-label>
</div>
<!-- *ngIf="showDuration" -->
<div class="container-div">
<div *ngIf="showDuration" class="container-div">
<div class="ion-item-class-2">
<div class="ion-icon-class">
<ion-icon slot="start" src="assets/images/icons-duration.svg"></ion-icon>
@@ -36,11 +36,5 @@
</div>
</div>
</div>
<ion-label>{{displayDuration}}</ion-label>
<br />
<ion-label>{{thedate}}</ion-label>
<br />
<ion-label>{{countDownTime}}</ion-label>
</div>
</ion-content>
+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);
});
});
}