mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 21:35:50 +00:00
save
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
<ion-header class="ion-no-border">
|
||||
<div class="header-content">
|
||||
<div class="header-icon-left">
|
||||
<ion-icon (click)="close()" src="assets/images/icons-arrow-arrow-left.svg"></ion-icon>
|
||||
<button class="btn-no-color" (click)="close()">
|
||||
<ion-icon src="assets/images/icons-arrow-arrow-left.svg"></ion-icon>
|
||||
</button>
|
||||
</div>
|
||||
<div class="header-title">
|
||||
<label>Notas</label>
|
||||
|
||||
@@ -19,6 +19,7 @@ import { MessagesPage } from './messages/messages.page';
|
||||
import { NewGroupPage } from './new-group/new-group.page';
|
||||
import { NewchatPage } from './newchat/newchat.page';
|
||||
import { Storage } from '@ionic/storage';
|
||||
import { AlertService } from 'src/app/services/alert.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-chat',
|
||||
@@ -76,6 +77,7 @@ export class ChatPage implements OnInit {
|
||||
private authService: AuthService,
|
||||
private storage:Storage,
|
||||
private resolver: ComponentFactoryResolver,
|
||||
private alertService: AlertService,
|
||||
|
||||
) {
|
||||
this.headers = new HttpHeaders();
|
||||
|
||||
@@ -98,6 +98,8 @@ export class ContactsPage implements OnInit {
|
||||
this.chatService.createRoom(body).subscribe(res => {
|
||||
console.log(res);
|
||||
this.room = res['room'];
|
||||
console.log(this.room._id);
|
||||
|
||||
this.getDirectMessage(this.room._id);
|
||||
});
|
||||
}
|
||||
@@ -106,21 +108,22 @@ export class ContactsPage implements OnInit {
|
||||
|
||||
this.chatService.getAllDirectMessages().subscribe(res=>{
|
||||
let result = res['ims'].filter(data => data._id == roomId);
|
||||
console.log(result[0]);
|
||||
|
||||
this.dm = result[0];
|
||||
console.log(this.dm);
|
||||
this.openModal(this.dm);
|
||||
this.openModal(this.dm._id);
|
||||
});
|
||||
}
|
||||
async openModal(dm:any){
|
||||
async openModal(roomId:any){
|
||||
this.close();
|
||||
console.log(dm);
|
||||
console.log(roomId);
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: MessagesPage,
|
||||
cssClass: 'group-messages',
|
||||
backdropDismiss: false,
|
||||
componentProps: {
|
||||
dm: dm,
|
||||
roomId: roomId,
|
||||
},
|
||||
});
|
||||
await modal.present();
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<ion-segment-button value="expediente">
|
||||
Expediente
|
||||
</ion-segment-button>
|
||||
<ion-segment-button value="pendentes">
|
||||
<ion-segment-button value="pendentes" (click)="notImplemented()">
|
||||
Pendentes
|
||||
</ion-segment-button>
|
||||
</ion-segment>
|
||||
|
||||
@@ -8,6 +8,7 @@ import { formatDate } from '@angular/common';
|
||||
import { LoadingService } from 'src/app/services/loading.service';
|
||||
import { ModalController, NavParams } from '@ionic/angular';
|
||||
import { ExpedienteDetailPage } from 'src/app/pages/gabinete-digital/expediente/expediente-detail/expediente-detail.page';
|
||||
import { AlertService } from 'src/app/services/alert.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-expedients',
|
||||
@@ -29,6 +30,7 @@ export class ExpedientsPage implements OnInit {
|
||||
constructor(
|
||||
private processes:ProcessesService,
|
||||
private modalController: ModalController,
|
||||
private alertService: AlertService,
|
||||
) {
|
||||
this.profile = 'mdgpr';
|
||||
}
|
||||
@@ -39,6 +41,10 @@ export class ExpedientsPage implements OnInit {
|
||||
this.LoadList();
|
||||
}
|
||||
|
||||
notImplemented(){
|
||||
this.alertService.presentAlert('Funcionalidade em desenvolvimento');
|
||||
}
|
||||
|
||||
openExpedientDetailPage(data){
|
||||
console.log(data);
|
||||
this.openExpedientDetail.emit(data);
|
||||
|
||||
Reference in New Issue
Block a user