mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
save
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -39,7 +39,7 @@ export class ToastService {
|
||||
return this.animationController.create()
|
||||
.addElement(baseEl)
|
||||
.easing('ease-out')
|
||||
.duration(7000)
|
||||
.duration(500)
|
||||
.addAnimation([backdropAnimation, wrapperAnimation]);
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ export class ToastService {
|
||||
|
||||
setTimeout(()=>{
|
||||
modal.dismiss()
|
||||
},3000)
|
||||
},7000)
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user