mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 21:35:50 +00:00
Merge branch 'developer' of bitbucket.org:equilibriumito/gabinete-digital into developer
This commit is contained in:
@@ -431,7 +431,7 @@ export class DespachoPage implements OnInit {
|
||||
return this.animationController.create()
|
||||
.addElement(baseEl)
|
||||
.easing('ease-out')
|
||||
.duration(500)
|
||||
.duration(7000)
|
||||
.addAnimation([backdropAnimation, wrapperAnimation]);
|
||||
}
|
||||
|
||||
@@ -474,7 +474,7 @@ export class DespachoPage implements OnInit {
|
||||
return this.animationController.create()
|
||||
.addElement(baseEl)
|
||||
.easing('ease-out')
|
||||
.duration(500)
|
||||
.duration(7000)
|
||||
.addAnimation([backdropAnimation, wrapperAnimation]);
|
||||
}
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
<div class="content-details">
|
||||
<ion-label>
|
||||
<p>{{customDate}}</p>
|
||||
<p>das {{loadedEvent.workflowInstanceDataFields.StartDate | date: 'hh:mm'}} às {{loadedEvent.workflowInstanceDataFields.EndDate | date: 'hh:mm'}}</p>
|
||||
<p>das12 {{loadedEvent.workflowInstanceDataFields.StartDate | date: 'hh:mm'}} às {{loadedEvent.workflowInstanceDataFields.EndDate | date: 'hh:mm'}}</p>
|
||||
<p *ngIf="!loadedEvent.workflowInstanceDataFields.IsRecurring">(Não se repete)</p>
|
||||
<p *ngIf="loadedEvent.workflowInstanceDataFields.IsRecurring">Repete</p>
|
||||
</ion-label>
|
||||
|
||||
@@ -11,6 +11,7 @@ import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
|
||||
import { EditEventToApproveComponent } from 'src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page';
|
||||
import { BadRequestPage } from 'src/app/shared/popover/bad-request/bad-request.page';
|
||||
import { SuccessMessagePage } from 'src/app/shared/popover/success-message/success-message.page';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-approve-event',
|
||||
@@ -46,7 +47,8 @@ export class ApproveEventPage implements OnInit {
|
||||
private menu: MenuController,
|
||||
private alertService: AlertService,
|
||||
private iab: InAppBrowser,
|
||||
private animationController: AnimationController
|
||||
private animationController: AnimationController,
|
||||
private toastService: ToastService,
|
||||
) {
|
||||
this.activatedRoute.queryParams.subscribe(params => {
|
||||
if(params["serialNumber"]) {
|
||||
@@ -61,17 +63,7 @@ export class ApproveEventPage implements OnInit {
|
||||
}
|
||||
|
||||
goBack() {
|
||||
let navigationExtras: NavigationExtras = {
|
||||
queryParams: {
|
||||
"eventos": true,
|
||||
}
|
||||
};
|
||||
if( window.innerWidth < 801) {
|
||||
this.router.navigate(['/home/gabinete-digital/event-list']);
|
||||
}
|
||||
else {
|
||||
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
||||
}
|
||||
window.history.back();
|
||||
}
|
||||
|
||||
async getTask(){
|
||||
@@ -91,9 +83,10 @@ export class ApproveEventPage implements OnInit {
|
||||
console.log(body);
|
||||
|
||||
try {
|
||||
await this.processes.PostTaskAction(body).toPromise()
|
||||
this.successMessage()
|
||||
this.goBack();
|
||||
//await this.processes.PostTaskAction(body).toPromise()
|
||||
//this.successMessage()
|
||||
this.toastService.successMessage('Evento rejeitado!');
|
||||
//this.goBack();
|
||||
} catch (error) {
|
||||
this.badRequest()
|
||||
}
|
||||
@@ -116,13 +109,13 @@ export class ApproveEventPage implements OnInit {
|
||||
}
|
||||
|
||||
async rejectTask(serialNumber:string){
|
||||
|
||||
let body = { "serialNumber": serialNumber, "action": "Rejeitar" }
|
||||
console.log(body);
|
||||
|
||||
try {
|
||||
this.processes.PostTaskAction(body).toPromise();
|
||||
await this.successMessage('Processo rejeitado');
|
||||
//await this.successMessage('Processo rejeitado');
|
||||
await this.toastService.successMessage('Processo rejeitado');
|
||||
this.goBack();
|
||||
} catch (error) {
|
||||
this.badRequest()
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<app-header></app-header>
|
||||
</ion-header>
|
||||
<ion-content>
|
||||
<ion-refresher name="refresher" slot="fixed" (ionRefresh)="doRefresh($event)">
|
||||
<ion-refresher name="refresher" slot="fixed" (ionRefresh)="doRefresh()">
|
||||
<ion-progress-bar type="indeterminate" *ngIf="showLoader"></ion-progress-bar>
|
||||
<ion-refresher-content>
|
||||
</ion-refresher-content>
|
||||
|
||||
@@ -37,7 +37,7 @@ export class EventListPage implements OnInit {
|
||||
|
||||
this.router.events.forEach((event) => {
|
||||
if(event instanceof NavigationEnd && event.url == this.router.url) {
|
||||
this.LoadToApproveEvents();
|
||||
this.doRefresh();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -96,11 +96,10 @@ export class EventListPage implements OnInit {
|
||||
|
||||
|
||||
|
||||
doRefresh(event) {
|
||||
doRefresh() {
|
||||
this.LoadToApproveEvents();
|
||||
console.log('refresh');
|
||||
setTimeout(() => {
|
||||
event.target.complete();
|
||||
}, 2000);
|
||||
}
|
||||
close(){
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<ion-content class="text-white">
|
||||
<div class="main-wrapper">
|
||||
<div class="wrapper" *ngIf="userLoginPreference != 'pin' && userLoginPreference != 'fingerprint' && !setPint">
|
||||
<div class="div-logo">
|
||||
<img src='assets/images/logo-no-bg.png' alt='logo'>
|
||||
@@ -11,11 +12,17 @@
|
||||
</ion-item>
|
||||
<p class="form-label text-white">Palavra-passe</p>
|
||||
<ion-item class="form-input">
|
||||
<ion-input type="password" [(ngModel)]="password" name="input-password" ></ion-input>
|
||||
</ion-item>
|
||||
<ion-button class="btn-ok-login" fill="clear" expand="block" shape="round" (click)="Login()">Iniciar</ion-button>
|
||||
<ion-input (keyup.enter)="Login()" type="password" [(ngModel)]="password" name="input-password" ></ion-input>
|
||||
</ion-item>
|
||||
<div class="d-flex pt-25">
|
||||
<button class="btn-ok btn-login" fill="clear" expand="block" shape="round" (click)="Login()">Iniciar</button>
|
||||
</div>
|
||||
</form>
|
||||
<div class="msg-bottom d-flex">
|
||||
<p class="msg-bottom-p">Uma iniciativa do Gabinete do Presidente da República</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="main-content height-100" *ngIf="userLoginPreference == 'pin' || setPint">
|
||||
<div class=" align-center justify-center">
|
||||
@@ -65,5 +72,8 @@
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</ion-content>
|
||||
@@ -1,5 +1,26 @@
|
||||
@import '~src/function.scss';
|
||||
:host, app-login {
|
||||
ion-content {
|
||||
background: linear-gradient(180deg, #42B9FE 0%, #0782C9 100%) !important;
|
||||
}
|
||||
}
|
||||
ion-content{
|
||||
background-color: white !important;
|
||||
}
|
||||
|
||||
.main-wrapper{
|
||||
background: linear-gradient(180deg, #42B9FE 0%, #0782C9 100%) !important;
|
||||
display: flex;
|
||||
height: calc(100% - 50Px);
|
||||
overflow: auto;
|
||||
|
||||
}
|
||||
.wrapper{
|
||||
margin: 0 auto;
|
||||
width: 400px;
|
||||
height: auto;
|
||||
padding: 0 !important;
|
||||
margin: auto !important;
|
||||
overflow: auto;
|
||||
}
|
||||
.div-logo{
|
||||
width: 200px;
|
||||
@@ -10,19 +31,19 @@
|
||||
width: 100%;
|
||||
}
|
||||
.wrapper ion-input{
|
||||
font-size: 18px;
|
||||
font-size: 16px;
|
||||
}
|
||||
.wrapper ion-button{
|
||||
font-size: medium;
|
||||
margin-top: 18px;
|
||||
margin-top: 16px;
|
||||
}
|
||||
ion-item{
|
||||
--background: transparent;
|
||||
}
|
||||
.form{
|
||||
width: 300px;
|
||||
margin: auto;
|
||||
overflow: auto;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.form-label{
|
||||
margin: 15px 0 5px 0;
|
||||
@@ -30,33 +51,18 @@ ion-item{
|
||||
}
|
||||
.form-input{
|
||||
--background: #fff;
|
||||
/* --color:#fff; */
|
||||
border-radius: 10px;
|
||||
margin: 5px 0 5px 0;
|
||||
}
|
||||
.btn-ok-login{
|
||||
width: 160px !important;
|
||||
height: 45px !important;
|
||||
margin: 15px auto;
|
||||
padding: 10px 15px;
|
||||
--color:#000;
|
||||
border-radius: 22.5px;
|
||||
background-color: #42b9fe;
|
||||
color: #ffffff !important;
|
||||
margin: 10px 0 10px 0;
|
||||
}
|
||||
.btn-login{
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
:host, app-login {
|
||||
ion-content {
|
||||
background: linear-gradient(180deg, #42B9FE 0%, #0782C9 100%) !important;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ion-content{
|
||||
background-color: white !important;
|
||||
}
|
||||
|
||||
|
||||
@import '~src/function.scss';
|
||||
|
||||
.div-top-header{
|
||||
margin: 0 em(20px);
|
||||
@@ -140,4 +146,24 @@ ion-content{
|
||||
|
||||
.voltar{
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.msg-bottom{
|
||||
width: 100%;
|
||||
color: #fff;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
.msg-bottom-p{
|
||||
width: 220px;
|
||||
position: absolute;
|
||||
bottom: 0 !important;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (min-width: 1024px){
|
||||
.form{
|
||||
width: 400px;
|
||||
}
|
||||
}
|
||||
@@ -1,12 +1,15 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { AlertController } from '@ionic/angular';
|
||||
import { AlertController, AnimationController } from '@ionic/angular';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class AlertService {
|
||||
|
||||
constructor(public alertController: AlertController) { }
|
||||
constructor(
|
||||
public alertController: AlertController,
|
||||
private animationController: AnimationController,
|
||||
) { }
|
||||
|
||||
async presentAlert(message:string) {
|
||||
const alert = await this.alertController.create({
|
||||
|
||||
@@ -1,12 +1,18 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { ToastController } from '@ionic/angular';
|
||||
import { AnimationController, ModalController, ToastController } from '@ionic/angular';
|
||||
import { BadRequestPage } from '../shared/popover/bad-request/bad-request.page';
|
||||
import { SuccessMessagePage } from '../shared/popover/success-message/success-message.page';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class ToastService {
|
||||
|
||||
constructor(public toastController: ToastController) { }
|
||||
constructor(
|
||||
public toastController: ToastController,
|
||||
private animationController: AnimationController,
|
||||
private modalController: ModalController,
|
||||
) { }
|
||||
|
||||
async presentToast(infoMessage: string) {
|
||||
const toast = await this.toastController.create({
|
||||
@@ -16,4 +22,90 @@ export class ToastService {
|
||||
toast.present();
|
||||
}
|
||||
|
||||
async successMessage(message?: string) {
|
||||
|
||||
const enterAnimation = (baseEl: any) => {
|
||||
const backdropAnimation = this.animationController.create()
|
||||
.addElement(baseEl.querySelector('ion-backdrop')!)
|
||||
.fromTo('opacity', '0.01', 'var(--backdrop-opacity)');
|
||||
|
||||
const wrapperAnimation = this.animationController.create()
|
||||
.addElement(baseEl.querySelector('.modal-wrapper')!)
|
||||
.keyframes([
|
||||
{ offset: 0, opacity: '1', right: '-100%' },
|
||||
{ offset: 1, opacity: '1', right: '0px' }
|
||||
]);
|
||||
|
||||
return this.animationController.create()
|
||||
.addElement(baseEl)
|
||||
.easing('ease-out')
|
||||
.duration(500)
|
||||
.addAnimation([backdropAnimation, wrapperAnimation]);
|
||||
}
|
||||
|
||||
const leaveAnimation = (baseEl: any) => {
|
||||
return enterAnimation(baseEl).direction('reverse');
|
||||
}
|
||||
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
enterAnimation,
|
||||
leaveAnimation,
|
||||
component: SuccessMessagePage,
|
||||
componentProps: {
|
||||
message: message || 'Processo efetuado' ,
|
||||
},
|
||||
cssClass: 'notification-modal'
|
||||
});
|
||||
|
||||
modal.present()
|
||||
|
||||
setTimeout(()=>{
|
||||
modal.dismiss()
|
||||
},7000)
|
||||
|
||||
}
|
||||
|
||||
async badRequest(message?: string) {
|
||||
const enterAnimation = (baseEl: any) => {
|
||||
const backdropAnimation = this.animationController.create()
|
||||
.addElement(baseEl.querySelector('ion-backdrop')!)
|
||||
.fromTo('opacity', '0.01', 'var(--backdrop-opacity)');
|
||||
|
||||
const wrapperAnimation = this.animationController.create()
|
||||
.addElement(baseEl.querySelector('.modal-wrapper')!)
|
||||
.keyframes([
|
||||
{ offset: 0, opacity: '1', right: '-100%' },
|
||||
{ offset: 1, opacity: '1', right: '0px' }
|
||||
]);
|
||||
|
||||
return this.animationController.create()
|
||||
.addElement(baseEl)
|
||||
.easing('ease-out')
|
||||
.duration(7000)
|
||||
.addAnimation([backdropAnimation, wrapperAnimation]);
|
||||
}
|
||||
|
||||
const leaveAnimation = (baseEl: any) => {
|
||||
return enterAnimation(baseEl).direction('reverse');
|
||||
}
|
||||
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
enterAnimation,
|
||||
leaveAnimation,
|
||||
component: BadRequestPage,
|
||||
componentProps: {
|
||||
message: message || 'Processo efetuado' ,
|
||||
},
|
||||
cssClass: 'notification-modal'
|
||||
});
|
||||
|
||||
modal.present()
|
||||
|
||||
setTimeout(()=>{
|
||||
modal.dismiss()
|
||||
},3000)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -11,33 +11,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</ion-header> -->
|
||||
<ion-menu autoHide="false" side="end" content-id="main-content">
|
||||
<ion-header>
|
||||
<ion-toolbar translucent>
|
||||
<ion-title>Ações</ion-title>
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
<ion-content>
|
||||
<ion-list>
|
||||
<ion-item (click)="approveTask(loadedEvent.serialNumber)">
|
||||
<ion-icon name="checkmark-sharp"></ion-icon>
|
||||
<ion-label>Aprovar</ion-label>
|
||||
</ion-item>
|
||||
<ion-item (click)="emendTask(loadedEvent.serialNumber)">
|
||||
<ion-icon name="create-outline"></ion-icon>
|
||||
<ion-label>Adicionar Nota</ion-label>
|
||||
</ion-item>
|
||||
<ion-item (click)="rejectTask(loadedEvent.serialNumber)">
|
||||
<ion-icon name="close-sharp"></ion-icon>
|
||||
<ion-label>Rejeitar</ion-label>
|
||||
</ion-item>
|
||||
<ion-item (click)="editar(loadedEvent.serialNumber)">
|
||||
<ion-icon name="close-sharp"></ion-icon>
|
||||
<ion-label>Editar</ion-label>
|
||||
</ion-item>
|
||||
</ion-list>
|
||||
</ion-content>
|
||||
</ion-menu>
|
||||
|
||||
<ion-content id="main-content">
|
||||
<div class="main-content d-flex height-100">
|
||||
@@ -47,7 +20,7 @@
|
||||
<ion-icon src="assets/images/icons-arrow-arrow-left.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="header-title flex-grow-1 cursor-pointer">
|
||||
<label>{{loadedEvent.workflowInstanceDataFields.Subject}} 11 </label>
|
||||
<label>12{{loadedEvent.workflowInstanceDataFields.Subject}} 11 </label>
|
||||
</div>
|
||||
<div (click)="editar(loadedEvent.serialNumber)" class="header-icon-right display-none-{{showAside}}">
|
||||
<ion-icon src="assets/images/icons-edit.svg"></ion-icon>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class="title width-100">
|
||||
<div class="title-container d-flex justify-space-between">
|
||||
<span class="text-center mt-0 aside-title px-20"><label>Eventos para Aprovação</label></span>
|
||||
<button class="btn-no-color" (click)="doRefresh($event)">
|
||||
<button class="btn-no-color" (click)="doRefresh()">
|
||||
<ion-icon class="title-icon" name="reload-circle"></ion-icon>
|
||||
</button>
|
||||
</div>
|
||||
@@ -17,7 +17,7 @@
|
||||
</ion-segment>
|
||||
</ion-toolbar>
|
||||
</div>
|
||||
<ion-refresher name="refresher" slot="fixed" (ionRefresh)="doRefresh($event)">
|
||||
<ion-refresher name="refresher" slot="fixed" (ionRefresh)="doRefresh()">
|
||||
<ion-progress-bar type="indeterminate" *ngIf="showLoader"></ion-progress-bar>
|
||||
<ion-refresher-content>
|
||||
</ion-refresher-content>
|
||||
|
||||
@@ -119,11 +119,6 @@ export class EventsToApprovePage implements OnInit {
|
||||
});
|
||||
} */
|
||||
|
||||
lis(){
|
||||
console.log('Teste');
|
||||
|
||||
}
|
||||
|
||||
doRefresh() {
|
||||
console.log('Refresh Events');
|
||||
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
<div class="title">
|
||||
<div class="thetitle"><ion-label >Expediente</ion-label></div>
|
||||
<div class="theicon">
|
||||
<button class="btn-no-color" (click)="doRefresh($event)">
|
||||
<button class="btn-no-color" (click)="doRefresh()">
|
||||
<ion-icon slot="end" class="title-icon" name="reload-circle"></ion-icon>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</ion-header>
|
||||
<ion-content>
|
||||
<ion-refresher name="refresher" slot="fixed" (ionRefresh)="doRefresh($event)">
|
||||
<ion-refresher name="refresher" slot="fixed" (ionRefresh)="doRefresh()">
|
||||
<ion-refresher-content
|
||||
pullingIcon="chevron-down-circle-outline"
|
||||
pullingText="deslize para actualizar"
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
<div class="title">
|
||||
<div class="thetitle"><ion-label >Pendentes</ion-label></div>
|
||||
<div class="theicon">
|
||||
<button class="btn-no-color" (click)="doRefresh($event)">
|
||||
<button class="btn-no-color" (click)="doRefresh()">
|
||||
<ion-icon slot="end" class="title-icon" name="reload-circle"></ion-icon>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</ion-header>
|
||||
<ion-content>
|
||||
<ion-refresher name="refresher" slot="fixed" (ionRefresh)="doRefresh($event)">
|
||||
<ion-refresher name="refresher" slot="fixed" (ionRefresh)="doRefresh()">
|
||||
<ion-refresher-content
|
||||
pullingIcon="chevron-down-circle-outline"
|
||||
pullingText="deslize para actualizar"
|
||||
|
||||
@@ -4,6 +4,4 @@
|
||||
<ion-icon slot="end" class="title-icon pr-10" src="/assets/images/notification-error.svg"></ion-icon>
|
||||
{{ message }}
|
||||
</p>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user