This commit is contained in:
Eudes Inácio
2022-06-02 09:10:07 +01:00
18 changed files with 50 additions and 99 deletions
+6 -22
View File
@@ -24,22 +24,14 @@ export class InactivityGuard implements CanActivate {
if (this.platform.is('desktop') || this.platform.is('mobileweb')) { if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
if(this.p.userPermission(this.p.permissionList.Agenda.access) || this.p.userPermission(this.p.permissionList.Gabinete.access)){ if(this.p.userPermission(this.p.permissionList.Agenda.access) || this.p.userPermission(this.p.permissionList.Gabinete.access)){
//When user has got access to Agenda but does not have their own calendar, goes to Agenda this.router.navigate(['/home/events']);
if(this.p.userPermission(this.p.permissionList.Agenda.access) && SessionStore.user.OwnerCalendars.length == 0){
this.router.navigate(['/home/agenda']);
}
else{
this.router.navigate(['/home/events']);
}
} }
//If user has access permission to both Chat and Action, goes to Chat by default. else if(this.p.userPermission(this.p.permissionList.Chat.access) && this.p.userPermission(this.p.permissionList.Actions.access)){
else if((this.p.userPermission(this.p.permissionList.Chat.access) && this.p.userPermission(this.p.permissionList.Actions.access)) || this.p.userPermission(this.p.permissionList.Chat.access)){
this.router.navigate(['/home/chat']); this.router.navigate(['/home/chat']);
} }
else if(this.p.userPermission(this.p.permissionList.Actions.access)) { else if(this.p.userPermission(this.p.permissionList.Actions.access)) {
this.router.navigate(['/home/publications']); this.router.navigate(['/home/publications']);
} } else {
else {
this.alertController.create({ this.alertController.create({
cssClass: 'my-custom-class', cssClass: 'my-custom-class',
@@ -65,22 +57,14 @@ export class InactivityGuard implements CanActivate {
else { else {
if(this.p.userPermission(this.p.permissionList.Agenda.access) || this.p.userPermission(this.p.permissionList.Gabinete.access)){ if(this.p.userPermission(this.p.permissionList.Agenda.access) || this.p.userPermission(this.p.permissionList.Gabinete.access)){
//When user has got access to Agenda but does not have their own calendar, goes to Agenda this.router.navigate(['/home/events']);
if(this.p.userPermission(this.p.permissionList.Agenda.access) && SessionStore.user.OwnerCalendars.length == 0){
this.router.navigate(['/home/agenda']);
}
else{
this.router.navigate(['/home/events']);
}
} }
//If user has access permission to both Chat and Action, goes to Chat by default. else if(this.p.userPermission(this.p.permissionList.Chat.access) && this.p.userPermission(this.p.permissionList.Actions.access)){
else if((this.p.userPermission(this.p.permissionList.Chat.access) && this.p.userPermission(this.p.permissionList.Actions.access)) || this.p.userPermission(this.p.permissionList.Chat.access)){
this.router.navigate(['/home/chat']); this.router.navigate(['/home/chat']);
} }
else if(this.p.userPermission(this.p.permissionList.Actions.access)){ else if(this.p.userPermission(this.p.permissionList.Actions.access)){
this.router.navigate(['/home/publications']); this.router.navigate(['/home/publications']);
} } else {
else {
this.alertController.create({ this.alertController.create({
cssClass: 'my-custom-class', cssClass: 'my-custom-class',
header: 'Utilizador sem acesso a aplicação', header: 'Utilizador sem acesso a aplicação',
@@ -50,15 +50,15 @@ export class ChatOptionsFeaturesPage implements OnInit {
} }
notImplemented(){ notImplemented() {
this.alertService.presentAlert('Funcionalidade em desenvolvimento'); this.alertService.presentAlert('Funcionalidade em desenvolvimento');
} }
close(){ close() {
if( window.innerWidth < 701){ if( window.innerWidth < 701) {
this.popoverController.dismiss(); this.popoverController.dismiss();
} }
else{ else {
this.modalController.dismiss(); this.modalController.dismiss();
} }
} }
@@ -131,7 +131,7 @@ export class NewEventPage implements OnInit {
this.getRecurrenceTypes(); this.getRecurrenceTypes();
if(this.selectedSegment != "Combinada"){ if(this.selectedSegment != "Combinada"){
this.postEvent ={ this.postEvent = {
EventId: '', EventId: '',
Subject: '', Subject: '',
Body: this.eventBody, Body: this.eventBody,
@@ -153,7 +153,7 @@ export class NewEventPage implements OnInit {
}; };
} }
else{ else{
this.postEvent ={ this.postEvent = {
EventId: '', EventId: '',
Subject: '', Subject: '',
Body: this.eventBody, Body: this.eventBody,
@@ -176,7 +176,6 @@ export class NewEventPage implements OnInit {
} }
window.onresize = (event) => { window.onresize = (event) => {
// if not mobile remove all component
if( window.innerWidth >= 1024){ if( window.innerWidth >= 1024){
this.modalController.dismiss(); this.modalController.dismiss();
} }
@@ -187,25 +186,25 @@ export class NewEventPage implements OnInit {
} }
close(){ close() {
this.modalController.dismiss(); this.modalController.dismiss();
} }
getRecurrenceTypes() { getRecurrenceTypes() {
this.eventService.getRecurrenceTypes().subscribe(res=>{ this.eventService.getRecurrenceTypes().subscribe( res => {
this.recurringTypes = res; this.recurringTypes = res;
}); });
} }
onSelectedRecurringChanged(ev:any){ onSelectedRecurringChanged(ev:any) {
if(ev.length > 1){ if(ev.length > 1) {
this.selectedRecurringType = ev.filter(data => data != '-1'); this.selectedRecurringType = ev.filter(data => data != '-1');
} }
if(ev.length == 0){ if(ev.length == 0) {
this.selectedRecurringType = "-1"; this.selectedRecurringType = "-1";
} }
} }
@@ -286,7 +285,7 @@ export class NewEventPage implements OnInit {
if(this.documents.length >= 0) { if(this.documents.length >= 0) {
this.postEvent.HasAttachments = true; this.postEvent.HasAttachments = true;
} }
if(this.selectedRecurringType != '-1'){ if(this.selectedRecurringType != '-1') {
this.postEvent.EventRecurrence.Type = this.selectedRecurringType; this.postEvent.EventRecurrence.Type = this.selectedRecurringType;
} }
@@ -120,7 +120,7 @@ export class NewGroupPage implements OnInit {
return await popover.present(); return await popover.present();
} }
async showPicker(){ async showPicker() {
const picker = await this.pickerController.create({ const picker = await this.pickerController.create({
cssClass: '', cssClass: '',
buttons: [ buttons: [
@@ -569,9 +569,6 @@ export class DespachoPrPage implements OnInit {
modal.onDidDismiss().then(res => { modal.onDidDismiss().then(res => {
if (res['data'] == 'close') { if (res['data'] == 'close') {
this.close(); this.close();
/*
this.close();
this.openMenu(); */
} }
}); });
} }
@@ -12,7 +12,7 @@
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src='assets/images/theme/gov/icons-calendar-arrow-left.svg'></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src='assets/images/theme/gov/icons-calendar-arrow-left.svg'></ion-icon>
</div> </div>
<div class="middle d-flex align-center flex-grow-1"> <div class="middle d-flex align-center flex-grow-1">
<ion-label class="title">{{ task.Folio}}</ion-label> <ion-label class="title">{{ task.Folio }}</ion-label>
</div> </div>
<div class="div-icon" (click)="openOptions()" *ngIf="p.userPermission([p.permissionList.Agenda.access])"> <div class="div-icon" (click)="openOptions()" *ngIf="p.userPermission([p.permissionList.Agenda.access])">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-menu.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-menu.svg"></ion-icon>
@@ -62,7 +62,7 @@
<h5>Documentos Anexados</h5> <h5>Documentos Anexados</h5>
<ion-item class="ion-no-margin ion-no-padding cursor-pointer" *ngFor="let Document of fulltask.Documents"> <ion-item class="ion-no-margin ion-no-padding cursor-pointer" *ngFor="let Document of fulltask.Documents">
<ion-label class="d-block" (click)="viewDocument(Document.DocId, Document)"> <ion-label class="d-block" (click)="viewDocument(Document.DocId, Document)">
<p class="attach-title-item">{{ Document.Assunto }}<span class="span-right color-red btn-size"><ion-icon hidden name="close"></ion-icon></span></p> <p class="attach-title-item">{{ Document.Assunto || "Sem assunto" }}<span class="span-right color-red btn-size"><ion-icon hidden name="close"></ion-icon></span></p>
<p><span class="span-left">{{ Document.Sender}}</span><span class="span-right">{{ Document.DocDate | date: 'dd/MM/yyyy HH:mm' }}</span></p> <p><span class="span-left">{{ Document.Sender}}</span><span class="span-right">{{ Document.DocDate | date: 'dd/MM/yyyy HH:mm' }}</span></p>
</ion-label> </ion-label>
</ion-item> </ion-item>
@@ -305,10 +305,10 @@ export class DespachoPage implements OnInit {
try { try {
await this.despachoService.executado(note, documents, this.serialnumber).toPromise(); await this.despachoService.executado(note, documents, this.serialnumber).toPromise();
this.toastService.successMessage('Processo criado') this.toastService._successMessage('Processo criado')
this.close(); this.close();
} catch (error) { } catch (error) {
this.toastService.badRequest("Processo não criado") this.toastService._badRequest("Processo não criado")
} }
finally { finally {
loader.remove() loader.remove()
@@ -347,11 +347,11 @@ export class DespachoPage implements OnInit {
try { try {
await this.processes.CompleteTask(body).toPromise() await this.processes.CompleteTask(body).toPromise()
this.toastService.successMessage() this.toastService._successMessage()
this.close(); this.close();
} catch (error) { } catch (error) {
this.toastService.badRequest() this.toastService._badRequest()
} }
finally { finally {
loader.remove() loader.remove()
@@ -324,7 +324,7 @@ export class BookMeetingModalPage implements OnInit {
loader.remove() loader.remove()
} }
} }
else{ else {
this.toastService._successMessage('Não é possível marcar a reunião de momento'); this.toastService._successMessage('Não é possível marcar a reunião de momento');
} }
@@ -409,7 +409,7 @@ export class BookMeetingModalPage implements OnInit {
modal.onDidDismiss().then((data) => { modal.onDidDismiss().then((data) => {
if(data){ if(data) {
data = data['data']; data = data['data'];
const newAttendees: EventPerson[] = data['taskParticipants']; const newAttendees: EventPerson[] = data['taskParticipants'];
@@ -59,7 +59,7 @@
<h5>Documentos Anexados</h5> <h5>Documentos Anexados</h5>
<ion-item class="ion-no-margin ion-no-padding cursor-pointer" *ngFor="let Document of fulltask.Documents"> <ion-item class="ion-no-margin ion-no-padding cursor-pointer" *ngFor="let Document of fulltask.Documents">
<ion-label class="d-block" (click)="viewDocument(Document.DocId, Document)"> <ion-label class="d-block" (click)="viewDocument(Document.DocId, Document)">
<p class="attach-title-item">{{ Document.Assunto }}<span class="span-right color-red btn-size"><ion-icon hidden name="close"></ion-icon></span></p> <p class="attach-title-item">{{ Document.Assunto || "Sem assunto" }}<span class="span-right color-red btn-size"><ion-icon hidden name="close"></ion-icon></span></p>
<p><span class="span-left">{{ Document.Sender}}</span><span class="span-right">{{ Document.DocDate | date: 'dd/MM/yyyy HH:mm' }}</span></p> <p><span class="span-left">{{ Document.Sender}}</span><span class="span-right">{{ Document.DocDate | date: 'dd/MM/yyyy HH:mm' }}</span></p>
</ion-label> </ion-label>
</ion-item> </ion-item>
@@ -166,6 +166,8 @@
</ion-item> </ion-item>
</div> </div>
<div>
</div>
</ion-content> </ion-content>
@@ -320,42 +320,7 @@ export class ExpedienteDetailPage implements OnInit {
goBack() { goBack() {
this.RouteService.goBack(); this.RouteService.goBack();
/* if(this.task.Status == "Pending" && this.caller != 'events'){
if (window.innerWidth <= 800) {
this.router.navigate(['/home/gabinete-digital/pendentes']);
}
else {
let navigationExtras: NavigationExtras = {
queryParams: {
"pendentes": true,
}
}
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
}
}
else{
this.activatedRoute.paramMap.subscribe(params => {
switch (params["params"].caller) {
case 'events':
this.router.navigate(['/home',params["params"].caller]);
break;
case 'gabinete-digital':
let navigationExtras: NavigationExtras = {
queryParams: {
"expedientes": true,
}
}
if( window.innerWidth < 801) {
this.router.navigate(['/home/gabinete-digital/expediente']);
} else {
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
}
break;
}
});
} */
} }
sendExpedienteToPending() { sendExpedienteToPending() {
@@ -383,7 +348,7 @@ export class ExpedienteDetailPage implements OnInit {
"Remetente": res.workflowInstanceDataFields.Sender, "Remetente": res.workflowInstanceDataFields.Sender,
"Note": res.workflowInstanceDataFields.TaskMessage || res.workflowInstanceDataFields.Note, "Note": res.workflowInstanceDataFields.TaskMessage || res.workflowInstanceDataFields.Note,
"FolderId": res.workflowInstanceDataFields.FolderID, "FolderId": res.workflowInstanceDataFields.FolderID,
"FsId": res.workflowInstanceDataFields.FsId, "FsId": res.workflowInstanceDataFields.FsId || res.workflowInstanceDataFields.ApplicationID,
"DocId": res.workflowInstanceDataFields.DocID, "DocId": res.workflowInstanceDataFields.DocID,
"WorkflowName": res.workflowDisplayName, "WorkflowName": res.workflowDisplayName,
"Status": res.workflowInstanceDataFields.Status, "Status": res.workflowInstanceDataFields.Status,
@@ -83,7 +83,7 @@ export class ExpedientePage implements OnInit {
}); });
this.taskslist = this.taskslist.filter(function(item) { this.taskslist = this.taskslist.filter(function(item) {
return item.activityInstanceName != 'Retificar Expediente' return item.activityInstanceName != 'Retificar Expediente'
}) })
this.listToPresent = this.sortService.sortDate(this.taskslist, 'taskStartDate') this.listToPresent = this.sortService.sortDate(this.taskslist, 'taskStartDate')
@@ -68,7 +68,7 @@
<h5>Documentos Anexados</h5> <h5>Documentos Anexados</h5>
<ion-item class="ion-no-margin ion-no-padding cursor-pointer" *ngFor="let Document of fulltask.Documents"> <ion-item class="ion-no-margin ion-no-padding cursor-pointer" *ngFor="let Document of fulltask.Documents">
<ion-label class="d-block" (click)="viewDocument(Document.DocId, Document)"> <ion-label class="d-block" (click)="viewDocument(Document.DocId, Document)">
<p class="attach-title-item">{{ Document.Assunto }}<span class="span-right color-red btn-size"><ion-icon hidden name="close"></ion-icon></span></p> <p class="attach-title-item">{{ Document.Assunto || "Sem assunto" }}<span class="span-right color-red btn-size"><ion-icon hidden name="close"></ion-icon></span></p>
<p><span class="span-left">{{ Document.Sender}}</span><span class="span-right">{{ Document.DocDate | date: 'dd/MM/yyyy HH:mm' }}</span></p> <p><span class="span-left">{{ Document.Sender}}</span><span class="span-right">{{ Document.DocDate | date: 'dd/MM/yyyy HH:mm' }}</span></p>
</ion-label> </ion-label>
</ion-item> </ion-item>
@@ -36,7 +36,7 @@
<!-- This is the list view --> <!-- This is the list view -->
<div *ngSwitchCase="'listview'"> <div *ngSwitchCase="'listview'">
<ion-item-sliding *ngIf="AllProcess"> <ion-item-sliding *ngIf="loadCount">
<div class="listview" > <div class="listview" >
<ion-list *ngIf="AllProcess"> <ion-list *ngIf="AllProcess">
@@ -97,7 +97,7 @@
</ion-item-sliding> </ion-item-sliding>
<ion-item-sliding *ngIf="!AllProcess" class="width-100"> <ion-item-sliding *ngIf="!loadCount" class="width-100">
<ion-item lines="none" <ion-item lines="none"
class="item-skeleton width-100 d-flex ion-no-border ion-no-margin ion-no-padding"> class="item-skeleton width-100 d-flex ion-no-border ion-no-margin ion-no-padding">
@@ -383,8 +383,6 @@ export class GabineteDigitalPage implements OnInit, DoCheck {
goToProcess(serialNumber: string, workflowName: string, activityName: string) { goToProcess(serialNumber: string, workflowName: string, activityName: string) {
alert('nice!!!')
if (workflowName == 'Despacho') { if (workflowName == 'Despacho') {
if (activityName == 'Tarefa de Despacho' || activityName == 'Concluir Despacho') { if (activityName == 'Tarefa de Despacho' || activityName == 'Concluir Despacho') {
this.router.navigate(['/home/gabinete-digital/despachos', serialNumber, 'gabinete-digital']); this.router.navigate(['/home/gabinete-digital/despachos', serialNumber, 'gabinete-digital']);
+1 -1
View File
@@ -717,7 +717,7 @@ export class SearchPage implements OnInit {
if(ApplicationType == '8' || ApplicationType == '361') { if(ApplicationType == '8' || ApplicationType == '361') {
alert('view!!') // alert('view!!')
this.viewDocumentDetail(Id, ApplicationType); this.viewDocumentDetail(Id, ApplicationType);
} }
} }
@@ -152,7 +152,11 @@ export class NewEventPage implements OnInit {
ngOnInit() { ngOnInit() {
this.CalendarName = this.loggeduser.Profile;
if(!this.CalendarName) {
this.CalendarName = this.loggeduser.Profile;
}
this.getRecurrenceTypes(); this.getRecurrenceTypes();
if(!this.restoreTemporaryData()){ if(!this.restoreTemporaryData()){
@@ -475,7 +479,7 @@ export class NewEventPage implements OnInit {
if(DocumentToSave.length == 0){ if(DocumentToSave.length == 0){
this.afterSave(); this.afterSave();
} }
this.toastService.successMessage('Evento criado') this.toastService._successMessage('Evento criado')
}); });
} else { } else {
@@ -513,7 +517,7 @@ export class NewEventPage implements OnInit {
if(DocumentToSave.length == 0){ if(DocumentToSave.length == 0){
this.afterSave(); this.afterSave();
} }
this.toastService.successMessage('Evento criado') this.toastService._successMessage('Evento criado')
}); });
} }
@@ -574,7 +578,8 @@ export class NewEventPage implements OnInit {
window['temp.path:/home/agenda/new-event.component.ts'] = { window['temp.path:/home/agenda/new-event.component.ts'] = {
postEvent: this.postEvent, postEvent: this.postEvent,
eventBody: this.eventBody, eventBody: this.eventBody,
segment: this.segment segment: this.segment,
CalendarName: this.CalendarName
} }
} }
@@ -591,6 +596,7 @@ export class NewEventPage implements OnInit {
this.postEvent = restoredData.postEvent this.postEvent = restoredData.postEvent
this.eventBody = restoredData.eventBody this.eventBody = restoredData.eventBody
this.segment = restoredData.segment this.segment = restoredData.segment
this.CalendarName = restoredData.CalendarName
// restore dater for date and hours picker // restore dater for date and hours picker
@@ -299,11 +299,11 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
this.calculateDuration(); this.calculateDuration();
//} //}
} }
else{ else {
this.toastService._badRequest('Para gravar uma mensagem de voz, permita o acesso do Gabinete Digital ao seu microfone.'); this.toastService._badRequest('Para gravar uma mensagem de voz, permita o acesso do Gabinete Digital ao seu microfone.');
} }
} }
else{ else {
this.toastService._badRequest('Este dispositivo não tem capacidade para gravação de áudio!'); this.toastService._badRequest('Este dispositivo não tem capacidade para gravação de áudio!');
} }
} }
@@ -58,7 +58,7 @@
<h5>Documentos Anexados</h5> <h5>Documentos Anexados</h5>
<ion-item class="ion-no-margin ion-no-padding cursor-pointer" *ngFor="let Document of fulltask.Documents"> <ion-item class="ion-no-margin ion-no-padding cursor-pointer" *ngFor="let Document of fulltask.Documents">
<ion-label class="d-block" (click)="viewDocument.emit(Document.DocId)"> <ion-label class="d-block" (click)="viewDocument.emit(Document.DocId)">
<p class="attach-title-item">{{ Document.Assunto }}<span class="span-right color-red btn-size"><ion-icon hidden name="close"></ion-icon></span></p> <p class="attach-title-item">{{ Document.Assunto || "Sem assunto" }}<span class="span-right color-red btn-size"><ion-icon hidden name="close"></ion-icon></span></p>
<p><span class="span-left">{{ Document.Sender}}</span><span class="span-right">{{ Document.DocDate | date: 'dd/MM/yyyy HH:mm' }}</span></p> <p><span class="span-left">{{ Document.Sender}}</span><span class="span-right">{{ Document.DocDate | date: 'dd/MM/yyyy HH:mm' }}</span></p>
</ion-label> </ion-label>
</ion-item> </ion-item>