mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 13:02:56 +00:00
improve
This commit is contained in:
@@ -447,6 +447,7 @@
|
||||
(clearContact)="clearContact()"
|
||||
(openAttendeesComponent)="openAttendeesComponent($event)"
|
||||
(closeComponent)="approveEventDismissGoBack()"
|
||||
(approveEventDismiss) = "approveEventDismiss($event)"
|
||||
(setIntervenient)="setIntervenient($event)"
|
||||
(setIntervenientCC)="setIntervenientCC($event)"
|
||||
|
||||
|
||||
@@ -5,11 +5,12 @@
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" class="arrow-right-icon" src='assets/images/theme/gov/icons-calendar-arrow-right.svg'></ion-icon>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="buttons">
|
||||
<button class="btn-cancel" shape="round" (click)="emendarTask()">Rever</button>
|
||||
<button class="btn-cancel" shape="round" (click)="approveTask()">Aprovar</button>
|
||||
<button *ngIf="activityInstanceName == 'Aprovar Evento'" class="btn-cancel" shape="round" (click)="emendarTask()">Rever</button>
|
||||
<button *ngIf="activityInstanceName == 'Aprovar Evento'" class="btn-cancel" shape="round" (click)="approveTask()">Aprovar</button>
|
||||
<div class="solid"></div>
|
||||
<button class="btn-cancel" shape="round" (click)="editTask()">Editar</button>
|
||||
<button class="btn-delete" shape="round" (click)="rejeitar()">Rejeitar</button>
|
||||
<button *ngIf="activityInstanceName != 'Aprovar Evento'" class="btn-cancel" shape="round" (click)="editTask()">Editar</button>
|
||||
<button *ngIf="activityInstanceName != 'Aprovar Evento'" class="btn-delete" shape="round" (click)="rejeitar()">Rejeitar</button>
|
||||
</div>
|
||||
</ion-content>
|
||||
|
||||
@@ -16,6 +16,7 @@ import { RouteService } from 'src/app/services/route.service';
|
||||
export class EventActionsPopoverPage implements OnInit {
|
||||
serialNumber:string;
|
||||
instanceId: string;
|
||||
activityInstanceName: string
|
||||
|
||||
constructor(
|
||||
private navParams: NavParams,
|
||||
@@ -27,7 +28,8 @@ export class EventActionsPopoverPage implements OnInit {
|
||||
public ThemeService: ThemeService) {
|
||||
this.serialNumber = this.navParams.get('serialNumber');
|
||||
this.instanceId = this.navParams.get('InstanceId');
|
||||
}
|
||||
this.activityInstanceName = this.navParams.get('InstanceId');
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
window.onresize = (event) => {
|
||||
@@ -67,6 +69,26 @@ export class EventActionsPopoverPage implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
async ReenviarTask() {
|
||||
let body = { "serialNumber": this.serialNumber, "action": "Reenviar" }
|
||||
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
try {
|
||||
await this.processes.PostTaskAction(body).toPromise()
|
||||
|
||||
this.toastService.successMessage();
|
||||
this.goBack();
|
||||
} catch (error) {
|
||||
|
||||
this.toastService.badRequest()
|
||||
}
|
||||
finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
async emendarTask() {
|
||||
this.closePopover();
|
||||
|
||||
@@ -107,25 +129,24 @@ export class EventActionsPopoverPage implements OnInit {
|
||||
}
|
||||
}
|
||||
else{
|
||||
//this.alertService.presentAlert('Operação cancelada!');
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
async rejeitar(){
|
||||
async rejeitar() {
|
||||
let body = { "serialNumber": this.serialNumber, "action": "Rejeitar" }
|
||||
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
const loader = this.toastService.loading();
|
||||
try {
|
||||
await this.processes.PostTaskAction(body).toPromise();
|
||||
await this.toastService.successMessage('Processo rejeitado');
|
||||
this.goBack();
|
||||
} catch (error) {
|
||||
this.toastService.badRequest()
|
||||
this.toastService.badRequest();
|
||||
}
|
||||
finally {
|
||||
loader.remove()
|
||||
loader.remove();
|
||||
}
|
||||
|
||||
|
||||
@@ -148,6 +169,6 @@ export class EventActionsPopoverPage implements OnInit {
|
||||
modal.onDidDismiss().then(res => {
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -98,7 +98,6 @@ export class NewEventPage implements OnInit {
|
||||
this.postEvent.EventRecurrence = {Type:'-1'};
|
||||
this.eventBody = { BodyType : "1", Text : ""};
|
||||
this.postEvent.Body = this.eventBody;
|
||||
/* this.profile = this.navParams.get('profile'); */
|
||||
|
||||
this.selectedSegment = this.navParams.get('segment');
|
||||
this.selectedDate = this.navParams.get('eventSelectedDate');
|
||||
|
||||
Reference in New Issue
Block a user