This commit is contained in:
Peter Maquiran
2021-06-30 15:01:00 +01:00
7 changed files with 33 additions and 60 deletions
@@ -55,7 +55,6 @@ export class ApproveEventPage implements OnInit {
this.getTask();
this.getAttachments();
// console.log(this.showAside);
}
notImplemented() {
@@ -79,7 +78,7 @@ export class ApproveEventPage implements OnInit {
})
}
async approveTask(serialNumber:string){
async approveTask(serialNumber:string) {
let body = { "serialNumber": serialNumber, "action": "Aprovar" }
try {
@@ -101,8 +100,6 @@ export class ApproveEventPage implements OnInit {
}); */
}
async rejectTask(serialNumber:string) {
let body = { "serialNumber": serialNumber, "action": "Rejeitar" }
@@ -117,13 +114,13 @@ export class ApproveEventPage implements OnInit {
}
}
async getAttachments(){
async getAttachments() {
this.loadedAttachments = await this.attachmentsService.getAttachmentsById(this.InstanceId).toPromise();
}
viewDocument(sourceId){
viewDocument(sourceId) {
this.processes.GetDocumentUrl(sourceId, '8').subscribe(res=>{
/* console.log(res); */
const url: string = res.replace("webTRIX.Viewer","webTRIX.Viewer.Branch1");
@@ -143,7 +140,7 @@ export class ApproveEventPage implements OnInit {
return await popover.present();
}
async emendTask(serialNumber:string){
async emendTask(serialNumber:string) {
console.log('Desktop');
const modal = await this.modalController.create({
@@ -186,7 +183,7 @@ export class ApproveEventPage implements OnInit {
//this.goBack();
}
goToEventsToApprove(){
goToEventsToApprove() {
let navigationExtras: NavigationExtras = {
queryParams: {
"eventos": true,
@@ -196,32 +193,10 @@ export class ApproveEventPage implements OnInit {
}
/** @description edit event to aprove */
async editar(serialNumber: string) {
if(window.innerWidth > 800){
console.log('DESTOP');
this.EditApproveEventDismiss.emit();
}
else{
/* const modal = await this.modalController.create({
component: EditEventToApproveComponent,
componentProps: {
serialNumber: serialNumber,
InstanceId:this.InstanceId
},
cssClass: 'modal modal-desktop',
// backdropDismiss: false
});
await modal.present();
modal.onDidDismiss().then(res => {
this.getTask();
this.getAttachments();
}); */
}
this.EditApproveEventDismiss.emit();
}
}