Git pull made

This commit is contained in:
Eudes Inácio
2021-11-05 10:19:41 +01:00
33 changed files with 461 additions and 2032 deletions
+2 -1
View File
@@ -17,5 +17,6 @@
}, },
"android": { "android": {
"allowMixedContent": true "allowMixedContent": true
} },
"bundledWebRuntime": false
} }
+1 -44
View File
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?> <?xml version='1.0' encoding='utf-8'?>
<widget id="com.gpr.gabinetedigital" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0" xmlns:mfp="http://www.ibm.com/mobilefirst/cordova-plugin-mfp"> <widget id="com.gpr.gabinetedigital" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>Gabinete digital</name> <name>Gabinete digital</name>
<description>An awesome Ionic/Cordova app.</description> <description>An awesome Ionic/Cordova app.</description>
<author email="hi@ionicframework.com" href="http://ionicframework.com/">Ionic Framework Team</author> <author email="hi@ionicframework.com" href="http://ionicframework.com/">Ionic Framework Team</author>
@@ -47,49 +47,6 @@
<icon density="xxhdpi" src="resources/android/icon/drawable-xxhdpi-icon.png" /> <icon density="xxhdpi" src="resources/android/icon/drawable-xxhdpi-icon.png" />
<icon density="xxxhdpi" src="resources/android/icon/drawable-xxxhdpi-icon.png" /> <icon density="xxxhdpi" src="resources/android/icon/drawable-xxxhdpi-icon.png" />
</platform> </platform>
<mfp:android>
<mfp:sdkChecksum>3077110622</mfp:sdkChecksum>
<mfp:appChecksum>3619450036</mfp:appChecksum>
<mfp:security>
<mfp:testWebResourcesChecksum enabled="false" ignoreFileExtensions="png, jpg, jpeg, gif, mp4, mp3" />
</mfp:security>
</mfp:android>
<mfp:ios>
<mfp:sdkChecksum>1979143311</mfp:sdkChecksum>
<mfp:appChecksum>1328564293</mfp:appChecksum>
<mfp:security>
<mfp:testWebResourcesChecksum enabled="false" ignoreFileExtensions="png, jpg, jpeg, gif, mp4, mp3" />
</mfp:security>
</mfp:ios>
<mfp:windows>
<mfp:windows8>
<mfp:sdkChecksum>0</mfp:sdkChecksum>
<mfp:security>
<mfp:testWebResourcesChecksum enabled="false" ignoreFileExtensions="png, jpg, jpeg, gif, mp4, mp3" />
</mfp:security>
</mfp:windows8>
<mfp:windowsphone8>
<mfp:sdkChecksum>0</mfp:sdkChecksum>
<mfp:security>
<mfp:testWebResourcesChecksum enabled="false" ignoreFileExtensions="png, jpg, jpeg, gif, mp4, mp3" />
</mfp:security>
</mfp:windowsphone8>
<mfp:windows10>
<mfp:sdkChecksum>0</mfp:sdkChecksum>
<mfp:security>
<mfp:testWebResourcesChecksum enabled="false" ignoreFileExtensions="png, jpg, jpeg, gif, mp4, mp3" />
</mfp:security>
</mfp:windows10>
<mfp:appChecksum>0</mfp:appChecksum>
</mfp:windows>
<mfp:platformVersion>8.0.0.00-20210905-154328</mfp:platformVersion>
<mfp:clientCustomInit enabled="false" />
<mfp:server runtime="mfp" url="http://gpr-dev-10.gabinetedigital.local:9080" />
<mfp:serverUri url="" />
<mfp:directUpdateAuthenticityPublicKey />
<mfp:languagePreferences>en</mfp:languagePreferences>
<mfp:APIproxyURL>/adapters/MobileAPIProxy</mfp:APIproxyURL>
<mfp:SDKProtocolVersion>2</mfp:SDKProtocolVersion>
<allow-navigation href="http://localhost:8100" sessionid="9714472a" /> <allow-navigation href="http://localhost:8100" sessionid="9714472a" />
<allow-navigation href="http://localhost:8101" sessionid="4721f88c" /> <allow-navigation href="http://localhost:8101" sessionid="4721f88c" />
<plugin name="cordova-plugin-dbcopy" spec="https://github.com/an-rahulpandey/cordova-plugin-dbcopy.git" /> <plugin name="cordova-plugin-dbcopy" spec="https://github.com/an-rahulpandey/cordova-plugin-dbcopy.git" />
+3 -11
View File
@@ -1,17 +1,9 @@
{ {
"name": "gabinete-digital", "name": "gabinete-digital",
"integrations": { "integrations": {
"cordova": {} "cordova": {},
"capacitor": {}
}, },
"type": "angular", "type": "angular",
"proxies":[ "proxies": []
{
"path": "/mfp/api/imfpush/",
"proxyUrl": "http://gpr-dev-10.gabinetedigital.local:9080/mfp/api/imfpush/"
},
{
"path": "/mfp/api",
"proxyUrl": "http://gpr-dev-10.gabinetedigital.local:9080/mfp/api"
}
]
} }
+218 -1624
View File
File diff suppressed because it is too large Load Diff
+3 -5
View File
@@ -31,6 +31,8 @@
"@angular/platform-browser": "~12.1.2", "@angular/platform-browser": "~12.1.2",
"@angular/platform-browser-dynamic": "~12.1.2", "@angular/platform-browser-dynamic": "~12.1.2",
"@angular/router": "~12.1.2", "@angular/router": "~12.1.2",
"@capacitor/android": "3.3.0",
"@capacitor/core": "^3.3.0",
"@fortawesome/angular-fontawesome": "^0.9.0", "@fortawesome/angular-fontawesome": "^0.9.0",
"@fortawesome/fontawesome-free": "^5.15.3", "@fortawesome/fontawesome-free": "^5.15.3",
"@fortawesome/fontawesome-svg-core": "^1.2.35", "@fortawesome/fontawesome-svg-core": "^1.2.35",
@@ -95,8 +97,6 @@
"global": "^4.4.0", "global": "^4.4.0",
"hammerjs": "^2.0.8", "hammerjs": "^2.0.8",
"http-server": "^0.12.3", "http-server": "^0.12.3",
"ibm-mfp-web-push": "^8.0.2020052213",
"ibm-mfp-web-sdk": "^8.0.2021021706",
"ionic-angular": "^3.9.10", "ionic-angular": "^3.9.10",
"ionic-selectable": "^4.7.1", "ionic-selectable": "^4.7.1",
"ionic2-alpha-scroll": "^2.0.1", "ionic2-alpha-scroll": "^2.0.1",
@@ -129,6 +129,7 @@
"@angular/compiler": "^12.1.2", "@angular/compiler": "^12.1.2",
"@angular/compiler-cli": "^12.1.2", "@angular/compiler-cli": "^12.1.2",
"@angular/language-service": "^12.1.2", "@angular/language-service": "^12.1.2",
"@capacitor/cli": "^3.3.0",
"@ionic/angular-toolkit": "^4.0.0", "@ionic/angular-toolkit": "^4.0.0",
"@ionic/lab": "3.1.7", "@ionic/lab": "3.1.7",
"@types/jasmine": "~3.6.0", "@types/jasmine": "~3.6.0",
@@ -155,9 +156,7 @@
"cordova-plugin-ionic-webview": "^5.0.0", "cordova-plugin-ionic-webview": "^5.0.0",
"cordova-plugin-media": "^5.0.3", "cordova-plugin-media": "^5.0.3",
"cordova-plugin-media-capture": "^3.0.3", "cordova-plugin-media-capture": "^3.0.3",
"cordova-plugin-mfp": "^8.0.2021031007",
"cordova-plugin-network-information": "^3.0.0", "cordova-plugin-network-information": "^3.0.0",
"cordova-plugin-screen-orientation": "^3.0.2",
"cordova-plugin-splashscreen": "^5.0.2", "cordova-plugin-splashscreen": "^5.0.2",
"cordova-plugin-statusbar": "^2.4.2", "cordova-plugin-statusbar": "^2.4.2",
"cordova-plugin-streaming-media": "^2.3.0", "cordova-plugin-streaming-media": "^2.3.0",
@@ -190,7 +189,6 @@
"cordova-plugin-inappbrowser": {}, "cordova-plugin-inappbrowser": {},
"cordova-sqlite-storage": {}, "cordova-sqlite-storage": {},
"cordova-plugin-compat": {}, "cordova-plugin-compat": {},
"cordova-plugin-mfp": {},
"cordova-plugin-androidx": {}, "cordova-plugin-androidx": {},
"cordova-plugin-androidx-adapter": {}, "cordova-plugin-androidx-adapter": {},
"cordova-plugin-fingerprint-aio": {}, "cordova-plugin-fingerprint-aio": {},
+1 -3
View File
@@ -18,8 +18,6 @@ npm install -g cordova
npm install -g cordova-res npm install -g cordova-res
## Mobile first dependencies ## Mobile first dependencies
cordova plugin add cordova-plugin-mfp-jsonstore
cordova plugin add cordova-plugin-mfp
ionic cordova plugin add cordova-plugin-network-information ionic cordova plugin add cordova-plugin-network-information
## memory leak ## memory leak
@@ -76,4 +74,4 @@ npm run dev:share
For major changes, please open an issue first to discuss what you would like to change. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate. Please make sure to update tests as appropriate.
+1 -56
View File
@@ -1,7 +1,5 @@
/* eslint-disable */ /* eslint-disable */
/* tslint:disable */ /* tslint:disable */
///<reference path="../../../plugins/cordova-plugin-mfp/typings/worklight.d.ts" />
/* ///<reference path="../../../plugins/cordova-plugin-mfp-push/typings/mfppush.d.ts" /> */
import { Component, OnInit, NgZone } from '@angular/core'; import { Component, OnInit, NgZone } from '@angular/core';
import { Event } from '../models/event.model'; import { Event } from '../models/event.model';
import { NotificationsService } from '../services/notifications.service'; import { NotificationsService } from '../services/notifications.service';
@@ -26,8 +24,6 @@ import { Storage } from '@ionic/storage';
import { EventsService } from 'src/app/services/events.service'; import { EventsService } from 'src/app/services/events.service';
import { ScreenOrientation } from '@ionic-native/screen-orientation/ngx'; import { ScreenOrientation } from '@ionic-native/screen-orientation/ngx';
import { FirebaseX } from '@ionic-native/firebase-x/ngx';
@Component({ @Component({
selector: 'app-home', selector: 'app-home',
@@ -88,8 +84,7 @@ export class HomePage implements OnInit {
private offlinemanager: OfflineManagerService, private offlinemanager: OfflineManagerService,
private storage: Storage, private storage: Storage,
private eventservice: EventsService, private eventservice: EventsService,
private screenOrientation: ScreenOrientation, private screenOrientation: ScreenOrientation) {
private firebaseX: FirebaseX) {
this.webNotificationPopupService.askNotificationPermission() this.webNotificationPopupService.askNotificationPermission()
@@ -121,22 +116,11 @@ export class HomePage implements OnInit {
this.notificationsService.onReceviNotification(); this.notificationsService.onReceviNotification();
this.firebaseX.getToken()
.then(token => console.log(`The token is ${token}`)) // save the token server-side and use it to push notifications to this device
.catch(error => console.error('Error getting token', error));
this.firebaseX.onMessageReceived()
.subscribe(data => console.log(`User opened a notification ${data}`));
this.firebaseX.onTokenRefresh()
.subscribe((token: string) => console.log(`Got a new token ${token}`));
window.addEventListener('online', () => { window.addEventListener('online', () => {
console.log('Became online') console.log('Became online')
this.backgroundservice.online() this.backgroundservice.online()
if (this.platform.is('desktop') || this.platform.is('mobileweb')) { if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
this.webnotification.webconnection(); this.webnotification.webconnection();
this.webnotification.register();
} else { } else {
this.notificationsService.onReceviNotification(); this.notificationsService.onReceviNotification();
//this.mobilefirstConnect(); //this.mobilefirstConnect();
@@ -160,45 +144,6 @@ export class HomePage implements OnInit {
myWorker.postMessage('ali'); */ myWorker.postMessage('ali'); */
} }
/* mobilefirstConnect() {
console.log("Mobileconecct");
if (window['WLAuthorizationManager']) {
if (window['WLAuthorizationManager'].obtainAccessToken) {
window['WLAuthorizationManager'].obtainAccessToken("").then((token) => {
console.log('MobileFirst Server connect: Success ' + token);
var resourceRequest = new WLResourceRequest("/adapters/javaAdapter/resource/greet/",
WLResourceRequest.GET
);
resourceRequest.setQueryParameter("name", "world");
resourceRequest.send().then(
(response) => {
// Will display "Hello world" in an alert dialog.
console.log("Connect with JavaAdapter Success: " + response.responseText);
//this.MFPushNotification();
},
(error) => {
console.log("Connect with JavaAdapter Failure: " + JSON.stringify(error));
}
);
}, (error) => {
console.log('MobileFirst Server connect: failure ' + error.responseText);
console.log(JSON.stringify(error))
/* this.zone.run(() => {
console.log("Bummer...");
console.log("Failed to connect to MobileFirst Server");
});
});
}
}
} */
updateList() { updateList() {
this.notificationsService.registerCallback( this.notificationsService.registerCallback(
+2 -3
View File
@@ -1,13 +1,12 @@
<ion-content> <ion-content>
<div class="main-content d-flex height-100"> <div class="main-content d-flex height-100">
<div class="content d-flex flex-column width-100"> <div class="content d-flex flex-column width-100">
<div class="header-content pb-20"> <div class="header-content pb-20">
<div class="header-title"> <div class="header-title">
<label>Delegar</label> <label>Delegar</label>
</div> </div>
</div> </div>
<div class="overflow-y-auto"> <div>
<div class="container-div"> <div class="container-div">
<div class="ion-item-class-2"> <div class="ion-item-class-2">
@@ -54,7 +53,7 @@
</ion-label> </ion-label>
</div> </div>
<div class="content width-100 overflow-y-auto height-100"> <div *ngIf="hideThisFeature" class="content width-100 overflow-y-auto height-100">
<div class="list"> <div class="list">
<ion-list *ngFor="let document of documents; let i = index"> <ion-list *ngFor="let document of documents; let i = index">
<ion-item> <ion-item>
+1 -1
View File
@@ -97,7 +97,7 @@ export class DelegarPage implements OnInit {
let body = { let body = {
"SerialNumber": this.task.SerialNumber, "SerialNumber": this.task.SerialNumber,
"DispatchDocId": this.task.DocId, "DispatchDocId": this.task.DocId,
"FolderID": this.task.FolderId, "FolderID": this.task.FolderId || this.task.FolderID,
"Subject": this.task.Folio, "Subject": this.task.Folio,
"Comment": this.note, "Comment": this.note,
"DelegatedUserEmail": this.taskParticipants[0].EmailAddress, "DelegatedUserEmail": this.taskParticipants[0].EmailAddress,
+4 -6
View File
@@ -1,5 +1,3 @@
///<reference path="../../../../plugins/cordova-plugin-mfp/typings/worklight.d.ts" />
/* ///<reference path="../../../../plugins/cordova-plugin-mfp-jsonstore/typings/jsonstore.d.ts" /> */
import { Component, OnInit, NgZone } from '@angular/core'; import { Component, OnInit, NgZone } from '@angular/core';
import { Router, NavigationExtras } from '@angular/router'; import { Router, NavigationExtras } from '@angular/router';
import { AnimationController, ModalController,Platform } from '@ionic/angular'; import { AnimationController, ModalController,Platform } from '@ionic/angular';
@@ -132,7 +130,7 @@ export class ProfilePage implements OnInit {
Status: element.Status Status: element.Status
} }
} }
this.DataArray.push(notificationObject) this.DataArray.push(notificationObject)
}); });
@@ -168,7 +166,7 @@ export class ProfilePage implements OnInit {
else if (Service === "agenda" && Object === "event-list") { else if (Service === "agenda" && Object === "event-list") {
//this.zone.run(() => this.router.navigate(['/home/gabinete-digital/event-list/approve-event',IdObject, 'agenda'])); //this.zone.run(() => this.router.navigate(['/home/gabinete-digital/event-list/approve-event',IdObject, 'agenda']));
this.zone.run(() =>this.router.navigate(['/home/agenda/event-list/approve-event',IdObject, 'agenda'])); this.zone.run(() =>this.router.navigate(['/home/agenda/event-list/approve-event',IdObject, 'agenda']));
} else if (Service === "gabinete-digital" && Object === "despachos") { } else if (Service === "gabinete-digital" && Object === "despachos") {
this.zone.run(() => this.router.navigate(['/home/gabinete-digital/despachos', IdObject, 'gabinete-digital'], { replaceUrl: true })); this.zone.run(() => this.router.navigate(['/home/gabinete-digital/despachos', IdObject, 'gabinete-digital'], { replaceUrl: true }));
@@ -195,7 +193,7 @@ export class ProfilePage implements OnInit {
this.zone.run(() => this.router.navigate(['/home/gabinete-digital/diplomas', IdObject, 'gabinete-digital'])); this.zone.run(() => this.router.navigate(['/home/gabinete-digital/diplomas', IdObject, 'gabinete-digital']));
} }
else if (Service === "gabinete-digital" && Object === "diplomas-assinar") { else if (Service === "gabinete-digital" && Object === "diplomas-assinar") {
this.zone.run(() => this.router.navigate(['/home/gabinete-digital/diplomas-assinar',IdObject,'gabinete-digital'])); this.zone.run(() => this.router.navigate(['/home/gabinete-digital/diplomas-assinar',IdObject,'gabinete-digital']));
} }
else if (Service === "gabinete-digital" && Object === "expedientes-pr") { else if (Service === "gabinete-digital" && Object === "expedientes-pr") {
@@ -215,7 +213,7 @@ export class ProfilePage implements OnInit {
deleteNotification(index){ deleteNotification(index){
console.log("Delete notification first stata", this.notificationdata) console.log("Delete notification first stata", this.notificationdata)
this.notificationdata = this.notificationdata.filter(item=>item.index !=index ); this.notificationdata = this.notificationdata.filter(item=>item.index !=index );
this.storageservice.store("Notifications",JSON.stringify(this.notificationdata)).then(() =>{ this.storageservice.store("Notifications",JSON.stringify(this.notificationdata)).then(() =>{
this.storageservice.get("Notifications").then((value) =>{ this.storageservice.get("Notifications").then((value) =>{
console.log("notfication state", value, ) console.log("notfication state", value, )
+1 -1
View File
@@ -339,7 +339,7 @@
<div *ngFor="let event of events.value" class="EventListBox" > <div *ngFor="let event of events.value" class="EventListBox" >
<div class="d-flex content-pr-{{event.event.CalendarName}} mt-10 cursor-pointer item hover" (click)="eventClicked(event)"> <div class="d-flex content-pr-{{event.event.CalendarName}} mt-10 cursor-pointer item-hover" (click)="eventClicked(event)">
<div class="schedule-time" *ngIf="!event.event.IsAllDayEvent"> <div class="schedule-time" *ngIf="!event.event.IsAllDayEvent">
<div *ngIf="!event.endMany && !event.middle" class="time-start">{{event.event.StartDate | date: 'HH:mm'}}</div> <div *ngIf="!event.endMany && !event.middle" class="time-start">{{event.event.StartDate | date: 'HH:mm'}}</div>
+2 -2
View File
@@ -96,7 +96,7 @@ ion-content{
margin-top: 10px; margin-top: 10px;
} }
.item-title{ .item-title{
width: calc(100% - 80px); width: calc(100% - 90px);
float: left; float: left;
font-size: 15px; font-size: 15px;
color: var(--title-text-color); color: var(--title-text-color);
@@ -105,7 +105,7 @@ ion-content{
color: #fff; color: #fff;
} }
.item-date{ .item-date{
width: 80px; width: 90px;
float: right; float: right;
font-size: 13px; font-size: 13px;
color: #797979; color: #797979;
+21 -3
View File
@@ -29,6 +29,7 @@ import { environment } from 'src/environments/environment';
import { NotificationsService } from 'src/app/services/notifications.service'; import { NotificationsService } from 'src/app/services/notifications.service';
import { TimeService } from 'src/app/services/functions/time.service'; import { TimeService } from 'src/app/services/functions/time.service';
import { ThemeService } from 'src/app/services/theme.service' import { ThemeService } from 'src/app/services/theme.service'
import { DataService } from 'src/app/services/data.service';
@Component({ @Component({
@@ -115,7 +116,9 @@ export class ChatPage implements OnInit {
private resolver: ComponentFactoryResolver, private resolver: ComponentFactoryResolver,
private route: Router, private route: Router,
private timeService: TimeService, private timeService: TimeService,
public ThemeService: ThemeService public ThemeService: ThemeService,
private dataService:DataService,
private router: Router,
){ ){
this.loggedUserChat = authService.ValidatedUserChat['data']; this.loggedUserChat = authService.ValidatedUserChat['data'];
this.headers = new HttpHeaders(); this.headers = new HttpHeaders();
@@ -150,6 +153,21 @@ export class ChatPage implements OnInit {
console.log(t); console.log(t);
this.setStatus('away'); this.setStatus('away');
if(this.dataService.get("newGroup")){
this.openNewGroupPage();
}
this.router.events.forEach((event) => {
if (event instanceof NavigationStart && event.url.startsWith('/home/chat')) {
if (window.location.pathname.split('/').length >= 4 && window.location.pathname.startsWith('/home/chat')) {
alert('OIII')
} else {
if(this.dataService.get("newGroup")){
this.openNewGroupPage();
}
}
}
});
} }
ngOnDestroy(){ ngOnDestroy(){
@@ -397,7 +415,7 @@ hideRefreshButton(){
//console.log('TIMER'); //console.log('TIMER');
//Check if modal is opened //Check if modal is opened
if(this.segment == "Contactos" && this.showMessages != true){ if(this.segment == "Contactos" && this.showMessages != true){
await new Promise(resolve => setTimeout(resolve, 2000)); await new Promise(resolve => setTimeout(resolve, 1000));
await this.getDirectMessages(); await this.getDirectMessages();
//console.log('Timer contactos list running') //console.log('Timer contactos list running')
} }
@@ -453,7 +471,7 @@ hideRefreshButton(){
else { else {
//Check if modal is opened //Check if modal is opened
if(this.segment == "Grupos" && this.showGroupMessages != true){ if(this.segment == "Grupos" && this.showGroupMessages != true){
await new Promise(resolve => setTimeout(resolve, 2000)); await new Promise(resolve => setTimeout(resolve, 1000));
await this.getGroups(); await this.getGroups();
//console.log('Timer groups list running') //console.log('Timer groups list running')
} }
@@ -126,6 +126,7 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
ngAfterViewInit() { ngAfterViewInit() {
this.scrollChangeCallback = () => this.onContentScrolled(event); this.scrollChangeCallback = () => this.onContentScrolled(event);
window.addEventListener('scroll', this.scrollChangeCallback, true); window.addEventListener('scroll', this.scrollChangeCallback, true);
this.roomCountDownDate = this.timeService.countDownDate(this.room.customFields.countDownDate, this.room._id);
} }
handlePress(id?:string){ handlePress(id?:string){
@@ -184,7 +185,7 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
this.room = room['room']; this.room = room['room'];
this.roomName = this.room.name.split('-').join(' '); this.roomName = this.room.name.split('-').join(' ');
if(this.room.customFields.countDownDate){ if(this.room.customFields.countDownDate){
this.roomCountDownDate = this.timeService.countDownDate(this.room.customFields.countDownDate, this.room._id); this.roomCountDownDate = this.timeService.countDownDateTimer(this.room.customFields.countDownDate, this.room._id);
} }
this.getGroupContacts(this.room); this.getGroupContacts(this.room);
this.loadGroupMessages(this.room); this.loadGroupMessages(this.room);
@@ -260,7 +261,8 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
return this.timeService.showDateDuration(start); return this.timeService.showDateDuration(start);
} }
countDownDate(date:any, roomId:string){ countDownDate(date:any, roomId:string){
return this.timeService.countDownDate(date, roomId); this.roomCountDownDate = this.timeService.countDownDate(date, roomId);
return this.timeService.countDownDateTimer(date, roomId);
} }
addZero(i) { addZero(i) {
@@ -32,7 +32,7 @@
</div> </div>
<div *ngIf="showDuration" class="container-div"> <div *ngIf="showDuration" class="container-div">
<div class="ion-item-class-2"> <div class="ion-item-class-2 width-100">
<div class="ion-icon-class"> <div class="ion-icon-class">
<ion-icon slot="start" src="assets/images/icons-duration.svg"></ion-icon> <ion-icon slot="start" src="assets/images/icons-duration.svg"></ion-icon>
</div> </div>
@@ -61,7 +61,7 @@ ion-content{
.middle{ .middle{
padding: 0!important; padding: 0!important;
float: left; float: left;
width: 221px; width:fit-content;
margin: 2.5px 0 0 5px; margin: 2.5px 0 0 5px;
} }
.btn-criar{ .btn-criar{
@@ -115,7 +115,6 @@ ion-content{
.item-container-no-border{ .item-container-no-border{
display: flex; display: flex;
width: 360px;
margin: 25px auto; margin: 25px auto;
border-radius: 5px; border-radius: 5px;
align-items: center; align-items: center;
@@ -133,8 +132,8 @@ ion-content{
overflow: auto; overflow: auto;
.ion-item-class-2{ .ion-item-class-2{
width: 360px;
margin: 0px auto; margin: 0px auto;
overflow: auto;
.ion-icon-class{ .ion-icon-class{
width: 45px; width: 45px;
@@ -145,7 +144,7 @@ ion-content{
} }
} }
.ion-input-class{ .ion-input-class{
width: 315px; width: calc(100% - 45px) !important;
height: 45px; height: 45px;
border: 1px solid #ebebeb; border: 1px solid #ebebeb;
border-radius: 5px; border-radius: 5px;
@@ -52,6 +52,7 @@ export class NewGroupPage implements OnInit {
createGroup(){ createGroup(){
let name = this.groupName.split(' ').join('-'); let name = this.groupName.split(' ').join('-');
name = name.normalize("NFD").replace(/[\u0300-\u036f]/g, "");
let body = { "name":name, } let body = { "name":name, }
this.chatService.addGroup(body).subscribe(res=>{ this.chatService.addGroup(body).subscribe(res=>{
console.log('group created'); console.log('group created');
@@ -186,6 +186,7 @@ export class DespachoPage implements OnInit {
this.sqliteservice.updateProcess(res); this.sqliteservice.updateProcess(res);
} }
} }
updateProcessInterveners(users) { updateProcessInterveners(users) {
if (this.platform.is('desktop') || this.platform.is('mobileweb')) { if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
} else { } else {
@@ -356,6 +357,32 @@ export class DespachoPage implements OnInit {
} }
async generateDiploma(note:string, documents:any) {
let body = {
"serialNumber": this.serialnumber,
"action": "Reencaminhar",
"ActionTypeId": 99999839,
"dataFields": {
"ReviewUserComment": note,
},
"AttachmentList" :documents,
}
const loader = this.toastService.loading()
try {
await this.processes.CompleteTask(body).toPromise()
this.toastService.successMessage()
this.close();
} catch (error) {
this.toastService.badRequest()
} finally {
loader.remove()
}
}
toDateString(e) { toDateString(e) {
return new Date(e).toDateString() return new Date(e).toDateString()
} }
@@ -417,6 +444,9 @@ export class DespachoPage implements OnInit {
else if (actionName == 'Reexecução') { else if (actionName == 'Reexecução') {
await this.reexecute(res.data.note, docs); await this.reexecute(res.data.note, docs);
this.goBack(); this.goBack();
} else if(actionName == 'Gerar Diploma') {
await this.generateDiploma(res.data.note, docs);
this.goBack();
} }
} }
}); });
@@ -488,7 +518,13 @@ export class DespachoPage implements OnInit {
}); });
await modal.present(); await modal.present();
modal.onDidDismiss().then(res => { modal.onDidDismiss().then(res => {
this.goBack(); if(res){
const data = res.data;
if(data == 'close') {
this.goBack();
}
}
}); });
} }
@@ -533,4 +569,5 @@ export class DespachoPage implements OnInit {
return await popover.present(); return await popover.present();
} }
} }
@@ -104,6 +104,7 @@
<button *ngIf="!p.userRole(['PR'])" (click)="attachDocument()" class="btn-cancel" shape="round" >Anexar Documentos</button> <button *ngIf="!p.userRole(['PR'])" (click)="attachDocument()" class="btn-cancel" shape="round" >Anexar Documentos</button>
<button (click)="distartExpedientModal('descartar')" class="btn-cancel" shape="round" >Descartar</button> <button (click)="distartExpedientModal('descartar')" class="btn-cancel" shape="round" >Descartar</button>
<button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" full class="btn-cancel" shape="round" >Enviar para pendentes</button> <button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" full class="btn-cancel" shape="round" >Enviar para pendentes</button>
<button (click)="openNewGroupPage()" class="btn-cancel" shape="round" >Inicair Conversa</button>
<div class="solid"></div> <div class="solid"></div>
</div> </div>
</div> </div>
@@ -30,6 +30,8 @@ import { ThemeService } from 'src/app/services/theme.service'
import { SqliteService } from 'src/app/services/sqlite.service'; import { SqliteService } from 'src/app/services/sqlite.service';
import { Platform } from '@ionic/angular'; import { Platform } from '@ionic/angular';
import { BackgroundService } from 'src/app/services/background.service'; import { BackgroundService } from 'src/app/services/background.service';
import { NewGroupPage } from 'src/app/pages/chat/new-group/new-group.page';
import { DataService } from 'src/app/services/data.service';
@Component({ @Component({
selector: 'app-expediente-detail', selector: 'app-expediente-detail',
@@ -77,7 +79,8 @@ export class ExpedienteDetailPage implements OnInit {
public platform: Platform, public platform: Platform,
private sqliteservice: SqliteService, private sqliteservice: SqliteService,
private backgroundservice: BackgroundService, private backgroundservice: BackgroundService,
public ThemeService: ThemeService public ThemeService: ThemeService,
private dataService: DataService,
) { ) {
this.activatedRoute.paramMap.subscribe(params => { this.activatedRoute.paramMap.subscribe(params => {
if (params["params"].SerialNumber) { if (params["params"].SerialNumber) {
@@ -612,4 +615,30 @@ export class ExpedienteDetailPage implements OnInit {
return await popover.present(); return await popover.present();
} }
openNewGroupPage(){
this.router.navigate(['/home/chat']);
this.dataService.set("newGroup", true);
if( window.innerWidth < 801){
this.newGroup();
}
else{
this.dataService.set("newGroup", true);
/* this.closeAllDesktopComponents();
this.showNewGroup=true; */
}
}
async newGroup(){
const modal = await this.modalController.create({
component: NewGroupPage,
cssClass: 'modal modal-desktop',
componentProps: {
name: this.task.Folio,
},
});
await modal.present();
modal.onDidDismiss();
}
} }
+1 -1
View File
@@ -6,7 +6,7 @@ import { EventPerson } from 'src/app/models/eventperson.model'
}) })
export class ParticipantsPipe implements PipeTransform { export class ParticipantsPipe implements PipeTransform {
transform(EventPerson: EventPerson[]): any { transform(EventPerson: EventPerson[] = []): any {
let taskParticipants = []; let taskParticipants = [];
let taskParticipantsCc = []; let taskParticipantsCc = [];
+34 -1
View File
@@ -49,7 +49,7 @@ export class TimeService {
let c_minutes = Math.floor((difference % (1000*60*60)) / (1000*60)); let c_minutes = Math.floor((difference % (1000*60*60)) / (1000*60));
let c_seconds = Math.floor((difference % (1000*60)) / 1000); let c_seconds = Math.floor((difference % (1000*60)) / 1000);
this.countDownTime = c_day + " : " + c_hours + " : " + c_minutes + " : " + c_seconds ; this.countDownTime = this.addZero(c_day) + " : " + this.addZero(c_hours) + " : " + this.addZero(c_minutes) + " : " + this.addZero(c_seconds) ;
if(difference < 0){ if(difference < 0){
//clearInterval(timer); //clearInterval(timer);
@@ -74,6 +74,39 @@ export class TimeService {
return this.countDownTime; return this.countDownTime;
} }
countDownDateTimer(date:any, roomId:string){
let timer = setInterval(() =>{
let difference = new Date(date).getTime() - new Date().getTime();
let c_day = Math.floor(difference/(1000*60*60*24));
let c_hours = Math.floor((difference % (1000*60*60*24)) / (1000*60*60));
let c_minutes = Math.floor((difference % (1000*60*60)) / (1000*60));
let c_seconds = Math.floor((difference % (1000*60)) / 1000);
this.countDownTime = this.addZero(c_day) + " : " + this.addZero(c_hours) + " : " + this.addZero(c_minutes) + " : " + this.addZero(c_seconds) ;
if(difference < 0){
clearInterval(timer);
this.countDownTime = "Expired";
let body = { "roomId":roomId, }
this.chatService.getRoomInfo(roomId).subscribe(room=>{
this.room = room['room'];
if(this.room.t === 'p'){
this.chatService.deleteGroup(body).subscribe(res=>{
console.log(res);
});
}
else{
this.chatService.deleteChannel(body).subscribe(res=>{
console.log(res);
});
}
});
}
})
return this.countDownTime;
}
addZero(i) { addZero(i) {
if (i < 10) { if (i < 10) {
i = "0" + i; i = "0" + i;
+15 -17
View File
@@ -1,5 +1,3 @@
///<reference path="../../../plugins/cordova-plugin-mfp/typings/worklight.d.ts" />
/* ///<reference path="../../../plugins/cordova-plugin-mfp-jsonstore/typings/jsonstore.d.ts" /> */
import { Injectable } from "@angular/core"; import { Injectable } from "@angular/core";
@Injectable({ @Injectable({
@@ -8,7 +6,7 @@ import { Injectable } from "@angular/core";
export class JsonStore { export class JsonStore {
/* createCollection(name, data) { /* createCollection(name, data) {
var collectionName = name; var collectionName = name;
var addOptions = { var addOptions = {
@@ -32,7 +30,7 @@ export class JsonStore {
console.log(err) console.log(err)
}); });
} } */
getCollection(collectionName) { getCollection(collectionName) {
@@ -50,11 +48,11 @@ export class JsonStore {
JSONStoreCollections[collectionName] = {}; JSONStoreCollections[collectionName] = {};
JSONStoreCollections[collectionName].searchFields = { UserId: 'integer' }; JSONStoreCollections[collectionName].searchFields = { UserId: 'integer' };
WL.JSONStore.init(JSONStoreCollections) /* WL.JSONStore.init(JSONStoreCollections)
.then(function () { .then(function () {
WL.Logger.debug('Find all colletion data'); WL.Logger.debug('Find all colletion data');
console.log('Find all colletion data'); console.log('Find all colletion data');
}).fail(function (err) { }).fail(function (err) {
WL.Logger.error(err); WL.Logger.error(err);
@@ -66,8 +64,8 @@ export class JsonStore {
return JSON.parse(value); return JSON.parse(value);
}); });
return data return data */
//return notificationData //return notificationData
} }
@@ -90,7 +88,7 @@ export class JsonStore {
JSONStoreCollections[collectionName] = {}; JSONStoreCollections[collectionName] = {};
JSONStoreCollections[collectionName].searchFields = { UserId: 'integer' }; JSONStoreCollections[collectionName].searchFields = { UserId: 'integer' };
WL.JSONStore.init(JSONStoreCollections) /* WL.JSONStore.init(JSONStoreCollections)
.then(function () { .then(function () {
WL.Logger.debug('Find colletion data by id'); WL.Logger.debug('Find colletion data by id');
console.log('Find colletion data by id'); console.log('Find colletion data by id');
@@ -101,30 +99,30 @@ export class JsonStore {
}).fail(function (err) { }).fail(function (err) {
WL.Logger.error(err); WL.Logger.error(err);
console.log(err) console.log(err)
}); }); */
} }
replaceDocument(collectionName: string, document: any) { replaceDocument(collectionName: string, document: any) {
/* var document = { Example of how identify the document to replace /* var document = { Example of how identify the document to replace
_id: 1, json: {name: 'chevy', age: 23} _id: 1, json: {name: 'chevy', age: 23}
}; };
var options = {}; var options = {};
WL.JSONStore.get(collectionName).replace(document, options).then(function (numberOfDocsReplaced) { /* WL.JSONStore.get(collectionName).replace(document, options).then(function (numberOfDocsReplaced) {
console.log("JsonStore replace document sucess: ", numberOfDocsReplaced) console.log("JsonStore replace document sucess: ", numberOfDocsReplaced)
}).fail(function (error) { }).fail(function (error) {
console.log("JsonStore replace document error: ", error) console.log("JsonStore replace document error: ", error)
}); }); */
} }
removeDocument(collectionName: any,query: any,) { removeDocument(collectionName: any,query: any,) {
/* var query = { _id: 1 }; Exemple of query /* var query = { _id: 1 }; Exemple of query
var options = { exact: true }; var options = { exact: true };
WL.JSONStore.get(collectionName).remove(query, options).then(function (numberOfDocsRemoved) { /* WL.JSONStore.get(collectionName).remove(query, options).then(function (numberOfDocsRemoved) {
console.log("JsonStore remove document sucess: ", numberOfDocsRemoved) console.log("JsonStore remove document sucess: ", numberOfDocsRemoved)
}).fail(function (error) { }).fail(function (error) {
console.log("JsonStore remove document erro: ", error) console.log("JsonStore remove document erro: ", error)
}); }); */
} */ }
} }
+31 -86
View File
@@ -1,6 +1,5 @@
/* eslint-disable */ /* eslint-disable */
/* tslint:disable */ /* tslint:disable */
/* ///<reference path="../../../plugins/cordova-plugin-mfp-push/typings/mfppush.d.ts" /> */
import { Injectable, NgZone } from '@angular/core'; import { Injectable, NgZone } from '@angular/core';
import { ActivatedRoute } from '@angular/router' import { ActivatedRoute } from '@angular/router'
import { HttpClient } from '@angular/common/http'; import { HttpClient } from '@angular/common/http';
@@ -48,10 +47,11 @@ export class NotificationsService {
private activeroute: ActivatedRoute, private activeroute: ActivatedRoute,
private jsonstore: JsonStore, private jsonstore: JsonStore,
private eventtrigger: EventTrigger, private eventtrigger: EventTrigger,
private backgroundservice: BackgroundService, private backgroundservice: BackgroundService) {
private fcm: FCM) {
this.storageService.get("Notifications").then((value) => { this.storageService.get("Notifications").then((value) => {
}).catch(()=>{
}).catch(() => { }).catch(() => {
@@ -88,63 +88,6 @@ export class NotificationsService {
return this.http.get<Token[]>(`${geturl}`); return this.http.get<Token[]>(`${geturl}`);
} }
getAndpostToken(username) {
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
console.log('Notifications not supported')
} else {
const geturl = environment.apiURL + 'notifications/token';
return this.fcm.getToken().then(token => {
console.log('token: ', token)
this.storageService.store(username, token);
this.storageService.get(username).then(value => {
console.log('STORAGE TOKEN', value)
this.storageService.get(AuthConnstants.USER).then(res => {
console.log('USERID', res);
const headers = { 'Authorization': SessionStore.user.BasicAuthKey };
const body = {
UserId: res.UserId,
TokenId: token,
Status: 1,
Service: 1
};
this.http.post<Token>(`${geturl}`, body, { headers }).subscribe(data => {
console.log('TOKEN USER MIDLE', data);
})
});
});
});
}
}
async onReceviNotification() {
this.fcm.onNotification().subscribe(data => {
if (data.click_action) {
console.log("Received in background: ", data);
this.notificatinsRoutes(data)
} else {
console.log("Received in foreground: ", data);
console.log(data.Service)
console.log(data.Object)
console.log(data.IdObject)
/* this.DataArray.push(data)
console.log("On ReceiveNotification", this.DataArray)
this.storageService.store("Notifications", this.DataArray) */
};
});
}
///////////////////////////////////////////////////// /////////////////////////////////////////////////////
/* getTokenByUserIdAndId(user, userID) { /* getTokenByUserIdAndId(user, userID) {
@@ -226,7 +169,6 @@ export class NotificationsService {
window['WLAuthorizationManager'].obtainAccessToken("push.mobileclient").then( window['WLAuthorizationManager'].obtainAccessToken("push.mobileclient").then(
(token) => { (token) => {
console.log('Push Notification: Success ' + token); console.log('Push Notification: Success ' + token);
window['MFPPush'].initialize( window['MFPPush'].initialize(
function (successResponse) { function (successResponse) {
console.log("Push notification Successfully intialized: " + successResponse); console.log("Push notification Successfully intialized: " + successResponse);
@@ -236,30 +178,33 @@ export class NotificationsService {
console.log("Push notification failure intialized: " + failureResponse); console.log("Push notification failure intialized: " + failureResponse);
} }
); );
var notificationReceived = (message) => {
//this.jsonstore.createCollection('Notifications',message); window['MFPPush'].registerDevice(null, async (successResponse) => {
this.DataArray.push(message) console.log("Successfully registered: " + JSON.stringify(successResponse));
console.log("On ReceiveNotification", this.DataArray) console.log('token: ', successResponse.deviceId)
this.storageService.store("Notifications",this.DataArray) await this.storageService.store(username, successResponse.deviceId).then((tokennoti) => {
console.log('token store',tokennoti)
console.log(message); });
this.eventtrigger.publishSomeData({ await this.storageService.get(username).then(value => {
notification: "recive" console.log('STORAGE TOKEN', value)
}) this.storageService.get(AuthConnstants.USER).then(res => {
var data = JSON.parse(message.payload); console.log('USERID', res);
const headers = { 'Authorization': SessionStore.user.BasicAuthKey };
//synchro.$send(data) const body = {
UserId: res.UserId,
console.log('data.Service', data.Service); // module TokenId: successResponse.deviceId,
console.log('data.IdObject', data.IdObject); // Object id Status: 1,
console.log('data.Object', data.Object); // details Service: 1
};
if(message.actionName){ this.http.post<Token>(`${geturl}`, body, { headers }).subscribe(data => {
this.notificatinsRoutes(data); console.log('TOKEN USER MIDLE', data);
} else { })
/* this.toastService.notificationMessage(message.alert,this.notificatinsRoutes, data); });
//this.notificatinsRoutes(data);
console.log(data) });
},
function (failureResponse) {
console.log("Successfully failue: " + JSON.stringify(failureResponse));
} }
this.callbacks.forEach( e=> { this.callbacks.forEach( e=> {
+1 -3
View File
@@ -14,9 +14,7 @@ export class ToastService {
private modalController: ModalController, private modalController: ModalController,
) { } ) { }
ngOnInit() { ngOnInit() {}
}
async presentToast(infoMessage: string) { async presentToast(infoMessage: string) {
const toast = await this.toastController.create({ const toast = await this.toastController.create({
+10 -71
View File
@@ -7,7 +7,6 @@ import { Token } from '../models/token.model';
import { ModalController, AlertController, AnimationController, Platform } from '@ionic/angular'; import { ModalController, AlertController, AnimationController, Platform } from '@ionic/angular';
import { NavigationExtras, Router } from '@angular/router'; import { NavigationExtras, Router } from '@angular/router';
import { ToastService } from './toast.service'; import { ToastService } from './toast.service';
import MFPPush from 'ibm-mfp-web-push';
@Injectable({ @Injectable({
providedIn: 'root' providedIn: 'root'
@@ -39,18 +38,12 @@ export class WebNotificationsService {
} }
MFPPush.initialize({
appId: "com.gpr.gabinetedigital",
mfpContextRoot: "/mfp",
});
/* MFPPush.initialize({ /* MFPPush.initialize({
appId: "com.gpr.gabinetedigital", appId: "com.gpr.gabinetedigital",
mfpContextRoot: "/mfp", mfpContextRoot: "/mfp",
}); */ }); */
/* MFPPush.registerDevice() /* MFPPush.registerDevice()
.then((res) => { .then((res) => {
console.log("WEB Successfully Registered Device..."); console.log("WEB Successfully Registered Device...");
@@ -72,60 +65,6 @@ export class WebNotificationsService {
}); */ }); */
} }
register(){
MFPPush.registerDevice()
.then((res) => {
console.log("WEB Successfully Registered Device...", res);
})
.catch((err) => {
console.log("WEB Registration Failed" + err);
});
}
async onReceviNotificationWeb() {
if (window['WLAuthorizationManager']) {
if (window['WLAuthorizationManager'].obtainAccessToken) {
window['WLAuthorizationManager'].obtainAccessToken("push.mobileclient").then(
(token) => {
console.log('Push Notification: Success ' + token);
MFPPush.initialize(
function (successResponse) {
console.log("Push notification Successfully intialized: " + successResponse);
MFPPush.registerNotificationsCallback(notificationReceived);
},
function (failureResponse) {
console.log("Push notification failure intialized: " + failureResponse);
}
);
var notificationReceived = (message) => {
console.log(message);
var data = JSON.parse(message.payload);
console.log(data.Service);
console.log(data.IdObject);
console.log(data.Object);
if (message.actionName) {
//this.notificatinsRoutes(data);
console.log("Web notification")
} else {
console.log("Web notification")
//this.toastService.notificationMessage(message.alert,this.notificatinsRoutes, data);
}
}
}, (error) => {
console.log('Push notification recived: failure ' + error.responseText);
console.log(JSON.stringify(error));
}
);
}
}
}
/* getTokenByUserIdAndId(user, userID) { /* getTokenByUserIdAndId(user, userID) {
const geturl = environment.apiURL + 'notifications/user/' + userID; const geturl = environment.apiURL + 'notifications/user/' + userID;
@@ -138,11 +77,11 @@ export class WebNotificationsService {
} else { } else {
const geturl = environment.apiURL + 'notifications/token'; */ const geturl = environment.apiURL + 'notifications/token'; */
/* /*
window['WLAuthorizationManager'].obtainAccessToken("push.mobileclient").then( window['WLAuthorizationManager'].obtainAccessToken("push.mobileclient").then(
(token) => { (token) => {
console.log('Push Notification: Success ' + token); console.log('Push Notification: Success ' + token);
MFPPush.initialize( MFPPush.initialize(
function (successResponse) { function (successResponse) {
console.log("Push notification Successfully Service intialized: " + successResponse); console.log("Push notification Successfully Service intialized: " + successResponse);
@@ -151,7 +90,7 @@ export class WebNotificationsService {
console.log("Push notification failure Service intialized: " + failureResponse); console.log("Push notification failure Service intialized: " + failureResponse);
} }
); );
MFPPush.registerDevice(null, (successResponse) => { MFPPush.registerDevice(null, (successResponse) => {
console.log("Successfully registered: " + JSON.stringify(successResponse)); console.log("Successfully registered: " + JSON.stringify(successResponse));
console.log('token: ', successResponse.deviceId) console.log('token: ', successResponse.deviceId)
@@ -171,7 +110,7 @@ export class WebNotificationsService {
console.log('TOKEN USER MIDLE', data); console.log('TOKEN USER MIDLE', data);
}) })
}); });
}); });
}, },
function (failureResponse) { function (failureResponse) {
@@ -184,14 +123,14 @@ export class WebNotificationsService {
} }
); );
} }
} */ } */
/* /*
async onReceviNotification() { async onReceviNotification() {
window['WLAuthorizationManager'].obtainAccessToken("push.mobileclient").then( window['WLAuthorizationManager'].obtainAccessToken("push.mobileclient").then(
(token) => { (token) => {
console.log('Push Notification: Success ' + token); console.log('Push Notification: Success ' + token);
MFPPush.initialize( MFPPush.initialize(
function (successResponse) { function (successResponse) {
console.log("Push notification Successfully intialized: " + successResponse); console.log("Push notification Successfully intialized: " + successResponse);
@@ -207,13 +146,13 @@ export class WebNotificationsService {
console.log(data.Service); console.log(data.Service);
console.log(data.IdObject); console.log(data.IdObject);
console.log(data.Object); console.log(data.Object);
if(message.actionName){ if(message.actionName){
this.notificatinsRoutes(data); this.notificatinsRoutes(data);
} else { } else {
this.toastService.notificationMessage(message.alert,this.notificatinsRoutes, data); this.toastService.notificationMessage(message.alert,this.notificatinsRoutes, data);
} }
} }
}, (error) => { }, (error) => {
console.log('Push notification recived: failure ' + error.responseText); console.log('Push notification recived: failure ' + error.responseText);
@@ -22,7 +22,7 @@
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/theme/gov/icons-calendar-arrow-left.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/theme/gov/icons-calendar-arrow-left.svg"></ion-icon>
</div> </div>
<div class="header-title flex-grow-1 cursor-pointer"> <div class="header-title flex-grow-1 cursor-pointer">
<label>{{loadedEvent.workflowInstanceDataFields.Subject}} 11</label> <label>{{loadedEvent.workflowInstanceDataFields.Subject}}</label>
</div> </div>
<div (click)="editar(loadedEvent.serialNumber)" class="header-icon-right display-none-{{showAside}}"> <div (click)="editar(loadedEvent.serialNumber)" class="header-icon-right display-none-{{showAside}}">
@@ -88,7 +88,8 @@ export class EditEventToApprovePage implements OnInit {
MDEmail: '', MDEmail: '',
MDName: '', MDName: '',
IsAllDayEvent: false, IsAllDayEvent: false,
Message: '' Message: '',
Status: ''
} }
} }
@@ -295,12 +296,12 @@ export class EditEventToApprovePage implements OnInit {
MDName: this.eventProcess.workflowInstanceDataFields.MDName, MDName: this.eventProcess.workflowInstanceDataFields.MDName,
MDEmail: this.eventProcess.workflowInstanceDataFields.MDEmail, MDEmail: this.eventProcess.workflowInstanceDataFields.MDEmail,
IsAllDayEvent: this.eventProcess.workflowInstanceDataFields.IsAllDayEvent, IsAllDayEvent: this.eventProcess.workflowInstanceDataFields.IsAllDayEvent,
Status: null, Status: this.eventProcess.workflowInstanceDataFields.Status,
EventType: this.eventProcess.workflowInstanceDataFields.EventType, EventType: this.eventProcess.workflowInstanceDataFields.EventType,
IsRecurring: this.eventProcess.workflowInstanceDataFields.IsRecurring, IsRecurring: this.eventProcess.workflowInstanceDataFields.IsRecurring,
Message: this.eventProcess.workflowInstanceDataFields.Message, Message: this.eventProcess.workflowInstanceDataFields.Message,
EventRecurrence: { EventRecurrence: {
Type: this.eventProcess.workflowInstanceDataFields.OccurrenceType, Type: this.eventProcess.workflowInstanceDataFields.OccurrenceType || '-1',
LastOccurrence: this.eventProcess.workflowInstanceDataFields.LastOccurrence, LastOccurrence: this.eventProcess.workflowInstanceDataFields.LastOccurrence,
}, },
ParticipantsList: this.eventProcess.workflowInstanceDataFields.ParticipantsList, ParticipantsList: this.eventProcess.workflowInstanceDataFields.ParticipantsList,
@@ -302,9 +302,8 @@ export class EditEventPage implements OnInit {
SerialNumber: '', SerialNumber: '',
}; };
this.attachmentsService.setEventAttachmentById(DocumentToSave).subscribe(()=>{ await this.attachmentsService.setEventAttachmentById(DocumentToSave).toPromise();
this.getAttachments(this.postEvent.EventId); this.getAttachments(this.postEvent.EventId);
});
} else if(remove) { } else if(remove) {
this.attachmentsService.deleteEventAttachmentById(e.Id).subscribe( res=> {}) this.attachmentsService.deleteEventAttachmentById(e.Id).subscribe( res=> {})
@@ -56,7 +56,7 @@ export class EventListPage implements OnInit {
} }
ngOnChanges() { ngOnChanges() {
//this.LoadToApproveEvents(); this.LoadToApproveEvents();
} }
segmentChanged(ev: any) { segmentChanged(ev: any) {
@@ -23,9 +23,9 @@
</ion-label> </ion-label>
</div> </div>
</div> </div>
<div *ngIf="roomCountDownDate" class="d-flex align-items-center yellow-orange pl-10"> <div *ngIf="room.customFields.countDownDate" class="d-flex align-items-center yellow-orange pl-10">
<i class="far fa-clock font-15" ></i> <i class="far fa-clock font-15" ></i>
<ion-label class="font-15 pl-10" color="warning">{{roomCountDownDate}}</ion-label> <ion-label class="font-15 pl-10" color="warning">{{countDownDate()}}</ion-label>
</div> </div>
</div> </div>
</ion-toolbar> </ion-toolbar>
@@ -56,7 +56,8 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
currentPosition: any; currentPosition: any;
startPosition: number; startPosition: number;
scrollToBottomBtn = false; scrollToBottomBtn = false;
roomCountDownDate:any; roomCountDownDate:string;
roomCountDownTime:string;
@Input() roomId:string; @Input() roomId:string;
@Output() closeAllDesktopComponents:EventEmitter<any> = new EventEmitter<any>(); @Output() closeAllDesktopComponents:EventEmitter<any> = new EventEmitter<any>();
@@ -89,6 +90,8 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
) { ) {
this.loggedUserChat = authService.ValidatedUserChat['data']; this.loggedUserChat = authService.ValidatedUserChat['data'];
this.isGroupCreated = true; this.isGroupCreated = true;
this.roomCountDownDate = "";
this.roomCountDownTime = "";
} }
ngOnChanges(changes: SimpleChanges): void { ngOnChanges(changes: SimpleChanges): void {
@@ -100,49 +103,18 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
this.loggedUser=this.loggedUserChat; this.loggedUser=this.loggedUserChat;
this.getRoomInfo(); this.getRoomInfo();
this.serverLongPull(); this.serverLongPull();
console.log(this.roomId);
this.setStatus('online'); this.setStatus('online');
this.getChatMembers(); this.getChatMembers();
/* pdfjs.Lib.getDocument('sample.pdf').promise.then((doc)=>{
console.log(doc);
}) */
//this.loadPDF();
} }
/* loadPDF() { showDateDuration(start:any){
const loadingTask = pdfjsLib.getDocument( this.pdfurl ); return this.timeService.showDateDuration(start);
loadingTask.promise.then((pdf) => { }
console.log( "pdf: ", pdf );
console.log('PDF loaded');
// Fetch the first page countDownDate(){
var pageNumber = 1; //this.roomCountDownTime = this.timeService.countDownDateTimer(this.roomCountDownDate, this.room._id);
pdf.getPage(pageNumber).then(function(page) { return this.timeService.countDownDateTimer(this.roomCountDownDate, this.roomId);
console.log('Page loaded'); }
var scale = 1.5;
var viewport = page.getViewport({scale: scale});
// Prepare canvas using PDF page dimensions
var canvas: any = document.getElementById('pdf_canvas');
var context = canvas.getContext('2d');
canvas.height = viewport.height;
canvas.width = viewport.width;
// Render PDF page into canvas context
var renderContext = {
canvasContext: context,
viewport: viewport
};
var renderTask = page.render(renderContext);
renderTask.promise.then(function () {
console.log('Page rendered');
});
});
});
} */
setStatus(status:string){ setStatus(status:string){
let body = { let body = {
@@ -235,30 +207,19 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
console.log('here watching'); console.log('here watching');
return this.roomId; return this.roomId;
} }
showDateDuration(start:any){
return this.timeService.showDateDuration(start);
}
countDownDate(date:any, roomId:string){ async getRoomInfo(){
return this.timeService.countDownDate(date, roomId); let room = await this.chatService.getRoomInfo(this.roomId).toPromise();
} this.room=room['room'];
if(this.room.name){
this.roomName = this.room.name.split('-').join(' ');
}
getRoomInfo(){ if(this.room.customFields.countDownDate){
this.showLoader = true; this.roomCountDownDate = this.room.customFields.countDownDate;
this.chatService.getRoomInfo(this.roomId).subscribe(room=>{ }
console.log(room);
this.room = room['room']; this.getGroupContacts(this.room);
if(this.room.name){
this.roomName = this.room.name.split('-').join(' ');
}
if(this.room.customFields.countDownDate){
this.roomCountDownDate = this.timeService.countDownDate(this.room.customFields.countDownDate, this.room._id);
}
this.getGroupContacts(this.room);
//this.loadGroupMessages(this.room);
this.showLoader = false;
});
} }
getGroupContacts(room:any){ getGroupContacts(room:any){
-14
View File
@@ -1,14 +0,0 @@
{
"/mfp/api/imfpush/": {
"target": "http://gpr-dev-10.gabinetedigital.local:9080/mfp/api/imfpush/",
"changeOrigin": true,
"secure": false,
"pathRewrite": {"/mfp/api/imfpush/" : ""}
},
"/mfp/api": {
"target": "http://gpr-dev-10.gabinetedigital.local:9080/mfp/api",
"changeOrigin": true,
"secure": false,
"pathRewrite": {"/mfp/api" : ""}
}
}