mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
Add group-chat page
This commit is contained in:
@@ -33,6 +33,10 @@ const routes: Routes = [
|
||||
{
|
||||
path: 'btn-seguinte',
|
||||
loadChildren: () => import('./shared/btn-seguinte/btn-seguinte.module').then( m => m.BtnSeguintePageModule)
|
||||
},
|
||||
{
|
||||
path: 'btn-modal-dismiss',
|
||||
loadChildren: () => import('./shared/btn-modal-dismiss/btn-modal-dismiss.module').then( m => m.BtnModalDismissPageModule)
|
||||
},
|
||||
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<div class="div-title">
|
||||
<ion-label class="title">Contactos</ion-label>
|
||||
</div>
|
||||
<app-btn-seguinte (click)="clicked()"></app-btn-seguinte>
|
||||
<app-btn-seguinte (click)="groupChat()"></app-btn-seguinte>
|
||||
</div>
|
||||
</div>
|
||||
</ion-toolbar>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ModalController } from '@ionic/angular';
|
||||
import { GroupChatPage } from '../group-chat/group-chat.page';
|
||||
|
||||
@Component({
|
||||
selector: 'app-contacts',
|
||||
@@ -31,5 +32,17 @@ export class ContactsPage implements OnInit {
|
||||
console.log('clicked');
|
||||
|
||||
}
|
||||
async groupChat(){
|
||||
const modal = await this.modalController.create({
|
||||
component: GroupChatPage,
|
||||
componentProps: {},
|
||||
cssClass: 'contacts',
|
||||
backdropDismiss: false
|
||||
});
|
||||
|
||||
await modal.present();
|
||||
|
||||
modal.onDidDismiss();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { Routes, RouterModule } from '@angular/router';
|
||||
|
||||
import { GroupChatPage } from './group-chat.page';
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
component: GroupChatPage
|
||||
}
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forChild(routes)],
|
||||
exports: [RouterModule],
|
||||
})
|
||||
export class GroupChatPageRoutingModule {}
|
||||
@@ -0,0 +1,22 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { GroupChatPageRoutingModule } from './group-chat-routing.module';
|
||||
|
||||
import { GroupChatPage } from './group-chat.page';
|
||||
import { SharedModule } from 'src/app/shared/shared.module';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
IonicModule,
|
||||
SharedModule,
|
||||
GroupChatPageRoutingModule
|
||||
],
|
||||
declarations: [GroupChatPage]
|
||||
})
|
||||
export class GroupChatPageModule {}
|
||||
@@ -0,0 +1,17 @@
|
||||
<ion-header class="ion-no-border">
|
||||
<ion-toolbar class="header-toolbar">
|
||||
<div class="main-header">
|
||||
<div class="title-content">
|
||||
<app-btn-modal-dismiss></app-btn-modal-dismiss>
|
||||
<div class="middle">
|
||||
<ion-label class="title">Novo Grupo</ion-label>
|
||||
</div>
|
||||
<app-btn-seguinte></app-btn-seguinte>
|
||||
</div>
|
||||
</div>
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
|
||||
<ion-content>
|
||||
|
||||
</ion-content>
|
||||
@@ -0,0 +1,24 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { GroupChatPage } from './group-chat.page';
|
||||
|
||||
describe('GroupChatPage', () => {
|
||||
let component: GroupChatPage;
|
||||
let fixture: ComponentFixture<GroupChatPage>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ GroupChatPage ],
|
||||
imports: [IonicModule.forRoot()]
|
||||
}).compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(GroupChatPage);
|
||||
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-chat',
|
||||
templateUrl: './group-chat.page.html',
|
||||
styleUrls: ['./group-chat.page.scss'],
|
||||
})
|
||||
export class GroupChatPage implements OnInit {
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
|
||||
}
|
||||
@@ -11,6 +11,10 @@ const routes: Routes = [
|
||||
{
|
||||
path: 'contacts',
|
||||
loadChildren: () => import('./contacts/contacts.module').then( m => m.ContactsPageModule)
|
||||
},
|
||||
{
|
||||
path: 'group-chat',
|
||||
loadChildren: () => import('./group-chat/group-chat.module').then( m => m.GroupChatPageModule)
|
||||
}
|
||||
];
|
||||
|
||||
|
||||
@@ -8,9 +8,6 @@
|
||||
<div class="middle">
|
||||
<ion-label class="title">Novo Grupo</ion-label>
|
||||
</div>
|
||||
<!-- <div class="right" (click)="addContacts()">
|
||||
<ion-label>Seguinte</ion-label>
|
||||
</div> -->
|
||||
<app-btn-seguinte (click)="addContacts()"></app-btn-seguinte>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { Routes, RouterModule } from '@angular/router';
|
||||
|
||||
import { BtnModalDismissPage } from './btn-modal-dismiss.page';
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
component: BtnModalDismissPage
|
||||
}
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forChild(routes)],
|
||||
exports: [RouterModule],
|
||||
})
|
||||
export class BtnModalDismissPageRoutingModule {}
|
||||
@@ -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 { BtnModalDismissPageRoutingModule } from './btn-modal-dismiss-routing.module';
|
||||
|
||||
import { BtnModalDismissPage } from './btn-modal-dismiss.page';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
IonicModule,
|
||||
BtnModalDismissPageRoutingModule
|
||||
],
|
||||
declarations: [BtnModalDismissPage]
|
||||
})
|
||||
export class BtnModalDismissPageModule {}
|
||||
@@ -0,0 +1,3 @@
|
||||
<div class="left">
|
||||
<ion-icon (click)="close()" slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
|
||||
</div>
|
||||
@@ -0,0 +1,6 @@
|
||||
.left{
|
||||
width: 37px;
|
||||
float: left;
|
||||
font-size: 35px;
|
||||
overflow: auto;
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { BtnModalDismissPage } from './btn-modal-dismiss.page';
|
||||
|
||||
describe('BtnModalDismissPage', () => {
|
||||
let component: BtnModalDismissPage;
|
||||
let fixture: ComponentFixture<BtnModalDismissPage>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ BtnModalDismissPage ],
|
||||
imports: [IonicModule.forRoot()]
|
||||
}).compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(BtnModalDismissPage);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
}));
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,24 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ModalController } from '@ionic/angular';
|
||||
|
||||
@Component({
|
||||
selector: 'app-btn-modal-dismiss',
|
||||
templateUrl: './btn-modal-dismiss.page.html',
|
||||
styleUrls: ['./btn-modal-dismiss.page.scss'],
|
||||
})
|
||||
export class BtnModalDismissPage implements OnInit {
|
||||
|
||||
constructor(
|
||||
private modalController: ModalController,
|
||||
) {
|
||||
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
}
|
||||
close(){
|
||||
this.modalController.dismiss();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -5,6 +5,7 @@ import { IonicModule } from '@ionic/angular';
|
||||
import { HeaderPage } from './header/header.page';
|
||||
import { HeaderPrPage } from './header-pr/header-pr.page';
|
||||
import { BtnSeguintePage } from './btn-seguinte/btn-seguinte.page';
|
||||
import { BtnModalDismissPage } from './btn-modal-dismiss/btn-modal-dismiss.page';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
@@ -16,11 +17,13 @@ import { BtnSeguintePage } from './btn-seguinte/btn-seguinte.page';
|
||||
HeaderPage,
|
||||
HeaderPrPage,
|
||||
BtnSeguintePage,
|
||||
BtnModalDismissPage,
|
||||
],
|
||||
entryComponents:[],
|
||||
declarations: [HeaderPage,
|
||||
HeaderPrPage,
|
||||
BtnSeguintePage,
|
||||
BtnModalDismissPage,
|
||||
]
|
||||
})
|
||||
export class SharedModule {}
|
||||
Reference in New Issue
Block a user