mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
improve
This commit is contained in:
@@ -22,42 +22,7 @@ export class InactivityGuard implements CanActivate {
|
|||||||
state: RouterStateSnapshot): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree {
|
state: RouterStateSnapshot): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree {
|
||||||
|
|
||||||
|
|
||||||
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
|
if(SessionStore.exist && SessionStore.user.Inactivity && !SessionStore.hasPin ) {
|
||||||
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
|
|
||||||
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)) || this.p.userPermission(this.p.permissionList.Chat.access)){
|
|
||||||
this.router.navigate(['/home/chat']);
|
|
||||||
}
|
|
||||||
else if(this.p.userPermission(this.p.permissionList.Actions.access)) {
|
|
||||||
this.router.navigate(['/home/publications']);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
|
|
||||||
this.alertController.create({
|
|
||||||
cssClass: 'my-custom-class',
|
|
||||||
header: 'Utilizador sem acesso a aplicação',
|
|
||||||
buttons: [{
|
|
||||||
text: 'Ok',
|
|
||||||
handler: () => {
|
|
||||||
|
|
||||||
}
|
|
||||||
}]
|
|
||||||
}).then( async (alertPopup) => {
|
|
||||||
await alertPopup.present();
|
|
||||||
})
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
return false
|
|
||||||
} else if(SessionStore.exist && SessionStore.user.Inactivity && !SessionStore.hasPin ) {
|
|
||||||
return true
|
return true
|
||||||
} else if(SessionStore.exist && !SessionStore.user.Inactivity) {
|
} else if(SessionStore.exist && !SessionStore.user.Inactivity) {
|
||||||
return true
|
return true
|
||||||
@@ -77,7 +42,7 @@ export class InactivityGuard implements CanActivate {
|
|||||||
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)){
|
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 {
|
||||||
@@ -90,7 +55,7 @@ export class InactivityGuard implements CanActivate {
|
|||||||
|
|
||||||
}
|
}
|
||||||
}]
|
}]
|
||||||
}).then( async (alertPopup)=>{
|
}).then( async (alertPopup) => {
|
||||||
await alertPopup.present();
|
await alertPopup.present();
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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()
|
||||||
|
|||||||
+2
-1
@@ -325,6 +325,7 @@ export class BookMeetingModalPage implements OnInit {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
// alert(JSON.stringify(this.task))
|
||||||
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 +410,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'];
|
||||||
|
|||||||
+4
-2
@@ -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>
|
||||||
|
|
||||||
|
|||||||
+1
-36
@@ -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']);
|
||||||
|
|||||||
@@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -475,7 +475,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 +513,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')
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -287,8 +287,8 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
|||||||
}
|
}
|
||||||
|
|
||||||
async startRecording() {
|
async startRecording() {
|
||||||
if(await VoiceRecorder.canDeviceVoiceRecord().then((result: GenericResponse) =>{return result.value})){
|
if(await VoiceRecorder.canDeviceVoiceRecord().then((result: GenericResponse) =>{return result.value})) {
|
||||||
if(await VoiceRecorder.requestAudioRecordingPermission().then((result: GenericResponse) => {return result.value})){
|
if(await VoiceRecorder.requestAudioRecordingPermission().then((result: GenericResponse) => {return result.value})) {
|
||||||
//if(await this.hasAudioRecordingPermission()){
|
//if(await this.hasAudioRecordingPermission()){
|
||||||
if (this.recording) {
|
if (this.recording) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|||||||
Reference in New Issue
Block a user