This commit is contained in:
Peter Maquiran
2022-09-28 16:33:13 +01:00
parent c43f7b458a
commit f2b4128836
7 changed files with 33 additions and 50 deletions
+3 -2
View File
@@ -18,9 +18,9 @@
</div>
<div class="div-icon">
<button (click)="openChatDebuggingPageModal()" title="Nova Conversa Individual" class="btn-no-color font-12">
<!-- <button (click)="openChatDebuggingPageModal()" title="Nova Conversa Individual" class="btn-no-color font-12">
Dev
</button>
</button> -->
<button title="Nova Conversa Individual" class="btn-no-color" (click)="openContactsPage()">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="end" src="assets/images/icons-chat-new-conversation.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src="assets/images/theme/gov/icons-chat-new-conversation.svg"></ion-icon>
@@ -213,6 +213,7 @@
(addGroupMessage)="openGroupContactsPage($event)"
(closeAllDesktopComponents)="closeAllDesktopComponents()"
[style.display]="showNewGroup ? 'flex' : 'none'"
*ngIf="showNewGroup"
class=" height-100 flex-column">
</app-new-group>
+17 -19
View File
@@ -16,7 +16,7 @@ import { MessagesPage } from './messages/messages.page';
import { NewGroupPage } from './new-group/new-group.page';
import { EditGroupPage } from 'src/app/shared/chat/edit-group/edit-group.page';
import { Subject } from "rxjs/Rx";
import { NavigationStart, Router } from '@angular/router';
import { NavigationStart, Router, NavigationEnd } from '@angular/router';
import { EventPerson } from 'src/app/models/eventperson.model';
import { removeDuplicate } from 'src/plugin/removeDuplicate.js'
import { environment } from 'src/environments/environment';
@@ -142,30 +142,29 @@ export class ChatPage implements OnInit {
this.hideRefreshButton();
this.getChatMembers();
let t = this.showDateDuration(new Date());
this.checkCreateGroup();
this.router.events.forEach((event) => {
if (event instanceof NavigationEnd && event.url == '/home/chat' ||
event instanceof NavigationEnd && event.url == "/home/chat?gbCreateGroup=true") {
this.checkCreateGroup();
}
});
}
checkCreateGroup() {
if (this.dataService.get("newGroup")) {
this.openNewGroupPage();
}
else{
else {
this.closeAllDesktopComponents();
this.showEmptyComponent = true;
}
/* this.router.events.forEach((event) => {
if (event instanceof NavigationStart || event.url.endsWith('/home/chat')) {
if (this.dataService.get("newGroup")) {
this.openNewGroupPage();
}
else{
this.closeAllDesktopComponents();
this.showEmptyComponent = true;
}
}
else{
this.dataService.set("newGroup", false);
}
}); */
}
numSequence(n: number): Array<number> {
@@ -174,7 +173,6 @@ export class ChatPage implements OnInit {
ngOnDestroy() {
this.setStatus('offline');
this.dataService.set("newGroup", false);
}
@@ -3,7 +3,7 @@ import { ProcessesService } from 'src/app/services/processes.service';
import { AttachmentsService } from 'src/app/services/attachments.service';
import { EventsService } from 'src/app/services/events.service';
import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
import { ActivatedRoute, Router } from '@angular/router';
import { ActivatedRoute, NavigationExtras, Router } from '@angular/router';
import { Event } from '../../../../models/event.model';
import { ModalController, PopoverController } from '@ionic/angular';
import { ExpedientTaskModalPage } from '../expedient-task-modal/expedient-task-modal.page';
@@ -656,7 +656,6 @@ export class ExpedienteDetailPage implements OnInit {
openNewGroupPage() {
if (window.innerWidth < 701) {
this.router.navigate(['/home/chat']);
this.newGroup();
}
else {
@@ -666,7 +665,9 @@ export class ExpedienteDetailPage implements OnInit {
this.dataService.set("task", this.task);
this.dataService.set("newGroupName", this.task.Folio);
this.dataService.set("documents", this.fulltask.Documents);
this.router.navigate(['/home/chat']);
setTimeout(()=> {
this.router.navigate(['/home/chat']);
}, 100)
}
}