mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 13:26:08 +00:00
merge
This commit is contained in:
@@ -5,7 +5,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="ion-input-class-no-height">
|
<div class="ion-input-class-no-height">
|
||||||
<ion-textarea autocomplete="on" autocorrect="on" spellcheck="true" [(ngModel)]="note" placeholder="Comentário*" rows="6" cols="20"></ion-textarea>
|
<ion-textarea autocomplete="on" autocorrect="on" spellcheck="true" [(ngModel)]="note" placeholder="Comentário" rows="6" cols="20"></ion-textarea>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div *ngIf="hideThisFeature" class="ion-item-container-no-border">
|
<div *ngIf="hideThisFeature" class="ion-item-container-no-border">
|
||||||
@@ -53,6 +53,7 @@
|
|||||||
<button *ngIf="actionName == 'Executado'" class="btn-ok cursor-pointer" shape="round" (click)="save()">Executado</button>
|
<button *ngIf="actionName == 'Executado'" class="btn-ok cursor-pointer" shape="round" (click)="save()">Executado</button>
|
||||||
<button *ngIf="actionName == 'Gerar Diploma'" class="btn-ok cursor-pointer" shape="round" (click)="save()">Gerar</button>
|
<button *ngIf="actionName == 'Gerar Diploma'" class="btn-ok cursor-pointer" shape="round" (click)="save()">Gerar</button>
|
||||||
<button *ngIf="actionName == 'Arquivar'" class="btn-ok cursor-pointer" shape="round" (click)="save()">Arquivar</button>
|
<button *ngIf="actionName == 'Arquivar'" class="btn-ok cursor-pointer" shape="round" (click)="save()">Arquivar</button>
|
||||||
|
<button *ngIf="actionName == 'Arquivo'" class="btn-ok cursor-pointer" shape="round" (click)="save()">Arquivar</button>
|
||||||
<button *ngIf="actionName == 'Reexecução'" class="btn-ok cursor-pointer" shape="round" (click)="save()">Enviar</button>
|
<button *ngIf="actionName == 'Reexecução'" class="btn-ok cursor-pointer" shape="round" (click)="save()">Enviar</button>
|
||||||
<button *ngIf="actionName == 'Concluido'" class="btn-ok cursor-pointer" shape="round" (click)="save()">Concluído</button>
|
<button *ngIf="actionName == 'Concluido'" class="btn-ok cursor-pointer" shape="round" (click)="save()">Concluído</button>
|
||||||
<button *ngIf="actionName == 'Solicitar assinatura'" class="btn-ok cursor-pointer" shape="round" (click)="save()">Solicitar</button>
|
<button *ngIf="actionName == 'Solicitar assinatura'" class="btn-ok cursor-pointer" shape="round" (click)="save()">Solicitar</button>
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ export class CreateProcessPage implements OnInit {
|
|||||||
'Solicitar Parecer',
|
'Solicitar Parecer',
|
||||||
'Solicitar Deferimento'
|
'Solicitar Deferimento'
|
||||||
];
|
];
|
||||||
taskType:string;
|
taskType: string;
|
||||||
task: any;
|
task: any;
|
||||||
fulltask: fullTask;
|
fulltask: fullTask;
|
||||||
|
|
||||||
@@ -60,17 +60,17 @@ export class CreateProcessPage implements OnInit {
|
|||||||
|
|
||||||
taskDate: Date;
|
taskDate: Date;
|
||||||
taskDescription: string;
|
taskDescription: string;
|
||||||
loadedAttachments:any;
|
loadedAttachments: any;
|
||||||
subjectTypes:any;
|
subjectTypes: any;
|
||||||
selectedTypes: string[]=[];
|
selectedTypes: string[] = [];
|
||||||
|
|
||||||
postData: Despacho;
|
postData: Despacho;
|
||||||
dispatchFolder: Folder;
|
dispatchFolder: Folder;
|
||||||
participants: Participant[];
|
participants: Participant[];
|
||||||
|
|
||||||
contacts= [];
|
contacts = [];
|
||||||
// trigger hide and show for attendee component
|
// trigger hide and show for attendee component
|
||||||
showAttendees= false;
|
showAttendees = false;
|
||||||
|
|
||||||
adding: "intervenient" | "CC" = "intervenient";
|
adding: "intervenient" | "CC" = "intervenient";
|
||||||
profile: string;
|
profile: string;
|
||||||
@@ -82,7 +82,7 @@ export class CreateProcessPage implements OnInit {
|
|||||||
emptyTextDescription = "Sem intervenientes selecionados";
|
emptyTextDescription = "Sem intervenientes selecionados";
|
||||||
showEmptyContainer = true;
|
showEmptyContainer = true;
|
||||||
|
|
||||||
documents:SearchList[] = [];
|
documents: SearchList[] = [];
|
||||||
|
|
||||||
loggeduser: LoginUserRespose;
|
loggeduser: LoginUserRespose;
|
||||||
|
|
||||||
@@ -92,7 +92,7 @@ export class CreateProcessPage implements OnInit {
|
|||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private modalController: ModalController,
|
private modalController: ModalController,
|
||||||
private processes:ProcessesService,
|
private processes: ProcessesService,
|
||||||
private navParams: NavParams,
|
private navParams: NavParams,
|
||||||
private toastService: ToastService,
|
private toastService: ToastService,
|
||||||
public p: PermissionService,
|
public p: PermissionService,
|
||||||
@@ -100,66 +100,69 @@ export class CreateProcessPage implements OnInit {
|
|||||||
private pedidoService: PedidoService,
|
private pedidoService: PedidoService,
|
||||||
public ThemeService: ThemeService,
|
public ThemeService: ThemeService,
|
||||||
private httpsErrorHanlde: HttpErrorHandle
|
private httpsErrorHanlde: HttpErrorHandle
|
||||||
) {
|
) {
|
||||||
this.loggeduser = SessionStore.user;
|
this.loggeduser = SessionStore.user;
|
||||||
this.task = this.navParams.get('task');
|
this.task = this.navParams.get('task');
|
||||||
|
this.fulltask = this.navParams.get('fulltask');
|
||||||
|
console.log(this.task)
|
||||||
|
if (this.task.SerialNumber) {
|
||||||
|
this.task.serialNumber = this.task.SerialNumber
|
||||||
|
}
|
||||||
|
|
||||||
if (this.task.SerialNumber) {
|
|
||||||
this.task.serialNumber = this.task.SerialNumber
|
this.taskType = this.navParams.get('taskAction');
|
||||||
|
|
||||||
|
this.postData = new Despacho();
|
||||||
|
this.participants = this.participants = new Array();
|
||||||
|
//Initialize SubjectTypes Array with the value "Indefinido"
|
||||||
|
this.selectedTypes = ['99999850'];
|
||||||
|
|
||||||
|
let NumberPDPP;
|
||||||
|
|
||||||
|
if (this.fulltask) {
|
||||||
|
if (this.fulltask.workflowInstanceDataFields) {
|
||||||
|
NumberPDPP = this.fulltask.workflowInstanceDataFields.DispatchNumber
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
let SourceId;
|
||||||
|
let SourceType;
|
||||||
|
let SourceSecFsId;
|
||||||
|
const taskId = this.task.workflowInstanceDataFields?.FolderID || this.task?.FolderId || this.task?.FolderID
|
||||||
|
|
||||||
this.taskType = this.navParams.get('taskAction');
|
if (taskId) {
|
||||||
|
SourceId = taskId
|
||||||
|
SourceType = 'FOLDER'
|
||||||
|
SourceSecFsId = 361
|
||||||
|
} else {
|
||||||
|
SourceId = this.task.workflowInstanceDataFields.SourceID
|
||||||
|
SourceType = 'DOC'
|
||||||
|
SourceSecFsId = 8
|
||||||
|
}
|
||||||
|
|
||||||
this.postData = new Despacho();
|
this.dispatchFolder = {
|
||||||
this.participants = this.participants = new Array();
|
Nad: 30,
|
||||||
//Initialize SubjectTypes Array with the value "Indefinido"
|
Subject: '',
|
||||||
this.selectedTypes = ['99999850'];
|
Message: '',
|
||||||
|
SourceSecFsId: SourceSecFsId, //361
|
||||||
|
SourceType: SourceType, //FOLDER
|
||||||
|
SourceId: SourceId,
|
||||||
|
DeadlineType: '',
|
||||||
|
SubjectTypes: this.selectedTypes,
|
||||||
|
NumberPDPP: this.task?.workflowInstanceDataFields?.DispatchNumber || NumberPDPP || this.fulltask?.workflowInstanceDataFields?.DispatchNumber
|
||||||
|
};
|
||||||
|
|
||||||
let NumberPDPP;
|
this.postData.DispatchFolder = this.dispatchFolder;
|
||||||
|
this.postData.UsersSelected = this.participants;
|
||||||
if(this.fulltask) {
|
/* By Default TypeDeadline should be 'Normal' */
|
||||||
if(this.fulltask.workflowInstanceDataFields) {
|
this.postData.Priority = '99999861';
|
||||||
NumberPDPP = this.fulltask.workflowInstanceDataFields.DispatchNumber
|
/* Initialize 'Subject' with the title of the expedient */
|
||||||
}
|
console.log('Subject', this.fulltask)
|
||||||
}
|
this.postData.DispatchFolder.Subject = this.task?.workflowInstanceDataFields?.Subject || this.fulltask?.workflowInstanceDataFields?.Subject;
|
||||||
|
this.profile = this.navParams.get('profile');
|
||||||
let SourceId;
|
|
||||||
let SourceType;
|
|
||||||
let SourceSecFsId;
|
|
||||||
|
|
||||||
if(this.task.workflowInstanceDataFields.FolderID || this.task.FolderId || this.task.FolderID) {
|
|
||||||
SourceId = this.task.workflowInstanceDataFields.FolderID
|
|
||||||
SourceType = 'FOLDER'
|
|
||||||
SourceSecFsId = 361
|
|
||||||
} else {
|
|
||||||
SourceId = this.task.workflowInstanceDataFields.SourceID
|
|
||||||
SourceType = 'DOC'
|
|
||||||
SourceSecFsId = 8
|
|
||||||
}
|
|
||||||
|
|
||||||
this.dispatchFolder = {
|
|
||||||
Nad: 30,
|
|
||||||
Subject: '',
|
|
||||||
Message: '',
|
|
||||||
SourceSecFsId: SourceSecFsId, //361
|
|
||||||
SourceType: SourceType, //FOLDER
|
|
||||||
SourceId: SourceId,
|
|
||||||
DeadlineType: '',
|
|
||||||
SubjectTypes: this.selectedTypes,
|
|
||||||
NumberPDPP: this.task.workflowInstanceDataFields.DispatchNumber || NumberPDPP
|
|
||||||
};
|
|
||||||
|
|
||||||
this.postData.DispatchFolder = this.dispatchFolder;
|
|
||||||
this.postData.UsersSelected = this.participants;
|
|
||||||
/* By Default TypeDeadline should be 'Normal' */
|
|
||||||
this.postData.Priority = '99999861';
|
|
||||||
/* Initialize 'Subject' with the title of the expedient */
|
|
||||||
this.postData.DispatchFolder.Subject = this.task.workflowInstanceDataFields.Subject;
|
|
||||||
this.profile = this.navParams.get('profile');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async setAdding(type: "intervenient" | "CC"){
|
async setAdding(type: "intervenient" | "CC") {
|
||||||
this.adding = type;
|
this.adding = type;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -173,11 +176,11 @@ export class CreateProcessPage implements OnInit {
|
|||||||
this.taskDate = new Date(this.task.taskStartDate);
|
this.taskDate = new Date(this.task.taskStartDate);
|
||||||
}
|
}
|
||||||
|
|
||||||
onSelectedTypesChanged(ev:any){
|
onSelectedTypesChanged(ev: any) {
|
||||||
if(ev.length > 1){
|
if (ev.length > 1) {
|
||||||
this.selectedTypes = ev.filter(data => data != '99999850');
|
this.selectedTypes = ev.filter(data => data != '99999850');
|
||||||
}
|
}
|
||||||
if(ev.length == 0){
|
if (ev.length == 0) {
|
||||||
this.selectedTypes = ["99999850"];
|
this.selectedTypes = ["99999850"];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -188,7 +191,7 @@ export class CreateProcessPage implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getSubjectType() {
|
getSubjectType() {
|
||||||
this.processes.GetSubjectType().subscribe(res=>{
|
this.processes.GetSubjectType().subscribe(res => {
|
||||||
this.subjectTypes = res;
|
this.subjectTypes = res;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -198,11 +201,11 @@ export class CreateProcessPage implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
runValidation() {
|
runValidation() {
|
||||||
this.validateFrom = true
|
this.validateFrom = true
|
||||||
}
|
}
|
||||||
|
|
||||||
defaultParticipants () {
|
defaultParticipants() {
|
||||||
if(this.p.userPermission([this.p.permissionList.Gabinete.pr_tasks])) {
|
if (this.p.userPermission([this.p.permissionList.Gabinete.pr_tasks])) {
|
||||||
return ['MDGPR']
|
return ['MDGPR']
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -233,32 +236,32 @@ export class CreateProcessPage implements OnInit {
|
|||||||
|
|
||||||
async saveTask() {
|
async saveTask() {
|
||||||
|
|
||||||
if(!this.p.userRole(['PR'])) {
|
if (!this.p.userRole(['PR'])) {
|
||||||
this.injectValidation()
|
this.injectValidation()
|
||||||
this.runValidation()
|
this.runValidation()
|
||||||
if(this.Form.invalid) return false
|
if (this.Form.invalid) return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if(this.postData.Priority=='99999861') {
|
if (this.postData.Priority == '99999861') {
|
||||||
this.dispatchFolder.DeadlineType = 'Normal';
|
this.dispatchFolder.DeadlineType = 'Normal';
|
||||||
}
|
}
|
||||||
else if(this.postData.Priority=='99999862') {
|
else if (this.postData.Priority == '99999862') {
|
||||||
this.dispatchFolder.DeadlineType = 'Urgente';
|
this.dispatchFolder.DeadlineType = 'Urgente';
|
||||||
}
|
}
|
||||||
else if(this.postData.Priority=='99999863') {
|
else if (this.postData.Priority == '99999863') {
|
||||||
this.dispatchFolder.DeadlineType = 'Muito Urgente';
|
this.dispatchFolder.DeadlineType = 'Muito Urgente';
|
||||||
}
|
}
|
||||||
else if(this.postData.Priority=='99999864') {
|
else if (this.postData.Priority == '99999864') {
|
||||||
this.dispatchFolder.DeadlineType = 'Urgentíssimo';
|
this.dispatchFolder.DeadlineType = 'Urgentíssimo';
|
||||||
}
|
}
|
||||||
|
|
||||||
let attendees = this.taskParticipants.concat(this.taskParticipantsCc);
|
let attendees = this.taskParticipants.concat(this.taskParticipantsCc);
|
||||||
|
|
||||||
attendees = attendees.map(function(val) {
|
attendees = attendees.map(function (val) {
|
||||||
return {
|
return {
|
||||||
UserEmail: val.EmailAddress,
|
UserEmail: val.EmailAddress,
|
||||||
UserType: val.IsRequired?"I": "CC"
|
UserType: val.IsRequired ? "I" : "CC"
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -281,154 +284,88 @@ export class CreateProcessPage implements OnInit {
|
|||||||
const loader = this.toastService.loading()
|
const loader = this.toastService.loading()
|
||||||
|
|
||||||
|
|
||||||
if(this.loggeduser.Profile != 'PR') {
|
if (this.fulltask.activityInstanceName == "Assinar Diploma") {
|
||||||
switch (this.taskType) {
|
this.postData = {
|
||||||
case '0': // Despacho
|
DistributionType: "Paralelo",
|
||||||
this.postData = {
|
CountryCode: 'AO',
|
||||||
DistributionType: "Paralelo",
|
Priority: this.postData.Priority,
|
||||||
CountryCode: 'AO',
|
UserEmail: this.loggeduser.Email,
|
||||||
Priority: this.postData.Priority,
|
UsersSelected: attendees,
|
||||||
UserEmail: this.loggeduser.Email,
|
DispatchFolder: this.dispatchFolder,
|
||||||
UsersSelected: attendees,
|
AttachmentList: docs
|
||||||
DispatchFolder: this.dispatchFolder,
|
}
|
||||||
AttachmentList: docs
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await this.processes.postDespatcho(this.postData).toPromise();
|
// await this.processes.postDespatcho(this.postData).toPromise();
|
||||||
await this.despachoService.EfectuarDespacho({note: this.dispatchFolder.Message, serialnumber: this.task.serialNumber, activityInstanceName: this.task.activityInstanceName}).toPromise();
|
await this.despachoService.createDespacho(this.postData).toPromise();
|
||||||
|
this.executado(this.dispatchFolder.Message, docs.Attachments)
|
||||||
|
this.httpsErrorHanlde.httpsSucessMessagge('Efetuar Despacho')
|
||||||
|
loader.remove();
|
||||||
|
} catch (error) {
|
||||||
|
this.httpsErrorHanlde.httpStatusHandle(error)
|
||||||
|
loader.remove()
|
||||||
|
}
|
||||||
|
|
||||||
this.modalController.dismiss();
|
} else {
|
||||||
this.httpsErrorHanlde.httpsSucessMessagge('Efetuar Despacho')
|
if (this.loggeduser.Profile != 'PR') {
|
||||||
} catch (error) {
|
switch (this.taskType) {
|
||||||
this.httpsErrorHanlde.httpStatusHandle(error)
|
case '0': // Despacho
|
||||||
|
this.postData = {
|
||||||
} finally {
|
DistributionType: "Paralelo",
|
||||||
loader.remove()
|
CountryCode: 'AO',
|
||||||
}
|
Priority: this.postData.Priority,
|
||||||
|
UserEmail: this.loggeduser.Email,
|
||||||
break;
|
UsersSelected: attendees,
|
||||||
case '1': // pedido de Parecer
|
DispatchFolder: this.dispatchFolder,
|
||||||
this.postData = {
|
AttachmentList: docs
|
||||||
DistributionType: "Paralelo",
|
|
||||||
CountryCode: 'AO',
|
|
||||||
Priority: this.postData.Priority,
|
|
||||||
UserEmail: this.loggeduser.Email,
|
|
||||||
UsersSelected: attendees,
|
|
||||||
DispatchFolder: this.dispatchFolder,
|
|
||||||
AttachmentList: docs
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
|
||||||
if(this.task.activityInstanceName == 'Tarefa de Despacho' || this.task.activityInstanceName == 'Reexecutar Despacho') {
|
|
||||||
await this.despachoService.createParecer(this.postData).toPromise();
|
|
||||||
await this.despachoService.solicitarParecer({ note: this.postData.DispatchFolder.Message, serialnumber: this.task.serialNumber, activityInstanceName: this.task.activityInstanceName}).toPromise();
|
|
||||||
} else {
|
|
||||||
|
|
||||||
await this.pedidoService.createParecer(this.postData).toPromise();
|
|
||||||
await this.pedidoService.taskCompleteParecer({serialNumber:this.task.serialNumber, note: this.postData.DispatchFolder.Message}).toPromise();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.modalController.dismiss();
|
|
||||||
this.httpsErrorHanlde.httpsSucessMessagge('Solicitar Parecer')
|
|
||||||
}
|
|
||||||
catch (error) {
|
|
||||||
this.httpsErrorHanlde.httpStatusHandle(error)
|
|
||||||
} finally {
|
|
||||||
loader.remove()
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
case '2': // Pedido de Deferimento
|
|
||||||
this.postData = {
|
|
||||||
DistributionType: "Paralelo",
|
|
||||||
CountryCode: 'AO',
|
|
||||||
Priority: this.postData.Priority,
|
|
||||||
UserEmail: this.loggeduser.Email,
|
|
||||||
UsersSelected: attendees,
|
|
||||||
DispatchFolder: this.dispatchFolder,
|
|
||||||
AttachmentList: docs
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
|
||||||
await this.pedidoService.createDeferimento(this.postData).toPromise();
|
|
||||||
await this.pedidoService.taskCompleteDeferimento({note: this.postData.DispatchFolder.Message,serialNumber:this.task.serialNumber}).toPromise();
|
|
||||||
|
|
||||||
this.modalController.dismiss();
|
|
||||||
this.httpsErrorHanlde.httpsSucessMessagge('Pedido de Deferimento')
|
|
||||||
}
|
|
||||||
catch (error) {
|
|
||||||
this.httpsErrorHanlde.httpStatusHandle(error)
|
|
||||||
}
|
|
||||||
finally {
|
|
||||||
loader.remove()
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
} else if (this.loggeduser.Profile == 'PR') {
|
|
||||||
switch (this.taskType) {
|
|
||||||
case '0': // Despacho PR
|
|
||||||
this.postData = {
|
|
||||||
DistributionType: "Paralelo",
|
|
||||||
CountryCode: 'AO',
|
|
||||||
Priority: this.postData.Priority,
|
|
||||||
UserEmail: this.loggeduser.Email,
|
|
||||||
UsersSelected: attendees,
|
|
||||||
DispatchFolder: this.dispatchFolder,
|
|
||||||
AttachmentList: docs
|
|
||||||
}
|
|
||||||
|
|
||||||
if(this.postData.DispatchFolder.Message){
|
|
||||||
try {
|
try {
|
||||||
await this.despachoService.createDespacho(this.postData).toPromise();
|
await this.processes.postDespatcho(this.postData).toPromise();
|
||||||
await this.despachoService.CompleteTask({serialNumber: this.task.serialNumber, note: this.dispatchFolder.Message}).toPromise();
|
await this.despachoService.EfectuarDespacho({ note: this.dispatchFolder.Message, serialnumber: this.task.serialNumber, activityInstanceName: this.task.activityInstanceName }).toPromise();
|
||||||
|
|
||||||
this.modalController.dismiss();
|
this.modalController.dismiss();
|
||||||
this.httpsErrorHanlde.httpsSucessMessagge('Efetuar Despacho')
|
this.httpsErrorHanlde.httpsSucessMessagge('Efetuar Despacho')
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.httpsErrorHanlde.httpStatusHandle(error)
|
this.httpsErrorHanlde.httpStatusHandle(error)
|
||||||
|
|
||||||
} finally {
|
} finally {
|
||||||
loader.remove();
|
loader.remove()
|
||||||
}
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
this.validateField = true;
|
|
||||||
this.toastService._badRequest('Por favor adicione uma descrição');
|
|
||||||
}
|
|
||||||
loader.remove();
|
|
||||||
break;
|
|
||||||
case '1': // Pedido de Parecer
|
|
||||||
this.postData = {
|
|
||||||
DistributionType: "Paralelo",
|
|
||||||
CountryCode: 'AO',
|
|
||||||
Priority: this.postData.Priority,
|
|
||||||
UserEmail: this.loggeduser.Email,
|
|
||||||
UsersSelected: attendees,
|
|
||||||
DispatchFolder: this.dispatchFolder,
|
|
||||||
AttachmentList: docs
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
|
||||||
|
|
||||||
if(this.task.activityInstanceName == 'Tarefa de Despacho' || this.task.activityInstanceName == 'Reexecutar Despacho') {
|
|
||||||
await this.despachoService.createParecer(this.postData).toPromise();
|
|
||||||
await this.despachoService.solicitarParecer({ note: this.postData.DispatchFolder.Message, serialnumber: this.task.serialNumber, activityInstanceName: this.task.activityInstanceName}).toPromise();
|
|
||||||
} else {
|
|
||||||
await this.pedidoService.createParecer(this.postData).toPromise();
|
|
||||||
await this.pedidoService.taskCompleteParecer({serialNumber:this.task.serialNumber, note: this.postData.DispatchFolder.Message}).toPromise();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.modalController.dismiss();
|
break;
|
||||||
this.httpsErrorHanlde.httpsSucessMessagge('Solicitar Parecer')
|
case '1': // pedido de Parecer
|
||||||
}
|
this.postData = {
|
||||||
catch (error) {
|
DistributionType: "Paralelo",
|
||||||
this.httpsErrorHanlde.httpStatusHandle(error)
|
CountryCode: 'AO',
|
||||||
} finally {
|
Priority: this.postData.Priority,
|
||||||
loader.remove()
|
UserEmail: this.loggeduser.Email,
|
||||||
}
|
UsersSelected: attendees,
|
||||||
|
DispatchFolder: this.dispatchFolder,
|
||||||
|
AttachmentList: docs
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
try {
|
||||||
case '2': // Pedido de Deferimento
|
if (this.task.activityInstanceName == 'Tarefa de Despacho' || this.task.activityInstanceName == 'Reexecutar Despacho') {
|
||||||
|
await this.despachoService.createParecer(this.postData).toPromise();
|
||||||
|
await this.despachoService.solicitarParecer({ note: this.postData.DispatchFolder.Message, serialnumber: this.task.serialNumber, activityInstanceName: this.task.activityInstanceName }).toPromise();
|
||||||
|
} else {
|
||||||
|
|
||||||
|
await this.pedidoService.createParecer(this.postData).toPromise();
|
||||||
|
await this.pedidoService.taskCompleteParecer({ serialNumber: this.task.serialNumber, note: this.postData.DispatchFolder.Message }).toPromise();
|
||||||
|
}
|
||||||
|
|
||||||
|
this.modalController.dismiss();
|
||||||
|
this.httpsErrorHanlde.httpsSucessMessagge('Solicitar Parecer')
|
||||||
|
}
|
||||||
|
catch (error) {
|
||||||
|
this.httpsErrorHanlde.httpStatusHandle(error)
|
||||||
|
} finally {
|
||||||
|
loader.remove()
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
case '2': // Pedido de Deferimento
|
||||||
this.postData = {
|
this.postData = {
|
||||||
DistributionType: "Paralelo",
|
DistributionType: "Paralelo",
|
||||||
CountryCode: 'AO',
|
CountryCode: 'AO',
|
||||||
@@ -441,7 +378,96 @@ export class CreateProcessPage implements OnInit {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
await this.pedidoService.createDeferimento(this.postData).toPromise();
|
await this.pedidoService.createDeferimento(this.postData).toPromise();
|
||||||
await this.pedidoService.taskCompleteDeferimento({note: this.postData.DispatchFolder.Message, serialNumber:this.task.serialNumber}).toPromise();
|
await this.pedidoService.taskCompleteDeferimento({ note: this.postData.DispatchFolder.Message, serialNumber: this.task.serialNumber }).toPromise();
|
||||||
|
|
||||||
|
this.modalController.dismiss();
|
||||||
|
this.httpsErrorHanlde.httpsSucessMessagge('Pedido de Deferimento')
|
||||||
|
}
|
||||||
|
catch (error) {
|
||||||
|
this.httpsErrorHanlde.httpStatusHandle(error)
|
||||||
|
}
|
||||||
|
finally {
|
||||||
|
loader.remove()
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} else if (this.loggeduser.Profile == 'PR') {
|
||||||
|
switch (this.taskType) {
|
||||||
|
case '0': // Despacho PR
|
||||||
|
this.postData = {
|
||||||
|
DistributionType: "Paralelo",
|
||||||
|
CountryCode: 'AO',
|
||||||
|
Priority: this.postData.Priority,
|
||||||
|
UserEmail: this.loggeduser.Email,
|
||||||
|
UsersSelected: attendees,
|
||||||
|
DispatchFolder: this.dispatchFolder,
|
||||||
|
AttachmentList: docs
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.postData.DispatchFolder.Message) {
|
||||||
|
try {
|
||||||
|
await this.despachoService.createDespacho(this.postData).toPromise();
|
||||||
|
await this.despachoService.CompleteTask({ serialNumber: this.task.serialNumber, note: this.dispatchFolder.Message }).toPromise();
|
||||||
|
|
||||||
|
this.modalController.dismiss();
|
||||||
|
this.httpsErrorHanlde.httpsSucessMessagge('Efetuar Despacho')
|
||||||
|
} catch (error) {
|
||||||
|
this.httpsErrorHanlde.httpStatusHandle(error)
|
||||||
|
} finally {
|
||||||
|
loader.remove();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.validateField = true;
|
||||||
|
this.toastService._badRequest('Por favor adicione uma descrição');
|
||||||
|
}
|
||||||
|
loader.remove();
|
||||||
|
break;
|
||||||
|
case '1': // Pedido de Parecer
|
||||||
|
this.postData = {
|
||||||
|
DistributionType: "Paralelo",
|
||||||
|
CountryCode: 'AO',
|
||||||
|
Priority: this.postData.Priority,
|
||||||
|
UserEmail: this.loggeduser.Email,
|
||||||
|
UsersSelected: attendees,
|
||||||
|
DispatchFolder: this.dispatchFolder,
|
||||||
|
AttachmentList: docs
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
|
||||||
|
if (this.task.activityInstanceName == 'Tarefa de Despacho' || this.task.activityInstanceName == 'Reexecutar Despacho') {
|
||||||
|
await this.despachoService.createParecer(this.postData).toPromise();
|
||||||
|
await this.despachoService.solicitarParecer({ note: this.postData.DispatchFolder.Message, serialnumber: this.task.serialNumber, activityInstanceName: this.task.activityInstanceName }).toPromise();
|
||||||
|
} else {
|
||||||
|
await this.pedidoService.createParecer(this.postData).toPromise();
|
||||||
|
await this.pedidoService.taskCompleteParecer({ serialNumber: this.task.serialNumber, note: this.postData.DispatchFolder.Message }).toPromise();
|
||||||
|
}
|
||||||
|
|
||||||
|
this.modalController.dismiss();
|
||||||
|
this.httpsErrorHanlde.httpsSucessMessagge('Solicitar Parecer')
|
||||||
|
}
|
||||||
|
catch (error) {
|
||||||
|
this.httpsErrorHanlde.httpStatusHandle(error)
|
||||||
|
} finally {
|
||||||
|
loader.remove()
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
case '2': // Pedido de Deferimento
|
||||||
|
this.postData = {
|
||||||
|
DistributionType: "Paralelo",
|
||||||
|
CountryCode: 'AO',
|
||||||
|
Priority: this.postData.Priority,
|
||||||
|
UserEmail: this.loggeduser.Email,
|
||||||
|
UsersSelected: attendees,
|
||||||
|
DispatchFolder: this.dispatchFolder,
|
||||||
|
AttachmentList: docs
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
await this.pedidoService.createDeferimento(this.postData).toPromise();
|
||||||
|
await this.pedidoService.taskCompleteDeferimento({ note: this.postData.DispatchFolder.Message, serialNumber: this.task.serialNumber }).toPromise();
|
||||||
|
|
||||||
this.modalController.dismiss();
|
this.modalController.dismiss();
|
||||||
this.httpsErrorHanlde.httpsSucessMessagge('Pedido de Deferimento')
|
this.httpsErrorHanlde.httpsSucessMessagge('Pedido de Deferimento')
|
||||||
@@ -453,9 +479,41 @@ export class CreateProcessPage implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
async executado(note: string, documents: any) {
|
||||||
|
let body = {
|
||||||
|
"serialNumber": this.fulltask.serialNumber,
|
||||||
|
"action": "Conhecimento",
|
||||||
|
"ActionTypeId": 104,
|
||||||
|
"dataFields": {
|
||||||
|
"ReviewUserComment": note,
|
||||||
|
},
|
||||||
|
"AttachmentList": documents,
|
||||||
|
}
|
||||||
|
|
||||||
|
const loader = this.toastService.loading()
|
||||||
|
|
||||||
|
try {
|
||||||
|
await this.processes.CompleteTask(body).toPromise()
|
||||||
|
this.close();
|
||||||
|
this.toastService._successMessage()
|
||||||
|
} catch (error) {
|
||||||
|
if (error.status == 0) {
|
||||||
|
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||||
|
} else {
|
||||||
|
|
||||||
|
this.toastService._badRequest()
|
||||||
|
}
|
||||||
|
} finally {
|
||||||
|
loader.remove()
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -463,8 +521,8 @@ export class CreateProcessPage implements OnInit {
|
|||||||
|
|
||||||
let body;
|
let body;
|
||||||
|
|
||||||
if(this.task.activityInstanceName =='Tarefa de Despacho' ||
|
if (this.task.activityInstanceName == 'Tarefa de Despacho' ||
|
||||||
this.task.activityInstanceName =='Reexecutar Despacho') {
|
this.task.activityInstanceName == 'Reexecutar Despacho') {
|
||||||
|
|
||||||
body = {
|
body = {
|
||||||
"serialNumber": this.task.serialNumber,
|
"serialNumber": this.task.serialNumber,
|
||||||
@@ -473,13 +531,13 @@ export class CreateProcessPage implements OnInit {
|
|||||||
"dataFields": {
|
"dataFields": {
|
||||||
"ReviewUserComment": '',
|
"ReviewUserComment": '',
|
||||||
},
|
},
|
||||||
"AttachmentList" :null,
|
"AttachmentList": null,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(this.task.activityInstanceName =='Concluir Despacho' ||
|
else if (this.task.activityInstanceName == 'Concluir Despacho' ||
|
||||||
this.task.activityInstanceName == 'Concluir Parecer' ||
|
this.task.activityInstanceName == 'Concluir Parecer' ||
|
||||||
this.task.activityInstanceName =='Concluir Deferimento' ||
|
this.task.activityInstanceName == 'Concluir Deferimento' ||
|
||||||
this.task.activityInstanceName =='Reapreciar Deferimento' ||
|
this.task.activityInstanceName == 'Reapreciar Deferimento' ||
|
||||||
this.task.activityInstanceName == 'Tarefa de Deferimento'
|
this.task.activityInstanceName == 'Tarefa de Deferimento'
|
||||||
) {
|
) {
|
||||||
|
|
||||||
@@ -490,7 +548,7 @@ export class CreateProcessPage implements OnInit {
|
|||||||
"dataFields": {
|
"dataFields": {
|
||||||
"ReviewUserComment": '',
|
"ReviewUserComment": '',
|
||||||
},
|
},
|
||||||
"AttachmentList" :null,
|
"AttachmentList": null,
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
@@ -512,15 +570,15 @@ export class CreateProcessPage implements OnInit {
|
|||||||
async addParticipants() {
|
async addParticipants() {
|
||||||
|
|
||||||
this.adding = "intervenient";
|
this.adding = "intervenient";
|
||||||
this.contacts = this.taskParticipants;
|
this.contacts = this.taskParticipants;
|
||||||
|
|
||||||
if(window.innerWidth <=800) {
|
if (window.innerWidth <= 800) {
|
||||||
|
|
||||||
this.showAttendees=false;
|
this.showAttendees = false;
|
||||||
|
|
||||||
const modal = await this.modalController.create({
|
const modal = await this.modalController.create({
|
||||||
component: AttendeesPageModal,
|
component: AttendeesPageModal,
|
||||||
componentProps: {
|
componentProps: {
|
||||||
adding: this.adding,
|
adding: this.adding,
|
||||||
taskParticipants: this.taskParticipants,
|
taskParticipants: this.taskParticipants,
|
||||||
taskParticipantsCc: this.taskParticipantsCc
|
taskParticipantsCc: this.taskParticipantsCc
|
||||||
@@ -533,7 +591,7 @@ export class CreateProcessPage implements OnInit {
|
|||||||
|
|
||||||
modal.onDidDismiss().then((data) => {
|
modal.onDidDismiss().then((data) => {
|
||||||
|
|
||||||
if(data) {
|
if (data) {
|
||||||
data = data['data'];
|
data = data['data'];
|
||||||
|
|
||||||
const newAttendees: EventPerson[] = data['taskParticipants'];
|
const newAttendees: EventPerson[] = data['taskParticipants'];
|
||||||
@@ -544,7 +602,7 @@ export class CreateProcessPage implements OnInit {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.showAttendees=true
|
this.showAttendees = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -553,12 +611,12 @@ export class CreateProcessPage implements OnInit {
|
|||||||
this.adding = "CC";
|
this.adding = "CC";
|
||||||
this.contacts = this.taskParticipantsCc;
|
this.contacts = this.taskParticipantsCc;
|
||||||
|
|
||||||
if(window.innerWidth <=800){
|
if (window.innerWidth <= 800) {
|
||||||
this.showAttendees=false;
|
this.showAttendees = false;
|
||||||
|
|
||||||
const modal = await this.modalController.create({
|
const modal = await this.modalController.create({
|
||||||
component: AttendeesPageModal,
|
component: AttendeesPageModal,
|
||||||
componentProps: {
|
componentProps: {
|
||||||
adding: this.adding,
|
adding: this.adding,
|
||||||
taskParticipants: this.taskParticipants,
|
taskParticipants: this.taskParticipants,
|
||||||
taskParticipantsCc: this.taskParticipantsCc
|
taskParticipantsCc: this.taskParticipantsCc
|
||||||
@@ -571,7 +629,7 @@ export class CreateProcessPage implements OnInit {
|
|||||||
|
|
||||||
modal.onDidDismiss().then((data) => {
|
modal.onDidDismiss().then((data) => {
|
||||||
|
|
||||||
if(data) {
|
if (data) {
|
||||||
data = data['data'];
|
data = data['data'];
|
||||||
|
|
||||||
const newAttendees: EventPerson[] = data['taskParticipants'];
|
const newAttendees: EventPerson[] = data['taskParticipants'];
|
||||||
@@ -583,7 +641,7 @@ export class CreateProcessPage implements OnInit {
|
|||||||
});
|
});
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
this.showAttendees=true
|
this.showAttendees = true
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -591,7 +649,7 @@ export class CreateProcessPage implements OnInit {
|
|||||||
async distartExpedientModal() {
|
async distartExpedientModal() {
|
||||||
const modal = await this.modalController.create({
|
const modal = await this.modalController.create({
|
||||||
component: DiscartExpedientModalPage,
|
component: DiscartExpedientModalPage,
|
||||||
componentProps: {
|
componentProps: {
|
||||||
serialNumber: this.task.serialNumber,
|
serialNumber: this.task.serialNumber,
|
||||||
folderId: this.task.workflowInstanceDataFields.FolderID,
|
folderId: this.task.workflowInstanceDataFields.FolderID,
|
||||||
action: 'complete',
|
action: 'complete',
|
||||||
@@ -601,17 +659,17 @@ export class CreateProcessPage implements OnInit {
|
|||||||
});
|
});
|
||||||
|
|
||||||
await modal.present();
|
await modal.present();
|
||||||
modal.onDidDismiss().then(res=>{
|
modal.onDidDismiss().then(res => {
|
||||||
if(res['data']=='close'){
|
if (res['data'] == 'close') {
|
||||||
this.modalController.dismiss(res['data'])
|
this.modalController.dismiss(res['data'])
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async setContact(data:EventPerson[]) {
|
async setContact(data: EventPerson[]) {
|
||||||
|
|
||||||
if(this.adding == "intervenient"){
|
if (this.adding == "intervenient") {
|
||||||
this.taskParticipants = data;
|
this.taskParticipants = data;
|
||||||
} else if (this.adding == "CC") {
|
} else if (this.adding == "CC") {
|
||||||
|
|
||||||
@@ -620,7 +678,7 @@ export class CreateProcessPage implements OnInit {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dynamicSetIntervenient({taskParticipants, taskParticipantsCc}){
|
dynamicSetIntervenient({ taskParticipants, taskParticipantsCc }) {
|
||||||
this.taskParticipants = taskParticipants;
|
this.taskParticipants = taskParticipants;
|
||||||
this.taskParticipantsCc = taskParticipantsCc;
|
this.taskParticipantsCc = taskParticipantsCc;
|
||||||
}
|
}
|
||||||
@@ -640,15 +698,15 @@ export class CreateProcessPage implements OnInit {
|
|||||||
async viewExpedientDetail() {
|
async viewExpedientDetail() {
|
||||||
|
|
||||||
let classs;
|
let classs;
|
||||||
if( window.innerWidth <= 800){
|
if (window.innerWidth <= 800) {
|
||||||
classs = 'modal modal-desktop'
|
classs = 'modal modal-desktop'
|
||||||
} else {
|
} else {
|
||||||
classs = 'modal modal-desktop showAsideOptions'
|
classs = 'modal modal-desktop showAsideOptions'
|
||||||
}
|
}
|
||||||
|
|
||||||
const modal = await this.modalController.create({
|
const modal = await this.modalController.create({
|
||||||
component: ExpedienteDetailPage,
|
component: ExpedienteDetailPage,
|
||||||
componentProps:{
|
componentProps: {
|
||||||
serialNumber: this.task.serialNumber,
|
serialNumber: this.task.serialNumber,
|
||||||
profile: this.profile,
|
profile: this.profile,
|
||||||
},
|
},
|
||||||
@@ -656,20 +714,20 @@ export class CreateProcessPage implements OnInit {
|
|||||||
backdropDismiss: false
|
backdropDismiss: false
|
||||||
});
|
});
|
||||||
await modal.present();
|
await modal.present();
|
||||||
modal.onDidDismiss().then((res)=>{
|
modal.onDidDismiss().then((res) => {
|
||||||
/* console.log('!refresh list'); */
|
/* console.log('!refresh list'); */
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
removeAttachment(index: number){
|
removeAttachment(index: number) {
|
||||||
|
|
||||||
this.documents = this.documents.filter( (e, i) => index != i);
|
this.documents = this.documents.filter((e, i) => index != i);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async getDoc(){
|
async getDoc() {
|
||||||
const modal = await this.modalController.create({
|
const modal = await this.modalController.create({
|
||||||
component: SearchPage,
|
component: SearchPage,
|
||||||
cssClass: 'modal-width-100-width-background modal',
|
cssClass: 'modal-width-100-width-background modal',
|
||||||
@@ -680,11 +738,11 @@ export class CreateProcessPage implements OnInit {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
await modal.present();
|
await modal.present();
|
||||||
modal.onDidDismiss().then((res)=>{
|
modal.onDidDismiss().then((res) => {
|
||||||
if(res){
|
if (res) {
|
||||||
const data = res.data;
|
const data = res.data;
|
||||||
this.documents.push(data.selected);
|
this.documents.push(data.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+4
-1
@@ -73,7 +73,9 @@ export class DiplomaAssinarPage implements OnInit {
|
|||||||
componentProps: {
|
componentProps: {
|
||||||
serialNumber: this.task.SerialNumber,
|
serialNumber: this.task.SerialNumber,
|
||||||
task: this.task,
|
task: this.task,
|
||||||
showEnviarPendentes: false
|
showEnviarPendentes: false,
|
||||||
|
fulltask: this.fulltask
|
||||||
|
|
||||||
},
|
},
|
||||||
translucent: true
|
translucent: true
|
||||||
});
|
});
|
||||||
@@ -83,6 +85,7 @@ export class DiplomaAssinarPage implements OnInit {
|
|||||||
async LoadTaskDetail(serial: string) {
|
async LoadTaskDetail(serial: string) {
|
||||||
|
|
||||||
this.processes.GetTask(serial).subscribe(res => {
|
this.processes.GetTask(serial).subscribe(res => {
|
||||||
|
console.log("res", res)
|
||||||
this.task = {
|
this.task = {
|
||||||
"SerialNumber": res.serialNumber,
|
"SerialNumber": res.serialNumber,
|
||||||
"Folio": res.workflowInstanceDataFields.Subject,
|
"Folio": res.workflowInstanceDataFields.Subject,
|
||||||
|
|||||||
@@ -13,6 +13,8 @@
|
|||||||
<button (click)="openAddNoteModal('Solicitar assinatura')" class="btn-cancel" shape="round" >Solicitar assinatura do Presidente</button>
|
<button (click)="openAddNoteModal('Solicitar assinatura')" class="btn-cancel" shape="round" >Solicitar assinatura do Presidente</button>
|
||||||
<button (click)="openAddNoteModal('Solicitar alteração')" class="btn-cancel" shape="round" >Solicitar alteração</button>
|
<button (click)="openAddNoteModal('Solicitar alteração')" class="btn-cancel" shape="round" >Solicitar alteração</button>
|
||||||
<button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
|
<button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
|
||||||
|
<button (click)="openAddNoteModal('Arquivo')" class="btn-cancel" shape="round" >Arquivar</button>
|
||||||
|
<button (click)="openExpedientActionsModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar despacho</button>
|
||||||
<div class="solid"></div>
|
<div class="solid"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="buttons width-100" *ngIf="task.activityInstanceName == 'Diploma Assinado'">
|
<div class="buttons width-100" *ngIf="task.activityInstanceName == 'Diploma Assinado'">
|
||||||
@@ -21,6 +23,12 @@
|
|||||||
<div class="buttons width-100" *ngIf="task.activityInstanceName == 'Assinar Diploma'">
|
<div class="buttons width-100" *ngIf="task.activityInstanceName == 'Assinar Diploma'">
|
||||||
<button (click)="openAddNoteModal('Assinar Diploma')" class="btn-cancel" shape="round" >Assinado</button>
|
<button (click)="openAddNoteModal('Assinar Diploma')" class="btn-cancel" shape="round" >Assinado</button>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="buttons width-100" *ngIf="task.activityInstanceName == 'Assinar Diploma'">
|
||||||
|
<button (click)="openAddNoteModal('Arquivo')" class="btn-cancel" shape="round" >Arquivo</button>
|
||||||
|
</div>
|
||||||
|
<div class="buttons width-100" *ngIf="task.activityInstanceName == 'Assinar Diploma'">
|
||||||
|
<button (click)="openExpedientActionsModal('0',task)" class="btn-cancel" shape="round" >Efetuar despacho</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,11 @@ import { ProcessesService } from 'src/app/services/processes.service';
|
|||||||
import { ToastService } from 'src/app/services/toast.service';
|
import { ToastService } from 'src/app/services/toast.service';
|
||||||
import { RouteService } from 'src/app/services/route.service';
|
import { RouteService } from 'src/app/services/route.service';
|
||||||
import { PermissionService } from 'src/app/services/permission.service';
|
import { PermissionService } from 'src/app/services/permission.service';
|
||||||
|
import { DiscartExpedientModalPage } from 'src/app/pages/gabinete-digital/discart-expedient-modal/discart-expedient-modal.page';
|
||||||
|
import { CreateProcessPage } from 'src/app/modals/create-process/create-process.page';
|
||||||
|
import { AttachmentList } from 'src/app/models/Excludetask';
|
||||||
|
import { DespachoService } from 'src/app/Rules/despacho.service';
|
||||||
|
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-deploma-options',
|
selector: 'app-deploma-options',
|
||||||
@@ -28,14 +33,17 @@ export class DeplomaOptionsPage implements OnInit {
|
|||||||
private navParams: NavParams,
|
private navParams: NavParams,
|
||||||
private toastService: ToastService,
|
private toastService: ToastService,
|
||||||
private RouteService: RouteService,
|
private RouteService: RouteService,
|
||||||
public p: PermissionService,) {
|
public p: PermissionService,
|
||||||
|
private despachoService: DespachoService,
|
||||||
|
private httpErroHandle: HttpErrorHandle) {
|
||||||
this.serialNumber = this.navParams.get('serialNumber');
|
this.serialNumber = this.navParams.get('serialNumber');
|
||||||
this.task = this.navParams.get('task');
|
this.task = this.navParams.get('task');
|
||||||
this.fulltask = this.navParams.get('fulltask');
|
this.fulltask = this.navParams.get('fulltask');
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
console.log(this.fulltask)
|
||||||
|
console.log(this.task)
|
||||||
}
|
}
|
||||||
|
|
||||||
async openAddNoteModal(actionName:string) {
|
async openAddNoteModal(actionName:string) {
|
||||||
@@ -85,6 +93,9 @@ export class DeplomaOptionsPage implements OnInit {
|
|||||||
} else if(actionName == 'Concluir diploma'){
|
} else if(actionName == 'Concluir diploma'){
|
||||||
await this.finish(res.data.note, docs);
|
await this.finish(res.data.note, docs);
|
||||||
this.goBack();
|
this.goBack();
|
||||||
|
} else if (actionName == 'Arquivo') {
|
||||||
|
await this.arquivar(res.data.note, docs);
|
||||||
|
this.goBack();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -233,6 +244,80 @@ export class DeplomaOptionsPage implements OnInit {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async arquivar(note: string, documents: AttachmentList) {
|
||||||
|
|
||||||
|
const loader = this.toastService.loading()
|
||||||
|
|
||||||
|
try {
|
||||||
|
await this.despachoService.arquivar(note, documents, this.serialNumber).toPromise()
|
||||||
|
this.httpErroHandle.httpsSucessMessagge('Arquivar')
|
||||||
|
this.close();
|
||||||
|
} catch (error) {
|
||||||
|
this.httpErroHandle.httpStatusHandle(error)
|
||||||
|
}
|
||||||
|
finally {
|
||||||
|
loader.remove()
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
async openExpedientActionsModal(taskAction: any, task: any) {
|
||||||
|
|
||||||
|
let classs;
|
||||||
|
if (window.innerWidth <= 800) {
|
||||||
|
classs = 'modal modal-desktop'
|
||||||
|
} else {
|
||||||
|
classs = 'modal modal-desktop showAsideOptions'
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log("fulltask options", this.fulltask)
|
||||||
|
const modal = await this.modalController.create({
|
||||||
|
component: CreateProcessPage,
|
||||||
|
componentProps: {
|
||||||
|
taskAction: taskAction,
|
||||||
|
task: task,
|
||||||
|
profile: this.profile,
|
||||||
|
fulltask: this.fulltask
|
||||||
|
},
|
||||||
|
cssClass: classs,
|
||||||
|
});
|
||||||
|
await modal.present();
|
||||||
|
modal.onDidDismiss().then(async (res) => {
|
||||||
|
|
||||||
|
|
||||||
|
if (res['data'] == 'openDiscart') {
|
||||||
|
await this.distartExpedientModal();
|
||||||
|
}
|
||||||
|
|
||||||
|
this.goBack();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
async distartExpedientModal() {
|
||||||
|
|
||||||
|
const modal = await this.modalController.create({
|
||||||
|
component: DiscartExpedientModalPage,
|
||||||
|
componentProps: {
|
||||||
|
serialNumber: this.fulltask.serialNumber,
|
||||||
|
folderId: this.fulltask.workflowInstanceDataFields.FolderID,
|
||||||
|
action: 'complete',
|
||||||
|
},
|
||||||
|
cssClass: 'discart-expedient-modal',
|
||||||
|
backdropDismiss: false
|
||||||
|
});
|
||||||
|
|
||||||
|
await modal.present();
|
||||||
|
modal.onDidDismiss().then(res => {
|
||||||
|
if (res['data'] == 'close') {
|
||||||
|
this.close();
|
||||||
|
/*
|
||||||
|
this.close();
|
||||||
|
this.openMenu(); */
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
goBack() {
|
goBack() {
|
||||||
this.RouteService.goBack()
|
this.RouteService.goBack()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
export let versionData = {
|
export let versionData = {
|
||||||
"shortSHA": "070edbd4f",
|
"shortSHA": "66be958e2",
|
||||||
"SHA": "070edbd4faf94338eccc488162df486371263948",
|
"SHA": "66be958e2d7b21b9a80e567bcfc995ec9e53d7cc",
|
||||||
"branch": "no_bug_movemente",
|
"branch": "no_bug_movemente",
|
||||||
"lastCommitAuthor": "'Peter Maquiran'",
|
"lastCommitAuthor": "'Peter Maquiran'",
|
||||||
"lastCommitTime": "'Tue Mar 7 12:31:43 2023 +0100'",
|
"lastCommitTime": "'Thu Mar 9 12:21:09 2023 +0100'",
|
||||||
"lastCommitMessage": "fix begin date html erro",
|
"lastCommitMessage": "fix eventos para approvação not opening",
|
||||||
"lastCommitNumber": "4848",
|
"lastCommitNumber": "4849",
|
||||||
"change": "",
|
"change": "",
|
||||||
"changeStatus": "On branch no_bug_movemente\nChanges to be committed:\n (use \"git restore --staged <file>...\" to unstage)\n\tmodified: src/app/pages/agenda/agenda.page.html\n\tmodified: src/app/pages/gabinete-digital/gabinete-digital.page.ts\n\tmodified: src/app/pages/publications/publications.page.ts\n\tmodified: src/app/pages/publications/view-publications/view-publications.page.ts",
|
"changeStatus": "On branch no_bug_movemente\nAll conflicts fixed but you are still merging.\n (use \"git commit\" to conclude merge)\n\nChanges to be committed:\n\tmodified: src/app/modals/add-note/add-note.page.html\n\tmodified: src/app/modals/create-process/create-process.page.ts\n\tmodified: src/app/pages/gabinete-digital/diplomas-assinar/diploma-assinar/diploma-assinar.page.ts\n\tmodified: src/app/shared/popover/deploma-options/deploma-options.page.html\n\tmodified: src/app/shared/popover/deploma-options/deploma-options.page.ts\n\tmodified: version/git-version.ts",
|
||||||
"changeAuthor": "peter.maquiran"
|
"changeAuthor": "peter.maquiran"
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user