mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
improve
This commit is contained in:
@@ -131,8 +131,7 @@ export class DespachosPrPage implements OnInit {
|
||||
if(SessionStore.user.Profile != 'Consultant') {
|
||||
despachosPr = await despachos.reverse().filter(data => data.activityInstanceName == "Tarefa de Despacho");
|
||||
} else {
|
||||
despachosPr = await despachos.reverse().filter(data => data.activityInstanceName == "Tarefa de Despacho" ||
|
||||
data.activityInstanceName == "Gerar Diploma");
|
||||
despachosPr = await despachos.reverse().filter(data => data.activityInstanceName == "Gerar Diploma" || data.activityInstanceName == "Retificar Diploma");
|
||||
}
|
||||
|
||||
|
||||
|
||||
+58
-19
@@ -12,6 +12,7 @@ import { RouteService } from 'src/app/services/route.service';
|
||||
import { BookMeetingModalPage } from '../../expediente/book-meeting-modal/book-meeting-modal.page';
|
||||
import { DespachoService } from 'src/app/Rules/despacho.service'
|
||||
import { DelegarPage } from 'src/app/modals/delegar/delegar.page';
|
||||
import { AddNotePage } from 'src/app/modals/add-note/add-note.page';
|
||||
|
||||
@Component({
|
||||
selector: 'app-diplomas-gerar',
|
||||
@@ -196,28 +197,66 @@ export class DiplomasGerarPage implements OnInit {
|
||||
|
||||
|
||||
async enviarDiploma({note = '', documents = [], serialnumber}) {
|
||||
let body = {
|
||||
"serialNumber": serialnumber,
|
||||
"action": "Enviar diploma",
|
||||
"ActionTypeId": 104,
|
||||
"dataFields": {
|
||||
"ReviewUserComment": note,
|
||||
|
||||
let classs;
|
||||
if (window.innerWidth <= 800) {
|
||||
classs = 'modal modal-desktop'
|
||||
} else {
|
||||
classs = 'add-note-modal-no-height'
|
||||
}
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: AddNotePage,
|
||||
componentProps: {
|
||||
showAttachmentBtn: true,
|
||||
},
|
||||
"AttachmentList" :documents,
|
||||
}
|
||||
cssClass: classs,
|
||||
backdropDismiss: true
|
||||
});
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
await modal.present();
|
||||
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise();
|
||||
this.modalController.dismiss('sucess');
|
||||
this.toastService._successMessage('Parecer enviado');
|
||||
this.goBack()
|
||||
} catch (error) {
|
||||
this.toastService._badRequest("Parecer não solicitado");
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
modal.onDidDismiss().then(async (res) => {
|
||||
if (res.data) {
|
||||
|
||||
const DocumentToSave = res.data.documents.map((e) => {
|
||||
return {
|
||||
ApplicationId: e.ApplicationType,
|
||||
SourceId: e.Id,
|
||||
}
|
||||
});
|
||||
|
||||
let docs = {
|
||||
ProcessInstanceID: "",
|
||||
Attachments: DocumentToSave,
|
||||
}
|
||||
|
||||
let body = {
|
||||
"serialNumber": serialnumber,
|
||||
"action": "Enviar diploma",
|
||||
"ActionTypeId": 104,
|
||||
"dataFields": {
|
||||
"ReviewUserComment": res.data.note,
|
||||
},
|
||||
"AttachmentList" : docs,
|
||||
}
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise();
|
||||
this.modalController.dismiss('sucess');
|
||||
this.toastService._successMessage();
|
||||
this.goBack()
|
||||
} catch (error) {
|
||||
this.toastService._badRequest();
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -248,7 +248,7 @@
|
||||
</div>
|
||||
|
||||
<p class="text-center exp-card-title" >Diplomas por elaborar</p>
|
||||
<p class="text-center exp-card-content">{{ despachoprstore.count }} <span class="title1">Documentos</span></p>
|
||||
<p class="text-center exp-card-content">{{ deplomasStore.DiplomaGerarList.length }} <span class="title1">Documentos</span></p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
@@ -540,7 +540,7 @@ export class GabineteDigitalPage implements OnInit, DoCheck {
|
||||
get AllProcess() {
|
||||
return this.expedientegbstore.list.concat(this.pedidosstore.listparecer).concat(this.pedidosstore.listdeferimento)
|
||||
.concat(this.despachoprstore.list).concat(this.eventoaprovacaostore.listmd).concat(this.eventoaprovacaostore.listpr)
|
||||
.concat(this.deplomasStore.diplomasParaAssinarList).concat(this.deplomasStore.diplomasAssinadoList).concat(this.despachoStore.list)
|
||||
.concat(this.deplomasStore.diplomasParaAssinarList).concat(this.deplomasStore.diplomasAssinadoList).concat(this.despachoStore.list).concat(this.deplomasStore.DiplomaGerarList)
|
||||
}
|
||||
|
||||
get getAllProcessCount() {
|
||||
@@ -557,8 +557,6 @@ export class GabineteDigitalPage implements OnInit, DoCheck {
|
||||
} catch(error) {
|
||||
this.loadCount = true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
expedientes = expedientes.filter(data => data.workflowInstanceDataFields.Status == "Active")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user