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 {
|
||||
|
||||
|
||||
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)){
|
||||
//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 ) {
|
||||
if(SessionStore.exist && SessionStore.user.Inactivity && !SessionStore.hasPin ) {
|
||||
return true
|
||||
} else if(SessionStore.exist && !SessionStore.user.Inactivity) {
|
||||
return true
|
||||
|
||||
@@ -569,9 +569,6 @@ export class DespachoPrPage implements OnInit {
|
||||
modal.onDidDismiss().then(res => {
|
||||
if (res['data'] == 'close') {
|
||||
this.close();
|
||||
/*
|
||||
this.close();
|
||||
this.openMenu(); */
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
<h5>Documentos Anexados</h5>
|
||||
<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)">
|
||||
<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>
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
|
||||
@@ -305,10 +305,10 @@ export class DespachoPage implements OnInit {
|
||||
|
||||
try {
|
||||
await this.despachoService.executado(note, documents, this.serialnumber).toPromise();
|
||||
this.toastService.successMessage('Processo criado')
|
||||
this.toastService._successMessage('Processo criado')
|
||||
this.close();
|
||||
} catch (error) {
|
||||
this.toastService.badRequest("Processo não criado")
|
||||
this.toastService._badRequest("Processo não criado")
|
||||
}
|
||||
finally {
|
||||
loader.remove()
|
||||
@@ -347,11 +347,11 @@ export class DespachoPage implements OnInit {
|
||||
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise()
|
||||
this.toastService.successMessage()
|
||||
this.toastService._successMessage()
|
||||
this.close();
|
||||
|
||||
} catch (error) {
|
||||
this.toastService.badRequest()
|
||||
this.toastService._badRequest()
|
||||
}
|
||||
finally {
|
||||
loader.remove()
|
||||
|
||||
+1
@@ -325,6 +325,7 @@ export class BookMeetingModalPage implements OnInit {
|
||||
}
|
||||
}
|
||||
else{
|
||||
// alert(JSON.stringify(this.task))
|
||||
this.toastService._successMessage('Não é possível marcar a reunião de momento');
|
||||
}
|
||||
|
||||
|
||||
+3
-1
@@ -59,7 +59,7 @@
|
||||
<h5>Documentos Anexados</h5>
|
||||
<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)">
|
||||
<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>
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
@@ -166,6 +166,8 @@
|
||||
</ion-item>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
|
||||
</div>
|
||||
</ion-content>
|
||||
|
||||
|
||||
+1
-36
@@ -320,42 +320,7 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
|
||||
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() {
|
||||
@@ -383,7 +348,7 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
"Remetente": res.workflowInstanceDataFields.Sender,
|
||||
"Note": res.workflowInstanceDataFields.TaskMessage || res.workflowInstanceDataFields.Note,
|
||||
"FolderId": res.workflowInstanceDataFields.FolderID,
|
||||
"FsId": res.workflowInstanceDataFields.FsId,
|
||||
"FsId": res.workflowInstanceDataFields.FsId || res.workflowInstanceDataFields.ApplicationID,
|
||||
"DocId": res.workflowInstanceDataFields.DocID,
|
||||
"WorkflowName": res.workflowDisplayName,
|
||||
"Status": res.workflowInstanceDataFields.Status,
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
<h5>Documentos Anexados</h5>
|
||||
<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)">
|
||||
<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>
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
<!-- This is the list view -->
|
||||
<div *ngSwitchCase="'listview'">
|
||||
|
||||
<ion-item-sliding *ngIf="AllProcess">
|
||||
<ion-item-sliding *ngIf="loadCount">
|
||||
<div class="listview" >
|
||||
<ion-list *ngIf="AllProcess">
|
||||
|
||||
@@ -97,7 +97,7 @@
|
||||
</ion-item-sliding>
|
||||
|
||||
|
||||
<ion-item-sliding *ngIf="!AllProcess" class="width-100">
|
||||
<ion-item-sliding *ngIf="!loadCount" class="width-100">
|
||||
<ion-item lines="none"
|
||||
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) {
|
||||
|
||||
alert('nice!!!')
|
||||
|
||||
if (workflowName == 'Despacho') {
|
||||
if (activityName == 'Tarefa de Despacho' || activityName == 'Concluir Despacho') {
|
||||
this.router.navigate(['/home/gabinete-digital/despachos', serialNumber, 'gabinete-digital']);
|
||||
|
||||
@@ -717,7 +717,7 @@ export class SearchPage implements OnInit {
|
||||
|
||||
if(ApplicationType == '8' || ApplicationType == '361') {
|
||||
|
||||
alert('view!!')
|
||||
// alert('view!!')
|
||||
this.viewDocumentDetail(Id, ApplicationType);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -475,7 +475,7 @@ export class NewEventPage implements OnInit {
|
||||
if(DocumentToSave.length == 0){
|
||||
this.afterSave();
|
||||
}
|
||||
this.toastService.successMessage('Evento criado')
|
||||
this.toastService._successMessage('Evento criado')
|
||||
});
|
||||
} else {
|
||||
|
||||
@@ -513,7 +513,7 @@ export class NewEventPage implements OnInit {
|
||||
if(DocumentToSave.length == 0){
|
||||
this.afterSave();
|
||||
}
|
||||
this.toastService.successMessage('Evento criado')
|
||||
this.toastService._successMessage('Evento criado')
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
<h5>Documentos Anexados</h5>
|
||||
<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)">
|
||||
<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>
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
|
||||
Reference in New Issue
Block a user