Bug on notifications

This commit is contained in:
Eudes Inácio
2021-04-14 13:30:13 +01:00
17 changed files with 77 additions and 22 deletions
+5 -5
View File
@@ -77,9 +77,9 @@ export class HomePage implements OnInit {
ngOnInit() {
this.pushCordova();
/* //Initialize profile as mdgpr
//Initialize profile as mdgpr
let date = new Date();
/* let date = new Date();
date.setMonth(date.getMonth() + 1);
let start = date.getFullYear()+"-"+ date.getMonth()+"-"+date.getDate()+" "+date.getHours()+":"+date.getMinutes()+ ":"+date.getSeconds();
let end = date.getFullYear()+"-"+ date.getMonth()+"-"+date.getDate()+" 23:59:59";
@@ -99,10 +99,10 @@ export class HomePage implements OnInit {
}
this.processesbackend.GetTasksList("Expediente", true).subscribe(result => {
this.totalExpediente = result;
});
this.totalExpediente = result;
});*/
*/
}
pushCordova() {
@@ -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>
+2
View File
@@ -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',
@@ -99,6 +100,7 @@ export class ChatPage implements OnInit {
console.log(this.roomId);
}
closeAllDesktopComponents() {
this.showMessages=false;
this.showContacts=false;
@@ -87,7 +87,9 @@
<div class="width-80">
<ion-item class="ion-no-padding type-message" lines="none">
<ion-textarea clearOnEdit="true" placeholder="Escrever uma mensagem" auto-grow class="message-input" rows="1" [(ngModel)]="message"></ion-textarea>
<ion-icon slot="end" src="assets/icon/icons-chat-mic.svg"></ion-icon>
<button class="btn-no-color" (click)="notImplemented()">
<ion-icon slot="end" src="assets/icon/icons-chat-mic.svg"></ion-icon>
</button>
</ion-item>
</div>
<div>
@@ -1,5 +1,6 @@
import { Component, OnInit } from '@angular/core';
import { ActionSheetController, MenuController, ModalController, NavParams, PopoverController } from '@ionic/angular';
import { AlertService } from 'src/app/services/alert.service';
import { AuthService } from 'src/app/services/auth.service';
import { ChatService } from 'src/app/services/chat.service';
import { ChatOptionsPopoverPage } from 'src/app/shared/popover/chat-options-popover/chat-options-popover.page';
@@ -36,6 +37,7 @@ export class GroupMessagesPage implements OnInit {
private chatService: ChatService,
private navParams: NavParams,
private authService: AuthService,
private alertService: AlertService,
) {
this.isGroupCreated = true;
this.roomId = this.navParams.get('roomId');
@@ -49,6 +51,10 @@ export class GroupMessagesPage implements OnInit {
this.getRoomInfo();
}
notImplemented(){
this.alertService.presentAlert('Funcionalidade em desenvolvimento');
}
getRoomInfo(){
this.showLoader = true;
this.chatService.getRoomInfo(this.roomId).subscribe(room=>{
@@ -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();
@@ -82,7 +82,9 @@
<div class="width-70">
<ion-item class="ion-no-padding ion-no-margin type-message" lines="none">
<ion-textarea clearOnEdit="true" placeholder="Escrever uma mensagem" auto-grow class="message-input" rows="1" [(ngModel)]="message"></ion-textarea>
<ion-icon slot="end" src="assets/icon/icons-chat-mic.svg"></ion-icon>
<button class="btn-no-color" (click)="notImplemented()">
<ion-icon slot="end" src="assets/icon/icons-chat-mic.svg"></ion-icon>
</button>
</ion-item>
</div>
<div>
@@ -2,6 +2,7 @@ import { AfterViewChecked, Component, ElementRef, OnInit, ViewChild } from '@ang
import { ModalController, NavParams, PopoverController } from '@ionic/angular';
import { Status } from 'src/app/models/chat/status.model';
import { ContactsPage } from 'src/app/pages/chat/messages/contacts/contacts.page';
import { AlertService } from 'src/app/services/alert.service';
import { AuthService } from 'src/app/services/auth.service';
import { ChatService } from 'src/app/services/chat.service';
import { ChatOptionsPopoverPage } from 'src/app/shared/popover/chat-options-popover/chat-options-popover.page';
@@ -32,6 +33,7 @@ export class MessagesPage implements OnInit, AfterViewChecked {
private navParams: NavParams,
private chatService: ChatService,
private authService: AuthService,
private alertService: AlertService,
) {
this.roomId = this.navParams.get('roomId');
}
@@ -50,6 +52,11 @@ export class MessagesPage implements OnInit, AfterViewChecked {
/* }, 9000); */
}
notImplemented(){
this.alertService.presentAlert('Funcionalidade em desenvolvimento');
}
close(){
this.modalController.dismiss();
}
@@ -65,7 +65,9 @@
<div class="width-80">
<ion-item class="ion-no-padding type-message" lines="none">
<ion-textarea clearOnEdit="true" placeholder="Escrever uma mensagem" auto-grow class="message-input" rows="1" [(ngModel)]="message"></ion-textarea>
<ion-icon slot="end" src="assets/icon/icons-chat-mic.svg"></ion-icon>
<button class="btn-no-color" (click)="notImplemented()">
<ion-icon slot="end" src="assets/icon/icons-chat-mic.svg"></ion-icon>
</button>
</ion-item>
</div>
<div>
@@ -1,5 +1,6 @@
import { Component, OnChanges, OnInit, Input, SimpleChanges, Output, EventEmitter} from '@angular/core';
import { ActionSheetController, AnimationController, MenuController, ModalController, PopoverController } from '@ionic/angular';
import { AlertService } from 'src/app/services/alert.service';
import { AuthService } from 'src/app/services/auth.service';
import { ChatService } from 'src/app/services/chat.service';
import { ChatOptionsPopoverPage } from 'src/app/shared/popover/chat-options-popover/chat-options-popover.page';
@@ -35,6 +36,7 @@ export class GroupMessagesPage implements OnInit, OnChanges {
private chatService: ChatService,
private authService: AuthService,
private animationController: AnimationController,
private alertService: AlertService,
) {
this.isGroupCreated = true;
}
@@ -51,6 +53,10 @@ export class GroupMessagesPage implements OnInit, OnChanges {
console.log(this.roomId);
}
notImplemented(){
this.alertService.presentAlert('Funcionalidade em desenvolvimento');
}
openGroupContactsPage(){
this.openGroupContacts.emit(this.roomId);
}
@@ -57,7 +57,9 @@
<div class="width-80">
<ion-item class="ion-no-padding type-message" lines="none">
<ion-textarea clearOnEdit="true" placeholder="Escrever uma mensagem" auto-grow class="message-input" rows="1" [(ngModel)]="message"></ion-textarea>
<ion-icon slot="end" src="assets/icon/icons-chat-mic.svg"></ion-icon>
<button class="btn-no-color" (click)="notImplemented()">
<ion-icon slot="end" src="assets/icon/icons-chat-mic.svg"></ion-icon>
</button>
</ion-item>
</div>
<div>
@@ -1,6 +1,7 @@
import { AfterViewChecked, Component, ElementRef, Input, OnChanges, OnInit, SimpleChanges, ViewChild } from '@angular/core';
import { AnimationController, ModalController, NavParams, PopoverController } from '@ionic/angular';
import { Status } from 'src/app/models/chat/status.model';
import { AlertService } from 'src/app/services/alert.service';
import { AuthService } from 'src/app/services/auth.service';
import { ChatService } from 'src/app/services/chat.service';
import { ChatOptionsPopoverPage } from 'src/app/shared/popover/chat-options-popover/chat-options-popover.page';
@@ -35,6 +36,7 @@ export class MessagesPage implements OnInit, AfterViewChecked, OnChanges {
private chatService: ChatService,
private authService: AuthService,
private animationController: AnimationController,
private alertService: AlertService,
) {
/* this.dm = this.navParams.get('dm'); */
}
@@ -61,6 +63,11 @@ export class MessagesPage implements OnInit, AfterViewChecked, OnChanges {
}
notImplemented(){
this.alertService.presentAlert('Funcionalidade em desenvolvimento');
}
load(){
this.loadMessages();
this.getChatMembers();
@@ -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);
@@ -5,10 +5,10 @@
</button>
</div>
<div class="buttons">
<button full class="btn-ok" shape="round" >Tirar Fotografia</button>
<button class="btn-ok" shape="round" >Digitalizar Documento</button>
<button full class="btn-ok" shape="round" >Anexar Fotografia</button>
<button class="btn-ok" shape="round" >Anexar Documento</button>
<button (click)="notImplemented()" full class="btn-ok" shape="round" >Tirar Fotografia</button>
<button (click)="notImplemented()" class="btn-ok" shape="round" >Digitalizar Documento</button>
<button (click)="notImplemented()" full class="btn-ok" shape="round" >Anexar Fotografia</button>
<button (click)="notImplemented()" class="btn-ok" shape="round" >Anexar Documento</button>
<div class="solid"></div>
<button (click)="close()" full class="btn-cancel" shape="round" >Cancelar</button>
</div>
@@ -1,5 +1,6 @@
import { Component, OnInit } from '@angular/core';
import { ModalController, PopoverController } from '@ionic/angular';
import { AlertService } from 'src/app/services/alert.service';
@Component({
selector: 'app-chat-options-popover',
@@ -11,11 +12,16 @@ export class ChatOptionsPopoverPage implements OnInit {
constructor(
private popoverController: PopoverController,
private modalController: ModalController,
private alertService: AlertService,
) { }
ngOnInit() {
}
notImplemented(){
this.alertService.presentAlert('Funcionalidade em desenvolvimento');
}
close(){
if( window.innerWidth <= 1024){
this.popoverController.dismiss();
@@ -1,6 +1,8 @@
<ion-content class="container">
<div class="arrow-right">
<ion-icon slot="end" class="arrow-right-icon" (click)="close()" src='assets/images/icons-arrow-arrow-right.svg'></ion-icon>
<div class="arrow-right" (click)="close()">
<button class="btn-no-color">
<ion-icon slot="end" class="arrow-right-icon" src='assets/images/icons-arrow-arrow-right.svg'></ion-icon>
</button>
</div>
<div class="buttons">
<button (click)="close()" full class="btn-cancel" shape="round" >Cancelar</button>