mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 21:35:50 +00:00
a lot of changes
This commit is contained in:
+45
-44
@@ -62,7 +62,7 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
onlinecheck: boolean;
|
||||
|
||||
loggeduser: LoginUserRespose;
|
||||
|
||||
|
||||
constructor(
|
||||
private processes: ProcessesService,
|
||||
private router: Router,
|
||||
@@ -84,7 +84,7 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
) {
|
||||
this.loggeduser = SessionStore.user
|
||||
// console.log('SessionStore', SessionStore)
|
||||
|
||||
|
||||
this.activatedRoute.paramMap.subscribe(params => {
|
||||
if (params["params"].SerialNumber) {
|
||||
this.serialNumber = params["params"].SerialNumber;
|
||||
@@ -114,13 +114,13 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
// updateProcessDB(res) {
|
||||
// if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
|
||||
// this.storage.set('expediente_details',res).then(() =>{
|
||||
|
||||
|
||||
// })
|
||||
// } else {
|
||||
// //this.sqliteservice.updateProcess(res)
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
// getFromDB() {
|
||||
// if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
|
||||
// this.storage.get('expediente_details').then((process) => {
|
||||
@@ -165,7 +165,7 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
// this.platform.ready().then(() => {
|
||||
// this.onlinecheck = false;
|
||||
// this.sqliteservice.getProcessById(this.serialNumber).then((process) => {
|
||||
|
||||
|
||||
|
||||
// var workflow = JSON.parse(process[0].workflowInstanceDataFields);
|
||||
// var origina
|
||||
@@ -229,7 +229,7 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
"AttachmentList": documents,
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
@@ -283,7 +283,7 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
component: AddNotePage,
|
||||
componentProps: {
|
||||
showAttachmentBtn: false,
|
||||
actionName:actionName
|
||||
actionName: actionName
|
||||
},
|
||||
cssClass: classs,
|
||||
//backdropDismiss: true
|
||||
@@ -292,7 +292,7 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
|
||||
|
||||
modal.onDidDismiss().then(res => {
|
||||
|
||||
|
||||
if (res.data) {
|
||||
const DocumentToSave = res.data.documents.map((e) => {
|
||||
return {
|
||||
@@ -337,7 +337,7 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
sendExpedienteToPending() {
|
||||
const loader = this.toastService.loading()
|
||||
this.processes.SetTaskToPending(this.serialNumber).subscribe(res => {
|
||||
|
||||
|
||||
this.httpErroHandle.httpsSucessMessagge('Enviar para Pendentes')
|
||||
this.TaskService.loadExpedientes()
|
||||
this.goBack();
|
||||
@@ -352,7 +352,7 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
async LoadTaskDetail(serial: string) {
|
||||
|
||||
this.processes.GetTask(serial).subscribe(res => {
|
||||
|
||||
|
||||
this.TaskService.loadExpedientes();
|
||||
|
||||
this.task = {
|
||||
@@ -444,11 +444,11 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
// }
|
||||
|
||||
getAttachments(serialNumber) {
|
||||
|
||||
|
||||
|
||||
this.attachmentsService.getAttachmentsBySerial(serialNumber).subscribe(res => {
|
||||
this.attachments = res;
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
@@ -472,9 +472,10 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
if (res) {
|
||||
const data = res.data;
|
||||
this.documents.push(data.selected);
|
||||
await this.documents.forEach( async (element: any) => {
|
||||
let body
|
||||
await this.documents.forEach(async (element: any) => {
|
||||
|
||||
let body = {
|
||||
body = {
|
||||
"InstanceID": this.task.InstanceID,
|
||||
"WorkflowDisplayName": this.task.WorkflowName,
|
||||
"FolderID": this.task.FolderId,
|
||||
@@ -485,22 +486,22 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
|
||||
const Attachments = this.searchDocumentPipe.transformToAttachment(element)
|
||||
body.Attachments = Attachments;
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
try {
|
||||
loader.remove()
|
||||
await this.attachmentsService.AddAttachment(body).toPromise()
|
||||
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()
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
try {
|
||||
loader.remove()
|
||||
await this.attachmentsService.AddAttachment(body).toPromise()
|
||||
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()
|
||||
}
|
||||
}
|
||||
}
|
||||
setTimeout(() => {
|
||||
this.LoadTaskDetail(this.serialNumber);
|
||||
@@ -563,8 +564,8 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
});
|
||||
|
||||
modal.onDidDismiss().then(async (res) => {
|
||||
|
||||
|
||||
|
||||
|
||||
if (body == 'descartar') {
|
||||
|
||||
this.TaskService.loadExpedientes()
|
||||
@@ -577,10 +578,10 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
this.toastService._successMessage('Processo descartado');
|
||||
this.goBack();
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
if (error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
|
||||
this.toastService._badRequest('Processo não descartado')
|
||||
}
|
||||
} finally {
|
||||
@@ -601,10 +602,10 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
//this.toastService._successMessage('Processo descartado');
|
||||
this.goBack();
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
if (error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
|
||||
this.toastService._badRequest('Processo não descartado')
|
||||
}
|
||||
} finally {
|
||||
@@ -613,17 +614,17 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
|
||||
}
|
||||
else if (res['data'] == 'No') {
|
||||
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
try {
|
||||
await this.processes.UpdateTaskStatus(this.task.FolderId).toPromise();
|
||||
this.toastService._successMessage();
|
||||
this.goBack();
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
if (error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
|
||||
this.toastService._badRequest()
|
||||
}
|
||||
} finally {
|
||||
@@ -639,7 +640,7 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
}
|
||||
|
||||
async openBookMeetingModal(task: any) {
|
||||
|
||||
|
||||
|
||||
let classs;
|
||||
if (window.innerWidth < 701) {
|
||||
@@ -651,7 +652,7 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
component: BookMeetingModalPage,
|
||||
componentProps: {
|
||||
task: this.task,
|
||||
fulltask:this.fulltask
|
||||
fulltask: this.fulltask
|
||||
},
|
||||
cssClass: classs,
|
||||
backdropDismiss: false
|
||||
@@ -671,7 +672,7 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
}
|
||||
|
||||
async viewEventDetail(eventId: any) {
|
||||
|
||||
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: ViewEventPage,
|
||||
@@ -722,7 +723,7 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
this.dataService.set("newGroupName", this.task.Folio);
|
||||
this.dataService.set("documents", this.fulltask.Documents);
|
||||
this.dataService.set("link", window.location.pathname);
|
||||
setTimeout(()=> {
|
||||
setTimeout(() => {
|
||||
this.router.navigate(['/home/chat']);
|
||||
}, 100)
|
||||
}
|
||||
@@ -739,12 +740,12 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
});
|
||||
|
||||
modal.onDidDismiss().then(
|
||||
()=>{},
|
||||
() => { },
|
||||
(error) => {
|
||||
console.log(error)
|
||||
})
|
||||
|
||||
await modal.present();
|
||||
await modal.present();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user