mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 13:02:56 +00:00
Merge branch 'developer' of https://bitbucket.org/equilibriumito/gabinete-digital into developer
This commit is contained in:
@@ -3,10 +3,10 @@
|
||||
<div class="main-content d-flex height-100">
|
||||
<div *ngIf="LoadedDocument" class="content d-flex flex-column">
|
||||
<div class="main-header">
|
||||
<div class="title-content width-100">
|
||||
<div class="title-content width-100 d-flex">
|
||||
<app-btn-modal-dismiss></app-btn-modal-dismiss>
|
||||
<div class="middle">
|
||||
<ion-label class="title">{{LoadedDocument.Subject}}</ion-label>
|
||||
<ion-label class="title">{{LoadedDocument.Assunto}}</ion-label>
|
||||
</div>
|
||||
<div class="div-icon">
|
||||
<ion-menu-button >
|
||||
@@ -18,7 +18,7 @@
|
||||
<div class="upper-content">
|
||||
<div class="content-details">
|
||||
<ion-label>
|
||||
<p><span class="date">{{customDate}}</span><span class="label">{{LoadedDocument.Type}}</span></p>
|
||||
<p><span class="date">{{customDate}}</span><span class="label" *ngIf="LoadedDocument.Nature">{{LoadedDocument.Nature}}</span></p>
|
||||
</ion-label>
|
||||
</div>
|
||||
</div>
|
||||
@@ -43,7 +43,7 @@
|
||||
<ion-item class="ion-no-margin ion-no-padding">
|
||||
<ion-label
|
||||
(click)="viewDocument()">
|
||||
<p class="attach-title-item">{{LoadedDocument.Subject}}<span class="span-right color-red btn-size"><ion-icon hidden name="close"></ion-icon></span></p>
|
||||
<p class="attach-title-item">{{LoadedDocument.Assunto}}<span class="span-right color-red btn-size"><ion-icon hidden name="close"></ion-icon></span></p>
|
||||
<p hidden><span class="span-left">Remetente</span><span class="span-right"></span></p>
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
|
||||
@@ -6,6 +6,8 @@ import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
|
||||
import { ExpedientTaskModalPage } from 'src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page';
|
||||
import { BookMeetingModalPage } from 'src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page';
|
||||
import { DocumentSetUpMeetingPage } from '../document-set-up-meeting/document-set-up-meeting.page';
|
||||
import { FromSearchDocument, SearchFolder } from 'src/app/models/search-document';
|
||||
import { ExpedientTaskModalPageNavParamsTask } from 'src/app/models/ExpedientTaskModalPage';
|
||||
|
||||
@Component({
|
||||
selector: 'app-document-detail',
|
||||
@@ -23,6 +25,9 @@ export class DocumentDetailPage implements OnInit {
|
||||
applicationId:string;
|
||||
LoadedDocument:any = null;
|
||||
|
||||
folder: SearchFolder
|
||||
document: FromSearchDocument
|
||||
|
||||
constructor(
|
||||
private navParams: NavParams,
|
||||
private modalController: ModalController,
|
||||
@@ -57,7 +62,6 @@ export class DocumentDetailPage implements OnInit {
|
||||
const url: string = res.replace("webTRIX.Viewer","webTRIX.Viewer.Branch1");
|
||||
const browser = this.iab.create(url,"_blank");
|
||||
browser.show();
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
@@ -75,30 +79,33 @@ export class DocumentDetailPage implements OnInit {
|
||||
// efetuar despacho
|
||||
async openExpedientActionsModal( taskAction: any) {
|
||||
|
||||
let task;
|
||||
let task: ExpedientTaskModalPageNavParamsTask
|
||||
|
||||
let document: FromSearchDocument = this.LoadedDocument
|
||||
let folder: SearchFolder = this.LoadedDocument
|
||||
|
||||
if(this.LoadedDocument.ApplicationID == 361) {
|
||||
task = {
|
||||
serialNumber: this.LoadedDocument.DispatchNumber,
|
||||
taskStartDate: this.LoadedDocument.DateDispatch,
|
||||
serialNumber: folder.DispatchNumber,
|
||||
taskStartDate: folder.DateDispatch,
|
||||
isEvent: true,
|
||||
workflowInstanceDataFields: {
|
||||
FsId: this.LoadedDocument.ApplicationID,
|
||||
FsId: folder.ApplicationID || folder.ApplicationId,
|
||||
FolderID: null,
|
||||
DocId: this.LoadedDocument.DispatchNumber,
|
||||
Subject: this.LoadedDocument.Assunto
|
||||
DocId: folder.DispatchNumber,
|
||||
Subject: folder.Assunto
|
||||
},
|
||||
}
|
||||
} else if (this.LoadedDocument.ApplicationID == 8 || this.LoadedDocument.ApplicationId == 8) {
|
||||
} else if (document.ApplicationID == 8 || document.ApplicationId == 8) {
|
||||
task = {
|
||||
serialNumber: this.LoadedDocument.DocId,
|
||||
taskStartDate: this.LoadedDocument.DocDate,
|
||||
serialNumber: document.DocId,
|
||||
taskStartDate: document.DocDate,
|
||||
isEvent: true,
|
||||
workflowInstanceDataFields: {
|
||||
FsId: this.LoadedDocument.ApplicationID || this.LoadedDocument.ApplicationId,
|
||||
FsId: document.ApplicationID || document.ApplicationId,
|
||||
FolderID: null,
|
||||
DocId: this.LoadedDocument.DocId,
|
||||
Subject: this.LoadedDocument.Assunto
|
||||
DocId: document.DocId || document.DocID,
|
||||
Subject: document.Assunto
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -124,34 +131,35 @@ export class DocumentDetailPage implements OnInit {
|
||||
|
||||
async openBookMeetingModal() {
|
||||
|
||||
let document: FromSearchDocument = this.LoadedDocument
|
||||
let folder: SearchFolder = this.LoadedDocument
|
||||
let task;
|
||||
|
||||
if(this.LoadedDocument.ApplicationID == 361) {
|
||||
if(folder.ApplicationID == 361) {
|
||||
task = {
|
||||
serialNumber: this.LoadedDocument.DispatchNumber,
|
||||
taskStartDate: this.LoadedDocument.DateDispatch,
|
||||
serialNumber: folder.DispatchNumber,
|
||||
taskStartDate: folder.DateDispatch,
|
||||
isEvent: true,
|
||||
Folio: this.LoadedDocument.Assunto,
|
||||
FsId: this.LoadedDocument.ApplicationID,
|
||||
Folio: folder.Assunto,
|
||||
FsId: folder.ApplicationID,
|
||||
workflowInstanceDataFields: {
|
||||
FsId: this.LoadedDocument.ApplicationID,
|
||||
FsId: folder.ApplicationID,
|
||||
FolderID: null,
|
||||
DocId: this.LoadedDocument.DispatchNumber,
|
||||
Subject: this.LoadedDocument.Assunto
|
||||
DocId: folder.DispatchNumber,
|
||||
Subject: folder.Assunto
|
||||
},
|
||||
}
|
||||
} else if (this.LoadedDocument.ApplicationID == 8 || this.LoadedDocument.ApplicationId == 8) {
|
||||
} else if (document.ApplicationID == 8 || document.ApplicationId == 8) {
|
||||
task = {
|
||||
serialNumber: this.LoadedDocument.SourceId,
|
||||
taskStartDate: this.LoadedDocument.CreateDate,
|
||||
taskStartDate: document.DocDate,
|
||||
isEvent: true,
|
||||
Folio: this.LoadedDocument.Assunto,
|
||||
FsId: this.LoadedDocument.ApplicationID,
|
||||
Folio: document.Assunto,
|
||||
FsId: document.ApplicationID,
|
||||
workflowInstanceDataFields: {
|
||||
FsId: this.LoadedDocument.ApplicationID,
|
||||
FsId: document.ApplicationID || document.ApplicationId,
|
||||
FolderID: null,
|
||||
DocId: this.LoadedDocument.SourceId,
|
||||
Subject: this.LoadedDocument.SourceName
|
||||
DocId: document.DocID || document.DocId,
|
||||
Subject: document.Assunto
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,39 +30,29 @@
|
||||
<div class="line"></div>
|
||||
</div>
|
||||
<div class="notifications-content">
|
||||
<ion-label>2 novas notificações</ion-label>
|
||||
<ion-label>{{notificationdata.length}} novas notificações</ion-label>
|
||||
<ion-list>
|
||||
<div class="item cursor-pointer ion-no-padding ion-no-margin" lines="none">
|
||||
<div class="item cursor-pointer ion-no-padding ion-no-margin" lines="none"
|
||||
*ngFor = "let item of notificationdata; let i = index"
|
||||
(click)="notificatinsRoutes(item.Service,item.Object,item.IdObject,item.FolderId)"
|
||||
>
|
||||
<div class="item-content width-100">
|
||||
<div class="notification-item">
|
||||
<img class="notification-icon" slot="end" src="assets/images/icons-default-agenda.svg" >
|
||||
<img class="notification-icon" slot="end" *ngIf = "item.Service == 'agenda'" src="assets/images/icons-default-agenda.svg" >
|
||||
<img class="notification-icon" slot="end" *ngIf = "item.Service == 'gabinete-digital'" src="assets/images/icons-correspondencias.svg" >
|
||||
<img class="notification-icon" slot="end" *ngIf = "item.Service == 'accoes'" src="assets/images/icons-nav-actions.svg" >
|
||||
</div>
|
||||
<div class="approve-event-time">
|
||||
<p>08:00</p>
|
||||
<p>09:00</p>
|
||||
<p>{{item.dateInit}}</p>
|
||||
<p>{{item.dateEnd}}</p>
|
||||
</div>
|
||||
<div class="approve-event-detail">
|
||||
<p>Luanda | Palácio Presidencial</p>
|
||||
<h3>Almoço de Família</h3>
|
||||
<p>{{item.Location}}</p>
|
||||
<h3>{{item.alert}}</h3>
|
||||
</div>
|
||||
<div class="notification-label"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item cursor-pointer ion-no-padding ion-no-margin" lines="none">
|
||||
<div class="item-content width-100">
|
||||
<div class="notification-item">
|
||||
<img class="notification-icon" slot="end" src="assets/images/icons-correspondencias.svg" >
|
||||
</div>
|
||||
<div class="approve-event-time">
|
||||
<p>28-07-21</p>
|
||||
<p>09:00</p>
|
||||
</div>
|
||||
<div class="approve-event-detail">
|
||||
<h3>Relatório FMI</h3>
|
||||
<p>Luanda | Palácio Presidencial</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ion-list>
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
///<reference path="../../../../plugins/cordova-plugin-mfp/typings/worklight.d.ts" />
|
||||
///<reference path="../../../../plugins/cordova-plugin-mfp-jsonstore/typings/jsonstore.d.ts" />
|
||||
import { Component, OnInit,NgZone } from '@angular/core';
|
||||
import { Router,NavigationExtras } from '@angular/router';
|
||||
import { AnimationController, ModalController } from '@ionic/angular';
|
||||
import { User } from 'src/app/models/user.model';
|
||||
import { AuthService } from 'src/app/services/auth.service';
|
||||
@@ -8,6 +10,8 @@ import { FingerprintPage } from 'src/app/shared/fingerprint/fingerprint.page';
|
||||
import { PinPage } from 'src/app/shared/pin/pin.page';
|
||||
import { LocalstoreService } from 'src/app/store/localstore.service';
|
||||
import { EditProfilePage } from './edit-profile/edit-profile.page';
|
||||
import { JsonStore } from '../../services/jsonStore.service';
|
||||
import { StorageService } from '../../services/storage.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-profile',
|
||||
@@ -18,14 +22,18 @@ export class ProfilePage implements OnInit {
|
||||
|
||||
loggeduser: User;
|
||||
userLoginPreference = ''
|
||||
notificationdata: any[];
|
||||
DataArray: Array<Object> = [];
|
||||
|
||||
constructor(private modalController:ModalController,
|
||||
constructor(private modalController: ModalController,
|
||||
private authService: AuthService,
|
||||
private animationController: AnimationController,
|
||||
private router: Router,
|
||||
private localstoreService: LocalstoreService,
|
||||
private toastService: ToastService,
|
||||
) {
|
||||
private jsonstore: JsonStore,
|
||||
private storageservice: StorageService,
|
||||
private zone: NgZone,
|
||||
) {
|
||||
|
||||
this.loggeduser = authService.ValidatedUser;
|
||||
|
||||
@@ -34,25 +42,103 @@ export class ProfilePage implements OnInit {
|
||||
this.checkState()
|
||||
}
|
||||
|
||||
ngOnInit() {}
|
||||
ngOnInit() {
|
||||
this.storageservice.get("Notifications").then((value) => {
|
||||
|
||||
var data = JSON.parse(value);
|
||||
data.forEach(element => {
|
||||
console.log("ARaaAA", element)
|
||||
var payload = JSON.parse(element.payload)
|
||||
let notificationObject = {
|
||||
alert: element.alert,
|
||||
Service: payload.Service,
|
||||
Object: payload.Object,
|
||||
IdObject: payload.IdObject,
|
||||
FolderId: payload.FolderId,
|
||||
desc: payload.desc,
|
||||
dateInit: payload.dateInit,
|
||||
dateEnd: payload.dateEnd,
|
||||
Location: payload.Location,
|
||||
TypeAgenda: payload.TypeAgenda,
|
||||
Status: payload.Status
|
||||
}
|
||||
|
||||
this.DataArray.push(notificationObject)
|
||||
});
|
||||
this.notificationdata = this.DataArray
|
||||
console.log("Notificaaa", this.notificationdata)
|
||||
})
|
||||
console.log("Notificaaa", this.notificationdata)
|
||||
|
||||
}
|
||||
|
||||
close() {
|
||||
this.modalController.dismiss();
|
||||
}
|
||||
|
||||
notImplemented(){}
|
||||
notImplemented() { }
|
||||
|
||||
notificatinsRoutes = (Service,Object,IdObject,FolderId) => {
|
||||
if (Service === "agenda") {
|
||||
this.zone.run(() => this.router.navigate(['/home/agenda', IdObject, 'agenda']));
|
||||
}
|
||||
else if (Service === "gabinete-digital" && Object === "expediente") {
|
||||
this.zone.run(() => this.router.navigate(['/home/gabinete-digital/expediente',IdObject,'gabinete-digital']));
|
||||
}
|
||||
else if (Service === "gabinete-digital" && Object === "event-list") {
|
||||
this.zone.run(() => this.router.navigate(['/home/gabinete-digital/event-list/approve-event',IdObject, 'gabinete-digital']));
|
||||
}else if (Service === "gabinete-digital" && Object === "despachos") {
|
||||
|
||||
this.zone.run(() => this.router.navigate(['/home/gabinete-digital/despachos',IdObject,'gabinete-digital'],{replaceUrl: true}));
|
||||
}
|
||||
else if (Service === "gabinete-digital" && Object === "parecer") {
|
||||
|
||||
this.zone.run(() => this.router.navigate(['/home/gabinete-digital/pedidos',IdObject,'gabinete-digital']));
|
||||
}
|
||||
else if (Service === "gabinete-digital" && Object === "deferimento") {
|
||||
|
||||
this.zone.run(() => this.router.navigate(['/home/gabinete-digital/pedidos',IdObject,'gabinete-digital']));
|
||||
}
|
||||
else if (Service === "gabinete-digital" && Object === "despachos-pr") {
|
||||
|
||||
let navigationExtras: NavigationExtras = {
|
||||
queryParams: {
|
||||
"serialNumber": IdObject,
|
||||
}
|
||||
};
|
||||
this.zone.run(() =>this.router.navigate(['/home/gabinete-digital/despachos-pr/despacho-pr'], navigationExtras));
|
||||
}
|
||||
else if (Service === "accoes" && Object === "accao") {
|
||||
this.zone.run(() => this.router.navigate(['/home/publications',IdObject]));
|
||||
}
|
||||
else if (Service === "accoes" && Object === "publicacao") {
|
||||
this.zone.run(() => this.router.navigate(['/home/publications/view-publications',FolderId,IdObject]));
|
||||
}
|
||||
else if (Service === "gabinete-digital" && Object === "diplomas") {
|
||||
this.zone.run(() =>this.router.navigate(['/home/gabinete-digital/diplomas', IdObject, 'gabinete-digital']));
|
||||
}
|
||||
else if (Service === "gabinete-digital" && Object === "diplomas-assinar") {
|
||||
let navigationExtras: NavigationExtras = {
|
||||
queryParams: {
|
||||
"serialNumber": IdObject,
|
||||
}
|
||||
};
|
||||
this.zone.run(() =>this.router.navigate(['/home/gabinete-digital/diplomas-assinar/diploma-assinar'], navigationExtras));
|
||||
}
|
||||
else if (Service === "gabinete-digital" && Object === "expedientes-pr") {
|
||||
this.zone.run(() =>this.router.navigate(['/home/gabinete-digital/expedientes-pr',IdObject,'gabinete-digital']));
|
||||
}
|
||||
}
|
||||
|
||||
logout() {
|
||||
const loader = this.toastService.loading();
|
||||
//const loader = this.toastService.loading();
|
||||
// clear local storage
|
||||
window.localStorage.clear();
|
||||
|
||||
setTimeout(()=>{
|
||||
//window.location.pathname = '/';
|
||||
//location.reload();
|
||||
this.router.navigate(['/']);
|
||||
}, 1000);
|
||||
loader.remove();
|
||||
setTimeout(() => {
|
||||
window.location.pathname = '/'
|
||||
location.reload();
|
||||
}, 1000)
|
||||
|
||||
}
|
||||
|
||||
@@ -63,7 +149,7 @@ export class ProfilePage implements OnInit {
|
||||
if (userData.hasOwnProperty('loginPreference')) {
|
||||
this.userLoginPreference = userData.loginPreference
|
||||
} else {
|
||||
this.userLoginPreference = ''
|
||||
this.userLoginPreference = ''
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user