This commit is contained in:
tiago.kayaya
2021-08-02 08:35:16 +01:00
98 changed files with 844 additions and 352 deletions
+48 -1
View File
@@ -3,7 +3,7 @@
<name>gabinete digital</name>
<description>An awesome Ionic/Cordova app.</description>
<author email="hi@ionicframework.com" href="http://ionicframework.com/">Ionic Framework Team</author>
<content src="index.html" />
<content original-src="index.html" src="http://localhost:8100" />
<access origin="*" />
<allow-navigation href="http://*/*" />
<allow-navigation href="https://*/*" />
@@ -94,6 +94,53 @@
<splash height="2208" src="resources/ios/splash/Default-736h.png" width="1242" />
<splash height="2436" src="resources/ios/splash/Default-2436h.png" width="1125" />
<splash height="2732" src="resources/ios/splash/Default@2x~universal~anyany.png" width="2732" />
<icon height="57" src="resources/ios/icon/icon.png" width="57" />
<icon height="114" src="resources/ios/icon/icon@2x.png" width="114" />
<icon height="20" src="resources/ios/icon/icon-20.png" width="20" />
<icon height="40" src="resources/ios/icon/icon-20@2x.png" width="40" />
<icon height="60" src="resources/ios/icon/icon-20@3x.png" width="60" />
<icon height="29" src="resources/ios/icon/icon-29.png" width="29" />
<icon height="58" src="resources/ios/icon/icon-29@2x.png" width="58" />
<icon height="87" src="resources/ios/icon/icon-29@3x.png" width="87" />
<icon height="48" src="resources/ios/icon/icon-24@2x.png" width="48" />
<icon height="55" src="resources/ios/icon/icon-27.5@2x.png" width="55" />
<icon height="88" src="resources/ios/icon/icon-44@2x.png" width="88" />
<icon height="172" src="resources/ios/icon/icon-86@2x.png" width="172" />
<icon height="196" src="resources/ios/icon/icon-98@2x.png" width="196" />
<icon height="216" src="resources/ios/icon/icon-108@2x.png" width="216" />
<icon height="40" src="resources/ios/icon/icon-40.png" width="40" />
<icon height="80" src="resources/ios/icon/icon-40@2x.png" width="80" />
<icon height="120" src="resources/ios/icon/icon-40@3x.png" width="120" />
<icon height="50" src="resources/ios/icon/icon-50.png" width="50" />
<icon height="100" src="resources/ios/icon/icon-50@2x.png" width="100" />
<icon height="60" src="resources/ios/icon/icon-60.png" width="60" />
<icon height="120" src="resources/ios/icon/icon-60@2x.png" width="120" />
<icon height="180" src="resources/ios/icon/icon-60@3x.png" width="180" />
<icon height="72" src="resources/ios/icon/icon-72.png" width="72" />
<icon height="144" src="resources/ios/icon/icon-72@2x.png" width="144" />
<icon height="76" src="resources/ios/icon/icon-76.png" width="76" />
<icon height="152" src="resources/ios/icon/icon-76@2x.png" width="152" />
<icon height="167" src="resources/ios/icon/icon-83.5@2x.png" width="167" />
<icon height="1024" src="resources/ios/icon/icon-1024.png" width="1024" />
<splash height="1136" src="resources/ios/splash/Default-568h@2x~iphone.png" width="640" />
<splash height="1334" src="resources/ios/splash/Default-667h.png" width="750" />
<splash height="2688" src="resources/ios/splash/Default-2688h~iphone.png" width="1242" />
<splash height="1242" src="resources/ios/splash/Default-Landscape-2688h~iphone.png" width="2688" />
<splash height="1792" src="resources/ios/splash/Default-1792h~iphone.png" width="828" />
<splash height="828" src="resources/ios/splash/Default-Landscape-1792h~iphone.png" width="1792" />
<splash height="2436" src="resources/ios/splash/Default-2436h.png" width="1125" />
<splash height="1125" src="resources/ios/splash/Default-Landscape-2436h.png" width="2436" />
<splash height="2208" src="resources/ios/splash/Default-736h.png" width="1242" />
<splash height="1242" src="resources/ios/splash/Default-Landscape-736h.png" width="2208" />
<splash height="1536" src="resources/ios/splash/Default-Landscape@2x~ipad.png" width="2048" />
<splash height="2048" src="resources/ios/splash/Default-Landscape@~ipadpro.png" width="2732" />
<splash height="768" src="resources/ios/splash/Default-Landscape~ipad.png" width="1024" />
<splash height="2048" src="resources/ios/splash/Default-Portrait@2x~ipad.png" width="1536" />
<splash height="2732" src="resources/ios/splash/Default-Portrait@~ipadpro.png" width="2048" />
<splash height="1024" src="resources/ios/splash/Default-Portrait~ipad.png" width="768" />
<splash height="960" src="resources/ios/splash/Default@2x~iphone.png" width="640" />
<splash height="480" src="resources/ios/splash/Default~iphone.png" width="320" />
<splash height="2732" src="resources/ios/splash/Default@2x~universal~anyany.png" width="2732" />
</platform>
<plugin name="cordova-plugin-statusbar" spec="2.4.2" />
<plugin name="cordova-plugin-device" spec="2.0.2" />
+3 -2
View File
@@ -163,7 +163,8 @@
"cordova-plugin-androidx": {},
"cordova-plugin-androidx-adapter": {},
"cordova-plugin-fingerprint-aio": {},
"cordova-plugin-mfp-push": {}
"cordova-plugin-mfp-push": {},
"cordova-plugin-mfp-jsonstore": {}
},
"platforms": [
"browser",
@@ -177,4 +178,4 @@
"url": "git+https://Kayaya@bitbucket.org/equilibriumito/gabinete-digital.git"
},
"license": "ISC"
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 59 KiB

After

Width:  |  Height:  |  Size: 196 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

After

Width:  |  Height:  |  Size: 200 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 686 B

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.1 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.7 KiB

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.1 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.0 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 104 KiB

After

Width:  |  Height:  |  Size: 103 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 115 KiB

After

Width:  |  Height:  |  Size: 112 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 106 KiB

After

Width:  |  Height:  |  Size: 103 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 72 KiB

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 113 KiB

After

Width:  |  Height:  |  Size: 112 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 128 KiB

After

Width:  |  Height:  |  Size: 122 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 117 KiB

After

Width:  |  Height:  |  Size: 115 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 133 KiB

After

Width:  |  Height:  |  Size: 124 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 93 KiB

After

Width:  |  Height:  |  Size: 93 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 147 KiB

After

Width:  |  Height:  |  Size: 127 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 99 KiB

After

Width:  |  Height:  |  Size: 99 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 120 KiB

After

Width:  |  Height:  |  Size: 120 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 13 KiB

@@ -0,0 +1,16 @@
import { TestBed } from '@angular/core/testing';
import { DocumentCounterService } from './document-counter.service';
describe('DocumentCounterService', () => {
let service: DocumentCounterService;
beforeEach(() => {
TestBed.configureTestingModule({});
service = TestBed.inject(DocumentCounterService);
});
it('should be created', () => {
expect(service).toBeTruthy();
});
});
@@ -0,0 +1,36 @@
import { Injectable } from '@angular/core';
import { DespachoStore } from 'src/app/store/despacho-store.service';
import { EventoAprovacaoStore } from 'src/app/store/eventoaprovacao-store.service';
import { ExpedienteGdStore } from 'src/app/store/expedientegd-store.service';
import { PendentesStore } from 'src/app/store/pendestes-store.service';
import { PedidosStore } from 'src/app/store/pedidos-store.service';
import { ExpedienteprStore } from 'src/app/store/expedientepr-store.service';
import { DespachosprStore } from 'src/app/store/despachospr-store.service';
@Injectable({
providedIn: 'root'
})
export class DocumentCounterService {
expedienteGbStore = ExpedienteGdStore;
pendentesStore = PendentesStore;
despachoStore = DespachoStore;
eventoAprovacaoStore = EventoAprovacaoStore;
pedidosStore = PedidosStore;
expedientePrStore = ExpedienteprStore;
despachoPrStore = DespachosprStore;
constructor() { }
// falta a contagem dos deplomas
get mdTotalDocument() {
return this.despachoStore.count + this.expedienteGbStore.count + this.pedidosStore.countdeferimento
+ this.pedidosStore.countparecer + this.expedientePrStore.count + this.despachoPrStore.count + this.pendentesStore.count
+ this.eventoAprovacaoStore.count
}
get prTotalDocument() {
return 0
}
}
@@ -1,13 +1,13 @@
import { TestBed } from '@angular/core/testing';
import { DespachoMdService } from './despacho-md.service';
import { DespachoService } from './despacho.service';
describe('DespachoMdService', () => {
let service: DespachoMdService;
describe('DespachoService', () => {
let service: DespachoService;
beforeEach(() => {
TestBed.configureTestingModule({});
service = TestBed.inject(DespachoMdService);
service = TestBed.inject(DespachoService);
});
it('should be created', () => {
@@ -1,12 +1,10 @@
import { Injectable } from '@angular/core';
import { ProcessesService } from '../services/processes.service';
@Injectable({
providedIn: 'root'
})
export class DespachoMdService {
export class DespachoService {
/**
* @description para terminar o
* 95 - signfica
@@ -16,10 +14,10 @@ export class DespachoMdService {
action: "Arquivo" | "Reencaminhar"
constructor(
constructor(
private processes: ProcessesService,
) { }
) { }
arquivar(note:string, documents:any, serialnumber) {
let body = {
@@ -34,7 +32,7 @@ export class DespachoMdService {
return this.processes.CompleteTask(body)
}
reencaminhar(note:string, documents:any, serialnumber) {
let body = {
@@ -49,7 +47,7 @@ export class DespachoMdService {
return this.processes.CompleteTask(body)
}
executado(note:string, documents:any , serialnumber) {
let body = {
@@ -64,10 +62,9 @@ export class DespachoMdService {
return this.processes.CompleteTask(body)
}
sendExpedienteToPending(serialnumber) {
return this.processes.SetTaskToPending(serialnumber)
}
}
+16
View File
@@ -0,0 +1,16 @@
import { TestBed } from '@angular/core/testing';
import { UserService } from './user.service';
describe('UserService', () => {
let service: UserService;
beforeEach(() => {
TestBed.configureTestingModule({});
service = TestBed.inject(UserService);
});
it('should be created', () => {
expect(service).toBeTruthy();
});
});
+12
View File
@@ -0,0 +1,12 @@
import { Injectable } from '@angular/core';
@Injectable({
providedIn: 'root'
})
export class UserService {
constructor() { }
changeProfilePicture(){}
}
+2 -1
View File
@@ -15,7 +15,8 @@
<ion-tab-button tab="gabinete-digital">
<!-- <ion-icon name="file-tray-stacked"></ion-icon> -->
<ion-icon class="nav-icon" src="assets/images/icons-nav-gabinete-inactive.svg"></ion-icon>
<ion-badge color="danger">{{totalExpediente}}</ion-badge>
<ion-badge color="danger" *ngIf="p.userRole(['MDGPR'])" >{{documentCounterService.mdTotalDocument}}</ion-badge>
<ion-badge color="danger" *ngIf="p.userRole(['PR'])" >0</ion-badge>
<ion-label>Gabinete</ion-label>
</ion-tab-button>
<ion-tab-button tab="publications">
+38 -32
View File
@@ -8,9 +8,12 @@ import { Event } from '../models/event.model';
import { ProcessesService } from '../services/processes.service';
import { NotificationsService } from '../services/notifications.service';
import { ModalController, AlertController, AnimationController, Platform } from '@ionic/angular';
import { NavigationExtras,Router,ActivatedRoute } from '@angular/router';
import { NavigationExtras, Router, ActivatedRoute } from '@angular/router';
import { ToastService } from '../services/toast.service';
import { ToDayEventStorage } from '../store/to-day-event-storage.service';
import { DocumentCounterService } from 'src/app/OtherService/document-counter.service'
import { PermissionService } from '../OtherService/permission.service';
// import * as Sentry from "@sentry/browser";
// import { Integrations } from "@sentry/tracing";
@@ -68,7 +71,9 @@ export class HomePage implements OnInit {
public modalCtrl: AlertController,
private notificatinsservice: NotificationsService,
private platform: Platform,
private activeroute: ActivatedRoute) {
private activeroute: ActivatedRoute,
public documentCounterService: DocumentCounterService,
public p: PermissionService) {
this.router.events.subscribe((val) => {
document.querySelectorAll('ion-modal').forEach((e: any) => e.remove())
@@ -81,47 +86,48 @@ export class HomePage implements OnInit {
}
ngOnInit() {
console.log('Active route ',this.router.url)
if(this.platform.is('desktop') || this.platform.is('mobileweb')) {
console.log('Active route ', this.router.url)
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
console.log('Notifications not supported')
} else {
/* this.mobilefirstConnect();
this.notificatinsservice.onReceviNotification(); */
this.mobilefirstConnect();
this.notificatinsservice.getAndpostToken2();
this.notificatinsservice.onReceviNotification();
}
}
mobilefirstConnect() {
//try {
window['WLAuthorizationManager'].obtainAccessToken("").then( (token) => {
console.log('MobileFirst Server connect: Success ' + token);
window['WLAuthorizationManager'].obtainAccessToken("").then((token) => {
var resourceRequest = new WLResourceRequest("/adapters/javaAdapter/resource/greet/",
WLResourceRequest.GET
);
console.log('MobileFirst Server connect: Success ' + token);
resourceRequest.setQueryParameter("name", "world");
resourceRequest.send().then(
(response) => {
// Will display "Hello world" in an alert dialog.
console.log("Connect with JavaAdapter Success: " + response.responseText);
//this.MFPushNotification();
},
(error) => {
alert("Connect with JavaAdapter Failure: " + JSON.stringify(error));
}
);
}, (error) => {
console.log('MobileFirst Server connect: failure ' + error.responseText);
console.log(JSON.stringify(error))
/* this.zone.run(() => {
alert("Bummer...");
alert("Failed to connect to MobileFirst Server");
}); */
});
//} catch {}
var resourceRequest = new WLResourceRequest("/adapters/javaAdapter/resource/greet/",
WLResourceRequest.GET
);
resourceRequest.setQueryParameter("name", "world");
resourceRequest.send().then(
(response) => {
// Will display "Hello world" in an alert dialog.
console.log("Connect with JavaAdapter Success: " + response.responseText);
//this.MFPushNotification();
},
(error) => {
alert("Connect with JavaAdapter Failure: " + JSON.stringify(error));
}
);
}, (error) => {
console.log('MobileFirst Server connect: failure ' + error.responseText);
console.log(JSON.stringify(error))
/* this.zone.run(() => {
alert("Bummer...");
alert("Failed to connect to MobileFirst Server");
}); */
});
}
@@ -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
}
}
}
+12 -22
View File
@@ -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>
+101 -15
View File
@@ -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 = ''
}
}
+8 -8
View File
@@ -10,17 +10,17 @@ export class Attachments {
export class DocumentSetUpMeeting {
EventProcess: {
"SerialNumber"?: "sample string 1",
"SerialNumber"?: string,
"Body": string,
"Location": string,
"Subject": string,
"StartDate"?: "2021-07-28T13:22:55.031857+01:00",
"EndDate"?: "2021-07-28T13:22:55.031857+01:00",
"ReviewUserComment"?: "sample string 7",
"MDName"?: "sample string 8",
"MDEmail"?: "sample string 9",
"StartDate"?: string,
"EndDate"?: string,
"ReviewUserComment"?: string,
"MDName"?: string,
"MDEmail"?: string,
"IsAllDayEvent"?: boolean,
"Status"?: "sample string 11",
"Status"?: string,
"EventType"?: string,
"IsRecurring": boolean,
"ParticipantsList"?: EventPerson[],
@@ -30,7 +30,7 @@ export class DocumentSetUpMeeting {
"Day"?: 1,
"DayOfWeek"?: 0,
"Month"?: 1,
"LastOccurrence"?: "2021-07-28T13:22:55.031857+01:00"
"LastOccurrence"?: string
}
}
+17
View File
@@ -0,0 +1,17 @@
export class ExpedientTaskModalPageNavParamsTask {
serialNumber: any
taskStartDate: string
isEvent: boolean
workflowInstanceDataFields: {
FsId: any,
FolderID: string,
DocId: any,
DocID?: any
Subject: string,
DispatchNumber?: any
}
}
export class task extends ExpedientTaskModalPageNavParamsTask {}
+37 -1
View File
@@ -1,5 +1,4 @@
export class SearchDocument {
ApplicationType: number | string;
Assunto: string;
Data: string;
@@ -9,3 +8,40 @@ export class SearchDocument {
Id: string;
appName?: string;
}
export class FromSearchDocument {
ApplicationId: number
ApplicationID: number
Assunto: string
DocDate: string
DocId: number
DocID?: number
Sender: string
SenderId: number
}
export class SearchFolder {
ApplicationID: number
ApplicationId: number
Assunto:string
DateDispatch: string
DispatchNumber: string
Docs: string
Documents: {
Assunto: string
DocDate: string
DocId: number
DocNumber: string
Sender: string
}[]
DocumentsTotal: 2
IntervenerList: string[]
Interveners: string
Nature:string
Sender: null | string
SenderId: null | string
Status: string
folderId: number
}
+1 -1
View File
@@ -129,7 +129,7 @@
<button class="btn-no-color" *ngIf="showCalendar" (click)="calendarHeight='75px';showCalendar=false">
<ion-icon class="collaps btn-no-color" src="assets/images/icons-collaps-up.svg" ></ion-icon>
</button>
<button class="btn-no-color" *ngIf="!showCalendar" (click)="calendarHeight='317px';showCalendar=true">
<button class="btn-no-color" *ngIf="!showCalendar" (click)="calendarHeight='320px';showCalendar=true">
<ion-icon class="collaps btn-no-color" src="assets/images/icons-collaps-down.svg" ></ion-icon>
</button >
+1 -4
View File
@@ -82,8 +82,6 @@ export class AgendaPage implements OnInit {
/* List of events of our calendar */
eventSource : eventSource[] = []
/* The title of the calendar */
viewTitle: string;
@@ -173,7 +171,7 @@ export class AgendaPage implements OnInit {
this.loggeduser = authService.ValidatedUser;
this.calendarHeight = "317px";
this.calendarHeight = "320px";
this.showCalendar = true;
this.timelineDate = momentG(new Date(),'dd MMMM yyyy');
@@ -590,7 +588,6 @@ export class AgendaPage implements OnInit {
if(this.profile == "mdgpr" && this.loggeduser.Profile == 'MDGPR') {
this.eventService.getAllMdEvents(momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59')).then((res:any) => {
this.calendarService.removeRange(startTime, endTime, 'md')
const eventsList = res.filter(data => data.CalendarName == "Oficial");
@@ -15,8 +15,7 @@ import { DelegarPage } from 'src/app/modals/delegar/delegar.page';
import { AddNotePage } from 'src/app/modals/add-note/add-note.page';
import { DespachosOptionsPage } from 'src/app/shared/popover/despachos-options/despachos-options.page';
import { ToastService } from 'src/app/services/toast.service';
import { DespachoMdService } from 'src/app/Rules/despacho-md.service'
import { NavigationService } from 'src/app/services/navigation.service';
import { DespachoService } from 'src/app/Rules/despacho.service'
import { Location } from '@angular/common'
@Component({
@@ -47,14 +46,10 @@ export class DespachoPage implements OnInit {
private events: EventsService,
private menu: MenuController,
private modalController: ModalController,
private alertService: AlertService,
public popoverController: PopoverController,
private activatedRoute: ActivatedRoute,
private router: Router,
private animationController: AnimationController,
private toastService: ToastService,
private despachoMdService: DespachoMdService,
private navigationService: NavigationService,
private despachoService: DespachoService,
private location: Location
) {
@@ -205,7 +200,7 @@ export class DespachoPage implements OnInit {
const loader = this.toastService.loading()
try {
await this.despachoMdService.executado(note, documents, this.serialnumber)
await this.despachoService.executado(note, documents, this.serialnumber)
this.toastService.successMessage('Processo criado')
this.close();
} catch(error) {
@@ -301,7 +296,7 @@ export class DespachoPage implements OnInit {
async sendExpedienteToPending() {
this.despachoMdService.sendExpedienteToPending(this.serialnumber).subscribe(res=>{
this.despachoService.sendExpedienteToPending(this.serialnumber).subscribe(res=>{
this.goBack();
this.toastService.successMessage('Processo enviado para despacho')
},
@@ -19,6 +19,7 @@ import { AttendeesPageModal } from 'src/app/pages/events/attendees/attendees.pag
import { FormControl, FormGroup, Validators } from '@angular/forms';
import { NGX_MAT_DATE_FORMATS } from '@angular-material-components/datetime-picker';
import { NgxMatDateFormats } from '@angular-material-components/datetime-picker';
import { task } from 'src/app/models/ExpedientTaskModalPage';
const CUSTOM_DATE_FORMATS: NgxMatDateFormats = {
parse: {
@@ -49,7 +50,7 @@ export class ExpedientTaskModalPage implements OnInit {
'Solicitar Deferimento'
];
taskType:string;
task: any;
task: task;
taskParticipants: any = [];
taskParticipantsCc: any = [];
@@ -0,0 +1,16 @@
import { TestBed } from '@angular/core/testing';
import { JsonStore } from './jsonStore.service';
describe('JsonStore', () => {
let service: JsonStore;
beforeEach(() => {
TestBed.configureTestingModule({});
service = TestBed.inject(JsonStore);
});
it('should be created', () => {
expect(service).toBeTruthy();
});
});
+130
View File
@@ -0,0 +1,130 @@
///<reference path="../../../plugins/cordova-plugin-mfp/typings/worklight.d.ts" />
///<reference path="../../../plugins/cordova-plugin-mfp-jsonstore/typings/jsonstore.d.ts" />
import { Injectable } from "@angular/core";
@Injectable({
providedIn: 'root'
})
export class JsonStore {
createCollection(name, data) {
var collectionName = name;
var addOptions = {
// Mark data as dirty (true = yes, false = no), default true.
markDirty: true
};
var JSONStoreCollections = {};
JSONStoreCollections[collectionName] = {};
JSONStoreCollections[collectionName].searchFields = { UserId: 'integer' };
WL.JSONStore.init(JSONStoreCollections)
.then(function () {
WL.Logger.debug('Init done');
console.log('Init done');
return WL.JSONStore.get(collectionName).add(data, addOptions);
}).fail(function (err) {
WL.Logger.error(err);
console.log(err)
});
}
getCollection(collectionName) {
var allOptions = {
// Returns a maximum of 10 documents, default no limit.
limit: 10,
// Skip 0 documents, default no offset.
offset: 0,
// Search fields to return, default: ['_id', 'json'].
filter: ['UserId', 'json'],
// How to sort the returned values, default no sort.}]
};
var JSONStoreCollections = {};
JSONStoreCollections[collectionName] = {};
JSONStoreCollections[collectionName].searchFields = { UserId: 'integer' };
WL.JSONStore.init(JSONStoreCollections)
.then(function () {
WL.Logger.debug('Find all colletion data');
console.log('Find all colletion data');
}).fail(function (err) {
WL.Logger.error(err);
console.log("JsonStore getColletion error ",err)
});
const data = WL.JSONStore.get(collectionName).findAll(allOptions).then((value) => {
console.log('Find all colletion data', value);
return JSON.parse(value);
});
return data
//return notificationData
}
getColletionById(collectionName, value) {
var query = { UserId: value };
var allOptions = {
// Returns a maximum of 10 documents, default no limit.
limit: 10,
// Skip 0 documents, default no offset.
offset: 0,
// Search fields to return, default: ['_id', 'json'].
filter: ['UserId', 'json'],
// How to sort the returned values, default no sort.}]
};
var JSONStoreCollections = {};
JSONStoreCollections[collectionName] = {};
JSONStoreCollections[collectionName].searchFields = { UserId: 'integer' };
WL.JSONStore.init(JSONStoreCollections)
.then(function () {
WL.Logger.debug('Find colletion data by id');
console.log('Find colletion data by id');
return WL.JSONStore.get(collectionName).find(query, allOptions).then((value) => {
console.log('Find colletion data by id', value);
});
}).fail(function (err) {
WL.Logger.error(err);
console.log(err)
});
}
replaceDocument(collectionName: string, document: any) {
/* var document = { Example of how identify the document to replace
_id: 1, json: {name: 'chevy', age: 23}
}; */
var options = {};
WL.JSONStore.get(collectionName).replace(document, options).then(function (numberOfDocsReplaced) {
console.log("JsonStore replace document sucess: ", numberOfDocsReplaced)
}).fail(function (error) {
console.log("JsonStore replace document error: ", error)
});
}
removeDocument(collectionName: any,query: any,) {
/* var query = { _id: 1 }; Exemple of query*/
var options = { exact: true };
WL.JSONStore.get(collectionName).remove(query, options).then(function (numberOfDocsRemoved) {
console.log("JsonStore remove document sucess: ", numberOfDocsRemoved)
}).fail(function (error) {
console.log("JsonStore remove document erro: ", error)
});
}
}
+65 -1
View File
@@ -12,6 +12,7 @@ import { ModalController, AlertController, AnimationController, Platform } from
import { NavigationExtras,Router } from '@angular/router';
import { ToastService } from '../services/toast.service';
import { Optional } from '@angular/core';
import { JsonStore } from './jsonStore.service';
@Injectable({
providedIn: 'root'
@@ -20,6 +21,7 @@ export class NotificationsService {
adding: "intervenient" | "CC" = "intervenient";
folderId: string;
DataArray: Array<String> = [];
constructor(
private http: HttpClient,
@@ -31,7 +33,8 @@ export class NotificationsService {
private router: Router,
private toastService: ToastService,
private zone: NgZone,
private activeroute: ActivatedRoute) { }
private activeroute: ActivatedRoute,
private jsonstore: JsonStore) { }
getTokenByUserIdAndId(user, userID) {
const geturl = environment.apiURL + 'notifications/user/' + userID;
@@ -40,6 +43,7 @@ export class NotificationsService {
}
getAndpostToken(username) {
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
console.log('Notifications not supported')
} else {
@@ -94,6 +98,62 @@ export class NotificationsService {
}
getAndpostToken2() {
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
console.log('Notifications not supported')
} else {
const geturl = environment.apiURL + 'notifications/token';
window['WLAuthorizationManager'].obtainAccessToken("push.mobileclient").then(
(token) => {
console.log('Push Notification: Success ' + token);
window['MFPPush'].initialize(
function (successResponse) {
console.log("Push notification Successfully Service intialized: " + successResponse);
},
function (failureResponse) {
console.log("Push notification failure Service intialized: " + failureResponse);
}
);
window['MFPPush'].registerDevice(null, (successResponse) => {
console.log("Successfully registered: " + JSON.stringify(successResponse));
console.log('token: ', successResponse.deviceId)
/* this.storageService.store(username, successResponse.deviceId);
this.storageService.get(username).then(value => {
console.log('STORAGE TOKEN', value)
this.storageService.get(AuthConnstants.USER).then(res => {
console.log('USERID', res);
const headers = { 'Authorization': 'Basic cGF1bG8ucGludG9AZ2FiaW5ldGVkaWdpdGFsLmxvY2FsOnRhYnRlc3RlQDAwNg==' };
const body = {
UserId: res.UserId,
TokenId: successResponse.deviceId,
Status: 1,
Service: 1
};
this.http.post<Token>(`${geturl}`, body, { headers }).subscribe(data => {
console.log('TOKEN USER MIDLE', data);
})
});
}); */
},
function (failureResponse) {
console.log("Successfully failue: " + JSON.stringify(failureResponse));
}
);
}, (error) => {
console.log('Push notification recived: failure ' + error.responseText);
console.log(JSON.stringify(error));
}
);
}
}
async onReceviNotification() {
window['WLAuthorizationManager'].obtainAccessToken("push.mobileclient").then(
(token) => {
@@ -109,6 +169,10 @@ export class NotificationsService {
}
);
var notificationReceived = (message) => {
//this.jsonstore.createCollection('Notifications',message);
this.DataArray.push(message)
this.storageService.store("Notifications",JSON.stringify(this.DataArray))
console.log(message);
var data = JSON.parse(message.payload);
console.log(data.Service);
@@ -422,10 +422,8 @@ export class EditEventPage implements OnInit {
this.loadedEventAttachments[index]['remove'] = true
}
}
async getDoc() {
const modal = await this.modalController.create({
@@ -27,7 +27,7 @@
<ion-refresher-content>
</ion-refresher-content>
</ion-refresher>
<div class="main-content" [ngSwitch]="segment" *ngIf="eventsMDGPRList">
<div class="main-content overflow-y-auto height-100" [ngSwitch]="segment" *ngIf="eventsMDGPRList">
<!-- <div class="header-content width-100"> -->
<!-- </div> -->
+1 -1
View File
@@ -56,7 +56,7 @@
<button (click)="openSearch();showSearch=true" *ngIf="!showSearch" class="btn-no-color">
<ion-icon class="font-45" src='assets/images/icons-search.svg'></ion-icon>
</button>
<button class="btn-no-color" (click)="closeSearch();showSearch=false" *ngIf="showSearch" >
<button class="btn-no-color" (click)="closeSearch();showSearch=false;searchSubject=''" *ngIf="showSearch" >
<ion-icon class="font-40" name="restaurant-outline" src="assets/images/icons-search-close.svg"></ion-icon>
</button>
+1 -1
View File
@@ -139,7 +139,7 @@ export class HeaderPage implements OnInit {
window['dynamicSearch'](this.searchSubject)
}
async basicSearch(){
async basicSearch() {
window['searchTriger']()
}
}
+7 -6
View File
@@ -20,8 +20,8 @@ export class DespachoStoreService {
setTimeout(()=>{
let restore = localstoreService.get(this.keyName, {})
this._list = restore.eventsList || []
this._count = this._list.length || 0
this._list = restore.list || []
this._count = parseInt(restore.count) || 0
}, 10)
}
@@ -36,20 +36,21 @@ export class DespachoStoreService {
set count(value: number) {
this._count = value
this.save()
}
reset(eventsList: any) {
this._list = eventsList
this.count = this._list.length
this.save(this._list)
this.save()
}
private save(eventsList: any) {
private save() {
setTimeout(()=>{
localstoreService.set(this.keyName,{
eventsList,
count: this._list.length
list: this._list,
count: this._count
})
}, 10)
@@ -20,8 +20,8 @@ export class DespachosPageStoreService {
setTimeout(()=>{
let restore = localstoreService.get(this.keyName, {})
this._list = restore.eventsList || []
this._count = this._list.length || 0
this._list = restore.list || []
this._count = parseInt(restore.count) || 0
}, 10)
}
@@ -35,23 +35,23 @@ export class DespachosPageStoreService {
}
set count(value) {
this._count = value
this.save()
}
reset(eventsList: any) {
this._list = eventsList
this.count = this._list.length
this.save(this._list)
this.save()
}
private save(eventsList: any) {
setTimeout(()=>{
private save() {
setTimeout(()=> {
localstoreService.set(this.keyName,{
eventsList,
count: this._list.length
list: this._list,
count: this._count
})
}, 10)
}
}
+8 -9
View File
@@ -20,8 +20,8 @@ constructor() {
setTimeout(()=>{
let restore = localstoreService.get(this.keyName, {})
this._list = restore.eventsList || []
this._count = this._list.length || 0
this._list = restore.list || []
this._count = parseInt(restore.count) || 0
}, 10)
}
@@ -30,25 +30,24 @@ get list() {
return this._list || []
}
get count() {
return this._count
}
get count() { return this._count }
set count(value: number) {
this._count = value
this.save()
}
reset(eventsList: any) {
this._list = eventsList
this.count = this._list.length
this.save(this._list)
this.save()
}
private save(eventsList: any) {
private save() {
setTimeout(()=>{
localstoreService.set(this.keyName,{
eventsList,
count: this._list
list: this._list,
count:this._count
})
}, 10)
+40 -30
View File
@@ -8,12 +8,14 @@ import { AES, enc, SHA1 } from 'crypto-js'
export class EventoaprovacaoStoreService {
// main data
private _listpr: Event[] = []
private _listmd: Event[] = []
private _listPr: any[] = []
private _listMd: any[] = []
// local storage keyName
private keyNamemd: string;
private keyNamepr: string;
private _count = 0
_countPr = 0
_countMd = 0
constructor() {
@@ -22,59 +24,67 @@ export class EventoaprovacaoStoreService {
setTimeout(()=>{
let restoremd = localstoreService.get(this.keyNamemd, {})
let restorepr = localstoreService.get(this.keyNamepr, {})
let restoreMd = localstoreService.get(this.keyNamemd, {})
let restorePr = localstoreService.get(this.keyNamepr, {})
this._listpr = restorepr.eventsListpr || []
this._listmd = restoremd.eventsListmd || []
this._count = this._listpr.length + this._listmd.length || 0
this._listPr = restorePr.lisMd || []
this._listMd = restoreMd.listPr || []
this._countMd = parseInt(restoreMd.countListMd) || 0
this._countPr = parseInt(restoreMd.countListPr) || 0
this._count = (this._countMd + this._countPr) || 0
}, 10)
}
get listpr() {
return this._listpr
}
get listmd() {
return this._listmd
}
get listpr() { return this._listPr }
get listmd() { return this._listMd }
get count() {
return this._count
}
get count() { return this._count }
set count(value: number) {
this._count = value
}
resetpr(eventsList: any) {
this._listpr = eventsList
get countPr() { return this._countPr }
set countPr (value) {
this._countPr = value
}
this.count = this._listmd.length + this.listpr.length
this.savepr(this._listpr)
get countMd() { return this._countMd }
set countMd (value) {
this._countMd = value
}
resetpr(eventsList: any) {
this._listPr = eventsList
this.countPr = this._listPr.length
this.count = this.countPr + this.countMd
this.savePr()
}
resetmd(eventsList: any) {
this._listmd = eventsList
this._listMd = eventsList
this.count = this._listmd.length + this.listpr.length
this.savemd(this._listmd)
this.countMd = this._listMd.length
this.count = this.countPr + this.countMd
this.saveMd()
}
private savemd(eventsListmd: any) {
private saveMd() {
setTimeout(()=>{
localstoreService.set(this.keyNamemd,{
eventsListmd,
lisMd: this._listMd,
countListMd: this._countMd
})
}, 10)
}
private savepr(eventsListpr: any) {
private savePr() {
setTimeout(()=>{
localstoreService.set(this.keyNamepr,{
eventsListpr,
listPr: this._listPr,
countListPr: this._countPr
})
}, 10)
@@ -37,20 +37,21 @@ class ExpedienteStorageServiceService {
}
set count(value: number) {
this._count = value
this.save()
}
reset(list: any) {
this._list = list
this.count = this._list.length
this.save(this._list)
this.save()
}
private save(list: any) {
private save() {
setTimeout(()=>{
localstoreService.set(this.keyName, {
list: list,
count: this.count
list: this._list,
count: this._count
})
}, 10)
}
+8 -6
View File
@@ -17,10 +17,10 @@ export class ExpedientegdStoreService {
this.keyName = (SHA1(this.constructor.name)).toString()
setTimeout(()=>{
setTimeout(()=> {
let restore = localstoreService.get(this.keyName, {})
this._list = restore.eventsList || []
this._count = this._list.length || 0
this._list = restore.list || []
this._count = parseInt(restore.count) || 0
}, 10)
}
@@ -33,19 +33,21 @@ export class ExpedientegdStoreService {
}
set count(value: number) {
this._count = value
this.save()
}
reset(eventsList: any) {
this._list = eventsList
this.count = this._list.length
this.save(this._list)
this.save()
}
private save(eventsList: any) {
private save() {
setTimeout(()=>{
localstoreService.set(this.keyName,{
eventsList,
list: this._list,
count: this._count
})
}, 10)
+34 -37
View File
@@ -6,51 +6,48 @@ import { AES, enc, SHA1 } from 'crypto-js'
providedIn: 'root'
})
export class ExpedienteprStoreService {
// main data
private _list: [] = []
// local storage keyName
private keyName: string;
private _count = 0
// main data
private _list: [] = []
// local storage keyName
private keyName: string;
private _count = 0
constructor() {
constructor() {
this.keyName = (SHA1(this.constructor.name)).toString()
setTimeout(()=>{
let restore = localstoreService.get(this.keyName, {})
this._list = restore.eventsList || []
this._count = this._list.length || 0
}, 10)
this.keyName = (SHA1(this.constructor.name)).toString()
setTimeout(()=>{
let restore = localstoreService.get(this.keyName, {})
this._list = restore.list || []
this._count = parseInt(restore.count) || 0
}, 10)
}
}
get list() {
return this._list || []
}
get list() { return this._list || [] }
get count() {
return this._count
}
set count(value: number) {
this._count = value
}
get count() { return this._count }
set count(value: number) {
this._count = value
this.save()
}
reset(eventsList: any) {
this._list = eventsList
reset(eventsList: any) {
this._list = eventsList
this.count = this._list.length
this.save(this._list)
}
this.count = this._list.length
this.save()
}
private save(eventsList: any) {
setTimeout(()=>{
localstoreService.set(this.keyName,{
eventsList,
})
}, 10)
}
private save() {
setTimeout(()=>{
localstoreService.set(this.keyName,{
list: this._list,
count: this._count
})
}, 10)
}
}
+11 -13
View File
@@ -6,7 +6,7 @@ import { AES, enc, SHA1 } from 'crypto-js'
})
export class LocalstoreService {
private prefix = 'v13-'
private prefix = 'v14-'
constructor() {
@@ -59,18 +59,16 @@ export class LocalstoreService {
export const localstoreService = new LocalstoreService()
// // Create WebSocket connection.
// const socket = new WebSocket('ws://localhost:8080');
// // Listen for messages
// socket.addEventListener('message', function (event) {
// console.log('Message from server ', event.data); // Message from server mobile first é fraco
/* // Create WebSocket connection.
const socket = new WebSocket('ws://localhost:8080');
// var p = Promise.resolve(event.data);
// p.then(function(v) {
// console.log(v); // mobile first é fraco
// });
// Listen for messages
socket.addEventListener('message', function (event) {
console.log('Message from server ', event.data); // Message from server mobile first é fraco
var p = Promise.resolve(event.data);
p.then(function(v) {
console.log(v); // mobile first é fraco
});
}); */
// });
+38 -35
View File
@@ -7,86 +7,89 @@ import { AES, enc, SHA1 } from 'crypto-js'
})
export class PedidosStoreService {
private _listparecer: Event[] = []
private _listdeferimento: Event[] = []
private _listParecer: Event[] = []
private _listDeferimento: Event[] = []
// local storage keyName
private keyNameparecer: string;
private keyNamedeferiemnto: string;
private _countparecer = 0
private _countdeferiemnto = 0
private _countDeferiemnto = 0
constructor() {
this.keyNameparecer = (SHA1(this.constructor.name+"parecer")).toString()
this.keyNamedeferiemnto = (SHA1(this.constructor.name+"deferimneto")).toString()
setTimeout(()=>{
let restoreparecer = localstoreService.get(this.keyNameparecer, {})
let restoredeferimento = localstoreService.get(this.keyNamedeferiemnto, {})
let restoreParecer = localstoreService.get(this.keyNameparecer, {})
let restoreDeferimento = localstoreService.get(this.keyNamedeferiemnto, {})
this._listparecer = restoredeferimento.eventsListdeferimento || []
this._listdeferimento = restoreparecer.eventsListparecer || []
this._countparecer = this._listparecer.length || 0
this._countdeferiemnto = this._listdeferimento.length || 0
this._listParecer = restoreDeferimento.listDeferimento || []
this._listDeferimento = restoreParecer.listParecer || []
this._countparecer = parseInt(restoreParecer.count) || 0
this._countDeferiemnto = parseInt(restoreDeferimento.count) || 0
}, 10)
}
get listparecer() {
return this._listparecer
return this._listParecer
}
get listdeferimento() {
return this._listdeferimento
}
return this._listDeferimento
}
get countparecer() {
return this._countparecer
}
set countparecer(value: number) {
this._countparecer = value
this.saveParecer()
}
get countdeferimento() {
return this._countdeferiemnto
return this._countDeferiemnto
}
set countdeferimento(value: number ) {
this._countdeferiemnto = value
this._countDeferiemnto = value
this.saveDeferimento()
}
resetparecer(eventsList: any) {
this._listparecer = eventsList
this._listParecer = eventsList
this.countparecer = this._listparecer.length
this.savedeferimento(this._listparecer)
this.countparecer = this._listParecer.length
this.saveDeferimento()
}
resetdeferimento(eventsList: any) {
this._listdeferimento = eventsList
resetdeferimento(list: any) {
this._listDeferimento = list
this.countdeferimento =this._listdeferimento.length
this.saveparecer(this._listdeferimento)
}
private saveparecer(eventsListparecer: any) {
this.countdeferimento =this._listDeferimento.length
this.saveParecer()
}
private saveParecer() {
setTimeout(()=>{
localstoreService.set(this.keyNameparecer,{
eventsListparecer,
count: this._listparecer,
listParecer: this._listParecer,
count: this._countparecer,
})
}, 10)
}
private savedeferimento(eventsListdeferimento: any) {
setTimeout(()=>{
localstoreService.set(this.keyNamedeferiemnto,{
eventsListdeferimento,
count: this._listdeferimento,
})
}, 10)
}
private saveDeferimento() {
setTimeout(()=>{
localstoreService.set(this.keyNamedeferiemnto,{
listDeferimento: this._listParecer,
count: this._countDeferiemnto,
})
}, 10)
}
}
+39 -38
View File
@@ -8,52 +8,53 @@ import { AES, enc, SHA1 } from 'crypto-js'
export class PendestesStoreService {
// main data
private _list = []
// local storage keyName
private keyName: string;
private _count = 0
private _list = []
// local storage keyName
private keyName: string;
private _count = 0
constructor() {
constructor() {
this.keyName = (SHA1(this.constructor.name)).toString()
this.keyName = (SHA1(this.constructor.name)).toString()
setTimeout(()=>{
let restore = localstoreService.get(this.keyName, {})
this._list = restore.list || []
this._count = parseInt(restore.count) || 0
}, 10)
}
setTimeout(()=>{
let restore = localstoreService.get(this.keyName, {})
this._list = restore.eventsList || []
this._count = this._list.length || 0
}, 10)
get list() {
return this._list
}
}
get count() {
return this._count
this.save()
}
set count(value) {
this._count = value
}
get list() {
return this._list
}
get count() {
return this._count
}
set count(value) {
this._count = value
}
reset(eventsList: any) {
this._list = eventsList
reset(eventsList: any) {
this._list = eventsList
this.count = this._list.length
this.save()
}
this.count = this._list.length
this.save(this._list)
}
private save(eventsList: any) {
setTimeout(()=>{
localstoreService.set(this.keyName,{
eventsList,
count: this._list.length
})
}, 10)
}
private save() {
setTimeout(()=>{
localstoreService.set(this.keyName,{
list: this._list,
count: this._list.length
})
}, 10)
}
}
export const PendentesStore = new PendestesStoreService()
@@ -17,9 +17,9 @@ export class PresidentialActionsStoreService {
this.keyName = (SHA1(this.constructor.name+ 'presidentialActions/local')).toString()
setTimeout(()=>{
setTimeout(()=>{
let restore = localstoreService.get(this.keyName, [])
this._list = restore
this._list = restore.list
}, 10)
}
@@ -36,7 +36,9 @@ export class PresidentialActionsStoreService {
private save(list: Publication[]) {
setTimeout(()=> {
localstoreService.set(this.keyName, list)
localstoreService.set(this.keyName, {
list: this._list
})
}, 10)
}
@@ -18,7 +18,7 @@ export class PublicationEventFolderService {
setTimeout(()=>{
let restore = localstoreService.get(this.keyName, [])
this._list = restore
this._list = restore.list
}, 10)
}
@@ -30,12 +30,14 @@ export class PublicationEventFolderService {
reset(list: PublicationFolder[]) {
this._list = list
this.save(this._list)
this.save()
}
private save(list: PublicationFolder[]) {
private save() {
setTimeout(()=> {
localstoreService.set(this.keyName, list)
localstoreService.set(this.keyName, {
list: this._list
})
}, 10)
}
}
+4 -2
View File
@@ -19,7 +19,7 @@ export class PublicationListService {
setTimeout(()=>{
let restore = localstoreService.get(this.keyName, [])
this._document = restore
this._document = restore.document
}, 10)
}
@@ -36,7 +36,9 @@ export class PublicationListService {
this._document[folderId] = document
setTimeout(()=> {
localstoreService.set(this.keyName, this._document)
localstoreService.set(this.keyName, {
document: this._document
})
}, 100)
}
@@ -20,7 +20,7 @@ export class PublicationTravelFolderService {
setTimeout(()=>{
let restore = localstoreService.get(this.keyName, [])
this._list = restore
this._list = restore.list
}, 10)
}
@@ -37,7 +37,9 @@ export class PublicationTravelFolderService {
private save(list: PublicationFolder[]) {
setTimeout(()=> {
localstoreService.set(this.keyName, list)
localstoreService.set(this.keyName, {
list: this._list
})
}, 10)
}
}
@@ -20,10 +20,10 @@ export class ToDayEventStorageService {
this.keyName = (SHA1(this.constructor.name+ 'home/eventSource')).toString()
setTimeout(() => {
setTimeout(() => {
let restore = localstoreService.get(this.keyName, {})
this._eventsList = restore.eventsList || []
this._count = this._eventsList.length || 0
this._count = parseInt(restore.count) || 0
}, 10)
}
@@ -36,19 +36,20 @@ export class ToDayEventStorageService {
}
set count(value: number) {
this._count = value
this.save()
}
reset(eventsList: Event[]) {
this._eventsList = eventsList
this.count = this._eventsList.length
this.save(this._eventsList)
this.save()
}
private save(eventsList: Event[]) {
private save() {
setTimeout(()=>{
localstoreService.set(this.keyName,{
eventsList,
eventsList :this._eventsList,
count: this._eventsList
})
}, 10)
+1
View File
@@ -1071,6 +1071,7 @@ ngx-mat-datetime-content{
}
// Agenda show event from two profile
@media only screen and (max-width: 767px) {
.calendar-segment-mdgpr:not(.calendar-segment-pr-force) {
.calendar-pr-event-type-Oficial {