mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
fix bugs
This commit is contained in:
@@ -1,7 +1,6 @@
|
|||||||
import { Component, Inject } from '@angular/core';
|
import { Component, Inject } from '@angular/core';
|
||||||
|
|
||||||
import { Platform } from '@ionic/angular';
|
import { Platform } from '@ionic/angular';
|
||||||
/* import { SplashScreen } from '@ionic-native/splash-screen/ngx'; */
|
|
||||||
import { StatusBar } from '@ionic-native/status-bar/ngx';
|
import { StatusBar } from '@ionic-native/status-bar/ngx';
|
||||||
import * as _moment from 'moment';
|
import * as _moment from 'moment';
|
||||||
import * as _rollupMoment from 'moment';
|
import * as _rollupMoment from 'moment';
|
||||||
@@ -52,7 +51,7 @@ export class AppComponent {
|
|||||||
) {
|
) {
|
||||||
// this.createCacheFolder()
|
// this.createCacheFolder()
|
||||||
this.initializeApp();
|
this.initializeApp();
|
||||||
console.log('version:'+ environment.version)
|
console.log('version: '+ environment.version)
|
||||||
}
|
}
|
||||||
|
|
||||||
// async createCacheFolder(){
|
// async createCacheFolder(){
|
||||||
|
|||||||
@@ -51,9 +51,16 @@ export class InactivityGuard implements CanActivate {
|
|||||||
|
|
||||||
return false
|
return false
|
||||||
} else if(SessionStore.exist && SessionStore.user.Inactivity && !SessionStore.hasPin ) {
|
} else if(SessionStore.exist && SessionStore.user.Inactivity && !SessionStore.hasPin ) {
|
||||||
|
// set pin
|
||||||
return true
|
return true
|
||||||
} else if(SessionStore.exist && !SessionStore.user.Inactivity) {
|
} else if(SessionStore.exist && !SessionStore.user.Inactivity && SessionStore.user.LoginPreference == 'Pin') {
|
||||||
|
// inactivity login
|
||||||
return true
|
return true
|
||||||
|
} else if (SessionStore.user.LoginPreference != 'Pin' && !SessionStore.user.Inactivity) {
|
||||||
|
// no right to be in this page
|
||||||
|
|
||||||
|
this.router.navigateByUrl('/', { replaceUrl: true });
|
||||||
|
return false
|
||||||
}//Mobile or Tablet without session
|
}//Mobile or Tablet without session
|
||||||
else {
|
else {
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,27 @@
|
|||||||
|
import { SessionStore } from 'src/app/store/session.service';
|
||||||
|
|
||||||
export class AgendaPermission{
|
export class AgendaPermission{
|
||||||
access = 530
|
private hasOwnCalendar = false
|
||||||
|
private hasSharedCalendar = false
|
||||||
|
|
||||||
|
constructor() {
|
||||||
|
if(SessionStore.exist) {
|
||||||
|
for (let calendar of SessionStore?.user?.OwnerCalendars) {
|
||||||
|
this.hasOwnCalendar = true
|
||||||
|
}
|
||||||
|
|
||||||
|
for (let sharedCalendar of SessionStore?.user?.SharedCalendars) {
|
||||||
|
this.hasSharedCalendar = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
get access () {
|
||||||
|
|
||||||
|
if(this.hasOwnCalendar || this.hasSharedCalendar) {
|
||||||
|
return 530
|
||||||
|
} else {
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
export class ChatPermission{
|
export class ChatPermission {
|
||||||
access = 541;
|
access = 541;
|
||||||
}
|
}
|
||||||
@@ -398,12 +398,6 @@ export class AgendaPage implements OnInit {
|
|||||||
const profile_ = element.profile == 'md' ? 'mdgpr' : 'pr';
|
const profile_ = element.profile == 'md' ? 'mdgpr' : 'pr';
|
||||||
const eventtype = element.event.CalendarName;
|
const eventtype = element.event.CalendarName;
|
||||||
|
|
||||||
|
|
||||||
// if (startTimeSamp < endTimeSamp && endDay == 29 && (endMinutes + endHours) == 0) {
|
|
||||||
// //
|
|
||||||
// classs.push(`calendar-event-border`);
|
|
||||||
// }
|
|
||||||
|
|
||||||
classs.push(`calendar-event-border calendar-${profile_}-event-type-${eventtype}`);
|
classs.push(`calendar-event-border calendar-${profile_}-event-type-${eventtype}`);
|
||||||
|
|
||||||
});
|
});
|
||||||
@@ -497,14 +491,37 @@ export class AgendaPage implements OnInit {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
loadRequest: any = {}
|
||||||
|
loadRequestHistory: any = {}
|
||||||
|
|
||||||
loadRangeEvents(startTime: Date, endTime: Date) {
|
loadRangeEvents(startTime: Date, endTime: Date) {
|
||||||
this.array = [];
|
this.array = [];
|
||||||
|
this.rangeStartDate = startTime
|
||||||
|
this.rangeEndDate = endTime
|
||||||
|
this.showLoader = true;
|
||||||
|
|
||||||
|
const index = `${startTime}${endTime}`
|
||||||
|
if(!this.loadRequest[index]) {
|
||||||
|
this.loadRequest[index] = {startTime, endTime}
|
||||||
|
this.loadRequestHistory[index] = {lastTimeUpdate: new Date()}
|
||||||
|
|
||||||
|
this.loadRangeEventRun(startTime, endTime)
|
||||||
|
} else {
|
||||||
|
// console.log('dont call')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
deleteLoadRangeEvent(startTime: Date, endTime: Date) {
|
||||||
|
const index = `${startTime}${endTime}`
|
||||||
|
delete this.loadRequest[index]
|
||||||
|
}
|
||||||
|
|
||||||
|
loadRangeEventRun(startTime: Date, endTime: Date) {
|
||||||
|
this.array = [];
|
||||||
this.rangeStartDate = startTime
|
this.rangeStartDate = startTime
|
||||||
this.rangeEndDate = endTime
|
this.rangeEndDate = endTime
|
||||||
|
|
||||||
this.showLoader = true;
|
this.showLoader = true;
|
||||||
|
|
||||||
if (window.innerWidth < 800) {
|
if (window.innerWidth < 800) {
|
||||||
|
|
||||||
if (this.profile == "mdgpr" && this.loggeduser.Profile == 'MDGPR') {
|
if (this.profile == "mdgpr" && this.loggeduser.Profile == 'MDGPR') {
|
||||||
@@ -534,6 +551,7 @@ export class AgendaPage implements OnInit {
|
|||||||
this.getFromDB();
|
this.getFromDB();
|
||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
this.showLoader = false;
|
this.showLoader = false;
|
||||||
|
this.deleteLoadRangeEvent(startTime, endTime)
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -561,6 +579,7 @@ export class AgendaPage implements OnInit {
|
|||||||
this.getFromDB()
|
this.getFromDB()
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
|
this.deleteLoadRangeEvent(startTime, endTime)
|
||||||
this.showLoader = false;
|
this.showLoader = false;
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -592,6 +611,7 @@ export class AgendaPage implements OnInit {
|
|||||||
this.getFromDB()
|
this.getFromDB()
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
|
this.deleteLoadRangeEvent(startTime, endTime)
|
||||||
this.showLoader = false;
|
this.showLoader = false;
|
||||||
})
|
})
|
||||||
} else if (this.loggeduser.Profile != 'PR' && this.loggeduser.Profile != 'MDGPR'){
|
} else if (this.loggeduser.Profile != 'PR' && this.loggeduser.Profile != 'MDGPR'){
|
||||||
@@ -624,6 +644,7 @@ export class AgendaPage implements OnInit {
|
|||||||
}).catch((error) => {
|
}).catch((error) => {
|
||||||
this.getFromDB();
|
this.getFromDB();
|
||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
|
this.deleteLoadRangeEvent(startTime, endTime)
|
||||||
this.showLoader = false;
|
this.showLoader = false;
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -648,6 +669,7 @@ export class AgendaPage implements OnInit {
|
|||||||
}).catch((error) => {
|
}).catch((error) => {
|
||||||
this.getFromDB()
|
this.getFromDB()
|
||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
|
this.deleteLoadRangeEvent(startTime, endTime)
|
||||||
this.showLoader = false;
|
this.showLoader = false;
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -688,6 +710,7 @@ export class AgendaPage implements OnInit {
|
|||||||
}).catch((error) => {
|
}).catch((error) => {
|
||||||
this.getFromDB()
|
this.getFromDB()
|
||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
|
this.deleteLoadRangeEvent(startTime, endTime)
|
||||||
counter++;
|
counter++;
|
||||||
if (counter == 2) {
|
if (counter == 2) {
|
||||||
this.showLoader = false;
|
this.showLoader = false;
|
||||||
@@ -723,6 +746,7 @@ export class AgendaPage implements OnInit {
|
|||||||
}).catch((error) => {
|
}).catch((error) => {
|
||||||
this.getFromDB()
|
this.getFromDB()
|
||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
|
this.deleteLoadRangeEvent(startTime, endTime)
|
||||||
counter++;
|
counter++;
|
||||||
if (counter == 2) {
|
if (counter == 2) {
|
||||||
this.showLoader = false;
|
this.showLoader = false;
|
||||||
@@ -759,6 +783,7 @@ export class AgendaPage implements OnInit {
|
|||||||
}).catch((error) => {
|
}).catch((error) => {
|
||||||
this.getFromDB()
|
this.getFromDB()
|
||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
|
this.deleteLoadRangeEvent(startTime, endTime)
|
||||||
this.showLoader = false;
|
this.showLoader = false;
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
@@ -796,6 +821,7 @@ export class AgendaPage implements OnInit {
|
|||||||
}).catch((error) => {
|
}).catch((error) => {
|
||||||
this.getFromDB()
|
this.getFromDB()
|
||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
|
this.deleteLoadRangeEvent(startTime, endTime)
|
||||||
counter++;
|
counter++;
|
||||||
if (counter == 2) {
|
if (counter == 2) {
|
||||||
this.showLoader = false;
|
this.showLoader = false;
|
||||||
@@ -843,6 +869,7 @@ export class AgendaPage implements OnInit {
|
|||||||
this.getFromDB()
|
this.getFromDB()
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
|
this.deleteLoadRangeEvent(startTime, endTime)
|
||||||
counter++;
|
counter++;
|
||||||
if (counter == 2) {
|
if (counter == 2) {
|
||||||
this.showLoader = false;
|
this.showLoader = false;
|
||||||
@@ -962,7 +989,7 @@ export class AgendaPage implements OnInit {
|
|||||||
this.showTimeline = true;
|
this.showTimeline = true;
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
this.sqliteservice.getAllEvents().then((events: any[]) => {
|
this.sqliteservice.getAllEvents().then((events: any[] = []) => {
|
||||||
|
|
||||||
let eventArray = [];
|
let eventArray = [];
|
||||||
|
|
||||||
@@ -984,20 +1011,18 @@ export class AgendaPage implements OnInit {
|
|||||||
|
|
||||||
getEventsFromDB () {
|
getEventsFromDB () {
|
||||||
|
|
||||||
new Promise((resolve, reject)=>{
|
new Promise((resolve, reject) => {
|
||||||
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
|
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
|
||||||
this.storage.get('agendaResponse').then((events) => {
|
this.storage.get('agendaResponse').then((events) => {
|
||||||
resolve(events)
|
resolve(events)
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
this.sqliteservice.getAllEvents().then((events: any[]) => {
|
this.sqliteservice.getAllEvents().then((events: any[] = []) => {
|
||||||
resolve(events)
|
resolve(events)
|
||||||
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
updateEventListBox() {
|
updateEventListBox() {
|
||||||
@@ -1199,6 +1224,8 @@ export class AgendaPage implements OnInit {
|
|||||||
|
|
||||||
openAddEventDismiss(data) {
|
openAddEventDismiss(data) {
|
||||||
|
|
||||||
|
try {
|
||||||
|
|
||||||
let postEvent: Event = data;
|
let postEvent: Event = data;
|
||||||
if (postEvent.Subject != null) {
|
if (postEvent.Subject != null) {
|
||||||
// this.eventSource.push({
|
// this.eventSource.push({
|
||||||
@@ -1212,6 +1239,10 @@ export class AgendaPage implements OnInit {
|
|||||||
this.myCal.loadEvents();
|
this.myCal.loadEvents();
|
||||||
this.loadRangeEvents(this.rangeStartDate, this.rangeEndDate);
|
this.loadRangeEvents(this.rangeStartDate, this.rangeEndDate);
|
||||||
}
|
}
|
||||||
|
} catch (error) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
this.cloneAllmobileComponent();
|
this.cloneAllmobileComponent();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -103,6 +103,11 @@ export class NewEventPage implements OnInit {
|
|||||||
this.selectedDate = this.navParams.get('eventSelectedDate');
|
this.selectedDate = this.navParams.get('eventSelectedDate');
|
||||||
this.taskParticipants = this.navParams.get('attendees');
|
this.taskParticipants = this.navParams.get('attendees');
|
||||||
|
|
||||||
|
|
||||||
|
if(this.eventService.calendarNamesAry['Meu calendario']) {
|
||||||
|
this.CalendarName = 'Meu calendario'
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
|||||||
@@ -143,7 +143,7 @@ export class ViewEventPage implements OnInit {
|
|||||||
resolve(events)
|
resolve(events)
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
this.sqliteservice.getAllEvents().then((events: any[]) => {
|
this.sqliteservice.getAllEvents().then((events: any[] = []) => {
|
||||||
resolve(events)
|
resolve(events)
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -218,7 +218,7 @@ export class EventsPage implements OnInit {
|
|||||||
list.forEach(element => {
|
list.forEach(element => {
|
||||||
this.sqliteservice.addEvent(element)
|
this.sqliteservice.addEvent(element)
|
||||||
|
|
||||||
this.sqliteservice.getAllEvents().then((event: any[]) => {
|
this.sqliteservice.getAllEvents().then((event: any[] = []) => {
|
||||||
let todayEvents = new Array()
|
let todayEvents = new Array()
|
||||||
event.forEach((element) => {
|
event.forEach((element) => {
|
||||||
let eventObject = {
|
let eventObject = {
|
||||||
@@ -275,7 +275,7 @@ export class EventsPage implements OnInit {
|
|||||||
let dateToday = date.getFullYear() + "-" + month + "-" + date.getDate();
|
let dateToday = date.getFullYear() + "-" + month + "-" + date.getDate();
|
||||||
// ('dateeeeee', dateToday)
|
// ('dateeeeee', dateToday)
|
||||||
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
|
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
|
||||||
this.storage.get('events').then((events: any[]) => {
|
this.storage.get('events').then((events: any[] = []) => {
|
||||||
//
|
//
|
||||||
let todayEvents = new Array()
|
let todayEvents = new Array()
|
||||||
this.listToPresent = events
|
this.listToPresent = events
|
||||||
@@ -285,7 +285,7 @@ export class EventsPage implements OnInit {
|
|||||||
//
|
//
|
||||||
})
|
})
|
||||||
|
|
||||||
this.storage.get('process').then((process: any[]) => {
|
this.storage.get('process').then((process: any[] = []) => {
|
||||||
//
|
//
|
||||||
const ExpedienteTask = process.map(e => this.expedienteTaskPipe.transform(e))
|
const ExpedienteTask = process.map(e => this.expedienteTaskPipe.transform(e))
|
||||||
this.listToPresentexpediente = ExpedienteTask;
|
this.listToPresentexpediente = ExpedienteTask;
|
||||||
@@ -294,7 +294,7 @@ export class EventsPage implements OnInit {
|
|||||||
this.showLoader = false;
|
this.showLoader = false;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
this.sqliteservice.getAllEvents().then((event: any[]) => {
|
this.sqliteservice.getAllEvents().then((event: any[] = []) => {
|
||||||
let todayEvents = new Array()
|
let todayEvents = new Array()
|
||||||
event.forEach((element) => {
|
event.forEach((element) => {
|
||||||
let eventObject = {
|
let eventObject = {
|
||||||
@@ -332,7 +332,7 @@ export class EventsPage implements OnInit {
|
|||||||
//
|
//
|
||||||
})
|
})
|
||||||
|
|
||||||
this.sqliteservice.getprocessByworkflow("Expediente").then((process: any[]) => {
|
this.sqliteservice.getprocessByworkflow("Expediente").then((process: any[] = []) => {
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
||||||
|
|||||||
@@ -179,7 +179,6 @@ export class DespachosPrPage implements OnInit {
|
|||||||
})
|
})
|
||||||
this.sqliteservice.getprocessByworkflow('Despacho do Presidente da República').then(async (process: any[]) => {
|
this.sqliteservice.getprocessByworkflow('Despacho do Presidente da República').then(async (process: any[]) => {
|
||||||
|
|
||||||
|
|
||||||
let despachosPr;
|
let despachosPr;
|
||||||
|
|
||||||
if(this.loggeduser.Profile != 'PR') {
|
if(this.loggeduser.Profile != 'PR') {
|
||||||
|
|||||||
@@ -75,7 +75,7 @@
|
|||||||
<span>Lista vazia</span>
|
<span>Lista vazia</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div *ngIf="skeletonLoader && listToPresent.length == 0">
|
<div *ngIf="skeletonLoader && (listToPresent.length == null || listToPresent.length == 0)">
|
||||||
|
|
||||||
<ion-list>
|
<ion-list>
|
||||||
<ion-item>
|
<ion-item>
|
||||||
|
|||||||
@@ -27,9 +27,7 @@ export class DespachosPage implements OnInit {
|
|||||||
private platform: Platform,
|
private platform: Platform,
|
||||||
private backgroundservice: BackgroundService,
|
private backgroundservice: BackgroundService,
|
||||||
public ThemeService: ThemeService
|
public ThemeService: ThemeService
|
||||||
) {
|
) {}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
|
||||||
@@ -82,6 +80,7 @@ export class DespachosPage implements OnInit {
|
|||||||
} else {
|
} else {
|
||||||
this.sqliteservice.getprocessByworkflow('Despacho').then((process: any[]) => {
|
this.sqliteservice.getprocessByworkflow('Despacho').then((process: any[]) => {
|
||||||
var listtopresent = [];
|
var listtopresent = [];
|
||||||
|
if(process.forEach) {
|
||||||
process.forEach(element => {
|
process.forEach(element => {
|
||||||
var workflow = JSON.parse(element.workflowInstanceDataFields);
|
var workflow = JSON.parse(element.workflowInstanceDataFields);
|
||||||
let task = {
|
let task = {
|
||||||
@@ -101,8 +100,8 @@ export class DespachosPage implements OnInit {
|
|||||||
listtopresent.push(task);
|
listtopresent.push(task);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
this.listToPresent = listtopresent;
|
this.listToPresent = listtopresent;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -92,7 +92,7 @@
|
|||||||
<div class="height-100" [ngSwitch]="segment">
|
<div class="height-100" [ngSwitch]="segment">
|
||||||
<div *ngSwitchCase="'MDGPR'" class="d-flex height-100 align-center justify-content-center" >
|
<div *ngSwitchCase="'MDGPR'" class="d-flex height-100 align-center justify-content-center" >
|
||||||
<div
|
<div
|
||||||
*ngIf="!skeletonLoader && eventsMDGPRList.length == 0"
|
*ngIf="!skeletonLoader && (!eventsMDGPRList || eventsMDGPRList.length == 0)"
|
||||||
class="empty-list d-flex height-100 align-center justify-content-center"
|
class="empty-list d-flex height-100 align-center justify-content-center"
|
||||||
>
|
>
|
||||||
<span>Lista vazia</span>
|
<span>Lista vazia</span>
|
||||||
@@ -101,7 +101,7 @@
|
|||||||
|
|
||||||
<div *ngSwitchCase="'PR'" class="d-flex height-100 align-center justify-content-center">
|
<div *ngSwitchCase="'PR'" class="d-flex height-100 align-center justify-content-center">
|
||||||
<div
|
<div
|
||||||
*ngIf="!skeletonLoader && eventsPRList.length == 0"
|
*ngIf="!skeletonLoader && (!eventsMDGPRList || eventsMDGPRList.length == 0)"
|
||||||
class="empty-list d-flex height-100 align-center justify-content-center"
|
class="empty-list d-flex height-100 align-center justify-content-center"
|
||||||
>
|
>
|
||||||
<span>Lista vazia</span>
|
<span>Lista vazia</span>
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ export class EventListPage implements OnInit {
|
|||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
this.sqliteservice.getListOfEventAprove('Agenda Oficial PR', 'Agenda Pessoal PR').then((event: any[]) => {
|
this.sqliteservice.getListOfEventAprove('Agenda Oficial PR', 'Agenda Pessoal PR').then((event: any[] = []) => {
|
||||||
this.eventsPRList = this.sortService.sortDate(this.transformaDataDB(event), 'taskStartDate')
|
this.eventsPRList = this.sortService.sortDate(this.transformaDataDB(event), 'taskStartDate')
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -116,7 +116,7 @@ export class EventListPage implements OnInit {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
transformaDataDB(events) {
|
transformaDataDB(events = []) {
|
||||||
let MdEventsArray = [];
|
let MdEventsArray = [];
|
||||||
for (let i of events) {
|
for (let i of events) {
|
||||||
let eventMD = {
|
let eventMD = {
|
||||||
|
|||||||
@@ -35,9 +35,6 @@
|
|||||||
<div [ngSwitch]="segmentVista" class="overflow-y-auto">
|
<div [ngSwitch]="segmentVista" class="overflow-y-auto">
|
||||||
<!-- This is the list view -->
|
<!-- This is the list view -->
|
||||||
<div *ngSwitchCase="'listview'">
|
<div *ngSwitchCase="'listview'">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<ion-item-sliding *ngIf="loadCount">
|
<ion-item-sliding *ngIf="loadCount">
|
||||||
<div class="listview" >
|
<div class="listview" >
|
||||||
<ion-list *ngIf="AllProcess">
|
<ion-list *ngIf="AllProcess">
|
||||||
|
|||||||
@@ -252,6 +252,7 @@ export class GabineteDigitalPage implements OnInit {
|
|||||||
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
|
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
|
||||||
this.storage.get('GabineteProcess').then((allprocess: any[]) => {
|
this.storage.get('GabineteProcess').then((allprocess: any[]) => {
|
||||||
|
|
||||||
|
if(allprocess.forEach) {
|
||||||
allprocess.forEach(element => {
|
allprocess.forEach(element => {
|
||||||
let date = new Date(element.taskStartDate);
|
let date = new Date(element.taskStartDate);
|
||||||
date.setMonth(date.getMonth() + 1);
|
date.setMonth(date.getMonth() + 1);
|
||||||
@@ -279,9 +280,12 @@ export class GabineteDigitalPage implements OnInit {
|
|||||||
this.allProcessesList = this.sortService.sortDate(this.allProcessesList, 'CreateDate')
|
this.allProcessesList = this.sortService.sortDate(this.allProcessesList, 'CreateDate')
|
||||||
|
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
this.sqliteservice.getAllProcess().then((allprocess: any[]) => {
|
this.sqliteservice.getAllProcess().then((allprocess: any[]) => {
|
||||||
|
if(allprocess.forEach) {
|
||||||
allprocess.forEach(element => {
|
allprocess.forEach(element => {
|
||||||
let date = new Date(element.taskStartDate);
|
let date = new Date(element.taskStartDate);
|
||||||
date.setMonth(date.getMonth() + 1);
|
date.setMonth(date.getMonth() + 1);
|
||||||
@@ -311,6 +315,8 @@ export class GabineteDigitalPage implements OnInit {
|
|||||||
this.allProcessesList = this.sortService.sortDate(this.allProcessesList, 'CreateDate')
|
this.allProcessesList = this.sortService.sortDate(this.allProcessesList, 'CreateDate')
|
||||||
|
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -535,7 +541,7 @@ export class GabineteDigitalPage implements OnInit {
|
|||||||
this.showLoader = true
|
this.showLoader = true
|
||||||
|
|
||||||
try {
|
try {
|
||||||
expedientes = await this.processesbackend.GetTaskListExpediente(false).toPromise();
|
expedientes = await this.processesbackend.GetTaskListExpediente(false).toPromise()
|
||||||
this.loadCount = true;
|
this.loadCount = true;
|
||||||
this.showLoader = false;
|
this.showLoader = false;
|
||||||
} catch(error) {
|
} catch(error) {
|
||||||
@@ -543,7 +549,7 @@ export class GabineteDigitalPage implements OnInit {
|
|||||||
this.loadCount = true;
|
this.loadCount = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
expedientes = expedientes.filter(data => data.workflowInstanceDataFields.Status == "Active")
|
expedientes = (expedientes || [] ).filter(data => data.workflowInstanceDataFields.Status == "Active")
|
||||||
|
|
||||||
expedientes = expedientes.filter((item) => {
|
expedientes = expedientes.filter((item) => {
|
||||||
return item.activityInstanceName != 'Retificar Expediente'
|
return item.activityInstanceName != 'Retificar Expediente'
|
||||||
|
|||||||
@@ -42,7 +42,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div *ngIf="SessionStore.hasPin" class="voltar cursor-pointer d-flex align-center justify-center pt-25 clear" (click)="enterWithPasswordButton()" >
|
<div class="voltar cursor-pointer d-flex align-center justify-center pt-25 clear" (click)="enterWithPasswordButton()" >
|
||||||
Entrar com senha
|
Entrar com senha
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ import { RochetChatConnectorService } from 'src/app/services/chat/rochet-chat-co
|
|||||||
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';
|
import { Platform } from '@ionic/angular';
|
||||||
|
import { SqliteService } from 'src/app/services/sqlite.service';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -53,6 +54,7 @@ export class LoginPage implements OnInit {
|
|||||||
public ChatSystemService: ChatSystemService,
|
public ChatSystemService: ChatSystemService,
|
||||||
private ChatService: ChatService,
|
private ChatService: ChatService,
|
||||||
private platform: Platform,
|
private platform: Platform,
|
||||||
|
private sqliteservice: SqliteService,
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
@@ -140,6 +142,7 @@ export class LoginPage implements OnInit {
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
this.sqliteservice.deleteAllTables();
|
||||||
this.RochetChatConnectorService.logout();
|
this.RochetChatConnectorService.logout();
|
||||||
this.clearStoreService.clear();
|
this.clearStoreService.clear();
|
||||||
this.ChatSystemService.clearChat();
|
this.ChatSystemService.clearChat();
|
||||||
|
|||||||
@@ -44,40 +44,7 @@
|
|||||||
<!-- Content -->
|
<!-- Content -->
|
||||||
|
|
||||||
<div *ngIf="!skeletonLoader" class="aside overflow-y-auto d-flex flex-wrap width-100">
|
<div *ngIf="!skeletonLoader" class="aside overflow-y-auto d-flex flex-wrap width-100">
|
||||||
<!-- <ion-list class="width-100"> -->
|
|
||||||
<!-- <ion-item-sliding disabled="{{showSlidingOptions}}" class="width-100"
|
|
||||||
*ngFor="let viagem of publicationsTravelFolderList">
|
|
||||||
<ion-item lines="none"
|
|
||||||
class="item width-100 d-flex ion-no-border ion-no-margin ion-no-padding"
|
|
||||||
[class.item-active]="viagem.ProcessId == idSelected"
|
|
||||||
>
|
|
||||||
<div (click)="goToPublicationsList(viagem.ProcessId)" class="item-icon cursor-pointer">
|
|
||||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="end" src='assets/images/icons-plane-active.svg'></ion-icon>
|
|
||||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && viagem.ProcessId != idSelected " slot="end" src='assets/images/theme/gov/icons-plane-active.svg'></ion-icon>
|
|
||||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && viagem.ProcessId == idSelected " slot="end" src='assets/images/theme/gov/icons-plane-active-hover.svg'></ion-icon>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div (click)="goToPublicationsList(viagem.ProcessId)" class="item-content flex-grow-1 cursor-pointer">
|
|
||||||
<p class="item-content-date my-5" [class.item-content-date-active]="viagem.ProcessId == idSelected">De {{getDate(viagem.DateBegin)}} a {{getDate(viagem.DateEnd)}}</p>
|
|
||||||
<p class="item-content-title my-10" [class.item-content-title-active]="viagem.ProcessId == idSelected">{{viagem.Description}}</p>
|
|
||||||
<p class="item-content-detail my-5" [class.item-content-detail-active]="viagem.ProcessId == idSelected">{{viagem.Detail}}</p>
|
|
||||||
</div>
|
|
||||||
</ion-item>
|
|
||||||
<ion-item-options class="members-options" side="end">
|
|
||||||
<ion-item-option class="edit-option" (click)="editAction(viagem.ProcessId)">
|
|
||||||
<button class="btn-no-color">
|
|
||||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="edit" slot="end" src="assets/images/icons-edit.svg" ></ion-icon>
|
|
||||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="edit" slot="end" src="assets/images/theme/gov/icons-edit.svg" ></ion-icon>
|
|
||||||
|
|
||||||
</button>
|
|
||||||
</ion-item-option>
|
|
||||||
<ion-item-option class="delete-option" (click)="deleteAction(viagem.ProcessId)">
|
|
||||||
<button class="btn-no-color">
|
|
||||||
<ion-icon class="delete" name="trash-sharp"></ion-icon>
|
|
||||||
</button>
|
|
||||||
</ion-item-option>
|
|
||||||
</ion-item-options>
|
|
||||||
</ion-item-sliding> -->
|
|
||||||
<ion-item-sliding disabled="{{showSlidingOptions}}" class="width-100"
|
<ion-item-sliding disabled="{{showSlidingOptions}}" class="width-100"
|
||||||
*ngFor="let evento of publicationsEventFolderList">
|
*ngFor="let evento of publicationsEventFolderList">
|
||||||
<ion-item lines="none"
|
<ion-item lines="none"
|
||||||
@@ -116,7 +83,7 @@
|
|||||||
</ion-item-sliding>
|
</ion-item-sliding>
|
||||||
</div>
|
</div>
|
||||||
<!-- Sart Skeleton -->
|
<!-- Sart Skeleton -->
|
||||||
<div *ngIf="showLoader">
|
<div *ngIf="showLoader && publicationsEventFolderList.length == 0">
|
||||||
<ion-item-sliding disabled="{{showSlidingOptions}}" class="width-100">
|
<ion-item-sliding disabled="{{showSlidingOptions}}" class="width-100">
|
||||||
<ion-item lines="none"
|
<ion-item lines="none"
|
||||||
class="item width-100 d-flex ion-no-border ion-no-margin ion-no-padding">
|
class="item width-100 d-flex ion-no-border ion-no-margin ion-no-padding">
|
||||||
|
|||||||
@@ -28,9 +28,9 @@ export class PublicationsPage implements OnInit {
|
|||||||
publicationFolder: PublicationFolder;
|
publicationFolder: PublicationFolder;
|
||||||
publication: Publication;
|
publication: Publication;
|
||||||
|
|
||||||
publicationsEventFolderList: PublicationFolder[];
|
publicationsEventFolderList: PublicationFolder[] = [];
|
||||||
actionsListStorage: PublicationFolder[] = new Array();
|
actionsListStorage: PublicationFolder[] = new Array();
|
||||||
publicationsTravelFolderList: PublicationFolder[];
|
publicationsTravelFolderList: PublicationFolder[] = [];
|
||||||
|
|
||||||
theDate: any;
|
theDate: any;
|
||||||
theEndDate: any;
|
theEndDate: any;
|
||||||
@@ -91,10 +91,6 @@ export class PublicationsPage implements OnInit {
|
|||||||
});
|
});
|
||||||
this.hideRefreshButton();
|
this.hideRefreshButton();
|
||||||
|
|
||||||
/* this.backgroundservice.registerBackService('Online', () => {
|
|
||||||
this.getActions();
|
|
||||||
}) */
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -142,7 +138,11 @@ export class PublicationsPage implements OnInit {
|
|||||||
return this.theDate.getDate() + " de " + (this.months[this.theDate.getMonth()]) + " de " + this.theDate.getFullYear()
|
return this.theDate.getDate() + " de " + (this.months[this.theDate.getMonth()]) + " de " + this.theDate.getFullYear()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
loadList = false
|
||||||
|
|
||||||
getActions() {
|
getActions() {
|
||||||
|
if(this.loadList == false) {
|
||||||
|
this.loadList = true
|
||||||
this.showLoader = true;
|
this.showLoader = true;
|
||||||
this.skeletonLoader = true;
|
this.skeletonLoader = true;
|
||||||
this.getFromDB()
|
this.getFromDB()
|
||||||
@@ -186,11 +186,19 @@ export class PublicationsPage implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.showLoader = false;
|
this.showLoader = false;
|
||||||
|
|
||||||
}/* , (error) => {
|
|
||||||
this.getFromDB();
|
|
||||||
} */);
|
|
||||||
this.skeletonLoader = false;
|
this.skeletonLoader = false;
|
||||||
|
this.loadList = false
|
||||||
|
|
||||||
|
}, (error) => {
|
||||||
|
// this.getFromDB();
|
||||||
|
this.showLoader = false;
|
||||||
|
this.skeletonLoader = false;
|
||||||
|
this.loadList = false
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
addActionToStorage(events, viagens) {
|
addActionToStorage(events, viagens) {
|
||||||
@@ -253,7 +261,7 @@ export class PublicationsPage implements OnInit {
|
|||||||
|
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.sqliteservice.getAllActions().then((actions: any[]) => {
|
this.sqliteservice.getAllActions().then((actions: any[] = []) => {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -67,6 +67,7 @@ export class EventListPage implements OnInit {
|
|||||||
async LoadToApproveEvents() {
|
async LoadToApproveEvents() {
|
||||||
this.showLoader = true;
|
this.showLoader = true;
|
||||||
|
|
||||||
|
try {
|
||||||
if(this.segment == 'MDGPR') {
|
if(this.segment == 'MDGPR') {
|
||||||
let mdEventsOficial = await this.processes.GetTasksList('Agenda Oficial MDGPR', false).toPromise();
|
let mdEventsOficial = await this.processes.GetTasksList('Agenda Oficial MDGPR', false).toPromise();
|
||||||
let mdEventsPessoal = await this.processes.GetTasksList('Agenda Pessoal MDGPR', false).toPromise();
|
let mdEventsPessoal = await this.processes.GetTasksList('Agenda Pessoal MDGPR', false).toPromise();
|
||||||
@@ -88,6 +89,12 @@ export class EventListPage implements OnInit {
|
|||||||
this.showLoader = false;
|
this.showLoader = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} catch(erro) {
|
||||||
|
this.showLoader = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async openApproveModal(eventSerialNumber, data) {
|
async openApproveModal(eventSerialNumber, data) {
|
||||||
|
|||||||
@@ -64,9 +64,9 @@
|
|||||||
<span>Lista vazia</span>
|
<span>Lista vazia</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div *ngIf="skeletonLoader && taskslist.length == 0">
|
<div *ngIf="skeletonLoader && !taskslist">
|
||||||
|
|
||||||
<ion-list>
|
<ion-list *ngIf="skeletonLoader && taskslist.length == null">
|
||||||
<ion-item>
|
<ion-item>
|
||||||
<ion-thumbnail slot="end">
|
<ion-thumbnail slot="end">
|
||||||
<ion-skeleton-text animated></ion-skeleton-text>
|
<ion-skeleton-text animated></ion-skeleton-text>
|
||||||
|
|||||||
@@ -64,9 +64,8 @@
|
|||||||
<span>Lista vazia</span>
|
<span>Lista vazia</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div *ngIf="skeletonLoader && taskslist.length == 0">
|
<div *ngIf="skeletonLoader && taskslist">
|
||||||
|
<ion-list *ngIf="taskslist.length == 0">
|
||||||
<ion-list>
|
|
||||||
<ion-item>
|
<ion-item>
|
||||||
<ion-thumbnail slot="end">
|
<ion-thumbnail slot="end">
|
||||||
<ion-skeleton-text animated></ion-skeleton-text>
|
<ion-skeleton-text animated></ion-skeleton-text>
|
||||||
|
|||||||
Reference in New Issue
Block a user