This commit is contained in:
tiago.kayaya
2021-12-01 15:11:54 +01:00
parent 94550db0eb
commit f4f7976a6d
8 changed files with 35 additions and 15 deletions
+3 -3
View File
@@ -153,14 +153,14 @@ export class ChatPage implements OnInit {
console.log(t);
this.setStatus('away');
if(this.dataService.get("newGroup")){
/* if(this.dataService.get("newGroup")){
this.openNewGroupPage();
}
} */
this.router.events.forEach((event) => {
if (event instanceof NavigationStart && event.url.startsWith('/home/chat')) {
if (window.location.pathname.split('/').length >= 4 && window.location.pathname.startsWith('/home/chat')) {
alert('OIII')
//alert('OIII')
} else {
if(this.dataService.get("newGroup")){
this.openNewGroupPage();
@@ -583,4 +583,8 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
});
}
openPreview(){
}
}
@@ -118,7 +118,7 @@
<button (click)="openExpedientActionsModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button>
<button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
<button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
<button (click)="openNewGroupPage()" class="btn-cancel" shape="round" >Iniciar Conversa</button>
<button (click)="openNewGroupPage(task)" class="btn-cancel" shape="round" >Iniciar Conversa</button>
<div hidden class="solid"></div>
<button hidden class="btn-cancel" shape="round" >Delegar</button>
@@ -615,7 +615,7 @@ export class ExpedienteDetailPage implements OnInit {
return await popover.present();
}
openNewGroupPage(){
openNewGroupPage(task?:any){
this.router.navigate(['/home/chat']);
this.dataService.set("newGroup", true);
@@ -624,8 +624,8 @@ export class ExpedienteDetailPage implements OnInit {
}
else{
this.dataService.set("newGroup", true);
/* this.closeAllDesktopComponents();
this.showNewGroup=true; */
this.dataService.set("task", this.task);
this.dataService.set("newGroupName", this.task.Folio);
}
}
@@ -635,6 +635,7 @@ export class ExpedienteDetailPage implements OnInit {
cssClass: 'modal modal-desktop',
componentProps: {
name: this.task.Folio,
task: this.task
},
});
await modal.present();
@@ -131,7 +131,7 @@
<button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
</div>
<div class="buttons">
<button (click)="openNewGroupPage()" class="btn-cancel" shape="round" >Iniciar Conversa</button>
<button (click)="openNewGroupPage(task)" class="btn-cancel" shape="round" >Iniciar Conversa</button>
</div>
</div>
</div>
@@ -480,7 +480,7 @@ export class PedidoPage implements OnInit {
modal.onDidDismiss();
}
openNewGroupPage(){
openNewGroupPage(task?:any){
this.router.navigate(['/home/chat']);
this.dataService.set("newGroup", true);
@@ -489,8 +489,8 @@ export class PedidoPage implements OnInit {
}
else{
this.dataService.set("newGroup", true);
/* this.closeAllDesktopComponents();
this.showNewGroup=true; */
this.dataService.set("task", this.task);
this.dataService.set("newGroupName", this.task.Folio);
}
}
@@ -500,6 +500,7 @@ export class PedidoPage implements OnInit {
cssClass: 'modal modal-desktop',
componentProps: {
name: this.task.Folio,
task: this.task
},
});
await modal.present();
@@ -553,7 +553,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
let url = await this.processesService.GetDocumentUrl(res.data.selected.Id, res.data.selected.ApplicationType).toPromise();
let url_no_options: string = url.replace("webTRIX.Viewer","webTRIX.Viewer.Branch1");
console.log(url_no_options);
console.log('Oie');
//console.log('Oie');
let body = {
"message":
@@ -1,7 +1,8 @@
import { analyzeAndValidateNgModules } from '@angular/compiler';
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { Component, EventEmitter, Input, OnDestroy, OnInit, Output } from '@angular/core';
import { ModalController, NavParams, PickerController, PopoverController } from '@ionic/angular';
import { ChatService } from 'src/app/services/chat.service';
import { DataService } from 'src/app/services/data.service';
import { GroupDurationPage } from 'src/app/shared/popover/group-duration/group-duration.page';
import { GroupContactsPage } from '../group-messages/group-contacts/group-contacts.page';
@@ -10,7 +11,7 @@ import { GroupContactsPage } from '../group-messages/group-contacts/group-contac
templateUrl: './new-group.page.html',
styleUrls: ['./new-group.page.scss'],
})
export class NewGroupPage implements OnInit {
export class NewGroupPage implements OnInit{
isGroupCreated:boolean;
showLoader: boolean;
displayDuration: any;
@@ -20,6 +21,7 @@ export class NewGroupPage implements OnInit {
selectedDuration = ['','',''];
countDownTime:any;
//groupName:string;
task:any;
@Input() groupName:string;
@Output() addGroupMessage:EventEmitter<any> = new EventEmitter<any>();
@@ -29,16 +31,28 @@ export class NewGroupPage implements OnInit {
private popoverController: PopoverController,
private modalController: ModalController,
private chatService: ChatService,
//private navParams: NavParams,
private dataService:DataService,
)
{
this.isGroupCreated = false;
//this.groupName = this.navParams.get('name');
}
ngOnInit() {
if(this.dataService.get("newGroup")){
this.task = this.dataService.get("task");
this.groupName = this.task.Folio;
}
console.log(this.task);
}
/* ngOnDestroy(){
alert('Destroy')
this.dataService.set("newGroup", false);
this.dataService.set("task", null);
this.dataService.set("newGroupName", '');
} */
_ionChange(event){
console.log(event);
console.log(event.detail.checked);