mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
Merge branch 'developer' of https://bitbucket.org/equilibriumito/gabinete-digital into developer
This commit is contained in:
@@ -56,6 +56,19 @@ export class PedidoService {
|
||||
return this.processes.CompleteTask(body)
|
||||
}
|
||||
|
||||
arquivar({note = "", serialNumber, documents= [] }) {
|
||||
let body = {
|
||||
"serialNumber": serialNumber,
|
||||
"action": "Arquivo",
|
||||
"ActionTypeId": 95,
|
||||
"dataFields": {
|
||||
"ReviewUserComment": note,
|
||||
},
|
||||
"AttachmentList" :documents,
|
||||
}
|
||||
|
||||
return this.processes.CompleteTask(body)
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
margin: 0 auto !important;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
@media only screen and (min-width: 1024px) {
|
||||
@media only screen and (min-width: 701px) {
|
||||
.arrow-right{
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
|
||||
@@ -46,7 +46,7 @@ export class ChatOptionsFeaturesPage implements OnInit {
|
||||
}
|
||||
|
||||
close(){
|
||||
if( window.innerWidth <= 1024){
|
||||
if( window.innerWidth < 701){
|
||||
this.popoverController.dismiss();
|
||||
}
|
||||
else{
|
||||
|
||||
@@ -76,7 +76,7 @@ export class DelegarPage implements OnInit {
|
||||
}
|
||||
|
||||
close() {
|
||||
this.modalController.dismiss(null);
|
||||
this.modalController.dismiss('close');
|
||||
}
|
||||
|
||||
cancelTask() {
|
||||
@@ -100,13 +100,20 @@ export class DelegarPage implements OnInit {
|
||||
"DelegatedUserEmail": this.taskParticipants[0].EmailAddress,
|
||||
}
|
||||
console.log(body);
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
this.processes.DelegateTask(body).subscribe(res=>{
|
||||
|
||||
console.log(res);
|
||||
this.toastService.successMessage('Processo delegado')
|
||||
this.close();
|
||||
},
|
||||
(error)=>{
|
||||
this.toastService.badRequest("Processo não delegado")
|
||||
},
|
||||
()=>{
|
||||
loader.remove()
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
interface BookMeetingModalPagecomponentProps {
|
||||
task: any
|
||||
}
|
||||
interface BookMeetingModalPageReturn {}
|
||||
@@ -11,7 +11,7 @@
|
||||
<ion-label class="title">{{users.name}}</ion-label>
|
||||
<span><ion-icon class="{{users.status}}" name="ellipse"></ion-icon></span>
|
||||
</div>
|
||||
<div class="right">
|
||||
<div hidden class="right">
|
||||
<button class="btn-no-color" (click)="openMessagesOptions()">
|
||||
<ion-icon src="assets/images/icons-menu.svg"></ion-icon>
|
||||
</button>
|
||||
|
||||
@@ -12,7 +12,6 @@ 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 { ExpedientTaskModalPage } from '../../expediente/expedient-task-modal/expedient-task-modal.page';
|
||||
import { BookMeetingModalPage } from '../../expediente/book-meeting-modal/book-meeting-modal.page';
|
||||
import { CreateProcessPage } from 'src/app/modals/create-process/create-process.page';
|
||||
import { DelegarPage } from 'src/app/modals/delegar/delegar.page';
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<ion-content>
|
||||
<div class="main-content d-flex height-100">
|
||||
|
||||
<app-task-details class="content"
|
||||
<app-task-details class="content d-flex flex-column"
|
||||
[task]="task"
|
||||
[intervenientes]="intervenientes"
|
||||
[cc]="cc"
|
||||
@@ -14,9 +14,7 @@
|
||||
(openOptions)="openOptions($event)"
|
||||
(goBack)="goBack()"
|
||||
(viewDocument)="viewDocument($event)"
|
||||
>
|
||||
|
||||
</app-task-details>
|
||||
></app-task-details>
|
||||
|
||||
<div *ngIf="task" class="aside-right flex-column height-100">
|
||||
<div class="buttons" *ngIf="task.activityInstanceName == 'Tarefa de Despacho'">
|
||||
@@ -50,6 +48,7 @@
|
||||
<button (click)="openAddNoteModal('Reexecução')" class="btn-cancel" shape="round" >Enviar para Reexecução</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</ion-content>
|
||||
|
||||
|
||||
@@ -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);
|
||||
@@ -412,10 +406,9 @@ export class PedidoPage implements OnInit {
|
||||
}
|
||||
|
||||
async openForwardModal(task: any) {
|
||||
console.log(task);
|
||||
|
||||
let classs;
|
||||
if( window.innerWidth <= 800){
|
||||
if( window.innerWidth <= 800) {
|
||||
classs = 'book-meeting-modal modal modal-desktop'
|
||||
} else {
|
||||
classs = 'modal modal-desktop showAsideOptions'
|
||||
@@ -492,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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
|
||||
import { ModalService } from './modal.service';
|
||||
|
||||
describe('ModalService', () => {
|
||||
let service: ModalService;
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({});
|
||||
service = TestBed.inject(ModalService);
|
||||
});
|
||||
|
||||
it('should be created', () => {
|
||||
expect(service).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,31 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { BookMeetingModalPage } from 'src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page';
|
||||
import { AnimationController, ModalController, NavParams, PopoverController } from '@ionic/angular';
|
||||
import { ExpedientTaskModalPage } from 'src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class ModalService {
|
||||
|
||||
constructor(
|
||||
private modalController: ModalController,
|
||||
) { }
|
||||
|
||||
|
||||
BookMeetingModalPage(e:BookMeetingModalPagecomponentProps, { classs, backdropDismiss = false }) {
|
||||
return this.modalController.create({
|
||||
component: BookMeetingModalPage,
|
||||
componentProps: {
|
||||
task: e.task,
|
||||
},
|
||||
cssClass: classs,
|
||||
backdropDismiss
|
||||
});
|
||||
}
|
||||
|
||||
ExpedientTaskModalPage(task, { classs, backdropDismiss = false }) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -27,8 +27,8 @@ const { Storage } = Plugins; */
|
||||
await this.storage.remove(key);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
|
||||
/*
|
||||
// Get the value
|
||||
async get(storageKey: string) {
|
||||
const ret = await Storage.get({ key: storageKey });
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<ion-label class="title">{{users.name}}</ion-label>
|
||||
<span><ion-icon class="{{users.status}}" name="ellipse"></ion-icon></span>
|
||||
</div>
|
||||
<div class="right">
|
||||
<div hidden class="right">
|
||||
<button class="btn-no-color" (click)="_openMessagesOptions()">
|
||||
<ion-icon src="assets/images/icons-menu.svg"></ion-icon>
|
||||
</button>
|
||||
|
||||
@@ -3,7 +3,7 @@ import { EventBody } from 'src/app/models/eventbody.model';
|
||||
import { EventPerson } from 'src/app/models/eventperson.model';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { ModalController } from '@ionic/angular';
|
||||
import { NavigationEnd, NavigationExtras, NavigationStart, Router } from '@angular/router';
|
||||
import { NavigationStart, Router } from '@angular/router';
|
||||
import { User } from 'src/app/models/user.model';
|
||||
import { AuthService } from 'src/app/services/auth.service';
|
||||
import { EventoAprovacaoStore } from 'src/app/store/eventoaprovacao-store.service';
|
||||
@@ -34,7 +34,7 @@ export class EventsToApprovePage implements OnInit {
|
||||
)
|
||||
{
|
||||
this.loggeduser = userAuth.ValidatedUser;
|
||||
}
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.segment = this.loggeduser.Profile;
|
||||
|
||||
@@ -46,7 +46,7 @@ export class ChatOptionsPopoverPage implements OnInit {
|
||||
}
|
||||
|
||||
close(){
|
||||
if( window.innerWidth <= 1024){
|
||||
if( window.innerWidth < 701){
|
||||
this.popoverController.dismiss();
|
||||
}
|
||||
else{
|
||||
|
||||
@@ -6,9 +6,8 @@
|
||||
</div>
|
||||
<div class="buttons">
|
||||
<button (click)="leaveGroup()" class="btn-cancel" shape="round" >Sair do Grupo</button>
|
||||
<button (click)="openChangeGroupName()" class="btn-ok" shape="round" >Alterar nome do grupo</button>
|
||||
<button (click)="openChangeGroupName()" class="btn-cancel" shape="round" >Alterar nome do grupo</button>
|
||||
<div class="solid"></div>
|
||||
<button (click)="bookMeeting()" class="btn-cancel" shape="round">Marcar Reunião</button>
|
||||
<button (click)="close()" full class="btn-cancel mobile-only" shape="round" >Cancelar</button>
|
||||
<button (click)="deleteGroup()" class="btn-delete" shape="round">Apagar grupo</button>
|
||||
</div>
|
||||
|
||||
@@ -25,7 +25,8 @@
|
||||
border-top: 1px solid #bbb;
|
||||
margin: 10px auto !important;
|
||||
}
|
||||
@media only screen and (min-width: 1024px) {
|
||||
|
||||
@media only screen and (min-width: 701px) {
|
||||
.arrow-right{
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
@@ -35,6 +36,10 @@
|
||||
width: 100% !important;
|
||||
margin-bottom: 10px !important;
|
||||
}
|
||||
.btn-cancel:hover, .btn-delete:hover{
|
||||
background-color: #42b9fe;
|
||||
color: #fff !important;
|
||||
}
|
||||
.btn-ok{
|
||||
width: 100% !important;
|
||||
}
|
||||
@@ -48,4 +53,5 @@
|
||||
.mobile-only{
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ export class ChatPopoverPage implements OnInit {
|
||||
}
|
||||
|
||||
close(){
|
||||
if( window.innerWidth <= 1024){
|
||||
if( window.innerWidth <= 701){
|
||||
this.popoverController.dismiss('cancel');
|
||||
this.modalController.dismiss('cancel');
|
||||
}
|
||||
@@ -86,8 +86,4 @@ export class ChatPopoverPage implements OnInit {
|
||||
this.modalController.dismiss('edit');
|
||||
}
|
||||
|
||||
bookMeeting(){
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
<div class="width-100">
|
||||
<div *ngIf="task && !p.userRole(['PR'])" class="d-flex width-100">
|
||||
<div class="flex-grow-1">
|
||||
<div class="flex-grow-1 width-50 pr-10">
|
||||
<button class="btn-cancel desk" shape="round"> Responder ao PR </button>
|
||||
<button (click)="openAddNoteModal('Executado')" class="btn-cancel" shape="round" >Executado</button>
|
||||
<button class="btn-cancel desk" shape="round"> Reencaminhar para Área jurídica </button>
|
||||
@@ -15,7 +15,7 @@
|
||||
<button class="btn-cancel desk" shape="round"> Outras opções </button>
|
||||
<button (click)="openExpedientActionsModal('0',fulltask)" class="btn-ok" shape="round" >Efetuar Despacho</button>
|
||||
</div>
|
||||
<div class="flex-grow-1">
|
||||
<div class="flex-grow-1 width-50 pl-10">
|
||||
<button (click)="openExpedientActionsModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button>
|
||||
<button (click)="openExpedientActionsModal('2',fulltask)" class="btn-cancel" shape="round" >Pedido de Deferimento</button>
|
||||
<button (click)="openDelegarModal(task)" class="btn-cancel" shape="round" >Delegar</button>
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
border-top: 1px solid #bbb;
|
||||
margin: 0 auto !important;
|
||||
}
|
||||
@media only screen and (min-width: 1024px) {
|
||||
@media only screen and (min-width: 701px) {
|
||||
.arrow-right{
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
@@ -43,4 +43,4 @@
|
||||
/* .solid{
|
||||
display: block;
|
||||
} */
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,8 +16,8 @@ export class MessagesOptionsPage implements OnInit {
|
||||
private modalController: ModalController,
|
||||
private chatService: ChatService,
|
||||
private navParams: NavParams,
|
||||
)
|
||||
{
|
||||
)
|
||||
{
|
||||
this.roomId = this.navParams.get('roomId');
|
||||
}
|
||||
|
||||
@@ -25,11 +25,13 @@ export class MessagesOptionsPage implements OnInit {
|
||||
}
|
||||
|
||||
close(){
|
||||
if( window.innerWidth <= 1024){
|
||||
if( window.innerWidth <= 701){
|
||||
this.modalController.dismiss();
|
||||
this.popoverController.dismiss();
|
||||
}
|
||||
else{
|
||||
this.modalController.dismiss();
|
||||
this.popoverController.dismiss();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -349,7 +349,7 @@ export class OptsExpedientePage implements OnInit {
|
||||
});
|
||||
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then( async (res)=>{
|
||||
modal.onDidDismiss().then( async (res) => {
|
||||
console.log(res['data']);
|
||||
|
||||
if(body == 'descartar') {
|
||||
@@ -413,6 +413,5 @@ export class OptsExpedientePage implements OnInit {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -6,10 +6,11 @@ import { CreateProcessPage } from 'src/app/modals/create-process/create-process.
|
||||
import { DarParecerPage } from 'src/app/modals/dar-parecer/dar-parecer.page';
|
||||
import { DelegarPage } from 'src/app/modals/delegar/delegar.page';
|
||||
import { PermissionService } from 'src/app/OtherService/permission.service';
|
||||
import { DiscartExpedientModalPage } from 'src/app/pages/gabinete-digital/discart-expedient-modal/discart-expedient-modal.page';
|
||||
import { BookMeetingModalPage } from 'src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
import { PedidoService } from 'src/app/Rules/pedido.service';
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'app-request-options',
|
||||
@@ -21,7 +22,7 @@ export class RequestOptionsPage implements OnInit {
|
||||
task:any;
|
||||
fulltask: any;
|
||||
profile:string;
|
||||
serialnumber : string
|
||||
serialNumber : string
|
||||
showEnviarPendentes = false
|
||||
|
||||
constructor(
|
||||
@@ -34,19 +35,24 @@ export class RequestOptionsPage implements OnInit {
|
||||
private toastService: ToastService,
|
||||
private router: Router,
|
||||
public p: PermissionService,
|
||||
) {
|
||||
private pedidoService: PedidoService
|
||||
) {
|
||||
this.task = this.navParams.get('task');
|
||||
this.fulltask = this.navParams.get('fulltask');
|
||||
this.serialnumber = this.navParams.get('serialNumber');
|
||||
this.serialNumber = this.navParams.get('serialNumber');
|
||||
|
||||
this.activatedRoute.queryParams.subscribe(params => {
|
||||
if(params["serialNumber"]) {
|
||||
this.serialnumber = params["serialNumber"];
|
||||
this.serialNumber = params["serialNumber"];
|
||||
// console.log(params["serialNumber"]);
|
||||
}
|
||||
});
|
||||
|
||||
console.log('serialnumber', this.serialnumber)
|
||||
if(this.task.serialNumber) {
|
||||
this.serialNumber = this.task.serialNumber
|
||||
} else if (this.task.SerialNumber) {
|
||||
this.serialNumber = this.task.SerialNumber
|
||||
}
|
||||
|
||||
this.showEnviarPendentes = this.navParams.get('showEnviarPendentes');
|
||||
|
||||
@@ -66,12 +72,13 @@ export class RequestOptionsPage implements OnInit {
|
||||
}
|
||||
|
||||
close() {
|
||||
if( window.innerWidth < 801){
|
||||
this.popoverController.dismiss('close');
|
||||
if( window.innerWidth < 801) {
|
||||
this.modalController.dismiss('close');
|
||||
} else {
|
||||
this.modalController.dismiss('close');
|
||||
}
|
||||
this.router.navigate(['/home/gabinete-digital/pedidos']);
|
||||
|
||||
// this.router.navigate(['/home/gabinete-digital/pedidos']);
|
||||
}
|
||||
|
||||
sendExpedienteToPending() {
|
||||
@@ -130,38 +137,16 @@ export class RequestOptionsPage implements OnInit {
|
||||
if(res['data']=='openDiscart') {
|
||||
console.log('open discart');
|
||||
|
||||
this.distartExpedientModal();
|
||||
} else {
|
||||
this.popoverController.dismiss('close')
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
async distartExpedientModal() {
|
||||
this.popoverController.dismiss();
|
||||
console.log(this.fulltask);
|
||||
const modal = await this.modalController.create({
|
||||
component: DiscartExpedientModalPage,
|
||||
componentProps: {
|
||||
serialNumber: this.fulltask.serialNumber,
|
||||
folderId: this.fulltask.workflowInstanceDataFields.FolderID,
|
||||
action: 'complete',
|
||||
},
|
||||
cssClass: 'discart-expedient-modal',
|
||||
backdropDismiss: false
|
||||
});
|
||||
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then(res=>{
|
||||
if(res['data']=='close'){
|
||||
this.close();
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
async repreciar(note:string, documents:any) {
|
||||
let body = {
|
||||
"serialNumber": this.serialnumber,
|
||||
"serialNumber": this.serialNumber,
|
||||
"action": "Reapreciação",
|
||||
"ActionTypeId": 100000009,
|
||||
"dataFields": {
|
||||
@@ -186,7 +171,7 @@ export class RequestOptionsPage implements OnInit {
|
||||
}
|
||||
|
||||
async openAddNoteModal(actionName:string) {
|
||||
this.popoverController.dismiss();
|
||||
|
||||
let classs;
|
||||
if( window.innerWidth <= 800){
|
||||
classs = 'modal modal-desktop'
|
||||
@@ -220,35 +205,35 @@ export class RequestOptionsPage implements OnInit {
|
||||
}
|
||||
|
||||
|
||||
if(res.data){
|
||||
if(res.data) {
|
||||
if(actionName == 'Solicitar Reapreciação') {
|
||||
|
||||
await this.repreciar(res.data.note, docs);
|
||||
}
|
||||
else if(actionName == 'Arquivar'){
|
||||
else if(actionName == 'Arquivar') {
|
||||
await this.arquivar(res.data.note, docs);
|
||||
this.popoverController.dismiss('close')
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
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()
|
||||
this.close();
|
||||
await this.pedidoService.arquivar({serialNumber: this.serialNumber,
|
||||
documents,
|
||||
note
|
||||
}).toPromise()
|
||||
|
||||
this.toastService.successMessage('Processo arquivado')
|
||||
} catch (error) {
|
||||
this.toastService.badRequest('Processo não arquivado')
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
}
|
||||
@@ -278,7 +263,7 @@ export class RequestOptionsPage implements OnInit {
|
||||
}
|
||||
|
||||
async openDelegarModal(task: any) {
|
||||
this.popoverController.dismiss();
|
||||
|
||||
|
||||
let classs;
|
||||
if( window.innerWidth <= 800){
|
||||
@@ -295,7 +280,13 @@ export class RequestOptionsPage implements OnInit {
|
||||
backdropDismiss: false
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss();
|
||||
modal.onDidDismiss().then( async (res)=> {
|
||||
|
||||
if(res['data']=='close') {
|
||||
this.popoverController.dismiss('close');
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user