mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-21 13:55:51 +00:00
save
This commit is contained in:
@@ -38,7 +38,7 @@ export class AppComponent {
|
||||
private sqliteservice: SqliteService,
|
||||
private InativityService: InativityService,
|
||||
public ThemeService: ThemeService,
|
||||
private storage: Storage,
|
||||
private storage: Storage
|
||||
) {
|
||||
this.initializeApp();
|
||||
this.storage.set('version', environment.version).then(() => {})
|
||||
@@ -62,7 +62,7 @@ export class AppComponent {
|
||||
try {
|
||||
this.sqliteservice.databaseConn();
|
||||
} catch (error) {
|
||||
console.error("Error creating local database: ", error)
|
||||
console.error("Error creating local database: ", error)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -393,16 +393,21 @@ export class NewEventPage implements OnInit {
|
||||
if(this.loggeduser.Profile == 'MDGPR') {
|
||||
|
||||
eventId = await this.eventService.postEventGeneric(this.postEvent, this.postEvent.CalendarName, CalendarId).toPromise();
|
||||
|
||||
this.toastService._successMessage('Evento criado');
|
||||
|
||||
}
|
||||
else if(this.loggeduser.Profile == 'PR') {
|
||||
|
||||
const CalendarId = this.selectedCalendarId()
|
||||
eventId = await this.eventService.postEventGeneric(this.postEvent, this.postEvent.CalendarName, CalendarId).toPromise();
|
||||
this.toastService._successMessage('Evento criado');
|
||||
|
||||
} else {
|
||||
|
||||
const CalendarId = this.selectedCalendarId()
|
||||
eventId = await this.eventService.postEventGeneric(this.postEvent, this.postEvent.CalendarName, CalendarId).toPromise();
|
||||
this.toastService._successMessage('Evento criado');
|
||||
|
||||
}
|
||||
|
||||
const DocumentToSave: EventAttachment[] = this.documents.map((e) => {
|
||||
@@ -440,7 +445,6 @@ export class NewEventPage implements OnInit {
|
||||
this.chatMethodService.sendMessage(this.roomId, data1);
|
||||
}
|
||||
|
||||
this.toastService._successMessage()
|
||||
let data = Object.assign(this.postEvent,{id:eventId})
|
||||
this.modalController.dismiss(data);
|
||||
|
||||
|
||||
@@ -222,7 +222,8 @@ export class ChatPage implements OnInit {
|
||||
this.idSelected = '';
|
||||
this.hideRefreshBtn = false;
|
||||
this.closeAllDesktopComponents()
|
||||
this.ChatSystemService.getRoomById(this.roomId).roomLeave()
|
||||
|
||||
this.ChatSystemService.getRoomById(this.roomId)?.roomLeave()
|
||||
}
|
||||
else {
|
||||
this.hideRefreshBtn = true;
|
||||
|
||||
@@ -388,11 +388,11 @@ export class DespachoPage implements OnInit {
|
||||
this.despachoService.sendExpedienteToPending(this.serialnumber).subscribe(res => {
|
||||
this.goBack();
|
||||
loader.remove()
|
||||
this.toastService.successMessage()
|
||||
this.toastService._successMessage("Processo enviado para pendestes")
|
||||
},
|
||||
error => {
|
||||
loader.remove()
|
||||
this.toastService.badRequest("Processo não enviado para despacho")
|
||||
this.toastService._badRequest("Processo não enviado para pendestes")
|
||||
});
|
||||
// loader.remove()
|
||||
}
|
||||
|
||||
@@ -182,11 +182,9 @@ export class GabineteDigitalPage implements OnInit {
|
||||
if(this.NotificationsService.active === false) {
|
||||
this.checkRoutes();
|
||||
this.LoadCounts();
|
||||
this.updateAllProcess()
|
||||
} else {
|
||||
this.checkRoutes();
|
||||
this.LoadCounts();
|
||||
this.updateAllProcess()
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -657,11 +655,9 @@ export class GabineteDigitalPage implements OnInit {
|
||||
expedientes = expedientes.map((element) => this.expedienteTaskPipe.transform(element));
|
||||
|
||||
this.expedientegbstore.reset(expedientes);
|
||||
this.updateAllProcess()
|
||||
|
||||
|
||||
let despachos = await this.despachoRule.getList({ updateStore: true })
|
||||
this.updateAllProcess()
|
||||
if (despachos) {
|
||||
this.despachoStore.reset(despachos)
|
||||
}
|
||||
@@ -712,7 +708,6 @@ export class GabineteDigitalPage implements OnInit {
|
||||
pendentes = pendentes.map((element)=> this.customTaskPipe.transform(element))
|
||||
|
||||
this.pendentesstore.reset(pendentes);
|
||||
this.updateAllProcess()
|
||||
|
||||
let depachoAPI = await this.processesbackend.GetTasksList("Despacho do Presidente da República", false).toPromise();
|
||||
|
||||
@@ -725,15 +720,49 @@ export class GabineteDigitalPage implements OnInit {
|
||||
depacho = depacho.map((e)=> this.customTaskPipe.transform(e))
|
||||
|
||||
this.despachoprstore.reset(depacho)
|
||||
this.updateAllProcess()
|
||||
|
||||
} else if(SessionStore.user.Profile == 'PR') {
|
||||
|
||||
let depacho: any = depachoAPI.filter(data => data.activityInstanceName == "Concluir Despacho").filter(data => data.workflowInstanceDataFields.Status == "Active")
|
||||
depacho = depacho.map((e)=> this.customTaskPipe.transform(e))
|
||||
this.despachoprstore.reset(depacho)
|
||||
this.updateAllProcess()
|
||||
|
||||
}
|
||||
|
||||
let diplomasValidar = depachoAPI.filter(data => data.activityInstanceName == "Revisar Diploma");
|
||||
|
||||
diplomasValidar = diplomasValidar.filter(data => data.activityInstanceName != "Tarefa de Despacho");
|
||||
|
||||
|
||||
this.deplomasStore.resetDiplomasReview(diplomasValidar.map((element)=> {
|
||||
|
||||
let date = new Date(element.taskStartDate);
|
||||
date.setMonth(date.getMonth() + 1);
|
||||
let taskDate = date.getFullYear()+"-"+ date.getMonth()+"-"+date.getDate()+" "+date.getHours()+":"+date.getMinutes()+ ":"+date.getSeconds();
|
||||
|
||||
return {
|
||||
"SerialNumber": element.serialNumber,
|
||||
"Folio": element.workflowInstanceDataFields.Subject,
|
||||
"Senders": element.workflowInstanceDataFields.Sender,
|
||||
"CreateDate": taskDate,
|
||||
"DocumentURL": element.workflowInstanceDataFields.ViewerRequest,
|
||||
"Remetente": element.workflowInstanceDataFields.Remetente,
|
||||
"DocumentsQty": element.totalDocuments,
|
||||
"DocId": element.workflowInstanceDataFields.DocIdDiferimento,
|
||||
"WorkflowName": element.workflowDisplayName,
|
||||
"activityInstanceName": element.activityInstanceName,
|
||||
"Status": element.workflowInstanceDataFields.Status,
|
||||
}
|
||||
}))
|
||||
|
||||
|
||||
let diplomasAssinar: any = depachoAPI.filter(data => data.activityInstanceName == "Assinar Diploma");
|
||||
diplomasAssinar = diplomasAssinar.map((element) => this.expedienteTaskPipe.transform(element))
|
||||
this.deplomasStore.resetDiplomasParaAssinar(diplomasAssinar)
|
||||
|
||||
let diplomasAssinados: any = depachoAPI.filter(data => data.activityInstanceName == "Diploma Assinado");
|
||||
diplomasAssinados = diplomasAssinados.map((element) => this.expedienteTaskPipe.transform(element))
|
||||
this.deplomasStore.resetDiplomasAssinadoList(diplomasAssinados)
|
||||
|
||||
for(let calendar of this.eventService.calendarNamesAry) {
|
||||
if(calendar == 'Meu calendario') {
|
||||
@@ -776,45 +805,8 @@ export class GabineteDigitalPage implements OnInit {
|
||||
|
||||
// this.eventoaprovacaostore.countPr = eventsPRList.length
|
||||
// this.eventoaprovacaostore.resetpr(eventsPRList);
|
||||
this.updateAllProcess()
|
||||
|
||||
let diplomasValidar = depachoAPI.filter(data => data.activityInstanceName == "Revisar Diploma");
|
||||
|
||||
diplomasValidar = diplomasValidar.filter(data => data.activityInstanceName != "Tarefa de Despacho");
|
||||
|
||||
|
||||
this.deplomasStore.resetDiplomasReview(diplomasValidar.map((element)=> {
|
||||
|
||||
let date = new Date(element.taskStartDate);
|
||||
date.setMonth(date.getMonth() + 1);
|
||||
let taskDate = date.getFullYear()+"-"+ date.getMonth()+"-"+date.getDate()+" "+date.getHours()+":"+date.getMinutes()+ ":"+date.getSeconds();
|
||||
|
||||
return {
|
||||
"SerialNumber": element.serialNumber,
|
||||
"Folio": element.workflowInstanceDataFields.Subject,
|
||||
"Senders": element.workflowInstanceDataFields.Sender,
|
||||
"CreateDate": taskDate,
|
||||
"DocumentURL": element.workflowInstanceDataFields.ViewerRequest,
|
||||
"Remetente": element.workflowInstanceDataFields.Remetente,
|
||||
"DocumentsQty": element.totalDocuments,
|
||||
"DocId": element.workflowInstanceDataFields.DocIdDiferimento,
|
||||
"WorkflowName": element.workflowDisplayName,
|
||||
"activityInstanceName": element.activityInstanceName,
|
||||
"Status": element.workflowInstanceDataFields.Status,
|
||||
}
|
||||
}))
|
||||
|
||||
|
||||
let diplomasAssinar: any = depachoAPI.filter(data => data.activityInstanceName == "Assinar Diploma");
|
||||
diplomasAssinar = diplomasAssinar.map((element) => this.expedienteTaskPipe.transform(element))
|
||||
this.deplomasStore.resetDiplomasParaAssinar(diplomasAssinar)
|
||||
|
||||
let diplomasAssinados: any = depachoAPI.filter(data => data.activityInstanceName == "Diploma Assinado");
|
||||
diplomasAssinados = diplomasAssinados.map((element) => this.expedienteTaskPipe.transform(element))
|
||||
this.deplomasStore.resetDiplomasAssinadoList(diplomasAssinados)
|
||||
|
||||
|
||||
this.updateAllProcess()
|
||||
this.loadCount = true
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
<img src="/assets/icon/icon-no-image.svg" alt="image">
|
||||
</div>
|
||||
<div class="post-description">
|
||||
<p>{{publication.Message}}</p>
|
||||
<pre class="text">{{publication.Message}}</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@
|
||||
<img src="/assets/icon/icon-no-image.svg" alt="image">
|
||||
</div>
|
||||
<div class="post-description px-20">
|
||||
<p>{{publication.Message}}</p>
|
||||
<pre class="text">{{publication.Message}}</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
<div class="post-data">{{publication.DatePublication | date: 'dd-MM-yy HH:mm'}}</div>
|
||||
</div>
|
||||
<div class="post-description">
|
||||
<p>{{publication.Message}}</p>
|
||||
<pre class="text">{{publication.Message}}</pre>
|
||||
</div>
|
||||
</div>
|
||||
</ion-card-content>
|
||||
|
||||
@@ -562,7 +562,9 @@ export class MessageService {
|
||||
}
|
||||
|
||||
for( const [name, value] of Object.entries(message)) {
|
||||
this.rowInstance[name] = value
|
||||
try {
|
||||
this.rowInstance[name] = value
|
||||
} catch (error) {}
|
||||
}
|
||||
|
||||
await this.rowInstance.save()
|
||||
|
||||
@@ -42,23 +42,23 @@ export class AllProcessesPage implements OnInit {
|
||||
) {
|
||||
this.loggeduser = SessionStore.user;
|
||||
|
||||
window['all-process'] = this.updateAllProcess
|
||||
window['all-process'] = () => {
|
||||
if(window.location.href.includes('?processes=true')) {
|
||||
this.updateAllProcess()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.updateAllProcess()
|
||||
|
||||
// this.loadAllProcesses();
|
||||
this.updateAllProcess()
|
||||
|
||||
this.router.events.forEach((event) => {
|
||||
if (event instanceof NavigationStart && event.url.startsWith('/home/gabinete-digital')) {
|
||||
if (window.location.pathname.startsWith('/home/gabinete-digital')) {
|
||||
this.refreshing();
|
||||
} else {
|
||||
// this.loadAllProcesses();
|
||||
}
|
||||
this.router.events.forEach((event) => {
|
||||
if (event instanceof NavigationStart && event.url.startsWith('/home/gabinete-digital')) {
|
||||
if (window.location.pathname.startsWith('/home/gabinete-digital')) {
|
||||
this.refreshing();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
doRefresh(event) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<div class="header-container">
|
||||
<div class="header-container header-fix">
|
||||
<div class="main-tab pb-10 ion-toolbar header-color">
|
||||
|
||||
<div class="mobile pt-20 d-flex div-top-header justify-space-between">
|
||||
|
||||
@@ -73,8 +73,8 @@ export class DespachosOptionsPage implements OnInit {
|
||||
sendExpedienteToPending() {
|
||||
const loader = this.toastService.loading()
|
||||
this.popoverController.dismiss();
|
||||
this.processes.SetTaskToPending(this.task.SerialNumber).subscribe(res=>{
|
||||
this.toastService._successMessage()
|
||||
this.processes.SetTaskToPending(this.task.SerialNumber).subscribe(res => {
|
||||
this.toastService._successMessage("Processo enviado para pendestes")
|
||||
loader.remove()
|
||||
|
||||
this.close();
|
||||
|
||||
@@ -255,7 +255,14 @@ export class NewPublicationPage implements OnInit {
|
||||
try {
|
||||
|
||||
await this.publications.CreatePublication(this.folderId, this.publication).toPromise()
|
||||
this.toastService._successMessage()
|
||||
if(this.publicationTitle == '1') {
|
||||
|
||||
} else if (this.publicationTitle == '2') {
|
||||
this.toastService._successMessage('Publicação criado')
|
||||
} else if (this.publicationTitle == '3') {
|
||||
this.toastService._successMessage('Publicação atualizada')
|
||||
}
|
||||
|
||||
|
||||
this.goBackToViewPublications.emit();
|
||||
} catch (error) {
|
||||
|
||||
+1
-1
@@ -37,7 +37,7 @@
|
||||
<img src="/assets/icon/icon-no-image.svg" alt="image">
|
||||
</div>
|
||||
<div class="post-description">
|
||||
<p>{{publication.Message}}</p>
|
||||
<pre class="text">{{publication.Message}}</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
<div class="post-data">{{publication.DatePublication | date: 'dd-MM-yy HH:mm'}}</div>
|
||||
</div>
|
||||
<div class="post-description">
|
||||
<p>{{publication.Message}}</p>
|
||||
<pre class="text">{{publication.Message}}</pre>
|
||||
</div>
|
||||
</div>
|
||||
</ion-card-content>
|
||||
|
||||
@@ -105,9 +105,6 @@ export class DeplomasService {
|
||||
this._diplomasAssinadoListCount = value.length
|
||||
this._diplomasAssinadoList = value
|
||||
this.saveDiplomasAssinadoList()
|
||||
if(window['all-process']) {
|
||||
window['all-process']()
|
||||
}
|
||||
if(window['all-process-gabinete']) {
|
||||
window['all-process-gabinete']()
|
||||
}
|
||||
@@ -119,9 +116,6 @@ export class DeplomasService {
|
||||
this._diplomasParaAssinar = value
|
||||
this.saveDiplomasParaAssinar()
|
||||
|
||||
if(window['all-process']) {
|
||||
window['all-process']()
|
||||
}
|
||||
if(window['all-process-gabinete']) {
|
||||
window['all-process-gabinete']()
|
||||
}
|
||||
@@ -132,9 +126,6 @@ export class DeplomasService {
|
||||
this._diplomasReviewCount = value.length
|
||||
this.saveDiplomasReviewList()
|
||||
|
||||
if(window['all-process']) {
|
||||
window['all-process']()
|
||||
}
|
||||
if(window['all-process-gabinete']) {
|
||||
window['all-process-gabinete']()
|
||||
}
|
||||
@@ -146,9 +137,6 @@ export class DeplomasService {
|
||||
this._diplomasGerarList = value
|
||||
|
||||
this.savetDiplomaGerar()
|
||||
if(window['all-process']) {
|
||||
window['all-process']()
|
||||
}
|
||||
if(window['all-process-gabinete']) {
|
||||
window['all-process-gabinete']()
|
||||
}
|
||||
|
||||
@@ -110,9 +110,6 @@ export class DespachoStoreService {
|
||||
this._list = eventsList
|
||||
this.save({dynamicCount:true})
|
||||
|
||||
if(window['all-process']) {
|
||||
window['all-process']()
|
||||
}
|
||||
if(window['all-process-gabinete']) {
|
||||
window['all-process-gabinete']()
|
||||
}
|
||||
|
||||
@@ -39,9 +39,6 @@ reset(eventsList: any) {
|
||||
this.count = this._list.length
|
||||
this.save()
|
||||
|
||||
if(window['all-process']) {
|
||||
window['all-process']()
|
||||
}
|
||||
if(window['all-process-gabinete']) {
|
||||
window['all-process-gabinete']()
|
||||
}
|
||||
|
||||
@@ -61,10 +61,6 @@ export class EventoaprovacaoStoreService {
|
||||
})
|
||||
}, 10)
|
||||
|
||||
|
||||
if(window['all-process']) {
|
||||
window['all-process']()
|
||||
}
|
||||
if(window['all-process-gabinete']) {
|
||||
window['all-process-gabinete']()
|
||||
}
|
||||
|
||||
@@ -37,9 +37,6 @@ export class ExpedientegdStoreService {
|
||||
this._list = eventsList
|
||||
this.save()
|
||||
|
||||
if(window['all-process']) {
|
||||
window['all-process']()
|
||||
}
|
||||
if(window['all-process-gabinete']) {
|
||||
window['all-process-gabinete']()
|
||||
}
|
||||
|
||||
@@ -62,9 +62,6 @@ export class PedidosStoreService {
|
||||
|
||||
this.countparecer = this._listParecer.length
|
||||
this.saveDeferimento()
|
||||
if(window['all-process']) {
|
||||
window['all-process']()
|
||||
}
|
||||
if(window['all-process-gabinete']) {
|
||||
window['all-process-gabinete']()
|
||||
}
|
||||
@@ -75,9 +72,6 @@ export class PedidosStoreService {
|
||||
|
||||
this.countdeferimento =this._listDeferimento.length
|
||||
this.saveParecer()
|
||||
if(window['all-process']) {
|
||||
window['all-process']()
|
||||
}
|
||||
if(window['all-process-gabinete']) {
|
||||
window['all-process-gabinete']()
|
||||
}
|
||||
|
||||
@@ -42,9 +42,6 @@ export class PendestesStoreService {
|
||||
|
||||
this.count = this._list.length
|
||||
this.save()
|
||||
if(window['all-process']) {
|
||||
window['all-process']()
|
||||
}
|
||||
if(window['all-process-gabinete']) {
|
||||
window['all-process-gabinete']()
|
||||
}
|
||||
|
||||
@@ -32,9 +32,6 @@ export class PresidentialActionsStoreService {
|
||||
this._list = list
|
||||
|
||||
this.save(this._list)
|
||||
if(window['all-process']) {
|
||||
window['all-process']()
|
||||
}
|
||||
if(window['all-process-gabinete']) {
|
||||
window['all-process-gabinete']()
|
||||
}
|
||||
|
||||
@@ -38,9 +38,6 @@ export class ToDayEventStorageService {
|
||||
reset(eventsList: EventList[]) {
|
||||
this._eventsList = eventsList
|
||||
this.save()
|
||||
if(window['all-process']) {
|
||||
window['all-process']()
|
||||
}
|
||||
if(window['all-process-gabinete']) {
|
||||
window['all-process-gabinete']()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user