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
-15
@@ -2958,21 +2958,6 @@
|
||||
"@types/cordova": "^0.0.34"
|
||||
}
|
||||
},
|
||||
"@ionic-native/crop": {
|
||||
"version": "5.36.0",
|
||||
"resolved": "https://registry.npmjs.org/@ionic-native/crop/-/crop-5.36.0.tgz",
|
||||
"integrity": "sha512-wRO8J9oSHl4klvPMti7MTYjFCl6dYHYlbe56gzImf1pwfKQ7gmusskeedABfZggPV1NHruMBKUNALdatJf603A==",
|
||||
"requires": {
|
||||
"@types/cordova": "^0.0.34"
|
||||
},
|
||||
"dependencies": {
|
||||
"@types/cordova": {
|
||||
"version": "0.0.34",
|
||||
"resolved": "https://registry.npmjs.org/@types/cordova/-/cordova-0.0.34.tgz",
|
||||
"integrity": "sha1-6nrd907Ow9dimCegw54smt3HPQQ="
|
||||
}
|
||||
}
|
||||
},
|
||||
"@ionic-native/fcm": {
|
||||
"version": "5.36.0",
|
||||
"resolved": "https://registry.npmjs.org/@ionic-native/fcm/-/fcm-5.36.0.tgz",
|
||||
|
||||
@@ -253,11 +253,8 @@ export class DespachoService {
|
||||
|
||||
});
|
||||
|
||||
console.log(despachoList);
|
||||
|
||||
|
||||
despachoList = this.sortService.sortArrayISODate(despachoList).reverse();
|
||||
|
||||
despachoList = this.sortService.sortDate(despachoList, 'CreateDate')
|
||||
|
||||
if(updateStore) {
|
||||
this.despachoStore.reset(despachoList);
|
||||
}
|
||||
|
||||
@@ -215,6 +215,10 @@ const routes = [
|
||||
{
|
||||
path: 'video-allowed',
|
||||
loadChildren: () => import('./modals/video-allowed/video-allowed.module').then( m => m.VideoAllowedPageModule)
|
||||
},
|
||||
{
|
||||
path: 'preview-photo',
|
||||
loadChildren: () => import('./modals/preview-photo/preview-photo.module').then( m => m.PreviewPhotoPageModule)
|
||||
},
|
||||
|
||||
|
||||
|
||||
@@ -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'; */
|
||||
@@ -68,7 +68,6 @@ export class HomePage implements OnInit {
|
||||
status: string = "";
|
||||
audioName: string = "";
|
||||
constructor(
|
||||
private zone: NgZone,
|
||||
private router: Router,
|
||||
public modalCtrl: AlertController,
|
||||
private notificationsService: NotificationsService,
|
||||
@@ -93,6 +92,7 @@ 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
|
||||
@@ -100,6 +100,9 @@ export class HomePage implements OnInit {
|
||||
|
||||
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']);
|
||||
|
||||
@@ -27,32 +27,32 @@
|
||||
|
||||
<ion-footer color="light">
|
||||
<ion-row>
|
||||
<ion-col size="3" class="ion-text-center">
|
||||
<ion-col size="4" class="ion-text-center">
|
||||
<ion-button (click)="close()" fill="clear" color="light">
|
||||
<!-- <ion-icon name="remove" slot="start"></ion-icon> -->
|
||||
<ion-icon src="assets/icon/chat/circle-xmark-solid 1.svg" name="chatbox"></ion-icon>
|
||||
</ion-button>
|
||||
</ion-col>
|
||||
<ion-col size="3" class="ion-text-center">
|
||||
<ion-col size="4" class="ion-text-center">
|
||||
|
||||
<ion-button (click)="zoom(false)" fill="clear" color="light">
|
||||
<!-- <ion-icon name="remove" slot="start"></ion-icon> -->
|
||||
<ion-icon class="redla" name="flower-outline"></ion-icon>
|
||||
</ion-button>
|
||||
</ion-col>
|
||||
<ion-col size="3" class="ion-text-center">
|
||||
<ion-col size="4" class="ion-text-center">
|
||||
<ion-button (click)="getIconGallery()" fill="clear" color="light">
|
||||
|
||||
<ion-icon name="videocam"></ion-icon>
|
||||
<ion-icon name="videocam" (click)="openChatVideo()"></ion-icon>
|
||||
|
||||
</ion-button>
|
||||
</ion-col>
|
||||
<ion-col size="3" class="ion-text-center">
|
||||
<!-- <ion-col size="3" class="ion-text-center">
|
||||
<ion-button (click)="zoom(true)" fill="clear" color="light">
|
||||
<ion-icon class="redla" name="alert-circle"></ion-icon>
|
||||
|
||||
</ion-button>
|
||||
</ion-col>
|
||||
</ion-col> -->
|
||||
</ion-row>
|
||||
</ion-footer>
|
||||
</ion-card>
|
||||
|
||||
@@ -8,14 +8,20 @@ ion-slides {
|
||||
|
||||
.redla{
|
||||
color: rgb(250, 248, 248);
|
||||
background-color: rgb(255, 187, 0);
|
||||
background-color: rgb(255, 238, 0);
|
||||
border-radius: 120px;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
}
|
||||
.blacking{
|
||||
background-color: rgb(168, 41, 41);
|
||||
}
|
||||
|
||||
.cardconteudo {
|
||||
background: rgba(255,255,255,0.5);
|
||||
background: rgb(8, 8, 8);
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
||||
}
|
||||
|
||||
.whiter{
|
||||
|
||||
@@ -80,6 +80,10 @@ async getIconGallery(){
|
||||
openChat(){
|
||||
|
||||
|
||||
}
|
||||
|
||||
openChatVideo(){
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { Routes, RouterModule } from '@angular/router';
|
||||
|
||||
import { PreviewPhotoPage } from './preview-photo.page';
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
component: PreviewPhotoPage
|
||||
}
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forChild(routes)],
|
||||
exports: [RouterModule],
|
||||
})
|
||||
export class PreviewPhotoPageRoutingModule {}
|
||||
@@ -0,0 +1,20 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { PreviewPhotoPageRoutingModule } from './preview-photo-routing.module';
|
||||
|
||||
import { PreviewPhotoPage } from './preview-photo.page';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
IonicModule,
|
||||
PreviewPhotoPageRoutingModule
|
||||
],
|
||||
declarations: [PreviewPhotoPage]
|
||||
})
|
||||
export class PreviewPhotoPageModule {}
|
||||
@@ -0,0 +1,15 @@
|
||||
<ion-header>
|
||||
<ion-toolbar>
|
||||
<ion-title>
|
||||
<ion-icon></ion-icon>
|
||||
</ion-title>
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
|
||||
<ion-content>
|
||||
<img src="{{image}}" />
|
||||
<ion-footer>
|
||||
<ion-icon></ion-icon>
|
||||
<ion-icon></ion-icon>
|
||||
</ion-footer>
|
||||
</ion-content>
|
||||
@@ -0,0 +1,24 @@
|
||||
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { PreviewPhotoPage } from './preview-photo.page';
|
||||
|
||||
describe('PreviewPhotoPage', () => {
|
||||
let component: PreviewPhotoPage;
|
||||
let fixture: ComponentFixture<PreviewPhotoPage>;
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ PreviewPhotoPage ],
|
||||
imports: [IonicModule.forRoot()]
|
||||
}).compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(PreviewPhotoPage);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
}));
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,33 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ModalController, NavParams } from '@ionic/angular';
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'app-preview-photo',
|
||||
templateUrl: './preview-photo.page.html',
|
||||
styleUrls: ['./preview-photo.page.scss'],
|
||||
})
|
||||
export class PreviewPhotoPage implements OnInit {
|
||||
|
||||
constructor(private modalController: ModalController,
|
||||
private navParams:NavParams) { }
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
|
||||
image: any;
|
||||
|
||||
exit( ){ this.modalController.dismiss()
|
||||
|
||||
}
|
||||
save(img){
|
||||
var canvas = document.createElement('canvas');
|
||||
var ctx = canvas.getContext('2d');
|
||||
canvas.width=300
|
||||
canvas.height=234
|
||||
ctx.drawImage(img.attachments[0].image_url, 0, 0, 300, 234);
|
||||
document.body.appendChild(canvas);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
@@ -39,8 +39,9 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
/* @ViewChild('messageContainer') messageContainer: ElementRef; */
|
||||
@ViewChild('rectangle') private rectangle: ElementRef;
|
||||
|
||||
canvas: any
|
||||
ctx: any
|
||||
loggedUser: any;
|
||||
|
||||
message = '';
|
||||
messages:any;
|
||||
userPresence='';
|
||||
@@ -635,6 +636,7 @@ touchStart(card) {
|
||||
card.el.style['z-index'] = 11;
|
||||
}
|
||||
|
||||
|
||||
async openPreview(msg) {
|
||||
const modal = await this.modalController.create({
|
||||
component: PreviewCameraPage,
|
||||
@@ -658,6 +660,16 @@ touchStart(card) {
|
||||
ctx.drawImage(img.attachments[0].image_url, 0, 0, 300, 234);
|
||||
document.body.appendChild(canvas);
|
||||
}
|
||||
|
||||
getPicture(img){
|
||||
var canvas = document.createElement('canvas');
|
||||
var ctx = canvas.getContext('2d');
|
||||
canvas.width=300
|
||||
canvas.height=234
|
||||
ctx.drawImage(img.attachments[0].image_url, 0, 0, 300, 234);
|
||||
document.body.appendChild(canvas);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -402,8 +402,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{
|
||||
|
||||
@@ -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)
|
||||
@@ -641,22 +616,8 @@ 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)
|
||||
|
||||
|
||||
@@ -108,6 +108,7 @@ export class NewPublicationPage implements OnInit {
|
||||
allowEditing: false,
|
||||
resultType: CameraResultType.Uri,
|
||||
source: CameraSource.Camera // Camera, Photos or Prompt!
|
||||
|
||||
});
|
||||
|
||||
if (image) {
|
||||
@@ -116,12 +117,13 @@ export class NewPublicationPage implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
|
||||
imageSize(image){
|
||||
var canvas = document.createElement('canvas');
|
||||
var ctx = canvas.getContext('2d');
|
||||
canvas.width=300
|
||||
canvas.height=234
|
||||
ctx.drawImage(image, 0, 0, 300, 234);
|
||||
canvas.width=100
|
||||
canvas.height=34
|
||||
ctx.drawImage(image, 0, 0, 100, 34);
|
||||
document.body.appendChild(canvas);
|
||||
}
|
||||
|
||||
|
||||
@@ -77,7 +77,6 @@
|
||||
</ion-item-option>
|
||||
</ion-item-options>
|
||||
</ion-item-sliding>
|
||||
|
||||
<ion-item-sliding disabled="{{showSlidingOptions}}" class="width-100"
|
||||
*ngFor="let evento of publicationsEventFolderList">
|
||||
<ion-item lines="none"
|
||||
|
||||
@@ -461,7 +461,5 @@ export class PublicationsPage implements OnInit {
|
||||
// newImage => console.log('new image path is: ' + newImage),
|
||||
// error => console.error('Error cropping image', error)
|
||||
// );
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -126,7 +126,7 @@
|
||||
}
|
||||
.post-img{
|
||||
width: 100%;
|
||||
//height: 400px;
|
||||
height: 400px;
|
||||
margin: 0 auto;
|
||||
border-radius: 0px!important;
|
||||
overflow: hidden;
|
||||
|
||||
@@ -160,14 +160,12 @@ export class ListBoxService {
|
||||
}
|
||||
|
||||
|
||||
push(event: any, selectedDate: Date) {
|
||||
|
||||
console.log(new Date(event.start).getDate(), selectedDate.getDate(), new Date(event.start).getDate() >= selectedDate.getDate())
|
||||
push(event: any, selectedDate: Date) {
|
||||
|
||||
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[] {
|
||||
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -240,7 +240,6 @@ export class FileService {
|
||||
|
||||
//this.capturedImage = this.capturedImage;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -250,7 +249,7 @@ export class FileService {
|
||||
quality: 50,
|
||||
// allowEditing: true,
|
||||
resultType: CameraResultType.Uri,
|
||||
source: CameraSource.Photos
|
||||
source: CameraSource.Camera
|
||||
|
||||
});
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
+3
-7
@@ -1336,10 +1336,10 @@ ngx-mat-datetime-content{
|
||||
.ldio-rpinwye8j0b div { box-sizing: content-box; }
|
||||
|
||||
.transparent-modal {
|
||||
--background: #0000005c;
|
||||
--background: #000000;
|
||||
|
||||
ion-content {
|
||||
--background:#2e2121e7;
|
||||
--background:#2e2121;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1351,11 +1351,7 @@ ngx-mat-datetime-content{
|
||||
.transparentblack-modal{
|
||||
--background: #000000e7;
|
||||
|
||||
ion-content {
|
||||
--background:transparent;
|
||||
|
||||
}
|
||||
.transparent-modal .modal-wrapper {
|
||||
--background: rgba(44, 39, 45, 0.7);
|
||||
--background: rgb(44, 39, 45);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user