mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
save
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]);
|
||||
}
|
||||
|
||||
|
||||
@@ -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(){
|
||||
|
||||
@@ -41,7 +41,8 @@ ion-item{
|
||||
--background: transparent;
|
||||
}
|
||||
.form{
|
||||
width: 400px;
|
||||
width: 300px;
|
||||
margin: auto;
|
||||
overflow: auto;
|
||||
}
|
||||
.form-label{
|
||||
@@ -159,4 +160,10 @@ ion-item{
|
||||
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(7000)
|
||||
.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()
|
||||
},3000)
|
||||
|
||||
}
|
||||
|
||||
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)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -119,11 +119,6 @@ export class EventsToApprovePage implements OnInit {
|
||||
});
|
||||
} */
|
||||
|
||||
lis(){
|
||||
console.log('Teste');
|
||||
|
||||
}
|
||||
|
||||
doRefresh() {
|
||||
console.log('Refresh Events');
|
||||
|
||||
|
||||
@@ -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