mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
add popup message
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { Routes, RouterModule } from '@angular/router';
|
||||
|
||||
import { PopupQuestionPage } from './popup-question.page';
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
component: PopupQuestionPage
|
||||
}
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forChild(routes)],
|
||||
exports: [RouterModule],
|
||||
})
|
||||
export class PopupQuestionPageRoutingModule {}
|
||||
@@ -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 { PopupQuestionPageRoutingModule } from './popup-question-routing.module';
|
||||
|
||||
import { PopupQuestionPage } from './popup-question.page';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
IonicModule,
|
||||
PopupQuestionPageRoutingModule
|
||||
],
|
||||
declarations: [PopupQuestionPage]
|
||||
})
|
||||
export class PopupQuestionPageModule {}
|
||||
@@ -0,0 +1,20 @@
|
||||
<ion-header class="ion-no-border">
|
||||
</ion-header>
|
||||
|
||||
<ion-content>
|
||||
<div class="header-content width-100">
|
||||
<div class="header-title d-flex width-100">
|
||||
<h3>{{ title }}</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div class="header-body width-100">
|
||||
<p>{{ message }}</p>
|
||||
</div>
|
||||
</ion-content>
|
||||
<ion-footer>
|
||||
<div class="buttons width-100">
|
||||
<button class="btn-ok-medium" shape="round" (click)="close()">Não</button>
|
||||
<button class="btn-ok-medium" shape="round" (click)="save()">Sim</button>
|
||||
</div>
|
||||
|
||||
</ion-footer>
|
||||
@@ -0,0 +1,27 @@
|
||||
@import '~src/function.scss';
|
||||
ion-content{
|
||||
--padding-top:15px;
|
||||
--padding-start: 15px;
|
||||
--padding-end: 15px;
|
||||
}
|
||||
.header-content{
|
||||
overflow: hidden;
|
||||
margin: 0 auto;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.header-title{
|
||||
font-family: Roboto;
|
||||
font-size: rem(20);
|
||||
color:#000;
|
||||
margin: 0 5px 0 5px;
|
||||
}
|
||||
.header-body{
|
||||
margin: 0 5px 0 5px;
|
||||
}
|
||||
|
||||
.buttons{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 15px 0 15px 0;
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { PopupQuestionPage } from './popup-question.page';
|
||||
|
||||
describe('PopupQuestionPage', () => {
|
||||
let component: PopupQuestionPage;
|
||||
let fixture: ComponentFixture<PopupQuestionPage>;
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ PopupQuestionPage ],
|
||||
imports: [IonicModule.forRoot()]
|
||||
}).compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(PopupQuestionPage);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
}));
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,50 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ModalController, NavParams } from '@ionic/angular';
|
||||
// import { z } from "zod";
|
||||
|
||||
@Component({
|
||||
selector: 'app-popup-question',
|
||||
templateUrl: './popup-question.page.html',
|
||||
styleUrls: ['./popup-question.page.scss'],
|
||||
})
|
||||
export class PopupQuestionPage implements OnInit {
|
||||
|
||||
title = 'Deseja arquivar este expediente?'
|
||||
message = 'Nota: Ao Efetuar esta operação, o tratamento deste expediente não poderá ser realizado a partir da caixa de correspondência'
|
||||
|
||||
constructor(
|
||||
private modalController: ModalController,
|
||||
private navParams: NavParams,
|
||||
) {
|
||||
const parameters: any = this.navParams.data
|
||||
|
||||
// const parametersValidation = PopUpQuestionParametersSchema.safeParse(parameters)
|
||||
|
||||
// if(parametersValidation.success) {
|
||||
this.title = parameters.title
|
||||
this.message = parameters.message
|
||||
// } else {
|
||||
// throw('parameters error')
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
ngOnInit() {}
|
||||
|
||||
close() {
|
||||
this.modalController.dismiss('No');
|
||||
}
|
||||
|
||||
save() {
|
||||
this.modalController.dismiss('Yes');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
// const PopUpQuestionParametersSchema = z.object({
|
||||
// title: z.string(),
|
||||
// message: z.string(),
|
||||
// });
|
||||
// export type PopUpQuestionParameters = z.infer<typeof PopUpQuestionParametersSchema>;
|
||||
Reference in New Issue
Block a user