mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
Merge branch 'developer' of https://bitbucket.org/equilibriumito/gabinete-digital into developer
This commit is contained in:
@@ -2,6 +2,8 @@ import { Component, OnInit } from '@angular/core';
|
||||
import { ModalController } from '@ionic/angular';
|
||||
import { SearchDocument } from 'src/app/models/search-document';
|
||||
import { SearchPage } from 'src/app/pages/search/search.page';
|
||||
import { BadRequestComponent } from 'src/app/shared/popover/bad-request/bad-request.component';
|
||||
import { SuccessMessageComponent } from 'src/app/shared/popover/success-message/success-message.component';
|
||||
|
||||
@Component({
|
||||
selector: 'app-add-note',
|
||||
@@ -32,7 +34,8 @@ export class AddNotePage implements OnInit {
|
||||
this.modalController.dismiss(body);
|
||||
}
|
||||
|
||||
async getDoc(){
|
||||
async getDoc() {
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: SearchPage,
|
||||
cssClass: 'modal-width-100-width-background modal',
|
||||
@@ -49,12 +52,46 @@ export class AddNotePage implements OnInit {
|
||||
this.documents.push(data.selected);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
removeAttachment(index: number){
|
||||
|
||||
this.documents = this.documents.filter( (e, i) => index != i);
|
||||
}
|
||||
|
||||
async successMessage(message?: string) {
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: SuccessMessageComponent,
|
||||
componentProps: {
|
||||
message: message || 'Processo efetuado' ,
|
||||
},
|
||||
cssClass: 'modal modal-desktop'
|
||||
});
|
||||
|
||||
modal.present()
|
||||
|
||||
setTimeout(()=>{
|
||||
modal.dismiss()
|
||||
},3000)
|
||||
|
||||
}
|
||||
|
||||
async badRequest(message?: string) {
|
||||
const modal = await this.modalController.create({
|
||||
component: BadRequestComponent,
|
||||
componentProps: {
|
||||
message: message || 'Processo não efetuado' ,
|
||||
},
|
||||
cssClass: 'modal modal-desktop'
|
||||
});
|
||||
|
||||
modal.present()
|
||||
|
||||
setTimeout(()=>{
|
||||
modal.dismiss()
|
||||
},3000)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -16,6 +16,8 @@ import { DiscartExpedientModalPage } from 'src/app/pages/gabinete-digital/discar
|
||||
import { ExpedienteDetailPage } from 'src/app/pages/gabinete-digital/expediente/expediente-detail/expediente-detail.page';
|
||||
import { SearchDocument } from 'src/app/models/search-document';
|
||||
import { SearchPage } from 'src/app/pages/search/search.page';
|
||||
import { BadRequestComponent } from 'src/app/shared/popover/bad-request/bad-request.component';
|
||||
import { SuccessMessageComponent } from 'src/app/shared/popover/success-message/success-message.component';
|
||||
|
||||
@Component({
|
||||
selector: 'app-create-process',
|
||||
@@ -130,7 +132,7 @@ export class CreateProcessPage implements OnInit {
|
||||
this.modalController.dismiss(null);
|
||||
|
||||
}
|
||||
saveTask(){
|
||||
async saveTask(){
|
||||
|
||||
if(this.postData.Priority=='99999861'){
|
||||
this.dispatchFolder.DeadlineType = 'Normal';
|
||||
@@ -174,7 +176,14 @@ export class CreateProcessPage implements OnInit {
|
||||
DispatchFolder: this.dispatchFolder,
|
||||
}
|
||||
console.log('this.postData', this.postData, this.taskType);
|
||||
this.processes.postDespatcho(this.postData);
|
||||
|
||||
try {
|
||||
//await this.processes.postDespatcho(this.postData).toPromise()
|
||||
this.successMessage()
|
||||
} catch (error) {
|
||||
this.badRequest()
|
||||
}
|
||||
|
||||
break;
|
||||
case '1':
|
||||
this.postData = {
|
||||
@@ -186,7 +195,15 @@ export class CreateProcessPage implements OnInit {
|
||||
DispatchFolder: this.dispatchFolder,
|
||||
}
|
||||
console.log(this.postData);
|
||||
this.processes.postParecer(this.postData);
|
||||
await this.processes.postParecer(this.postData).toPromise()
|
||||
|
||||
try {
|
||||
await this.processes.postParecer(this.postData).toPromise()
|
||||
this.successMessage()
|
||||
} catch (error) {
|
||||
this.badRequest()
|
||||
}
|
||||
|
||||
break;
|
||||
case '2':
|
||||
this.postData = {
|
||||
@@ -198,7 +215,14 @@ export class CreateProcessPage implements OnInit {
|
||||
DispatchFolder: this.dispatchFolder,
|
||||
}
|
||||
console.log(this.postData);
|
||||
this.processes.postDeferimento(this.postData);
|
||||
|
||||
try {
|
||||
await this.processes.postDeferimento(this.postData).toPromise()
|
||||
this.successMessage()
|
||||
} catch (error) {
|
||||
this.badRequest()
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
this.executado();
|
||||
@@ -233,7 +257,6 @@ export class CreateProcessPage implements OnInit {
|
||||
async addParticipants() {
|
||||
/* console.log('HERES'); */
|
||||
|
||||
|
||||
this.adding = "intervenient";
|
||||
this.contacts = this.taskParticipants;
|
||||
|
||||
@@ -412,4 +435,39 @@ export class CreateProcessPage implements OnInit {
|
||||
}
|
||||
|
||||
|
||||
|
||||
async successMessage(message?: string) {
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: SuccessMessageComponent,
|
||||
componentProps: {
|
||||
message: message || 'Processo efetuado' ,
|
||||
},
|
||||
cssClass: 'modal modal-desktop'
|
||||
});
|
||||
|
||||
modal.present()
|
||||
|
||||
setTimeout(()=>{
|
||||
modal.dismiss()
|
||||
},3000)
|
||||
|
||||
}
|
||||
|
||||
async badRequest(message?: string) {
|
||||
const modal = await this.modalController.create({
|
||||
component: BadRequestComponent,
|
||||
componentProps: {
|
||||
message: message || 'Processo não efetuado' ,
|
||||
},
|
||||
cssClass: 'modal modal-desktop'
|
||||
});
|
||||
|
||||
modal.present()
|
||||
|
||||
setTimeout(()=>{
|
||||
modal.dismiss()
|
||||
},3000)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -34,7 +34,8 @@ export class DarParecerPage implements OnInit {
|
||||
this.modalController.dismiss();
|
||||
}
|
||||
|
||||
save(){
|
||||
save() {
|
||||
|
||||
const DocumentToSave = this.documents.map((e) => {
|
||||
return {
|
||||
ApplicationId: e.ApplicationType,
|
||||
@@ -43,11 +44,10 @@ export class DarParecerPage implements OnInit {
|
||||
});
|
||||
|
||||
let docs = {
|
||||
ProcessInstanceID: this.instanceId,
|
||||
ProcessInstanceID: "",
|
||||
Attachments: DocumentToSave,
|
||||
}
|
||||
|
||||
|
||||
let body = {
|
||||
"serialNumber": this.serialNumber,
|
||||
"action": "Registar",
|
||||
|
||||
@@ -11,6 +11,8 @@ import { AddParticipantsModalPage } from 'src/app/pages/gabinete-digital/expedie
|
||||
import { AddParticipantsCcModalPage } from 'src/app/pages/gabinete-digital/expediente/add-participants-cc-modal/add-participants-cc-modal.page';
|
||||
import { DiscartExpedientModalPage } from 'src/app/pages/gabinete-digital/discart-expedient-modal/discart-expedient-modal.page';
|
||||
import { AlertService } from 'src/app/services/alert.service';
|
||||
import { BadRequestComponent } from 'src/app/shared/popover/bad-request/bad-request.component';
|
||||
import { SuccessMessageComponent } from 'src/app/shared/popover/success-message/success-message.component';
|
||||
|
||||
@Component({
|
||||
selector: 'app-delegar',
|
||||
@@ -93,6 +95,10 @@ export class DelegarPage implements OnInit {
|
||||
console.log(body);
|
||||
this.processes.DelegateTask(body).subscribe(res=>{
|
||||
console.log(res);
|
||||
this.successMessage('Processo delegado')
|
||||
},
|
||||
(error)=>{
|
||||
this.badRequest()
|
||||
});
|
||||
this.close();
|
||||
}
|
||||
@@ -164,4 +170,42 @@ export class DelegarPage implements OnInit {
|
||||
this.taskParticipants = taskParticipants;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
async successMessage(message?: string) {
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: SuccessMessageComponent,
|
||||
componentProps: {
|
||||
message: message || 'Processo efetuado' ,
|
||||
},
|
||||
cssClass: 'modal modal-desktop'
|
||||
});
|
||||
|
||||
modal.present()
|
||||
|
||||
setTimeout(()=>{
|
||||
modal.dismiss()
|
||||
},3000)
|
||||
|
||||
}
|
||||
|
||||
async badRequest(message?: string) {
|
||||
const modal = await this.modalController.create({
|
||||
component: BadRequestComponent,
|
||||
componentProps: {
|
||||
message: message || 'Processo não efetuado' ,
|
||||
},
|
||||
cssClass: 'modal modal-desktop'
|
||||
});
|
||||
|
||||
modal.present()
|
||||
|
||||
setTimeout(()=>{
|
||||
modal.dismiss()
|
||||
},3000)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -170,7 +170,7 @@ export class AgendaPage implements OnInit {
|
||||
if(this.loggeduser.Profile == 'MDGPR') {
|
||||
this.mobileComponent.showEventList = true;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
@@ -5,6 +5,8 @@ import { Event } from 'src/app/models/event.model';
|
||||
import { AlertService } from 'src/app/services/alert.service';
|
||||
import { AttachmentsService } from 'src/app/services/attachments.service';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { BadRequestComponent } from 'src/app/shared/popover/bad-request/bad-request.component';
|
||||
import { SuccessMessageComponent } from 'src/app/shared/popover/success-message/success-message.component';
|
||||
import { EmendMessageModalPage } from '../emend-message-modal/emend-message-modal.page';
|
||||
import { EventActionsPopoverPage } from '../event-actions-popover/event-actions-popover.page';
|
||||
|
||||
@@ -69,29 +71,51 @@ export class ApproveEventModalPage implements OnInit {
|
||||
|
||||
})
|
||||
}
|
||||
approveTask(serialNumber:string){
|
||||
async approveTask(serialNumber:string){
|
||||
let body = {
|
||||
"serialNumber": serialNumber,
|
||||
"action": "Aprovar"
|
||||
}
|
||||
this.processes.PostTaskAction(body);
|
||||
this.router.navigate(['/home/gabinete-digital/event-list']);
|
||||
this.modalController.dismiss(null);
|
||||
|
||||
try {
|
||||
await this.processes.PostTaskAction(body);
|
||||
this.router.navigate(['/home/gabinete-digital/event-list']);
|
||||
this.modalController.dismiss(null);
|
||||
this.successMessage()
|
||||
} catch (error) {
|
||||
this.badRequest()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
emendTask(serialNumber:string){
|
||||
this.menu.close();
|
||||
this.openEmendMessageModal(serialNumber);
|
||||
this.modalController.dismiss(null);
|
||||
async emendTask(serialNumber:string){
|
||||
|
||||
try {
|
||||
await this.openEmendMessageModal(serialNumber);
|
||||
this.modalController.dismiss(null);
|
||||
this.menu.close();
|
||||
} catch (error) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
rejectTask(serialNumber:string){
|
||||
async rejectTask(serialNumber:string){
|
||||
|
||||
let body = { "serialNumber": serialNumber, "action": "Rejeitar" }
|
||||
this.processes.PostTaskAction(body);
|
||||
this.router.navigate(['/home/gabinete-digital/event-list']);
|
||||
this.modalController.dismiss(null);
|
||||
|
||||
try {
|
||||
await this.processes.PostTaskAction(body);
|
||||
this.router.navigate(['/home/gabinete-digital/event-list']);
|
||||
this.modalController.dismiss(null);
|
||||
this.successMessage()
|
||||
} catch (error) {
|
||||
this.badRequest()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
getAttachments(){
|
||||
this.attachmentsService.getAttachmentsBySerial(this.serialNumber).subscribe(res=>{
|
||||
this.loadedAttachments = res;
|
||||
@@ -108,36 +132,72 @@ export class ApproveEventModalPage implements OnInit {
|
||||
});
|
||||
return await popover.present();
|
||||
}
|
||||
|
||||
openMenu() {
|
||||
this.menu.open();
|
||||
}
|
||||
async openEmendMessageModal(serialNumber:string) {
|
||||
const modal = await this.modalController.create({
|
||||
component: EmendMessageModalPage,
|
||||
componentProps:{
|
||||
|
||||
},
|
||||
cssClass: 'emend-message-modal',
|
||||
backdropDismiss: false
|
||||
});
|
||||
}
|
||||
|
||||
await modal.present();
|
||||
async openEmendMessageModal(serialNumber:string) {
|
||||
const modal = await this.modalController.create({
|
||||
component: EmendMessageModalPage,
|
||||
componentProps:{
|
||||
|
||||
},
|
||||
cssClass: 'emend-message-modal',
|
||||
backdropDismiss: false
|
||||
});
|
||||
|
||||
modal.onDidDismiss().then(res => {
|
||||
if(res.data !== ''){
|
||||
let body = { "serialNumber": serialNumber,
|
||||
"action": "Emendar",
|
||||
"dataFields": {
|
||||
"ReviewerUseComment": res.data,
|
||||
}
|
||||
await modal.present();
|
||||
|
||||
modal.onDidDismiss().then(res => {
|
||||
if(res.data !== ''){
|
||||
let body = { "serialNumber": serialNumber,
|
||||
"action": "Emendar",
|
||||
"dataFields": {
|
||||
"ReviewerUseComment": res.data,
|
||||
}
|
||||
}
|
||||
this.processes.PostTaskAction(body);
|
||||
this.router.navigate(['/home/gabinete-digital/event-list']);
|
||||
}
|
||||
this.processes.PostTaskAction(body);
|
||||
this.router.navigate(['/home/gabinete-digital/event-list']);
|
||||
}
|
||||
else{
|
||||
//this.alertService.presentAlert('Operação cancelada!');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
else{
|
||||
//this.alertService.presentAlert('Operação cancelada!');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
async successMessage(message?: string) {
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: SuccessMessageComponent,
|
||||
componentProps: {
|
||||
message: message || 'Processo efetuado' ,
|
||||
},
|
||||
cssClass: 'modal modal-desktop'
|
||||
});
|
||||
|
||||
modal.present()
|
||||
|
||||
setTimeout(()=>{
|
||||
modal.dismiss()
|
||||
},3000)
|
||||
|
||||
}
|
||||
|
||||
async badRequest() {
|
||||
const modal = await this.modalController.create({
|
||||
component: BadRequestComponent,
|
||||
componentProps: {
|
||||
message: 'hello',
|
||||
},
|
||||
cssClass: 'modal modal-desktop'
|
||||
});
|
||||
|
||||
modal.present()
|
||||
|
||||
setTimeout(()=>{
|
||||
modal.dismiss()
|
||||
},1000)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,6 +6,8 @@ import { EventPerson } from 'src/app/models/eventperson.model';
|
||||
import { AlertService } from 'src/app/services/alert.service';
|
||||
import { AttachmentsService } from 'src/app/services/attachments.service';
|
||||
import { EventsService } from 'src/app/services/events.service';
|
||||
import { BadRequestComponent } from 'src/app/shared/popover/bad-request/bad-request.component';
|
||||
import { SuccessMessageComponent } from 'src/app/shared/popover/success-message/success-message.component';
|
||||
import { Event } from '../../../models/event.model';
|
||||
import { AttendeesPage } from '../../events/attendees/attendees.page';
|
||||
import { SearchPage } from '../../search/search.page';
|
||||
@@ -101,16 +103,27 @@ export class EditEventPage implements OnInit {
|
||||
|
||||
this.postEvent.Attendees = this.taskParticipants.concat(this.taskParticipantsCc)
|
||||
|
||||
this.eventsService.editEvent(this.postEvent, 2, 3).subscribe(async () => {
|
||||
/* const alert = await this.alertController.create({
|
||||
cssClass: 'my-custom-class',
|
||||
header: 'Evento actualizado',
|
||||
buttons: ['OK']
|
||||
try{
|
||||
this.eventsService.editEvent(this.postEvent, 2, 3).subscribe(async () => {
|
||||
/* const alert = await this.alertController.create({
|
||||
cssClass: 'my-custom-class',
|
||||
header: 'Evento actualizado',
|
||||
buttons: ['OK']
|
||||
});
|
||||
await alert.present(); */
|
||||
|
||||
this.successMessage()
|
||||
}, error => {
|
||||
this.badRequest()
|
||||
});
|
||||
await alert.present(); */
|
||||
});
|
||||
this.isEventEdited = true;
|
||||
this.modalController.dismiss(this.isEventEdited);
|
||||
|
||||
this.isEventEdited = true;
|
||||
this.modalController.dismiss(this.isEventEdited);
|
||||
|
||||
} catch (error) {
|
||||
this.badRequest()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
async openAttendees() {
|
||||
@@ -220,4 +233,38 @@ export class EditEventPage implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
async successMessage(message?: string) {
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: SuccessMessageComponent,
|
||||
componentProps: {
|
||||
message: message || 'Processo efetuado' ,
|
||||
},
|
||||
cssClass: 'modal modal-desktop'
|
||||
});
|
||||
|
||||
modal.present()
|
||||
|
||||
setTimeout(()=>{
|
||||
modal.dismiss()
|
||||
},3000)
|
||||
|
||||
}
|
||||
|
||||
async badRequest() {
|
||||
const modal = await this.modalController.create({
|
||||
component: BadRequestComponent,
|
||||
componentProps: {
|
||||
message: 'Processo não realizado com sucesso',
|
||||
},
|
||||
cssClass: 'modal modal-desktop'
|
||||
});
|
||||
|
||||
modal.present()
|
||||
|
||||
setTimeout(()=>{
|
||||
modal.dismiss()
|
||||
},3000)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -6,6 +6,8 @@ import { EventPerson } from 'src/app/models/eventperson.model';
|
||||
import { SearchDocument } from 'src/app/models/search-document';
|
||||
import { AttachmentsService } from 'src/app/services/attachments.service';
|
||||
import { EventsService } from 'src/app/services/events.service';
|
||||
import { BadRequestComponent } from 'src/app/shared/popover/bad-request/bad-request.component';
|
||||
import { SuccessMessageComponent } from 'src/app/shared/popover/success-message/success-message.component';
|
||||
import { Event } from '../../../models/event.model';
|
||||
import { AttendeesPage } from '../../events/attendees/attendees.page';
|
||||
import { SearchPage } from '../../search/search.page';
|
||||
@@ -50,7 +52,7 @@ export class NewEventPage implements OnInit {
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
/* console.log(this.profile); */
|
||||
/* console.log(this.profile); */
|
||||
|
||||
let selectedStartdDate = this.selectedDate;
|
||||
let selectedEndDate = new Date(this.selectedDate);
|
||||
@@ -112,6 +114,7 @@ export class NewEventPage implements OnInit {
|
||||
close(){
|
||||
this.modalController.dismiss();
|
||||
}
|
||||
|
||||
async save() {
|
||||
/* console.log(this.postEvent);
|
||||
console.log(this.profile); */
|
||||
@@ -121,37 +124,83 @@ export class NewEventPage implements OnInit {
|
||||
}
|
||||
|
||||
let eventId: string;
|
||||
|
||||
if(this.profile=='mdgpr'){
|
||||
eventId = await this.eventService.postEventMd(this.postEvent, this.postEvent.CalendarName).toPromise();
|
||||
}
|
||||
else if(this.profile=='pr'){
|
||||
eventId = await this.eventService.postEventPr(this.postEvent, this.postEvent.CalendarName).toPromise();
|
||||
|
||||
try {
|
||||
|
||||
if(this.profile=='mdgpr') {
|
||||
eventId = await this.eventService.postEventMd(this.postEvent, this.postEvent.CalendarName).toPromise();
|
||||
}
|
||||
else if(this.profile=='pr'){
|
||||
eventId = await this.eventService.postEventPr(this.postEvent, this.postEvent.CalendarName).toPromise();
|
||||
}
|
||||
|
||||
const DocumentToSave: EventAttachment[] = this.documents.map((e) => {
|
||||
return {
|
||||
SourceTitle: e.Assunto,
|
||||
ParentId: eventId,
|
||||
Source: '1',
|
||||
SourceId: e.Id,
|
||||
ApplicationId: e.ApplicationType.toString(),
|
||||
Id: '',
|
||||
Link: '',
|
||||
SerialNumber: ''
|
||||
};
|
||||
});
|
||||
|
||||
await DocumentToSave.forEach( async (attachments, i) => {
|
||||
try {
|
||||
await this.attachmentsService.setEventAttachmentById(attachments).toPromise();
|
||||
} catch(error) {
|
||||
alert('document error')
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
this.successMessage()
|
||||
this.modalController.dismiss(this.postEvent);
|
||||
|
||||
|
||||
} catch (error) {
|
||||
this.badRequest()
|
||||
}
|
||||
|
||||
const DocumentToSave: EventAttachment[] = this.documents.map((e) => {
|
||||
return {
|
||||
SourceTitle: e.Assunto,
|
||||
ParentId: eventId,
|
||||
Source: '1',
|
||||
SourceId: e.Id,
|
||||
ApplicationId: e.ApplicationType.toString(),
|
||||
Id: '',
|
||||
Link: '',
|
||||
SerialNumber: ''
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
await DocumentToSave.forEach( async (attachments, i) => {
|
||||
this.attachmentsService.setEventAttachmentById(attachments).toPromise();
|
||||
});
|
||||
|
||||
|
||||
this.modalController.dismiss(this.postEvent);
|
||||
}
|
||||
|
||||
|
||||
async successMessage(message?: string) {
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: SuccessMessageComponent,
|
||||
componentProps: {
|
||||
message: message || 'Processo efetuado' ,
|
||||
},
|
||||
cssClass: 'modal modal-desktop'
|
||||
});
|
||||
|
||||
modal.present()
|
||||
|
||||
setTimeout(()=>{
|
||||
modal.dismiss()
|
||||
},3000)
|
||||
|
||||
}
|
||||
|
||||
async badRequest() {
|
||||
const modal = await this.modalController.create({
|
||||
component: BadRequestComponent,
|
||||
componentProps: {
|
||||
message: 'Processo não realizado com sucesso',
|
||||
},
|
||||
cssClass: 'modal modal-desktop'
|
||||
});
|
||||
|
||||
modal.present()
|
||||
|
||||
setTimeout(()=>{
|
||||
modal.dismiss()
|
||||
},3000)
|
||||
}
|
||||
|
||||
async openAttendees() {
|
||||
|
||||
@@ -202,7 +251,6 @@ export class NewEventPage implements OnInit {
|
||||
}
|
||||
|
||||
|
||||
|
||||
async getDoc(){
|
||||
const modal = await this.modalController.create({
|
||||
component: SearchPage,
|
||||
@@ -227,6 +275,4 @@ export class NewEventPage implements OnInit {
|
||||
this.documents = this.documents.filter( (e, i) => index != i);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -18,6 +18,8 @@ import { CreateProcessPage } from 'src/app/modals/create-process/create-process.
|
||||
import { DelegarPage } from 'src/app/modals/delegar/delegar.page';
|
||||
import { AddNotePage } from 'src/app/modals/add-note/add-note.page';
|
||||
import { OptsExpedientePage } from 'src/app/shared/popover/opts-expediente/opts-expediente.page';
|
||||
import { BadRequestComponent } from 'src/app/shared/popover/bad-request/bad-request.component';
|
||||
import { SuccessMessageComponent } from 'src/app/shared/popover/success-message/success-message.component';
|
||||
|
||||
@Component({
|
||||
selector: 'app-despacho-pr',
|
||||
@@ -81,7 +83,7 @@ export class DespachoPrPage implements OnInit {
|
||||
goBack(){
|
||||
let navigationExtras: NavigationExtras = {
|
||||
queryParams: {
|
||||
"despachospr": true,
|
||||
"despachospr": true,
|
||||
}
|
||||
};
|
||||
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
||||
@@ -167,7 +169,8 @@ export class DespachoPrPage implements OnInit {
|
||||
this.menu.open();
|
||||
this.modalController.dismiss();
|
||||
}
|
||||
executado(note:string, documents:any){
|
||||
|
||||
async executado(note:string, documents:any){
|
||||
let body = {
|
||||
"serialNumber": this.serialnumber,
|
||||
"action": "Conhecimento",
|
||||
@@ -177,10 +180,17 @@ export class DespachoPrPage implements OnInit {
|
||||
},
|
||||
"AttachmentList" :documents,
|
||||
}
|
||||
this.processes.CompleteTask(body);
|
||||
this.close();
|
||||
|
||||
try {
|
||||
await this.processes.CompleteTask(body);
|
||||
this.close();
|
||||
this.successMessage()
|
||||
} catch(error) {
|
||||
this.badRequest()
|
||||
}
|
||||
}
|
||||
arquivar(note:string, documents:any){
|
||||
|
||||
async arquivar(note:string, documents:any){
|
||||
let body = {
|
||||
"serialNumber": this.serialnumber,
|
||||
"action": "Arquivo",
|
||||
@@ -190,10 +200,17 @@ export class DespachoPrPage implements OnInit {
|
||||
},
|
||||
"AttachmentList" :documents,
|
||||
}
|
||||
this.processes.CompleteTask(body);
|
||||
this.close();
|
||||
try {
|
||||
await this.processes.CompleteTask(body);
|
||||
this.successMessage()
|
||||
this.close();
|
||||
} catch (error) {
|
||||
this.badRequest()
|
||||
}
|
||||
|
||||
}
|
||||
generateDiploma(note:string, documents:any){
|
||||
|
||||
async generateDiploma(note:string, documents:any){
|
||||
let body = {
|
||||
"serialNumber": this.serialnumber,
|
||||
"action": "Reencaminhar",
|
||||
@@ -203,8 +220,15 @@ export class DespachoPrPage implements OnInit {
|
||||
},
|
||||
"AttachmentList" :documents,
|
||||
}
|
||||
this.processes.CompleteTask(body);
|
||||
this.close();
|
||||
|
||||
try {
|
||||
await this.processes.CompleteTask(body);
|
||||
this.successMessage()
|
||||
this.close();
|
||||
} catch (error) {
|
||||
this.badRequest()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
sendExpedienteToPending(){
|
||||
@@ -234,14 +258,29 @@ export class DespachoPrPage implements OnInit {
|
||||
modal.onDidDismiss().then(res => {
|
||||
console.log(res);
|
||||
if(res.data){
|
||||
|
||||
|
||||
|
||||
const DocumentToSave = res.data.documents.map((e) => {
|
||||
return {
|
||||
ApplicationId: e.ApplicationType,
|
||||
SourceId: e.Id,
|
||||
}
|
||||
});
|
||||
|
||||
let docs = {
|
||||
ProcessInstanceID: "",
|
||||
Attachments: DocumentToSave,
|
||||
}
|
||||
|
||||
if(actionName == 'Executado'){
|
||||
this.executado(res.data.note,res.data.documents);
|
||||
this.executado(res.data.note, docs);
|
||||
}
|
||||
else if(actionName == 'Arquivar'){
|
||||
this.arquivar(res.data.note,res.data.documents);
|
||||
this.arquivar(res.data.note, docs);
|
||||
}
|
||||
else if(actionName == 'Gerar Diploma'){
|
||||
this.generateDiploma(res.data.note,res.data.documents);
|
||||
this.generateDiploma(res.data.note, docs);
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -370,5 +409,38 @@ export class DespachoPrPage implements OnInit {
|
||||
});
|
||||
return await popover.present();
|
||||
}
|
||||
|
||||
|
||||
async successMessage(message?: string) {
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: SuccessMessageComponent,
|
||||
componentProps: {
|
||||
message: message || 'Processo efetuado' ,
|
||||
},
|
||||
cssClass: 'modal modal-desktop'
|
||||
});
|
||||
|
||||
modal.present()
|
||||
|
||||
setTimeout(()=>{
|
||||
modal.dismiss()
|
||||
},3000)
|
||||
|
||||
}
|
||||
|
||||
async badRequest() {
|
||||
const modal = await this.modalController.create({
|
||||
component: BadRequestComponent,
|
||||
componentProps: {
|
||||
message: 'hello',
|
||||
},
|
||||
cssClass: 'modal modal-desktop'
|
||||
});
|
||||
|
||||
modal.present()
|
||||
|
||||
setTimeout(()=>{
|
||||
modal.dismiss()
|
||||
},1000)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,6 +18,8 @@ import { CreateProcessPage } from 'src/app/modals/create-process/create-process.
|
||||
import { DelegarPage } from 'src/app/modals/delegar/delegar.page';
|
||||
import { AddNotePage } from 'src/app/modals/add-note/add-note.page';
|
||||
import { OptsExpedientePage } from 'src/app/shared/popover/opts-expediente/opts-expediente.page';
|
||||
import { BadRequestComponent } from 'src/app/shared/popover/bad-request/bad-request.component';
|
||||
import { SuccessMessageComponent } from 'src/app/shared/popover/success-message/success-message.component';
|
||||
|
||||
@Component({
|
||||
selector: 'app-despacho',
|
||||
@@ -82,7 +84,7 @@ export class DespachoPage implements OnInit {
|
||||
goBack(){
|
||||
let navigationExtras: NavigationExtras = {
|
||||
queryParams: {
|
||||
"despachos": true,
|
||||
"despachos": true,
|
||||
}
|
||||
};
|
||||
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
||||
@@ -168,7 +170,8 @@ export class DespachoPage implements OnInit {
|
||||
this.menu.open();
|
||||
this.modalController.dismiss();
|
||||
}
|
||||
executado(note:string, documents:any){
|
||||
|
||||
async executado(note:string, documents:any){
|
||||
let body = {
|
||||
"serialNumber": this.serialnumber,
|
||||
"action": "Conhecimento",
|
||||
@@ -178,10 +181,17 @@ export class DespachoPage implements OnInit {
|
||||
},
|
||||
"AttachmentList" :documents,
|
||||
}
|
||||
this.processes.CompleteTask(body);
|
||||
this.close();
|
||||
|
||||
try {
|
||||
await this.processes.CompleteTask(body);
|
||||
this.close();
|
||||
this.successMessage()
|
||||
} catch(error) {
|
||||
this.badRequest()
|
||||
}
|
||||
}
|
||||
arquivar(note:string, documents:any){
|
||||
|
||||
async arquivar(note:string, documents:any){
|
||||
let body = {
|
||||
"serialNumber": this.serialnumber,
|
||||
"action": "Arquivo",
|
||||
@@ -191,10 +201,17 @@ export class DespachoPage implements OnInit {
|
||||
},
|
||||
"AttachmentList" :documents,
|
||||
}
|
||||
this.processes.CompleteTask(body);
|
||||
this.close();
|
||||
try {
|
||||
await this.processes.CompleteTask(body);
|
||||
this.successMessage()
|
||||
this.close();
|
||||
} catch (error) {
|
||||
this.badRequest()
|
||||
}
|
||||
|
||||
}
|
||||
reexecute(note:string, documents:any){
|
||||
|
||||
async reexecute(note:string, documents:any){
|
||||
let body = {
|
||||
"serialNumber": this.serialnumber,
|
||||
"action": "Reencaminhar",
|
||||
@@ -204,14 +221,25 @@ export class DespachoPage implements OnInit {
|
||||
},
|
||||
"AttachmentList" :documents,
|
||||
}
|
||||
this.processes.CompleteTask(body);
|
||||
this.close();
|
||||
|
||||
try {
|
||||
await this.processes.CompleteTask(body);
|
||||
this.close();
|
||||
this.successMessage()
|
||||
} catch (error) {
|
||||
this.badRequest()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
sendExpedienteToPending(){
|
||||
this.processes.SetTaskToPending(this.serialnumber).subscribe(res=>{
|
||||
console.log(res);
|
||||
this.close();
|
||||
this.successMessage()
|
||||
},
|
||||
error => {
|
||||
this.badRequest()
|
||||
});
|
||||
}
|
||||
|
||||
@@ -235,14 +263,28 @@ export class DespachoPage implements OnInit {
|
||||
modal.onDidDismiss().then(res => {
|
||||
console.log(res);
|
||||
if(res.data){
|
||||
|
||||
const DocumentToSave = res.data.documents.map((e) => {
|
||||
return {
|
||||
ApplicationId: e.ApplicationType,
|
||||
SourceId: e.Id,
|
||||
}
|
||||
});
|
||||
|
||||
let docs = {
|
||||
ProcessInstanceID: "",
|
||||
Attachments: DocumentToSave,
|
||||
}
|
||||
|
||||
if(actionName == 'Executado'){
|
||||
this.executado(res.data.note,res.data.documents);
|
||||
|
||||
this.executado(res.data.note, docs);
|
||||
}
|
||||
else if(actionName == 'Arquivar'){
|
||||
this.arquivar(res.data.note,res.data.documents);
|
||||
this.arquivar(res.data.note, docs);
|
||||
}
|
||||
else if(actionName == 'Reexecução'){
|
||||
this.reexecute(res.data.note,res.data.documents);
|
||||
this.reexecute(res.data.note, docs);
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -372,4 +414,38 @@ export class DespachoPage implements OnInit {
|
||||
return await popover.present();
|
||||
}
|
||||
|
||||
|
||||
async successMessage(message?: string) {
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: SuccessMessageComponent,
|
||||
componentProps: {
|
||||
message: message || 'Processo efetuado' ,
|
||||
},
|
||||
cssClass: 'modal modal-desktop'
|
||||
});
|
||||
|
||||
modal.present()
|
||||
|
||||
setTimeout(()=>{
|
||||
modal.dismiss()
|
||||
},3000)
|
||||
|
||||
}
|
||||
|
||||
async badRequest() {
|
||||
const modal = await this.modalController.create({
|
||||
component: BadRequestComponent,
|
||||
componentProps: {
|
||||
message: 'hello',
|
||||
},
|
||||
cssClass: 'modal modal-desktop'
|
||||
});
|
||||
|
||||
modal.present()
|
||||
|
||||
setTimeout(()=>{
|
||||
modal.dismiss()
|
||||
},1000)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,179 +20,181 @@ import { DespachoPage } from 'src/app/pages/gabinete-digital/despachos/despacho/
|
||||
templateUrl: './despachos.page.html',
|
||||
styleUrls: ['./despachos.page.scss'],
|
||||
})
|
||||
|
||||
export class DespachosPage implements OnInit {
|
||||
//profile:string;
|
||||
//profile:string;
|
||||
|
||||
@ViewChild(CalendarComponent) myCal: CalendarComponent;
|
||||
@ViewChild(CalendarComponent) myCal: CalendarComponent;
|
||||
|
||||
taskslist:DailyWorkTask[];
|
||||
despachoList:any[] = [];
|
||||
deferimentoList:DailyWorkTask[] = [];
|
||||
taskslist:DailyWorkTask[];
|
||||
despachoList:any[] = [];
|
||||
deferimentoList:DailyWorkTask[] = [];
|
||||
|
||||
taskList:tasksList[] = [];
|
||||
taskList:tasksList[] = [];
|
||||
|
||||
taskType: string;
|
||||
serialNumber:string;
|
||||
totalDocs:any;
|
||||
taskType: string;
|
||||
serialNumber:string;
|
||||
totalDocs:any;
|
||||
|
||||
@Input() profile:string;
|
||||
segment:string;
|
||||
@Output() openExpedientDetail:EventEmitter<any> = new EventEmitter<any>();
|
||||
@Input() profile:string;
|
||||
segment:string;
|
||||
@Output() openExpedientDetail:EventEmitter<any> = new EventEmitter<any>();
|
||||
|
||||
loadedAttachments:any;
|
||||
dicIndex = 0;
|
||||
inicial = false
|
||||
loadedAttachments:any;
|
||||
dicIndex = 0;
|
||||
inicial = false
|
||||
|
||||
constructor (
|
||||
private processes:ProcessesService,
|
||||
private modalController: ModalController,
|
||||
private alertService: AlertService,
|
||||
private authService: AuthService,
|
||||
) {
|
||||
this.profile = 'mdgpr';
|
||||
constructor (
|
||||
private processes:ProcessesService,
|
||||
private modalController: ModalController,
|
||||
private alertService: AlertService,
|
||||
private authService: AuthService,
|
||||
) {
|
||||
this.profile = 'mdgpr';
|
||||
// alert('nice!')
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
//Inicializar segment
|
||||
this.segment = "despachos";
|
||||
this.LoadList();
|
||||
this.authService.userData$.subscribe((res:any)=>{
|
||||
console.log(res);
|
||||
});
|
||||
}
|
||||
segmentChanged(ev: any) {
|
||||
this.LoadList();
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
//Inicializar segment
|
||||
this.segment = "despachos";
|
||||
this.LoadList();
|
||||
this.authService.userData$.subscribe((res:any)=>{
|
||||
console.log(res);
|
||||
});
|
||||
}
|
||||
segmentChanged(ev: any) {
|
||||
this.LoadList();
|
||||
}
|
||||
notImplemented(){
|
||||
this.alertService.presentAlert('Funcionalidade em desenvolvimento');
|
||||
}
|
||||
|
||||
notImplemented(){
|
||||
this.alertService.presentAlert('Funcionalidade em desenvolvimento');
|
||||
}
|
||||
openExpedientDetailPage(data){
|
||||
console.log(data);
|
||||
this.openExpedientDetail.emit(data);
|
||||
}
|
||||
|
||||
openExpedientDetailPage(data){
|
||||
console.log(data);
|
||||
this.openExpedientDetail.emit(data);
|
||||
}
|
||||
async LoadList() {
|
||||
|
||||
async LoadList(){
|
||||
let result = await this.processes.GetTasksList("Despacho", false).toPromise();
|
||||
//let despachos = result.reverse().filter(data => data.activityInstanceName == "Despacho (Paralelo)");
|
||||
this.despachoList = new Array();
|
||||
|
||||
console.log(result);
|
||||
|
||||
|
||||
let result = await this.processes.GetTasksList("Despacho", false).toPromise();
|
||||
//let despachos = result.reverse().filter(data => data.activityInstanceName == "Despacho (Paralelo)");
|
||||
|
||||
console.log(result);
|
||||
await result.forEach( (element, index) => {
|
||||
|
||||
let task = {
|
||||
"SerialNumber": element.serialNumber,
|
||||
"Folio": element.workflowInstanceDataFields.Subject,
|
||||
"Senders": element.workflowInstanceDataFields.Sender,
|
||||
"CreateDate": formatDate(new Date(element.taskStartDate), 'yyyy-MM-dd HH:mm', 'pt'),
|
||||
"DocumentURL": element.workflowInstanceDataFields.ViewerRequest,
|
||||
"Remetente": element.workflowInstanceDataFields.Remetente,
|
||||
"DocumentsQty": '',
|
||||
"DocId": element.workflowInstanceDataFields.DocId,
|
||||
"WorkflowName": element.workflowDisplayName,
|
||||
"FolderID": element.workflowInstanceDataFields.FolderID,
|
||||
"activityInstanceName": element.activityInstanceName,
|
||||
}
|
||||
|
||||
this.despachoList.push(task)
|
||||
|
||||
});
|
||||
|
||||
await result.forEach( (element, index) => {
|
||||
|
||||
let task = {
|
||||
"SerialNumber": element.serialNumber,
|
||||
"Folio": element.workflowInstanceDataFields.Subject,
|
||||
"Senders": element.workflowInstanceDataFields.Sender,
|
||||
"CreateDate": formatDate(new Date(element.taskStartDate), 'yyyy-MM-dd HH:mm', 'pt'),
|
||||
"DocumentURL": element.workflowInstanceDataFields.ViewerRequest,
|
||||
"Remetente": element.workflowInstanceDataFields.Remetente,
|
||||
"DocumentsQty": '',
|
||||
"DocId": element.workflowInstanceDataFields.DocId,
|
||||
"WorkflowName": element.workflowDisplayName,
|
||||
"FolderID": element.workflowInstanceDataFields.FolderID,
|
||||
"activityInstanceName": element.activityInstanceName,
|
||||
}
|
||||
|
||||
this.despachoList.push(task)
|
||||
|
||||
});
|
||||
this.despachoList = this.sortArrayISODate(this.despachoList).reverse()
|
||||
|
||||
this.despachoList = this.sortArrayISODate(this.despachoList).reverse()
|
||||
this.despachoList.forEach( (element, index) => {
|
||||
// let aplicationId = element.workflowInstanceDataFields.SourceSecFsID;
|
||||
let FolderID = element['FolderID'];
|
||||
|
||||
this.despachoList.forEach( (element, index) => {
|
||||
// let aplicationId = element.workflowInstanceDataFields.SourceSecFsID;
|
||||
let FolderID = element['FolderID'];
|
||||
this.processes.GetDocumentDetails(FolderID, '361').subscribe(res=>{
|
||||
element.DocumentsQty = res.DocumentsTotal
|
||||
})
|
||||
|
||||
this.processes.GetDocumentDetails(FolderID, '361').subscribe(res=>{
|
||||
element.DocumentsQty = res.DocumentsTotal
|
||||
})
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
sortArrayISODate(myArray: any){
|
||||
return myArray.sort(function(a, b) {
|
||||
return (a.CreateDate < b.CreateDate) ? -1 : ((a.CreateDate > b.CreateDate) ? 1 : 0);
|
||||
});
|
||||
}
|
||||
|
||||
sortArrayISODate(myArray: any){
|
||||
return myArray.sort(function(a, b) {
|
||||
return (a.CreateDate < b.CreateDate) ? -1 : ((a.CreateDate > b.CreateDate) ? 1 : 0);
|
||||
});
|
||||
}
|
||||
|
||||
doRefresh(event) {
|
||||
this.LoadList();
|
||||
|
||||
setTimeout(() => {
|
||||
event.target.complete();
|
||||
}, 2000);
|
||||
}
|
||||
|
||||
async viewExpedientDetail(serialNumber:any) {
|
||||
console.log(this.profile);
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: DespachoPage,
|
||||
componentProps:{
|
||||
enterAnimation: "",
|
||||
serialNumber: serialNumber,
|
||||
profile: this.profile,
|
||||
},
|
||||
cssClass: 'modal modal-desktop',
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then((res)=>{
|
||||
console.log('refresh list');
|
||||
doRefresh(event) {
|
||||
this.LoadList();
|
||||
});
|
||||
}
|
||||
|
||||
// old
|
||||
async openExpedientActionsModal(taskAction: any, task: any) {
|
||||
//this.modalController.dismiss();
|
||||
let classs;
|
||||
if( window.innerWidth <= 800){
|
||||
classs = 'modal modal-desktop'
|
||||
} else {
|
||||
classs = 'modal modal-desktop showAsideOptions'
|
||||
}
|
||||
setTimeout(() => {
|
||||
event.target.complete();
|
||||
}, 2000);
|
||||
}
|
||||
|
||||
const doc = this.loadedAttachments[ this.dicIndex];
|
||||
async viewExpedientDetail(serialNumber:any) {
|
||||
console.log(this.profile);
|
||||
|
||||
task = {
|
||||
serialNumber: doc.SourceId,
|
||||
taskStartDate: doc.CreateDate,
|
||||
isEvent: true,
|
||||
workflowInstanceDataFields: {
|
||||
FsId: doc.ApplicationId,
|
||||
FolderID: null,
|
||||
DocId: doc.SourceId,
|
||||
Subject: doc.SourceName
|
||||
},
|
||||
}
|
||||
const modal = await this.modalController.create({
|
||||
component: DespachoPage,
|
||||
componentProps:{
|
||||
enterAnimation: "",
|
||||
serialNumber: serialNumber,
|
||||
profile: this.profile,
|
||||
},
|
||||
cssClass: 'modal modal-desktop',
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then((res)=>{
|
||||
console.log('refresh list');
|
||||
this.LoadList();
|
||||
});
|
||||
}
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: ExpedientTaskModalPage,
|
||||
componentProps: {
|
||||
taskAction: taskAction,
|
||||
task: task,
|
||||
profile: this.profile,
|
||||
},
|
||||
cssClass: classs,
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then(res=>{
|
||||
console.log(res['data']);
|
||||
if(res['data']=='openDiscart'){
|
||||
console.log('open discart');
|
||||
|
||||
// this.distartExpedientModal();
|
||||
// old
|
||||
async openExpedientActionsModal(taskAction: any, task: any) {
|
||||
//this.modalController.dismiss();
|
||||
let classs;
|
||||
if( window.innerWidth <= 800){
|
||||
classs = 'modal modal-desktop'
|
||||
} else {
|
||||
classs = 'modal modal-desktop showAsideOptions'
|
||||
}
|
||||
|
||||
}
|
||||
const doc = this.loadedAttachments[ this.dicIndex];
|
||||
|
||||
});
|
||||
}
|
||||
task = {
|
||||
serialNumber: doc.SourceId,
|
||||
taskStartDate: doc.CreateDate,
|
||||
isEvent: true,
|
||||
workflowInstanceDataFields: {
|
||||
FsId: doc.ApplicationId,
|
||||
FolderID: null,
|
||||
DocId: doc.SourceId,
|
||||
Subject: doc.SourceName
|
||||
},
|
||||
}
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: ExpedientTaskModalPage,
|
||||
componentProps: {
|
||||
taskAction: taskAction,
|
||||
task: task,
|
||||
profile: this.profile,
|
||||
},
|
||||
cssClass: classs,
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then(res=>{
|
||||
console.log(res['data']);
|
||||
if(res['data']=='openDiscart'){
|
||||
console.log('open discart');
|
||||
|
||||
// this.distartExpedientModal();
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
async openBookMeetingModal(task: any) {
|
||||
|
||||
|
||||
@@ -8,6 +8,8 @@ import { momentG } from 'src/plugin/momentG';
|
||||
import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
|
||||
import { ActivatedRoute, NavigationExtras, Router } from '@angular/router';
|
||||
import { BookMeetingModalPage } from '../../expediente/book-meeting-modal/book-meeting-modal.page';
|
||||
import { BadRequestComponent } from 'src/app/shared/popover/bad-request/bad-request.component';
|
||||
import { SuccessMessageComponent } from 'src/app/shared/popover/success-message/success-message.component';
|
||||
|
||||
@Component({
|
||||
selector: 'app-diploma',
|
||||
@@ -53,7 +55,7 @@ export class DiplomaPage implements OnInit {
|
||||
goBack(){
|
||||
let navigationExtras: NavigationExtras = {
|
||||
queryParams: {
|
||||
"diplomas": true,
|
||||
"diplomas": true,
|
||||
}
|
||||
};
|
||||
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
||||
@@ -134,7 +136,7 @@ export class DiplomaPage implements OnInit {
|
||||
})
|
||||
}
|
||||
|
||||
askSignature(note:string, documents:any){
|
||||
async askSignature(note:string, documents:any){
|
||||
let body = {
|
||||
"serialNumber": this.serialnumber,
|
||||
"action": "Aprovar",
|
||||
@@ -144,11 +146,16 @@ export class DiplomaPage implements OnInit {
|
||||
},
|
||||
"AttachmentList" :documents,
|
||||
}
|
||||
this.processes.CompleteTask(body);
|
||||
this.close();
|
||||
try {
|
||||
await this.processes.CompleteTask(body);
|
||||
this.close();
|
||||
this.successMessage()
|
||||
} catch (error) {
|
||||
this.badRequest()
|
||||
}
|
||||
}
|
||||
|
||||
askToChange(note:string, documents:any){
|
||||
async askToChange(note:string, documents:any){
|
||||
let body = {
|
||||
"serialNumber": this.serialnumber,
|
||||
"action": "Retificar",
|
||||
@@ -158,8 +165,14 @@ export class DiplomaPage implements OnInit {
|
||||
},
|
||||
"AttachmentList" :documents,
|
||||
}
|
||||
this.processes.CompleteTask(body);
|
||||
this.close();
|
||||
|
||||
try {
|
||||
await this.processes.CompleteTask(body);
|
||||
this.close();
|
||||
this.successMessage()
|
||||
} catch (error) {
|
||||
this.badRequest()
|
||||
}
|
||||
}
|
||||
|
||||
async openAddNoteModal(actionName:string) {
|
||||
@@ -181,12 +194,27 @@ export class DiplomaPage implements OnInit {
|
||||
|
||||
modal.onDidDismiss().then(res => {
|
||||
if(res.data){
|
||||
|
||||
|
||||
const DocumentToSave = res.data.documents.map((e) => {
|
||||
return {
|
||||
ApplicationId: e.ApplicationType,
|
||||
SourceId: e.Id,
|
||||
}
|
||||
});
|
||||
|
||||
let docs = {
|
||||
ProcessInstanceID: "",
|
||||
Attachments: DocumentToSave,
|
||||
}
|
||||
|
||||
|
||||
if(actionName == 'Solicitar assinatura'){
|
||||
this.askSignature(res.data.note,res.data.documents);
|
||||
this.askSignature(res.data.note, docs);
|
||||
this.goBack();
|
||||
}
|
||||
else if(actionName == 'Solicitar alteração'){
|
||||
this.askToChange(res.data.note,res.data.documents);
|
||||
this.askToChange(res.data.note, docs);
|
||||
this.goBack();
|
||||
}
|
||||
}
|
||||
@@ -216,4 +244,38 @@ export class DiplomaPage implements OnInit {
|
||||
this.modalController.dismiss();
|
||||
}
|
||||
|
||||
async successMessage(message?: string) {
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: SuccessMessageComponent,
|
||||
componentProps: {
|
||||
message: message || 'Processo efetuado' ,
|
||||
},
|
||||
cssClass: 'modal modal-desktop'
|
||||
});
|
||||
|
||||
modal.present()
|
||||
|
||||
setTimeout(()=>{
|
||||
modal.dismiss()
|
||||
},3000)
|
||||
|
||||
}
|
||||
|
||||
async badRequest() {
|
||||
const modal = await this.modalController.create({
|
||||
component: BadRequestComponent,
|
||||
componentProps: {
|
||||
message: 'hello',
|
||||
},
|
||||
cssClass: 'modal modal-desktop'
|
||||
});
|
||||
|
||||
modal.present()
|
||||
|
||||
setTimeout(()=>{
|
||||
modal.dismiss()
|
||||
}, 3000)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+89
-38
@@ -6,6 +6,8 @@ import { AlertService } from 'src/app/services/alert.service';
|
||||
import { AttachmentsService } from 'src/app/services/attachments.service';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { EditEventToApproveComponent } from 'src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page';
|
||||
import { BadRequestComponent } from 'src/app/shared/popover/bad-request/bad-request.component';
|
||||
import { SuccessMessageComponent } from 'src/app/shared/popover/success-message/success-message.component';
|
||||
import { EmendMessageModalPage } from '../../../agenda/emend-message-modal/emend-message-modal.page';
|
||||
import { EventActionsPopoverPage } from '../../../agenda/event-actions-popover/event-actions-popover.page';
|
||||
import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
|
||||
@@ -56,7 +58,6 @@ export class ApproveEventModalPage implements OnInit {
|
||||
this.getTask();
|
||||
this.getAttachments();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -109,20 +110,27 @@ export class ApproveEventModalPage implements OnInit {
|
||||
this.modalController.dismiss(null);
|
||||
}
|
||||
|
||||
rejectTask(serialNumber:string){
|
||||
console.log('rejectTask: ',serialNumber)
|
||||
async rejectTask(serialNumber:string) {
|
||||
// console.log('rejectTask: ',serialNumber)
|
||||
let body = { "serialNumber": serialNumber, "action": "Rejeitar" }
|
||||
console.log(body);
|
||||
this.processes.PostTaskAction(body);
|
||||
this.router.navigate(['/home/gabinete-digital/event-list']);
|
||||
// console.log(body);
|
||||
|
||||
try {
|
||||
await this.processes.PostTaskAction(body);
|
||||
this.router.navigate(['/home/gabinete-digital/event-list']);
|
||||
|
||||
this.successMessage()
|
||||
} catch (error) {
|
||||
this.badRequest()
|
||||
}
|
||||
|
||||
this.modalController.dismiss(null);
|
||||
}
|
||||
async getAttachments(){
|
||||
|
||||
async getAttachments() {
|
||||
this.loadedAttachments = await this.attachmentsService.getAttachmentsById(this.InstanceId).toPromise();
|
||||
console.log(this.loadedAttachments);
|
||||
|
||||
|
||||
console.log(this.loadedAttachments);
|
||||
}
|
||||
|
||||
async openOptions(ev:any) {
|
||||
@@ -134,40 +142,49 @@ export class ApproveEventModalPage implements OnInit {
|
||||
});
|
||||
return await popover.present();
|
||||
}
|
||||
|
||||
openMenu() {
|
||||
this.menu.open();
|
||||
}
|
||||
async openEmendMessageModal(serialNumber:string) {
|
||||
const modal = await this.modalController.create({
|
||||
component: EmendMessageModalPage,
|
||||
componentProps:{
|
||||
|
||||
},
|
||||
cssClass: 'emend-message-modal',
|
||||
backdropDismiss: false
|
||||
});
|
||||
}
|
||||
|
||||
await modal.present();
|
||||
async openEmendMessageModal(serialNumber:string) {
|
||||
const modal = await this.modalController.create({
|
||||
component: EmendMessageModalPage,
|
||||
componentProps:{
|
||||
},
|
||||
cssClass: 'emend-message-modal',
|
||||
backdropDismiss: false
|
||||
});
|
||||
|
||||
await modal.present();
|
||||
|
||||
modal.onDidDismiss().then( async (res) => {
|
||||
if(res.data !== '') {
|
||||
let body = {
|
||||
"serialNumber": serialNumber,
|
||||
"action": "Emendar",
|
||||
"dataFields": {
|
||||
"ReviewerUseComment": res.data,
|
||||
}
|
||||
}
|
||||
|
||||
//console.log(body);
|
||||
|
||||
try {
|
||||
await this.processes.PostTaskAction(body);
|
||||
this.router.navigate(['/home/gabinete-digital/event-list']);
|
||||
this.successMessage()
|
||||
} catch (error) {
|
||||
this.badRequest()
|
||||
this.router.navigate(['/home/gabinete-digital/event-list']);
|
||||
}
|
||||
|
||||
modal.onDidDismiss().then(res => {
|
||||
if(res.data !== ''){
|
||||
let body = { "serialNumber": serialNumber,
|
||||
"action": "Emendar",
|
||||
"dataFields": {
|
||||
"ReviewerUseComment": res.data,
|
||||
}
|
||||
}
|
||||
console.log(body);
|
||||
this.processes.PostTaskAction(body);
|
||||
this.router.navigate(['/home/gabinete-digital/event-list']);
|
||||
}
|
||||
else{
|
||||
//this.alertService.presentAlert('Operação cancelada!');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
else {
|
||||
//this.alertService.presentAlert('Operação cancelada!');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
async editar(serialNumber: string) {
|
||||
|
||||
@@ -188,5 +205,39 @@ export class ApproveEventModalPage implements OnInit {
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
async successMessage(message?: string) {
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: SuccessMessageComponent,
|
||||
componentProps: {
|
||||
message: message || 'Processo efetuado' ,
|
||||
},
|
||||
cssClass: 'modal modal-desktop'
|
||||
});
|
||||
|
||||
modal.present()
|
||||
|
||||
setTimeout(()=>{
|
||||
modal.dismiss()
|
||||
},3000)
|
||||
|
||||
}
|
||||
|
||||
async badRequest() {
|
||||
const modal = await this.modalController.create({
|
||||
component: BadRequestComponent,
|
||||
componentProps: {
|
||||
message: 'hello',
|
||||
},
|
||||
cssClass: 'modal modal-desktop'
|
||||
});
|
||||
|
||||
modal.present()
|
||||
|
||||
setTimeout(()=>{
|
||||
modal.dismiss()
|
||||
},1000)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -188,7 +188,7 @@ export class ApproveEventPage implements OnInit {
|
||||
goToEventsToApprove(){
|
||||
let navigationExtras: NavigationExtras = {
|
||||
queryParams: {
|
||||
"events": true,
|
||||
"events": true,
|
||||
}
|
||||
};
|
||||
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
||||
|
||||
+61
-7
@@ -12,6 +12,8 @@ import { DiscartExpedientModalPage } from '../../discart-expedient-modal/discart
|
||||
import { AttachmentsService } from 'src/app/services/attachments.service';
|
||||
import { SearchPage } from 'src/app/pages/search/search.page';
|
||||
import { SearchDocument } from 'src/app/models/search-document';
|
||||
import { BadRequestComponent } from 'src/app/shared/popover/bad-request/bad-request.component';
|
||||
import { SuccessMessageComponent } from 'src/app/shared/popover/success-message/success-message.component';
|
||||
|
||||
@Component({
|
||||
selector: 'app-book-meeting-modal',
|
||||
@@ -85,7 +87,7 @@ export class BookMeetingModalPage implements OnInit {
|
||||
cancelTask(){
|
||||
this.modalController.dismiss(null);
|
||||
}
|
||||
saveTask(){
|
||||
async saveTask(){
|
||||
|
||||
// issue12323423
|
||||
let Attendees = this.taskParticipants.concat(this.taskParticipantsCc);
|
||||
@@ -115,15 +117,30 @@ export class BookMeetingModalPage implements OnInit {
|
||||
}
|
||||
console.log(this.postData);
|
||||
|
||||
if(this.task.FsId == '8'){
|
||||
this.calendarService.postExpedientEvent(this.task.DocId, this.postData, "md",this.task.SerialNumber, this.task.FsId);
|
||||
this.distartExpedientModal();
|
||||
if(this.task.FsId == '8') {
|
||||
|
||||
try {
|
||||
await this.calendarService.postExpedientEvent(this.task.DocId, this.postData, "md",this.task.SerialNumber, this.task.FsId).toPromise()
|
||||
this.distartExpedientModal();
|
||||
this.successMessage('Reunião criada')
|
||||
} catch (error) {
|
||||
this.badRequest()
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else if(this.task.FsId == '361'){
|
||||
this.calendarService.createTaskEvent(this.task.FolderId, this.postData, "md",this.task.SerialNumber, this.task.FsId);
|
||||
else if(this.task.FsId == '361') {
|
||||
try {
|
||||
await this.calendarService.createTaskEvent(this.task.FolderId, this.postData, "md",this.task.SerialNumber, this.task.FsId).toPromise()
|
||||
this.successMessage('Reunião criada')
|
||||
this.close();
|
||||
} catch (error) {
|
||||
this.badRequest()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
this.close();
|
||||
|
||||
}
|
||||
|
||||
async addParticipants(){
|
||||
@@ -263,4 +280,41 @@ export class BookMeetingModalPage implements OnInit {
|
||||
this.taskParticipantsCc = taskParticipantsCc;
|
||||
}
|
||||
|
||||
|
||||
|
||||
async successMessage(message?: string) {
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: SuccessMessageComponent,
|
||||
componentProps: {
|
||||
message: message || 'Processo efetuado' ,
|
||||
},
|
||||
cssClass: 'modal modal-desktop'
|
||||
});
|
||||
|
||||
modal.present()
|
||||
|
||||
setTimeout(()=>{
|
||||
modal.dismiss()
|
||||
},3000)
|
||||
|
||||
}
|
||||
|
||||
async badRequest(message?: string) {
|
||||
const modal = await this.modalController.create({
|
||||
component: BadRequestComponent,
|
||||
componentProps: {
|
||||
message: message || 'Processo não efetuado' ,
|
||||
},
|
||||
cssClass: 'modal modal-desktop'
|
||||
});
|
||||
|
||||
modal.present()
|
||||
|
||||
setTimeout(()=>{
|
||||
modal.dismiss()
|
||||
},3000)
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
+74
-11
@@ -18,6 +18,8 @@ import { SearchPage } from 'src/app/pages/search/search.page';
|
||||
import { SearchDocument } from 'src/app/models/search-document';
|
||||
import { EventAttachment } from 'src/app/models/attachment.model';
|
||||
import { User } from 'src/app/models/user.model';
|
||||
import { BadRequestComponent } from 'src/app/shared/popover/bad-request/bad-request.component';
|
||||
import { SuccessMessageComponent } from 'src/app/shared/popover/success-message/success-message.component';
|
||||
|
||||
@Component({
|
||||
selector: 'app-expedient-task-modal',
|
||||
@@ -184,6 +186,7 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
|
||||
this.dispatchFolder.SubjectTypes = this.selectedTypes;
|
||||
|
||||
|
||||
if(this.taskParticipants.length > 0) {
|
||||
switch (this.taskType) {
|
||||
case '0':
|
||||
@@ -198,8 +201,16 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
//SubjectTypes: [],
|
||||
|
||||
}
|
||||
console.log('this.postData', this.postData, this.taskType);
|
||||
this.taskResult = await this.processes.postDespatcho(this.postData);
|
||||
|
||||
// console.log('this.postData', this.postData, this.taskType);
|
||||
|
||||
try {
|
||||
this.taskResult = await this.processes.postDespatcho(this.postData).toPromise()
|
||||
await this.successMessage('Processo efetuado')
|
||||
} catch (error) {
|
||||
await this.badRequest('Processo não efetuado')
|
||||
}
|
||||
|
||||
console.log('this.taskResult', this.taskResult);
|
||||
|
||||
let action_despacho = {
|
||||
@@ -210,6 +221,7 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
"Note": "",
|
||||
}
|
||||
}
|
||||
|
||||
this.modalController.dismiss(action_despacho);
|
||||
break;
|
||||
|
||||
@@ -223,9 +235,17 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
DispatchFolder: this.dispatchFolder,
|
||||
AttachmentList: docs
|
||||
}
|
||||
console.log(this.postData);
|
||||
this.taskResult = await this.processes.postParecer(this.postData);
|
||||
console.log('this.taskResult', this.taskResult);
|
||||
|
||||
//console.log(this.postData);
|
||||
|
||||
try {
|
||||
this.taskResult = await this.processes.postParecer(this.postData).toPromise()
|
||||
await this.successMessage('Processo efetuado')
|
||||
} catch (error) {
|
||||
await this.badRequest('Processo não efetuado')
|
||||
}
|
||||
|
||||
// console.log('this.taskResult', this.taskResult);
|
||||
|
||||
let action_parecer = {
|
||||
"serialNumber": this.task.serialNumber,
|
||||
@@ -247,9 +267,17 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
DispatchFolder: this.dispatchFolder,
|
||||
AttachmentList: docs
|
||||
}
|
||||
console.log(this.postData);
|
||||
this.taskResult = await this.processes.postDeferimento(this.postData);
|
||||
|
||||
//console.log(this.postData);
|
||||
|
||||
try {
|
||||
this.taskResult = await this.processes.postDeferimento(this.postData).toPromise()
|
||||
await this.successMessage('Processo efetuado')
|
||||
} catch (error) {
|
||||
await this.badRequest('Processo não efetuado')
|
||||
}
|
||||
|
||||
|
||||
console.log('this.taskResult', this.taskResult);
|
||||
|
||||
let action_deferimento = {
|
||||
@@ -263,10 +291,10 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
this.modalController.dismiss(action_deferimento);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else {
|
||||
this.alertController.presentAlert("Lista de intervenientes vazia. Por favor, adicione 1 ou mais intervenientes.");
|
||||
}
|
||||
}
|
||||
else {
|
||||
this.alertController.presentAlert("Lista de intervenientes vazia. Por favor, adicione 1 ou mais intervenientes.");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -457,4 +485,39 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
|
||||
async successMessage(message?: string) {
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: SuccessMessageComponent,
|
||||
componentProps: {
|
||||
message: message || 'Processo efetuado' ,
|
||||
},
|
||||
cssClass: 'modal modal-desktop'
|
||||
});
|
||||
|
||||
modal.present()
|
||||
|
||||
setTimeout(()=>{
|
||||
modal.dismiss()
|
||||
},3000)
|
||||
|
||||
}
|
||||
|
||||
async badRequest(message?: string) {
|
||||
const modal = await this.modalController.create({
|
||||
component: BadRequestComponent,
|
||||
componentProps: {
|
||||
message: message || 'Processo não efetuado' ,
|
||||
},
|
||||
cssClass: 'modal modal-desktop'
|
||||
});
|
||||
|
||||
modal.present()
|
||||
|
||||
setTimeout(()=>{
|
||||
modal.dismiss()
|
||||
},3000)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -15,6 +15,8 @@ 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 { OptsExpedientePage } from 'src/app/shared/popover/opts-expediente/opts-expediente.page';
|
||||
import { SuccessMessageComponent } from 'src/app/shared/popover/success-message/success-message.component';
|
||||
import { BadRequestComponent } from 'src/app/shared/popover/bad-request/bad-request.component';
|
||||
|
||||
@Component({
|
||||
selector: 'app-expediente-detail',
|
||||
@@ -88,7 +90,12 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
sendExpedienteToPending(){
|
||||
this.processes.SetTaskToPending(this.serialnumber).subscribe(res=>{
|
||||
console.log(res);
|
||||
this.successMessage('Processo enviado para pendentes')
|
||||
|
||||
this.close();
|
||||
},
|
||||
(error)=>{
|
||||
this.badRequest()
|
||||
});
|
||||
}
|
||||
|
||||
@@ -305,4 +312,41 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
});
|
||||
return await popover.present();
|
||||
}
|
||||
|
||||
|
||||
|
||||
async successMessage(message?: string) {
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: SuccessMessageComponent,
|
||||
componentProps: {
|
||||
message: message || 'Processo efetuado' ,
|
||||
},
|
||||
cssClass: 'modal modal-desktop'
|
||||
});
|
||||
|
||||
modal.present()
|
||||
|
||||
setTimeout(()=>{
|
||||
modal.dismiss()
|
||||
},3000)
|
||||
|
||||
}
|
||||
|
||||
async badRequest(message?: string) {
|
||||
const modal = await this.modalController.create({
|
||||
component: BadRequestComponent,
|
||||
componentProps: {
|
||||
message: message || 'Processo não efetuado' ,
|
||||
},
|
||||
cssClass: 'modal modal-desktop'
|
||||
});
|
||||
|
||||
modal.present()
|
||||
|
||||
setTimeout(()=>{
|
||||
modal.dismiss()
|
||||
},3000)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -54,7 +54,10 @@ export class GabineteDigitalPage implements OnInit {
|
||||
showEventsToApprove = false;
|
||||
showEmptyContainer = false;
|
||||
showExpedients = false;
|
||||
<<<<<<< HEAD
|
||||
showExpedientesPr = false;
|
||||
=======
|
||||
>>>>>>> f7eaca61e7eb3f287c9ce200e1f3654d3ac0ebff
|
||||
showPedidos = false;
|
||||
showDespachos = false;
|
||||
showDespachosPr = false;
|
||||
|
||||
@@ -51,14 +51,14 @@ export class PedidoPage implements OnInit {
|
||||
this.activatedRoute.queryParams.subscribe(params => {
|
||||
if(params["serialNumber"]) {
|
||||
this.serialnumber = params["serialNumber"];
|
||||
console.log(params["serialNumber"]);
|
||||
// console.log(params["serialNumber"]);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.profile = "mdgpr";
|
||||
console.log(this.serialnumber);
|
||||
// console.log(this.serialnumber);
|
||||
|
||||
this.LoadTaskDetail(this.serialnumber);
|
||||
}
|
||||
@@ -66,7 +66,7 @@ export class PedidoPage implements OnInit {
|
||||
goBack(){
|
||||
let navigationExtras: NavigationExtras = {
|
||||
queryParams: {
|
||||
"pedidos": true,
|
||||
"pedidos": true,
|
||||
}
|
||||
};
|
||||
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
||||
@@ -147,7 +147,7 @@ export class PedidoPage implements OnInit {
|
||||
getDocumentDetails(forlderId:string, applicationId:string){
|
||||
this.processes.GetDocumentDetails(forlderId,applicationId).subscribe(res=>{
|
||||
this.attachments = res.Documents;
|
||||
console.log(res['Documents']);
|
||||
// console.log(res['Documents']);
|
||||
console.log(this.attachments);
|
||||
})
|
||||
}
|
||||
@@ -165,7 +165,8 @@ export class PedidoPage implements OnInit {
|
||||
this.menu.open();
|
||||
this.modalController.dismiss();
|
||||
}
|
||||
repreciar(note:string, documents:any){
|
||||
|
||||
repreciar(note:string, documents:any) {
|
||||
let body = {
|
||||
"serialNumber": this.serialnumber,
|
||||
"action": "Reapreciação",
|
||||
@@ -179,7 +180,7 @@ export class PedidoPage implements OnInit {
|
||||
this.close();
|
||||
}
|
||||
|
||||
arquivar(note:string, documents:any){
|
||||
arquivar(note:string, documents:any) {
|
||||
let body = {
|
||||
"serialNumber": this.serialnumber,
|
||||
"action": "Arquivo",
|
||||
@@ -368,13 +369,28 @@ export class PedidoPage implements OnInit {
|
||||
await modal.present();
|
||||
|
||||
modal.onDidDismiss().then(res => {
|
||||
console.log(res);
|
||||
|
||||
|
||||
const DocumentToSave = res.data.documents.map((e) => {
|
||||
return {
|
||||
ApplicationId: e.ApplicationType,
|
||||
SourceId: e.Id,
|
||||
}
|
||||
});
|
||||
|
||||
let docs = {
|
||||
ProcessInstanceID: "",
|
||||
Attachments: DocumentToSave,
|
||||
}
|
||||
|
||||
|
||||
if(res.data){
|
||||
if(actionName == 'Solicitar Reapreciação'){
|
||||
this.repreciar(res.data.note,res.data.documents);
|
||||
if(actionName == 'Solicitar Reapreciação') {
|
||||
|
||||
this.repreciar(res.data.note, docs);
|
||||
}
|
||||
else if(actionName == 'Arquivar'){
|
||||
this.arquivar(res.data.note,res.data.documents);
|
||||
this.arquivar(res.data.note, docs);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -46,6 +46,7 @@ export class PendentesPage implements OnInit {
|
||||
console.log(res);
|
||||
});
|
||||
}
|
||||
|
||||
segmentChanged(ev: any) {
|
||||
this.LoadList();
|
||||
}
|
||||
|
||||
@@ -203,9 +203,7 @@ export class EventsService {
|
||||
headers: this.headers,
|
||||
params: params
|
||||
};
|
||||
return this.http.post<any>(`${geturl}`, body, options).toPromise().then(res =>{
|
||||
console.log(res);
|
||||
});
|
||||
return this.http.post<any>(`${geturl}`, body, options)
|
||||
}
|
||||
createTaskEvent(folderId:any, body:any, sharedagenda:string, serialNumber:any, applicationID:any){
|
||||
const geturl = environment.apiURL + 'calendar/' + ((sharedagenda != '') ? sharedagenda : 'CreateEventExpediente')+'/dispatch';
|
||||
@@ -219,9 +217,7 @@ export class EventsService {
|
||||
headers: this.headers,
|
||||
params: params
|
||||
};
|
||||
return this.http.post<any>(`${geturl}`, body, options).toPromise().then(res =>{
|
||||
console.log(res);
|
||||
});
|
||||
return this.http.post<any>(`${geturl}`, body, options)
|
||||
}
|
||||
|
||||
postEventToApproveEdit(body: EventToApproveEdit) {
|
||||
|
||||
@@ -180,7 +180,7 @@ export class ProcessesService {
|
||||
let options = {
|
||||
headers: this.headers,
|
||||
};
|
||||
return this.http.post<any>(`${geturl}`, body, options).toPromise();
|
||||
return this.http.post<any>(`${geturl}`, body, options)
|
||||
}
|
||||
|
||||
postParecer(body:any){
|
||||
@@ -188,7 +188,7 @@ export class ProcessesService {
|
||||
let options = {
|
||||
headers: this.headers,
|
||||
};
|
||||
return this.http.post<any>(`${geturl}`, body, options).toPromise();
|
||||
return this.http.post<any>(`${geturl}`, body, options)
|
||||
}
|
||||
|
||||
postDeferimento(body:any){
|
||||
@@ -196,7 +196,7 @@ export class ProcessesService {
|
||||
let options = {
|
||||
headers: this.headers,
|
||||
};
|
||||
return this.http.post<any>(`${geturl}`, body, options).toPromise();
|
||||
return this.http.post<any>(`${geturl}`, body, options)
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -9,6 +9,8 @@ import { EmendMessageModalPage } from 'src/app/pages/agenda/emend-message-modal/
|
||||
import { EventActionsPopoverPage } from 'src/app/pages/agenda/event-actions-popover/event-actions-popover.page';
|
||||
import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
|
||||
import { EditEventToApproveComponent } from '../../gabinete-digital/edit-event-to-approve/edit-event.page';
|
||||
import { BadRequestComponent } from '../../popover/bad-request/bad-request.component';
|
||||
import { SuccessMessageComponent } from '../../popover/success-message/success-message.component';
|
||||
|
||||
|
||||
@Component({
|
||||
@@ -52,35 +54,43 @@ export class ApproveEventComponent implements OnInit {
|
||||
ngOnInit() {
|
||||
this.getTask();
|
||||
this.getAttachments();
|
||||
console.log(this.showAside);
|
||||
|
||||
// console.log(this.showAside);
|
||||
}
|
||||
|
||||
notImplemented(){
|
||||
notImplemented() {
|
||||
this.alertService.presentAlert('Funcionalidade em desenvolvimento');
|
||||
}
|
||||
|
||||
close(){
|
||||
close() {
|
||||
/* this.router.navigate(['/home/gabinete-digital/event-list']); */
|
||||
this.closeEventToApprove.emit();
|
||||
this.modalController.dismiss();
|
||||
}
|
||||
|
||||
getTask(){
|
||||
getTask() {
|
||||
this.processes.GetTask(this.serialNumber).subscribe(res => {
|
||||
console.log(res);
|
||||
// console.log(res);
|
||||
this.loadedEvent = res;
|
||||
this.today = new Date(res.workflowInstanceDataFields.StartDate);
|
||||
console.log(new Date(this.today));
|
||||
// console.log(new Date(this.today));
|
||||
this.customDate = this.days[this.today.getDay()]+ ", " + this.today.getDate() +" de " + ( this.months[this.today.getMonth()]);
|
||||
|
||||
})
|
||||
}
|
||||
approveTask(serialNumber:string){
|
||||
|
||||
async approveTask(serialNumber:string){
|
||||
let body = { "serialNumber": serialNumber, "action": "Aprovar" }
|
||||
console.log(body);
|
||||
this.processes.PostTaskAction(body);
|
||||
this.modalController.dismiss(serialNumber);
|
||||
|
||||
try {
|
||||
this.processes.PostTaskAction(body);
|
||||
this.modalController.dismiss(serialNumber);
|
||||
this.successMessage()
|
||||
} catch (error) {
|
||||
this.badRequest()
|
||||
}
|
||||
|
||||
/* this.approveEventDismiss.emit({
|
||||
"serialNumber": serialNumber,
|
||||
"action": "Aprovar",
|
||||
@@ -92,20 +102,33 @@ export class ApproveEventComponent implements OnInit {
|
||||
}); */
|
||||
}
|
||||
|
||||
emendTask(serialNumber:string){
|
||||
async emendTask(serialNumber:string){
|
||||
/* console.log('Emendar'); */
|
||||
this.menu.close();
|
||||
this.openEmendMessageModal(serialNumber);
|
||||
this.modalController.dismiss(null);
|
||||
|
||||
try {
|
||||
await this.openEmendMessageModal(serialNumber);
|
||||
this.modalController.dismiss(null);
|
||||
} catch (error) {
|
||||
this.badRequest()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
rejectTask(serialNumber:string){
|
||||
async rejectTask(serialNumber:string){
|
||||
|
||||
let body = { "serialNumber": serialNumber, "action": "Rejeitar" }
|
||||
console.log(body);
|
||||
this.processes.PostTaskAction(body);
|
||||
this.router.navigate(['/home/gabinete-digital/event-list']);
|
||||
this.modalController.dismiss(null);
|
||||
|
||||
try {
|
||||
await this.processes.PostTaskAction(body);
|
||||
this.router.navigate(['/home/gabinete-digital/event-list']);
|
||||
this.modalController.dismiss(null);
|
||||
this.successMessage()
|
||||
} catch (error) {
|
||||
this.badRequest()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
async getAttachments(){
|
||||
@@ -136,6 +159,7 @@ export class ApproveEventComponent implements OnInit {
|
||||
openMenu() {
|
||||
this.menu.open();
|
||||
}
|
||||
|
||||
async openEmendMessageModal(serialNumber:string) {
|
||||
const modal = await this.modalController.create({
|
||||
component: EmendMessageModalPage,
|
||||
@@ -200,4 +224,38 @@ export class ApproveEventComponent implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
|
||||
async successMessage(message?: string) {
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: SuccessMessageComponent,
|
||||
componentProps: {
|
||||
message: message || 'Processo efetuado' ,
|
||||
},
|
||||
cssClass: 'modal modal-desktop'
|
||||
});
|
||||
|
||||
modal.present()
|
||||
|
||||
setTimeout(()=>{
|
||||
modal.dismiss()
|
||||
},3000)
|
||||
|
||||
}
|
||||
|
||||
async badRequest() {
|
||||
const modal = await this.modalController.create({
|
||||
component: BadRequestComponent,
|
||||
componentProps: {
|
||||
message: 'hello',
|
||||
},
|
||||
cssClass: 'modal modal-desktop'
|
||||
});
|
||||
|
||||
modal.present()
|
||||
|
||||
setTimeout(()=>{
|
||||
modal.dismiss()
|
||||
},1000)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,6 +9,8 @@ import { removeDuplicate } from 'src/plugin/removeDuplicate.js'
|
||||
import { SearchPage } from 'src/app/pages/search/search.page';
|
||||
import { SearchDocument } from "src/app/models/search-document";
|
||||
import { EventAttachment } from 'src/app/models/attachment.model';
|
||||
import { BadRequestComponent } from '../../popover/bad-request/bad-request.component';
|
||||
import { SuccessMessageComponent } from '../../popover/success-message/success-message.component';
|
||||
@Component({
|
||||
selector: 'app-new-event',
|
||||
templateUrl: './new-event.component.html',
|
||||
@@ -200,6 +202,11 @@ export class NewEventPage implements OnInit {
|
||||
this.afterSave();
|
||||
}
|
||||
|
||||
this.successMessage()
|
||||
|
||||
},
|
||||
error => {
|
||||
this.badRequest()
|
||||
});
|
||||
}
|
||||
else if(this.profile=='pr') {
|
||||
@@ -236,14 +243,11 @@ export class NewEventPage implements OnInit {
|
||||
this.afterSave();
|
||||
}
|
||||
|
||||
this.successMessage()
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
afterSave(){
|
||||
this.deleteTemporaryData();
|
||||
|
||||
@@ -255,12 +259,10 @@ export class NewEventPage implements OnInit {
|
||||
}
|
||||
|
||||
removeAttachment(index: number){
|
||||
|
||||
this.documents = this.documents.filter( (e, i) => index != i);
|
||||
|
||||
}
|
||||
|
||||
|
||||
async addParticipants() {
|
||||
|
||||
this.saveTemporaryData();
|
||||
@@ -283,8 +285,7 @@ export class NewEventPage implements OnInit {
|
||||
this.clearContact.emit();
|
||||
}
|
||||
|
||||
saveTemporaryData(){
|
||||
|
||||
saveTemporaryData() {
|
||||
window['temp.path:/home/agenda/new-event.component.ts'] = {
|
||||
postEvent: this.postEvent,
|
||||
eventBody: this.eventBody,
|
||||
@@ -292,9 +293,7 @@ export class NewEventPage implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
restoreTemporaryData(): boolean {
|
||||
|
||||
const restoredData = window['temp.path:/home/agenda/new-event.component.ts']
|
||||
|
||||
if(JSON.stringify(restoredData) != "{}" && undefined != restoredData) {
|
||||
@@ -306,11 +305,44 @@ export class NewEventPage implements OnInit {
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
deleteTemporaryData(){
|
||||
window['temp.path:/home/agenda/new-event.component.ts'] = {}
|
||||
}
|
||||
|
||||
async successMessage(message?: string) {
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: SuccessMessageComponent,
|
||||
componentProps: {
|
||||
message: message || 'Processo efetuado' ,
|
||||
},
|
||||
cssClass: 'modal modal-desktop'
|
||||
});
|
||||
|
||||
modal.present()
|
||||
|
||||
setTimeout(()=>{
|
||||
modal.dismiss()
|
||||
},3000)
|
||||
|
||||
}
|
||||
|
||||
async badRequest() {
|
||||
const modal = await this.modalController.create({
|
||||
component: BadRequestComponent,
|
||||
componentProps: {
|
||||
message: 'Processo não realizado com sucesso',
|
||||
},
|
||||
cssClass: 'modal modal-desktop'
|
||||
});
|
||||
|
||||
modal.present()
|
||||
|
||||
setTimeout(()=>{
|
||||
modal.dismiss()
|
||||
},3000)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -91,10 +91,11 @@ export class DespachosPage implements OnInit {
|
||||
}
|
||||
|
||||
async LoadList(){
|
||||
this.despachoList = new Array();
|
||||
|
||||
|
||||
let result = await this.processes.GetTasksList("Despacho", false).toPromise();
|
||||
//let despachos = result.reverse().filter(data => data.activityInstanceName == "Despacho (Paralelo)");
|
||||
this.despachoList = new Array();
|
||||
|
||||
console.log(result);
|
||||
|
||||
|
||||
@@ -9,7 +9,8 @@ import { AttachmentsService } from 'src/app/services/attachments.service';
|
||||
import { EventsService } from 'src/app/services/events.service';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { Event, EventToApproveEdit } from '../../../models/event.model';
|
||||
|
||||
import { BadRequestComponent } from '../../popover/bad-request/bad-request.component';
|
||||
import { SuccessMessageComponent } from '../../popover/success-message/success-message.component';
|
||||
|
||||
@Component({
|
||||
selector: 'app-edit-event',
|
||||
@@ -21,7 +22,6 @@ export class EditEventToApproveComponent implements OnInit {
|
||||
serialNumber: string
|
||||
loadedAttachments: Attachment[]= []
|
||||
|
||||
|
||||
eventProcess = {
|
||||
serialNumber: "",
|
||||
taskStartDate: "",
|
||||
@@ -232,8 +232,6 @@ export class EditEventToApproveComponent implements OnInit {
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
|
||||
const event: any = {
|
||||
Agenda: this.eventProcess.workflowInstanceDataFields.Agenda,
|
||||
Body: this.eventProcess.workflowInstanceDataFields.Body,
|
||||
@@ -253,16 +251,28 @@ export class EditEventToApproveComponent implements OnInit {
|
||||
ReviewerComments: ''
|
||||
}
|
||||
|
||||
this.eventsService.postEventToApproveEdit(event).subscribe()
|
||||
this.eventsService.postEventToApproveEdit(event).subscribe(()=>{
|
||||
this.successMessage()
|
||||
}, error =>{
|
||||
this.badRequest()
|
||||
})
|
||||
|
||||
|
||||
this.loadedAttachments.forEach((document:any)=>{
|
||||
if(document['action'] == 'add') {
|
||||
delete document.action
|
||||
this.attachmentsService.setEventAttachmentById(document).subscribe(()=>{});
|
||||
this.attachmentsService.setEventAttachmentById(document).subscribe(()=>{
|
||||
//this.successMessage()
|
||||
}, error =>{
|
||||
this.badRequest()
|
||||
});
|
||||
} else if(document['action'] == 'delete') {
|
||||
delete document.action
|
||||
this.attachmentsService.deleteEventAttachmentById(document.Id).subscribe( res=>{})
|
||||
this.attachmentsService.deleteEventAttachmentById(document.Id).subscribe( res=>{
|
||||
//this.successMessage()
|
||||
}, error =>{
|
||||
this.badRequest()
|
||||
})
|
||||
}
|
||||
|
||||
})
|
||||
@@ -396,4 +406,38 @@ export class EditEventToApproveComponent implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
async successMessage(message?: string) {
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: SuccessMessageComponent,
|
||||
componentProps: {
|
||||
message: message || 'Processo efetuado' ,
|
||||
},
|
||||
cssClass: 'modal modal-desktop'
|
||||
});
|
||||
|
||||
modal.present()
|
||||
|
||||
setTimeout(()=>{
|
||||
modal.dismiss()
|
||||
},3000)
|
||||
|
||||
}
|
||||
|
||||
async badRequest() {
|
||||
const modal = await this.modalController.create({
|
||||
component: BadRequestComponent,
|
||||
componentProps: {
|
||||
message: 'hello',
|
||||
},
|
||||
cssClass: 'modal modal-desktop'
|
||||
});
|
||||
|
||||
modal.present()
|
||||
|
||||
setTimeout(()=>{
|
||||
modal.dismiss()
|
||||
},1000)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -44,11 +44,11 @@ export class ExpedientePage implements OnInit {
|
||||
private alertService: AlertService) {
|
||||
//this.serialnumber = this.navParams.get('serialNumber');
|
||||
//this.profile = this.navParams.get('profile');
|
||||
}
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.profile = "mdgpr";
|
||||
console.log(this.serialNumber);
|
||||
// console.log(this.serialNumber);
|
||||
|
||||
this.activateRoute.paramMap.subscribe(paramMap => {
|
||||
if (!paramMap.has('SerialNumber')) {
|
||||
@@ -61,11 +61,11 @@ export class ExpedientePage implements OnInit {
|
||||
this.LoadTaskDetail(this.serialNumber);
|
||||
this.LoadRelatedEvents(this.serialNumber);
|
||||
}
|
||||
|
||||
openExpedientListPage(){
|
||||
this.openExpedientList.emit();
|
||||
}
|
||||
|
||||
|
||||
async LoadTaskDetail(serial: string) {
|
||||
this.processes.GetTask(serial).subscribe(res => {
|
||||
this.task = {
|
||||
@@ -99,7 +99,7 @@ export class ExpedientePage implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
viewDocument(){
|
||||
viewDocument() {
|
||||
const url: string = this.task.DocumentURL.replace("webTRIX.Viewer","webTRIX.Viewer.Branch1");
|
||||
const browser = this.iab.create(url,"_blank");
|
||||
browser.show();
|
||||
@@ -154,4 +154,5 @@ export class ExpedientePage implements OnInit {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ export class ExpedientsPage implements OnInit {
|
||||
goToExpediente(serialNumber:any){
|
||||
let navigationExtras: NavigationExtras = {
|
||||
queryParams: {
|
||||
"serialNumber": serialNumber,
|
||||
"serialNumber": serialNumber,
|
||||
}
|
||||
};
|
||||
this.router.navigate(['/home/gabinete-digital/expediente/expediente-detail'], navigationExtras);
|
||||
|
||||
@@ -93,7 +93,7 @@ export class PedidosPage implements OnInit {
|
||||
|
||||
});
|
||||
}
|
||||
else if(this.segment == 'deferimento'){
|
||||
else if(this.segment == 'deferimento') {
|
||||
this.taskType = "Pedido de Deferimento";
|
||||
this.processes.GetTasksList("Pedido de Deferimento", false).subscribe(result => {
|
||||
this.taskslist = result;
|
||||
|
||||
@@ -135,8 +135,8 @@ export class PendentesPage implements OnInit {
|
||||
goToDespacho(serialNumber:any){
|
||||
let navigationExtras: NavigationExtras = {
|
||||
queryParams: {
|
||||
"serialNumber": serialNumber,
|
||||
}
|
||||
"serialNumber": serialNumber,
|
||||
}
|
||||
};
|
||||
this.router.navigate(['/home/gabinete-digital/despachos/despacho'], navigationExtras);
|
||||
}
|
||||
@@ -144,8 +144,8 @@ export class PendentesPage implements OnInit {
|
||||
goToPedido(serialNumber:any){
|
||||
let navigationExtras: NavigationExtras = {
|
||||
queryParams: {
|
||||
"serialNumber": serialNumber,
|
||||
}
|
||||
"serialNumber": serialNumber,
|
||||
}
|
||||
};
|
||||
this.router.navigate(['/home/gabinete-digital/pedidos/pedido'], navigationExtras);
|
||||
}
|
||||
@@ -153,7 +153,7 @@ export class PendentesPage implements OnInit {
|
||||
goToExpediente(serialNumber:any){
|
||||
let navigationExtras: NavigationExtras = {
|
||||
queryParams: {
|
||||
"serialNumber": serialNumber,
|
||||
"serialNumber": serialNumber,
|
||||
}
|
||||
};
|
||||
this.router.navigate(['/home/gabinete-digital/expediente/expediente-detail'], navigationExtras);
|
||||
|
||||
@@ -32,137 +32,138 @@ constructor(
|
||||
this.segment = 'validar'
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
//Inicializar segment
|
||||
this.segment = 'assinados';
|
||||
this.LoadList();
|
||||
}
|
||||
segmentChanged(ev: any) {
|
||||
this.LoadList();
|
||||
}
|
||||
|
||||
notImplemented(){
|
||||
this.alertService.presentAlert('Funcionalidade em desenvolvimento');
|
||||
}
|
||||
|
||||
async LoadList(){
|
||||
|
||||
|
||||
let diplomas = await this.processes.GetTasksList("Despacho do Presidente da República", false).toPromise();
|
||||
this.diplomasList = new Array();
|
||||
|
||||
console.log(diplomas);
|
||||
switch (this.segment) {
|
||||
case 'validar':
|
||||
let diplomasValidar = diplomas.reverse().filter(data => data.workflowInstanceDataFields.Status == "Revising");
|
||||
console.log(diplomasValidar);
|
||||
diplomasValidar.forEach(element => {
|
||||
let DocId = element.workflowInstanceDataFields.FolderID;
|
||||
let ApplicationId = element.workflowInstanceDataFields.ApplicationId;
|
||||
this.processes.GetDocumentDetails(DocId, '361').subscribe(res=>{
|
||||
this.totalDocs = res.DocumentsTotal;
|
||||
console.log(res.DocumentsTotal);
|
||||
let task = {
|
||||
"SerialNumber": element.serialNumber,
|
||||
"Folio": element.workflowInstanceDataFields.Subject,
|
||||
"Senders": element.workflowInstanceDataFields.Sender,
|
||||
"CreateDate": formatDate(new Date(element.taskStartDate), 'yyyy-MM-dd HH:mm', 'pt'),
|
||||
"DocumentURL": element.workflowInstanceDataFields.ViewerRequest,
|
||||
"Remetente": element.workflowInstanceDataFields.Remetente,
|
||||
"DocumentsQty": this.totalDocs,
|
||||
"DocId": element.workflowInstanceDataFields.DocId,
|
||||
"WorkflowName": element.workflowDisplayName,
|
||||
"activityInstanceName": element.activityInstanceName,
|
||||
}
|
||||
this.diplomasList.push(task);
|
||||
},
|
||||
(error)=>{
|
||||
let task = {
|
||||
"SerialNumber": element.serialNumber,
|
||||
"Folio": element.workflowInstanceDataFields.Subject,
|
||||
"Senders": element.workflowInstanceDataFields.Sender,
|
||||
"CreateDate": formatDate(new Date(element.taskStartDate), 'yyyy-MM-dd HH:mm', 'pt'),
|
||||
"DocumentURL": element.workflowInstanceDataFields.ViewerRequest,
|
||||
"Remetente": element.workflowInstanceDataFields.Remetente,
|
||||
"DocumentsQty": 0,
|
||||
"DocId": element.workflowInstanceDataFields.DocId,
|
||||
"WorkflowName": element.workflowDisplayName,
|
||||
"activityInstanceName": element.activityInstanceName,
|
||||
}
|
||||
this.diplomasList.push(task);
|
||||
});
|
||||
});
|
||||
this.showLoader = false;
|
||||
break;
|
||||
case 'assinados':
|
||||
let diplomasassinado = diplomas.reverse().filter(data => data.workflowInstanceDataFields.Status == "Signed");
|
||||
console.log('Assinados');
|
||||
|
||||
diplomasassinado.forEach(element => {
|
||||
let DocId = element.workflowInstanceDataFields.FolderID;
|
||||
let ApplicationId = element.workflowInstanceDataFields.ApplicationId;
|
||||
this.processes.GetDocumentDetails(DocId, '361').subscribe(res=>{
|
||||
this.totalDocs = res.DocumentsTotal;
|
||||
console.log(res.DocumentsTotal);
|
||||
let task = {
|
||||
"SerialNumber": element.serialNumber,
|
||||
"Folio": element.workflowInstanceDataFields.Subject,
|
||||
"Senders": element.workflowInstanceDataFields.Sender,
|
||||
"CreateDate": formatDate(new Date(element.taskStartDate), 'yyyy-MM-dd HH:mm', 'pt'),
|
||||
"DocumentURL": element.workflowInstanceDataFields.ViewerRequest,
|
||||
"Remetente": element.workflowInstanceDataFields.Remetente,
|
||||
"DocumentsQty": this.totalDocs,
|
||||
"DocId": element.workflowInstanceDataFields.DocId,
|
||||
"WorkflowName": element.workflowDisplayName,
|
||||
"activityInstanceName": element.activityInstanceName,
|
||||
}
|
||||
this.diplomasList.push(task);
|
||||
},
|
||||
(error)=>{
|
||||
let task = {
|
||||
"SerialNumber": element.serialNumber,
|
||||
"Folio": element.workflowInstanceDataFields.Subject,
|
||||
"Senders": element.workflowInstanceDataFields.Sender,
|
||||
"CreateDate": formatDate(new Date(element.taskStartDate), 'yyyy-MM-dd HH:mm', 'pt'),
|
||||
"DocumentURL": element.workflowInstanceDataFields.ViewerRequest,
|
||||
"Remetente": element.workflowInstanceDataFields.Remetente,
|
||||
"DocumentsQty": 0,
|
||||
"DocId": element.workflowInstanceDataFields.DocId,
|
||||
"WorkflowName": element.workflowDisplayName,
|
||||
"activityInstanceName": element.activityInstanceName,
|
||||
}
|
||||
this.diplomasList.push(task);
|
||||
});
|
||||
});
|
||||
this.showLoader = false;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
doRefresh(event) {
|
||||
this.LoadList();
|
||||
setTimeout(() => {
|
||||
//event.target.complete();
|
||||
}, 2000);
|
||||
}
|
||||
|
||||
async viewPedidoDetail(serialNumber:any) {
|
||||
console.log(this.profile);
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: DiplomaPage,
|
||||
componentProps:{
|
||||
enterAnimation: "",
|
||||
serialNumber: serialNumber,
|
||||
profile: this.profile,
|
||||
},
|
||||
cssClass: 'modal modal-desktop',
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then((res)=>{
|
||||
console.log('refresh list');
|
||||
ngOnInit() {
|
||||
//Inicializar segment
|
||||
this.segment = 'assinados';
|
||||
this.LoadList();
|
||||
});
|
||||
}
|
||||
}
|
||||
segmentChanged(ev: any) {
|
||||
this.LoadList();
|
||||
}
|
||||
|
||||
notImplemented(){
|
||||
this.alertService.presentAlert('Funcionalidade em desenvolvimento');
|
||||
}
|
||||
|
||||
async LoadList(){
|
||||
|
||||
|
||||
let diplomas = await this.processes.GetTasksList("Despacho do Presidente da República", false).toPromise();
|
||||
this.diplomasList = new Array();
|
||||
|
||||
console.log(diplomas);
|
||||
switch (this.segment) {
|
||||
case 'validar':
|
||||
let diplomasValidar = diplomas.reverse().filter(data => data.workflowInstanceDataFields.Status == "Revising");
|
||||
console.log(diplomasValidar);
|
||||
diplomasValidar.forEach(element => {
|
||||
let DocId = element.workflowInstanceDataFields.FolderID;
|
||||
let ApplicationId = element.workflowInstanceDataFields.ApplicationId;
|
||||
this.processes.GetDocumentDetails(DocId, '361').subscribe(res=>{
|
||||
this.totalDocs = res.DocumentsTotal;
|
||||
console.log(res.DocumentsTotal);
|
||||
let task = {
|
||||
"SerialNumber": element.serialNumber,
|
||||
"Folio": element.workflowInstanceDataFields.Subject,
|
||||
"Senders": element.workflowInstanceDataFields.Sender,
|
||||
"CreateDate": formatDate(new Date(element.taskStartDate), 'yyyy-MM-dd HH:mm', 'pt'),
|
||||
"DocumentURL": element.workflowInstanceDataFields.ViewerRequest,
|
||||
"Remetente": element.workflowInstanceDataFields.Remetente,
|
||||
"DocumentsQty": this.totalDocs,
|
||||
"DocId": element.workflowInstanceDataFields.DocId,
|
||||
"WorkflowName": element.workflowDisplayName,
|
||||
"activityInstanceName": element.activityInstanceName,
|
||||
}
|
||||
this.diplomasList.push(task);
|
||||
},
|
||||
(error)=>{
|
||||
let task = {
|
||||
"SerialNumber": element.serialNumber,
|
||||
"Folio": element.workflowInstanceDataFields.Subject,
|
||||
"Senders": element.workflowInstanceDataFields.Sender,
|
||||
"CreateDate": formatDate(new Date(element.taskStartDate), 'yyyy-MM-dd HH:mm', 'pt'),
|
||||
"DocumentURL": element.workflowInstanceDataFields.ViewerRequest,
|
||||
"Remetente": element.workflowInstanceDataFields.Remetente,
|
||||
"DocumentsQty": 0,
|
||||
"DocId": element.workflowInstanceDataFields.DocId,
|
||||
"WorkflowName": element.workflowDisplayName,
|
||||
"activityInstanceName": element.activityInstanceName,
|
||||
}
|
||||
this.diplomasList.push(task);
|
||||
});
|
||||
});
|
||||
this.showLoader = false;
|
||||
break;
|
||||
case 'assinados':
|
||||
let diplomasassinado = diplomas.reverse().filter(data => data.workflowInstanceDataFields.Status == "Signed");
|
||||
console.log('Assinados');
|
||||
|
||||
diplomasassinado.forEach(element => {
|
||||
let DocId = element.workflowInstanceDataFields.FolderID;
|
||||
let ApplicationId = element.workflowInstanceDataFields.ApplicationId;
|
||||
this.processes.GetDocumentDetails(DocId, '361').subscribe(res=>{
|
||||
this.totalDocs = res.DocumentsTotal;
|
||||
console.log(res.DocumentsTotal);
|
||||
let task = {
|
||||
"SerialNumber": element.serialNumber,
|
||||
"Folio": element.workflowInstanceDataFields.Subject,
|
||||
"Senders": element.workflowInstanceDataFields.Sender,
|
||||
"CreateDate": formatDate(new Date(element.taskStartDate), 'yyyy-MM-dd HH:mm', 'pt'),
|
||||
"DocumentURL": element.workflowInstanceDataFields.ViewerRequest,
|
||||
"Remetente": element.workflowInstanceDataFields.Remetente,
|
||||
"DocumentsQty": this.totalDocs,
|
||||
"DocId": element.workflowInstanceDataFields.DocId,
|
||||
"WorkflowName": element.workflowDisplayName,
|
||||
"activityInstanceName": element.activityInstanceName,
|
||||
}
|
||||
this.diplomasList.push(task);
|
||||
},
|
||||
(error)=>{
|
||||
let task = {
|
||||
"SerialNumber": element.serialNumber,
|
||||
"Folio": element.workflowInstanceDataFields.Subject,
|
||||
"Senders": element.workflowInstanceDataFields.Sender,
|
||||
"CreateDate": formatDate(new Date(element.taskStartDate), 'yyyy-MM-dd HH:mm', 'pt'),
|
||||
"DocumentURL": element.workflowInstanceDataFields.ViewerRequest,
|
||||
"Remetente": element.workflowInstanceDataFields.Remetente,
|
||||
"DocumentsQty": 0,
|
||||
"DocId": element.workflowInstanceDataFields.DocId,
|
||||
"WorkflowName": element.workflowDisplayName,
|
||||
"activityInstanceName": element.activityInstanceName,
|
||||
}
|
||||
this.diplomasList.push(task);
|
||||
});
|
||||
});
|
||||
this.showLoader = false;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
doRefresh(event) {
|
||||
this.LoadList();
|
||||
setTimeout(() => {
|
||||
//event.target.complete();
|
||||
}, 2000);
|
||||
}
|
||||
|
||||
async viewPedidoDetail(serialNumber:any) {
|
||||
console.log(this.profile);
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: DiplomaPage,
|
||||
componentProps:{
|
||||
enterAnimation: "",
|
||||
serialNumber: serialNumber,
|
||||
profile: this.profile,
|
||||
},
|
||||
cssClass: 'modal modal-desktop',
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then((res)=>{
|
||||
console.log('refresh list');
|
||||
this.LoadList();
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
|
||||
<div class="main-content">
|
||||
<p class="message">
|
||||
{{ message }}
|
||||
</p>
|
||||
|
||||
</div>
|
||||
@@ -0,0 +1,16 @@
|
||||
:host{
|
||||
text-align: center;
|
||||
align-items: center;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
background-image: url("/assets/background/background-circle-negative.svg");
|
||||
background-size: 686px 674px;
|
||||
background-position: center;
|
||||
background-position-y: 0px;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.message {
|
||||
padding-top: 150px;
|
||||
font-size: 16pt;
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { BadRequestComponent } from './bad-request.component';
|
||||
|
||||
describe('BadRequestComponent', () => {
|
||||
let component: BadRequestComponent;
|
||||
let fixture: ComponentFixture<BadRequestComponent>;
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ BadRequestComponent ],
|
||||
imports: [IonicModule.forRoot()]
|
||||
}).compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(BadRequestComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
}));
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,20 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { NavParams } from '@ionic/angular';
|
||||
|
||||
@Component({
|
||||
selector: 'app-bad-request',
|
||||
templateUrl: './bad-request.component.html',
|
||||
styleUrls: ['./bad-request.component.scss'],
|
||||
})
|
||||
export class BadRequestComponent implements OnInit {
|
||||
|
||||
message: string
|
||||
|
||||
constructor(private navParams: NavParams) {
|
||||
|
||||
this.message = this.navParams.get('message');
|
||||
}
|
||||
|
||||
ngOnInit() {}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
|
||||
<div class="main-content">
|
||||
<p class="message">
|
||||
{{ message }}
|
||||
</p>
|
||||
|
||||
</div>
|
||||
@@ -0,0 +1,16 @@
|
||||
:host{
|
||||
text-align: center;
|
||||
align-items: center;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
background-image: url("/assets/background/background-circle-check.svg");
|
||||
background-size: 686px 674px;
|
||||
background-position: center;
|
||||
background-position-y: 0px;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.message {
|
||||
padding-top: 150px;
|
||||
font-size: 16pt;
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { SuccessMessageComponent } from './success-message.component';
|
||||
|
||||
describe('SuccessMessageComponent', () => {
|
||||
let component: SuccessMessageComponent;
|
||||
let fixture: ComponentFixture<SuccessMessageComponent>;
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ SuccessMessageComponent ],
|
||||
imports: [IonicModule.forRoot()]
|
||||
}).compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(SuccessMessageComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
}));
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,20 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { NavParams } from '@ionic/angular';
|
||||
|
||||
@Component({
|
||||
selector: 'app-success-message',
|
||||
templateUrl: './success-message.component.html',
|
||||
styleUrls: ['./success-message.component.scss'],
|
||||
})
|
||||
export class SuccessMessageComponent implements OnInit {
|
||||
|
||||
message: string
|
||||
|
||||
constructor(private navParams: NavParams) {
|
||||
|
||||
this.message = this.navParams.get('message');
|
||||
}
|
||||
|
||||
ngOnInit() {}
|
||||
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 11 KiB |
@@ -0,0 +1,6 @@
|
||||
<svg width="550" height="529" viewBox="0 0 550 529" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<ellipse cx="275" cy="264.5" rx="275" ry="264.5" fill="#F8FCFF"/>
|
||||
<ellipse cx="272.074" cy="265.748" rx="237.804" ry="231.645" fill="#F0F9FF"/>
|
||||
<path d="M478.951 267.827C478.951 380.832 386.891 472.44 273.328 472.44C159.766 472.44 67.7052 380.832 67.7052 267.827C67.7052 154.822 159.766 63.2138 273.328 63.2138C386.891 63.2138 478.951 154.822 478.951 267.827Z" fill="#E1F4FF"/>
|
||||
<path d="M297 176C279.323 176 265 190.323 265 208C265 225.677 279.323 240 297 240C314.677 240 329 225.677 329 208C329 190.323 314.677 176 297 176ZM297 233.806C282.742 233.806 271.194 222.258 271.194 208C271.194 193.742 282.742 182.194 297 182.194C311.258 182.194 322.806 193.742 322.806 208C322.806 222.258 311.258 233.806 297 233.806ZM310.135 199.974L302.11 208L310.135 216.026C310.742 216.632 310.742 217.613 310.135 218.219L307.219 221.135C306.613 221.742 305.632 221.742 305.026 221.135L297 213.11L288.974 221.135C288.368 221.742 287.387 221.742 286.781 221.135L283.865 218.219C283.258 217.613 283.258 216.632 283.865 216.026L291.89 208L283.865 199.974C283.258 199.368 283.258 198.387 283.865 197.781L286.781 194.865C287.387 194.258 288.368 194.258 288.974 194.865L297 202.89L305.026 194.865C305.632 194.258 306.613 194.258 307.219 194.865L310.135 197.781C310.742 198.387 310.742 199.368 310.135 199.974V199.974Z" fill="#C80B0B"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.4 KiB |
@@ -0,0 +1,5 @@
|
||||
<svg width="550" height="529" viewBox="0 0 550 529" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<ellipse cx="275" cy="264.5" rx="275" ry="264.5" fill="#F8FCFF"/>
|
||||
<ellipse cx="272.074" cy="265.748" rx="237.804" ry="231.645" fill="#F0F9FF"/>
|
||||
<path d="M478.951 267.827C478.951 380.832 386.891 472.44 273.328 472.44C159.766 472.44 67.7052 380.832 67.7052 267.827C67.7052 154.822 159.766 63.2138 273.328 63.2138C386.891 63.2138 478.951 154.822 478.951 267.827Z" fill="#E1F4FF"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 485 B |
@@ -714,4 +714,14 @@ ion-content {
|
||||
|
||||
ion-icon{
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.temporary-message {
|
||||
background-color: #00000073;
|
||||
|
||||
.modal-wrapper {
|
||||
width: 500px;
|
||||
height: fit-content;
|
||||
height: 300px;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user