mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 13:02:56 +00:00
Merge branch 'developer' of https://bitbucket.org/equilibriumito/gabinete-digital into developer
This commit is contained in:
+4
-4
@@ -275,10 +275,10 @@ export class BookMeetingModalPage implements OnInit {
|
||||
|
||||
this.modalController.dismiss();
|
||||
// this.distartExpedientModal();
|
||||
this.toastService.successMessage('Reunião criada');
|
||||
this.toastService._successMessage('Reunião criada');
|
||||
|
||||
} catch (error) {
|
||||
this.toastService.badRequest('Reunião não criada')
|
||||
this.toastService._badRequest('Reunião não criada')
|
||||
}
|
||||
finally {
|
||||
loader.remove()
|
||||
@@ -300,10 +300,10 @@ export class BookMeetingModalPage implements OnInit {
|
||||
break;
|
||||
}
|
||||
this.close();
|
||||
this.toastService.successMessage('Reunião criada');
|
||||
this.toastService._successMessage('Reunião criada');
|
||||
|
||||
} catch (error) {
|
||||
this.toastService.badRequest()
|
||||
this.toastService._badRequest()
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
+11
-11
@@ -328,11 +328,11 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
try {
|
||||
|
||||
this.taskResult = await this.processes.postDespatcho(this.postData).toPromise();
|
||||
await this.toastService.successMessage('Processo efetuado');
|
||||
await this.toastService._successMessage('Processo efetuado');
|
||||
this.modalController.dismiss(action_despacho);
|
||||
|
||||
} catch (error) {
|
||||
await this.toastService.badRequest('Processo não efetuado')
|
||||
await this.toastService._badRequest('Processo não efetuado')
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
@@ -362,11 +362,11 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
|
||||
try {
|
||||
this.taskResult = await this.processes.postParecer(this.postData).toPromise();
|
||||
await this.toastService.successMessage('Pedido enviado');
|
||||
await this.toastService._successMessage('Pedido enviado');
|
||||
this.modalController.dismiss(action_parecer);
|
||||
|
||||
} catch (error) {
|
||||
await this.toastService.badRequest('Processo não efetuado')
|
||||
await this.toastService._badRequest('Processo não efetuado')
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
@@ -394,10 +394,10 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
try {
|
||||
|
||||
this.taskResult = await this.processes.postDeferimento(this.postData).toPromise();
|
||||
this.toastService.successMessage('Processo efetuado');
|
||||
this.toastService._successMessage('Processo efetuado');
|
||||
this.modalController.dismiss(action_deferimento);
|
||||
} catch (error) {
|
||||
await this.toastService.badRequest('Processo não efetuado')
|
||||
await this.toastService._badRequest('Processo não efetuado')
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
@@ -436,18 +436,18 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
if(this.postData.DispatchFolder.Message){
|
||||
try {
|
||||
this.taskResult = await this.despachoService.createDespacho(this.postData).toPromise();
|
||||
await this.toastService.successMessage('Processo efetuado');
|
||||
await this.toastService._successMessage('Processo efetuado');
|
||||
this.modalController.dismiss(action_despacho_pr);
|
||||
} catch (error) {
|
||||
|
||||
await this.toastService.badRequest('Processo não efetuado')
|
||||
await this.toastService._badRequest('Processo não efetuado')
|
||||
} finally {
|
||||
//loader.remove()
|
||||
}
|
||||
}
|
||||
else{
|
||||
this.validateField = true;
|
||||
this.toastService.badRequest('Por favor adicione uma descrição');
|
||||
this.toastService._badRequest('Por favor adicione uma descrição');
|
||||
}
|
||||
loader.remove();
|
||||
break;
|
||||
@@ -474,11 +474,11 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
|
||||
try {
|
||||
this.taskResult = await this.processes.postParecerPr(this.postData).toPromise();
|
||||
await this.toastService.successMessage('Pedido enviado');
|
||||
await this.toastService._successMessage('Pedido enviado');
|
||||
this.modalController.dismiss(action_parecer_pr);
|
||||
} catch (error) {
|
||||
|
||||
await this.toastService.badRequest('Processo não efetuado')
|
||||
await this.toastService._badRequest('Processo não efetuado')
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
+2
-3
@@ -111,7 +111,7 @@
|
||||
|
||||
<div *ngIf="task && p.userRole(['PR'])" class="aside-right flex-column height-100 overflow-y-auto">
|
||||
|
||||
<div class="buttons">
|
||||
<!-- <div class="buttons">
|
||||
<button (click)="openExpedientActionsModal('0', fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button>
|
||||
<button (click)="distartExpedientModal('descartar')" class="btn-cancel" shape="round" >Descartar</button>
|
||||
<div class="solid"></div>
|
||||
@@ -121,8 +121,7 @@
|
||||
<button (click)="openNewGroupPage(task)" class="btn-cancel" shape="round" >Iniciar Conversa</button>
|
||||
<div hidden class="solid"></div>
|
||||
<button hidden class="btn-cancel" shape="round" >Delegar</button>
|
||||
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
+17
-17
@@ -171,9 +171,9 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise();
|
||||
this.close();
|
||||
this.toastService.successMessage('Processo aprovado')
|
||||
this.toastService._successMessage('Processo aprovado')
|
||||
} catch (error) {
|
||||
this.toastService.badRequest('Processo não aprovado')
|
||||
this.toastService._badRequest('Processo não aprovado')
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
@@ -196,9 +196,9 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise()
|
||||
this.close();
|
||||
this.toastService.successMessage()
|
||||
this.toastService._successMessage()
|
||||
} catch (error) {
|
||||
this.toastService.badRequest()
|
||||
this.toastService._badRequest()
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
@@ -293,11 +293,11 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
sendExpedienteToPending() {
|
||||
this.processes.SetTaskToPending(this.serialNumber).subscribe(res => {
|
||||
console.log(res);
|
||||
this.toastService.successMessage('Processo enviado para pendentes')
|
||||
this.toastService._successMessage('Processo enviado para pendentes')
|
||||
this.goBack();
|
||||
},
|
||||
(error) => {
|
||||
this.toastService.badRequest('Processo não enviado para pendentes')
|
||||
this.toastService._badRequest('Processo não enviado para pendentes')
|
||||
});
|
||||
}
|
||||
|
||||
@@ -349,12 +349,12 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
this.getFromDB();
|
||||
} else {
|
||||
try {
|
||||
this.toastService.badRequest('Processo não encontrado')
|
||||
this.toastService._badRequest('Processo não encontrado')
|
||||
this.goBack()
|
||||
} catch (e) {
|
||||
window.history.back();
|
||||
}
|
||||
this.toastService.badRequest('Processo não encontrado')
|
||||
this.toastService._badRequest('Processo não encontrado')
|
||||
}
|
||||
});
|
||||
|
||||
@@ -441,9 +441,9 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
this.attachmentsService.AddAttachment(body).subscribe((res) => {
|
||||
this.toastService.successMessage()
|
||||
this.toastService._successMessage()
|
||||
}, () => {
|
||||
this.toastService.badRequest()
|
||||
this.toastService._badRequest()
|
||||
}, () => {
|
||||
loader.remove()
|
||||
});
|
||||
@@ -479,7 +479,7 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
await this.processes.CompleteTask(body).toPromise();
|
||||
this.goBack();
|
||||
} catch (error) {
|
||||
this.toastService.badRequest('Processo não descartado')
|
||||
this.toastService._badRequest('Processo não descartado')
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
@@ -510,10 +510,10 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
|
||||
try {
|
||||
await this.expedienteService.discard({ SerialNumber: this.task.SerialNumber }).toPromise()
|
||||
this.toastService.successMessage('Processo descartado');
|
||||
this.toastService._successMessage('Processo descartado');
|
||||
this.goBack();
|
||||
} catch (error) {
|
||||
this.toastService.badRequest('Processo não descartado')
|
||||
this.toastService._badRequest('Processo não descartado')
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
@@ -529,10 +529,10 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
const loader = this.toastService.loading()
|
||||
try {
|
||||
await this.expedienteService.CompleteTask(body).toPromise();
|
||||
//this.toastService.successMessage('Processo descartado');
|
||||
//this.toastService._successMessage('Processo descartado');
|
||||
this.goBack();
|
||||
} catch (error) {
|
||||
this.toastService.badRequest('Processo não descartado')
|
||||
this.toastService._badRequest('Processo não descartado')
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
@@ -543,10 +543,10 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
const loader = this.toastService.loading()
|
||||
try {
|
||||
await this.processes.UpdateTaskStatus(this.task.FolderId).toPromise();
|
||||
this.toastService.successMessage();
|
||||
this.toastService._successMessage();
|
||||
this.goBack();
|
||||
} catch (error) {
|
||||
this.toastService.badRequest()
|
||||
this.toastService._badRequest()
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ import { SqliteService } from 'src/app/services/sqlite.service';
|
||||
import { Platform } from '@ionic/angular';
|
||||
import { BackgroundService } from '../../../services/background.service';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
|
||||
import { SortService } from 'src/app/services/functions/sort.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-expediente',
|
||||
@@ -38,7 +38,8 @@ export class ExpedientePage implements OnInit {
|
||||
public platform: Platform,
|
||||
private sqliteservice: SqliteService,
|
||||
private backgroundservice: BackgroundService,
|
||||
public ThemeService: ThemeService
|
||||
public ThemeService: ThemeService,
|
||||
private sortService: SortService,
|
||||
) { }
|
||||
|
||||
ngOnInit() {
|
||||
@@ -70,7 +71,7 @@ export class ExpedientePage implements OnInit {
|
||||
const result = res
|
||||
|
||||
this.taskslist = new Array();
|
||||
let ress = result.reverse().filter((data: any) => data.workflowInstanceDataFields.Status == "Active");
|
||||
let ress = result.filter((data: any) => data.workflowInstanceDataFields.Status == "Active");
|
||||
|
||||
ress.forEach((element: any) => {
|
||||
|
||||
@@ -78,7 +79,7 @@ export class ExpedientePage implements OnInit {
|
||||
this.taskslist.push(task);
|
||||
this.addProcessTODb(task);
|
||||
});
|
||||
this.listToPresent = this.taskslist
|
||||
this.listToPresent = this.sortService.sortDate(this.taskslist, 'taskStartDate')
|
||||
console.log('expediente list', this.listToPresent)
|
||||
|
||||
this.skeletonLoader = false;
|
||||
|
||||
Reference in New Issue
Block a user