mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
fixe conflite
This commit is contained in:
@@ -85,6 +85,7 @@ export class CreateProcessPage implements OnInit {
|
|||||||
SourceId: this.task.workflowInstanceDataFields.DocId, //FolderId
|
SourceId: this.task.workflowInstanceDataFields.DocId, //FolderId
|
||||||
DeadlineType: '',
|
DeadlineType: '',
|
||||||
SubjectTypes: ['99999844'],
|
SubjectTypes: ['99999844'],
|
||||||
|
NumberPDPP: this.task.workflowInstanceDataFields.DispatchNumber,
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -7,4 +7,5 @@ export class Folder{
|
|||||||
SourceId:string;
|
SourceId:string;
|
||||||
DeadlineType: string;
|
DeadlineType: string;
|
||||||
SubjectTypes: string[];
|
SubjectTypes: string[];
|
||||||
|
NumberPDPP:string;
|
||||||
}
|
}
|
||||||
@@ -109,7 +109,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div *ngIf="task" class="aside-right flex-column height-100">
|
<div *ngIf="task" class="aside-right flex-column height-100">
|
||||||
<div class="buttons" *ngIf="task.WorkflowName == 'Despacho do Presidente da República'">
|
<div class="buttons" *ngIf="task.activityInstanceName == 'Tarefa de Despacho'">
|
||||||
<button (click)="openAddNoteModal('Executado')" class="btn-cancel" shape="round" >Executado</button>
|
<button (click)="openAddNoteModal('Executado')" class="btn-cancel" shape="round" >Executado</button>
|
||||||
<button (click)="openDelegarModal(task)" class="btn-cancel" shape="round" >Delegar</button>
|
<button (click)="openDelegarModal(task)" class="btn-cancel" shape="round" >Delegar</button>
|
||||||
<button (click)="openAddNoteModal('Gerar Diploma')" class="btn-cancel" shape="round" >Gerar Diploma </button>
|
<button (click)="openAddNoteModal('Gerar Diploma')" class="btn-cancel" shape="round" >Gerar Diploma </button>
|
||||||
@@ -120,6 +120,13 @@
|
|||||||
<div class="solid"></div>
|
<div class="solid"></div>
|
||||||
<button (click)="sendExpedienteToPending()" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
|
<button (click)="sendExpedienteToPending()" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="buttons" *ngIf="task.activityInstanceName == 'Concluir Despacho'">
|
||||||
|
<button (click)="openAddNoteModal('Concluido')" class="btn-cancel" shape="round" >Marcar como Concluído</button>
|
||||||
|
<button (click)="openAddNoteModal('Reexecução')" class="btn-cancel" shape="round" >Enviar para Reexecução</button>
|
||||||
|
<button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
|
||||||
|
<button (click)="sendExpedienteToPending()" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div *ngIf="!task">
|
<div *ngIf="!task">
|
||||||
|
|||||||
@@ -231,6 +231,47 @@ export class DespachoPrPage implements OnInit {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async concluir(note:string, documents:any){
|
||||||
|
let body = {
|
||||||
|
"serialNumber": this.serialnumber,
|
||||||
|
"action": "Executado",
|
||||||
|
"ActionTypeId": 104,
|
||||||
|
"dataFields": {
|
||||||
|
"ReviewUserComment": note,
|
||||||
|
},
|
||||||
|
"AttachmentList" :documents,
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
await this.processes.CompleteTask(body);
|
||||||
|
this.successMessage()
|
||||||
|
this.close();
|
||||||
|
} catch (error) {
|
||||||
|
this.badRequest()
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
async reexecutar(note:string, documents:any){
|
||||||
|
let body = {
|
||||||
|
"serialNumber": this.serialnumber,
|
||||||
|
"action": "Reexecutar",
|
||||||
|
"ActionTypeId": 100000010,
|
||||||
|
"dataFields": {
|
||||||
|
"ReviewUserComment": note,
|
||||||
|
},
|
||||||
|
"AttachmentList" :documents,
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
await this.processes.CompleteTask(body);
|
||||||
|
this.successMessage()
|
||||||
|
this.close();
|
||||||
|
} catch (error) {
|
||||||
|
this.badRequest()
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
sendExpedienteToPending(){
|
sendExpedienteToPending(){
|
||||||
this.processes.SetTaskToPending(this.serialnumber).subscribe(res=>{
|
this.processes.SetTaskToPending(this.serialnumber).subscribe(res=>{
|
||||||
console.log(res);
|
console.log(res);
|
||||||
@@ -282,6 +323,13 @@ export class DespachoPrPage implements OnInit {
|
|||||||
else if(actionName == 'Gerar Diploma'){
|
else if(actionName == 'Gerar Diploma'){
|
||||||
this.generateDiploma(res.data.note, docs);
|
this.generateDiploma(res.data.note, docs);
|
||||||
}
|
}
|
||||||
|
else if(actionName == 'Concluido'){
|
||||||
|
//this.concluir(res.data.note, docs);
|
||||||
|
}
|
||||||
|
else if(actionName == 'Reexecução'){
|
||||||
|
this.reexecutar(res.data.note, docs);
|
||||||
|
}
|
||||||
|
this.goBack();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ import { DiscartExpedientModalPage } from 'src/app/pages/gabinete-digital/discar
|
|||||||
import { AuthService } from 'src/app/services/auth.service';
|
import { AuthService } from 'src/app/services/auth.service';
|
||||||
import { DespachoPage } from 'src/app/pages/gabinete-digital/despachos/despacho/despacho.page';
|
import { DespachoPage } from 'src/app/pages/gabinete-digital/despachos/despacho/despacho.page';
|
||||||
import { User } from 'src/app/models/user.model';
|
import { User } from 'src/app/models/user.model';
|
||||||
import { NavigationExtras, Router } from '@angular/router';
|
import { NavigationEnd, NavigationExtras, Router } from '@angular/router';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-despachos-pr',
|
selector: 'app-despachos-pr',
|
||||||
@@ -62,12 +62,14 @@ export class DespachosPrPage implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
|
||||||
//Inicializar segment
|
//Inicializar segment
|
||||||
this.segment = "despachos";
|
this.segment = "despachos";
|
||||||
this.LoadList();
|
this.LoadList();
|
||||||
this.authService.userData$.subscribe((res:any)=>{
|
|
||||||
console.log(res);
|
this.router.events.forEach((event) => {
|
||||||
|
if(event instanceof NavigationEnd && event.url == this.router.url) {
|
||||||
|
this.LoadList();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -290,8 +292,8 @@ export class DespachosPrPage implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
docIndex(index: number) {
|
docIndex(index: number) {
|
||||||
this.dicIndex = index;
|
this.dicIndex = index;
|
||||||
}
|
}
|
||||||
|
|
||||||
goBack(){
|
goBack(){
|
||||||
this.router.navigate(['/home/gabinete-digital']);
|
this.router.navigate(['/home/gabinete-digital']);
|
||||||
|
|||||||
+93
-88
@@ -95,9 +95,10 @@ export class ExpedientTaskModalPage implements OnInit {
|
|||||||
Message: '',
|
Message: '',
|
||||||
SourceSecFsId: this.task.workflowInstanceDataFields.FsId, //361
|
SourceSecFsId: this.task.workflowInstanceDataFields.FsId, //361
|
||||||
SourceType: 'DOC', //FOLDER
|
SourceType: 'DOC', //FOLDER
|
||||||
SourceId: this.task.workflowInstanceDataFields.DocId, //FolderId
|
SourceId: this.task.workflowInstanceDataFields.DocIdD, //FolderId
|
||||||
DeadlineType: '',
|
DeadlineType: '',
|
||||||
SubjectTypes: ['99999844'],
|
SubjectTypes: ['99999844'],
|
||||||
|
NumberPDPP: this.task.workflowInstanceDataFields.DispatchNumber,
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -115,6 +116,8 @@ export class ExpedientTaskModalPage implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
console.log(this.postData);
|
||||||
|
|
||||||
this.taskDate = new Date(this.task.taskStartDate);
|
this.taskDate = new Date(this.task.taskStartDate);
|
||||||
if(!this.task.hasOwnProperty('isEvent')) {
|
if(!this.task.hasOwnProperty('isEvent')) {
|
||||||
this.getAttachments();
|
this.getAttachments();
|
||||||
@@ -176,96 +179,101 @@ export class ExpedientTaskModalPage implements OnInit {
|
|||||||
});
|
});
|
||||||
docs.Attachments = DocumentToSave;
|
docs.Attachments = DocumentToSave;
|
||||||
this.dispatchFolder.SubjectTypes = this.selectedTypes;
|
this.dispatchFolder.SubjectTypes = this.selectedTypes;
|
||||||
if(this.taskParticipants.length > 0) {
|
|
||||||
switch (this.loggeduser.Profile) {
|
switch (this.loggeduser.Profile) {
|
||||||
case 'MDGPR':
|
case 'MDGPR':
|
||||||
switch (this.taskType) {
|
if(this.taskParticipants.length > 0) {
|
||||||
case '0':
|
switch (this.taskType) {
|
||||||
this.postData = {
|
case '0':
|
||||||
DistributionType: "Paralelo",
|
this.postData = {
|
||||||
CountryCode: 'AO',
|
DistributionType: "Paralelo",
|
||||||
Priority: this.postData.Priority,
|
CountryCode: 'AO',
|
||||||
UserEmail: this.user,
|
Priority: this.postData.Priority,
|
||||||
UsersSelected: attendees,
|
UserEmail: this.user,
|
||||||
DispatchFolder: this.dispatchFolder,
|
UsersSelected: attendees,
|
||||||
AttachmentList: docs,
|
DispatchFolder: this.dispatchFolder,
|
||||||
//SubjectTypes: [],
|
AttachmentList: docs,
|
||||||
}
|
//SubjectTypes: [],
|
||||||
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 = {
|
|
||||||
"serialNumber": this.task.serialNumber,
|
|
||||||
"action": "Tratado",
|
|
||||||
"ActionTypeId": 94,
|
|
||||||
"dataFields": {
|
|
||||||
"Note": "",
|
|
||||||
}
|
}
|
||||||
}
|
try {
|
||||||
this.modalController.dismiss(action_despacho);
|
this.taskResult = await this.processes.postDespatcho(this.postData).toPromise();
|
||||||
break;
|
await this.successMessage('Processo efetuado')
|
||||||
|
} catch (error) {
|
||||||
case '1':
|
await this.badRequest('Processo não efetuado')
|
||||||
this.postData = {
|
|
||||||
DistributionType: "Paralelo",
|
|
||||||
CountryCode: 'AO',
|
|
||||||
Priority: this.postData.Priority,
|
|
||||||
UserEmail: this.user,
|
|
||||||
UsersSelected: attendees,
|
|
||||||
DispatchFolder: this.dispatchFolder,
|
|
||||||
AttachmentList: docs
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
|
||||||
await this.successMessage('Processo efetuado')
|
|
||||||
} catch (error) {
|
|
||||||
await this.badRequest('Processo não efetuado')
|
|
||||||
}
|
|
||||||
|
|
||||||
let action_parecer = {
|
|
||||||
"serialNumber": this.task.serialNumber,
|
|
||||||
"action": "Tratado",
|
|
||||||
"ActionTypeId": 92,
|
|
||||||
"dataFields": {
|
|
||||||
"Note": "",
|
|
||||||
}
|
}
|
||||||
}
|
console.log('this.taskResult', this.taskResult);
|
||||||
this.modalController.dismiss(action_parecer);
|
let action_despacho = {
|
||||||
break;
|
"serialNumber": this.task.serialNumber,
|
||||||
case '2':
|
"action": "Tratado",
|
||||||
this.postData = {
|
"ActionTypeId": 94,
|
||||||
DistributionType: "Paralelo",
|
"dataFields": {
|
||||||
CountryCode: 'AO',
|
"Note": "",
|
||||||
Priority: this.postData.Priority,
|
}
|
||||||
UserEmail: this.user,
|
}
|
||||||
UsersSelected: attendees,
|
this.modalController.dismiss(action_despacho);
|
||||||
DispatchFolder: this.dispatchFolder,
|
break;
|
||||||
AttachmentList: docs
|
|
||||||
}
|
case '1':
|
||||||
//console.log(this.postData);
|
this.postData = {
|
||||||
try {
|
DistributionType: "Paralelo",
|
||||||
this.taskResult = await this.processes.postDeferimento(this.postData).toPromise()
|
CountryCode: 'AO',
|
||||||
await this.successMessage('Processo efetuado')
|
Priority: this.postData.Priority,
|
||||||
} catch (error) {
|
UserEmail: this.user,
|
||||||
await this.badRequest('Processo não efetuado')
|
UsersSelected: attendees,
|
||||||
}
|
DispatchFolder: this.dispatchFolder,
|
||||||
console.log('this.taskResult', this.taskResult);
|
AttachmentList: docs
|
||||||
let action_deferimento = {
|
}
|
||||||
"serialNumber": this.task.serialNumber,
|
|
||||||
"action": "Tratado",
|
try {
|
||||||
"ActionTypeId": 93,
|
this.taskResult = await this.processes.postParecer(this.postData).toPromise()
|
||||||
"dataFields": {
|
await this.successMessage('Processo efetuado')
|
||||||
"Note": "",
|
} catch (error) {
|
||||||
|
await this.badRequest('Processo não efetuado')
|
||||||
|
}
|
||||||
|
|
||||||
|
let action_parecer = {
|
||||||
|
"serialNumber": this.task.serialNumber,
|
||||||
|
"action": "Tratado",
|
||||||
|
"ActionTypeId": 92,
|
||||||
|
"dataFields": {
|
||||||
|
"Note": "",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.modalController.dismiss(action_parecer);
|
||||||
|
break;
|
||||||
|
case '2':
|
||||||
|
this.postData = {
|
||||||
|
DistributionType: "Paralelo",
|
||||||
|
CountryCode: 'AO',
|
||||||
|
Priority: this.postData.Priority,
|
||||||
|
UserEmail: this.user,
|
||||||
|
UsersSelected: attendees,
|
||||||
|
DispatchFolder: this.dispatchFolder,
|
||||||
|
AttachmentList: docs
|
||||||
|
}
|
||||||
|
//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 = {
|
||||||
|
"serialNumber": this.task.serialNumber,
|
||||||
|
"action": "Tratado",
|
||||||
|
"ActionTypeId": 93,
|
||||||
|
"dataFields": {
|
||||||
|
"Note": "",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.modalController.dismiss(action_deferimento);
|
this.modalController.dismiss(action_deferimento);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.alertController.presentAlert("Lista de intervenientes vazia. Por favor, adicione 1 ou mais intervenientes.");
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 'PR':
|
case 'PR':
|
||||||
switch (this.taskType) {
|
switch (this.taskType) {
|
||||||
@@ -280,6 +288,7 @@ export class ExpedientTaskModalPage implements OnInit {
|
|||||||
AttachmentList: docs,
|
AttachmentList: docs,
|
||||||
//SubjectTypes: [],
|
//SubjectTypes: [],
|
||||||
}
|
}
|
||||||
|
console.log(this.postData);
|
||||||
try {
|
try {
|
||||||
this.taskResult = await this.processes.postDespatchoPr(this.postData).toPromise();
|
this.taskResult = await this.processes.postDespatchoPr(this.postData).toPromise();
|
||||||
await this.successMessage('Processo efetuado')
|
await this.successMessage('Processo efetuado')
|
||||||
@@ -310,6 +319,7 @@ export class ExpedientTaskModalPage implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
this.taskResult = await this.processes.postParecerPr(this.postData).toPromise();
|
||||||
await this.successMessage('Processo efetuado')
|
await this.successMessage('Processo efetuado')
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
await this.badRequest('Processo não efetuado')
|
await this.badRequest('Processo não efetuado')
|
||||||
@@ -328,11 +338,6 @@ export class ExpedientTaskModalPage implements OnInit {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else {
|
|
||||||
this.alertController.presentAlert("Lista de intervenientes vazia. Por favor, adicione 1 ou mais intervenientes.");
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
getAttachments() {
|
getAttachments() {
|
||||||
|
|||||||
@@ -136,9 +136,8 @@
|
|||||||
<ion-icon src="assets/images/icons-expediente-diploma.svg"></ion-icon>
|
<ion-icon src="assets/images/icons-expediente-diploma.svg"></ion-icon>
|
||||||
</div>
|
</div>
|
||||||
<p class="text-center exp-card-title">Diplomas por Assinar</p>
|
<p class="text-center exp-card-title">Diplomas por Assinar</p>
|
||||||
<p class="text-center exp-card-content">{{count_dip_Signed}} <span class="title1">Documentos</span></p>
|
<p class="text-center exp-card-content">{{count_dip_as}} <span class="title1">Documentos</span></p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ export class GabineteDigitalPage implements OnInit {
|
|||||||
count_dip_apr : string;
|
count_dip_apr : string;
|
||||||
count_dip_Signed =0
|
count_dip_Signed =0
|
||||||
count_dip_pv=0;
|
count_dip_pv=0;
|
||||||
|
count_dip_as = 0;
|
||||||
count_de_pr = 0;
|
count_de_pr = 0;
|
||||||
count_ev_pr=0;
|
count_ev_pr=0;
|
||||||
count_ev_md=0;
|
count_ev_md=0;
|
||||||
@@ -204,13 +205,24 @@ export class GabineteDigitalPage implements OnInit {
|
|||||||
this.count_total_pending = Object.keys(pendentes).length;
|
this.count_total_pending = Object.keys(pendentes).length;
|
||||||
|
|
||||||
let despachospr = await this.processesbackend.GetTasksList("Despacho do Presidente da República", false).toPromise();
|
let despachospr = await this.processesbackend.GetTasksList("Despacho do Presidente da República", false).toPromise();
|
||||||
|
let despachosPr;
|
||||||
let despachosPr = despachospr.filter(data => data.activityInstanceName == "Tarefa de Despacho");
|
switch (this.loggeduser.Profile) {
|
||||||
this.count_de_pr = Object.keys(despachosPr).length;
|
case 'MDGPR':
|
||||||
|
despachosPr = despachospr.filter(data => data.activityInstanceName == "Tarefa de Despacho");
|
||||||
|
this.count_de_pr = Object.keys(despachosPr).length;
|
||||||
|
break;
|
||||||
|
case 'PR':
|
||||||
|
despachosPr = despachospr.filter(data => data.activityInstanceName == "Concluir Despacho");
|
||||||
|
this.count_de_pr = Object.keys(despachosPr).length;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
let diplomasValidar = despachospr.filter(data => data.activityInstanceName == "Revisar Diploma");
|
let diplomasValidar = despachospr.filter(data => data.activityInstanceName == "Revisar Diploma");
|
||||||
this.count_dip_pv = Object.keys(diplomasValidar).length;
|
this.count_dip_pv = Object.keys(diplomasValidar).length;
|
||||||
|
|
||||||
|
let diplomasAssinar = despachospr.filter(data => data.activityInstanceName == "Assinar diploma");
|
||||||
|
this.count_dip_as = Object.keys(diplomasAssinar).length;
|
||||||
|
|
||||||
this.processesbackend.GetTasksList("Expediente", false).subscribe(result => {
|
this.processesbackend.GetTasksList("Expediente", false).subscribe(result => {
|
||||||
let res = result.reverse().filter(data => data.workflowInstanceDataFields.Status == "Signed");
|
let res = result.reverse().filter(data => data.workflowInstanceDataFields.Status == "Signed");
|
||||||
this.count_dip_Signed = Object.keys(res).length
|
this.count_dip_Signed = Object.keys(res).length
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ goToDiploma(serialNumber:any){
|
|||||||
"serialNumber": serialNumber,
|
"serialNumber": serialNumber,
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
this.router.navigate(['/home/gabinete-digital/diplomas/diploma'], navigationExtras);
|
this.router.navigate(['/home/gabinete-digital/diplomas-assinar/diploma-assinar'], navigationExtras);
|
||||||
}
|
}
|
||||||
|
|
||||||
doRefresh() {
|
doRefresh() {
|
||||||
|
|||||||
Reference in New Issue
Block a user