mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
All changes i made
This commit is contained in:
@@ -38,7 +38,7 @@
|
||||
<ion-icon slot="start" src="assets/images/icons-location.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class" [class.input-error]="Form?.get('Location')?.invalid && validateFrom ">
|
||||
<ion-input autocomplete="on" autocorrect="on" spellcheck="true" placeholder="Localização*" [(ngModel)]="postEvent.Location"></ion-input>
|
||||
<ion-input autocomplete="on" autocorrect="on" spellcheck="true" placeholder="Localização" [(ngModel)]="postEvent.Location"></ion-input>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -350,6 +350,6 @@
|
||||
<ion-footer class="background-whit">
|
||||
<div class="buttons">
|
||||
<button class="btn-cancel cursor-pointer" shape="round" (click)="close()">Cancelar</button>
|
||||
<button class="btn-ok cursor-pointer" shape="round" (click)="save()">Enviar</button>
|
||||
<button class="btn-ok cursor-pointer" shape="round" (click)="save()">Gravar</button>
|
||||
</div>
|
||||
</ion-footer>
|
||||
|
||||
@@ -15,6 +15,7 @@ import { ThemeService } from 'src/app/services/theme.service';
|
||||
import { NgxMatDateFormats } from '@angular-material-components/datetime-picker';
|
||||
import { NGX_MAT_DATE_FORMATS } from '@angular-material-components/datetime-picker';
|
||||
import { SessionStore } from 'src/app/store/session.service';
|
||||
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service'
|
||||
|
||||
|
||||
const CUSTOM_DATE_FORMATS: NgxMatDateFormats = {
|
||||
@@ -90,7 +91,8 @@ export class EditEventPage implements OnInit {
|
||||
private attachmentsService: AttachmentsService,
|
||||
private toastService: ToastService,
|
||||
private router: Router,
|
||||
public ThemeService: ThemeService
|
||||
public ThemeService: ThemeService,
|
||||
private httpErrorHandle: HttpErrorHandle
|
||||
) {
|
||||
|
||||
/* this.postEvent = new Event(); */
|
||||
@@ -343,15 +345,10 @@ export class EditEventPage implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
this.toastService._successMessage();
|
||||
this.httpErrorHandle.httpsSucessMessagge('Editar evento')
|
||||
|
||||
}, error => {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest()
|
||||
}
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
});
|
||||
} else {
|
||||
this.eventsService.editEvent(this.postEvent, 2, 3, this.postEvent.CalendarId).subscribe(async () => {
|
||||
@@ -371,15 +368,10 @@ export class EditEventPage implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
this.toastService._successMessage();
|
||||
this.httpErrorHandle.httpsSucessMessagge('Editar evento')
|
||||
|
||||
}, error => {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest()
|
||||
}
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ import { EditEventToApproveComponent } from 'src/app/shared/gabinete-digital/edi
|
||||
import { EmendMessageModalPage } from '../emend-message-modal/emend-message-modal.page';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { RouteService } from 'src/app/services/route.service';
|
||||
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
|
||||
|
||||
|
||||
@Component({
|
||||
@@ -25,6 +26,7 @@ export class EventActionsPopoverPage implements OnInit {
|
||||
private popoverController: PopoverController,
|
||||
private toastService: ToastService,
|
||||
private RouteService: RouteService,
|
||||
private httpErrorHandle: HttpErrorHandle,
|
||||
public ThemeService: ThemeService) {
|
||||
this.serialNumber = this.navParams.get('serialNumber');
|
||||
this.instanceId = this.navParams.get('InstanceId');
|
||||
@@ -57,15 +59,10 @@ export class EventActionsPopoverPage implements OnInit {
|
||||
try {
|
||||
await this.processes.PostTaskAction(body).toPromise()
|
||||
|
||||
this.toastService._successMessage('Evento aprovar')
|
||||
this.httpErrorHandle.httpsSucessMessagge('Evento aprovação')
|
||||
this.goBack();
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest('Evento não aprovar')
|
||||
}
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
}
|
||||
finally {
|
||||
loader.remove()
|
||||
@@ -81,15 +78,10 @@ export class EventActionsPopoverPage implements OnInit {
|
||||
try {
|
||||
await this.processes.PostTaskAction(body).toPromise()
|
||||
|
||||
this.toastService._successMessage('Evento enviado para revisão');
|
||||
this.httpErrorHandle.httpsSucessMessagge('Rever')
|
||||
this.goBack();
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest('Evento não enviado para revisão');
|
||||
}
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
}
|
||||
finally {
|
||||
loader.remove()
|
||||
@@ -128,15 +120,10 @@ export class EventActionsPopoverPage implements OnInit {
|
||||
|
||||
try {
|
||||
await this.processes.PostTaskAction(body).toPromise();
|
||||
this.toastService._successMessage('Evento enviado para revisão');
|
||||
this.httpErrorHandle.httpsSucessMessagge('Rever')
|
||||
this.goBack();
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest('Evento não enviado para revisão');
|
||||
}
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
this.toastService.badRequest();
|
||||
}
|
||||
finally {
|
||||
@@ -159,15 +146,10 @@ export class EventActionsPopoverPage implements OnInit {
|
||||
const loader = this.toastService.loading();
|
||||
try {
|
||||
await this.processes.PostTaskAction(body).toPromise();
|
||||
this.toastService._successMessage('Evento rejeitado')
|
||||
this.httpErrorHandle.httpsSucessMessagge('Rejeitar')
|
||||
this.goBack();
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest('Evento não rejeitado')
|
||||
}
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
}
|
||||
finally {
|
||||
loader.remove();
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
<ion-icon slot="start" src="assets/images/icons-location.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class" [class.input-error]="Form?.get('Location')?.invalid && validateFrom ">
|
||||
<ion-input autocomplete="on" autocorrect="on" spellcheck="true" placeholder="Localização*" [(ngModel)]="postEvent.Location"></ion-input>
|
||||
<ion-input autocomplete="on" autocorrect="on" spellcheck="true" placeholder="Localização" [(ngModel)]="postEvent.Location"></ion-input>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -329,7 +329,7 @@
|
||||
<ion-title></ion-title>
|
||||
<ion-buttons slot="end">
|
||||
<button class="btn-ok cursor-pointer" fill="clear" color="#fff" (click)="save()">
|
||||
<ion-label>Enviar</ion-label>
|
||||
<ion-label>Gravar</ion-label>
|
||||
</button>
|
||||
</ion-buttons>
|
||||
</ion-toolbar>
|
||||
|
||||
@@ -18,6 +18,7 @@ import { NgxMatDateFormats } from '@angular-material-components/datetime-picker'
|
||||
import { NGX_MAT_DATE_FORMATS } from '@angular-material-components/datetime-picker';
|
||||
import { SessionStore } from 'src/app/store/session.service';
|
||||
import { ChatMethodsService } from 'src/app/services/chat/chat-methods.service';
|
||||
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
|
||||
|
||||
const CUSTOM_DATE_FORMATS: NgxMatDateFormats = {
|
||||
parse: {
|
||||
@@ -97,6 +98,7 @@ export class NewEventPage implements OnInit {
|
||||
public ThemeService: ThemeService,
|
||||
private platform: Platform,
|
||||
private chatMethodService: ChatMethodsService,
|
||||
private hhtpErrorHandle: HttpErrorHandle
|
||||
) {
|
||||
this.loggeduser = SessionStore.user;
|
||||
this.postEvent = new Event();
|
||||
@@ -440,17 +442,12 @@ export class NewEventPage implements OnInit {
|
||||
this.chatMethodService.sendMessage(this.roomId, data1);
|
||||
}
|
||||
|
||||
this.toastService._successMessage()
|
||||
this.hhtpErrorHandle.httpsSucessMessagge('new event');
|
||||
let data = Object.assign(this.postEvent,{id:eventId})
|
||||
this.modalController.dismiss(data);
|
||||
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest()
|
||||
}
|
||||
this.hhtpErrorHandle.httpStatusHandle(error)
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@ import { RouteService } from 'src/app/services/route.service';
|
||||
import { Storage } from '@ionic/storage';
|
||||
import { SessionStore } from 'src/app/store/session.service';
|
||||
import { CalendarService } from 'src/app/store/calendar.service';
|
||||
import { HttpErrorHandle} from 'src/app/services/http-error-handle.service'
|
||||
|
||||
|
||||
@Component({
|
||||
@@ -72,6 +73,7 @@ export class ViewEventPage implements OnInit {
|
||||
private RouteService: RouteService,
|
||||
private ionicStorage: Storage,
|
||||
private CalendarService: CalendarService,
|
||||
private httpErrorHandle: HttpErrorHandle
|
||||
) {
|
||||
|
||||
|
||||
@@ -199,7 +201,7 @@ export class ViewEventPage implements OnInit {
|
||||
if (error.status === 0) {
|
||||
this.getFromDb();
|
||||
} else {
|
||||
this.toastService.badRequest('Este evento já não existe na sua agenda')
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
loader.remove()
|
||||
this.modalController.dismiss('Eevent not Foud');
|
||||
this.RouteService.goBack();
|
||||
@@ -277,7 +279,7 @@ export class ViewEventPage implements OnInit {
|
||||
alert.dismiss();
|
||||
}, 1500);
|
||||
this.goBack();
|
||||
this.toastService._successMessage('Evento apagado');
|
||||
this.httpErrorHandle.httpsSucessMessagge('delete event')
|
||||
}, () => { },
|
||||
() => {
|
||||
loader.remove();
|
||||
|
||||
@@ -188,9 +188,7 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
let containerHeight = windowHeight - e.srcElement.clientHeight;
|
||||
|
||||
if (scroll > this.currentPosition) {
|
||||
//alert('BOTTOM');
|
||||
} else {
|
||||
//alert('UP');
|
||||
this.scrollingOnce = false;
|
||||
}
|
||||
if ((containerHeight - 100) > scroll) {
|
||||
|
||||
@@ -362,9 +362,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
let containerHeight = windowHeight - e.srcElement.clientHeight;
|
||||
|
||||
if (scroll > this.currentPosition) {
|
||||
//alert('BOTTOM');
|
||||
} else {
|
||||
//alert('UP');
|
||||
this.scrollingOnce = false;
|
||||
}
|
||||
if ((containerHeight - 100) > scroll) {
|
||||
@@ -647,7 +645,6 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
|
||||
|
||||
async takePicture() {
|
||||
// alert("!");
|
||||
|
||||
const roomId = this.roomId
|
||||
|
||||
@@ -656,7 +653,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
const lastphoto: any = await this.fileService.loadFiles();
|
||||
const { capturedImage, capturedImageTitle } = await this.fileService.loadFileData(lastphoto);
|
||||
|
||||
// alert('!!');
|
||||
|
||||
const base64 = await fetch(capturedImage);
|
||||
const blob = await base64.blob();
|
||||
const formData = new FormData();
|
||||
|
||||
@@ -13,6 +13,7 @@ import { AttachmentsService } from 'src/app/services/attachments.service';
|
||||
import { FormGroup, FormBuilder, Validators } from "@angular/forms";
|
||||
import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
|
||||
import { AttachmentsPage } from '../attachments/attachments.page';
|
||||
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
|
||||
|
||||
|
||||
@Component({
|
||||
@@ -45,11 +46,13 @@ export class EventDetailPage implements OnInit {
|
||||
private alertService: AlertService,
|
||||
private attachamentsService: AttachmentsService,
|
||||
private route: Router,
|
||||
private iab: InAppBrowser) {
|
||||
private iab: InAppBrowser,
|
||||
private httpErrorHandle: HttpErrorHandle) {
|
||||
this.loadedEvent = new Event();
|
||||
this.loadedEvent.Body = new EventBody();
|
||||
}
|
||||
|
||||
|
||||
ngOnInit() {
|
||||
this.loadEvent();
|
||||
this.loadAttachments();
|
||||
@@ -81,6 +84,8 @@ export class EventDetailPage implements OnInit {
|
||||
);
|
||||
this.eventsService.getEvent(eventid).subscribe(response => {
|
||||
this.loadedEvent = response;
|
||||
},(error) => {
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@ import { BackgroundService } from 'src/app/services/background.service';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { RouteService } from 'src/app/services/route.service';
|
||||
import { PermissionService } from 'src/app/services/permission.service';
|
||||
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-despacho-pr',
|
||||
@@ -66,6 +67,7 @@ export class DespachoPrPage implements OnInit {
|
||||
public ThemeService: ThemeService,
|
||||
private RouteService: RouteService,
|
||||
public p: PermissionService,
|
||||
private httpErroHandle: HttpErrorHandle
|
||||
) {
|
||||
this.activatedRoute.paramMap.subscribe(params => {
|
||||
if (params["params"].SerialNumber) {
|
||||
@@ -157,7 +159,7 @@ export class DespachoPrPage implements OnInit {
|
||||
} catch (e) {
|
||||
window.history.back();
|
||||
}
|
||||
this.toastService._badRequest('Processo não encontrado')
|
||||
this.httpErroHandle.httpStatusHandle(error)
|
||||
|
||||
}
|
||||
});
|
||||
@@ -272,14 +274,9 @@ export class DespachoPrPage implements OnInit {
|
||||
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise()
|
||||
this.toastService._successMessage()
|
||||
this.httpErroHandle.httpsSucessMessagge('Executado')
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest()
|
||||
}
|
||||
this.httpErroHandle.httpStatusHandle(error)
|
||||
}
|
||||
finally {
|
||||
loader.remove()
|
||||
@@ -302,14 +299,9 @@ export class DespachoPrPage implements OnInit {
|
||||
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise()
|
||||
this.toastService._successMessage('Processo arquivado')
|
||||
this.httpErroHandle.httpsSucessMessagge('Arquivar')
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest('Processo não arquivado')
|
||||
}
|
||||
this.httpErroHandle.httpStatusHandle(error)
|
||||
}
|
||||
finally {
|
||||
loader.remove()
|
||||
@@ -329,14 +321,9 @@ export class DespachoPrPage implements OnInit {
|
||||
documents
|
||||
}).toPromise()
|
||||
|
||||
this.toastService._successMessage('Processo criado')
|
||||
this.httpErroHandle.httpsSucessMessagge('Gerar Diploma')
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest('Processo não criado')
|
||||
}
|
||||
this.httpErroHandle.httpStatusHandle(error)
|
||||
}
|
||||
finally {
|
||||
loader.remove()
|
||||
@@ -359,14 +346,9 @@ export class DespachoPrPage implements OnInit {
|
||||
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise()
|
||||
this.toastService._successMessage('')
|
||||
this.httpErroHandle.httpsSucessMessagge('Concluir')
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest()
|
||||
}
|
||||
this.httpErroHandle.httpStatusHandle(error)
|
||||
}
|
||||
finally {
|
||||
loader.remove()
|
||||
@@ -389,14 +371,9 @@ export class DespachoPrPage implements OnInit {
|
||||
const loader = this.toastService.loading()
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise()
|
||||
this.toastService._successMessage()
|
||||
this.httpErroHandle.httpsSucessMessagge('Reexecução')
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest()
|
||||
}
|
||||
this.httpErroHandle.httpStatusHandle(error)
|
||||
}
|
||||
finally {
|
||||
loader.remove()
|
||||
@@ -412,17 +389,12 @@ export class DespachoPrPage implements OnInit {
|
||||
const loader = this.toastService.loading()
|
||||
this.processes.SetTaskToPending(this.serialNumber).subscribe(res => {
|
||||
this.popoverController.dismiss('close')
|
||||
this.toastService._successMessage('Processo enviado para pendentes')
|
||||
this.httpErroHandle.httpsSucessMessagge('Enviar para Pendentes')
|
||||
this.goBack()
|
||||
loader.remove()
|
||||
}, (error) => {
|
||||
loader.remove()
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest('Processo não encontrado')
|
||||
}
|
||||
this.httpErroHandle.httpStatusHandle(error)
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -127,7 +127,7 @@
|
||||
<div *ngIf="task" class="aside-right flex-column height-100 overflow-y-auto">
|
||||
<div class="buttons" *ngIf="task.activityInstanceName == 'Tarefa de Despacho'">
|
||||
<div class="option-desc" *ngIf="task.WorkflowName == 'Despacho do Presidente da República' "> <div>Responder ao PR</div> </div>
|
||||
<button (click)="tstemethod(executadoText)" class="btn-cancel" shape="round" >Executado</button>
|
||||
<button (click)="openAddNoteModal('Executado')" class="btn-cancel" shape="round" >Executado</button>
|
||||
<div class="option-desc" *ngIf="task.WorkflowName == 'Despacho do Presidente da República' ">Reencaminhar para Área Jurídica</div>
|
||||
<button (click)="openAddNoteModal('Gerar Diploma')" *ngIf="task.WorkflowName == 'Despacho do Presidente da República'" class="btn-cancel" style="margin-bottom: 0px !important;" shape="round" >Gerar Diploma </button>
|
||||
<div class="option-desc" *ngIf="task.WorkflowName == 'Despacho do Presidente da República' " >Outras opções</div>
|
||||
@@ -140,7 +140,7 @@
|
||||
<button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
|
||||
</div>
|
||||
<div class="buttons" *ngIf="task.activityInstanceName == 'Reexecutar Despacho'">
|
||||
<button (click)="tstemethod('Executado')" class="btn-cancel" shape="round" >Executado</button>
|
||||
<button (click)="openAddNoteModal('Executado')" class="btn-cancel" shape="round" >Executado</button>
|
||||
<button (click)="openDelegarModal(task)" class="btn-cancel" shape="round" >Delegar</button>
|
||||
<div class="solid"></div>
|
||||
<button (click)="openExpedientActionsModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button>
|
||||
|
||||
@@ -23,6 +23,7 @@ import { Platform } from '@ionic/angular';
|
||||
import { BackgroundService } from 'src/app/services/background.service';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { RouteService } from 'src/app/services/route.service';
|
||||
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
|
||||
|
||||
|
||||
@Component({
|
||||
@@ -66,6 +67,7 @@ export class DespachoPage implements OnInit {
|
||||
private platform: Platform,
|
||||
private backgroundservice: BackgroundService,
|
||||
public ThemeService: ThemeService,
|
||||
private httpErrorHandle: HttpErrorHandle
|
||||
|
||||
|
||||
) {
|
||||
@@ -154,7 +156,7 @@ export class DespachoPage implements OnInit {
|
||||
} catch (e) {
|
||||
this.RouteService.goBack();
|
||||
}
|
||||
this.toastService.badRequest('Processo não encontrado')
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -279,15 +281,10 @@ export class DespachoPage implements OnInit {
|
||||
|
||||
try {
|
||||
await this.despachoService.executado(note, documents, this.serialnumber).toPromise();
|
||||
this.toastService._successMessage('Processo criado')
|
||||
this.httpErrorHandle.httpsSucessMessagge('Executado')
|
||||
this.close();
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest("Processo não criado")
|
||||
}
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
}
|
||||
finally {
|
||||
loader.remove()
|
||||
@@ -300,15 +297,10 @@ export class DespachoPage implements OnInit {
|
||||
|
||||
try {
|
||||
await this.despachoService.arquivar(note, documents, this.serialnumber).toPromise()
|
||||
this.toastService._successMessage('Processo descartado')
|
||||
this.httpErrorHandle.httpsSucessMessagge('Arquivar')
|
||||
this.close();
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest("Processo não descartado")
|
||||
}
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
}
|
||||
finally {
|
||||
loader.remove()
|
||||
@@ -331,16 +323,11 @@ export class DespachoPage implements OnInit {
|
||||
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise()
|
||||
this.toastService._successMessage()
|
||||
this.httpErrorHandle.httpsSucessMessagge('Reexecução')
|
||||
this.close();
|
||||
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest()
|
||||
}
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
}
|
||||
finally {
|
||||
loader.remove()
|
||||
@@ -363,15 +350,10 @@ export class DespachoPage implements OnInit {
|
||||
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise()
|
||||
this.toastService._successMessage()
|
||||
this.httpErrorHandle.httpsSucessMessagge('Gerar Diploma')
|
||||
this.close();
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest()
|
||||
}
|
||||
this.httpErrorHandle.httpStatusHandle(error);
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
@@ -388,17 +370,17 @@ export class DespachoPage implements OnInit {
|
||||
this.despachoService.sendExpedienteToPending(this.serialnumber).subscribe(res => {
|
||||
this.goBack();
|
||||
loader.remove()
|
||||
this.toastService.successMessage()
|
||||
this.httpErrorHandle.httpsSucessMessagge('Enviar para Pendentes')
|
||||
},
|
||||
error => {
|
||||
loader.remove()
|
||||
this.toastService.badRequest("Processo não enviado para despacho")
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
});
|
||||
// loader.remove()
|
||||
}
|
||||
|
||||
tstemethod(value: string) {
|
||||
alert(value)
|
||||
|
||||
}
|
||||
|
||||
async openAddNoteModal(actionName: string) {
|
||||
|
||||
+7
-19
@@ -9,6 +9,7 @@ import { ToastService } from 'src/app/services/toast.service';
|
||||
import { ViewDocumentPage } from 'src/app/modals/view-document/view-document.page';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { RouteService } from 'src/app/services/route.service';
|
||||
import {HttpErrorHandle } from 'src/app/services/http-error-handle.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-diploma-assinar',
|
||||
@@ -36,7 +37,8 @@ export class DiplomaAssinarPage implements OnInit {
|
||||
private activatedRoute: ActivatedRoute,
|
||||
private toastService: ToastService,
|
||||
private RouteService: RouteService,
|
||||
public ThemeService: ThemeService
|
||||
public ThemeService: ThemeService,
|
||||
private httpErroHandle: HttpErrorHandle
|
||||
) {
|
||||
this.activatedRoute.paramMap.subscribe(params => {
|
||||
if(params["params"].SerialNumber) {
|
||||
@@ -110,21 +112,12 @@ export class DiplomaAssinarPage implements OnInit {
|
||||
|
||||
}, (error)=>{
|
||||
try {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest('Processo não encontrado')
|
||||
}
|
||||
this.httpErroHandle.httpStatusHandle(error)
|
||||
this.goBack()
|
||||
} catch (e) {
|
||||
window.history.back();
|
||||
} finally {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Não é possível visualizar este processo no modo offline')
|
||||
} else {
|
||||
this.toastService._badRequest('Processo não encontrado')
|
||||
}
|
||||
this.httpErroHandle.httpStatusHandle(error)
|
||||
}
|
||||
});
|
||||
|
||||
@@ -177,16 +170,11 @@ export class DiplomaAssinarPage implements OnInit {
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise()
|
||||
|
||||
this.toastService._successMessage(false, ()=>{
|
||||
this.httpErroHandle.httpsSucessMessagge('Assinado',() => {
|
||||
this.goBack();
|
||||
})
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest()
|
||||
}
|
||||
this.httpErroHandle.httpStatusHandle(error)
|
||||
}
|
||||
finally {
|
||||
loader.remove()
|
||||
|
||||
+7
-14
@@ -13,6 +13,7 @@ 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';
|
||||
import { DiplomasGerarOptionsPage } from 'src/app/shared/popover/diplomas-gerar-options/diplomas-gerar-options.page';
|
||||
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service'
|
||||
|
||||
@Component({
|
||||
selector: 'app-diplomas-gerar',
|
||||
@@ -43,7 +44,8 @@ export class DiplomasGerarPage implements OnInit {
|
||||
private RouteService: RouteService,
|
||||
public ThemeService: ThemeService,
|
||||
private despachoService: DespachoService,
|
||||
) {
|
||||
private httpErroHandle: HttpErrorHandle
|
||||
) {
|
||||
this.activatedRoute.paramMap.subscribe(params => {
|
||||
if(params["params"].SerialNumber) {
|
||||
this.serialnumber = params["params"].SerialNumber;
|
||||
@@ -118,16 +120,12 @@ export class DiplomasGerarPage implements OnInit {
|
||||
|
||||
}, (error)=>{
|
||||
try {
|
||||
this.toastService._badRequest('Processo não encontrado')
|
||||
this.httpErroHandle.httpStatusHandle(error)
|
||||
this.goBack()
|
||||
} catch (e) {
|
||||
window.history.back();
|
||||
} finally {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Não é possível visualizar este processo no modo offline')
|
||||
} else {
|
||||
this.toastService._badRequest('Processo não encontrado')
|
||||
}
|
||||
this.httpErroHandle.httpStatusHandle(error)
|
||||
}
|
||||
});
|
||||
|
||||
@@ -250,15 +248,10 @@ export class DiplomasGerarPage implements OnInit {
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise();
|
||||
this.modalController.dismiss('sucess');
|
||||
this.toastService._successMessage();
|
||||
this.httpErroHandle.httpsSucessMessagge('Gerar Diploma')
|
||||
this.goBack()
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest();
|
||||
}
|
||||
this.httpErroHandle.httpStatusHandle(error)
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
@@ -79,6 +79,8 @@
|
||||
|
||||
<div *ngIf="task" class="aside-right flex-column height-100 overflow-y-auto">
|
||||
<div class="buttons" *ngIf="task.activityInstanceName == 'Revisar Diploma'">
|
||||
<button (click)="tempMethod('Arquivo')" class="btn-cancel" shape="round" >Arquivar</button>
|
||||
<button (click)="tempMethod('Despacho')" class="btn-cancel" shape="round" >Efectuar Despacho</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)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
|
||||
|
||||
@@ -15,6 +15,7 @@ import { SqliteService } from 'src/app/services/sqlite.service';
|
||||
import { BackgroundService } from 'src/app/services/background.service';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { RouteService } from 'src/app/services/route.service';
|
||||
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
|
||||
|
||||
|
||||
@Component({
|
||||
@@ -50,7 +51,8 @@ export class DiplomaPage implements OnInit {
|
||||
private sqliteservice: SqliteService,
|
||||
private backgroundservice: BackgroundService,
|
||||
private platform: Platform,
|
||||
public ThemeService: ThemeService
|
||||
public ThemeService: ThemeService,
|
||||
private httpErrorHandle: HttpErrorHandle
|
||||
) {
|
||||
this.activatedRoute.paramMap.subscribe(params => {
|
||||
//
|
||||
@@ -162,12 +164,7 @@ export class DiplomaPage implements OnInit {
|
||||
} catch (e) {
|
||||
window.history.back();
|
||||
}
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest('Processo não encontrado')
|
||||
}
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
}
|
||||
});
|
||||
|
||||
@@ -286,17 +283,12 @@ export class DiplomaPage implements OnInit {
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise()
|
||||
|
||||
this.toastService._successMessage(false, () => {
|
||||
this.httpErrorHandle.httpsSucessMessagge('Solicitar Assinatura',() => {
|
||||
this.close();
|
||||
})
|
||||
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest()
|
||||
}
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
}
|
||||
finally {
|
||||
loader.remove()
|
||||
@@ -317,14 +309,9 @@ export class DiplomaPage implements OnInit {
|
||||
const loader = this.toastService.loading()
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise()
|
||||
this.toastService._successMessage()
|
||||
this.httpErrorHandle.httpsSucessMessagge('Solicitar alteração')
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest()
|
||||
}
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
}
|
||||
finally {
|
||||
loader.remove()
|
||||
@@ -348,14 +335,9 @@ export class DiplomaPage implements OnInit {
|
||||
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise();
|
||||
this.toastService._successMessage('Processo concluído')
|
||||
this.httpErrorHandle.httpsSucessMessagge('Concluir')
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest()
|
||||
}
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
}
|
||||
finally {
|
||||
loader.remove()
|
||||
@@ -441,5 +423,9 @@ export class DiplomaPage implements OnInit {
|
||||
this.modalController.dismiss();
|
||||
}
|
||||
|
||||
tempMethod(actionname) {
|
||||
console.log(actionname)
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ import { OfflineManagerService } from 'src/app/services/offline-manager.service'
|
||||
import { RouteService } from 'src/app/services/route.service';
|
||||
import { Storage } from '@ionic/storage';
|
||||
import config from 'capacitor.config';
|
||||
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-approve-event',
|
||||
@@ -58,7 +59,8 @@ export class ApproveEventPage implements OnInit {
|
||||
private backgroundservice: BackgroundService,
|
||||
public ThemeService: ThemeService,
|
||||
private offlineManager: OfflineManagerService,
|
||||
private storage: Storage
|
||||
private storage: Storage,
|
||||
private httpErrorHandle: HttpErrorHandle
|
||||
) {
|
||||
this.activatedRoute.paramMap.subscribe(params => {
|
||||
//
|
||||
@@ -216,7 +218,11 @@ export class ApproveEventPage implements OnInit {
|
||||
}
|
||||
|
||||
}, (error) => {
|
||||
this.getProcessFromDB();
|
||||
if(error.status == 0) {
|
||||
this.getProcessFromDB();
|
||||
} else {
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -229,15 +235,10 @@ export class ApproveEventPage implements OnInit {
|
||||
try {
|
||||
await this.processes.PostTaskAction(body).toPromise()
|
||||
this.goBack();
|
||||
this.toastService._successMessage('Evento aprovado')
|
||||
this.httpErrorHandle.httpsSucessMessagge('Evento aprovação')
|
||||
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest('Evento não aprovado')
|
||||
}
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
}
|
||||
finally {
|
||||
loader.remove()
|
||||
@@ -280,15 +281,10 @@ export class ApproveEventPage implements OnInit {
|
||||
|
||||
this.offlineManager.storeRequestData('event-listRever', body);
|
||||
});
|
||||
this.toastService._successMessage('Evento enviado para revisão');
|
||||
this.httpErrorHandle.httpsSucessMessagge('Rever')
|
||||
this.goBack();
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest('Evento não enviado para revisão');
|
||||
}
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
@@ -308,15 +304,10 @@ export class ApproveEventPage implements OnInit {
|
||||
const loader = this.toastService.loading()
|
||||
try {
|
||||
await this.processes.PostTaskAction(body).toPromise();
|
||||
await this.toastService._successMessage('Processo rejeitado');
|
||||
this.httpErrorHandle.httpsSucessMessagge('Rejeitar')
|
||||
this.goBack();
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest('Evento não rejeitado')
|
||||
}
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
}
|
||||
finally {
|
||||
loader.remove()
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<!-- <ion-segment-button value="MDGPR">
|
||||
Minha agenda
|
||||
</ion-segment-button> -->
|
||||
<ion-segment-button *ngFor="let calendars of eventService.calendarNamesAry; let i index" [value]="i === 'Meu calendario' ? 'MDGPR' : 'PR'">
|
||||
<ion-segment-button *ngFor="let calendars of eventService.calendarNamesAry; let i index" [value]="i === 'Meu calendario' ? 'Meu calendario' : i.OwnerUserId">
|
||||
<div *ngIf="calendars == 'Meu calendario'"> Minha agenda </div>
|
||||
<div *ngIf="calendars != 'Meu calendario' && calendars.Role == 'Presidente da República'"> Agenda do PR </div>
|
||||
<div *ngIf="calendars != 'Meu calendario' && calendars.Role == 'Ministro e Director do Gabinete do PR'"> Agenda do MD </div>
|
||||
@@ -40,14 +40,14 @@
|
||||
<div class="main-content d-flex height-100" >
|
||||
|
||||
<div class="content height-100 d-flex flex-column">
|
||||
<div [ngSwitch]="segment">
|
||||
<ion-list class="width-100 height-100" *ngSwitchCase="'MDGPR'">
|
||||
<div *ngIf="eventoaprovacaostore.listmd" class="overflow-y-auto height-100">
|
||||
<div >
|
||||
<ion-list class="width-100 height-100" >
|
||||
<div class="overflow-y-auto height-100">
|
||||
<ion-item-sliding>
|
||||
<ion-item class="Rectangle cursor-pointer" lines="none"
|
||||
*ngFor="let event of eventoaprovacaostore.listmd" (click)="goToEventToApproveDetail(event.serialNumber)">
|
||||
*ngFor="let event of eventoaprovacaostore.get(segment)" (click)="goToEventToApproveDetail(event.serialNumber)">
|
||||
|
||||
<div class="content-mdgpr-{{event.workflowInstanceDataFields.Agenda}} width-100">
|
||||
<div class="content-{{color}}-{{event.workflowInstanceDataFields.Agenda}} width-100">
|
||||
<div class="approve-event-time">
|
||||
<p>{{event.workflowInstanceDataFields.StartDate | date: 'HH:mm'}}</p>
|
||||
<p>{{event.workflowInstanceDataFields.EndDate | date: 'HH:mm'}}</p>
|
||||
@@ -65,51 +65,19 @@
|
||||
</ion-item-sliding>
|
||||
</div>
|
||||
</ion-list>
|
||||
<ion-label></ion-label>
|
||||
|
||||
<ion-list *ngSwitchCase="'PR'">
|
||||
<div *ngIf="eventoaprovacaostore.listpr" class="overflow-y-auto height-100">
|
||||
<ion-item-sliding>
|
||||
<ion-item class="Rectangle cursor-pointer" lines="none"
|
||||
*ngFor="let event of eventoaprovacaostore.listpr" (click)="goToEventToApproveDetail(event.serialNumber)">
|
||||
<div class="content-pr-{{event.workflowInstanceDataFields.Agenda}} width-100">
|
||||
<div class="approve-event-time">
|
||||
<p>{{event.workflowInstanceDataFields.StartDate | date: 'HH:mm'}}</p>
|
||||
<p>{{event.workflowInstanceDataFields.EndDate | date: 'HH:mm'}}</p>
|
||||
</div>
|
||||
<div class="approve-event-detail">
|
||||
<p *ngIf="event.workflowInstanceDataFields.StartDate != event.workflowInstanceDataFields.EndDate">{{event.workflowInstanceDataFields.StartDate | date: 'd/M/yy' }} - {{ event.workflowInstanceDataFields.EndDate | date: 'dd/M/yy'}} | {{event.workflowInstanceDataFields.Location}}</p>
|
||||
<p *ngIf="event.workflowInstanceDataFields.StartDate == event.workflowInstanceDataFields.EndDate">{{event.workflowInstanceDataFields.StartDate | date: 'd/M/yy' }} | {{event.workflowInstanceDataFields.Location}}</p>
|
||||
<h3>{{event.workflowInstanceDataFields.Subject}}</h3>
|
||||
<div *ngIf="event.activityInstanceName">
|
||||
<div class="label-event-type"> {{ event.activityInstanceName }} </div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ion-item>
|
||||
</ion-item-sliding>
|
||||
</div>
|
||||
</ion-list>
|
||||
</div>
|
||||
|
||||
<div class="height-100" [ngSwitch]="segment">
|
||||
<div *ngSwitchCase="'MDGPR'" class="d-flex height-100 align-center justify-content-center" >
|
||||
<div class="height-100" >
|
||||
<div class="d-flex height-100 align-center justify-content-center" >
|
||||
<div
|
||||
*ngIf="!skeletonLoader && (!eventoaprovacaostore.listmd || eventoaprovacaostore.listmd.length == 0)"
|
||||
*ngIf="!skeletonLoader && (eventoaprovacaostore.get(segment).length == 0)"
|
||||
class="empty-list d-flex height-100 align-center justify-content-center"
|
||||
>
|
||||
<span>Lista vazia</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div *ngSwitchCase="'PR'" class="d-flex height-100 align-center justify-content-center">
|
||||
<div
|
||||
*ngIf="!skeletonLoader && (!eventoaprovacaostore.listmd || eventoaprovacaostore.listmd.length == 0)"
|
||||
class="empty-list d-flex height-100 align-center justify-content-center"
|
||||
>
|
||||
<span>Lista vazia</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -16,6 +16,7 @@ import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { RouteService } from 'src/app/services/route.service';
|
||||
import { Storage } from '@ionic/storage';
|
||||
import { EventsService } from 'src/app/services/events.service';
|
||||
import { SessionStore } from 'src/app/store/session.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-event-list',
|
||||
@@ -36,8 +37,9 @@ export class EventListPage implements OnInit {
|
||||
serialnumber: string;
|
||||
|
||||
skeletonLoader = true
|
||||
eventaprovacaostore = EventoAprovacaoStore;
|
||||
eventoaprovacaostore = EventoAprovacaoStore;
|
||||
eventsList: any = []
|
||||
color: 'pr' | 'mdgpr'
|
||||
|
||||
constructor(
|
||||
private processes: ProcessesService,
|
||||
@@ -56,7 +58,13 @@ export class EventListPage implements OnInit {
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
this.segment = 'MDGPR';
|
||||
if(!this.segment) {
|
||||
if(this.eventService.calendarNamesAry.includes('Meu calendario')) {
|
||||
this.segment = 'Meu calendario';
|
||||
} else {
|
||||
this.segment = this.eventService.calendarNamesAry[0].OwnerUserId
|
||||
}
|
||||
}
|
||||
|
||||
const location = window.location
|
||||
const pathname = location.pathname + location.search
|
||||
@@ -150,47 +158,53 @@ export class EventListPage implements OnInit {
|
||||
}
|
||||
|
||||
async LoadToApproveEvents() {
|
||||
// this.processes.GetTasksList('Agenda Oficial MDGPR', false).subscribe(async res => {
|
||||
this.showLoader = true;
|
||||
this.skeletonLoader = true
|
||||
this.showLoader = true;
|
||||
this.skeletonLoader = true
|
||||
|
||||
const segment = this.segment
|
||||
|
||||
if(this.segment == 'Meu calendario') {
|
||||
// color
|
||||
if(SessionStore.user.Profile == 'PR') {
|
||||
this.color = 'pr'
|
||||
} else {
|
||||
this.color = 'mdgpr'
|
||||
}
|
||||
|
||||
let genericEvents = await this.processes.GetTasksList('Agendar Evento', false).toPromise();
|
||||
try {
|
||||
this.eventsList = this.sortService.sortArrayByDate(genericEvents).reverse();
|
||||
} catch (error) {
|
||||
this.eventsList = [];
|
||||
}
|
||||
|
||||
this.eventoaprovacaostore.save(segment, this.eventsList)
|
||||
|
||||
if (this.segment != 'PR') {
|
||||
let mdEventsOficial = await this.processes.GetTasksList('Agenda Oficial MDGPR,Agenda Pessoal MDGPR', false).toPromise();
|
||||
this.eventsMDGPRList = mdEventsOficial
|
||||
} else {
|
||||
|
||||
this.eventsMDGPRList = this.sortService.sortDate(this.eventsMDGPRList, 'taskStartDate')
|
||||
this.eventsMDGPRList = this.sortService.sortArrayByDate(this.eventsMDGPRList)
|
||||
this.eventoaprovacaostore.resetmd(this.eventsMDGPRList);
|
||||
|
||||
this.storage.set('event-to-aproveMD',this.eventsMDGPRList).then(() => {
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
else if (this.segment == 'PR') {
|
||||
let prEventsOficial = await this.processes.GetTasksList('Agenda Oficial PR,Agenda Pessoal PR', false).toPromise();
|
||||
this.color = 'pr'
|
||||
|
||||
this.eventsPRList = prEventsOficial
|
||||
|
||||
this.eventsPRList = this.sortService.sortDate(this.eventsPRList, 'taskStartDate')
|
||||
this.eventsPRList = this.sortService.sortArrayByDate(this.eventsPRList)
|
||||
this.eventoaprovacaostore.resetpr(this.eventsPRList);
|
||||
|
||||
this.storage.set('event-to-aprovePR',this.eventsPRList).then(() => {
|
||||
|
||||
})
|
||||
|
||||
let allEvents = await this.processes.eventsToApprove(segment).toPromise()
|
||||
try {
|
||||
this.eventsList = this.sortService.sortArrayByDate(allEvents).reverse();
|
||||
} catch(error) {
|
||||
this.eventsList = []
|
||||
}
|
||||
|
||||
this.eventsList = this.eventsList
|
||||
this.eventsList = this.eventsList
|
||||
this.showLoader = false;
|
||||
this.skeletonLoader = false
|
||||
this.eventoaprovacaostore.save(segment, this.eventsList)
|
||||
}
|
||||
|
||||
this.showLoader = false;
|
||||
this.skeletonLoader = false
|
||||
|
||||
// }, (error) => {
|
||||
// this.getEventToAproveFromDB();
|
||||
// })
|
||||
}
|
||||
|
||||
|
||||
toDateString(e) {
|
||||
return new Date(e).toDateString()
|
||||
}
|
||||
|
||||
async openApproveModal(eventSerialNumber, event) {
|
||||
const modal = await this.modalController.create({
|
||||
|
||||
+2
-2
@@ -61,7 +61,7 @@
|
||||
<ion-icon slot="start" src="assets/images/icons-location.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class" [class.input-error]="Form?.get('Location')?.invalid && validateFrom ">
|
||||
<ion-input autocomplete="on" autocorrect="on" spellcheck="true" placeholder="Localização*" [(ngModel)]="postData.Location"></ion-input>
|
||||
<ion-input autocomplete="on" autocorrect="on" spellcheck="true" placeholder="Localização" [(ngModel)]="postData.Location"></ion-input>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -314,7 +314,7 @@
|
||||
<ion-footer>
|
||||
<div class="buttons">
|
||||
<button class="btn-cancel" shape="round" (click)="close()">Cancelar</button>
|
||||
<button class="btn-ok" shape="round" (click)="saveTask()">Enviar</button>
|
||||
<button class="btn-ok" shape="round" (click)="saveTask()">Gravar</button>
|
||||
</div>
|
||||
</ion-footer>
|
||||
|
||||
|
||||
+7
-14
@@ -20,6 +20,7 @@ import { NGX_MAT_DATE_FORMATS } from '@angular-material-components/datetime-pick
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { SessionStore } from 'src/app/store/session.service';
|
||||
import { RoleIdService } from 'src/app/services/role-id.service';
|
||||
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
|
||||
|
||||
|
||||
const moment = _rollupMoment || _moment;
|
||||
@@ -120,7 +121,8 @@ export class BookMeetingModalPage implements OnInit {
|
||||
private toastService: ToastService,
|
||||
public ThemeService: ThemeService,
|
||||
public eventService: EventsService,
|
||||
public RoleIdService: RoleIdService
|
||||
public RoleIdService: RoleIdService,
|
||||
private httpErroHandle: HttpErrorHandle
|
||||
|
||||
|
||||
) {
|
||||
@@ -304,15 +306,10 @@ export class BookMeetingModalPage implements OnInit {
|
||||
await this.calendarService.genericPostExpedientEvent(this.task.DocId, this.postData, "",this.task.SerialNumber, this.task.FsId, CalendarId).toPromise();
|
||||
|
||||
this.modalController.dismiss();
|
||||
this.toastService._successMessage('Reunião criada');
|
||||
this.httpErroHandle.httpsSucessMessagge('Marcar Reunião')
|
||||
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest('Reunião não criada')
|
||||
}
|
||||
this.httpErroHandle.httpStatusHandle(error)
|
||||
}
|
||||
finally {
|
||||
loader.remove()
|
||||
@@ -329,14 +326,10 @@ export class BookMeetingModalPage implements OnInit {
|
||||
await this.calendarService.genericCreateTaskEvent(this.task.FolderID | this.task.FolderId, this.postData, "",this.task.SerialNumber, this.task.FsId, CalendarId).toPromise();
|
||||
|
||||
this.close();
|
||||
this.toastService._successMessage('Reunião criada');
|
||||
this.httpErroHandle.httpsSucessMessagge('Marcar Reunião')
|
||||
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
this.toastService._badRequest()
|
||||
}
|
||||
this.httpErroHandle.httpStatusHandle(error)
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
+13
-35
@@ -24,6 +24,7 @@ import { SearchDocumentPipe } from 'src/app/pipes/search-document.pipe';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { SessionStore } from 'src/app/store/session.service';
|
||||
import { PermissionService } from 'src/app/services/permission.service';
|
||||
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
|
||||
|
||||
const CUSTOM_DATE_FORMATS: NgxMatDateFormats = {
|
||||
parse: {
|
||||
@@ -111,6 +112,7 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
private despachoService: DespachoService,
|
||||
public ThemeService: ThemeService,
|
||||
public p: PermissionService,
|
||||
private httpErroHandle: HttpErrorHandle,
|
||||
) {
|
||||
|
||||
this.loggeduser = SessionStore.user;
|
||||
@@ -325,16 +327,11 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
try {
|
||||
|
||||
this.taskResult = await this.processes.postDespatcho(this.postData).toPromise();
|
||||
await this.toastService._successMessage('Processo efetuado');
|
||||
await this.httpErroHandle.httpsSucessMessagge('Efetuar Despacho')
|
||||
this.modalController.dismiss(action_despacho);
|
||||
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
await this.toastService._badRequest('Processo não efetuado')
|
||||
}
|
||||
this.httpErroHandle.httpStatusHandle(error)
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
@@ -364,16 +361,12 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
|
||||
try {
|
||||
this.taskResult = await this.processes.postParecer(this.postData).toPromise();
|
||||
await this.toastService._successMessage('Pedido enviado');
|
||||
await this.httpErroHandle.httpsSucessMessagge('Solicitar Parecer')
|
||||
|
||||
this.modalController.dismiss(action_parecer);
|
||||
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
await this.toastService._badRequest('Processo não efetuado')
|
||||
}
|
||||
this.httpErroHandle.httpStatusHandle(error)
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
@@ -401,15 +394,10 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
try {
|
||||
|
||||
this.taskResult = await this.processes.postDeferimento(this.postData).toPromise();
|
||||
this.toastService._successMessage('Processo efetuado');
|
||||
this.httpErroHandle.httpsSucessMessagge('Pedido de Deferimento')
|
||||
this.modalController.dismiss(action_deferimento);
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
await this.toastService._badRequest('Processo não efetuado')
|
||||
}
|
||||
this.httpErroHandle.httpStatusHandle(error)
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
@@ -444,15 +432,10 @@ 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.httpErroHandle.httpsSucessMessagge('Efetuar Despacho')
|
||||
this.modalController.dismiss(action_despacho_pr);
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
await this.toastService._badRequest('Processo não efetuado')
|
||||
}
|
||||
this.httpErroHandle.httpStatusHandle(error)
|
||||
} finally {
|
||||
//loader.remove()
|
||||
}
|
||||
@@ -486,15 +469,10 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
|
||||
try {
|
||||
this.taskResult = await this.processes.postParecerPr(this.postData).toPromise();
|
||||
await this.toastService._successMessage('Pedido enviado');
|
||||
await this.httpErroHandle.httpsSucessMessagge('Solicitar Parecer')
|
||||
this.modalController.dismiss(action_parecer_pr);
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
await this.toastService._badRequest('Processo não efetuado')
|
||||
}
|
||||
this.httpErroHandle.httpStatusHandle(error)
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
+9
-27
@@ -35,6 +35,7 @@ import { Storage } from '@ionic/storage';
|
||||
import { LoginUserRespose } from 'src/app/models/user.model';
|
||||
import { AuthService } from 'src/app/services/auth.service';
|
||||
import { SessionStore } from 'src/app/store/session.service';
|
||||
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-expediente-detail',
|
||||
@@ -88,6 +89,7 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
private dataService: DataService,
|
||||
private storage: Storage,
|
||||
private userAuth: AuthService,
|
||||
private httpErroHandle: HttpErrorHandle
|
||||
) {
|
||||
this.loggeduser = SessionStore.user
|
||||
console.log('SessionStore', SessionStore)
|
||||
@@ -242,14 +244,9 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise();
|
||||
this.close();
|
||||
this.toastService._successMessage('Processo aprovado')
|
||||
this.httpErroHandle.httpsSucessMessagge('Avaliação Superiror')
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest('Processo não aprovado')
|
||||
}
|
||||
this.httpErroHandle.httpStatusHandle(error)
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
@@ -272,14 +269,9 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise()
|
||||
this.close();
|
||||
this.toastService._successMessage()
|
||||
this.httpErroHandle.httpsSucessMessagge('Rever')
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest()
|
||||
}
|
||||
this.httpErroHandle.httpStatusHandle(error)
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
@@ -402,17 +394,12 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
this.getFromDB();
|
||||
} else {
|
||||
try {
|
||||
this.toastService._badRequest('Processo não encontrado')
|
||||
this.httpErroHandle.httpStatusHandle(error)
|
||||
this.goBack()
|
||||
} catch (e) {
|
||||
window.history.back();
|
||||
}
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest('Processo não encontrado')
|
||||
}
|
||||
this.httpErroHandle.httpStatusHandle(error)
|
||||
}
|
||||
});
|
||||
|
||||
@@ -545,12 +532,7 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
await this.processes.CompleteTask(body).toPromise();
|
||||
this.goBack();
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest('Processo não descartado')
|
||||
}
|
||||
this.httpErroHandle.httpStatusHandle(error)
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@ import { ViewDocumentPage } from 'src/app/modals/view-document/view-document.pag
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { RouteService } from 'src/app/services/route.service';
|
||||
import { SessionStore } from 'src/app/store/session.service';
|
||||
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-expediente-pr',
|
||||
@@ -60,7 +61,8 @@ export class ExpedientePrPage implements OnInit {
|
||||
private toastService: ToastService,
|
||||
private attachmentsService: AttachmentsService,
|
||||
private RouteService: RouteService,
|
||||
public ThemeService: ThemeService
|
||||
public ThemeService: ThemeService,
|
||||
private httpErroHandle: HttpErrorHandle
|
||||
|
||||
) {
|
||||
this.loggeduser = SessionStore.user;
|
||||
@@ -137,18 +139,13 @@ export class ExpedientePrPage implements OnInit {
|
||||
const loader = this.toastService.loading()
|
||||
this.processes.SetTaskToPending(this.serialnumber).subscribe(res=>{
|
||||
|
||||
this.toastService._successMessage('Processo enviado para pendentes')
|
||||
this.httpErroHandle.httpsSucessMessagge('Enviar para Pendente')
|
||||
this.goBack();
|
||||
loader.remove()
|
||||
},
|
||||
(error)=>{
|
||||
loader.remove()
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest('Processo não enviado para pendentes')
|
||||
}
|
||||
this.httpErroHandle.httpStatusHandle(error)
|
||||
});
|
||||
}
|
||||
|
||||
@@ -193,16 +190,12 @@ export class ExpedientePrPage implements OnInit {
|
||||
|
||||
}, (error)=>{
|
||||
try {
|
||||
this.toastService._badRequest('Processo não encontrado')
|
||||
this.httpErroHandle.httpStatusHandle(error)
|
||||
this.goBack()
|
||||
} catch (e) {
|
||||
window.history.back();
|
||||
} finally {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Não é possível visualizar este processo no modo offline')
|
||||
} else {
|
||||
this.toastService._badRequest('Processo não encontrado')
|
||||
}
|
||||
this.httpErroHandle.httpStatusHandle(error)
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -312,14 +305,9 @@ export class ExpedientePrPage implements OnInit {
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise();
|
||||
this.close();
|
||||
this.toastService._successMessage('Processo aprovado')
|
||||
this.httpErroHandle.httpsSucessMessagge('Aprovar')
|
||||
} catch(error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest('Processo não aprovado')
|
||||
}
|
||||
this.httpErroHandle.httpStatusHandle(error)
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
@@ -342,14 +330,9 @@ export class ExpedientePrPage implements OnInit {
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise()
|
||||
this.close();
|
||||
this.toastService._successMessage()
|
||||
this.httpErroHandle.httpsSucessMessagge('Rever')
|
||||
} catch(error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest()
|
||||
}
|
||||
this.httpErroHandle.httpStatusHandle(error)
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
@@ -468,15 +451,10 @@ export class ExpedientePrPage implements OnInit {
|
||||
|
||||
try {
|
||||
await this.processes.CompleteTask(otherbody).toPromise()
|
||||
this.toastService._successMessage('Processo descartado');
|
||||
this.httpErroHandle.httpsSucessMessagge('Arquivar')
|
||||
this.goBack();
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest('Processo não descartado')
|
||||
}
|
||||
this.httpErroHandle.httpStatusHandle(error)
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
@@ -242,7 +242,7 @@
|
||||
<ion-icon src="assets/images/icons-agenda.svg"></ion-icon>
|
||||
</div>
|
||||
<p class="text-center exp-card-title ">Eventos para Aprovação</p>
|
||||
<p class="text-center exp-card-content"> {{eventoaprovacaostore.countMd + eventoaprovacaostore.countPr}} <span class="title1">Documentos</span></p>
|
||||
<p class="text-center exp-card-content"> {{eventoaprovacaostore.countAll}} <span class="title1">Documentos</span></p>
|
||||
</div>
|
||||
|
||||
<!-- List -->
|
||||
|
||||
@@ -33,6 +33,8 @@ import { ExpedienteTaskPipe } from 'src/app/pipes/expediente-task.pipe';
|
||||
import { SessionStore } from 'src/app/store/session.service';
|
||||
import { NotificationsService } from 'src/app/services/notifications.service'
|
||||
import { environment } from 'src/environments/environment';
|
||||
import { EventsService } from 'src/app/services/events.service';
|
||||
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
|
||||
@Component({
|
||||
selector: 'app-gabinete-digital',
|
||||
templateUrl: './gabinete-digital.page.html',
|
||||
@@ -126,7 +128,9 @@ export class GabineteDigitalPage implements OnInit {
|
||||
private sortService: SortService,
|
||||
private storage: Storage,
|
||||
public p: PermissionService,
|
||||
public NotificationsService: NotificationsService
|
||||
public NotificationsService: NotificationsService,
|
||||
public eventService: EventsService,
|
||||
private httpErroHandle: HttpErrorHandle
|
||||
) {
|
||||
|
||||
// this.workerList = new Worker(new URL('./list.worker.js', import.meta.url));
|
||||
@@ -598,7 +602,7 @@ export class GabineteDigitalPage implements OnInit {
|
||||
|
||||
updateAllProcess = () => {
|
||||
this.AllProcess = 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.despachoStore.list)
|
||||
.concat(this.despachoprstore.list).concat(this.eventoaprovacaostore.contactList).concat(this.despachoStore.list)
|
||||
.concat(this.deplomasStore.diplomasParaAssinarList).concat(this.deplomasStore.diplomasAssinadoList).concat(this.deplomasStore.DiplomaGerarList).concat(this.pendentesstore.list)
|
||||
|
||||
// try{
|
||||
@@ -732,21 +736,48 @@ export class GabineteDigitalPage implements OnInit {
|
||||
this.updateAllProcess()
|
||||
}
|
||||
|
||||
let mdEventsOficial = await this.processesbackend.GetTasksList('Agenda Oficial MDGPR,Agenda Pessoal MDGPR', false).toPromise();
|
||||
let eventsMDGPRList = mdEventsOficial
|
||||
|
||||
eventsMDGPRList = eventsMDGPRList.filter((item) => item.activityInstanceName != 'Editar Evento')
|
||||
for(let calendar of this.eventService.calendarNamesAry) {
|
||||
if(calendar == 'Meu calendario') {
|
||||
// color
|
||||
let genericEvents = await this.processesbackend.GetTasksList('Agendar Evento', false).toPromise();
|
||||
let eventsList
|
||||
try {
|
||||
eventsList = this.sortService.sortArrayByDate(genericEvents).reverse();
|
||||
} catch (error) {
|
||||
eventsList = [];
|
||||
}
|
||||
|
||||
this.eventoaprovacaostore.save(calendar, eventsList)
|
||||
|
||||
} else {
|
||||
|
||||
let allEvents = await this.processesbackend.eventsToApprove(calendar.OwnerUserId).toPromise()
|
||||
let eventsList
|
||||
try {
|
||||
eventsList = this.sortService.sortArrayByDate(allEvents).reverse();
|
||||
} catch(error) {
|
||||
eventsList = []
|
||||
}
|
||||
|
||||
this.eventoaprovacaostore.save(calendar, eventsList)
|
||||
}
|
||||
}
|
||||
// let mdEventsOficial = await this.processesbackend.GetTasksList('Agenda Oficial MDGPR,Agenda Pessoal MDGPR', false).toPromise();
|
||||
// let eventsMDGPRList = mdEventsOficial
|
||||
|
||||
// eventsMDGPRList = eventsMDGPRList.filter((item) => item.activityInstanceName != 'Editar Evento')
|
||||
|
||||
this.eventoaprovacaostore.countMd = eventsMDGPRList.length
|
||||
this.eventoaprovacaostore.resetmd(eventsMDGPRList);
|
||||
this.updateAllProcess()
|
||||
// this.eventoaprovacaostore.countMd = eventsMDGPRList.length
|
||||
// this.eventoaprovacaostore.resetmd(eventsMDGPRList);
|
||||
// this.updateAllProcess()
|
||||
|
||||
let prEventsOficial = await this.processesbackend.GetTasksList('Agenda Oficial PR,Agenda Pessoal PR', false).toPromise();
|
||||
let eventsPRList = prEventsOficial
|
||||
eventsPRList = eventsPRList.filter((item) => item.activityInstanceName != 'Editar Evento')
|
||||
// let prEventsOficial = await this.processesbackend.GetTasksList('Agenda Oficial PR,Agenda Pessoal PR', false).toPromise();
|
||||
// let eventsPRList = prEventsOficial
|
||||
// eventsPRList = eventsPRList.filter((item) => item.activityInstanceName != 'Editar Evento')
|
||||
|
||||
this.eventoaprovacaostore.countPr = eventsPRList.length
|
||||
this.eventoaprovacaostore.resetpr(eventsPRList);
|
||||
// this.eventoaprovacaostore.countPr = eventsPRList.length
|
||||
// this.eventoaprovacaostore.resetpr(eventsPRList);
|
||||
this.updateAllProcess()
|
||||
|
||||
let diplomasValidar = depachoAPI.filter(data => data.activityInstanceName == "Revisar Diploma");
|
||||
|
||||
@@ -29,6 +29,7 @@ import { DataService } from 'src/app/services/data.service';
|
||||
import { NewGroupPage } from 'src/app/pages/chat/new-group/new-group.page';
|
||||
import { RouteService } from 'src/app/services/route.service';
|
||||
import { SessionStore } from 'src/app/store/session.service';
|
||||
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-pedido',
|
||||
@@ -68,7 +69,7 @@ export class PedidoPage implements OnInit {
|
||||
private platform: Platform,
|
||||
public ThemeService: ThemeService,
|
||||
private dataService: DataService,
|
||||
) {
|
||||
private htppErroHandle: HttpErrorHandle ) {
|
||||
this.loggeduser = SessionStore.user;
|
||||
|
||||
this.activatedRoute.paramMap.subscribe(params => {
|
||||
@@ -178,9 +179,8 @@ export class PedidoPage implements OnInit {
|
||||
}, (error) => {
|
||||
if (error.status == 0) {
|
||||
this.getfromDb();
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
this.toastService._badRequest('Processo não encontrado')
|
||||
this.htppErroHandle.httpsSucessMessagge(error)
|
||||
try {
|
||||
this.goBack()
|
||||
this.close()
|
||||
@@ -358,7 +358,6 @@ export class PedidoPage implements OnInit {
|
||||
this.goBack()
|
||||
}
|
||||
|
||||
// alert(JSON.stringify(res)+' nada')
|
||||
|
||||
}))
|
||||
}
|
||||
@@ -379,15 +378,10 @@ export class PedidoPage implements OnInit {
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise()
|
||||
|
||||
this.toastService._successMessage()
|
||||
this.htppErroHandle.httpsSucessMessagge('Solicitar alteração')
|
||||
this.close();
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest()
|
||||
}
|
||||
this.htppErroHandle.httpStatusHandle(error)
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
@@ -404,15 +398,10 @@ export class PedidoPage implements OnInit {
|
||||
note
|
||||
}).toPromise()
|
||||
|
||||
this.toastService._successMessage()
|
||||
this.htppErroHandle.httpsSucessMessagge('Arquivar')
|
||||
this.close();
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest()
|
||||
}
|
||||
this.htppErroHandle.httpStatusHandle(error)
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
@@ -456,12 +445,7 @@ export class PedidoPage implements OnInit {
|
||||
loader.remove()
|
||||
}, (error) => {
|
||||
loader.remove()
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest('Processo não encontrado')
|
||||
}
|
||||
this.htppErroHandle.httpStatusHandle(error)
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@ import { Platform } from '@ionic/angular';
|
||||
import { SortService } from 'src/app/services/functions/sort.service';
|
||||
import { Storage } from '@ionic/storage';
|
||||
import { SessionStore } from 'src/app/store/session.service';
|
||||
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
|
||||
|
||||
|
||||
@Component({
|
||||
@@ -49,7 +50,8 @@ export class PendentesPage implements OnInit {
|
||||
private platform: Platform,
|
||||
private backgroundservices: BackgroundService,
|
||||
private sortService: SortService,
|
||||
private storage: Storage
|
||||
private storage: Storage,
|
||||
private httpErroHandle: HttpErrorHandle
|
||||
) {
|
||||
this.loggeduser = SessionStore.user;
|
||||
this.profile = 'mdgpr';
|
||||
@@ -116,6 +118,8 @@ export class PendentesPage implements OnInit {
|
||||
}, (error) => {
|
||||
if(error.status == 0) {
|
||||
this.getFromDb();
|
||||
} else {
|
||||
this.httpErroHandle.httpStatusHandle(error)
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@@ -96,7 +96,7 @@
|
||||
<ion-icon slot="start" src="assets/images/icons-description.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-textarea-class flex-grow-1">
|
||||
<ion-textarea [(ngModel)]="folder.Detail" rows="12" cols="20" placeholder="Descrição da acção..."></ion-textarea>
|
||||
<ion-textarea [(ngModel)]="folder.Detail" rows="12" cols="20" placeholder="Descrição da acção*"></ion-textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -5,6 +5,7 @@ import * as moment from 'moment';
|
||||
import { PublicationFolder } from 'src/app/models/publicationfolder';
|
||||
import { PublicationsService } from 'src/app/services/publications.service';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
import { HttpErrorHandle} from 'src/app/services/http-error-handle.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-edit-action',
|
||||
@@ -41,6 +42,7 @@ export class EditActionPage implements OnInit {
|
||||
private toastService: ToastService,
|
||||
private navParams: NavParams,
|
||||
private modalController: ModalController,
|
||||
private httpErrorHandle: HttpErrorHandle
|
||||
) {
|
||||
this.folder = new PublicationFolder();
|
||||
this.folderId = this.navParams.get('folderId');
|
||||
@@ -117,14 +119,9 @@ export class EditActionPage implements OnInit {
|
||||
await this.publicationsService.UpdatePresidentialAction(body).toPromise()
|
||||
this.close();
|
||||
this.updateDesktopComponent.emit();
|
||||
this.toastService._successMessage('Acção presidencial atualizada')
|
||||
this.httpErrorHandle.httpsSucessMessagge('Editar publicação');
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest('Não foi possivel atualizar a acção presidencial')
|
||||
}
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
<ion-icon slot="start" src="assets/images/icons-description.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-textarea-class" [class.input-error]="Form?.get('Detail')?.invalid && validateFrom ">
|
||||
<ion-textarea autocomplete="on" autocorrect="on" spellcheck="true" [(ngModel)]="folder.Detail" rows="12" cols="20" placeholder="Descrição da acção..."></ion-textarea>
|
||||
<ion-textarea autocomplete="on" autocorrect="on" spellcheck="true" [(ngModel)]="folder.Detail" rows="12" cols="20" placeholder="Descrição da acção*"></ion-textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -7,6 +7,7 @@ import { PublicationsService } from 'src/app/services/publications.service';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
import { NgxMatDateFormats } from '@angular-material-components/datetime-picker';
|
||||
import { NGX_MAT_DATE_FORMATS } from '@angular-material-components/datetime-picker';
|
||||
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
|
||||
|
||||
|
||||
const CUSTOM_DATE_FORMATS: NgxMatDateFormats = {
|
||||
@@ -65,7 +66,8 @@ export class NewActionPage implements OnInit {
|
||||
constructor(
|
||||
private modalController: ModalController,
|
||||
private publication: PublicationsService,
|
||||
private toastService: ToastService
|
||||
private toastService: ToastService,
|
||||
private httpErroHandle: HttpErrorHandle
|
||||
|
||||
) {
|
||||
|
||||
@@ -138,11 +140,11 @@ export class NewActionPage implements OnInit {
|
||||
try {
|
||||
await this.publication.CreatePublicationFolder(this.folder).toPromise();
|
||||
|
||||
this.toastService._successMessage("Acção criada");
|
||||
this.httpErroHandle.httpsSucessMessagge('Acção criada')
|
||||
this.close();
|
||||
} catch (error) {
|
||||
|
||||
this.toastService._badRequest("Acção não criada");
|
||||
this.httpErroHandle.httpStatusHandle(error)
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@ import { Camera, CameraResultType, CameraSource, Photo } from '@capacitor/camera
|
||||
|
||||
import { Filesystem, Directory } from '@capacitor/filesystem';
|
||||
import { NgxImageCompressService } from "ngx-image-compress";
|
||||
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
|
||||
|
||||
const IMAGE_DIR = 'stored-images';
|
||||
|
||||
@@ -85,6 +86,7 @@ export class NewPublicationPage implements OnInit {
|
||||
private platform: Platform,
|
||||
private loadingCtrl: LoadingController,
|
||||
public imageCompress: NgxImageCompressService,
|
||||
private httpErrorHandle: HttpErrorHandle
|
||||
) {
|
||||
|
||||
this.publicationType = this.navParams.get('publicationType');
|
||||
@@ -198,14 +200,14 @@ export class NewPublicationPage implements OnInit {
|
||||
|
||||
this.Form = new FormGroup({
|
||||
Subject: new FormControl(this.pub.Title, [
|
||||
//Validators.required,
|
||||
Validators.required,
|
||||
// Validators.minLength(4)
|
||||
]),
|
||||
capturedImage: new FormControl(this.capturedImage, [
|
||||
|
||||
]),
|
||||
Message: new FormControl(this.pub.Message, [
|
||||
// Validators.required
|
||||
Validators.required,
|
||||
Validators.maxLength(1000)
|
||||
|
||||
])
|
||||
@@ -241,11 +243,11 @@ export class NewPublicationPage implements OnInit {
|
||||
try {
|
||||
|
||||
await this.publications.UpdatePublication(this.publication.ProcessId, this.publication).toPromise()
|
||||
this.toastService._successMessage("Publicação editada")
|
||||
this.httpErrorHandle.httpsSucessMessagge('Publicação Editada')
|
||||
|
||||
this.close();
|
||||
} catch (error) {
|
||||
this.toastService._badRequest("Publicação não editada")
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
@@ -269,11 +271,11 @@ export class NewPublicationPage implements OnInit {
|
||||
|
||||
try {
|
||||
await this.publications.UpdatePublication(this.publication.ProcessId, this.publication).toPromise()
|
||||
this.toastService._successMessage("Publicação criado")
|
||||
this.httpErrorHandle.httpsSucessMessagge('Criar publicação')
|
||||
|
||||
this.close();
|
||||
} catch (error) {
|
||||
this.toastService._badRequest("Publicação não criado")
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
@@ -297,11 +299,11 @@ export class NewPublicationPage implements OnInit {
|
||||
|
||||
try {
|
||||
await this.publications.UpdatePublication(this.publication.ProcessId, this.publication).toPromise()
|
||||
this.toastService._successMessage("Publicação criado")
|
||||
this.httpErrorHandle.httpsSucessMessagge('Criar publicação')
|
||||
|
||||
this.close();
|
||||
} catch (error) {
|
||||
this.toastService._badRequest("Publicação não criado")
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
@@ -333,12 +335,12 @@ export class NewPublicationPage implements OnInit {
|
||||
|
||||
await this.publications.CreatePublication(this.folderId, this.publication).toPromise();
|
||||
this.close();
|
||||
this.toastService._successMessage("Publicação criado")
|
||||
this.httpErrorHandle.httpsSucessMessagge('Criar publicação')
|
||||
|
||||
|
||||
this.close();
|
||||
} catch (error) {
|
||||
this.toastService._badRequest("Publicação não criado")
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
+7
-2
@@ -9,6 +9,7 @@ import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { ViewMediaPage } from 'src/app/modals/view-media/view-media.page';
|
||||
import { RouteService } from 'src/app/services/route.service';
|
||||
import { PermissionService } from 'src/app/services/permission.service';
|
||||
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-publication-detail',
|
||||
@@ -30,6 +31,7 @@ export class PublicationDetailPage implements OnInit {
|
||||
private RouteService: RouteService,
|
||||
public ThemeService: ThemeService,
|
||||
public p:PermissionService,
|
||||
private httpErrorHandle: HttpErrorHandle
|
||||
) {
|
||||
|
||||
this.activatedRoute.paramMap.subscribe(params => {
|
||||
@@ -87,6 +89,9 @@ export class PublicationDetailPage implements OnInit {
|
||||
FileExtension: 'jpeg',
|
||||
}
|
||||
this.showLoader = false;
|
||||
}, (error) => {
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
this.goBack();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -109,7 +114,7 @@ export class PublicationDetailPage implements OnInit {
|
||||
|
||||
try {
|
||||
await this.publications.DeletePublication(this.folderId, this.publicationId).toPromise();
|
||||
this.toastService._successMessage('Publicação removida')
|
||||
this.httpErrorHandle.httpsSucessMessagge('Eliminar publicação')
|
||||
|
||||
if(window['app-view-publications-page-doRefresh']) {
|
||||
window['app-view-publications-page-doRefresh']()
|
||||
@@ -117,7 +122,7 @@ export class PublicationDetailPage implements OnInit {
|
||||
|
||||
this.goBack();
|
||||
} catch (error) {
|
||||
this.toastService._badRequest('Publicaçao não removida')
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@ import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { forkJoin } from 'rxjs';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
import { PermissionService } from 'src/app/services/permission.service';
|
||||
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-view-publications',
|
||||
@@ -44,7 +45,8 @@ export class ViewPublicationsPage implements OnInit {
|
||||
private backgroundservice: BackgroundService,
|
||||
public ThemeService: ThemeService,
|
||||
private toastService: ToastService,
|
||||
public p: PermissionService,) {
|
||||
public p: PermissionService,
|
||||
private httpErroHandle: HttpErrorHandle) {
|
||||
|
||||
this.item = new PublicationFolder();
|
||||
this.activatedRoute.paramMap.subscribe(params => {
|
||||
@@ -119,6 +121,8 @@ export class ViewPublicationsPage implements OnInit {
|
||||
|
||||
this.item = res;
|
||||
this.sqliteservice.updatePublicationsDetails(this.folderId, JSON.stringify(res));
|
||||
}, (error) => {
|
||||
this.httpErroHandle.httpStatusHandle(error)
|
||||
});
|
||||
}
|
||||
|
||||
@@ -161,7 +165,12 @@ export class ViewPublicationsPage implements OnInit {
|
||||
this.showLoader = false;
|
||||
|
||||
}, (error) => {
|
||||
this.getFromDB()
|
||||
if(error.status == 0) {
|
||||
this.getFromDB()
|
||||
} else {
|
||||
this.httpErroHandle.httpStatusHandle(error)
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
@@ -196,6 +205,8 @@ export class ViewPublicationsPage implements OnInit {
|
||||
if (error.status == '404') {
|
||||
this.error = 'Sem publicações disponíveis!';
|
||||
this.publicationList = [];
|
||||
} else {
|
||||
this.httpErroHandle.httpStatusHandle(error)
|
||||
}
|
||||
this.showLoader = false;
|
||||
});
|
||||
|
||||
@@ -13,6 +13,7 @@ import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { ViewDocumentPage } from 'src/app/modals/view-document/view-document.page';
|
||||
import { Router } from '@angular/router';
|
||||
import { environment } from 'src/environments/environment';
|
||||
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-search',
|
||||
@@ -65,7 +66,8 @@ export class SearchPage implements OnInit {
|
||||
private modalCtrl: ModalController,
|
||||
private navParams: NavParams,
|
||||
public ThemeService: ThemeService,
|
||||
private router: Router)
|
||||
private router: Router,
|
||||
private httpErrorhandle: HttpErrorHandle)
|
||||
{
|
||||
this.ordinance = "recent";
|
||||
this.currentPath= window.location.pathname;
|
||||
@@ -287,6 +289,7 @@ export class SearchPage implements OnInit {
|
||||
},error => {
|
||||
this.showLoader = false;
|
||||
// this.searchResult = "Registo não encontrado"
|
||||
this.httpErrorhandle.httpStatusHandle(error)
|
||||
console.log(error)
|
||||
});
|
||||
}
|
||||
@@ -334,7 +337,6 @@ export class SearchPage implements OnInit {
|
||||
this.loadWordCloud();
|
||||
},error => {
|
||||
this.searchResult = "Registo não encontrado"
|
||||
|
||||
counter++;
|
||||
console.log('application 8 failed', error)
|
||||
if(counter ==2) {
|
||||
|
||||
Reference in New Issue
Block a user