mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
Merge branch 'feature/calendar' of https://bitbucket.org/equilibriumito/gabinete-digital into feature/calendar
This commit is contained in:
@@ -1,13 +1,16 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { Routes, RouterModule } from '@angular/router';
|
||||
|
||||
import { ChatPage } from './chat.page';
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
component: ChatPage
|
||||
},
|
||||
import { NgModule } from '@angular/core';
|
||||
import { Routes, RouterModule } from '@angular/router';
|
||||
|
||||
import { ChatPage } from './chat.page';
|
||||
import { GroupMessagesPage } from './group-messages/group-messages.page';
|
||||
import { MessagesPage } from './messages/messages.page';
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
component: ChatPage,
|
||||
},
|
||||
/* {
|
||||
path: 'conversation',
|
||||
loadChildren: () => import('./conversation/conversation.module').then( m => m.ConversationPageModule)
|
||||
},
|
||||
@@ -25,17 +28,23 @@ const routes: Routes = [
|
||||
},
|
||||
{
|
||||
path: 'messages',
|
||||
outlet:'message',
|
||||
loadChildren: () => import('./messages/messages.module').then( m => m.MessagesPageModule)
|
||||
},
|
||||
{
|
||||
path: 'edit-group',
|
||||
loadChildren: () => import('./edit-group/edit-group.module').then( m => m.EditGroupPageModule)
|
||||
loadChildren: () => import('./edit-group/edit-group.module').then( m => m.EditGroupPageModule)
|
||||
},
|
||||
{
|
||||
path: 'test',
|
||||
outlet:'test',
|
||||
loadChildren: () => import('./test/test.module').then( m => m.TestPageModule)
|
||||
} */
|
||||
|
||||
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forChild(routes)],
|
||||
exports: [RouterModule],
|
||||
})
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forChild(routes)],
|
||||
exports: [RouterModule],
|
||||
})
|
||||
export class ChatPageRoutingModule {}
|
||||
|
||||
@@ -8,6 +8,9 @@ import { ChatPageRoutingModule } from './chat-routing.module';
|
||||
|
||||
import { ChatPage } from './chat.page';
|
||||
import { SharedModule } from 'src/app/shared/shared.module';
|
||||
import { RouterModule } from '@angular/router';
|
||||
import { MessagesPage } from './messages/messages.page';
|
||||
import { GroupMessagesPage } from './group-messages/group-messages.page';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
@@ -16,8 +19,14 @@ import { SharedModule } from 'src/app/shared/shared.module';
|
||||
IonicModule,
|
||||
SharedModule,
|
||||
ChatPageRoutingModule,
|
||||
RouterModule,
|
||||
],
|
||||
declarations: [ChatPage],
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
||||
declarations: [
|
||||
ChatPage,
|
||||
MessagesPage,
|
||||
GroupMessagesPage,
|
||||
],
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
||||
entryComponents: [MessagesPage, GroupMessagesPage]
|
||||
})
|
||||
export class ChatPageModule {}
|
||||
|
||||
@@ -1,95 +1,99 @@
|
||||
<ion-header>
|
||||
<!-- <app-header></app-header> -->
|
||||
<app-header-no-search></app-header-no-search>
|
||||
</ion-header>
|
||||
<ion-header class="ion-no-border">
|
||||
<ion-toolbar class="bg-blue">
|
||||
<div class="main-header">
|
||||
<div class="title-content">
|
||||
<div class="div-title">
|
||||
<ion-label class="title">Chat</ion-label>
|
||||
</div>
|
||||
<div class="div-icon">
|
||||
<ion-icon slot="end" (click)="newGroup()" src="assets/images/icons-chat-new-group.svg" ></ion-icon>
|
||||
<ion-icon slot="end" (click)="selectContact()" src="assets/images/icons-chat-new-conversation.svg"></ion-icon>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ion-toolbar>
|
||||
<ion-header class="ion-no-border">
|
||||
<app-header></app-header>
|
||||
</ion-header>
|
||||
|
||||
<ion-content>
|
||||
<ion-content class="height-100">
|
||||
<ion-refresher name="refresher" slot="fixed" (ionRefresh)="doRefresh($event)">
|
||||
<ion-progress-bar type="indeterminate" *ngIf="showLoader"></ion-progress-bar>
|
||||
<ion-refresher-content>
|
||||
</ion-refresher-content>
|
||||
</ion-refresher>
|
||||
<div class="main-content">
|
||||
<ion-toolbar >
|
||||
<ion-segment [(ngModel)]="segment" (ionChange)="onSegmentChange()">
|
||||
<ion-segment-button value="Contactos">
|
||||
Conversas
|
||||
</ion-segment-button>
|
||||
<ion-segment-button value="Grupos">
|
||||
Grupos
|
||||
</ion-segment-button>
|
||||
</ion-segment>
|
||||
</ion-toolbar>
|
||||
<ion-refresher name="refresher" slot="fixed" (ionRefresh)="doRefresh($event)">
|
||||
<ion-progress-bar type="indeterminate" *ngIf="showLoader"></ion-progress-bar>
|
||||
</ion-refresher>
|
||||
<div [ngSwitch]="segment">
|
||||
<ion-list *ngSwitchCase="'Contactos'">
|
||||
<ion-item-group>
|
||||
<ion-item-sliding>
|
||||
<div *ngFor="let dm of userDirectMessages" class="item">
|
||||
<div class="item-icon">
|
||||
<ion-icon class="icon" slot="start" src="assets/images/icons-chat-chat-40.svg"></ion-icon>
|
||||
</div>
|
||||
<div (click)="openMessages(dm)" class="item-content">
|
||||
<div class="item-title-time">
|
||||
<div class="item-title">
|
||||
<ion-label *ngFor="let user of dm.usernames">
|
||||
<span *ngIf="user !=loggedUser.me.username">
|
||||
{{user}}
|
||||
</span>
|
||||
</ion-label>
|
||||
</div>
|
||||
<div class="item-date">{{dm._updatedAt | date: 'HH:mm'}}</div>
|
||||
</div>
|
||||
<div class="item-description">
|
||||
<ion-label *ngIf="dm.lastMessage">{{dm.lastMessage.msg}}</ion-label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="main-content d-flex height-100">
|
||||
<!-- Aside left -->
|
||||
<div class="d-flex aside-wrapper flex-column pt-25">
|
||||
<!-- <p class="text-center mt-0 aside-title px-20">Chat</p> -->
|
||||
<div class="title-content">
|
||||
<div class="div-title">
|
||||
<ion-label class="title">Chat</ion-label>
|
||||
</div>
|
||||
</ion-item-sliding>
|
||||
</ion-item-group>
|
||||
</ion-list>
|
||||
<ion-list *ngSwitchCase="'Grupos'" >
|
||||
<ion-item-group>
|
||||
<ion-item-sliding>
|
||||
<div *ngFor="let group of allGroups" class="item">
|
||||
<div class="item-icon">
|
||||
<ion-icon class="icon" slot="start" src="assets/images/icons-chat-group-chat-40.svg"></ion-icon>
|
||||
</div>
|
||||
<div (click)="openGroupMessages(group)" class="item-content">
|
||||
<div class="item-title-time">
|
||||
<div class="item-title">
|
||||
<ion-label>{{group.name.split('-').join(' ')}}</ion-label>
|
||||
<div class="div-icon">
|
||||
<ion-icon slot="end" (click)="newGroup()" src="assets/images/icons-chat-new-group.svg" ></ion-icon>
|
||||
<ion-icon slot="end" (click)="selectContact()" src="assets/images/icons-chat-new-conversation.svg"></ion-icon>
|
||||
</div>
|
||||
</div>
|
||||
<ion-toolbar>
|
||||
<ion-segment [(ngModel)]="segment" (ionChange)="onSegmentChange()">
|
||||
<ion-segment-button value="Contactos">
|
||||
Conversas
|
||||
</ion-segment-button>
|
||||
<ion-segment-button value="Grupos">
|
||||
Grupos
|
||||
</ion-segment-button>
|
||||
</ion-segment>
|
||||
</ion-toolbar>
|
||||
<div class="overflow-y-auto d-flex flex-wrap">
|
||||
<div class="width-100" [ngSwitch]="segment">
|
||||
<ion-list *ngSwitchCase="'Contactos'">
|
||||
<ion-item-group>
|
||||
<ion-item-sliding>
|
||||
<div class="item width-100" *ngFor="let dm of userDirectMessages">
|
||||
<div class="item-icon">
|
||||
<ion-icon class="icon" slot="start" src="assets/images/icons-chat-chat-40.svg"></ion-icon>
|
||||
</div>
|
||||
<div (click)="openMessagesPage(dm._id)" class="item-content"><!-- (click)="openMessages(dm)" -->
|
||||
<div class="item-title-time">
|
||||
<div class="item-title">
|
||||
<ion-label *ngFor="let user of dm.usernames">
|
||||
<span *ngIf="user !=loggedUser.me.username">
|
||||
{{user}}
|
||||
</span>
|
||||
</ion-label>
|
||||
</div>
|
||||
<div class="item-date">{{dm._updatedAt | date: 'HH:mm'}}</div>
|
||||
</div>
|
||||
<div class="item-description">
|
||||
<ion-label *ngIf="dm.lastMessage">{{dm.lastMessage.msg}}</ion-label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item-date" *ngIf="group.lastMessage">{{group.lastMessage._updatedAt | date: 'HH:mm'}}</div>
|
||||
</div>
|
||||
<div class="item-description" *ngIf="group.lastMessage">
|
||||
<ion-label>{{group.lastMessage.u.name}}: {{group.lastMessage.msg}}</ion-label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ion-item-sliding>
|
||||
</ion-item-group>
|
||||
|
||||
</ion-list>
|
||||
</ion-item-sliding>
|
||||
</ion-item-group>
|
||||
</ion-list>
|
||||
<ion-list *ngSwitchCase="'Grupos'" >
|
||||
<ion-item-group>
|
||||
<ion-item-sliding>
|
||||
<div *ngFor="let group of allGroups" class="item">
|
||||
<div class="item-icon">
|
||||
<ion-icon class="icon" slot="start" src="assets/images/icons-chat-group-chat-40.svg"></ion-icon>
|
||||
</div>
|
||||
<div (click)="openGroupMessagesPage(group._id)" class="item-content">
|
||||
<div class="item-title-time">
|
||||
<div class="item-title">
|
||||
<ion-label>{{group.name.split('-').join(' ')}}</ion-label>
|
||||
</div>
|
||||
<div class="item-date" *ngIf="group.lastMessage">{{group.lastMessage._updatedAt | date: 'HH:mm'}}</div>
|
||||
</div>
|
||||
<div class="item-description" *ngIf="group.lastMessage">
|
||||
<ion-label>{{group.lastMessage.u.name}}: {{group.lastMessage.msg}}</ion-label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ion-item-sliding>
|
||||
</ion-item-group>
|
||||
|
||||
</ion-list>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Aside right -->
|
||||
<div class="aside-content d-none flex-column height-100">
|
||||
<!-- <ion-button (click)="openMessagesPage()">Messages</ion-button>
|
||||
<ion-button (click)="openGroupMessagesPage('MduvQyrQBejb3xMrY')">Groups</ion-button>
|
||||
<ion-button (click)="destroyComponent()">Destroy</ion-button> -->
|
||||
<app-messages class="d-flex height-100 flex-column" [roomId]="roomId" *ngIf="showMessages" #messagecontainer></app-messages>
|
||||
<app-group-messages [roomId]="roomId" *ngIf="showGroupMessages" #messagecontainer></app-group-messages>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ion-content>
|
||||
|
||||
|
||||
|
||||
@@ -1,50 +1,53 @@
|
||||
ion-content{
|
||||
--background: transparent;
|
||||
}
|
||||
:host{
|
||||
background: #0782c9;
|
||||
}
|
||||
|
||||
.main-header{
|
||||
width: 100%; /* 400px */
|
||||
height: 100%;
|
||||
font-family: Roboto;
|
||||
border-top-left-radius: 25px;
|
||||
border-top-right-radius: 25px;
|
||||
background-color: #fff;
|
||||
overflow:hidden;
|
||||
padding: 30px 20px 0px 20px;
|
||||
color:#000;
|
||||
transform: translate3d(0, 1px, 0);
|
||||
|
||||
.title-content{
|
||||
width: 360px;
|
||||
margin: 0px auto;
|
||||
width: 100%;
|
||||
margin-bottom: 15px;
|
||||
overflow: auto;
|
||||
padding: 0 !important;
|
||||
background: #fff;
|
||||
|
||||
.div-title{
|
||||
padding: 0!important;
|
||||
float: left;
|
||||
}
|
||||
.title{
|
||||
font-size: 25px;
|
||||
}
|
||||
.div-icon{
|
||||
width: 60%;
|
||||
float: right;
|
||||
font-size: 35px;
|
||||
overflow: auto;
|
||||
padding: 1px;
|
||||
}
|
||||
.div-icon ion-icon{
|
||||
float: right;
|
||||
padding-left: 20px;
|
||||
}
|
||||
}
|
||||
.div-title{
|
||||
padding: 0!important;
|
||||
float: left;
|
||||
}
|
||||
.title{
|
||||
font-size: 25px;
|
||||
}
|
||||
.div-icon{
|
||||
width: 112px;
|
||||
float: right;
|
||||
font-size: 35px;
|
||||
overflow: auto;
|
||||
padding: 1px;
|
||||
}
|
||||
.div-icon ion-icon{
|
||||
float: right;
|
||||
padding-left: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.main-content{
|
||||
width: 100%; /* 400px */
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
font-family: Roboto;
|
||||
margin: 0 auto;
|
||||
background-color: #fff;
|
||||
overflow:auto;
|
||||
padding: 15px 20px 0 20px;
|
||||
//overflow:auto;
|
||||
//padding: 30px 20px 0 20px;
|
||||
border-top-left-radius: 25px;
|
||||
border-top-right-radius: 25px;
|
||||
|
||||
.aside-wrapper{
|
||||
padding: 0 !important;
|
||||
margin: 0 !important;
|
||||
}
|
||||
|
||||
.iconschatnew-group{
|
||||
width: 30px;
|
||||
@@ -58,6 +61,7 @@
|
||||
object-fit: contain;
|
||||
margin: 0 5px 0 5px;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.item{
|
||||
@@ -102,3 +106,35 @@
|
||||
color: #000;
|
||||
}
|
||||
}
|
||||
@media only screen and (min-width: 1024px) {
|
||||
.main-content{
|
||||
border: 1px solid blue;
|
||||
|
||||
|
||||
.aside-wrapper{
|
||||
width: 40%;
|
||||
.aside-title{
|
||||
font-size: 25px;
|
||||
}
|
||||
}
|
||||
/* .aside{
|
||||
width: 340px;
|
||||
} */
|
||||
.aside-content{
|
||||
width: 60%;
|
||||
display: flex !important;
|
||||
background-color: white;
|
||||
border: 1px solid green;
|
||||
}
|
||||
.item{
|
||||
.item-icon{
|
||||
width: 10%;
|
||||
}
|
||||
.item-content{
|
||||
width: 90%;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http';
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import {
|
||||
Component,
|
||||
OnInit,
|
||||
ViewChild,
|
||||
ViewContainerRef,
|
||||
ComponentFactoryResolver,
|
||||
ComponentRef,
|
||||
ComponentFactory,
|
||||
Output
|
||||
} from '@angular/core';
|
||||
import { ModalController } from '@ionic/angular';
|
||||
import { AuthService } from 'src/app/services/auth.service';
|
||||
import { ChatService } from 'src/app/services/chat.service';
|
||||
@@ -38,20 +47,39 @@ export class ChatPage implements OnInit {
|
||||
result:any;
|
||||
dmUsers:any;
|
||||
|
||||
desktopComponent: any = {
|
||||
showMessages: false,
|
||||
showGroupMessages: false,
|
||||
}
|
||||
|
||||
@ViewChild('messagecontainer', { read: ViewContainerRef }) entry: ViewContainerRef;
|
||||
//@ViewChild('groupMessages') child:GroupMessagesPage;
|
||||
componentRef: any;
|
||||
|
||||
roomId:any;
|
||||
showMessages=false;
|
||||
showGroupMessages=false;
|
||||
|
||||
@Output() getRoomInfo;
|
||||
|
||||
constructor(
|
||||
private http:HttpClient,
|
||||
private chatService: ChatService,
|
||||
private modalController: ModalController,
|
||||
private authService: AuthService,
|
||||
private storage:Storage,
|
||||
private resolver: ComponentFactoryResolver,
|
||||
|
||||
) {
|
||||
this.headers = new HttpHeaders();
|
||||
/* this.headers = this.headers.set('X-User-Id', 'GqjNWiLrGEHRna7Zn');
|
||||
this.headers = this.headers.set('X-Auth-Token', 'SJwIgtlqfloPK696fpc2VBvyDluipuIHKB_0Q6-9ycJ'); */
|
||||
|
||||
}
|
||||
|
||||
closeAllDesktopComponent(){
|
||||
this.desktopComponent = {
|
||||
showMessages: false,
|
||||
}
|
||||
}
|
||||
ngOnInit() {
|
||||
this.segment = "Contactos";
|
||||
|
||||
@@ -65,8 +93,44 @@ export class ChatPage implements OnInit {
|
||||
this.load();
|
||||
})
|
||||
|
||||
console.log(this.roomId);
|
||||
|
||||
|
||||
|
||||
}
|
||||
destroyComponent() {
|
||||
this.showMessages=false;
|
||||
this.showGroupMessages=false;
|
||||
}
|
||||
openMessagesPage(rid) {
|
||||
this.destroyComponent();
|
||||
this.roomId = rid;
|
||||
this.showMessages=true;
|
||||
/* this.entry.clear();
|
||||
const factory = this.resolver.resolveComponentFactory(MessagesPage);
|
||||
this.componentRef = this.entry.createComponent(factory);
|
||||
this.componentRef.instance.message = message; */
|
||||
}
|
||||
openGroupMessagesPage(rid) {
|
||||
this.destroyComponent();
|
||||
//console.log(this.child.roomId);
|
||||
this.roomId = rid;
|
||||
this.showGroupMessages=true;
|
||||
console.log(rid);
|
||||
/* this.showGroupMessages=true; */
|
||||
|
||||
/* this.entry.clear();
|
||||
const factory = this.resolver.resolveComponentFactory(GroupMessagesPage);
|
||||
this.componentRef = this.entry.createComponent(factory);
|
||||
this.componentRef.instance.message = message;
|
||||
let comp: GroupMessagesPage;
|
||||
comp = this.componentRef;
|
||||
comp.message = '123';
|
||||
console.log(comp);
|
||||
console.log('1'); */
|
||||
|
||||
}
|
||||
|
||||
|
||||
onSegmentChange(){
|
||||
this.load();
|
||||
@@ -164,11 +228,19 @@ export class ChatPage implements OnInit {
|
||||
modal.onDidDismiss();
|
||||
}
|
||||
async openMessages(dm:any){
|
||||
this.closeAllDesktopComponent();
|
||||
|
||||
let classs;
|
||||
if( window.innerWidth <= 1024){
|
||||
classs = 'modal'
|
||||
} else {
|
||||
classs = 'chat-mobile-modal-to-Desktop'
|
||||
}
|
||||
console.log(dm);
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: MessagesPage,
|
||||
cssClass: 'group-messages',
|
||||
cssClass: classs,
|
||||
backdropDismiss: false,
|
||||
componentProps: {
|
||||
dm: dm,
|
||||
@@ -177,12 +249,19 @@ export class ChatPage implements OnInit {
|
||||
await modal.present();
|
||||
modal.onDidDismiss();
|
||||
}
|
||||
|
||||
async openGroupMessages(room:any){
|
||||
let classs;
|
||||
if( window.innerWidth <= 1024){
|
||||
classs = 'modal'
|
||||
} else {
|
||||
classs = 'chat-mobile-modal-to-Desktop'
|
||||
}
|
||||
console.log(room);
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: GroupMessagesPage,
|
||||
cssClass: 'group-messages',
|
||||
cssClass: classs,
|
||||
backdropDismiss: false,
|
||||
componentProps: {
|
||||
room: room,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { AfterViewChecked, Component, OnChanges, OnInit, Input, SimpleChanges, Output } from '@angular/core';
|
||||
import { ActionSheetController, MenuController, ModalController, NavParams, PopoverController } from '@ionic/angular';
|
||||
import { AuthService } from 'src/app/services/auth.service';
|
||||
import { ChatService } from 'src/app/services/chat.service';
|
||||
@@ -13,7 +13,7 @@ import { GroupContactsPage } from './group-contacts/group-contacts.page';
|
||||
templateUrl: './group-messages.page.html',
|
||||
styleUrls: ['./group-messages.page.scss'],
|
||||
})
|
||||
export class GroupMessagesPage implements OnInit {
|
||||
export class GroupMessagesPage implements OnInit, OnChanges {
|
||||
showLoader: boolean;
|
||||
isGroupCreated:boolean;
|
||||
loggedUser: any;
|
||||
@@ -24,7 +24,8 @@ export class GroupMessagesPage implements OnInit {
|
||||
room:any;
|
||||
roomName:any;
|
||||
members:any;
|
||||
contacts: string[] = [" Ana M.", "Andre F.", "Bruno G.", "Catarina T", "Tiago"];
|
||||
|
||||
@Input() roomId:string;
|
||||
|
||||
constructor(
|
||||
private menu: MenuController,
|
||||
@@ -32,12 +33,15 @@ export class GroupMessagesPage implements OnInit {
|
||||
private actionSheetController: ActionSheetController,
|
||||
public popoverController: PopoverController,
|
||||
private chatService: ChatService,
|
||||
private navParams: NavParams,
|
||||
/* private navParams: NavParams, */
|
||||
private authService: AuthService,
|
||||
) {
|
||||
this.isGroupCreated = true;
|
||||
this.room = this.navParams.get('room');
|
||||
this.roomName = this.room.name.split('-').join(' ');
|
||||
/* this.room = this.navParams.get('room'); */
|
||||
/* this.roomName = this.room.name.split('-').join(' '); */
|
||||
}
|
||||
ngOnChanges(changes: SimpleChanges): void {
|
||||
this.getRoomInfo();
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
@@ -45,11 +49,8 @@ export class GroupMessagesPage implements OnInit {
|
||||
this.loggedUser=res;
|
||||
console.log(this.loggedUser);
|
||||
});
|
||||
this.load();
|
||||
}
|
||||
load(){
|
||||
this.getGroupContacts();
|
||||
this.loadGroupMessages();
|
||||
this.getRoomInfo();
|
||||
console.log(this.roomId);
|
||||
}
|
||||
|
||||
close(){
|
||||
@@ -57,15 +58,30 @@ export class GroupMessagesPage implements OnInit {
|
||||
}
|
||||
|
||||
doRefresh(ev:any){
|
||||
this.load();
|
||||
this.getRoomInfo();
|
||||
ev.target.complete();
|
||||
}
|
||||
get watch(){
|
||||
this.getRoomInfo();
|
||||
console.log('here watching');
|
||||
|
||||
return this.roomId;
|
||||
}
|
||||
getRoomInfo(){
|
||||
this.showLoader = true;
|
||||
this.chatService.getRoomInfo(this.roomId).subscribe(room=>{
|
||||
this.room = room['room'];
|
||||
this.getGroupContacts(this.room);
|
||||
this.loadGroupMessages(this.room);
|
||||
this.showLoader = false;
|
||||
});
|
||||
}
|
||||
|
||||
getGroupContacts(){
|
||||
getGroupContacts(room:any){
|
||||
this.showLoader = true;
|
||||
//If group is private call getGroupMembers
|
||||
if(this.room.t === 'p'){
|
||||
this.chatService.getGroupMembers(this.room._id).subscribe(res=>{
|
||||
if(room.t === 'p'){
|
||||
this.chatService.getGroupMembers(this.roomId).subscribe(res=>{
|
||||
console.log(res);
|
||||
this.members = res['members'];
|
||||
this.showLoader = false;
|
||||
@@ -73,27 +89,33 @@ export class GroupMessagesPage implements OnInit {
|
||||
}
|
||||
//Otherwise call getChannelMembers for públic groups
|
||||
else{
|
||||
this.chatService.getChannelMembers(this.room._id).subscribe(res=>{
|
||||
this.chatService.getChannelMembers(this.roomId).subscribe(res=>{
|
||||
console.log(res);
|
||||
this.members = res['members'];
|
||||
this.showLoader = false;
|
||||
});
|
||||
}
|
||||
}
|
||||
loadGroupMessages(){
|
||||
loadGroupMessages(room:any){
|
||||
console.log('here'+room.t);
|
||||
|
||||
this.showLoader = true;
|
||||
//If group is private call getGroupMembers
|
||||
if(this.room.t === 'p'){
|
||||
this.chatService.getPrivateGroupMessages(this.room._id).subscribe(res=>{
|
||||
if(room.t === 'p'){
|
||||
console.log('private');
|
||||
|
||||
this.chatService.getPrivateGroupMessages(this.roomId).subscribe(res=>{
|
||||
console.log(res);
|
||||
let msgOnly = res['messages'].filter(data => data.t != 'au');
|
||||
this.messages = msgOnly.reverse();
|
||||
console.log(res);
|
||||
|
||||
this.showLoader = false;
|
||||
});
|
||||
}
|
||||
//Otherwise call getChannelMembers for públic groups
|
||||
else{
|
||||
this.chatService.getPublicGroupMessages(this.room._id).subscribe(res=>{
|
||||
this.chatService.getPublicGroupMessages(this.roomId).subscribe(res=>{
|
||||
console.log(res);
|
||||
this.messages = res['messages'].reverse();
|
||||
});
|
||||
@@ -104,17 +126,18 @@ export class GroupMessagesPage implements OnInit {
|
||||
let body = {
|
||||
"message":
|
||||
{
|
||||
"rid": this.room._id, "msg": this.message
|
||||
"rid": this.roomId, "msg": this.message
|
||||
}
|
||||
}
|
||||
|
||||
this.chatService.sendMessage(body).subscribe(res=> {
|
||||
this.loadGroupMessages();
|
||||
/* this.loadGroupMessages(); */
|
||||
this.getRoomInfo();
|
||||
});
|
||||
this.message = "";
|
||||
}
|
||||
|
||||
async openOptions(ev: any) {
|
||||
/* async openOptions(ev: any) {
|
||||
const popover = await this.popoverController.create({
|
||||
component: ChatPopoverPage,
|
||||
cssClass: 'chat-popover',
|
||||
@@ -132,7 +155,7 @@ export class GroupMessagesPage implements OnInit {
|
||||
console.log(this.roomName);
|
||||
|
||||
this.load();
|
||||
/* this.modalController.dismiss(); */
|
||||
//this.modalController.dismiss();
|
||||
};
|
||||
|
||||
});
|
||||
@@ -170,7 +193,7 @@ export class GroupMessagesPage implements OnInit {
|
||||
this.load();
|
||||
});
|
||||
}
|
||||
|
||||
*/
|
||||
/* async actionSheet() {
|
||||
const actionSheet = await this.actionSheetController.create({
|
||||
cssClass: 'my-custom-class',
|
||||
|
||||
@@ -57,6 +57,8 @@
|
||||
</div>
|
||||
|
||||
</ion-content>
|
||||
|
||||
|
||||
<ion-footer>
|
||||
<ion-toolbar>
|
||||
<ion-row align-items-center class="row">
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
.header-toolbar{
|
||||
--background:transparent;
|
||||
--opacity: 1;
|
||||
border: 1px solid red;
|
||||
|
||||
.main-header{
|
||||
width: 100%; /* 400px */
|
||||
@@ -82,9 +83,13 @@
|
||||
}
|
||||
}
|
||||
ion-content{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border: 1px solid red;
|
||||
.welcome-text{
|
||||
/* width: 322px; */
|
||||
width: em(422px);
|
||||
/* width: em(422px); */
|
||||
width: 100%;
|
||||
background: #ebebeb;
|
||||
text-align: center;
|
||||
font-size: 13px;
|
||||
@@ -94,6 +99,7 @@
|
||||
line-height: 1.2rem;
|
||||
margin: 20px 39px 25px;
|
||||
border-radius: 8px;
|
||||
|
||||
}
|
||||
.messages{
|
||||
font-size: 13px;
|
||||
@@ -144,6 +150,8 @@
|
||||
}
|
||||
|
||||
ion-footer{
|
||||
width: 100%;
|
||||
border: 1px solid red;
|
||||
.row{
|
||||
width: 380px;
|
||||
margin: 0 auto;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { AfterViewChecked, Component, ElementRef, OnInit, ViewChild } from '@angular/core';
|
||||
import { AfterViewChecked, Component, ElementRef, Input, OnChanges, OnInit, SimpleChanges, ViewChild } from '@angular/core';
|
||||
import { ModalController, NavParams, PopoverController } from '@ionic/angular';
|
||||
import { Status } from 'src/app/models/chat/status.model';
|
||||
import { AuthService } from 'src/app/services/auth.service';
|
||||
@@ -12,7 +12,7 @@ import { ContactsPage } from '../new-group/contacts/contacts.page';
|
||||
templateUrl: './messages.page.html',
|
||||
styleUrls: ['./messages.page.scss'],
|
||||
})
|
||||
export class MessagesPage implements OnInit, AfterViewChecked {
|
||||
export class MessagesPage implements OnInit, AfterViewChecked, OnChanges {
|
||||
showLoader: boolean;
|
||||
|
||||
@ViewChild('scrollMe') private myScrollContainer: ElementRef;
|
||||
@@ -25,15 +25,22 @@ export class MessagesPage implements OnInit, AfterViewChecked {
|
||||
userPresence='';
|
||||
dmUsers:any;
|
||||
|
||||
@Input() roomId:string;
|
||||
|
||||
constructor(
|
||||
public popoverController: PopoverController,
|
||||
private modalController: ModalController,
|
||||
private navParams: NavParams,
|
||||
/* private navParams: NavParams, */
|
||||
private chatService: ChatService,
|
||||
private authService: AuthService,
|
||||
) {
|
||||
this.dm = this.navParams.get('dm');
|
||||
/* this.dm = this.navParams.get('dm'); */
|
||||
}
|
||||
ngOnChanges(changes: SimpleChanges): void {
|
||||
console.log(this.roomId);
|
||||
this.load();
|
||||
|
||||
//throw new Error('Method not implemented.');
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
@@ -48,12 +55,16 @@ export class MessagesPage implements OnInit, AfterViewChecked {
|
||||
/* setInterval(()=>{ */
|
||||
this.load();
|
||||
/* }, 9000); */
|
||||
console.log(this.roomId);
|
||||
|
||||
|
||||
}
|
||||
load(){
|
||||
this.loadMessages();
|
||||
this.getChatMembers();
|
||||
}
|
||||
|
||||
|
||||
doRefresh(ev:any){
|
||||
this.load();
|
||||
ev.target.complete();
|
||||
@@ -61,6 +72,7 @@ export class MessagesPage implements OnInit, AfterViewChecked {
|
||||
|
||||
ngAfterViewChecked() {
|
||||
this.scrollToBottom();
|
||||
console.log(this.roomId);
|
||||
}
|
||||
scrollToBottom(): void {
|
||||
try {
|
||||
@@ -76,7 +88,7 @@ export class MessagesPage implements OnInit, AfterViewChecked {
|
||||
let body = {
|
||||
"message":
|
||||
{
|
||||
"rid": this.dm._id, "msg": this.message
|
||||
"rid": this.roomId, "msg": this.message
|
||||
}
|
||||
}
|
||||
|
||||
@@ -88,7 +100,7 @@ export class MessagesPage implements OnInit, AfterViewChecked {
|
||||
|
||||
loadMessages(){
|
||||
this.showLoader = true;
|
||||
this.chatService.getRoomMessages(this.dm._id).subscribe(res => {
|
||||
this.chatService.getRoomMessages(this.roomId).subscribe(res => {
|
||||
/* console.log(res); */
|
||||
this.messages = res['messages'].reverse();
|
||||
console.log(this.messages);
|
||||
@@ -96,8 +108,10 @@ export class MessagesPage implements OnInit, AfterViewChecked {
|
||||
})
|
||||
}
|
||||
getChatMembers(){
|
||||
console.log(this.roomId);
|
||||
|
||||
this.showLoader = true;
|
||||
this.chatService.getMembers(this.dm._id).subscribe(res=> {
|
||||
this.chatService.getMembers(this.roomId).subscribe(res=> {
|
||||
this.dmUsers = res['members'].filter(data => data.username != this.loggedUser.me.username)
|
||||
console.log(res);
|
||||
console.log(this.dmUsers);
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { Routes, RouterModule } from '@angular/router';
|
||||
|
||||
import { TestPage } from './test.page';
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
component: TestPage
|
||||
}
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forChild(routes)],
|
||||
exports: [RouterModule],
|
||||
})
|
||||
export class TestPageRoutingModule {}
|
||||
@@ -0,0 +1,20 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { TestPageRoutingModule } from './test-routing.module';
|
||||
|
||||
import { TestPage } from './test.page';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
IonicModule,
|
||||
TestPageRoutingModule
|
||||
],
|
||||
declarations: [TestPage]
|
||||
})
|
||||
export class TestPageModule {}
|
||||
@@ -0,0 +1,9 @@
|
||||
<ion-header>
|
||||
<ion-toolbar>
|
||||
<ion-title>test</ion-title>
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
|
||||
<ion-content>
|
||||
TESTE
|
||||
</ion-content>
|
||||
@@ -0,0 +1,24 @@
|
||||
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { TestPage } from './test.page';
|
||||
|
||||
describe('TestPage', () => {
|
||||
let component: TestPage;
|
||||
let fixture: ComponentFixture<TestPage>;
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ TestPage ],
|
||||
imports: [IonicModule.forRoot()]
|
||||
}).compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(TestPage);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
}));
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,15 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-test',
|
||||
templateUrl: './test.page.html',
|
||||
styleUrls: ['./test.page.scss'],
|
||||
})
|
||||
export class TestPage implements OnInit {
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
|
||||
}
|
||||
@@ -55,9 +55,11 @@
|
||||
|
||||
</div>
|
||||
<div class="content">
|
||||
<!-- (click)="viewEventDetail(event.EventId)" -->
|
||||
<ul>
|
||||
<li *ngFor="let event of eventsList"
|
||||
(click)="viewEventDetail(event.EventId)">
|
||||
[routerLink]="['/home/events', event.EventId, 'events']"
|
||||
>
|
||||
<div class="d-flex content-{{profile}}-{{event.CalendarName}}">
|
||||
<div class="schedule-time">
|
||||
<div class="time-start">{{event.StartDate | date: 'HH:mm'}}</div>
|
||||
|
||||
+2
-2
@@ -1,9 +1,9 @@
|
||||
<ion-header class="ion-no-border">
|
||||
<div class="header-content">
|
||||
<div class="header-content mx-20 d-flex justify-start">
|
||||
<div class="header-icon-left">
|
||||
<ion-icon (click)="close()" src="assets/images/icons-arrow-arrow-left.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="header-title">
|
||||
<div class="header-title flex-md-grow-1">
|
||||
<label>{{loadedEvent.workflowInstanceDataFields.Subject}}</label>
|
||||
</div>
|
||||
<div class="header-icon-right">
|
||||
|
||||
-1
@@ -8,7 +8,6 @@ ion-menu{
|
||||
--height: 225px;
|
||||
}
|
||||
.header-content{
|
||||
width: 360px;
|
||||
overflow: auto;
|
||||
margin: 25px auto;
|
||||
}
|
||||
|
||||
+2
@@ -51,6 +51,8 @@ export class ApproveEventModalPage implements OnInit {
|
||||
ngOnInit() {
|
||||
this.getTask();
|
||||
this.getAttachments();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<ion-header class="ion-no-border">
|
||||
<ion-header class="ion-no-border px-20 ">
|
||||
<div class="header-content">
|
||||
<div class="header-icon-left">
|
||||
<ion-icon (click)="close()" src="assets/images/icons-arrow-arrow-left.svg"></ion-icon>
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
.header-content{
|
||||
width: 360px;
|
||||
overflow: auto;
|
||||
margin: 0 auto;
|
||||
padding-top: 25px;
|
||||
|
||||
@@ -67,12 +67,19 @@ S
|
||||
async openApproveModal(eventSerialNumber){
|
||||
|
||||
|
||||
let classs;
|
||||
if( window.innerWidth <= 1024){
|
||||
classs = 'cal-modal modal modal-desktop'
|
||||
} else {
|
||||
classs = 'gabinete-digital-mobile-modal-to-Desktop'
|
||||
}
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: ApproveEventModalPage,
|
||||
componentProps:{
|
||||
serialNumber: eventSerialNumber,
|
||||
},
|
||||
cssClass: 'cal-modal modal modal-desktop',
|
||||
cssClass: classs,
|
||||
backdropDismiss: false
|
||||
});
|
||||
|
||||
|
||||
@@ -13,9 +13,9 @@
|
||||
<div class="d-flex height-100">
|
||||
|
||||
<!-- -->
|
||||
<div class="d-flex aside-wrapper flex-column pt-25 justify-center">
|
||||
<div class="d-flex aside-wrapper flex-column pt-25 justify-center max-width-md-40 width-40">
|
||||
<p class="text-center mt-0 aside-title px-20">Gabinete Digital</p>
|
||||
<div class="aside overflow-y-auto d-flex flex-wrap justify-center">
|
||||
<div class="aside overflow-y-auto d-flex flex-wrap justify-center width-100">
|
||||
<div class="exp-card d-flex flex-column justify-center" (click)="openEventsToApproveList('MDGPR')">
|
||||
<div class="d-flex justify-center">
|
||||
<ion-icon src="assets/images/icons-agenda.svg"></ion-icon>
|
||||
@@ -23,7 +23,7 @@
|
||||
<p class="text-center exp-card-title ">Eventos para Aprovação</p>
|
||||
<p class="text-center exp-card-content">{{count_ev_md+count_ev_pr}} <span class="title1">Documentos</span></p>
|
||||
</div>
|
||||
<div class="exp-card d-flex flex-column justify-center" (click)="openExpedientList()">
|
||||
<div class="exp-card d-flex flex-column justify-center width-md-100" (click)="openExpedientList()">
|
||||
<div class="d-flex justify-center">
|
||||
<ion-icon src="assets/images/icons-correspondencia.svg"></ion-icon>
|
||||
</div>
|
||||
|
||||
@@ -154,6 +154,7 @@ ion-content{
|
||||
|
||||
.main-content{
|
||||
.aside-wrapper{
|
||||
border: 1px solid red;
|
||||
justify-content: flex-start !important;
|
||||
.aside-title{
|
||||
font-family: Roboto;
|
||||
|
||||
@@ -1,56 +1,84 @@
|
||||
<ion-header>
|
||||
<ion-header class="ion-no-border">
|
||||
<app-header></app-header>
|
||||
</ion-header>
|
||||
<ion-header class="ion-no-border">
|
||||
<ion-toolbar class="bg-blue">
|
||||
<div class="main-header">
|
||||
<div class="title-content">
|
||||
<div class="div-title">
|
||||
<ion-label class="title">Ações Presidenciais</ion-label>
|
||||
</div>
|
||||
<div class="div-icon">
|
||||
<ion-icon (click)="AddPublicationFolder()" slot="end" src='assets/images/icons-add.svg'></ion-icon>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
|
||||
<ion-content>
|
||||
<ion-refresher name="refresher" slot="fixed" (ionRefresh)="doRefresh($event)">
|
||||
<ion-progress-bar type="indeterminate" *ngIf="showLoader"></ion-progress-bar>
|
||||
<ion-refresher-content>
|
||||
</ion-refresher-content>
|
||||
</ion-refresher>
|
||||
<div class="main-content">
|
||||
<div class="item"
|
||||
*ngFor="let viagem of publicationsTravelFolderList"
|
||||
|
||||
(click)="viewPublications(viagem.ProcessId)">
|
||||
<div class="item-icon">
|
||||
<ion-icon slot="end" src='assets/images/icons-plane-active.svg'></ion-icon>
|
||||
</div>
|
||||
<div class="item-content">
|
||||
<ion-label>
|
||||
<p class="item-content-date">De {{viagem.DateBegin}} a {{viagem.DateEnd}}</p>
|
||||
<p class="item-content-title">{{viagem.Description}}</p>
|
||||
<p class="item-content-detail">{{viagem.Detail}}</p>
|
||||
</ion-label>
|
||||
</div>
|
||||
<ion-progress-bar type="indeterminate" *ngIf="showLoader"></ion-progress-bar>
|
||||
<ion-refresher-content>
|
||||
</ion-refresher-content>
|
||||
</ion-refresher>
|
||||
|
||||
<!-- Main container -->
|
||||
<div class="d-flex height-100">
|
||||
<div class="d-flex flex-grow-1 flex-column aside max-width-md-40">
|
||||
<!-- Header -->
|
||||
<ion-toolbar class="bg-blue">
|
||||
<div class="main-header">
|
||||
<div class="title-content">
|
||||
<div class="div-title">
|
||||
<ion-label class="title">Ações Presidenciais</ion-label>
|
||||
</div>
|
||||
<div class="div-icon">
|
||||
<ion-icon (click)="AddPublicationFolder()" slot="end" src='assets/images/icons-add.svg'></ion-icon>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ion-toolbar>
|
||||
<!-- Content -->
|
||||
|
||||
<div class="main-content overflow-auto-y">
|
||||
<div class="item"
|
||||
*ngFor="let viagem of publicationsTravelFolderList"
|
||||
|
||||
(click)="viewPublications(viagem.ProcessId)">
|
||||
<div class="item-icon">
|
||||
<ion-icon slot="end" src='assets/images/icons-plane-active.svg'></ion-icon>
|
||||
</div>
|
||||
<div class="item-content">
|
||||
<ion-label>
|
||||
<p class="item-content-date">De {{viagem.DateBegin}} a {{viagem.DateEnd}}</p>
|
||||
<p class="item-content-title">{{viagem.Description}}</p>
|
||||
<p class="item-content-detail">{{viagem.Detail}}</p>
|
||||
</ion-label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item"
|
||||
|
||||
*ngFor="let evento of publicationsEventFolderList"
|
||||
(click)="viewPublications(evento)">
|
||||
<div class="item-icon2">
|
||||
<ion-icon slot="end" src='assets/images/icons-nav-actions.svg'></ion-icon>
|
||||
</div>
|
||||
<div class="item-content">
|
||||
<ion-label>
|
||||
<p class="item-content-date">{{evento.DateBegin}}</p>
|
||||
<p class="item-content-title">{{evento.Description}}</p>
|
||||
</ion-label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item"
|
||||
|
||||
*ngFor="let evento of publicationsEventFolderList"
|
||||
(click)="viewPublications(evento)">
|
||||
<div class="item-icon2">
|
||||
<ion-icon slot="end" src='assets/images/icons-nav-actions.svg'></ion-icon>
|
||||
</div>
|
||||
<div class="item-content">
|
||||
<ion-label>
|
||||
<p class="item-content-date">{{evento.DateBegin}}</p>
|
||||
<p class="item-content-title">{{evento.Description}}</p>
|
||||
</ion-label>
|
||||
</div>
|
||||
|
||||
<div class="d-none d-md-flex flex-grow-1 flex-column">
|
||||
<!-- Header -->
|
||||
<ion-toolbar class="bg-blue">
|
||||
<div class="main-header">
|
||||
<div class="title-content">
|
||||
<div class="div-title">
|
||||
<ion-label class="title">Header</ion-label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ion-toolbar>
|
||||
<!-- Content -->
|
||||
|
||||
<div class="main-content overflow-auto-y">
|
||||
123
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</ion-content>
|
||||
|
||||
@@ -11,8 +11,8 @@ ion-toolbar{
|
||||
--padding-right: 0px !important;
|
||||
--padding-end: 0px !important;
|
||||
}
|
||||
|
||||
.div-top-header{
|
||||
width: 400px;
|
||||
margin: 0 auto;
|
||||
background-color: #0782c9;
|
||||
overflow: auto;
|
||||
@@ -57,7 +57,6 @@ ion-toolbar{
|
||||
transform: translate3d(0, 1px, 0);
|
||||
|
||||
.title-content{
|
||||
width: 360px;
|
||||
margin: 0px auto;
|
||||
overflow: auto;
|
||||
padding: 0 !important;
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
margin: 0px;
|
||||
padding-top: 10px;
|
||||
li{
|
||||
padding-top: 5px;
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
margin: 0px;
|
||||
padding-bottom: 10px;
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
|
||||
<!-- HEADER-->
|
||||
<ion-header class="ion-no-border header-main ">
|
||||
<ion-header class="ion-no-border header-main d-md-flex flex-md-row-reverse">
|
||||
<ion-progress-bar type="indeterminate" class="loader" *ngIf="showLoader"></ion-progress-bar>
|
||||
<div class="d-flex ion-justify-content-between">
|
||||
<ion-progress-bar type="indeterminate" class="loader" *ngIf="showLoader"></ion-progress-bar>
|
||||
<ion-form>
|
||||
<div class="d-md-none d-flex search-input-container ion-justify-content-between" >
|
||||
|
||||
<ion-form class="d-md-none">
|
||||
<div class="d-flex search-input-container ion-justify-content-between" >
|
||||
<div class="icon" (click)="basicSearch()">
|
||||
<ion-icon class="icon-z" slot="end" name="search"></ion-icon>
|
||||
</div>
|
||||
@@ -20,7 +21,7 @@
|
||||
<div *ngIf="!showAdvanceSearch" class="icon-z icon-most-searched-word-open" (click)="showHideAdvanceSearch(true)">
|
||||
<ion-icon src="assets/images/icons-most-searched-words-open.svg" class="icon" slot="end"></ion-icon>
|
||||
</div>
|
||||
<div *ngIf="showAdvanceSearch" class="icon-z icon-most-searched-word-open" (click)="showHideAdvanceSearch(false)" >
|
||||
<div *ngIf="showAdvanceSearch" class="icon-z icon-most-searched-word-open align-md-baseline" (click)="showHideAdvanceSearch(false)" >
|
||||
<ion-icon src="assets/images/advance-search-show-modal.svg" class="icon" slot="end"></ion-icon>
|
||||
</div>
|
||||
|
||||
@@ -30,7 +31,7 @@
|
||||
</div>
|
||||
|
||||
<!-- Search drop down -->
|
||||
<div class="advance-search pa-0 pt-10" *ngIf="showAdvanceSearch">
|
||||
<div class="advance-search pa-0 pt-10 flex-md-grow-1" *ngIf="showAdvanceSearch">
|
||||
<!-- -->
|
||||
<li class="d-flex date-container ion-justify-content-between">
|
||||
<div class="icon-mer icon">
|
||||
@@ -70,7 +71,7 @@
|
||||
</div>
|
||||
|
||||
<!-- search result categories-->
|
||||
<div class="options" *ngIf="showDocuments"
|
||||
<div class="options flex-md-grow-1 " *ngIf="showDocuments"
|
||||
style="border-bottom: 1px solid #f3f3f3;"
|
||||
>
|
||||
<div class="container ">
|
||||
@@ -86,7 +87,7 @@
|
||||
</ion-slides>
|
||||
</div>
|
||||
|
||||
<button class="icon-z icon-most-searched-word-open" ion-button icon-only >
|
||||
<button class="icon-z icon-most-searched-word-open " ion-button icon-only >
|
||||
<ion-icon src="assets/images/icons-most-searched-words-open.svg" class="icon" slot="end"></ion-icon>
|
||||
</button>
|
||||
</div>
|
||||
@@ -96,18 +97,16 @@
|
||||
|
||||
<ion-content class="main-content">
|
||||
|
||||
|
||||
|
||||
<div style="height: calc(100% - 0px)">
|
||||
<div class="height-100">
|
||||
<div class="d-flex seach-wrapper height-100 flex-row justify-space-between">
|
||||
|
||||
<div class="d-flex height-100 flex-1" *ngIf="!showDocuments || windowWidth >= 1024"
|
||||
<div class="d-flex height-100 overflow-y-auto flex-1" *ngIf="!showDocuments || windowWidth >= 1024"
|
||||
style="border-right: 1px solid #ddd7d7;">
|
||||
|
||||
<!-- most searched word-->
|
||||
<div class="most-searched-words height-100">
|
||||
<div class="most-searched-words d-md-flex flex-md-column">
|
||||
<p class="title ion-text-center">Palavras mais pesquisadas</p>
|
||||
<div class="most-searched-word-container overflow-y-auto">
|
||||
<div class="most-searched-word-container height-100 overflow-y-auto">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -156,7 +155,7 @@
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -200,7 +200,9 @@ ion-slide{
|
||||
|
||||
|
||||
@media only screen and (min-width: 1024px) {
|
||||
|
||||
.advance-search{
|
||||
max-width: 47%;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -249,4 +251,4 @@ ion-slide{
|
||||
|
||||
.swiper-container{
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
@@ -346,9 +346,16 @@ export class SearchPage implements OnInit {
|
||||
|
||||
async openAdvanceSearchSelection() {
|
||||
|
||||
let classs;
|
||||
if( window.innerWidth <= 1024){
|
||||
classs = 'modal modal-desktop'
|
||||
} else {
|
||||
classs = 'search-desktop-modal search-submodal'
|
||||
}
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: SenderPage,
|
||||
cssClass: 'modal modal-desktop',
|
||||
cssClass: classs,
|
||||
componentProps: {
|
||||
}
|
||||
});
|
||||
@@ -364,9 +371,17 @@ export class SearchPage implements OnInit {
|
||||
|
||||
async openOrganicEntitySelection(){
|
||||
|
||||
let classs;
|
||||
if( window.innerWidth <= 1024){
|
||||
classs = 'modal modal-desktop'
|
||||
} else {
|
||||
classs = 'search-desktop-modal search-submodal'
|
||||
}
|
||||
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: OrganicEntityPage,
|
||||
cssClass: 'modal modal-desktop',
|
||||
cssClass: classs,
|
||||
componentProps: {
|
||||
}
|
||||
});
|
||||
@@ -433,7 +448,7 @@ export class SearchPage implements OnInit {
|
||||
componentProps:{
|
||||
publicationId: publicationId,
|
||||
},
|
||||
cssClass: 'publication-detail modal modal-desktop',
|
||||
cssClass: 'publication-detail modal modal-desktop ',
|
||||
backdropDismiss: false
|
||||
});
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
margin: 0px;
|
||||
padding-top: 10px;
|
||||
li{
|
||||
padding-top: 5px;
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
margin: 0px;
|
||||
padding-bottom: 10px;
|
||||
|
||||
Reference in New Issue
Block a user