mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
save
This commit is contained in:
@@ -762,7 +762,7 @@ export class AgendaPage implements OnInit {
|
|||||||
|
|
||||||
async cloneAllmobileComponent(){
|
async cloneAllmobileComponent(){
|
||||||
|
|
||||||
this.mobileComponent= {
|
this.mobileComponent = {
|
||||||
showAddNewEvent: false,
|
showAddNewEvent: false,
|
||||||
showEditEvent: false,
|
showEditEvent: false,
|
||||||
showEventDitails: false,
|
showEventDitails: false,
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import { MessagesPage } from 'src/app/shared/chat/messages/messages.page';
|
|||||||
import { EmptyChatPage } from 'src/app/shared/chat/empty-chat/empty-chat.page';
|
import { EmptyChatPage } from 'src/app/shared/chat/empty-chat/empty-chat.page';
|
||||||
import { ContactsPage } from 'src/app/shared/chat/messages/contacts/contacts.page';
|
import { ContactsPage } from 'src/app/shared/chat/messages/contacts/contacts.page';
|
||||||
import { NewGroupPage } from 'src/app/shared/chat/new-group/new-group.page';
|
import { NewGroupPage } from 'src/app/shared/chat/new-group/new-group.page';
|
||||||
|
import { GroupContactsPage } from 'src/app/shared/chat/group-messages/group-contacts/group-contacts.page';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
@@ -30,6 +31,7 @@ import { NewGroupPage } from 'src/app/shared/chat/new-group/new-group.page';
|
|||||||
ContactsPage,
|
ContactsPage,
|
||||||
GroupMessagesPage,
|
GroupMessagesPage,
|
||||||
NewGroupPage,
|
NewGroupPage,
|
||||||
|
GroupContactsPage,
|
||||||
],
|
],
|
||||||
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
||||||
entryComponents: [
|
entryComponents: [
|
||||||
@@ -37,6 +39,7 @@ import { NewGroupPage } from 'src/app/shared/chat/new-group/new-group.page';
|
|||||||
ContactsPage,
|
ContactsPage,
|
||||||
GroupMessagesPage,
|
GroupMessagesPage,
|
||||||
NewGroupPage,
|
NewGroupPage,
|
||||||
|
GroupContactsPage,
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
export class ChatPageModule {}
|
export class ChatPageModule {}
|
||||||
|
|||||||
@@ -93,7 +93,8 @@
|
|||||||
<app-empty-chat class="d-flex height-100" *ngIf="showEmptyComponent"></app-empty-chat>
|
<app-empty-chat class="d-flex height-100" *ngIf="showEmptyComponent"></app-empty-chat>
|
||||||
<app-messages class="d-flex height-100 flex-column" [roomId]="roomId" *ngIf="showMessages" #messagecontainer></app-messages>
|
<app-messages class="d-flex height-100 flex-column" [roomId]="roomId" *ngIf="showMessages" #messagecontainer></app-messages>
|
||||||
<app-contacts *ngIf="showContacts" class="d-flex height-100"></app-contacts>
|
<app-contacts *ngIf="showContacts" class="d-flex height-100"></app-contacts>
|
||||||
<app-new-group *ngIf="showNewGroup" class="d-flex height-100 flex-column"></app-new-group>
|
<app-new-group (closeAllDesktopComponent)="openGroupContactsPage()" *ngIf="showNewGroup" class="d-flex height-100 flex-column"></app-new-group>
|
||||||
|
<app-group-contacts [roomId]="roomId" class="d-flex height-100 flex-column" *ngIf="showGroupContacts"></app-group-contacts>
|
||||||
<app-group-messages *ngIf="showGroupMessages" class="d-flex height-100 flex-column" [roomId]="roomId" #messagecontainer></app-group-messages>
|
<app-group-messages *ngIf="showGroupMessages" class="d-flex height-100 flex-column" [roomId]="roomId" #messagecontainer></app-group-messages>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -62,6 +62,7 @@ export class ChatPage implements OnInit {
|
|||||||
showContacts=false;
|
showContacts=false;
|
||||||
showNewGroup=false;
|
showNewGroup=false;
|
||||||
showGroupMessages=false;
|
showGroupMessages=false;
|
||||||
|
showGroupContacts=false;
|
||||||
|
|
||||||
@Output() getRoomInfo;
|
@Output() getRoomInfo;
|
||||||
|
|
||||||
@@ -106,6 +107,16 @@ export class ChatPage implements OnInit {
|
|||||||
this.showNewGroup=false;
|
this.showNewGroup=false;
|
||||||
this.showGroupMessages=false;
|
this.showGroupMessages=false;
|
||||||
this.showEmptyComponent=false;
|
this.showEmptyComponent=false;
|
||||||
|
console.log('All components closed!');
|
||||||
|
}
|
||||||
|
openGroupContactsPage(){
|
||||||
|
this.closeAllDesktopComponents();
|
||||||
|
if(window.innerWidth <= 1024){
|
||||||
|
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
this.showGroupContacts = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
openMessagesPage(rid) {
|
openMessagesPage(rid) {
|
||||||
if( window.innerWidth <= 1024){
|
if( window.innerWidth <= 1024){
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<ion-header class="ion-no-border">
|
<ion-header class="ion-no-border">
|
||||||
<ion-toolbar class="header-toolbar">
|
<ion-toolbar class="header-toolbar">
|
||||||
<div class="main-header">
|
<div class="main-header width-100">
|
||||||
<div class="title-content">
|
<div class="title-content width-100">
|
||||||
<div class="back-icon">
|
<div class="back-icon">
|
||||||
<ion-icon (click)="close()" slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
|
<ion-icon (click)="close()" slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
|
||||||
</div>
|
</div>
|
||||||
@@ -41,7 +41,7 @@
|
|||||||
</ion-list>
|
</ion-list>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<ion-virtual-scroll [items]="users | filter:textSearch: 'name'" approxItemHeight="70px" [headerFn]="separateLetter">
|
<ion-virtual-scroll [items]="users" approxItemHeight="70px" [headerFn]="separateLetter">
|
||||||
|
|
||||||
<div class="item-divider" *virtualHeader="let header">
|
<div class="item-divider" *virtualHeader="let header">
|
||||||
<ion-label>{{header}}</ion-label>
|
<ion-label>{{header}}</ion-label>
|
||||||
@@ -49,8 +49,8 @@
|
|||||||
|
|
||||||
<div *virtualItem="let user" class="item-checkbox">
|
<div *virtualItem="let user" class="item-checkbox">
|
||||||
<ion-checkbox (ionChange)="selectedContact(user)" color="primary"></ion-checkbox>
|
<ion-checkbox (ionChange)="selectedContact(user)" color="primary"></ion-checkbox>
|
||||||
<p>{{user.name}}</p>
|
<ion-label>{{user.name}}</ion-label>
|
||||||
<ion-icon name="ellipse"></ion-icon>
|
<div class="icon"><ion-icon name="ellipse"></ion-icon></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</ion-virtual-scroll>
|
</ion-virtual-scroll>
|
||||||
|
|||||||
@@ -3,11 +3,8 @@
|
|||||||
--opacity: 1;
|
--opacity: 1;
|
||||||
|
|
||||||
.main-header{
|
.main-header{
|
||||||
width: 100%; /* 400px */
|
|
||||||
height: 100%;
|
height: 100%;
|
||||||
font-family: Roboto;
|
font-family: Roboto;
|
||||||
border-top-left-radius: 25px;
|
|
||||||
border-top-right-radius: 25px;
|
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
overflow:hidden;
|
overflow:hidden;
|
||||||
padding: 30px 20px 0px 20px;
|
padding: 30px 20px 0px 20px;
|
||||||
@@ -26,7 +23,6 @@
|
|||||||
padding-left: 20px;
|
padding-left: 20px;
|
||||||
}
|
}
|
||||||
.title-content{
|
.title-content{
|
||||||
width: 360px;
|
|
||||||
margin: 0px auto;
|
margin: 0px auto;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
padding: 0 !important;
|
padding: 0 !important;
|
||||||
@@ -62,28 +58,28 @@
|
|||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
}
|
}
|
||||||
.search ion-searchbar{
|
.search ion-searchbar{
|
||||||
/* border: 1px solid green; */
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin: 0 !important;
|
margin: 0 !important;
|
||||||
padding: 0 !important;
|
padding: 0 !important;
|
||||||
--border-radius: 5px;
|
--border-radius: 5px;
|
||||||
--box-shadow: none;
|
--box-shadow: none;
|
||||||
overflow: auto;
|
overflow: hidden;
|
||||||
--icon-color:#0d89d1;
|
--icon-color:#0d89d1;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ion-content{
|
ion-content{
|
||||||
--background:transparent;
|
--background:transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
.main-content{
|
.main-content{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
font-family: Roboto;
|
font-family: Roboto;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
overflow:auto;
|
|
||||||
padding: 0 0 0 0;
|
padding: 0 0 0 0;
|
||||||
|
overflow:auto;
|
||||||
|
|
||||||
.members-label{
|
.members-label{
|
||||||
margin: 10px 20px 10px 20px !important;
|
margin: 10px 20px 10px 20px !important;
|
||||||
@@ -111,8 +107,6 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
margin: 10px 20px 10px 20px !important;
|
margin: 10px 20px 10px 20px !important;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
align-items: center;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.item-checkbox ion-checkbox, .members-checkbox ion-checkbox{
|
.item-checkbox ion-checkbox, .members-checkbox ion-checkbox{
|
||||||
@@ -121,20 +115,16 @@
|
|||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
.item-checkbox p, .members-checkbox p{
|
.item-checkbox ion-label, .members-checkbox p{
|
||||||
display: block;
|
|
||||||
margin: 0 !important;
|
|
||||||
width: 330px;
|
|
||||||
padding-left: 10px;
|
padding-left: 10px;
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
color: #0d89d1;
|
color: #0d89d1;
|
||||||
float: left;
|
float: left;
|
||||||
|
flex-grow: 1;
|
||||||
}
|
}
|
||||||
.item-checkbox ion-icon, .members-checkbox ion-icon{
|
.icon, .members-checkbox ion-icon{
|
||||||
font-size: 10px;
|
font-size: 10px;
|
||||||
float: left;
|
|
||||||
color:#99e47b;
|
color:#99e47b;
|
||||||
margin-left: 10px;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
import { NgModule } from '@angular/core';
|
||||||
|
import { Routes, RouterModule } from '@angular/router';
|
||||||
|
|
||||||
|
import { GroupContactsPage } from './group-contacts.page';
|
||||||
|
|
||||||
|
const routes: Routes = [
|
||||||
|
{
|
||||||
|
path: '',
|
||||||
|
component: GroupContactsPage
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
@NgModule({
|
||||||
|
imports: [RouterModule.forChild(routes)],
|
||||||
|
exports: [RouterModule],
|
||||||
|
})
|
||||||
|
export class GroupContactsPageRoutingModule {}
|
||||||
@@ -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 { GroupContactsPageRoutingModule } from './group-contacts-routing.module';
|
||||||
|
|
||||||
|
import { GroupContactsPage } from './group-contacts.page';
|
||||||
|
|
||||||
|
@NgModule({
|
||||||
|
imports: [
|
||||||
|
CommonModule,
|
||||||
|
FormsModule,
|
||||||
|
IonicModule,
|
||||||
|
GroupContactsPageRoutingModule
|
||||||
|
],
|
||||||
|
declarations: [GroupContactsPage]
|
||||||
|
})
|
||||||
|
export class GroupContactsPageModule {}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
<ion-header>
|
||||||
|
<ion-toolbar>
|
||||||
|
<ion-title>group-contacts</ion-title>
|
||||||
|
</ion-toolbar>
|
||||||
|
</ion-header>
|
||||||
|
|
||||||
|
<ion-content>
|
||||||
|
|
||||||
|
</ion-content>
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
||||||
|
import { IonicModule } from '@ionic/angular';
|
||||||
|
|
||||||
|
import { GroupContactsPage } from './group-contacts.page';
|
||||||
|
|
||||||
|
describe('GroupContactsPage', () => {
|
||||||
|
let component: GroupContactsPage;
|
||||||
|
let fixture: ComponentFixture<GroupContactsPage>;
|
||||||
|
|
||||||
|
beforeEach(waitForAsync(() => {
|
||||||
|
TestBed.configureTestingModule({
|
||||||
|
declarations: [ GroupContactsPage ],
|
||||||
|
imports: [IonicModule.forRoot()]
|
||||||
|
}).compileComponents();
|
||||||
|
|
||||||
|
fixture = TestBed.createComponent(GroupContactsPage);
|
||||||
|
component = fixture.componentInstance;
|
||||||
|
fixture.detectChanges();
|
||||||
|
}));
|
||||||
|
|
||||||
|
it('should create', () => {
|
||||||
|
expect(component).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
import { Component, OnInit } from '@angular/core';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'app-group-contacts',
|
||||||
|
templateUrl: './group-contacts.page.html',
|
||||||
|
styleUrls: ['./group-contacts.page.scss'],
|
||||||
|
})
|
||||||
|
export class GroupContactsPage implements OnInit {
|
||||||
|
|
||||||
|
constructor() { }
|
||||||
|
|
||||||
|
ngOnInit() {
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -15,7 +15,11 @@ const routes: Routes = [
|
|||||||
{
|
{
|
||||||
path: 'group-chat',
|
path: 'group-chat',
|
||||||
loadChildren: () => import('./group-chat/group-chat.module').then( m => m.GroupChatPageModule)
|
loadChildren: () => import('./group-chat/group-chat.module').then( m => m.GroupChatPageModule)
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'group-contacts',
|
||||||
loadChildren: () => import('./group-contacts/group-contacts.module').then( m => m.GroupContactsPageModule)
|
loadChildren: () => import('./group-contacts/group-contacts.module').then( m => m.GroupContactsPageModule)
|
||||||
|
}
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<div class="middle">
|
<div class="middle">
|
||||||
<ion-label class="title">Novo Grupo</ion-label>
|
<ion-label class="title">Novo Grupo</ion-label>
|
||||||
</div>
|
</div>
|
||||||
<app-btn-seguinte *ngIf="groupName" (click)="addContacts()"></app-btn-seguinte>
|
<app-btn-seguinte *ngIf="groupName" (click)="createGroup()"></app-btn-seguinte> <!-- addContacts -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</ion-toolbar>
|
</ion-toolbar>
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import { analyzeAndValidateNgModules } from '@angular/compiler';
|
import { analyzeAndValidateNgModules } from '@angular/compiler';
|
||||||
import { Component, Input, OnInit } from '@angular/core';
|
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
|
||||||
import { ModalController, NavParams, PickerController, PopoverController } from '@ionic/angular';
|
import { ModalController, NavParams, PickerController, PopoverController } from '@ionic/angular';
|
||||||
|
import { ChatService } from 'src/app/services/chat.service';
|
||||||
import { GroupDurationPage } from 'src/app/shared/popover/group-duration/group-duration.page';
|
import { GroupDurationPage } from 'src/app/shared/popover/group-duration/group-duration.page';
|
||||||
import { GroupContactsPage } from '../group-messages/group-contacts/group-contacts.page';
|
import { GroupContactsPage } from '../group-messages/group-contacts/group-contacts.page';
|
||||||
|
|
||||||
@@ -18,11 +19,13 @@ export class NewGroupPage implements OnInit {
|
|||||||
//groupName:string;
|
//groupName:string;
|
||||||
|
|
||||||
@Input() groupName:string;
|
@Input() groupName:string;
|
||||||
|
@Output() closeAllDesktopComponent = new EventEmitter<any>();
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private pickerController: PickerController,
|
private pickerController: PickerController,
|
||||||
private popoverController: PopoverController,
|
private popoverController: PopoverController,
|
||||||
private modalController: ModalController,
|
private modalController: ModalController,
|
||||||
|
private chatService: ChatService,
|
||||||
//private navParams: NavParams,
|
//private navParams: NavParams,
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
@@ -37,7 +40,19 @@ export class NewGroupPage implements OnInit {
|
|||||||
this.showDuration = event.detail.checked;
|
this.showDuration = event.detail.checked;
|
||||||
}
|
}
|
||||||
close(){
|
close(){
|
||||||
this.modalController.dismiss();
|
//this.modalController.dismiss();
|
||||||
|
console.log('close');
|
||||||
|
this.closeAllDesktopComponent.emit();
|
||||||
|
}
|
||||||
|
|
||||||
|
createGroup(){
|
||||||
|
let name = this.groupName.split(' ').join('-');
|
||||||
|
let body = { "name":name, }
|
||||||
|
this.chatService.addGroup(body).subscribe(res=>{
|
||||||
|
console.log('group created');
|
||||||
|
console.log(res['group']);
|
||||||
|
this.closeAllDesktopComponent.emit(res['group']._id);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async addContacts(){
|
async addContacts(){
|
||||||
|
|||||||
Reference in New Issue
Block a user