mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 21:35:50 +00:00
Merge branch 'developer' of bitbucket.org:equilibriumito/gabinete-digital into developer
This commit is contained in:
@@ -5,10 +5,10 @@
|
||||
</button>
|
||||
</div>
|
||||
<div class="buttons">
|
||||
<button (click)="notImplemented()" full class="btn-cancel" shape="round" >Tirar Fotografia</button>
|
||||
<button (click)="notImplemented()" class="btn-cancel" shape="round" >Digitalizar Documento</button>
|
||||
<button (click)="notImplemented()" full class="btn-cancel" shape="round" >Anexar Fotografia</button>
|
||||
<button (click)="getDoc()" class="btn-cancel" shape="round" >Anexar Documento</button>
|
||||
<button hidden (click)="notImplemented()" full class="btn-cancel" shape="round" >Tirar Fotografia</button>
|
||||
<button hidden (click)="notImplemented()" class="btn-cancel" shape="round" >Digitalizar Documento</button>
|
||||
<button hidden (click)="notImplemented()" full class="btn-cancel" shape="round" >Anexar Fotografia</button>
|
||||
<button hidden (click)="getDoc()" class="btn-cancel" shape="round" >Anexar Documento</button>
|
||||
<div class="solid"></div>
|
||||
<button (click)="bookMeeting()" class="btn-cancel" shape="round" >Marcar reunião</button>
|
||||
<button (click)="close()" full class="btn-cancel mobile-only" shape="round" >Cancelar</button>
|
||||
|
||||
@@ -40,6 +40,7 @@
|
||||
}
|
||||
.btn-cancel:hover{
|
||||
background-color: #42b9fe;
|
||||
color: #fff !important;
|
||||
}
|
||||
.mobile-only{
|
||||
display: none !important;
|
||||
|
||||
@@ -111,6 +111,8 @@
|
||||
[style.display]="showMessages ? 'flex' : 'none'"
|
||||
(closeAllDesktopComponents)="closeAllDesktopComponents()"
|
||||
(showEmptyContainer)="showEmptyContainer()"
|
||||
(showEmptyContainer)="showEmptyContainer()"
|
||||
(openNewEventPage)="openNewEventPage($event)"
|
||||
[style.display]="showMessages ? 'flex' : 'none'"
|
||||
[roomId]="roomId"
|
||||
[showMessages]="showMessages" #messagecontainer>
|
||||
|
||||
@@ -143,14 +143,18 @@ export class ChatPage implements OnInit {
|
||||
hideRefreshButton(){
|
||||
window.onresize = (event) => {
|
||||
if( window.innerWidth < 701) {
|
||||
this.idSelected = '';
|
||||
this.hideRefreshBtn = false;
|
||||
}
|
||||
else{
|
||||
this.hideRefreshBtn = true;
|
||||
if(this.idSelected == ''){
|
||||
this.showEmptyComponent=true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(window.innerWidth < 701){
|
||||
console.log('YASS');
|
||||
this.idSelected = '';
|
||||
this.hideRefreshBtn = false;
|
||||
}
|
||||
}
|
||||
@@ -184,9 +188,11 @@ hideRefreshButton(){
|
||||
}
|
||||
|
||||
showEmptyContainer(){
|
||||
this.idSelected = '';
|
||||
this.showEmptyComponent=true;
|
||||
}
|
||||
openGroupContactsPage(data){
|
||||
this.idSelected = '';
|
||||
this.groupRoomId = data;
|
||||
this.closeAllDesktopComponents();
|
||||
if(window.innerWidth < 801){
|
||||
@@ -197,12 +203,12 @@ hideRefreshButton(){
|
||||
}
|
||||
}
|
||||
openMessagesPage(rid) {
|
||||
this.idSelected = rid;
|
||||
if( window.innerWidth < 701){
|
||||
this.openMessagesModal(rid);
|
||||
//this.router.navigate(['/home/chat/messages',rid,]);
|
||||
}
|
||||
else{
|
||||
this.idSelected = rid;
|
||||
this.closeAllDesktopComponents();
|
||||
this.showEmptyComponent = false;
|
||||
this.roomId = rid;
|
||||
@@ -211,6 +217,7 @@ hideRefreshButton(){
|
||||
}
|
||||
openContactsPage() {
|
||||
console.log('OK');
|
||||
this.idSelected = '';
|
||||
this.closeAllDesktopComponents();
|
||||
|
||||
if( window.innerWidth < 701){
|
||||
@@ -222,6 +229,7 @@ hideRefreshButton(){
|
||||
}
|
||||
}
|
||||
openNewGroupPage() {
|
||||
this.idSelected = '';
|
||||
if( window.innerWidth < 801){
|
||||
this.newGroup();
|
||||
}
|
||||
@@ -242,13 +250,13 @@ hideRefreshButton(){
|
||||
}
|
||||
|
||||
openGroupMessagesPage(rid) {
|
||||
this.idSelected = rid;
|
||||
console.log(rid);
|
||||
|
||||
if( window.innerWidth < 701){
|
||||
this.openGroupMessagesModal(rid);
|
||||
}
|
||||
else{
|
||||
this.idSelected = rid;
|
||||
this.closeAllDesktopComponents();
|
||||
this.showEmptyComponent = false;
|
||||
this.roomId = rid;
|
||||
@@ -427,7 +435,7 @@ hideRefreshButton(){
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: MessagesPage,
|
||||
cssClass: 'modal modal-desktop messagesChatOpened',
|
||||
cssClass: 'modal modal-desktop isMessagesChatOpened',
|
||||
componentProps: {
|
||||
roomId: roomId,
|
||||
},
|
||||
@@ -442,7 +450,7 @@ hideRefreshButton(){
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: GroupMessagesPage,
|
||||
cssClass: 'modal modal-desktop groupChatOpened',
|
||||
cssClass: 'modal modal-desktop isGroupChatOpened',
|
||||
componentProps: {
|
||||
roomId: roomId,
|
||||
},
|
||||
|
||||
@@ -268,8 +268,8 @@ export class GroupMessagesPage implements OnInit, AfterViewChecked {
|
||||
console.log("Timer message stop")
|
||||
} else {
|
||||
//Check if modal is opened
|
||||
if(document.querySelector('.groupChatOpened')){
|
||||
await new Promise(resolve => setTimeout(resolve, 1000));
|
||||
if(document.querySelector('.isGroupChatOpened')){
|
||||
await new Promise(resolve => setTimeout(resolve, 5000));
|
||||
await this.serverLongPull();
|
||||
console.log('Timer message running')
|
||||
}
|
||||
|
||||
@@ -188,8 +188,8 @@ export class MessagesPage implements OnInit, AfterViewChecked {
|
||||
console.log("Timer message stop")
|
||||
} else {
|
||||
//Check if modal is opened
|
||||
if(document.querySelector('.messagesChatOpened')){
|
||||
await new Promise(resolve => setTimeout(resolve, 1000));
|
||||
if(document.querySelector('.isMessagesChatOpened')){
|
||||
await new Promise(resolve => setTimeout(resolve, 5000));
|
||||
await this.serverLongPull();
|
||||
console.log('Timer message running')
|
||||
}
|
||||
|
||||
@@ -413,9 +413,14 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewChecked {
|
||||
if(this.route.url != "/home/chat"){
|
||||
console.log("Timer message stop")
|
||||
} else {
|
||||
await new Promise(resolve => setTimeout(resolve, 1000));
|
||||
await this.serverLongPull();
|
||||
console.log('Timer message running')
|
||||
if(document.querySelector('app-group-messages')){
|
||||
await new Promise(resolve => setTimeout(resolve, 5000));
|
||||
await this.serverLongPull();
|
||||
console.log('Timer message running')
|
||||
}
|
||||
else{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
<div class="container width-100 d-flex">
|
||||
<div>
|
||||
<button class="btn-no-color" (click)="openSendMessageOptions()">
|
||||
<ion-icon class="chat-icon-options" src="assets/icon/icons-chat-options.svg"></ion-icon>
|
||||
<ion-icon class="chat-icon-options" src="assets/images/icons-add-new-event.svg"></ion-icon>
|
||||
</button>
|
||||
</div>
|
||||
<div class="width-80">
|
||||
|
||||
@@ -165,9 +165,9 @@
|
||||
|
||||
.chat-icon-options{
|
||||
display:block !important;
|
||||
font-size: 25px;
|
||||
font-size: 35px;
|
||||
float: right !important;
|
||||
margin-top: 10px;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.chat-icon-send{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { AfterViewChecked, Component, ElementRef, Input, OnChanges, OnInit, SimpleChanges, ViewChild } from '@angular/core';
|
||||
import { AfterViewChecked, Component, ElementRef, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges, ViewChild } from '@angular/core';
|
||||
import { AnimationController, ModalController, PopoverController } from '@ionic/angular';
|
||||
import { AlertService } from 'src/app/services/alert.service';
|
||||
import { AuthService } from 'src/app/services/auth.service';
|
||||
@@ -29,13 +29,16 @@ export class MessagesPage implements OnInit, AfterViewChecked, OnChanges {
|
||||
userPresence='';
|
||||
dmUsers:any;
|
||||
checktimeOut: boolean;
|
||||
members:any;
|
||||
|
||||
@Input() roomId:string;
|
||||
@Input() showMessages:string;
|
||||
|
||||
@Output() openNewEventPage:EventEmitter<any> = new EventEmitter<any>();
|
||||
|
||||
|
||||
connection = connection
|
||||
|
||||
|
||||
constructor(
|
||||
public popoverController: PopoverController,
|
||||
private modalController: ModalController,
|
||||
@@ -67,15 +70,11 @@ export class MessagesPage implements OnInit, AfterViewChecked, OnChanges {
|
||||
console.log(this.roomId);
|
||||
console.log("Chat route", this.route.url)
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
ngOnDestroy(){
|
||||
this.checktimeOut = false;
|
||||
console.log('On Destroy')
|
||||
|
||||
|
||||
}
|
||||
|
||||
notImplemented(){
|
||||
@@ -106,6 +105,14 @@ export class MessagesPage implements OnInit, AfterViewChecked, OnChanges {
|
||||
}
|
||||
}
|
||||
|
||||
openBookMeetingComponent(){
|
||||
let data = {
|
||||
roomId: this.roomId,
|
||||
members: this.members
|
||||
}
|
||||
this.openNewEventPage.emit(data);
|
||||
}
|
||||
|
||||
sendMessage() {
|
||||
|
||||
this.connection.$send({})
|
||||
@@ -141,6 +148,7 @@ export class MessagesPage implements OnInit, AfterViewChecked, OnChanges {
|
||||
|
||||
//this.showLoader = true;
|
||||
this.chatService.getMembers(this.roomId).subscribe(res=> {
|
||||
this.members = res['members'];
|
||||
this.dmUsers = res['members'].filter(data => data.username != this.loggedUser.me.username)
|
||||
console.log(res);
|
||||
console.log(this.dmUsers);
|
||||
@@ -280,9 +288,22 @@ export class MessagesPage implements OnInit, AfterViewChecked, OnChanges {
|
||||
cssClass: 'model profile-modal search-submodal',
|
||||
componentProps: {
|
||||
roomId: this.roomId,
|
||||
members: this.members,
|
||||
}
|
||||
});
|
||||
return await modal.present();
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then((res)=>{
|
||||
console.log(res['data']);
|
||||
if(res['data'] == 'meeting'){
|
||||
//this.closeAllDesktopComponents.emit();
|
||||
let data = {
|
||||
roomId: this.roomId,
|
||||
members: this.members
|
||||
}
|
||||
this.openNewEventPage.emit(data);
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
async serverLongPull(){
|
||||
@@ -303,11 +324,12 @@ export class MessagesPage implements OnInit, AfterViewChecked, OnChanges {
|
||||
if(this.route.url != "/home/chat"){
|
||||
console.log("Timer message stop")
|
||||
} else {
|
||||
await new Promise(resolve => setTimeout(resolve, 1000));
|
||||
await this.serverLongPull();
|
||||
console.log('Timer message running')
|
||||
if(document.querySelector('app-messages')){
|
||||
await new Promise(resolve => setTimeout(resolve, 5000));
|
||||
await this.serverLongPull();
|
||||
console.log('Timer message running')
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
// Got message
|
||||
//let message = await response.text();
|
||||
|
||||
@@ -5,34 +5,13 @@
|
||||
</button>
|
||||
</div>
|
||||
<div class="buttons">
|
||||
<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)="getDoc()" class="btn-ok" shape="round" >Anexar Documento</button>
|
||||
<button hidden (click)="notImplemented()" full class="btn-ok" shape="round" >Tirar Fotografia</button>
|
||||
<button hidden (click)="notImplemented()" class="btn-ok" shape="round" >Digitalizar Documento</button>
|
||||
<button hidden (click)="notImplemented()" full class="btn-ok" shape="round" >Anexar Fotografia</button>
|
||||
<button hidden (click)="getDoc()" class="btn-ok" shape="round" >Anexar Documento</button>
|
||||
<div class="solid"></div>
|
||||
<button (click)="bookMeeting()" class="btn-ok" shape="round" >Marcar reunião</button>
|
||||
<button (click)="close()" full class="btn-cancel" shape="round" >Cancelar</button>
|
||||
</div>
|
||||
|
||||
<!-- <ion-row>
|
||||
<ion-col>
|
||||
<button full class="btn-ok" shape="round" >Tirar Fotografia</button>
|
||||
</ion-col>
|
||||
<ion-col>
|
||||
<button class="btn-ok" shape="round" >Digitalizar Documento</button>
|
||||
</ion-col>
|
||||
<ion-col>
|
||||
<button full class="btn-ok" shape="round" >Anexar Fotografia</button>
|
||||
</ion-col>
|
||||
<ion-col>
|
||||
<button class="btn-ok" shape="round" >Anexar Documento</button>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
<ion-row class="border-top">
|
||||
<ion-col>
|
||||
<button (click)="close()" full class="btn-cancel" shape="round" >Cancelar</button>
|
||||
</ion-col>
|
||||
<ion-col>
|
||||
</ion-col>
|
||||
</ion-row> -->
|
||||
</ion-content>
|
||||
|
||||
Reference in New Issue
Block a user