save
@@ -54,3 +54,12 @@ plugins_
|
|||||||
android
|
android
|
||||||
ios
|
ios
|
||||||
src/plugin/beast-orm
|
src/plugin/beast-orm
|
||||||
|
|
||||||
|
android/variables.gradle
|
||||||
|
android/settings.gradle
|
||||||
|
android/gradlew
|
||||||
|
android/gradle/wrapper/gradle-wrapper.properties
|
||||||
|
android/gradle.properties
|
||||||
|
android/build.gradle
|
||||||
|
android/**/gradle
|
||||||
|
android/**/gradle
|
||||||
@@ -94,3 +94,9 @@ capacitor-cordova-android-plugins
|
|||||||
|
|
||||||
# Copied web assets
|
# Copied web assets
|
||||||
app/src/main/assets/public
|
app/src/main/assets/public
|
||||||
|
variables.gradle
|
||||||
|
settings.gradle
|
||||||
|
gradlew
|
||||||
|
gradle/wrapper/gradle-wrapper.properties
|
||||||
|
gradle.properties
|
||||||
|
build.gradle
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="CompilerConfiguration">
|
<component name="CompilerConfiguration">
|
||||||
<bytecodeTargetLevel target="11" />
|
<bytecodeTargetLevel target="1.8" />
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="Android Studio default JDK" project-jdk-type="JavaSDK">
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ProjectType">
|
<component name="ProjectType">
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 7.5 KiB |
|
Before Width: | Height: | Size: 5.5 KiB |
|
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 3.9 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 9.0 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 7.7 KiB |
|
Before Width: | Height: | Size: 6.0 KiB |
|
Before Width: | Height: | Size: 7.4 KiB After Width: | Height: | Size: 4.0 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 9.6 KiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 4.2 KiB |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 3.9 KiB |
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 4.9 KiB |
|
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 6.4 KiB |
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 6.5 KiB |
|
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 9.6 KiB |
|
Before Width: | Height: | Size: 8.5 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 9.2 KiB |
|
Before Width: | Height: | Size: 7.2 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 16 KiB |
@@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<color name="ic_launcher_background">#FEFFFF</color>
|
<color name="ic_launcher_background">#FFFFFF</color>
|
||||||
</resources>
|
</resources>
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version='1.0' encoding='utf-8'?>
|
<?xml version='1.0' encoding='utf-8'?>
|
||||||
<resources>
|
<resources>
|
||||||
<string name="app_name">Gabinete Digital</string>
|
<string name="app_name">capacitor-testapp</string>
|
||||||
<string name="title_activity_main">Gabinete Digital</string>
|
<string name="title_activity_main">capacitor-testapp</string>
|
||||||
<string name="package_name">com.gpr.gabinetedigital</string>
|
<string name="package_name">com.capacitorjs.app.testapp</string>
|
||||||
<string name="custom_url_scheme">com.gpr.gabinetedigital</string>
|
<string name="custom_url_scheme">com.capacitorjs.app.testapp</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ buildscript {
|
|||||||
jcenter()
|
jcenter()
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:7.1.3'
|
classpath 'com.android.tools.build:gradle:4.2.1'
|
||||||
classpath 'com.google.gms:google-services:4.3.10'
|
classpath 'com.google.gms:google-services:4.3.5'
|
||||||
|
|
||||||
// NOTE: Do not place your application dependencies here; they belong
|
// NOTE: Do not place your application dependencies here; they belong
|
||||||
// in the individual module build.gradle files
|
// in the individual module build.gradle files
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-all.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-all.zip
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
"test": "jest --detectOpenHandles --runInBand",
|
"test": "jest --detectOpenHandles --runInBand",
|
||||||
"test:prof": "ionic build --configuration production && npm run test",
|
"test:prof": "ionic build --configuration production && npm run test",
|
||||||
"dev:share": "lite-server --baseDir=share",
|
"dev:share": "lite-server --baseDir=share",
|
||||||
"install:chromium":"node node_modules/puppeteer/install.js"
|
"install:chromium": "node node_modules/puppeteer/install.js"
|
||||||
},
|
},
|
||||||
"private": true,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@@ -281,5 +281,13 @@
|
|||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "git+https://Kayaya@bitbucket.org/equilibriumito/gabinete-digital.git"
|
"url": "git+https://Kayaya@bitbucket.org/equilibriumito/gabinete-digital.git"
|
||||||
},
|
},
|
||||||
"license": "ISC"
|
"license": "ISC",
|
||||||
|
"husky": {
|
||||||
|
"hooks": {
|
||||||
|
"applypatch-msg": "",
|
||||||
|
"pre-applypatch": "",
|
||||||
|
"post-applypatch": "",
|
||||||
|
"pre-commit": "prettier --write . && git add -A ."
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,7 +21,12 @@ npm install -g cordova-res
|
|||||||
ionic cordova plugin add cordova-plugin-network-information
|
ionic cordova plugin add cordova-plugin-network-information
|
||||||
|
|
||||||
## memory leak
|
## memory leak
|
||||||
set NODE_OPTIONS=--max_old_space_size=99996
|
set NODE_OPTIONS=--max_old_space_size=99999996
|
||||||
|
|
||||||
|
npm i cordova-plugin-androidx-adapter
|
||||||
|
npm install jetifier
|
||||||
|
npx jetify
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## BUG
|
## BUG
|
||||||
|
|||||||
@@ -22,6 +22,8 @@ export class AuthGuard implements CanActivate {
|
|||||||
route: ActivatedRouteSnapshot,
|
route: ActivatedRouteSnapshot,
|
||||||
state: RouterStateSnapshot): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree {
|
state: RouterStateSnapshot): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree {
|
||||||
|
|
||||||
|
console.log('hire inactinity!', state.url)
|
||||||
|
|
||||||
// if user not active or no session
|
// if user not active or no session
|
||||||
if(!SessionStore.user.Inactivity || !SessionStore.exist) {
|
if(!SessionStore.user.Inactivity || !SessionStore.exist) {
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ export class InactivityGuard implements CanActivate {
|
|||||||
|
|
||||||
if ( (this.platform.is('desktop') || this.platform.is('mobileweb')) ) {
|
if ( (this.platform.is('desktop') || this.platform.is('mobileweb')) ) {
|
||||||
if(this.p.userPermission(this.p.permissionList.Agenda.access) || this.p.userPermission(this.p.permissionList.Gabinete.access)){
|
if(this.p.userPermission(this.p.permissionList.Agenda.access) || this.p.userPermission(this.p.permissionList.Gabinete.access)){
|
||||||
this.router.navigate(['/home/events']);
|
|
||||||
}
|
}
|
||||||
else if(this.p.userPermission(this.p.permissionList.Chat.access) && this.p.userPermission(this.p.permissionList.Actions.access)){
|
else if(this.p.userPermission(this.p.permissionList.Chat.access) && this.p.userPermission(this.p.permissionList.Actions.access)){
|
||||||
this.router.navigate(['/home/chat']);
|
this.router.navigate(['/home/chat']);
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ export class LoginGuard implements CanActivate {
|
|||||||
route: ActivatedRouteSnapshot,
|
route: ActivatedRouteSnapshot,
|
||||||
state: RouterStateSnapshot): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree {
|
state: RouterStateSnapshot): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree {
|
||||||
|
|
||||||
|
console.log('hire inactinity!', state.url)
|
||||||
|
|
||||||
if(SessionStore.exist && SessionStore.user.Inactivity && SessionStore.user.LoginPreference != 'Pin' ) {
|
if(SessionStore.exist && SessionStore.user.Inactivity && SessionStore.user.LoginPreference != 'Pin' ) {
|
||||||
// enter app
|
// enter app
|
||||||
|
|||||||
@@ -1,450 +1,11 @@
|
|||||||
import { Component, OnInit, EventEmitter, Output } from '@angular/core';
|
import { Component, OnInit, EventEmitter, Output } from '@angular/core';
|
||||||
import { EventsService } from 'src/app/services/events.service';
|
|
||||||
import { NavigationExtras, Router } from '@angular/router';
|
|
||||||
import { ActivatedRoute, NavigationEnd } from '@angular/router';
|
|
||||||
import { ModalController, Platform } from '@ionic/angular';
|
|
||||||
import { EventDetailPage } from './event-detail/event-detail.page';
|
|
||||||
import { ProcessesService } from '../../services/processes.service';
|
|
||||||
import { ToDayEventStorage } from 'src/app/store/to-day-event-storage.service';
|
|
||||||
import { ExpedienteTaskPipe } from 'src/app/pipes/expediente-task.pipe';
|
|
||||||
import { ExpedienteGdStore } from 'src/app/store/expedientegd-store.service';
|
|
||||||
import { SqliteService } from 'src/app/services/sqlite.service';
|
|
||||||
import { BackgroundService } from 'src/app/services/background.service';
|
|
||||||
import { momentG } from 'src/plugin/momentG';
|
|
||||||
import { ThemeService } from 'src/app/services/theme.service'
|
|
||||||
import { Storage } from '@ionic/storage';
|
|
||||||
import { PermissionService } from 'src/app/services/permission.service';
|
|
||||||
import { ViewEventPage } from 'src/app/modals/view-event/view-event.page';
|
|
||||||
import { ChangeProfileService } from 'src/app/services/change-profile.service';
|
|
||||||
import { SessionStore } from 'src/app/store/session.service';
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-events',
|
selector: 'app-events',
|
||||||
templateUrl: './events.page.html',
|
templateUrl: './events.page.html',
|
||||||
styleUrls: ['./events.page.scss'],
|
styleUrls: ['./events.page.scss'],
|
||||||
})
|
})
|
||||||
export class EventsPage implements OnInit {
|
export class EventsPage implements OnInit {
|
||||||
today = new Date();
|
constructor() {}
|
||||||
|
|
||||||
months = ["Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"];
|
|
||||||
days = ["Domingo", "Segunda-feira", "Terça-feira", "Quarta-feira", "Quinta-feira", "Sexta-feira", "Sábado"];
|
|
||||||
|
|
||||||
customDate = this.days[this.today.getDay()] + ", " + this.today.getDate() + " de " + (this.months[this.today.getMonth()]);
|
|
||||||
|
|
||||||
grettings = ["Bom dia", "Boa tarde", "Boa noite"];
|
|
||||||
greetting = '';
|
|
||||||
|
|
||||||
timeDate = this.today.getHours() + ":" + this.today.getMinutes();
|
|
||||||
|
|
||||||
segment: string;
|
|
||||||
public profile: string;
|
|
||||||
currentEvent: any;
|
|
||||||
|
|
||||||
maxSubjectLength = 30;
|
|
||||||
|
|
||||||
customText = false;
|
|
||||||
totalEvent = 0;
|
|
||||||
currentHoursMinutes: Date | string;
|
|
||||||
|
|
||||||
showLoader: boolean;
|
|
||||||
|
|
||||||
expedientList: any;
|
|
||||||
hideSearchBtn: boolean = false;
|
|
||||||
|
|
||||||
// shared data
|
|
||||||
toDayEventStorage = ToDayEventStorage
|
|
||||||
expedienteGdStore = ExpedienteGdStore
|
|
||||||
|
|
||||||
listToPresent = [];
|
|
||||||
listToPresentexpediente = []
|
|
||||||
|
|
||||||
expedienteTaskPipe = new ExpedienteTaskPipe()
|
|
||||||
|
|
||||||
@Output() openExpedientListPage: EventEmitter<any> = new EventEmitter<any>();
|
|
||||||
|
|
||||||
sessoStore = SessionStore;
|
|
||||||
|
|
||||||
showAgendaLoader = false
|
|
||||||
showCorrespondenciasLoader = false
|
|
||||||
|
|
||||||
constructor(
|
|
||||||
private eventService: EventsService,
|
|
||||||
private router: Router,
|
|
||||||
public activatedRoute: ActivatedRoute,
|
|
||||||
private processes: ProcessesService,
|
|
||||||
private modalController: ModalController,
|
|
||||||
public platform: Platform,
|
|
||||||
private sqliteservice: SqliteService,
|
|
||||||
private backgroundservice: BackgroundService,
|
|
||||||
public ThemeService: ThemeService,
|
|
||||||
private storage: Storage,
|
|
||||||
public p: PermissionService,
|
|
||||||
private changeProfileService: ChangeProfileService,
|
|
||||||
) {
|
|
||||||
|
|
||||||
|
|
||||||
// window['zipPhoneCallback'] = function (zipphone) {
|
|
||||||
// var frame = document.getElementById('home-iframe');
|
|
||||||
// if(frame) {
|
|
||||||
// frame['contentWindow']['postMessage']({call:'cookies', value: { cookies: {} }});
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// this.changeProfileService.registerCallback(() => {
|
|
||||||
|
|
||||||
// this.listToPresent = [];
|
|
||||||
// this.listToPresentexpediente = []
|
|
||||||
// })
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnInit() {
|
|
||||||
|
|
||||||
// this.showGreeting();
|
|
||||||
|
|
||||||
// this.router.events.forEach((event) => {
|
|
||||||
// if (event instanceof NavigationEnd && event.url == '/home/events') {
|
|
||||||
// this.RefreshEvents();
|
|
||||||
// setTimeout(() => {
|
|
||||||
// this.LoadList();
|
|
||||||
// }, 1500)
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
// this.hideSearch();
|
|
||||||
|
|
||||||
// this.backgroundservice.registerBackService('Online', () => {
|
|
||||||
// this.showGreeting();
|
|
||||||
// this.RefreshEvents();
|
|
||||||
// this.LoadList();
|
|
||||||
// this.hideSearch();
|
|
||||||
// });
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
hideSearch() {
|
|
||||||
// if (this.router.url == '/home/events') {
|
|
||||||
// this.hideSearchBtn = true;
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
|
|
||||||
doRefresh() {
|
|
||||||
// this.RefreshEvents();
|
|
||||||
// this.LoadList();
|
|
||||||
}
|
|
||||||
|
|
||||||
onSegmentChange() {
|
|
||||||
// this.doRefresh();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
async RefreshEvents() {
|
|
||||||
|
|
||||||
// this.currentEvent = "";
|
|
||||||
// this.showLoader = true;
|
|
||||||
// this.showAgendaLoader = true;
|
|
||||||
|
|
||||||
// let date = new Date();
|
|
||||||
// let month = date.getMonth() + 1;
|
|
||||||
// let start = date.getFullYear() + "-" + month + "-" + date.getDate() + " " + date.getHours() + ":" + date.getMinutes() + ":" + date.getSeconds();
|
|
||||||
// let end = date.getFullYear() + "-" + month + "-" + date.getDate() + " 23:59:59";
|
|
||||||
// if(SessionStore.user) {
|
|
||||||
// let onwEvent:any = await this.eventService.getAllOwnEvents(start, end).catch((error) => {
|
|
||||||
// this.showAgendaLoader = false;
|
|
||||||
// console.error(error)
|
|
||||||
// })
|
|
||||||
// this.listToPresent = onwEvent;
|
|
||||||
// this.totalEvent = onwEvent.length;
|
|
||||||
// this.showLoader = false;
|
|
||||||
// this.showAgendaLoader = false;
|
|
||||||
// } else {
|
|
||||||
|
|
||||||
// }
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
addEventToDb(list) {
|
|
||||||
|
|
||||||
// if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
|
|
||||||
// this.storage.set('events', list).then(() => {
|
|
||||||
// //
|
|
||||||
// })
|
|
||||||
// } else {
|
|
||||||
// if (list.length > 0) {
|
|
||||||
// list.forEach(element => {
|
|
||||||
// this.sqliteservice.addEvent(element)
|
|
||||||
|
|
||||||
// this.sqliteservice.getAllEvents().then((event: any[] = []) => {
|
|
||||||
// let todayEvents = new Array()
|
|
||||||
// event.forEach((element) => {
|
|
||||||
// let eventObject = {
|
|
||||||
// AppointmentState: element.AppointmentState,
|
|
||||||
// Attachments: element.Attachments,
|
|
||||||
// Attendees: element.Attendees,
|
|
||||||
// CalendarId: element.CalendarId,
|
|
||||||
// CalendarName: element.CalendarName,
|
|
||||||
// Category: element.Category,
|
|
||||||
// EndDate: element.EndDate,
|
|
||||||
// EventId: element.EventId,
|
|
||||||
// EventRecurrence: element.EventRecurrence,
|
|
||||||
// EventType: element.EventType,
|
|
||||||
// HasAttachments: element.HasAttachments,
|
|
||||||
// HumanDate: element.HumanDate,
|
|
||||||
// IsAllDayEvent: element.IsAllDayEvent,
|
|
||||||
// IsMeeting: element.IsMeeting,
|
|
||||||
// IsRecurring: element.IsRecurring,
|
|
||||||
// Location: element.Location,
|
|
||||||
// Organizer: element.Organizer,
|
|
||||||
// Profile: element.Profile,
|
|
||||||
// StartDate: element.StartDate,
|
|
||||||
// Subject: element.Subject
|
|
||||||
// }
|
|
||||||
// todayEvents.push(eventObject);
|
|
||||||
// })
|
|
||||||
|
|
||||||
// })
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
|
|
||||||
addProcessToDb(list) {
|
|
||||||
|
|
||||||
// if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
|
|
||||||
// this.storage.set('process', list).then(() => {
|
|
||||||
// //
|
|
||||||
// })
|
|
||||||
// } else {
|
|
||||||
// if (list.length > 0) {
|
|
||||||
// list.forEach(element => {
|
|
||||||
// this.sqliteservice.addProcess(element)
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
|
|
||||||
getEventsFromLocalDb() {
|
|
||||||
|
|
||||||
// let date = new Date();
|
|
||||||
// let month = date.getMonth() + 1;
|
|
||||||
// //date.setMonth(date.getMonth() + 1);
|
|
||||||
// let dateToday = date.getFullYear() + "-" + month + "-" + date.getDate();
|
|
||||||
// // ('dateeeeee', dateToday)
|
|
||||||
// if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
|
|
||||||
// this.storage.get('events').then((events: any[] = []) => {
|
|
||||||
// //
|
|
||||||
// let todayEvents = new Array()
|
|
||||||
// this.listToPresent = events
|
|
||||||
// this.totalEvent = this.listToPresent.length
|
|
||||||
// this.currentEvent = this.listToPresent[0].Subject
|
|
||||||
// this.currentHoursMinutes = this.listToPresent[0].StartDate
|
|
||||||
// //
|
|
||||||
// })
|
|
||||||
|
|
||||||
// this.storage.get('process').then((process: any[] = []) => {
|
|
||||||
// //
|
|
||||||
// const ExpedienteTask = process.map(e => this.expedienteTaskPipe.transform(e))
|
|
||||||
// this.listToPresentexpediente = ExpedienteTask;
|
|
||||||
// })
|
|
||||||
|
|
||||||
// this.showLoader = false;
|
|
||||||
|
|
||||||
// } else {
|
|
||||||
// this.sqliteservice.getAllEvents().then((event: any[] = []) => {
|
|
||||||
// let todayEvents = new Array()
|
|
||||||
// event.forEach((element) => {
|
|
||||||
// let eventObject = {
|
|
||||||
// AppointmentState: element.AppointmentState,
|
|
||||||
// Attachments: element.Attachments,
|
|
||||||
// Attendees: element.Attendees,
|
|
||||||
// CalendarId: element.CalendarId,
|
|
||||||
// CalendarName: element.CalendarName,
|
|
||||||
// Category: element.Category,
|
|
||||||
// EndDate: element.EndDate,
|
|
||||||
// EventId: element.EventId,
|
|
||||||
// EventRecurrence: element.EventRecurrence,
|
|
||||||
// EventType: element.EventType,
|
|
||||||
// HasAttachments: element.HasAttachments,
|
|
||||||
// HumanDate: element.HumanDate,
|
|
||||||
// IsAllDayEvent: element.IsAllDayEvent,
|
|
||||||
// IsMeeting: element.IsMeeting,
|
|
||||||
// IsRecurring: element.IsRecurring,
|
|
||||||
// Location: element.Location,
|
|
||||||
// Organizer: element.Organizer,
|
|
||||||
// Profile: element.Profile,
|
|
||||||
// StartDate: element.StartDate,
|
|
||||||
// Subject: element.Subject
|
|
||||||
// }
|
|
||||||
// let starteDate = momentG(new Date(element.StartDate), 'yyyy-MM-dd');
|
|
||||||
// //
|
|
||||||
// if (dateToday == starteDate) {
|
|
||||||
// todayEvents.push(eventObject);
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
// this.listToPresent = todayEvents
|
|
||||||
// this.totalEvent = this.listToPresent.length
|
|
||||||
// this.currentEvent = this.listToPresent[0].Subject
|
|
||||||
// this.currentHoursMinutes = this.listToPresent[0].StartDate
|
|
||||||
// //
|
|
||||||
// })
|
|
||||||
|
|
||||||
// this.sqliteservice.getprocessByworkflow("Expediente").then((process: any[] = []) => {
|
|
||||||
|
|
||||||
// //
|
|
||||||
|
|
||||||
// if (process.length > 0 || process != undefined) {
|
|
||||||
|
|
||||||
// var expedientlist: any = new Array();
|
|
||||||
// process.forEach((element) => {
|
|
||||||
// if(JSON.parse(element.workflowInstanceDataFields).TaskMessage || JSON.parse(element.workflowInstanceDataFields).Note) {
|
|
||||||
|
|
||||||
// let task = {
|
|
||||||
// activityInstanceName: element.activityInstanceName,
|
|
||||||
// deadline: null,
|
|
||||||
// serialNumber: element.serialNumber,
|
|
||||||
// taskStartDate: element.taskStartDate,
|
|
||||||
// totalDocuments: element.totalDocuments,
|
|
||||||
// workflowDisplayName: element.workflowDisplayName,
|
|
||||||
// workflowInstanceDataFields: JSON.parse(element.workflowInstanceDataFields)
|
|
||||||
// }
|
|
||||||
// expedientlist.push(task);
|
|
||||||
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
|
|
||||||
// //
|
|
||||||
// const ExpedienteTask = expedientlist.map(e => this.expedienteTaskPipe.transform(e))
|
|
||||||
// this.listToPresentexpediente = ExpedienteTask;
|
|
||||||
|
|
||||||
// }
|
|
||||||
|
|
||||||
// this.showLoader = false;
|
|
||||||
// })
|
|
||||||
// }
|
|
||||||
// // });
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
showGreeting() {
|
|
||||||
// if (this.today.getHours() >= 6 && this.today.getHours() < 12) {
|
|
||||||
// this.greetting = this.grettings[0];
|
|
||||||
// }
|
|
||||||
// else if (this.today.getHours() >= 12 && this.today.getHours() < 18) {
|
|
||||||
// this.greetting = this.grettings[1];
|
|
||||||
// }
|
|
||||||
// else /* if(this.today.getHours() < 6 && this.today.getHours() >= 18) */ {
|
|
||||||
// this.greetting = this.grettings[2];
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
|
|
||||||
gotTo() {
|
|
||||||
this.router.navigate(['/home/events']);
|
|
||||||
}
|
|
||||||
|
|
||||||
changeProfile() {
|
|
||||||
// if (this.profile == "mdgpr") {
|
|
||||||
// //
|
|
||||||
// this.profile = "pr";
|
|
||||||
// this.RefreshEvents();
|
|
||||||
// }
|
|
||||||
// else {
|
|
||||||
// //
|
|
||||||
// this.profile = "mdgpr";
|
|
||||||
// this.RefreshEvents();
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
|
|
||||||
async openEventDetail1(id: any) {
|
|
||||||
//
|
|
||||||
|
|
||||||
const modal = await this.modalController.create({
|
|
||||||
component: EventDetailPage,
|
|
||||||
componentProps: {
|
|
||||||
eventId: id,
|
|
||||||
},
|
|
||||||
cssClass: 'event-detail',
|
|
||||||
backdropDismiss: false
|
|
||||||
});
|
|
||||||
await modal.present();
|
|
||||||
modal.onDidDismiss();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
async openEventDetail(id: any) {
|
|
||||||
//
|
|
||||||
|
|
||||||
const modal = await this.modalController.create({
|
|
||||||
component: ViewEventPage,
|
|
||||||
componentProps: {
|
|
||||||
eventId: id,
|
|
||||||
},
|
|
||||||
cssClass: 'view-event',
|
|
||||||
backdropDismiss: false
|
|
||||||
});
|
|
||||||
await modal.present();
|
|
||||||
modal.onDidDismiss();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
LoadList() {
|
|
||||||
this.showCorrespondenciasLoader = true
|
|
||||||
this.processes.GetTaskListExpediente(false).subscribe(result => {
|
|
||||||
this.addProcessToDb(result);
|
|
||||||
|
|
||||||
let ExpedienteTask = result.map(e => this.expedienteTaskPipe.transform(e))
|
|
||||||
|
|
||||||
this.listToPresentexpediente = ExpedienteTask;
|
|
||||||
|
|
||||||
this.showCorrespondenciasLoader = false
|
|
||||||
}, ((error) => {
|
|
||||||
|
|
||||||
this.showCorrespondenciasLoader = false
|
|
||||||
//
|
|
||||||
this.getEventsFromLocalDb();
|
|
||||||
}));
|
|
||||||
}
|
|
||||||
|
|
||||||
sortArrayISODate(myArray: any) {
|
|
||||||
return myArray.sort(function (a, b) {
|
|
||||||
return (a.CreateDate < b.CreateDate) ? -1 : ((a.CreateDate > b.CreateDate) ? 1 : 0);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
goToEvent(event: any) {
|
|
||||||
let navigationExtras: NavigationExtras = { queryParams: { CalendarId: event.CalendarId } }
|
|
||||||
|
|
||||||
|
|
||||||
this.router.navigate(['/home/events', event.EventId, 'agenda'], navigationExtras);
|
|
||||||
}
|
|
||||||
|
|
||||||
goToExpediente(SerialNumber: any) {
|
|
||||||
this.router.navigate(['/home/events/expediente', SerialNumber, 'events']);
|
|
||||||
}
|
|
||||||
|
|
||||||
viewExpedientListPage() {
|
|
||||||
|
|
||||||
if (this.sessoStore.user.Profile == 'PR') {
|
|
||||||
if (window.innerWidth < 701) {
|
|
||||||
this.router.navigate(['/home/gabinete-digital/expedientes-pr']);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
let navigationExtras: NavigationExtras = { queryParams: { "expedientes-pr": true, } };
|
|
||||||
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
|
|
||||||
if (window.innerWidth < 701) {
|
|
||||||
this.router.navigate(['/home/gabinete-digital/expediente']);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
let navigationExtras: NavigationExtras = { queryParams: { "expedientes": true, } };
|
|
||||||
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
ngOnInit() {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -11,11 +11,11 @@ import { ClearStoreService } from 'src/app/services/clear-store.service';
|
|||||||
import { ChangeProfileService } from 'src/app/services/change-profile.service';
|
import { ChangeProfileService } from 'src/app/services/change-profile.service';
|
||||||
import { ThemeService } from 'src/app/services/theme.service';
|
import { ThemeService } from 'src/app/services/theme.service';
|
||||||
import { PermissionService } from 'src/app/services/permission.service';
|
import { PermissionService } from 'src/app/services/permission.service';
|
||||||
|
import { PermissionList } from 'src/app/models/permission/permissionList';
|
||||||
import { MessageModel, DeleteMessageModel } from '../../models/beast-orm';
|
import { MessageModel, DeleteMessageModel } from '../../models/beast-orm';
|
||||||
import { RochetChatConnectorService } from 'src/app/services/chat/rochet-chat-connector.service';
|
import { RochetChatConnectorService } from 'src/app/services/chat/rochet-chat-connector.service';
|
||||||
import { ChatSystemService } from 'src/app/services/chat/chat-system.service';
|
import { ChatSystemService } from 'src/app/services/chat/chat-system.service';
|
||||||
import { ChatService } from 'src/app/services/chat.service';
|
import { ChatService } from 'src/app/services/chat.service';
|
||||||
import { Platform } from '@ionic/angular';
|
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@@ -50,8 +50,7 @@ export class LoginPage implements OnInit {
|
|||||||
public p: PermissionService,
|
public p: PermissionService,
|
||||||
private RochetChatConnectorService: RochetChatConnectorService,
|
private RochetChatConnectorService: RochetChatConnectorService,
|
||||||
public ChatSystemService: ChatSystemService,
|
public ChatSystemService: ChatSystemService,
|
||||||
private ChatService: ChatService,
|
private ChatService: ChatService
|
||||||
private platform: Platform,
|
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
@@ -102,7 +101,6 @@ export class LoginPage implements OnInit {
|
|||||||
|
|
||||||
async Login() {
|
async Login() {
|
||||||
|
|
||||||
|
|
||||||
if (this.validateUsername()) {
|
if (this.validateUsername()) {
|
||||||
if(this.validatePassword()) {
|
if(this.validatePassword()) {
|
||||||
|
|
||||||
@@ -140,16 +138,16 @@ export class LoginPage implements OnInit {
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
|
||||||
this.RochetChatConnectorService.logout();
|
this.RochetChatConnectorService.logout();
|
||||||
this.clearStoreService.clear();
|
this.clearStoreService.clear();
|
||||||
this.ChatSystemService.clearChat();
|
this.ChatSystemService.clearChat();
|
||||||
SessionStore.delete();
|
SessionStore.delete();
|
||||||
window.localStorage.clear();
|
window.localStorage.clear();
|
||||||
await MessageModel.deleteAll();
|
await MessageModel.deleteAll()
|
||||||
await DeleteMessageModel.deleteAll();
|
await DeleteMessageModel.deleteAll()
|
||||||
|
|
||||||
await this.authService.SetSession(attempt, this.userattempt);
|
await this.authService.SetSession(attempt, this.userattempt);
|
||||||
|
|
||||||
this.changeProfileService.run();
|
this.changeProfileService.run();
|
||||||
|
|
||||||
|
|
||||||
@@ -161,18 +159,7 @@ export class LoginPage implements OnInit {
|
|||||||
|
|
||||||
this.getToken();
|
this.getToken();
|
||||||
|
|
||||||
if(!this.platform.is('desktop') && !this.platform.is('mobileweb')) {
|
this.router.navigateByUrl('/pin', { replaceUrl: true });
|
||||||
if(this.sessionStore.hasPin) {
|
|
||||||
this.router.navigateByUrl('/home/events');
|
|
||||||
} else {
|
|
||||||
this.router.navigateByUrl('/pin', { replaceUrl: true });
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
|
||||||
this.router.navigate(['/home/events']);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
export const environment = {
|
export const environment = {
|
||||||
// apiURL: 'https://gabinetedigital.dyndns.info/GabineteDigital.Services/V5/api/',
|
// apiURL: 'https://gabinetedigital.dyndns.info/GabineteDigital.Services/V5/api/',
|
||||||
apiURL: 'https://gd-api.oapr.gov.ao/api/',
|
apiURL: 'https://gd-api.oapr.gov.ao/api/',
|
||||||
|
//apiURL: 'https://gdapi-dev.dyndns.info/GabineteDigital.Services/V5/api/',
|
||||||
// apiURL: 'http://gpr-dev-01.gabinetedigital.local/GabineteDigital.Services/V5/api/',
|
// apiURL: 'http://gpr-dev-01.gabinetedigital.local/GabineteDigital.Services/V5/api/',
|
||||||
// apiChatUrl: 'http://192.168.0.29:3000/api/v1/',
|
// apiChatUrl: 'http://192.168.0.29:3000/api/v1/',
|
||||||
// apiWsChatUrl: 'wss://192.168.0.29:3000/websocket',
|
// apiWsChatUrl: 'wss://192.168.0.29:3000/websocket',
|
||||||
|
|||||||