mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
Merge branch 'developer' of https://bitbucket.org/equilibriumito/gabinete-digital into developer
This commit is contained in:
Generated
+13
@@ -2180,6 +2180,11 @@
|
||||
"tslib": "^2.1.0"
|
||||
}
|
||||
},
|
||||
"@capacitor/device": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@capacitor/device/-/device-1.1.0.tgz",
|
||||
"integrity": "sha512-HCFwOxmK7igEgNm20y+zYi+XQ0OlZYnE4oCaI82TGmA7sehlDpBBKbjmI2Bd8aM09+BXFbAAtq7JCxkEfY8nIg=="
|
||||
},
|
||||
"@capacitor/filesystem": {
|
||||
"version": "1.0.6",
|
||||
"resolved": "https://registry.npmjs.org/@capacitor/filesystem/-/filesystem-1.0.6.tgz",
|
||||
@@ -16288,6 +16293,14 @@
|
||||
"tslib": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"ngx-image-compress": {
|
||||
"version": "11.0.3",
|
||||
"resolved": "https://registry.npmjs.org/ngx-image-compress/-/ngx-image-compress-11.0.3.tgz",
|
||||
"integrity": "sha512-F1+93cBosm9bNEUmuQM3LvfBg9lzhEITfh8tEhqYb5+OH1HYsjW/nZLQGu5rDS4YCDEA8TQKwmYrrsYjR1t/WA==",
|
||||
"requires": {
|
||||
"tslib": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"ngx-image-cropper": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/ngx-image-cropper/-/ngx-image-cropper-5.0.1.tgz",
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
"@capacitor/browser": "1.0.6",
|
||||
"@capacitor/camera": "^1.2.0",
|
||||
"@capacitor/core": "^3.3.0",
|
||||
"@capacitor/device": "^1.1.0",
|
||||
"@capacitor/filesystem": "^1.0.6",
|
||||
"@capacitor/haptics": "^1.1.2",
|
||||
"@capacitor/ios": "3.3.0",
|
||||
@@ -125,6 +126,7 @@
|
||||
"ng-lazyload-image": "^9.1.0",
|
||||
"ng2-pdf-viewer": "^7.0.1",
|
||||
"ngx-cookie-service": "^12.0.3",
|
||||
"ngx-image-compress": "^11.0.3",
|
||||
"ngx-image-cropper": "^5.0.1",
|
||||
"ngx-socket-io": "^3.2.0",
|
||||
"pdfjs": "^2.4.6",
|
||||
|
||||
@@ -253,10 +253,7 @@ export class DespachoService {
|
||||
|
||||
});
|
||||
|
||||
console.log(despachoList);
|
||||
|
||||
|
||||
despachoList = this.sortService.sortArrayISODate(despachoList).reverse();
|
||||
despachoList = this.sortService.sortDate(despachoList, 'CreateDate')
|
||||
|
||||
if(updateStore) {
|
||||
this.despachoStore.reset(despachoList);
|
||||
|
||||
@@ -11,8 +11,12 @@ import { NGX_MAT_DATE_FORMATS } from '@angular-material-components/datetime-pick
|
||||
import { SqliteService } from 'src/app/services/sqlite.service';
|
||||
import { BackgroundService } from 'src/app/services/background.service';
|
||||
import { ScreenOrientation } from '@ionic-native/screen-orientation/ngx';
|
||||
<<<<<<< HEAD
|
||||
import { Directory, Filesystem } from '@capacitor/filesystem';
|
||||
|
||||
=======
|
||||
import { StorageService } from 'src/app/services/storage.service';
|
||||
>>>>>>> 6a912b740d97159664c5fe5dff07ac378b028771
|
||||
|
||||
|
||||
const CUSTOM_DATE_FORMATS: NgxMatDateFormats = {
|
||||
@@ -44,7 +48,11 @@ export class AppComponent {
|
||||
private screenOrientation: ScreenOrientation,
|
||||
private sqliteservice: SqliteService,
|
||||
private backgroundservice: BackgroundService,
|
||||
<<<<<<< HEAD
|
||||
|
||||
=======
|
||||
private storageservice: StorageService
|
||||
>>>>>>> 6a912b740d97159664c5fe5dff07ac378b028771
|
||||
) {
|
||||
this.createCacheFolder()
|
||||
this.initializeApp();
|
||||
@@ -79,17 +87,15 @@ export class AppComponent {
|
||||
}
|
||||
}
|
||||
|
||||
window.addEventListener('online', () => {
|
||||
console.log('Became online')
|
||||
this.backgroundservice.online()
|
||||
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
|
||||
this.storageservice.get('networkCheckStore').then((network) => {
|
||||
if(network === 'online') {
|
||||
console.log('Network app componente check', network)
|
||||
this.backgroundservice.online()
|
||||
} else {
|
||||
console.log('Network app componente check', network)
|
||||
this.backgroundservice.offline();
|
||||
}
|
||||
});
|
||||
window.addEventListener('offline', () => {
|
||||
console.log('Became offline')
|
||||
this.backgroundservice.offline()
|
||||
});
|
||||
})
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
@@ -65,10 +65,14 @@ import { MediaCapture } from '@ionic-native/media-capture/ngx';
|
||||
import { Media } from '@ionic-native/media/ngx';
|
||||
import { StreamingMedia } from '@ionic-native/streaming-media/ngx';
|
||||
import { PhotoViewer } from '@ionic-native/photo-viewer/ngx';
|
||||
<<<<<<< HEAD
|
||||
import { CustomImageCachePageRoutingModule } from './services/file/custom-image-cache/custom-image-cache-routing.module';
|
||||
|
||||
|
||||
|
||||
=======
|
||||
import {NgxImageCompressService} from 'ngx-image-compress';
|
||||
>>>>>>> 6a912b740d97159664c5fe5dff07ac378b028771
|
||||
|
||||
/* import { FCM } from '@ionic-native/fcm/ngx';
|
||||
import { FirebaseX } from '@ionic-native/firebase-x/ngx'; */
|
||||
@@ -140,7 +144,8 @@ import { FirebaseX } from '@ionic-native/firebase-x/ngx'; */
|
||||
MediaCapture,
|
||||
Media,
|
||||
StreamingMedia,
|
||||
PhotoViewer
|
||||
PhotoViewer,
|
||||
NgxImageCompressService
|
||||
],
|
||||
bootstrap: [AppComponent],
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<ion-tab-button tab="events">
|
||||
<!-- <ion-icon name="home"></ion-icon> -->
|
||||
<ion-icon class="nav-icon" src="assets/images/icons-nav-home.svg"></ion-icon>
|
||||
<ion-badge color="danger">{{toDayEventStorage.eventsList.length + expedienteGdStore.count}}</ion-badge>
|
||||
<!-- <ion-badge color="danger">{{toDayEventStorage.eventsList.length + expedienteGdStore.count}}</ion-badge> -->
|
||||
<ion-label>Início</ion-label>
|
||||
</ion-tab-button>
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
<ion-tab-button (click)="goto('/home/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" *ngIf="!p.userRole(['PR'])" >{{ documentCounterService.mdTotalDocument }}</ion-badge>
|
||||
<ion-badge color="danger" *ngIf="p.userRole(['PR'])" >{{ documentCounterService.prTotalDocument }}</ion-badge>
|
||||
<!-- <ion-badge color="danger" *ngIf="!p.userRole(['PR'])" >{{ documentCounterService.mdTotalDocument }}</ion-badge>
|
||||
<ion-badge color="danger" *ngIf="p.userRole(['PR'])" >{{ documentCounterService.prTotalDocument }}</ion-badge> -->
|
||||
<ion-label>Gabinete</ion-label>
|
||||
</ion-tab-button>
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* eslint-disable */
|
||||
/* tslint:disable */
|
||||
import { Component, OnInit, NgZone } from '@angular/core';
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Event } from '../models/event.model';
|
||||
import { NotificationsService } from '../services/notifications.service';
|
||||
/*import { WebNotificationsService } from '../services/webnotifications.service'; */
|
||||
@@ -25,6 +25,7 @@ import { EventsService } from 'src/app/services/events.service';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { ScreenOrientation } from '@ionic-native/screen-orientation/ngx';
|
||||
import { SqliteService } from 'src/app/services/sqlite.service';
|
||||
import { Device } from '@capacitor/device';
|
||||
|
||||
@Component({
|
||||
selector: 'app-home',
|
||||
@@ -68,7 +69,6 @@ export class HomePage implements OnInit {
|
||||
status: string = "";
|
||||
audioName: string = "";
|
||||
constructor(
|
||||
private zone: NgZone,
|
||||
private router: Router,
|
||||
public modalCtrl: AlertController,
|
||||
private notificationsService: NotificationsService,
|
||||
@@ -93,13 +93,18 @@ export class HomePage implements OnInit {
|
||||
|
||||
this.router.events.subscribe((val) => {
|
||||
document.querySelectorAll('ion-modal').forEach((e: any) => e.remove())
|
||||
document.querySelectorAll('popover-viewport').forEach((e: any) => e.remove())
|
||||
});
|
||||
|
||||
window['platform'] = platform
|
||||
|
||||
window['inactivity/function'] = () => {
|
||||
|
||||
if (window.location.pathname != '/inactivity') {
|
||||
|
||||
document.querySelectorAll('ion-modal').forEach((e: any) => e.remove())
|
||||
document.querySelectorAll('.popover-viewport').forEach((e: any) => e.remove())
|
||||
|
||||
const pathname = window.location.pathname
|
||||
SessionStore.setUrlBeforeInactivity(pathname)
|
||||
this.router.navigate(['/inactivity']);
|
||||
@@ -107,6 +112,7 @@ export class HomePage implements OnInit {
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
goto(url) {
|
||||
@@ -117,6 +123,8 @@ export class HomePage implements OnInit {
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
this.logDeviceInfo();
|
||||
|
||||
this.notificationsService.onReciveForeground();
|
||||
this.notificationsService.onReciveBackground();
|
||||
|
||||
@@ -144,6 +152,12 @@ export class HomePage implements OnInit {
|
||||
myWorker.postMessage('ali'); */
|
||||
}
|
||||
|
||||
logDeviceInfo = async () => {
|
||||
const info = await Device.getInfo();
|
||||
|
||||
console.log('Device info',info);
|
||||
};
|
||||
|
||||
updateList() {
|
||||
|
||||
/* this.notificationsService.registerCallback(
|
||||
|
||||
@@ -72,9 +72,9 @@
|
||||
<img style="width: 40px;" src="assets/images/logo-removebg-preview.png"/>
|
||||
</div>
|
||||
|
||||
<div hidden class="btn-close d-flex cursor-pointer pr-10" (click)="changeTheme('tribunal')" >
|
||||
<!-- <div hidden class="btn-close d-flex cursor-pointer pr-10" (click)="changeTheme('tribunal')" >
|
||||
<img style="width: 40px;" src="assets/images/theme/tribunal/tribunal-constitucional-logo.png"/>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -10,6 +10,7 @@ import { NotificationsService } from '../../services/notifications.service';
|
||||
import { SessionStore } from 'src/app/store/session.service';
|
||||
import { EventTrigger } from '../../services/eventTrigger.service';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { SortService } from 'src/app/services/functions/sort.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-profile',
|
||||
@@ -41,7 +42,8 @@ export class ProfilePage implements OnInit {
|
||||
private notificationservice: NotificationsService,
|
||||
private platform: Platform,
|
||||
private eventtrigger: EventTrigger,
|
||||
public ThemeService: ThemeService
|
||||
public ThemeService: ThemeService,
|
||||
private sortService: SortService,
|
||||
) {
|
||||
|
||||
this.loggeduser = authService.ValidatedUser;
|
||||
|
||||
@@ -161,6 +161,7 @@ export class AgendaPage implements OnInit {
|
||||
dropdownScrollWeal = false
|
||||
CalendarStore = CalendarStore
|
||||
listToPresent
|
||||
array = []
|
||||
|
||||
constructor(
|
||||
private alertCtrl: AlertController,
|
||||
@@ -232,6 +233,8 @@ export class AgendaPage implements OnInit {
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
this.getFromDB();
|
||||
|
||||
const pathname = window.location.pathname
|
||||
let realoadCounter = 0
|
||||
this.router.events.forEach((event) => {
|
||||
@@ -240,14 +243,14 @@ export class AgendaPage implements OnInit {
|
||||
this.segment = "Combinado";
|
||||
}
|
||||
if (realoadCounter != 0) {
|
||||
this.loadRangeEvents(this.rangeStartDate, this.rangeEndDate);
|
||||
//this.loadRangeEvents(this.rangeStartDate, this.rangeEndDate);
|
||||
}
|
||||
realoadCounter++;
|
||||
}
|
||||
});
|
||||
|
||||
this.backgroundservice.registerBackService('Online', () => {
|
||||
this.loadRangeEvents(this.rangeStartDate, this.rangeEndDate);
|
||||
//this.loadRangeEvents(this.rangeStartDate, this.rangeEndDate);
|
||||
});
|
||||
|
||||
window.onresize = (event) => {
|
||||
@@ -487,6 +490,7 @@ export class AgendaPage implements OnInit {
|
||||
}
|
||||
|
||||
loadRangeEvents(startTime: Date, endTime: Date) {
|
||||
this.array = [];
|
||||
|
||||
this.rangeStartDate = startTime
|
||||
this.rangeEndDate = endTime
|
||||
@@ -514,6 +518,7 @@ export class AgendaPage implements OnInit {
|
||||
|
||||
this.TimelineMDList = this.listBoxService.list(this.listToPresent, 'md', this.rangeStartDate, this.rangeEndDate, { segment: this.segment, selectedDate: this.eventSelectedDate })
|
||||
|
||||
console.log('check list to present data', this.listToPresent);
|
||||
this.myCal.update();
|
||||
this.myCal.loadEvents();
|
||||
|
||||
@@ -540,13 +545,17 @@ export class AgendaPage implements OnInit {
|
||||
|
||||
this.TimelineMDList = this.listBoxService.list(this.listToPresent, 'pr', this.rangeStartDate, this.rangeEndDate, { segment: this.segment, selectedDate: this.eventSelectedDate })
|
||||
|
||||
console.log('check list to present data', this.listToPresent);
|
||||
this.myCal.update();
|
||||
this.myCal.loadEvents();
|
||||
|
||||
this.showLoader = false;
|
||||
this.showTimeline = true;
|
||||
|
||||
}).finally(() => {
|
||||
}).catch((error) => {
|
||||
this.getFromDB()
|
||||
})
|
||||
.finally(() => {
|
||||
this.showLoader = false;
|
||||
})
|
||||
|
||||
@@ -567,6 +576,7 @@ export class AgendaPage implements OnInit {
|
||||
|
||||
this.TimelineMDList = this.listBoxService.list(this.listToPresent, 'pr', this.rangeStartDate, this.rangeEndDate, { segment: this.segment, selectedDate: this.eventSelectedDate })
|
||||
|
||||
console.log('check list to present data', this.listToPresent);
|
||||
|
||||
this.myCal.update();
|
||||
this.myCal.loadEvents();
|
||||
@@ -603,6 +613,7 @@ export class AgendaPage implements OnInit {
|
||||
|
||||
this.TimelineMDList = this.listBoxService.list(this.listToPresent, 'md', this.rangeStartDate, this.rangeEndDate, { segment: this.segment, selectedDate: this.eventSelectedDate })
|
||||
|
||||
console.log('check list to present data', this.listToPresent);
|
||||
this.myCal.update();
|
||||
this.myCal.loadEvents();
|
||||
|
||||
@@ -614,7 +625,10 @@ export class AgendaPage implements OnInit {
|
||||
}
|
||||
|
||||
|
||||
}).finally(() => {
|
||||
}).catch((error) => {
|
||||
this.getFromDB()
|
||||
})
|
||||
.finally(() => {
|
||||
counter++;
|
||||
if (counter == 2) {
|
||||
this.showLoader = false;
|
||||
@@ -633,6 +647,8 @@ export class AgendaPage implements OnInit {
|
||||
|
||||
this.TimelinePRList = this.listBoxService.list(this.listToPresent, 'pr', this.rangeStartDate, this.rangeEndDate, { segment: this.segment, selectedDate: this.eventSelectedDate })
|
||||
|
||||
console.log('check list to present data', this.listToPresent);
|
||||
|
||||
this.myCal.update();
|
||||
this.myCal.loadEvents();
|
||||
|
||||
@@ -644,7 +660,10 @@ export class AgendaPage implements OnInit {
|
||||
this.showLoader = false;
|
||||
}
|
||||
|
||||
}).finally(() => {
|
||||
}).catch((error) => {
|
||||
this.getFromDB()
|
||||
})
|
||||
.finally(() => {
|
||||
counter++;
|
||||
if (counter == 2) {
|
||||
this.showLoader = false;
|
||||
@@ -674,6 +693,7 @@ export class AgendaPage implements OnInit {
|
||||
this.TimelinePRList = this.listBoxService.list(this.listToPresent, 'pr', this.rangeStartDate, this.rangeEndDate, { segment: this.segment, selectedDate: this.eventSelectedDate })
|
||||
|
||||
|
||||
console.log('check list to present data', this.listToPresent);
|
||||
this.myCal.update();
|
||||
this.myCal.loadEvents();
|
||||
|
||||
@@ -685,7 +705,10 @@ export class AgendaPage implements OnInit {
|
||||
this.showLoader = false;
|
||||
}
|
||||
|
||||
}).finally(() => {
|
||||
}).catch((error) => {
|
||||
this.getFromDB()
|
||||
})
|
||||
.finally(() => {
|
||||
if (counter == 1 || this.loggeduser.Profile == 'PR') {
|
||||
this.showLoader = false;
|
||||
}
|
||||
@@ -697,7 +720,6 @@ export class AgendaPage implements OnInit {
|
||||
}
|
||||
|
||||
trasnformData(response,profile) {
|
||||
let array = []
|
||||
response.forEach(element => {
|
||||
let event = {
|
||||
startTime: new Date(element.StartDate),
|
||||
@@ -708,10 +730,9 @@ export class AgendaPage implements OnInit {
|
||||
profile: profile,
|
||||
id: element.EventId,
|
||||
}
|
||||
array.push(event)
|
||||
this.array.push(event)
|
||||
});
|
||||
|
||||
this.listToPresent = array;
|
||||
this.listToPresent = this.array;
|
||||
console.log('LIST TO PRESET', this.listToPresent)
|
||||
}
|
||||
|
||||
@@ -992,7 +1013,6 @@ export class AgendaPage implements OnInit {
|
||||
this.postEvent = data.event;
|
||||
|
||||
this.mobileComponent.showEditEvent = true;
|
||||
|
||||
}
|
||||
|
||||
this.loadRangeEvents(this.rangeStartDate, this.rangeEndDate);
|
||||
@@ -1147,7 +1167,7 @@ export class AgendaPage implements OnInit {
|
||||
async closeComponentEditEventOrAdd() {
|
||||
|
||||
if (this.IsEvent = 'edit') {
|
||||
// this.loadRangeEvents(this.rangeStartDate, this.rangeEndDate);
|
||||
this.loadRangeEvents(this.rangeStartDate, this.rangeEndDate);
|
||||
this.eventClicked(this.viewingEventObject);
|
||||
} else if (this.IsEvent = 'add') {
|
||||
this.cloneAllmobileComponent();
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<ion-header class="ion-no-border ">
|
||||
<ion-header class="ion-no-border">
|
||||
<app-header></app-header>
|
||||
</ion-header>
|
||||
|
||||
<ion-header class="ion-no-border text-white">
|
||||
<ion-header class="ion-no-border init-event-header">
|
||||
<ion-label>
|
||||
<p class="time ion-text-center">{{customDate}}</p>
|
||||
</ion-label>
|
||||
|
||||
@@ -275,6 +275,7 @@ ion-toolbar{
|
||||
// new
|
||||
.main{
|
||||
padding: 0px em(20px);
|
||||
background: linear-gradient(270deg, var(--color2) 100%, var(--color3) 100%, var(--color4) 100%, var(--color5) 100%) !important;
|
||||
}
|
||||
|
||||
.event-number{
|
||||
@@ -402,8 +403,8 @@ ion-toolbar{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
background-color: transparent !important;
|
||||
--background: transparent !important;
|
||||
background-color: transparent;
|
||||
--background: transparent;
|
||||
.schedule-time{
|
||||
margin-right: 10px;
|
||||
.time-start{
|
||||
|
||||
@@ -448,6 +448,7 @@ export class DespachoPrPage implements OnInit {
|
||||
else if (actionName == 'Reexecução') {
|
||||
await this.reexecutar(res.data.note, docs);
|
||||
}
|
||||
|
||||
this.goBack();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -157,8 +157,9 @@ export class DespachosPrPage implements OnInit {
|
||||
}
|
||||
|
||||
this.despachoList.push(task);
|
||||
console.log(this.despachoList);
|
||||
});
|
||||
|
||||
this.despachoList = this.sortService.sortDate(this.despachoList, 'CreateDate')
|
||||
this.listToPresent = this.despachoList
|
||||
|
||||
}, (error) => {
|
||||
|
||||
@@ -80,13 +80,14 @@ export class DiplomasAssinarPage implements OnInit {
|
||||
let diplomas = await this.processes.GetTasksList("Despacho do Presidente da República", false).toPromise();
|
||||
this.diplomasList = [];
|
||||
|
||||
let diplomasAssinar = diplomas.reverse().filter(data => data.activityInstanceName == "Assinar Diploma");
|
||||
diplomasAssinar = this.sortService.sortArrayISODate(diplomasAssinar);
|
||||
let diplomasAssinar = diplomas.filter(data => data.activityInstanceName == "Assinar Diploma");
|
||||
diplomasAssinar.forEach(element => {
|
||||
let task: customTask = this.customTaskPipe.transform(element)
|
||||
this.diplomasList.push(task);
|
||||
});
|
||||
|
||||
this.diplomasList = this.sortService.sortDate(this.diplomasList, 'CreateDate')
|
||||
|
||||
|
||||
this.skeletonLoader = false
|
||||
this.showLoader = false;
|
||||
|
||||
@@ -16,10 +16,10 @@
|
||||
<ion-toolbar>
|
||||
<ion-segment [(ngModel)]="segment" (ionChange)="segmentChanged($event)">
|
||||
<ion-segment-button value="validar">
|
||||
Por validar
|
||||
Por validar ...
|
||||
</ion-segment-button>
|
||||
<ion-segment-button value="assinados">
|
||||
Assinados PR
|
||||
Assinados PR ...
|
||||
</ion-segment-button>
|
||||
</ion-segment>
|
||||
</ion-toolbar>
|
||||
|
||||
@@ -182,7 +182,6 @@ export class DiplomasPage implements OnInit, OnDestroy {
|
||||
this.skeletonLoader = false
|
||||
this.showLoader = false;
|
||||
|
||||
|
||||
let diplomasValidar = diplomas.filter(data => data.activityInstanceName == "Revisar Diploma");
|
||||
let diplomasList = [];
|
||||
diplomasValidar.forEach(async element => {
|
||||
@@ -191,18 +190,19 @@ export class DiplomasPage implements OnInit, OnDestroy {
|
||||
diplomasList.push(task);
|
||||
|
||||
});
|
||||
this.diplomasList = this.sortService.sortArrayISODate(diplomasList.reverse());
|
||||
|
||||
this.diplomasList = this.sortService.sortDate(diplomasList, 'CreateDate');
|
||||
|
||||
let diplomasAssinados = diplomas.filter(data => data.activityInstanceName == "Diploma Assinado");
|
||||
let diplomasAssinadoList = [];
|
||||
|
||||
let diplomasAssinados = diplomas.reverse().filter(data => data.activityInstanceName == "Diploma Assinado");
|
||||
let diplomasAssinadoList = []
|
||||
diplomasAssinados.forEach(async element => {
|
||||
|
||||
let task = this.pipeTask(element);
|
||||
diplomasAssinadoList.push(task);
|
||||
});
|
||||
console.log('diplomasAssinados', diplomasAssinados)
|
||||
this.diplomasAssinadoList = this.sortService.sortArrayISODate(diplomasAssinadoList).reverse();
|
||||
|
||||
this.diplomasAssinadoList = this.sortService.sortDate(diplomasAssinadoList, 'CreateDate')
|
||||
|
||||
}, (error) => {
|
||||
this.getFromDb()
|
||||
@@ -220,21 +220,21 @@ export class DiplomasPage implements OnInit, OnDestroy {
|
||||
|
||||
let task = this.pipeTaskOffline(element)
|
||||
diplomasList.push(task);
|
||||
});
|
||||
|
||||
});
|
||||
console.log(diplomasList);
|
||||
console.log(diplomasList);
|
||||
this.diplomasList = this.sortService.sortDate(diplomasList, 'taskStartDate');
|
||||
|
||||
this.diplomasList = this.sortService.sortArrayISODate(diplomasList).reverse();
|
||||
|
||||
let diplomasAssinados = process.reverse().filter(data => data.activityInstanceName == "Diploma Assinado");
|
||||
let diplomasAssinados = process.filter(data => data.activityInstanceName == "Diploma Assinado");
|
||||
let diplomasAssinadoList = []
|
||||
diplomasAssinados.forEach(async element => {
|
||||
|
||||
let task = this.pipeTaskOffline(element)
|
||||
diplomasAssinadoList.push(task);
|
||||
});
|
||||
console.log('diplomasAssinados', diplomasAssinados)
|
||||
this.diplomasAssinadoList = this.sortService.sortArrayISODate(diplomasAssinadoList).reverse();
|
||||
let task = this.pipeTaskOffline(element)
|
||||
diplomasAssinadoList.push(task);
|
||||
});
|
||||
|
||||
console.log('diplomasAssinados', diplomasAssinados)
|
||||
this.diplomasAssinadoList = this.sortService.sortDate(diplomasAssinadoList, 'taskStartDate')
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
@@ -84,14 +84,13 @@ export class EventListPage implements OnInit {
|
||||
this.platform.ready().then(() => {
|
||||
|
||||
this.sqliteservice.getListOfEventAprove('Agenda Oficial MDGPR', 'Agenda Pessoal MDGPR').then((event: any[]) => {
|
||||
this.eventsMDGPRList = this.sortService.sortArrayByDate(event).reverse()
|
||||
this.eventsMDGPRList = this.sortService.sortDate(event, 'taskStartDate')
|
||||
|
||||
console.log("All evento to aprove from db ", event)
|
||||
})
|
||||
|
||||
this.sqliteservice.getListOfEventAprove('Agenda Oficial PR', 'Agenda Pessoal PR').then((event: any[]) => {
|
||||
this.eventsPRList = this.sortService.sortArrayByDate(event).reverse()
|
||||
console.log("All evento to aprove from db ", event)
|
||||
this.eventsPRList = this.sortService.sortDate(event, 'taskStartDate')
|
||||
|
||||
})
|
||||
})
|
||||
console.log('Offlineee')
|
||||
@@ -111,14 +110,14 @@ export class EventListPage implements OnInit {
|
||||
let mdEventsOficial = await this.processes.GetTasksList('Agenda Oficial MDGPR', false).toPromise();
|
||||
let mdEventsPessoal = await this.processes.GetTasksList('Agenda Pessoal MDGPR', false).toPromise();
|
||||
this.eventsMDGPRList = mdEventsOficial.concat(mdEventsPessoal);
|
||||
this.eventsMDGPRList = this.sortService.sortArrayByDate(this.eventsMDGPRList).reverse()
|
||||
this.eventsMDGPRList = this.sortService.sortDate(this.eventsMDGPRList, 'taskStartDate')
|
||||
this.eventaprovacaostore.resetmd(this.sortService.sortArrayByDate(this.eventsMDGPRList).reverse());
|
||||
}
|
||||
else if (this.segment == 'PR') {
|
||||
let prEventsOficial = await this.processes.GetTasksList('Agenda Oficial PR', false).toPromise();
|
||||
let prEventsPessoal = await this.processes.GetTasksList('Agenda Pessoal PR', false).toPromise();
|
||||
this.eventsPRList = prEventsOficial.concat(prEventsPessoal);
|
||||
this.eventsPRList = this.sortService.sortArrayByDate(this.eventsPRList).reverse();
|
||||
this.eventsPRList = this.sortService.sortDate(this.eventsPRList, 'taskStartDate')
|
||||
this.eventaprovacaostore.resetpr(this.sortService.sortArrayByDate(this.eventsPRList).reverse());
|
||||
}
|
||||
this.showLoader = false;
|
||||
|
||||
@@ -8,7 +8,7 @@ import { SqliteService } from 'src/app/services/sqlite.service';
|
||||
import { Platform } from '@ionic/angular';
|
||||
import { BackgroundService } from '../../../services/background.service';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
|
||||
import { SortService } from 'src/app/services/functions/sort.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-expediente',
|
||||
@@ -38,7 +38,8 @@ export class ExpedientePage implements OnInit {
|
||||
public platform: Platform,
|
||||
private sqliteservice: SqliteService,
|
||||
private backgroundservice: BackgroundService,
|
||||
public ThemeService: ThemeService
|
||||
public ThemeService: ThemeService,
|
||||
private sortService: SortService,
|
||||
) { }
|
||||
|
||||
ngOnInit() {
|
||||
@@ -70,7 +71,7 @@ export class ExpedientePage implements OnInit {
|
||||
const result = res
|
||||
|
||||
this.taskslist = new Array();
|
||||
let ress = result.reverse().filter((data: any) => data.workflowInstanceDataFields.Status == "Active");
|
||||
let ress = result.filter((data: any) => data.workflowInstanceDataFields.Status == "Active");
|
||||
|
||||
ress.forEach((element: any) => {
|
||||
|
||||
@@ -78,7 +79,7 @@ export class ExpedientePage implements OnInit {
|
||||
this.taskslist.push(task);
|
||||
this.addProcessTODb(task);
|
||||
});
|
||||
this.listToPresent = this.taskslist
|
||||
this.listToPresent = this.sortService.sortDate(this.taskslist, 'taskStartDate')
|
||||
console.log('expediente list', this.listToPresent)
|
||||
|
||||
this.skeletonLoader = false;
|
||||
|
||||
@@ -12,7 +12,7 @@ import { Location } from '@angular/common'
|
||||
import { ExpedienteGdStore } from 'src/app/store/expedientegd-store.service';
|
||||
import { ExpedienteTaskPipe } from 'src/app/pipes/expediente-task.pipe';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
|
||||
import { SortService } from 'src/app/services/functions/sort.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-expedientes-pr',
|
||||
@@ -41,7 +41,8 @@ export class ExpedientesPrPage implements OnInit {
|
||||
private authService: AuthService,
|
||||
private router: Router,
|
||||
private location: Location,
|
||||
public ThemeService: ThemeService
|
||||
public ThemeService: ThemeService,
|
||||
private sortService: SortService,
|
||||
) {
|
||||
this.loggeduser = authService.ValidatedUser;
|
||||
}
|
||||
@@ -80,6 +81,8 @@ export class ExpedientesPrPage implements OnInit {
|
||||
this.taskslist.push(task);
|
||||
});
|
||||
console.log(this.taskslist);
|
||||
|
||||
this.taskslist = this.sortService.sortDate(this.taskslist, 'CreateDate')
|
||||
this.expedienteGdStore.reset(this.taskslist);
|
||||
this.skeletonLoader = false
|
||||
})
|
||||
|
||||
@@ -29,6 +29,7 @@ import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { SqliteService } from '../../services/sqlite.service';
|
||||
import { Platform } from '@ionic/angular';
|
||||
import { BackgroundService } from 'src/app/services/background.service';
|
||||
import { SortService } from 'src/app/services/functions/sort.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-gabinete-digital',
|
||||
@@ -130,7 +131,8 @@ export class GabineteDigitalPage implements OnInit, DoCheck {
|
||||
private platform: Platform,
|
||||
private changeProfileService: ChangeProfileService,
|
||||
private backgroundservice: BackgroundService,
|
||||
public ThemeService: ThemeService
|
||||
public ThemeService: ThemeService,
|
||||
private sortService: SortService,
|
||||
) {
|
||||
|
||||
this.loggeduser = authService.ValidatedUser;
|
||||
@@ -146,10 +148,6 @@ export class GabineteDigitalPage implements OnInit, DoCheck {
|
||||
};
|
||||
this.checkRoutes();
|
||||
|
||||
|
||||
// this.eventoaprovacaostore.resetmd([])
|
||||
// this.eventoaprovacaostore.resetpr([])
|
||||
|
||||
}
|
||||
|
||||
ngDoCheck(): void {
|
||||
@@ -209,64 +207,7 @@ export class GabineteDigitalPage implements OnInit, DoCheck {
|
||||
}
|
||||
|
||||
async loadAllProcesses() {
|
||||
|
||||
this.processesbackend.GetTasksList("", false).subscribe(async res => {
|
||||
|
||||
let allProcessesList = await this.processesbackend.GetTasksList("", false).toPromise();
|
||||
|
||||
allProcessesList = allProcessesList.filter(element => element.activityInstanceName != 'Conhecimento')
|
||||
|
||||
if (!this.p.userRole(['PR'])) {
|
||||
allProcessesList = allProcessesList.filter(element => element.activityInstanceName != 'Assinar Diplomas')
|
||||
} else if (this.p.userRole(['PR'])) {
|
||||
allProcessesList = allProcessesList.filter(element => element.activityInstanceName != 'Diploma Assinado')
|
||||
}
|
||||
|
||||
console.log('allProcessesList', allProcessesList);
|
||||
|
||||
this.addProcessToDB(allProcessesList)
|
||||
this.skeletonLoader = true;
|
||||
|
||||
this.allProcessesList = [];
|
||||
|
||||
allProcessesList.forEach(element => {
|
||||
let date = new Date(element.taskStartDate);
|
||||
date.setMonth(date.getMonth() + 1);
|
||||
let taskDate = date.getFullYear() + "-" + date.getMonth() + "-" + date.getDate() + " " + date.getHours() + ":" + date.getMinutes() + ":" + date.getSeconds();
|
||||
|
||||
let task = {
|
||||
"SerialNumber": element.serialNumber,
|
||||
"Folio": element.workflowInstanceDataFields.Subject,
|
||||
"Senders": element.workflowInstanceDataFields.Sender,
|
||||
//"CreateDate": taskDate,
|
||||
"CreateDate": new Date(element.taskStartDate),
|
||||
"DocumentURL": element.workflowInstanceDataFields.ViewerRequest,
|
||||
"Remetente": element.workflowInstanceDataFields.Remetente,
|
||||
"DocumentsQty": element.totalDocuments,
|
||||
"DocId": element.workflowInstanceDataFields.DispatchDocId,
|
||||
"FolderID": element.workflowInstanceDataFields.FolderID,
|
||||
"WorkflowName": element.workflowDisplayName,
|
||||
"activityInstanceName": element.activityInstanceName,
|
||||
"Status": element.workflowInstanceDataFields.Status,
|
||||
"Agenda": element.workflowInstanceDataFields.Agenda,
|
||||
"customDate": this.setFormatDate(new Date(element.workflowInstanceDataFields.StartDate), new Date(element.workflowInstanceDataFields.EndDate), element.workflowInstanceDataFields.IsAllDayEvent),
|
||||
}
|
||||
|
||||
this.allProcessesList.push(task);
|
||||
this.allProcessesList = removeDuplicate(this.allProcessesList)
|
||||
this.allProcessesList = this.sortArrayISODate(this.allProcessesList).reverse();
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
}, (error) => {
|
||||
console.log('gabinete digital offline', error)
|
||||
this.getAllProcessFromDB();
|
||||
})
|
||||
|
||||
this.skeletonLoader = false;
|
||||
|
||||
this.LoadCounts();
|
||||
}
|
||||
|
||||
addProcessToDB(data) {
|
||||
@@ -330,7 +271,7 @@ export class GabineteDigitalPage implements OnInit, DoCheck {
|
||||
|
||||
this.allProcessesList.push(task);
|
||||
this.allProcessesList = removeDuplicate(this.allProcessesList)
|
||||
this.allProcessesList = this.sortArrayISODate(this.allProcessesList).reverse();
|
||||
this.allProcessesList = this.sortService.sortDate(this.allProcessesList, 'CreateDate')
|
||||
|
||||
});
|
||||
console.log("All process from db ", allprocess)
|
||||
@@ -345,21 +286,18 @@ export class GabineteDigitalPage implements OnInit, DoCheck {
|
||||
|
||||
setFormatDate(start: any, end: any, allday: boolean) {
|
||||
let customDate;
|
||||
/* start = new Date();
|
||||
end= new Date("2021-08-04T18:01:04.753Z"); */
|
||||
//end = new Date("2021-09-04T18:01:04.753Z");
|
||||
|
||||
const totalSeconds = Math.floor((end - (start)) / 1000);;
|
||||
const totalMinutes = Math.floor(totalSeconds / 60);
|
||||
const totalHours = Math.floor(totalMinutes / 60);
|
||||
const totalDays = Math.floor(totalHours / 24);
|
||||
|
||||
const hours = totalHours - (totalDays * 24);
|
||||
const minutes = totalMinutes - (totalDays * 24 * 60) - (hours * 60);
|
||||
const seconds = totalSeconds - (totalDays * 24 * 60 * 60) - (hours * 60 * 60) - (minutes * 60);
|
||||
//const hours = totalHours - (totalDays * 24);
|
||||
//const minutes = totalMinutes - (totalDays * 24 * 60) - (hours * 60);
|
||||
// const seconds = totalSeconds - (totalDays * 24 * 60 * 60) - (hours * 60 * 60) - (minutes * 60);
|
||||
|
||||
let diffDays = totalDays;
|
||||
let diffMinutes = minutes;
|
||||
// let diffDays = totalDays;
|
||||
// let diffMinutes = minutes;
|
||||
|
||||
if (totalDays == 0) {
|
||||
if (allday) {
|
||||
@@ -385,6 +323,7 @@ export class GabineteDigitalPage implements OnInit, DoCheck {
|
||||
(thedate.getMonth() + 1) + "/" +
|
||||
thedate.getFullYear();
|
||||
}
|
||||
|
||||
getCustomHours(thedate: Date) {
|
||||
return thedate.getHours() + ":" +
|
||||
thedate.getMinutes();
|
||||
@@ -551,8 +490,49 @@ export class GabineteDigitalPage implements OnInit, DoCheck {
|
||||
this.showLoader = true;
|
||||
|
||||
let allPreocesses_ = await this.processesbackend.GetTasksList("", false).toPromise();
|
||||
let count_all_processes = Object.keys(allPreocesses_).length;
|
||||
let allProcessesList = allPreocesses_;
|
||||
|
||||
allProcessesList = allProcessesList.filter(element => element.activityInstanceName != 'Conhecimento')
|
||||
|
||||
if (!this.p.userRole(['PR'])) {
|
||||
allProcessesList = allProcessesList.filter(element => element.activityInstanceName != 'Assinar Diplomas')
|
||||
} else if (this.p.userRole(['PR'])) {
|
||||
allProcessesList = allProcessesList.filter(element => element.activityInstanceName != 'Diploma Assinado')
|
||||
}
|
||||
|
||||
this.addProcessToDB(allProcessesList)
|
||||
this.skeletonLoader = true;
|
||||
|
||||
this.allProcessesList = [];
|
||||
|
||||
allProcessesList.forEach(element => {
|
||||
let date = new Date(element.taskStartDate);
|
||||
date.setMonth(date.getMonth() + 1);
|
||||
let taskDate = date.getFullYear() + "-" + date.getMonth() + "-" + date.getDate() + " " + date.getHours() + ":" + date.getMinutes() + ":" + date.getSeconds();
|
||||
|
||||
let task = {
|
||||
"SerialNumber": element.serialNumber,
|
||||
"Folio": element.workflowInstanceDataFields.Subject,
|
||||
"Senders": element.workflowInstanceDataFields.Sender,
|
||||
//"CreateDate": taskDate,
|
||||
"CreateDate": new Date(element.taskStartDate),
|
||||
"DocumentURL": element.workflowInstanceDataFields.ViewerRequest,
|
||||
"Remetente": element.workflowInstanceDataFields.Remetente,
|
||||
"DocumentsQty": element.totalDocuments,
|
||||
"DocId": element.workflowInstanceDataFields.DispatchDocId,
|
||||
"FolderID": element.workflowInstanceDataFields.FolderID,
|
||||
"WorkflowName": element.workflowDisplayName,
|
||||
"activityInstanceName": element.activityInstanceName,
|
||||
"Status": element.workflowInstanceDataFields.Status,
|
||||
"Agenda": element.workflowInstanceDataFields.Agenda,
|
||||
"customDate": this.setFormatDate(new Date(element.workflowInstanceDataFields.StartDate), new Date(element.workflowInstanceDataFields.EndDate), element.workflowInstanceDataFields.IsAllDayEvent),
|
||||
}
|
||||
|
||||
this.allProcessesList.push(task);
|
||||
this.allProcessesList = removeDuplicate(this.allProcessesList);
|
||||
this.allProcessesList = this.sortService.sortDate(this.allProcessesList, 'CreateDate')
|
||||
|
||||
});
|
||||
|
||||
let expedientes = await this.processesbackend.GetTaskListExpediente(false).toPromise();
|
||||
expedientes = expedientes.filter(data => data.workflowInstanceDataFields.Status == "Active")
|
||||
@@ -582,6 +562,7 @@ export class GabineteDigitalPage implements OnInit, DoCheck {
|
||||
|
||||
let despachospr = await this.processesbackend.GetTasksList("Despacho do Presidente da República", false).toPromise();
|
||||
let despachosPr;
|
||||
|
||||
switch (this.loggeduser.Profile) {
|
||||
case 'MDGPR':
|
||||
despachosPr = despachospr.filter(data => data.activityInstanceName == "Tarefa de Despacho").filter(data => data.workflowInstanceDataFields.Status == "Active");
|
||||
@@ -595,23 +576,18 @@ export class GabineteDigitalPage implements OnInit, DoCheck {
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
let mdEventsOficial = await this.processesbackend.GetTasksList('Agenda Oficial MDGPR', false).toPromise();
|
||||
let mdEventsPessoal = await this.processesbackend.GetTasksList('Agenda Pessoal MDGPR', false).toPromise();
|
||||
const eventsMDGPRList = mdEventsOficial.concat(mdEventsPessoal);
|
||||
this.eventoaprovacaostore.countMd = eventsMDGPRList.length
|
||||
this.eventoaprovacaostore.resetmd(eventsMDGPRList);
|
||||
|
||||
|
||||
|
||||
let prEventsOficial = await this.processesbackend.GetTasksList('Agenda Oficial PR', false).toPromise();
|
||||
let prEventsPessoal = await this.processesbackend.GetTasksList('Agenda Pessoal PR', false).toPromise();
|
||||
const eventsPRList = prEventsOficial.concat(prEventsPessoal);
|
||||
this.eventoaprovacaostore.countPr = eventsPRList.length
|
||||
this.eventoaprovacaostore.resetpr(eventsPRList);
|
||||
|
||||
|
||||
|
||||
let diplomasValidar = despachospr.filter(data => data.activityInstanceName == "Revisar Diploma");
|
||||
this.count_dip_pv = Object.keys(diplomasValidar).length;
|
||||
this.deplomasStore.resetDiplomasReview(diplomasValidar)
|
||||
@@ -622,7 +598,6 @@ export class GabineteDigitalPage implements OnInit, DoCheck {
|
||||
|
||||
this.deplomasStore.resetDiplomasList(diplomasAssinar)
|
||||
|
||||
|
||||
let diplomasAssinados = despachospr.filter(data => data.activityInstanceName == "Diploma Assinado");
|
||||
this.count_dip_as_pr = Object.keys(diplomasAssinados).length;
|
||||
this.deplomasStore.resetDiplomasAssinadoList(diplomasAssinados)
|
||||
@@ -642,21 +617,7 @@ export class GabineteDigitalPage implements OnInit, DoCheck {
|
||||
doRefresh(event) {
|
||||
console.log(event);
|
||||
|
||||
// this.closeAllDesktopComponents();
|
||||
/* switch(this.loggeduser.Profile){
|
||||
case 'MDGPR':
|
||||
this.selectedElement='Correspondence';
|
||||
this.showExpedients = true;
|
||||
this.expedientesPage.doRefresh();
|
||||
break;
|
||||
case 'PR':
|
||||
this.selectedElement='ExpedientesPr';
|
||||
this.showExpedientesPr = true;
|
||||
break;
|
||||
} */
|
||||
this.LoadCounts();
|
||||
this.loadAllProcesses();
|
||||
//this.refreshExpedientes();
|
||||
this.LoadCounts();
|
||||
|
||||
if (event) {
|
||||
setTimeout(() => {
|
||||
|
||||
@@ -164,7 +164,7 @@ export class PedidosPage implements OnInit {
|
||||
});
|
||||
this.addPedidoToDb(this.parecerList);
|
||||
|
||||
this.listToPresentparecerList = this.sortService.sortArrayISODate(this.parecerList);
|
||||
this.listToPresentparecerList = this.sortService.sortDate(this.parecerList, 'CreateDate')
|
||||
this.pedidosstorage.resetparecer(this.listToPresentparecerList);
|
||||
|
||||
}
|
||||
@@ -205,7 +205,7 @@ export class PedidosPage implements OnInit {
|
||||
});
|
||||
});
|
||||
this.addPedidoToDb(this.deferimentoList);
|
||||
this.listToPresentdeferimentoList = this.sortService.sortArrayISODate(this.deferimentoList);
|
||||
this.listToPresentdeferimentoList = this.sortService.sortDate(this.deferimentoList, 'CreateDate')
|
||||
this.pedidosstorage.resetdeferimento(this.listToPresentdeferimentoList);
|
||||
|
||||
}
|
||||
|
||||
@@ -102,7 +102,7 @@ export class PendentesPage implements OnInit {
|
||||
});
|
||||
|
||||
pendentesList = removeDuplicate(pendentesList)
|
||||
pendentesList = this.sortService.sortArrayISODate(pendentesList);
|
||||
pendentesList = this.sortService.sortDate(pendentesList, 'CreateDate');
|
||||
this.listToPresent = pendentesList;
|
||||
this.skeletonLoader = false;
|
||||
|
||||
@@ -138,7 +138,7 @@ export class PendentesPage implements OnInit {
|
||||
}
|
||||
});
|
||||
|
||||
pendingList = pendingList;
|
||||
pendingList = this.sortService.sortDate(pendingList, 'CreateDate');
|
||||
this.listToPresent = pendingList;
|
||||
console.log('pendentes', pendingList)
|
||||
|
||||
|
||||
@@ -192,9 +192,9 @@ export class InactivityPage implements OnInit {
|
||||
goback() {
|
||||
const pathName = this.SessionStore.user.UrlBeforeInactivity
|
||||
if(pathName) {
|
||||
this.router.navigate([pathName]);
|
||||
this.router.navigate([pathName],{replaceUrl: true});
|
||||
} else {
|
||||
this.router.navigate(['/home/events']);
|
||||
this.router.navigate(['/home/events'], {replaceUrl: true});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@ import { ThemeService } from 'src/app/services/theme.service';
|
||||
import { Camera, CameraResultType, CameraSource, Photo } from '@capacitor/camera';
|
||||
|
||||
import { Filesystem, Directory } from '@capacitor/filesystem';
|
||||
import { NgxImageCompressService } from "ngx-image-compress";
|
||||
|
||||
const IMAGE_DIR = 'stored-images';
|
||||
|
||||
@@ -72,6 +73,9 @@ export class NewPublicationPage implements OnInit {
|
||||
capturedImageTitle: any;
|
||||
public photos: any[] = [];
|
||||
|
||||
imgResultBeforeCompress: string;
|
||||
imgResultAfterCompress: string;
|
||||
|
||||
constructor(
|
||||
private modalController: ModalController,
|
||||
public photoService: PhotoService,
|
||||
@@ -83,6 +87,7 @@ export class NewPublicationPage implements OnInit {
|
||||
public ThemeService: ThemeService,
|
||||
private platform: Platform,
|
||||
private loadingCtrl: LoadingController,
|
||||
public imageCompress: NgxImageCompressService
|
||||
) {
|
||||
|
||||
this.publicationType = this.navParams.get('publicationType');
|
||||
@@ -104,7 +109,7 @@ export class NewPublicationPage implements OnInit {
|
||||
|
||||
async takePicture() {
|
||||
const image = await Camera.getPhoto({
|
||||
quality: 50,
|
||||
quality: 20,
|
||||
allowEditing: false,
|
||||
width:50,
|
||||
height: 50,
|
||||
@@ -120,13 +125,13 @@ export class NewPublicationPage implements OnInit {
|
||||
}
|
||||
|
||||
|
||||
imageSize(image){
|
||||
var canvas = document.createElement('canvas');
|
||||
var ctx = canvas.getContext('2d');
|
||||
canvas.width=100
|
||||
canvas.height=34
|
||||
ctx.drawImage(image, 0, 0, 100, 34);
|
||||
document.body.appendChild(canvas);
|
||||
imageSize(image) {
|
||||
var canvas = document.createElement('canvas');
|
||||
var ctx = canvas.getContext('2d');
|
||||
canvas.width = 100
|
||||
canvas.height = 34
|
||||
ctx.drawImage(image, 0, 0, 100, 34);
|
||||
document.body.appendChild(canvas);
|
||||
}
|
||||
|
||||
convertBlobToBase64 = (blob: Blob) => new Promise((resolve, reject) => {
|
||||
@@ -394,9 +399,13 @@ export class NewPublicationPage implements OnInit {
|
||||
|
||||
async selectImage() {
|
||||
const image = await Camera.getPhoto({
|
||||
<<<<<<< HEAD
|
||||
quality: 50,
|
||||
width:50,
|
||||
height:50,
|
||||
=======
|
||||
quality: 20,
|
||||
>>>>>>> 6a912b740d97159664c5fe5dff07ac378b028771
|
||||
allowEditing: false,
|
||||
resultType: CameraResultType.Uri,
|
||||
source: CameraSource.Camera // Camera, Photos or Prompt!
|
||||
@@ -496,11 +505,42 @@ export class NewPublicationPage implements OnInit {
|
||||
|
||||
this.capturedImage = this.images[0].data
|
||||
|
||||
this.compressFile();
|
||||
|
||||
loading.dismiss();
|
||||
|
||||
}
|
||||
|
||||
/* compressImage() {
|
||||
let image = this.capturedImage;
|
||||
this.imageCompress.compressFile(image, orientation, 50, 50,).then(() => {
|
||||
|
||||
this.imgResultBeforeCompress = image;
|
||||
console.log('Size in bytes was:', this.imageCompress.byteCount(image));
|
||||
|
||||
this.imageCompress.compressFile(image, orientation, 50, 50).then(
|
||||
result => {
|
||||
this.imgResultAfterCompress = result;
|
||||
console.log('Size in bytes is now:', this.imageCompress.byteCount(result));
|
||||
}
|
||||
);
|
||||
})
|
||||
} */
|
||||
|
||||
compressFile() {
|
||||
|
||||
//this.imgResultBeforeCompress = image;
|
||||
this.imageCompress.getOrientation(this.capturedImage).then((orientation) => {
|
||||
console.log('Size in bytes was:', this.imageCompress.byteCount(this.capturedImage));
|
||||
this.imageCompress.compressFile(this.capturedImage, orientation, 20, 20).then(
|
||||
result => {
|
||||
this.capturedImage = result;
|
||||
console.log('Size in bytes is now:', this.imageCompress.byteCount(result));
|
||||
}
|
||||
);
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
<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/cons-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>
|
||||
|
||||
@@ -39,7 +39,11 @@
|
||||
(click)="goToPublicationDetail(publication.DocumentId)"
|
||||
>
|
||||
<div *ngIf="publication.FileBase64.length > 30" class="post-img">
|
||||
<<<<<<< HEAD
|
||||
<img [debug]= "true" [defaultImage] = "defaultImage" [lazyLoad]="publication.FileBase64" src="{{publication.FileBase64}}" alt="image">
|
||||
=======
|
||||
<ion-img src="{{publication.FileBase64}}" alt="image"></ion-img>
|
||||
>>>>>>> 6a912b740d97159664c5fe5dff07ac378b028771
|
||||
</div>
|
||||
<div *ngIf="publication.FileBase64.length < 30" class="post-img">
|
||||
<img src="/assets/icon/icon-no-image.svg" alt="image">
|
||||
|
||||
@@ -69,6 +69,7 @@ export class ViewPublicationsPage implements OnInit {
|
||||
this.folderId = this.folderId['ProcessId']
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
|
||||
if (typeof (this.id) == 'object') {
|
||||
this.id = this.id['ProcessId']
|
||||
@@ -78,11 +79,17 @@ export class ViewPublicationsPage implements OnInit {
|
||||
setTimeout(() => {
|
||||
this.testForkJoin()
|
||||
// this.getPublications();
|
||||
=======
|
||||
this.getPublicationsIds()
|
||||
this.getPublicationDetail();
|
||||
setTimeout(() => {
|
||||
this.getPublicationsIds();
|
||||
>>>>>>> 6a912b740d97159664c5fe5dff07ac378b028771
|
||||
}, 1000);
|
||||
|
||||
this.backgroundservice.registerBackService('Online',() => {
|
||||
this.backgroundservice.registerBackService('Online', () => {
|
||||
this.getPublicationDetail();
|
||||
this.getPublications();
|
||||
this.getPublicationsIds();
|
||||
|
||||
})
|
||||
|
||||
@@ -99,15 +106,23 @@ export class ViewPublicationsPage implements OnInit {
|
||||
// }
|
||||
this.testForkJoin()
|
||||
this.getPublicationDetail();
|
||||
<<<<<<< HEAD
|
||||
// this.getPublications();
|
||||
|
||||
=======
|
||||
this.getPublicationsIds();
|
||||
>>>>>>> 6a912b740d97159664c5fe5dff07ac378b028771
|
||||
}
|
||||
|
||||
doRefresh = (event) => {
|
||||
setTimeout(() => {
|
||||
this.testForkJoin()
|
||||
this.getPublicationDetail();
|
||||
<<<<<<< HEAD
|
||||
// this.getPublications();
|
||||
=======
|
||||
this.getPublicationsIds();
|
||||
>>>>>>> 6a912b740d97159664c5fe5dff07ac378b028771
|
||||
event.target.complete();
|
||||
}, 3000);
|
||||
|
||||
@@ -146,6 +161,7 @@ export class ViewPublicationsPage implements OnInit {
|
||||
|
||||
this.publicationList = new Array();
|
||||
|
||||
<<<<<<< HEAD
|
||||
res.forEach(element => {
|
||||
console.log('getPublications', element)
|
||||
let item: Publication = this.publicationPipe.itemList(element)
|
||||
@@ -171,6 +187,59 @@ export class ViewPublicationsPage implements OnInit {
|
||||
});
|
||||
}
|
||||
// goes to fork
|
||||
=======
|
||||
getPublicationsIds() {
|
||||
|
||||
this.showLoader = true;
|
||||
const folderId = this.folderId
|
||||
|
||||
this.publications.GetPublicationsID(this.folderId).subscribe(res => {
|
||||
|
||||
console.log('publications ids', res)
|
||||
this.publicationList = new Array();
|
||||
|
||||
for(let i of res) {
|
||||
this.publications.GetPublicationById(i).subscribe(ress => {
|
||||
console.log('publications by ids', ress)
|
||||
let item: Publication = this.publicationPipe.itemList(ress)
|
||||
console.log('publications by ids 2', item)
|
||||
this.publicationList.push(item);
|
||||
})
|
||||
}
|
||||
|
||||
/* res.forEach(element => {
|
||||
console.log('publications elements', element)
|
||||
this.publications.GetPublicationById(element).subscribe(ress => {
|
||||
console.log('publications by ids', ress)
|
||||
let item: Publication = this.publicationPipe.itemList(ress)
|
||||
console.log('publications by ids 2', item)
|
||||
this.publicationList.push(ress);
|
||||
})
|
||||
|
||||
}); */
|
||||
|
||||
this.sqliteservice.updateactions(this.folderId, JSON.stringify(this.publicationList));
|
||||
|
||||
this.publicationListStorage.add(folderId, this.publicationList)
|
||||
this.getpublication = this.publicationList;
|
||||
|
||||
this.showLoader = false;
|
||||
|
||||
/* this.publicationList = new Array();
|
||||
|
||||
res.forEach(element => {
|
||||
console.log('getPublications', element)
|
||||
let item: Publication = this.publicationPipe.itemList(element)
|
||||
this.publicationList.push(item);
|
||||
});
|
||||
this.sqliteservice.updateactions(this.folderId, JSON.stringify(this.publicationList));
|
||||
|
||||
this.publicationListStorage.add(folderId, this.publicationList)
|
||||
this.getpublication = this.publicationList; */
|
||||
});
|
||||
}
|
||||
|
||||
>>>>>>> 6a912b740d97159664c5fe5dff07ac378b028771
|
||||
getPublications() {
|
||||
|
||||
this.showLoader = true;
|
||||
@@ -186,6 +255,8 @@ export class ViewPublicationsPage implements OnInit {
|
||||
console.log('getPublications', element)
|
||||
let item: Publication = this.publicationPipe.itemList(element)
|
||||
this.publicationList.push(item);
|
||||
console.log('getPublications 222', item)
|
||||
|
||||
});
|
||||
this.sqliteservice.updateactions(this.folderId, JSON.stringify(this.publicationList));
|
||||
|
||||
@@ -195,7 +266,7 @@ export class ViewPublicationsPage implements OnInit {
|
||||
this.showLoader = false;
|
||||
}, (error) => {
|
||||
|
||||
if(error.status == '0') {
|
||||
if (error.status == '0') {
|
||||
this.getFromDB();
|
||||
}
|
||||
if (error.status == '404') {
|
||||
@@ -285,7 +356,7 @@ export class ViewPublicationsPage implements OnInit {
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then(() => {
|
||||
this.getPublications();
|
||||
this.getPublicationsIds();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ export class ListBoxService {
|
||||
){}
|
||||
|
||||
|
||||
filterProfile(eventSource: EventListStore[], profile: 'md' | 'pr' | 'all') {
|
||||
filterProfile(eventSource: EventListStore[] = [], profile: 'md' | 'pr' | 'all') {
|
||||
return eventSource.filter((e) => e.profile == profile)
|
||||
}
|
||||
|
||||
@@ -160,14 +160,12 @@ export class ListBoxService {
|
||||
}
|
||||
|
||||
|
||||
push(event: any, selectedDate: Date) {
|
||||
push(event: any, selectedDate: Date) {
|
||||
|
||||
console.log(new Date(event.start).getDate(), selectedDate.getDate(), new Date(event.start).getDate() >= selectedDate.getDate())
|
||||
|
||||
return new Date(event.start).getMonth() == selectedDate.getMonth() &&
|
||||
new Date(event.start).getFullYear() == selectedDate.getFullYear() &&
|
||||
new Date(event.start).getDate() >= selectedDate.getDate()
|
||||
}
|
||||
return new Date(event.start).getMonth() == selectedDate.getMonth() &&
|
||||
new Date(event.start).getFullYear() == selectedDate.getFullYear() &&
|
||||
new Date(event.start).getDate() >= selectedDate.getDate()
|
||||
}
|
||||
|
||||
encapsulation(eventsList:EventListStore[], profile): CustomCalendarEvent[] {
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { ThemeService } from 'src/app/services/theme.service';
|
||||
import { StorageService} from 'src/app/services/storage.service';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
@@ -13,7 +14,8 @@ export class BackgroundService {
|
||||
}[] = []
|
||||
|
||||
constructor(
|
||||
private themeservice: ThemeService
|
||||
private themeservice: ThemeService,
|
||||
private storageservice: StorageService
|
||||
) { }
|
||||
|
||||
online() {
|
||||
@@ -24,6 +26,7 @@ export class BackgroundService {
|
||||
document.body.style.setProperty(`--color3`, "#d9d9d9");
|
||||
document.body.style.setProperty(`--color4`, "#d9d9d9ee");
|
||||
document.body.style.setProperty(`--color5`, "#ececec");
|
||||
this.storageservice.store('networkCheckStore','online');
|
||||
|
||||
} else {
|
||||
document.body.style.setProperty(`--color`, "#0782C9");
|
||||
@@ -31,6 +34,7 @@ export class BackgroundService {
|
||||
document.body.style.setProperty(`--color3`, "#0782C9");
|
||||
document.body.style.setProperty(`--color4`, "#0782c9f0");
|
||||
document.body.style.setProperty(`--color5`, "#45BAFF");
|
||||
this.storageservice.store('networkCheckStore','online');
|
||||
}
|
||||
|
||||
this.callBacks.forEach((e) => {
|
||||
@@ -46,6 +50,7 @@ export class BackgroundService {
|
||||
document.body.style.setProperty(`--color3`, "#ffb703");
|
||||
document.body.style.setProperty(`--color4`, "#ffb703");
|
||||
document.body.style.setProperty(`--color5`, "#ffb703");
|
||||
this.storageservice.store('networkCheckStore','offline');
|
||||
this.callBacks.forEach((e) => {
|
||||
if (e.type == 'Offline') {
|
||||
e.funx()
|
||||
|
||||
@@ -7,7 +7,6 @@ export class DateService {
|
||||
|
||||
constructor() { }
|
||||
|
||||
|
||||
deferenceBetweenDays(start: any, end: any) {
|
||||
const diffTime = Math.abs(end - start);
|
||||
return Math.ceil(diffTime / (1000 * 60 * 60 * 24));
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
|
||||
import { ObjectService } from './object.service';
|
||||
|
||||
describe('ObjectService', () => {
|
||||
let service: ObjectService;
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({});
|
||||
service = TestBed.inject(ObjectService);
|
||||
});
|
||||
|
||||
it('should be created', () => {
|
||||
expect(service).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,25 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class ObjectService {
|
||||
|
||||
constructor() { }
|
||||
|
||||
|
||||
deepFind(obj, path) {
|
||||
var paths = path.split('.')
|
||||
, current = obj
|
||||
, i;
|
||||
|
||||
for (i = 0; i < paths.length; ++i) {
|
||||
if (current[paths[i]] == undefined) {
|
||||
return undefined;
|
||||
} else {
|
||||
current = current[paths[i]];
|
||||
}
|
||||
}
|
||||
return current;
|
||||
}
|
||||
}
|
||||
@@ -1,11 +1,12 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { ObjectService } from './object.service';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class SortService {
|
||||
|
||||
constructor() { }
|
||||
constructor(private ObjectService: ObjectService) { }
|
||||
|
||||
sortArrayISODate(myArray: any) {
|
||||
if(myArray.length > 0){
|
||||
@@ -14,6 +15,7 @@ export class SortService {
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
sortArrayByDate(myArray: any) {
|
||||
console.log(myArray[0].taskStartDate);
|
||||
if(myArray.length > 0){
|
||||
@@ -22,4 +24,15 @@ export class SortService {
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
sortDate(array = [], path: string) {
|
||||
|
||||
return array.sort( (a,b)=> {
|
||||
|
||||
return new Date(this.ObjectService.deepFind(b, path)).getTime() -
|
||||
new Date(this.ObjectService.deepFind(a, path)).getTime()
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -84,7 +84,24 @@ export class PublicationsService {
|
||||
return this.http.delete<any>(`${geturl}`, options);
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
//this worker obervable goes to ForkJoin as a second api call
|
||||
=======
|
||||
GetPublicationsID(folder:any) {
|
||||
const geturl = environment.apiURL + 'presidentialActions/'+ folder +'/posts/ids';
|
||||
let params = new HttpParams();
|
||||
|
||||
params = params.set("folderId", folder);
|
||||
|
||||
let options = {
|
||||
headers: this.headers,
|
||||
params: params
|
||||
};
|
||||
return this.http.get<Publication[]>(`${geturl}`, options)
|
||||
|
||||
}
|
||||
|
||||
>>>>>>> 6a912b740d97159664c5fe5dff07ac378b028771
|
||||
GetPublications(id:any){
|
||||
const geturl = environment.apiURL + 'presidentialActions/'+ id +'/posts';
|
||||
let params = new HttpParams();
|
||||
@@ -117,11 +134,11 @@ export class PublicationsService {
|
||||
const geturl = environment.apiURL + 'presidentialActions/posts/'+ publicationId;
|
||||
let params = new HttpParams();
|
||||
|
||||
/* params = params.set("id", publicationId); */
|
||||
params = params.set("id", publicationId);
|
||||
|
||||
let options = {
|
||||
headers: this.headers,
|
||||
/* params: params */
|
||||
params: params
|
||||
};
|
||||
return this.http.get<any>(`${geturl}`, options);
|
||||
}
|
||||
|
||||
@@ -24,8 +24,7 @@ export class WebNotificationsService {
|
||||
private animationController: AnimationController,
|
||||
private platform: Platform,
|
||||
private router: Router,
|
||||
private toastService: ToastService,
|
||||
private zone: NgZone) { }
|
||||
private toastService: ToastService) { }
|
||||
|
||||
|
||||
webconnection() {
|
||||
|
||||
@@ -75,14 +75,11 @@ export class AllProcessesPage implements OnInit {
|
||||
allProcessesList.forEach(element => {
|
||||
let date = new Date(element.taskStartDate);
|
||||
date.setMonth(date.getMonth() + 1);
|
||||
let taskDate = date.getFullYear() + "-" + date.getMonth() + "-" + date.getDate() + " " + date.getHours() + ":" + date.getMinutes() + ":" + date.getSeconds();
|
||||
|
||||
|
||||
let task = {
|
||||
"SerialNumber": element.serialNumber,
|
||||
"Folio": element.workflowInstanceDataFields.Subject,
|
||||
"Senders": element.workflowInstanceDataFields.Sender,
|
||||
//"CreateDate": taskDate,
|
||||
"CreateDate": new Date(element.taskStartDate),
|
||||
"DocumentURL": element.workflowInstanceDataFields.ViewerRequest,
|
||||
"Remetente": element.workflowInstanceDataFields.Remetente,
|
||||
@@ -95,10 +92,11 @@ export class AllProcessesPage implements OnInit {
|
||||
"Agenda": element.workflowInstanceDataFields.Agenda,
|
||||
"customDate": this.setFormatDate(new Date(element.workflowInstanceDataFields.StartDate), new Date(element.workflowInstanceDataFields.EndDate), element.workflowInstanceDataFields.IsAllDayEvent),
|
||||
}
|
||||
|
||||
this.allProcessesList.push(task);
|
||||
this.allProcessesList = removeDuplicate(this.allProcessesList)
|
||||
//this.allProcessesList = this.sortArrayISODate(this.allProcessesList).reverse();
|
||||
this.allProcessesList = this.sortService.sortArrayISODate(this.allProcessesList).reverse();
|
||||
|
||||
this.allProcessesList = this.sortService.sortDate(this.allProcessesList, 'CreateDate');
|
||||
|
||||
});
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@ constructor (
|
||||
despachoList.push(task);
|
||||
});
|
||||
|
||||
despachoList = this.sortService.sortArrayISODate(despachoList).reverse()
|
||||
despachoList = this.sortService.sortDate(despachoList, 'CreateDate')
|
||||
this.despachosprstore.reset(despachoList);
|
||||
this.skeletonLoader = false;
|
||||
|
||||
|
||||
@@ -76,6 +76,9 @@ export class DiplomasAssinarPage implements OnInit {
|
||||
this.diplomasList.push(task);
|
||||
});
|
||||
|
||||
this.diplomasList = this.sortService.sortDate(this.diplomasList, 'CreateDate')
|
||||
|
||||
|
||||
this.deplomasStore.resetDiplomasList(this.diplomasList);
|
||||
}
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ import { removeDuplicate } from 'src/plugin/removeDuplicate.js'
|
||||
import { CustomTaskPipe } from 'src/app/pipes/custom-task.pipe';
|
||||
import { DeplomasStore } from 'src/app/store/deplomas.service';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { SortService } from 'src/app/services/functions/sort.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-diplomas',
|
||||
@@ -34,10 +35,9 @@ constructor(
|
||||
private alertService: AlertService,
|
||||
private router: Router,
|
||||
private activatedRoute: ActivatedRoute,
|
||||
public ThemeService: ThemeService
|
||||
) {
|
||||
|
||||
}
|
||||
public ThemeService: ThemeService,
|
||||
private sortService: SortService,
|
||||
) {}
|
||||
|
||||
ngOnInit() {
|
||||
// update list
|
||||
@@ -82,7 +82,7 @@ constructor(
|
||||
diplomasList.push(task);
|
||||
});
|
||||
|
||||
this.diplomasList = this.sortArrayISODate(diplomasList).reverse();
|
||||
this.diplomasList = this.sortService.sortDate(diplomasList, 'CreateDate')
|
||||
this.deplomasStore.resetDiplomasList(this.diplomasList)
|
||||
|
||||
let diplomasAssinadoList = []
|
||||
@@ -93,7 +93,7 @@ constructor(
|
||||
diplomasAssinadoList.push(task);
|
||||
});
|
||||
|
||||
this.diplomasAssinadoList = this.sortArrayISODate(diplomasAssinadoList).reverse();
|
||||
this.diplomasAssinadoList = this.sortService.sortDate(diplomasAssinadoList, 'CreateDate')
|
||||
this.deplomasStore.resetDiplomasAssinadoList(this.diplomasAssinadoList)
|
||||
|
||||
this.showLoader = false;
|
||||
@@ -120,12 +120,6 @@ constructor(
|
||||
}
|
||||
}
|
||||
|
||||
sortArrayISODate(myArray: any) {
|
||||
return myArray.sort(function(a, b) {
|
||||
return (a.CreateDate < b.CreateDate) ? -1 : ((a.CreateDate > b.CreateDate) ? 1 : 0);
|
||||
});
|
||||
}
|
||||
|
||||
async refreshing() {
|
||||
setTimeout(() => {
|
||||
this.LoadList();
|
||||
|
||||
@@ -69,13 +69,14 @@ export class EventsToApprovePage implements OnInit {
|
||||
this.eventsMDGPRList = mdEventsOficial.concat(mdEventsPessoal);
|
||||
console.log(this.sortService.sortArrayByDate(this.eventsMDGPRList));
|
||||
|
||||
this.eventaprovacaostore.resetmd(this.sortService.sortArrayByDate(this.eventsMDGPRList).reverse());
|
||||
this.eventaprovacaostore.resetmd(this.sortService.sortDate(this.eventsMDGPRList, 'CreateDate'));
|
||||
}
|
||||
else if(this.segment == 'PR'){
|
||||
let prEventsOficial = await this.processes.GetTasksList('Agenda Oficial PR', false).toPromise();
|
||||
let prEventsPessoal = await this.processes.GetTasksList('Agenda Pessoal PR', false).toPromise();
|
||||
this.eventsPRList = prEventsOficial.concat(prEventsPessoal);
|
||||
this.eventaprovacaostore.resetpr(this.sortService.sortArrayByDate(this.eventsPRList).reverse());
|
||||
|
||||
this.eventaprovacaostore.resetpr(this.sortService.sortDate(this.eventsPRList, 'CreateDate'));
|
||||
}
|
||||
this.showLoader = false;
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@ import { CustomTaskPipe } from 'src/app/pipes/custom-task.pipe';
|
||||
import { ExpedienteGdStore } from 'src/app/store/expedientegd-store.service';
|
||||
import { ExpedienteTaskPipe } from 'src/app/pipes/expediente-task.pipe';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { SortService } from 'src/app/services/functions/sort.service';
|
||||
|
||||
|
||||
@Component({
|
||||
@@ -35,7 +36,8 @@ export class ExpedientesPrPage implements OnInit {
|
||||
private alertService: AlertService,
|
||||
private authService: AuthService,
|
||||
private router: Router,
|
||||
public ThemeService: ThemeService
|
||||
public ThemeService: ThemeService,
|
||||
private sortService: SortService,
|
||||
) {
|
||||
this.loggeduser = authService.ValidatedUser;
|
||||
}
|
||||
@@ -75,7 +77,8 @@ export class ExpedientesPrPage implements OnInit {
|
||||
let task = this.expedienteTaskPipe.transform(element);
|
||||
this.taskslist.push(task);
|
||||
});
|
||||
console.log(this.taskslist);
|
||||
|
||||
this.taskslist = this.sortService.sortDate(this.taskslist, 'CreateDate')
|
||||
|
||||
this.expedienteGdStore.reset(this.taskslist);
|
||||
this.skeletonLoader = false;
|
||||
|
||||
@@ -5,6 +5,7 @@ import { AlertService } from 'src/app/services/alert.service';
|
||||
import { ExpedienteGdStore } from 'src/app/store/expedientegd-store.service';
|
||||
import { ExpedienteTaskPipe } from 'src/app/pipes/expediente-task.pipe';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { SortService } from 'src/app/services/functions/sort.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-expedients',
|
||||
@@ -27,7 +28,8 @@ export class ExpedientsPage implements OnInit {
|
||||
private processes:ProcessesService,
|
||||
private alertService: AlertService,
|
||||
private router: Router,
|
||||
public ThemeService: ThemeService
|
||||
public ThemeService: ThemeService,
|
||||
private sortService: SortService,
|
||||
) {
|
||||
this.profile = 'mdgpr';
|
||||
|
||||
@@ -67,13 +69,14 @@ export class ExpedientsPage implements OnInit {
|
||||
this.taskslist = [];
|
||||
this.skeletonLoader = false
|
||||
|
||||
let res = result.reverse().filter(data => data.workflowInstanceDataFields.Status == "Active");
|
||||
let res = result.filter(data => data.workflowInstanceDataFields.Status == "Active");
|
||||
res.forEach(element => {
|
||||
let task = this.expedienteTaskPipe.transform(element)
|
||||
this.taskslist.push(task);
|
||||
|
||||
});
|
||||
|
||||
this.taskslist = this.sortService.sortDate(this.taskslist, 'CreateDate')
|
||||
this.expedientegbstore.reset(this.taskslist);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ export class PedidosPage implements OnInit {
|
||||
public ThemeService: ThemeService
|
||||
) {
|
||||
this.profile = 'mdgpr';
|
||||
}
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
@@ -96,7 +96,8 @@ export class PedidosPage implements OnInit {
|
||||
let task: customTask = this.customTaskPipe.transform(element);
|
||||
this.parecerList.push(task);
|
||||
});
|
||||
this.pedidosstore.resetparecer(this.sortService.sortArrayISODate(this.parecerList));
|
||||
|
||||
this.pedidosstore.resetparecer(this.sortService.sortDate(this.parecerList, 'CreateDate'));
|
||||
|
||||
}
|
||||
else if(this.segment == 'deferimento') {
|
||||
@@ -112,7 +113,9 @@ export class PedidosPage implements OnInit {
|
||||
let task: customTask = this.customTaskPipe.transform(element);
|
||||
this.deferimentoList.push(task);
|
||||
});
|
||||
this.pedidosstore.resetdeferimento(this.sortService.sortArrayISODate(this.deferimentoList));
|
||||
|
||||
|
||||
this.pedidosstore.resetdeferimento(this.sortService.sortDate(this.deferimentoList, 'CreateDate'));
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ export class PendentesPage implements OnInit {
|
||||
});
|
||||
|
||||
pendentesList = removeDuplicate( pendentesList)
|
||||
pendentesList = this.sortService.sortArrayISODate(pendentesList);
|
||||
pendentesList = this.sortService.sortDate(pendentesList, 'CreateDate')
|
||||
|
||||
this.pendentesstore.reset(pendentesList);
|
||||
this.skeletonLoader = false;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<div class="header-container">
|
||||
|
||||
<div class="main-tab pb-10 ion-toolbar text-white">
|
||||
<div class="main-tab pb-10 ion-toolbar header-color">
|
||||
|
||||
<div class="mobile d-flex div-top-header justify-space-between">
|
||||
<div *ngIf="!hideSearchBtn" class="div-search">
|
||||
|
||||
@@ -263,6 +263,7 @@ export class DespachosPrOptionsPage implements OnInit {
|
||||
else if(actionName == 'Concluido') {
|
||||
await this.concluir(res.data.note, docs);
|
||||
}
|
||||
|
||||
this.goBack();
|
||||
}
|
||||
});
|
||||
|
||||
+8
-5
@@ -1340,12 +1340,19 @@ ngx-mat-datetime-content{
|
||||
.ldio-rpinwye8j0b div { box-sizing: content-box; }
|
||||
|
||||
.transparent-modal {
|
||||
<<<<<<< HEAD
|
||||
--background: #f1eaeae7;
|
||||
--margin: 0;
|
||||
--padding: 0;
|
||||
|
||||
ion-content {
|
||||
--background:#f1f0ebe7;
|
||||
=======
|
||||
--background: #000000;
|
||||
|
||||
ion-content {
|
||||
--background:#2e2121;
|
||||
>>>>>>> 6a912b740d97159664c5fe5dff07ac378b028771
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1357,12 +1364,8 @@ ngx-mat-datetime-content{
|
||||
.transparentblack-modal{
|
||||
--background: #000000e7;
|
||||
|
||||
ion-content {
|
||||
--background:transparent;
|
||||
|
||||
}
|
||||
.transparent-modal .modal-wrapper {
|
||||
--background: rgba(8, 8, 8, 0.7);
|
||||
--background: rgb(44, 39, 45);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -770,6 +770,17 @@
|
||||
color: black;
|
||||
}
|
||||
|
||||
.header-color {
|
||||
color: white;
|
||||
}
|
||||
|
||||
.init-event-header {
|
||||
color: white;
|
||||
background: linear-gradient(270deg, var(--color2) 100%, var(--color3) 100%, var(--color4) 100%, var(--color5) 100%) !important;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.background-blue {
|
||||
background-color: #0d89d1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user