mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 13:02:56 +00:00
Fix
This commit is contained in:
@@ -4,12 +4,9 @@ import { AttachmentsService } from 'src/app/services/attachments.service';
|
||||
import { EventsService } from 'src/app/services/events.service';
|
||||
import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
|
||||
import { ActivatedRoute, NavigationExtras, Router } from '@angular/router';
|
||||
import { formatDate } from '@angular/common';
|
||||
import { Event } from '../../../../models/event.model';
|
||||
import { AnimationController, MenuController, ModalController, PopoverController } from '@ionic/angular';
|
||||
import { AlertService } from 'src/app/services/alert.service';
|
||||
import { ViewEventPage } from 'src/app/pages/agenda/view-event/view-event.page';
|
||||
import { momentG } from 'src/plugin/momentG'
|
||||
import { DiscartExpedientModalPage } from '../../discart-expedient-modal/discart-expedient-modal.page';
|
||||
import { BookMeetingModalPage } from '../../expediente/book-meeting-modal/book-meeting-modal.page';
|
||||
import { CreateProcessPage } from 'src/app/modals/create-process/create-process.page';
|
||||
@@ -23,6 +20,7 @@ import { ToastService } from 'src/app/services/toast.service';
|
||||
import { ForwardPage } from 'src/app/modals/forward/forward.page';
|
||||
import { PermissionService } from 'src/app/OtherService/permission.service';
|
||||
import { Location } from '@angular/common';
|
||||
import { PedidoService } from 'src/app/Rules/pedido.service';
|
||||
|
||||
|
||||
@Component({
|
||||
@@ -50,8 +48,6 @@ export class PedidoPage implements OnInit {
|
||||
constructor(private activatedRoute: ActivatedRoute,
|
||||
private processes: ProcessesService,
|
||||
private iab: InAppBrowser,
|
||||
private attachmentsService: AttachmentsService,
|
||||
private events: EventsService,
|
||||
private menu: MenuController,
|
||||
private router: Router,
|
||||
private modalController: ModalController,
|
||||
@@ -61,7 +57,8 @@ export class PedidoPage implements OnInit {
|
||||
private animationController: AnimationController,
|
||||
private toastService: ToastService,
|
||||
public p: PermissionService,
|
||||
private location: Location
|
||||
private location: Location,
|
||||
private pedidoService: PedidoService
|
||||
) {
|
||||
this.loggeduser = authService.ValidatedUser;
|
||||
|
||||
@@ -218,6 +215,8 @@ export class PedidoPage implements OnInit {
|
||||
this.goBack()
|
||||
}
|
||||
|
||||
alert(JSON.stringify(res)+' nada')
|
||||
|
||||
}))
|
||||
}
|
||||
|
||||
@@ -247,25 +246,20 @@ export class PedidoPage implements OnInit {
|
||||
}
|
||||
|
||||
async arquivar(note:string, documents:any) {
|
||||
let body = {
|
||||
"serialNumber": this.serialnumber,
|
||||
"action": "Arquivo",
|
||||
"ActionTypeId": 95,
|
||||
"dataFields": {
|
||||
"ReviewUserComment": note,
|
||||
},
|
||||
"AttachmentList" :documents,
|
||||
}
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise()
|
||||
await this.pedidoService.arquivar({serialNumber: this.serialnumber,
|
||||
documents,
|
||||
note
|
||||
}).toPromise()
|
||||
|
||||
this.toastService.successMessage('Processo arquivado')
|
||||
this.close();
|
||||
} catch (error) {
|
||||
this.toastService.badRequest()
|
||||
} finally {
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
@@ -348,22 +342,22 @@ export class PedidoPage implements OnInit {
|
||||
modal.onDidDismiss();
|
||||
}
|
||||
|
||||
async viewEventDetail(eventId: any) {
|
||||
// async viewEventDetail(eventId: any) {
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: ViewEventPage,
|
||||
componentProps: {
|
||||
eventId: eventId,
|
||||
},
|
||||
cssClass: 'modal modal-desktop',
|
||||
backdropDismiss: false
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then((res) => {
|
||||
if (res) {
|
||||
}
|
||||
});
|
||||
}
|
||||
// const modal = await this.modalController.create({
|
||||
// component: ViewEventPage,
|
||||
// componentProps: {
|
||||
// eventId: eventId,
|
||||
// },
|
||||
// cssClass: 'modal modal-desktop',
|
||||
// backdropDismiss: false
|
||||
// });
|
||||
// await modal.present();
|
||||
// modal.onDidDismiss().then((res) => {
|
||||
// if (res) {
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
|
||||
async distartExpedientModal(){
|
||||
console.log(this.fulltask);
|
||||
@@ -491,11 +485,11 @@ export class PedidoPage implements OnInit {
|
||||
await this.repreciar(res.data.note, docs);
|
||||
this.goBack();
|
||||
}
|
||||
else if(actionName == 'Arquivar'){
|
||||
else if(actionName == 'Arquivar') {
|
||||
await this.arquivar(res.data.note, docs);
|
||||
this.goBack();
|
||||
}
|
||||
else if(actionName == 'Assignar'){
|
||||
else if(actionName == 'Assignar') {
|
||||
await this.assignar(res.data.note, docs);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user