Merge branch 'feature/chat' into developer

This commit is contained in:
tiago.kayaya
2021-01-15 16:09:41 +01:00
142 changed files with 4062 additions and 382 deletions
@@ -0,0 +1,17 @@
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { ChatOptionsPopoverPage } from './chat-options-popover.page';
const routes: Routes = [
{
path: '',
component: ChatOptionsPopoverPage
}
];
@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule],
})
export class ChatOptionsPopoverPageRoutingModule {}
@@ -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 { ChatOptionsPopoverPageRoutingModule } from './chat-options-popover-routing.module';
import { ChatOptionsPopoverPage } from './chat-options-popover.page';
@NgModule({
imports: [
CommonModule,
FormsModule,
IonicModule,
ChatOptionsPopoverPageRoutingModule
],
declarations: [ChatOptionsPopoverPage]
})
export class ChatOptionsPopoverPageModule {}
@@ -0,0 +1,23 @@
<ion-content>
<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>
@@ -0,0 +1,32 @@
ion-row{
padding: 10px 10px 5px 10px;
}
.border-top{
padding-top: 5px !important;
border-top: 1px solid #ebebeb;
}
/* ion-col{
border: 1px solid red;
} */
.btn-cancel{
display: block;
width: 170px !important;
height: 45px !important;
border-radius: 22.5px;
background-color: #e0e9ee;
--color: #061b52 !important;
--background:transparent;
--box-shadow: none;
margin: 0 auto !important;
}
.btn-ok{
display: block;
width: 170px !important;
height: 45px !important;
border-radius: 22.5px;
--background: #42b9fe;
--color: #ffffff !important;
margin: 0 auto !important;
}
@@ -0,0 +1,24 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { IonicModule } from '@ionic/angular';
import { ChatOptionsPopoverPage } from './chat-options-popover.page';
describe('ChatOptionsPopoverPage', () => {
let component: ChatOptionsPopoverPage;
let fixture: ComponentFixture<ChatOptionsPopoverPage>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ ChatOptionsPopoverPage ],
imports: [IonicModule.forRoot()]
}).compileComponents();
fixture = TestBed.createComponent(ChatOptionsPopoverPage);
component = fixture.componentInstance;
fixture.detectChanges();
}));
it('should create', () => {
expect(component).toBeTruthy();
});
});
@@ -0,0 +1,22 @@
import { Component, OnInit } from '@angular/core';
import { PopoverController } from '@ionic/angular';
@Component({
selector: 'app-chat-options-popover',
templateUrl: './chat-options-popover.page.html',
styleUrls: ['./chat-options-popover.page.scss'],
})
export class ChatOptionsPopoverPage implements OnInit {
constructor(
private popoverController: PopoverController
) { }
ngOnInit() {
}
close(){
this.popoverController.dismiss();
}
}
@@ -1,16 +1,18 @@
<div>
<ion-toolbar>
<div class="buttons">
<div class="btn-item">
<ion-button class="btn-cancel" shape="round" >Sair do Grupo</ion-button>.
<ion-button class="btn-ok" shape="round" >Alterar nome</ion-button>
</div>
<div class="btn-class">
<hr class="solid">
</div>
<div class="btn-item">
<ion-button class="btn-delete" shape="round">Apagar grupo</ion-button>
</div>
</div>
</ion-toolbar>
</div>
<ion-content>
<ion-row>
<ion-col>
<button class="btn-cancel" shape="round" >Sair do Grupo</button>
</ion-col>
<ion-col>
<button class="btn-ok" shape="round" >Alterar nome do grupo</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>
<button class="btn-delete" shape="round">Apagar grupo</button>
</ion-col>
</ion-row>
</ion-content>
@@ -1,49 +1,15 @@
.buttons{
overflow: auto;
padding-top: 10px;
padding-bottom: 10px;
ion-row{
padding: 10px 10px 5px 10px;
}
.btn-item{
padding: 2px;
margin: 10px 20px 10px 20px !important;
overflow: auto;
.border-top{
padding-top: 5px !important;
border-top: 1px solid #ebebeb;
}
.btn-ok, .btn-cancel, .btn-delete{
/* ion-col{
border: 1px solid red;
} */
/* .btn-ok, .btn-cancel, .btn-delete{
font-size: 13px;
padding:0 !important;
}
hr.solid {
width: 360px;
border-top: 1px solid #ebebeb;
}
.btn-ok{
display: block;
width: 170px !important;
height: 45px !important;
border-radius: 22.5px;
/* right: 20px !important; */
--background: #42b9fe;
--color: #ffffff !important;
float: left;
}
.btn-cancel{
width: 170px !important;
height: 45px !important;
border-radius: 22.5px;
background-color: #e0e9ee;
--color: #061b52 !important;
--background:transparent;
--box-shadow: none;
float: right;
}
.btn-delete{
width: 170px !important;
height: 45px !important;;
border-radius: 22.5px;
--background: #ffe0e0;
--color: #d30a0a !important;
--padding-start:0 !important;
--padding-end:0 !important;
float: left;
}
} */
@@ -1,4 +1,5 @@
import { Component, OnInit } from '@angular/core';
import { PopoverController } from '@ionic/angular';
@Component({
selector: 'app-chat-popover',
@@ -7,9 +8,14 @@ import { Component, OnInit } from '@angular/core';
})
export class ChatPopoverPage implements OnInit {
constructor() { }
constructor(
private popoverController: PopoverController,
) { }
ngOnInit() {
}
close(){
this.popoverController.dismiss();
}
}
@@ -0,0 +1,17 @@
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { GroupDurationPage } from './group-duration.page';
const routes: Routes = [
{
path: '',
component: GroupDurationPage
}
];
@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule],
})
export class GroupDurationPageRoutingModule {}
@@ -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 { GroupDurationPageRoutingModule } from './group-duration-routing.module';
import { GroupDurationPage } from './group-duration.page';
@NgModule({
imports: [
CommonModule,
FormsModule,
IonicModule,
GroupDurationPageRoutingModule
],
declarations: [GroupDurationPage]
})
export class GroupDurationPageModule {}
@@ -0,0 +1,19 @@
<ion-content>
<div class="p-header">
<h3>Duração</h3>
</div>
<div class="picker">
</div>
<div class="p-buttons">
<ion-row>
<ion-col>
<button (click)="close()" full class="btn-cancel" shape="round" >Cancelar</button>
</ion-col>
<ion-col>
<button class="btn-ok" shape="round" >Ok</button>
</ion-col>
</ion-row>
</div>
</ion-content>
@@ -0,0 +1,24 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { IonicModule } from '@ionic/angular';
import { GroupDurationPage } from './group-duration.page';
describe('GroupDurationPage', () => {
let component: GroupDurationPage;
let fixture: ComponentFixture<GroupDurationPage>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ GroupDurationPage ],
imports: [IonicModule.forRoot()]
}).compileComponents();
fixture = TestBed.createComponent(GroupDurationPage);
component = fixture.componentInstance;
fixture.detectChanges();
}));
it('should create', () => {
expect(component).toBeTruthy();
});
});
@@ -0,0 +1,21 @@
import { Component, OnInit } from '@angular/core';
import { PopoverController } from '@ionic/angular';
@Component({
selector: 'app-group-duration',
templateUrl: './group-duration.page.html',
styleUrls: ['./group-duration.page.scss'],
})
export class GroupDurationPage implements OnInit {
constructor(
public popoverController: PopoverController,
) { }
ngOnInit() {
}
close(){
this.popoverController.dismiss();
}
}
@@ -0,0 +1,17 @@
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { MessagesOptionsPage } from './messages-options.page';
const routes: Routes = [
{
path: '',
component: MessagesOptionsPage
}
];
@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule],
})
export class MessagesOptionsPageRoutingModule {}
@@ -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 { MessagesOptionsPageRoutingModule } from './messages-options-routing.module';
import { MessagesOptionsPage } from './messages-options.page';
@NgModule({
imports: [
CommonModule,
FormsModule,
IonicModule,
MessagesOptionsPageRoutingModule
],
declarations: [MessagesOptionsPage]
})
export class MessagesOptionsPageModule {}
@@ -0,0 +1,10 @@
<ion-content>
<ion-row class="border-top">
<ion-col>
<button (click)="close()" full class="btn-cancel" shape="round" >Cancelar</button>
</ion-col>
<ion-col>
<button (click)="closeChatRoom()" full class="btn-delete" shape="round" >Apagar conversa</button>
</ion-col>
</ion-row>
</ion-content>
@@ -0,0 +1,3 @@
ion-row{
padding: 10px 10px 5px 10px;
}
@@ -0,0 +1,24 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { IonicModule } from '@ionic/angular';
import { MessagesOptionsPage } from './messages-options.page';
describe('MessagesOptionsPage', () => {
let component: MessagesOptionsPage;
let fixture: ComponentFixture<MessagesOptionsPage>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ MessagesOptionsPage ],
imports: [IonicModule.forRoot()]
}).compileComponents();
fixture = TestBed.createComponent(MessagesOptionsPage);
component = fixture.componentInstance;
fixture.detectChanges();
}));
it('should create', () => {
expect(component).toBeTruthy();
});
});
@@ -0,0 +1,38 @@
import { Component, OnInit } from '@angular/core';
import { NavParams, PopoverController } from '@ionic/angular';
import { ChatService } from 'src/app/services/chat.service';
@Component({
selector: 'app-messages-options',
templateUrl: './messages-options.page.html',
styleUrls: ['./messages-options.page.scss'],
})
export class MessagesOptionsPage implements OnInit {
roomId:string;
constructor(
private popoverController: PopoverController,
private chatService: ChatService,
private navParams: NavParams,
)
{
this.roomId = this.navParams.get('roomId');
}
ngOnInit() {
}
close(){
this.popoverController.dismiss();
}
closeChatRoom(){
let body = { "roomId": this.roomId }
this.chatService.removeChatRoom(body).subscribe(res=>{
console.log(res);
});
this.close();
}
}
-2
View File
@@ -19,14 +19,12 @@ import { ChatPopoverPage } from './popover/chat-popover/chat-popover.page';
HeaderPrPage,
BtnSeguintePage,
BtnModalDismissPage,
ChatPopoverPage,
],
entryComponents:[],
declarations: [HeaderPage,
HeaderPrPage,
BtnSeguintePage,
BtnModalDismissPage,
ChatPopoverPage,
]
})
export class SharedModule {}