mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
add timebomb to mobile view
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user