mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 13:26:08 +00:00
improve
This commit is contained in:
@@ -1,20 +1,5 @@
|
||||
<!-- <ion-header hidden class="ion-no-border px-20">
|
||||
<div class="header-content d-flex justify-space-between">
|
||||
<div class="header-icon-left">
|
||||
<ion-icon (click)="close()" src="assets/images/icons-arrow-arrow-left.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="header-title flex-grow-1">
|
||||
<label>{{loadedEvent.workflowInstanceDataFields.Subject}}</label>
|
||||
</div>
|
||||
<div class="header-icon-right display-none-{{showAside}}">
|
||||
<ion-icon (click)="notImplemented()" src="assets/images/icons-edit.svg"></ion-icon>
|
||||
</div>
|
||||
</div>
|
||||
</ion-header> -->
|
||||
|
||||
<ion-content id="main-content">
|
||||
|
||||
|
||||
<div class="main-content d-flex flex-column height-100" *ngIf="loadedEvent">
|
||||
|
||||
<div class="pl-20 pr-20 text-center d-flex justify-center align-center" style="width:100%; height: 30px; background-color: var(--Event-approve-header-color); border-top-right-radius: 25px;">
|
||||
@@ -121,30 +106,29 @@
|
||||
</ion-item>
|
||||
</ion-list>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div *ngIf="showAside" class="aside-right flex-column height-100 cursor-pointer">
|
||||
<div class="aside-buttons">
|
||||
<button hidden full class="btn-ok" shape="round" >Editar evento</button>
|
||||
<button (click)="approveTask(loadedEvent.serialNumber)" full class="btn-ok" shape="round" >Aprovar</button>
|
||||
<button (click)="emendTask(loadedEvent.serialNumber)" class="btn-cancel" shape="round" >Rever</button>
|
||||
<button full class="btn-ok" shape="round" >Editar evento</button>
|
||||
<button (click)="approveTask(loadedEvent.serialNumber)" full class="btn-ok" shape="round" >Aprovar</button>
|
||||
<button (click)="emendTask(loadedEvent.serialNumber)" class="btn-cancel" shape="round" >Rever</button>
|
||||
<div class="solid"></div>
|
||||
<button full class="btn-cancel" shape="round" (click)="editar(loadedEvent.serialNumber)" >Editar</button>
|
||||
<button (click)="rejectTask(loadedEvent.serialNumber)" full class="btn-delete" shape="round" >Rejeitar</button>
|
||||
<button full class="btn-cancel" shape="round" (click)="editar(loadedEvent.serialNumber)" >Editar</button>
|
||||
<button (click)="rejectTask(loadedEvent.serialNumber)" full class="btn-delete" shape="round" >Rejeitar</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</ion-content>
|
||||
|
||||
<ion-footer class="display-none-{{showAside}} ion-no-border">
|
||||
<div class="buttons">
|
||||
<button class="btn-cancel" shape="round" (click)="emendTask(loadedEvent.serialNumber)">Rever</button>
|
||||
<button class="btn-ok" shape="round" (click)="approveTask(loadedEvent.serialNumber)">Aprovar</button>
|
||||
<button *ngIf="loadedEvent.activityInstanceName != 'Editar Evento'" class="btn-cancel" shape="round" (click)="emendTask(loadedEvent.serialNumber)">Rever</button>
|
||||
<button *ngIf="loadedEvent.activityInstanceName != 'Editar Evento'" class="btn-ok" shape="round" (click)="approveTask(loadedEvent.serialNumber)">Aprovar</button>
|
||||
<button *ngIf="loadedEvent.activityInstanceName == 'Editar Evento'" full class="btn-cancel" shape="round" (click)="editar(loadedEvent.serialNumber)" >Editar</button>
|
||||
<button *ngIf="loadedEvent.activityInstanceName == 'Editar Evento'" full class="btn-delete" shape="round" (click)="rejectTask(loadedEvent.serialNumber)" >Rejeitar</button>
|
||||
</div>
|
||||
</ion-footer>
|
||||
|
||||
@@ -40,9 +40,9 @@ export class ApproveEventPage implements OnInit {
|
||||
@Output() EditApproveEventDismiss = new EventEmitter<any>();
|
||||
|
||||
constructor(
|
||||
private router:Router,
|
||||
private router: Router,
|
||||
private modalController: ModalController,
|
||||
private processes:ProcessesService,
|
||||
private processes: ProcessesService,
|
||||
private attachmentsService: AttachmentsService,
|
||||
private popoverController: PopoverController,
|
||||
private toastService: ToastService,
|
||||
@@ -61,24 +61,8 @@ export class ApproveEventPage implements OnInit {
|
||||
this.getAttachments();
|
||||
}
|
||||
|
||||
/* ngOnChanges() {
|
||||
this.getTask();
|
||||
this.getAttachments();
|
||||
|
||||
setTimeout(()=>{
|
||||
this.getTask();
|
||||
this.getAttachments();
|
||||
}, 6000)
|
||||
|
||||
setTimeout(()=>{
|
||||
this.getTask();
|
||||
this.getAttachments();
|
||||
}, 10000)
|
||||
|
||||
} */
|
||||
|
||||
close() {
|
||||
/* this.router.navigate(['/home/gabinete-digital/event-list']); */
|
||||
this.closeEventToApprove.emit();
|
||||
this.modalController.dismiss();
|
||||
}
|
||||
@@ -105,20 +89,11 @@ export class ApproveEventPage implements OnInit {
|
||||
this.toastService.successMessage()
|
||||
} catch (error) {
|
||||
this.toastService.badRequest()
|
||||
} finally {
|
||||
} finally {
|
||||
this.close()
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
/* this.approveEventDismiss.emit({
|
||||
"serialNumber": serialNumber,
|
||||
"action": "Aprovar",
|
||||
"saveData": {
|
||||
loadedEvent: this.loadedEvent,
|
||||
today: this.today,
|
||||
customDate: this.customDate
|
||||
}
|
||||
}); */
|
||||
}
|
||||
|
||||
async rejectTask(serialNumber:string) {
|
||||
@@ -171,6 +146,9 @@ export class ApproveEventPage implements OnInit {
|
||||
async openOptions(ev:any) {
|
||||
const popover = await this.popoverController.create({
|
||||
component: EventActionsPopoverPage,
|
||||
componentProps: {
|
||||
activityInstanceName: this.loadedEvent.activityInstanceName
|
||||
},
|
||||
cssClass: 'event-actions-popover',
|
||||
event: ev,
|
||||
translucent: true
|
||||
@@ -180,7 +158,6 @@ export class ApproveEventPage implements OnInit {
|
||||
|
||||
async emendTask(serialNumber:string) {
|
||||
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: EmendMessageModalPage,
|
||||
componentProps:{
|
||||
@@ -195,7 +172,7 @@ export class ApproveEventPage implements OnInit {
|
||||
.then( async (res) => {
|
||||
|
||||
|
||||
if(res.data !== ''){
|
||||
if(res.data !== '') {
|
||||
let body = { "serialNumber": serialNumber,
|
||||
"action": "Emendar",
|
||||
"dataFields": {
|
||||
@@ -203,7 +180,7 @@ export class ApproveEventPage implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
const loader = this.toastService.loading();
|
||||
|
||||
try {
|
||||
await this.processes.PostTaskAction(body).toPromise();
|
||||
@@ -216,12 +193,10 @@ export class ApproveEventPage implements OnInit {
|
||||
}
|
||||
}
|
||||
else{
|
||||
//this.alertService.presentAlert('Operação cancelada!');
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
//this.openEmendMessageModal(serialNumber);
|
||||
//this.goBack();
|
||||
}
|
||||
|
||||
goToEventsToApprove() {
|
||||
|
||||
Reference in New Issue
Block a user