mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 05:16:07 +00:00
Edit task detail page and add integration methods
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
<ion-item>
|
||||
<ion-label>
|
||||
<h3>Detalhes</h3>
|
||||
<p>MINEC, MINFIN</p>
|
||||
<p>{{loadedEvent.workflowInstanceDataFields.Body}}</p>
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
<ion-item lines="none">
|
||||
@@ -45,8 +45,16 @@
|
||||
</ion-content>
|
||||
<ion-footer>
|
||||
<ion-toolbar>
|
||||
<ion-button class="button-edit-event" shape="round" (click)="editEvent()">Emendar</ion-button>
|
||||
<ion-button class="button-options" shape="round" (click)="openOptions()"><ion-icon name="ellipsis-vertical-outline"></ion-icon></ion-button>
|
||||
<ion-button shape="round" (click)="approveEvent()">Aprovar</ion-button>
|
||||
<ion-item lines="none">
|
||||
<p>
|
||||
<ion-button class="button-edit-event" shape="round" (click)="emendarTask(loadedEvent.serialNumber)">Emendar</ion-button>
|
||||
</p>
|
||||
<p>
|
||||
<ion-button class="button-options" shape="round" fill="clear" (click)="openOptions(loadedEvent)"><ion-icon slot="icon-only" name="ellipsis-vertical-outline"></ion-icon></ion-button>
|
||||
</p>
|
||||
<p>
|
||||
<ion-button class="button-approve" shape="round" (click)="approveTask(loadedEvent.serialNumber)">Aprovar</ion-button>
|
||||
</p>
|
||||
</ion-item>
|
||||
</ion-toolbar>
|
||||
</ion-footer>
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
ion-toolbar{
|
||||
padding: 10px;
|
||||
}
|
||||
.location-detail{
|
||||
font-size: 18px;
|
||||
}
|
||||
@@ -5,22 +8,22 @@
|
||||
width: 91px;
|
||||
height: 25px;
|
||||
--border-radius: 12.5px;
|
||||
--background-color: #ffb703;
|
||||
--background: #ffb703;
|
||||
}
|
||||
.button-edit-event {
|
||||
width: 170px;
|
||||
width: 140px;
|
||||
height: 44px;
|
||||
border-radius: 22.5px;
|
||||
background-color: #e0e9ee;
|
||||
--background: #e0e9ee;
|
||||
--color:#061b52;
|
||||
}
|
||||
.button-options {
|
||||
width: 36px;
|
||||
height: 35px;
|
||||
object-fit: contain;
|
||||
height: 44px;
|
||||
--color: #42b9fe;
|
||||
}
|
||||
.button-approve {
|
||||
width: 170px;
|
||||
width: 140px;
|
||||
height: 44px;
|
||||
border-radius: 22.5px;
|
||||
background-color: #42b9fe;
|
||||
--background: #42b9fe;
|
||||
}
|
||||
@@ -1,8 +1,9 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
import { ModalController, NavParams } from '@ionic/angular';
|
||||
import { MenuController, ModalController, NavParams, PopoverController } from '@ionic/angular';
|
||||
import { Event } from 'src/app/models/event.model';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { EventActionsPopoverPage } from '../event-actions-popover/event-actions-popover.page';
|
||||
|
||||
@Component({
|
||||
selector: 'app-approve-event-modal',
|
||||
@@ -19,6 +20,7 @@ export class ApproveEventModalPage implements OnInit {
|
||||
private modalController: ModalController,
|
||||
private navParams: NavParams,
|
||||
private processes:ProcessesService,
|
||||
private popoverController: PopoverController,
|
||||
)
|
||||
{
|
||||
this.serialNumber = this.navParams.get('serialNumber');
|
||||
@@ -64,12 +66,32 @@ export class ApproveEventModalPage implements OnInit {
|
||||
editEvent(){
|
||||
|
||||
}
|
||||
openOptions(){
|
||||
|
||||
approveTask(serialNumber:string){
|
||||
let body = { "serialNumber": serialNumber, "action": "Aprovar" }
|
||||
console.log(body);
|
||||
this.processes.PostTaskAction(body);
|
||||
this.router.navigate(['/home/gabinete-digital/event-list']);
|
||||
this.modalController.dismiss(null);
|
||||
}
|
||||
approveEvent(){
|
||||
|
||||
emendarTask(serialNumber:string){
|
||||
|
||||
let body = { "serialNumber": serialNumber, "action": "Rejeitar" }
|
||||
console.log(body);
|
||||
this.processes.PostTaskAction(body);
|
||||
this.router.navigate(['/home/gabinete-digital/event-list']);
|
||||
this.modalController.dismiss(null);
|
||||
}
|
||||
|
||||
async openOptions(ev:any) {
|
||||
const popover = await this.popoverController.create({
|
||||
component: EventActionsPopoverPage,
|
||||
cssClass: 'event-actions-popover',
|
||||
event: ev,
|
||||
translucent: true
|
||||
});
|
||||
return await popover.present();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user