mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-21 05:45:50 +00:00
chage file path
This commit is contained in:
@@ -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 class="container">
|
||||
<div class="arrow-right">
|
||||
<button class="btn-no-color" (click)="close()">
|
||||
<ion-icon src='assets/images/theme/gov/icons-calendar-arrow-right.svg'></ion-icon>
|
||||
</button>
|
||||
</div>
|
||||
<div class="buttons">
|
||||
<button (click)="closeChatRoom()" full class="btn-delete" shape="round" >Apagar conversa</button>
|
||||
</div>
|
||||
</ion-content>
|
||||
@@ -0,0 +1,60 @@
|
||||
@import '~src/function.scss';
|
||||
|
||||
.container{
|
||||
--padding-top:20px !important;
|
||||
--padding-bottom:20px !important;
|
||||
--padding-start:20px !important;
|
||||
--padding-end:20px !important;
|
||||
}
|
||||
.arrow-right{
|
||||
display: none;
|
||||
margin-bottom: 20px;
|
||||
.arrow-right-icon{
|
||||
width: 37px;
|
||||
float: right;
|
||||
font-size: rem(35);
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
|
||||
.buttons{
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-around;
|
||||
}
|
||||
.solid {
|
||||
display: block;
|
||||
width: 90%;
|
||||
border-top: 1px solid #bbb;
|
||||
margin: 10px auto !important;
|
||||
}
|
||||
|
||||
@media only screen and (min-width: 701px) {
|
||||
.arrow-right{
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
.btn-cancel{
|
||||
//display: none;
|
||||
width: 100% !important;
|
||||
margin-bottom: 10px !important;
|
||||
}
|
||||
.btn-cancel:hover, .btn-delete:hover{
|
||||
background-color: var(--button-hover);
|
||||
color: #fff !important;
|
||||
}
|
||||
.btn-ok{
|
||||
width: 100% !important;
|
||||
}
|
||||
.btn-delete{
|
||||
width: 100% !important;
|
||||
margin-bottom: 10px !important;
|
||||
}
|
||||
.solid{
|
||||
display: block;
|
||||
}
|
||||
.mobile-only{
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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,49 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ModalController, NavParams, PopoverController } from '@ionic/angular';
|
||||
import { ChatService } from 'src/app/services/chat.service';
|
||||
import { ThemeService } from 'src/app/services/theme.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 modalController: ModalController,
|
||||
private chatService: ChatService,
|
||||
private navParams: NavParams,
|
||||
public ThemeService: ThemeService,
|
||||
)
|
||||
{
|
||||
this.roomId = this.navParams.get('roomId');
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
// this.chatService.refreshtoken();
|
||||
}
|
||||
|
||||
close(){
|
||||
if( window.innerWidth <= 701){
|
||||
this.modalController.dismiss();
|
||||
this.popoverController.dismiss();
|
||||
}
|
||||
else{
|
||||
this.modalController.dismiss();
|
||||
this.popoverController.dismiss();
|
||||
}
|
||||
}
|
||||
|
||||
closeChatRoom(){
|
||||
let body = { "roomId": this.roomId }
|
||||
this.chatService.removeChatRoom(body).subscribe(res=>{
|
||||
|
||||
});
|
||||
this.close();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user