mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 21:35:50 +00:00
Merge branch 'developer' into feature/chat
This commit is contained in:
@@ -29,7 +29,7 @@ import { adapterFactory } from 'angular-calendar/date-adapters/date-fns';
|
||||
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
||||
import { MessagesPage } from './pages/chat/messages/messages.page';
|
||||
|
||||
import { FCM } from 'cordova-plugin-fcm-with-dependecy-updated/ionic/ngx'
|
||||
import { FCM } from 'cordova-plugin-fcm-with-dependecy-updated/ionic/ngx';
|
||||
|
||||
|
||||
@NgModule({
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<ion-tab-button tab="agenda">
|
||||
<!-- <ion-icon name="calendar"></ion-icon> -->
|
||||
<ion-icon class="nav-icon" src="assets/images/icons-nav-calendar.svg"></ion-icon>
|
||||
<ion-label>Agenda</ion-label>
|
||||
<ion-label class="overflow-visible">Agenda</ion-label>
|
||||
</ion-tab-button>
|
||||
<ion-tab-button tab="gabinete-digital">
|
||||
<!-- <ion-icon name="file-tray-stacked"></ion-icon> -->
|
||||
|
||||
+88
-103
@@ -1,19 +1,20 @@
|
||||
///<reference path="../../../plugins/cordova-plugin-mfp/typings/worklight.d.ts" />
|
||||
//<reference path="../../../plugins/cordova-plugin-mfp/typings/worklight.d.ts" />
|
||||
import { Component, OnInit, NgZone } from '@angular/core';
|
||||
import { EventsService } from '../services/events.service';
|
||||
import { Event } from '../models/event.model';
|
||||
import { ProcessesService } from '../services/processes.service';
|
||||
import { ModalController, AlertController, AnimationController } from '@ionic/angular';
|
||||
import { NotificationsService } from '../services/notifications.service';
|
||||
import { ModalController, AlertController, AnimationController, Platform } from '@ionic/angular';
|
||||
//import { AlertController } from 'ionic-angular';
|
||||
/* import { Plugins, PushNotification, PushNotificationToken, PushNotificationActionPerformed, Modals } from '@capacitor/core'; */
|
||||
import { Router } from '@angular/router';
|
||||
|
||||
//import { FCM } from 'cordova-plugin-fcm-with-dependecy-updated/ionic/ngx';
|
||||
import { FCM } from 'cordova-plugin-fcm-with-dependecy-updated/ionic/ngx';
|
||||
import { ViewEventPage } from '../pages/agenda/view-event/view-event.page';
|
||||
import { ApproveEventModalPage } from '../pages/agenda/approve-event-modal/approve-event-modal.page';
|
||||
import { ExpedienteDetailPage } from '../pages/gabinete-digital/expediente/expediente-detail/expediente-detail.page';
|
||||
import { PublicationDetailPage } from '../pages/publications/publication-detail/publication-detail.page';
|
||||
import { ViewPublicationsPage } from '../pages/publications/view-publications/view-publications.page';
|
||||
import { ApproveEventModalPage } from '../pages/gabinete-digital/event-list/approve-event-modal/approve-event-modal.page';
|
||||
import { PublicationDetailPage } from '../pages/publications/view-publications/publication-detail/publication-detail.page';
|
||||
|
||||
/* const { PushNotifications, LocalNotifications, LocalNotificationAction } = Plugins; */
|
||||
|
||||
@@ -58,8 +59,10 @@ export class HomePage implements OnInit {
|
||||
private router: Router,
|
||||
private modalController: ModalController,
|
||||
public modalCtrl: AlertController,
|
||||
//private fcm: FCM,
|
||||
private animationController: AnimationController,) {
|
||||
private fcm: FCM,
|
||||
private animationController: AnimationController,
|
||||
private notificatinsservice: NotificationsService,
|
||||
private platform: Platform) {
|
||||
|
||||
router.events.subscribe((val) => {
|
||||
document.querySelectorAll('ion-modal').forEach((e) => e.remove())
|
||||
@@ -75,103 +78,77 @@ export class HomePage implements OnInit {
|
||||
|
||||
//Add a test
|
||||
//this.pushCordova();
|
||||
//Initialize profile as mdgpr
|
||||
|
||||
let date = new Date();
|
||||
date.setMonth(date.getMonth() + 1);
|
||||
let start = date.getFullYear()+"-"+ date.getMonth()+"-"+date.getDate()+" "+date.getHours()+":"+date.getMinutes()+ ":"+date.getSeconds();
|
||||
let end = date.getFullYear()+"-"+ date.getMonth()+"-"+date.getDate()+" 23:59:59";
|
||||
|
||||
this.profile = "mdgpr";
|
||||
if (this.profile == "mdgpr") {
|
||||
this.eventService.getAllMdEvents(start, end).subscribe(res => {
|
||||
this.eventsList = res;
|
||||
this.totalEvent = this.eventsList.length;
|
||||
});
|
||||
}
|
||||
else {
|
||||
this.eventService.getAllPrEvents(start, end).subscribe(res => {
|
||||
this.eventsList = res;
|
||||
this.totalEvent = this.eventsList.length;
|
||||
});
|
||||
|
||||
}
|
||||
this.processesbackend.GetTasksList("Expediente", true).subscribe(result => {
|
||||
this.totalExpediente = result;
|
||||
});
|
||||
|
||||
|
||||
//Initialize profile as mdgpr
|
||||
|
||||
let date = new Date();
|
||||
date.setMonth(date.getMonth() + 1);
|
||||
let start = date.getFullYear()+"-"+ date.getMonth()+"-"+date.getDate()+" "+date.getHours()+":"+date.getMinutes()+ ":"+date.getSeconds();
|
||||
let end = date.getFullYear()+"-"+ date.getMonth()+"-"+date.getDate()+" 23:59:59";
|
||||
|
||||
this.profile = "mdgpr";
|
||||
if (this.profile == "mdgpr") {
|
||||
this.eventService.getAllMdEvents(start, end).subscribe(res => {
|
||||
this.eventsList = res;
|
||||
this.totalEvent = this.eventsList.length;
|
||||
});
|
||||
}
|
||||
else {
|
||||
this.eventService.getAllPrEvents(start, end).subscribe(res => {
|
||||
this.eventsList = res;
|
||||
this.totalEvent = this.eventsList.length;
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
pushCordova() {
|
||||
/*
|
||||
this.fcm.onNotification().subscribe(data => {
|
||||
this.viewEventDetail(data.idObject)
|
||||
if (data.click_action) {
|
||||
console.log("Received in background: ", data);
|
||||
|
||||
if (data.service === "agenda") {
|
||||
//this.router.navigate(['/home/', service, idObject, 'home']);
|
||||
this.viewEventDetail(data.idObject)
|
||||
}
|
||||
else if (data.service === "gabinete-digital" && data.object === "expediente") {
|
||||
this.viewExpedientDetail(data.idObject)
|
||||
}
|
||||
else if (data.service === "gabinete-digital" && data.object === "event-list") {
|
||||
// this.ngZone.run(() => {this.router.navigate(['/home/gabinete-digital/event-list', idObject])})
|
||||
this.openApproveModal(data.idObject);
|
||||
}
|
||||
else if (data.service === "accoes" && data.object === "accao") {
|
||||
//this.viewPublications(data.idObject)
|
||||
alert(data.idObject)
|
||||
}
|
||||
else if (data.service === "accoes" && data.object === "publicacao") {
|
||||
this.viewPublicationDetail(data.idObject)
|
||||
}
|
||||
if(this.platform.is('desktop')) {
|
||||
console.log('Notifications not supported')
|
||||
} else {
|
||||
|
||||
} else {
|
||||
console.log("Received in foreground: ", data);
|
||||
if (data.service === "agenda") {
|
||||
//this.router.navigate(['/home/', service, idObject, 'home']);
|
||||
this.viewEventDetail(data.idObject)
|
||||
}
|
||||
else if (data.service === "gabinete-digital" && data.object === "expediente") {
|
||||
this.viewExpedientDetail(data.idObject)
|
||||
}
|
||||
else if (data.service === "gabinete-digital" && data.object === "event-list") {
|
||||
// this.ngZone.run(() => {this.router.navigate(['/home/gabinete-digital/event-list', idObject])})
|
||||
this.openApproveModal(data.idObject);
|
||||
}
|
||||
else if (data.service === "accoes" && data.object === "accao") {
|
||||
this.viewPublications(data.idObject)
|
||||
}
|
||||
else if (data.service === "accoes" && data.object === "publicacao") {
|
||||
this.viewPublicationDetail(data.idObject)
|
||||
}
|
||||
};
|
||||
});
|
||||
this.fcm.onNotification().subscribe(data => {
|
||||
this.viewEventDetail(data.IdObject)
|
||||
if (data.wasTapped === true) {
|
||||
console.log("Received in background: ", data);
|
||||
|
||||
if (data.Service === "agenda") {
|
||||
//this.router.navigate(['/home/', service, IdObject, 'home']);
|
||||
this.viewEventDetail(data.IdObject)
|
||||
}
|
||||
else if (data.Service === "gabinete-digital" && data.Object === "expediente") {
|
||||
console.log('expediante 1')
|
||||
this.viewExpedientDetail(data.IdObject)
|
||||
}
|
||||
else if (data.Service === "gabinete-digital" && data.Object === "event-list") {
|
||||
// this.ngZone.run(() => {this.router.navigate(['/home/gabinete-digital/event-list', IdObject])})
|
||||
this.openApproveModal(data.IdObject);
|
||||
}
|
||||
else if (data.Service === "accoes" && data.Object === "accao") {
|
||||
this.viewPublications(data.IdObject)
|
||||
alert(data.IdObject)
|
||||
}
|
||||
else if (data.Service === "accoes" && data.Object === "publicacao") {
|
||||
this.viewPublicationDetail(data.IdObject)
|
||||
}
|
||||
|
||||
} else {
|
||||
console.log("Received in foreground: ", data);
|
||||
|
||||
console.log(data.Service)
|
||||
console.log(data.Object)
|
||||
console.log(data.IdObject)
|
||||
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
this.fcm.onTokenRefresh().subscribe(token => {
|
||||
// Register your new token in your back-end if you want
|
||||
// backend.registerToken(token);
|
||||
});
|
||||
|
||||
this.ubscribeToTopic()
|
||||
this.getToken() */
|
||||
|
||||
|
||||
}
|
||||
|
||||
/* ubscribeToTopic() {
|
||||
this.fcm.subscribeToTopic('enappd');
|
||||
}
|
||||
getToken() {
|
||||
this.fcm.getToken().then(token => {
|
||||
console.log('token: ', token)
|
||||
// Register your new token in your back-end if you want
|
||||
// backend.registerToken(token);
|
||||
});
|
||||
} */
|
||||
|
||||
async viewEventDetail(eventId: any) {
|
||||
console.log(this.profile);
|
||||
|
||||
@@ -192,17 +169,25 @@ export class HomePage implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
async openApproveModal(eventSerialNumber) {
|
||||
async openApproveModal(eventSerialNumber){
|
||||
let classs;
|
||||
if( window.innerWidth <= 1024){
|
||||
classs = 'cal-modal modal modal-desktop'
|
||||
} else {
|
||||
classs = 'gabinete-digital-mobile-modal-to-Desktop'
|
||||
}
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: ApproveEventModalPage,
|
||||
componentProps: {
|
||||
componentProps:{
|
||||
serialNumber: eventSerialNumber,
|
||||
},
|
||||
cssClass: 'cal-modal',
|
||||
cssClass: 'event-list',
|
||||
backdropDismiss: false
|
||||
});
|
||||
|
||||
await modal.present();
|
||||
|
||||
modal.onDidDismiss();
|
||||
}
|
||||
|
||||
@@ -213,14 +198,14 @@ export class HomePage implements OnInit {
|
||||
} else {
|
||||
classs = 'modal modal-desktop showAsideOptions'
|
||||
}
|
||||
/* console.log(this.profile);
|
||||
console.log(serialNumber); */
|
||||
|
||||
console.log(this.profile);
|
||||
console.log(serialNumber);
|
||||
console.log('expediante 2')
|
||||
const modal = await this.modalController.create({
|
||||
component: ExpedienteDetailPage,
|
||||
componentProps: {
|
||||
serialNumber: serialNumber,
|
||||
profile: this.profile,
|
||||
profile: "MDGPR",
|
||||
},
|
||||
cssClass: classs,
|
||||
});
|
||||
@@ -244,7 +229,7 @@ export class HomePage implements OnInit {
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then(() => {
|
||||
//this.getPublications();
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -863,26 +863,29 @@ export class AgendaPage implements OnInit {
|
||||
selectFirstEventOfTheDay(){
|
||||
|
||||
setTimeout(()=>{
|
||||
|
||||
if(this.eventSelectedDate.toLocaleDateString('en-US') != (new Date()).toLocaleDateString('en-US')){
|
||||
let sortedDate = this.eventSource.sort((a,b) =>{
|
||||
return (b.startTime) -(a.startTime);
|
||||
});
|
||||
|
||||
let sortedDate = this.eventSource.sort((a,b) =>{
|
||||
return (b.startTime) -(a.startTime);
|
||||
});
|
||||
|
||||
|
||||
let filterDate = sortedDate.filter((e) => {
|
||||
return e.startTime.toLocaleDateString('en-US') == this.eventSelectedDate.toLocaleDateString('en-US');
|
||||
});
|
||||
|
||||
const firstEventStartHours = new Date(filterDate[filterDate.length - 1].startTime).getHours();
|
||||
|
||||
const scrollContainer = document.querySelector('.timeline-wrapper');
|
||||
|
||||
scrollContainer.scroll({
|
||||
top: firstEventStartHours*60,
|
||||
left: 0,
|
||||
behavior: 'smooth'
|
||||
})
|
||||
|
||||
let filterDate = sortedDate.filter((e) => {
|
||||
return e.startTime.toLocaleDateString('en-US') == this.eventSelectedDate.toLocaleDateString('en-US');
|
||||
});
|
||||
|
||||
const firstEventStartHours = new Date(filterDate[filterDate.length - 1].startTime).getHours();
|
||||
|
||||
const scrollContainer = document.querySelector('.timeline-wrapper');
|
||||
|
||||
scrollContainer.scroll({
|
||||
top: firstEventStartHours*60,
|
||||
left: 0,
|
||||
behavior: 'smooth'
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
}, 500);
|
||||
|
||||
}
|
||||
@@ -1147,8 +1150,6 @@ export class AgendaPage implements OnInit {
|
||||
this.postEvent = false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
async changeSegment(segments: "Combinado" | "Pessoal" | "Oficial") {
|
||||
this.segment = segments;
|
||||
|
||||
@@ -1159,5 +1160,4 @@ export class AgendaPage implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -109,20 +109,13 @@ export class ViewEventPage implements OnInit {
|
||||
|
||||
async editEventDetail() {
|
||||
|
||||
let classs;
|
||||
if( window.innerWidth <= 800){
|
||||
classs = 'modal'
|
||||
} else {
|
||||
classs = 'modal modal-desktop'
|
||||
}
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: EditEventPage,
|
||||
componentProps: {
|
||||
eventId: this.loadedEvent.EventId,
|
||||
profile: this.profile,
|
||||
},
|
||||
cssClass: classs,
|
||||
cssClass: 'modal modal-desktop',
|
||||
});
|
||||
|
||||
}
|
||||
@@ -131,7 +124,7 @@ export class ViewEventPage implements OnInit {
|
||||
|
||||
let classs;
|
||||
if( window.innerWidth <= 800){
|
||||
classs = 'modal'
|
||||
classs = 'modal modal-desktop'
|
||||
} else {
|
||||
classs = 'modal modal-desktop showAsideOptions'
|
||||
}
|
||||
@@ -151,6 +144,7 @@ export class ViewEventPage implements OnInit {
|
||||
if(res){
|
||||
setTimeout(() => {
|
||||
/* this.loadEvent(); */
|
||||
this.loadEvent()
|
||||
this.getAttachments();
|
||||
}, 250);
|
||||
this.isEventEdited = true;
|
||||
|
||||
@@ -100,7 +100,11 @@
|
||||
<app-new-group (addGroupMessage)="openGroupContactsPage($event)" *ngIf="showNewGroup" class="d-flex height-100 flex-column"></app-new-group>
|
||||
<app-edit-group [roomId]="roomId" *ngIf="showEditGroup" class="d-flex height-100 flex-column"></app-edit-group>
|
||||
<app-group-contacts (openGroupMessage)="openGroupMessagesPage($event)" [roomId]="groupRoomId" class="d-flex height-100 flex-column" *ngIf="showGroupContacts"></app-group-contacts>
|
||||
<app-group-messages (openGroupContacts)="openGroupContactsPage($event)" *ngIf="showGroupMessages" class="d-flex height-100 flex-column" [roomId]="roomId" #messagecontainer></app-group-messages>
|
||||
<app-group-messages
|
||||
(closeAllDesktopComponents)="closeAllDesktopComponents()"
|
||||
(showEmptyContainer)="showEmptyContainer()"
|
||||
(openGroupContacts)="openGroupContactsPage($event)"
|
||||
*ngIf="showGroupMessages" class="d-flex height-100 flex-column" [roomId]="roomId" #messagecontainer></app-group-messages>
|
||||
</div>
|
||||
</div>
|
||||
</ion-content>
|
||||
|
||||
@@ -113,6 +113,9 @@ export class ChatPage implements OnInit {
|
||||
this.showGroupContacts=false;
|
||||
console.log('All components closed!');
|
||||
}
|
||||
showEmptyContainer(){
|
||||
this.showEmptyComponent=true;
|
||||
}
|
||||
openGroupContactsPage(data){
|
||||
console.log(data);
|
||||
this.groupRoomId = data;
|
||||
|
||||
@@ -134,26 +134,27 @@ export class GroupMessagesPage implements OnInit {
|
||||
this.message = "";
|
||||
}
|
||||
|
||||
async openOptions(ev: any) {
|
||||
const popover = await this.popoverController.create({
|
||||
async openOptions() {
|
||||
console.log('OK');
|
||||
const modal = await this.modalController.create({
|
||||
component: ChatPopoverPage,
|
||||
cssClass: 'chat-popover',
|
||||
event: ev,
|
||||
componentProps: {
|
||||
room: this.room,
|
||||
roomId: this.roomId,
|
||||
},
|
||||
translucent: true
|
||||
});
|
||||
await popover.present();
|
||||
popover.onDidDismiss().then(res=>{
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then(res=>{
|
||||
console.log('OK2');
|
||||
|
||||
console.log(res);
|
||||
if(res.data){
|
||||
/* if(res.data ==){
|
||||
this.roomName = res.data.name.split('-').join(' ');
|
||||
console.log(this.roomName);
|
||||
|
||||
this.getRoomInfo();
|
||||
/* this.modalController.dismiss(); */
|
||||
};
|
||||
//this.modalController.dismiss();
|
||||
}; */
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
@@ -28,12 +28,11 @@ export class EventListPage implements OnInit {
|
||||
private modalController: ModalController,
|
||||
private router: Router,
|
||||
private navParams: NavParams,
|
||||
) { }
|
||||
) { }
|
||||
|
||||
ngOnInit() {
|
||||
this.profile = this.navParams.get('profile');
|
||||
console.log(this.profile);
|
||||
|
||||
|
||||
/* console.log(this.navParams.get('md')); */
|
||||
if(this.profile == "mdgpr"){
|
||||
this.profile = 'MDGPR'
|
||||
@@ -53,7 +52,7 @@ export class EventListPage implements OnInit {
|
||||
|
||||
window.onresize = (event) => {
|
||||
// if not mobile remove all component
|
||||
if( window.innerWidth <= 1024){
|
||||
if( window.innerWidth <= 800){
|
||||
this.modalController.dismiss();
|
||||
}
|
||||
};
|
||||
@@ -73,21 +72,15 @@ export class EventListPage implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
async openApproveModal(eventSerialNumber){
|
||||
let classs;
|
||||
if( window.innerWidth <= 1024){
|
||||
classs = 'cal-modal modal modal-desktop'
|
||||
} else {
|
||||
classs = 'gabinete-digital-mobile-modal-to-Desktop'
|
||||
}
|
||||
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: ApproveEventModalPage,
|
||||
componentProps:{
|
||||
serialNumber: eventSerialNumber,
|
||||
},
|
||||
cssClass: 'event-list',
|
||||
cssClass: 'event-list cal-modal modal modal-desktop',
|
||||
backdropDismiss: false
|
||||
});
|
||||
|
||||
|
||||
+2
-2
@@ -61,7 +61,7 @@
|
||||
</ion-list>
|
||||
</ion-item>
|
||||
</div>
|
||||
<div class="add-people" (click)="addParticipants(); showAttendees='true'">
|
||||
<div class="add-people" (click)="addParticipants();">
|
||||
<ion-icon slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon>
|
||||
</div>
|
||||
</div>
|
||||
@@ -82,7 +82,7 @@
|
||||
</ion-list>
|
||||
</ion-item>
|
||||
</div>
|
||||
<div class="add-people" (click)="addParticipantsCc(); showAttendees='true'">
|
||||
<div class="add-people" (click)="addParticipantsCc();">
|
||||
<ion-icon slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
+12
-3
@@ -113,6 +113,7 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
|
||||
}
|
||||
saveTask(){
|
||||
|
||||
let attendees = this.taskParticipants.concat(this.taskParticipantsCc);
|
||||
attendees = attendees.map(function(val) {
|
||||
return {
|
||||
@@ -120,6 +121,7 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
UserType: val.IsRequired?"I": "CC"
|
||||
};
|
||||
})
|
||||
|
||||
if(this.taskParticipants.length > 0){
|
||||
switch (this.taskType){
|
||||
case '0':
|
||||
@@ -185,7 +187,10 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
this.adding = "intervenient";
|
||||
this.contacts = this.taskParticipants;
|
||||
|
||||
if(window.innerWidth <=1024){
|
||||
if(window.innerWidth <=800){
|
||||
|
||||
this.showAttendees=false;
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: AddParticipantsModalPage,
|
||||
componentProps: {
|
||||
@@ -214,7 +219,7 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
console.log(this.postData);
|
||||
});
|
||||
} else {
|
||||
|
||||
this.showAttendees=true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -223,7 +228,9 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
this.adding = "CC";
|
||||
this.contacts = this.taskParticipantsCc;
|
||||
|
||||
if(window.innerWidth <=1024){
|
||||
if(window.innerWidth <=800){
|
||||
this.showAttendees=false;
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: AddParticipantsCcModalPage,
|
||||
componentProps: {
|
||||
@@ -251,6 +258,8 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
this.postData.UsersSelected = this.participants;
|
||||
console.log(this.postData);
|
||||
});
|
||||
} else {
|
||||
this.showAttendees=true
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+2
-2
@@ -141,7 +141,7 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
//this.modalController.dismiss();
|
||||
let classs;
|
||||
if( window.innerWidth <= 800){
|
||||
classs = 'modal'
|
||||
classs = 'modal modal-desktop'
|
||||
} else {
|
||||
classs = 'modal modal-desktop showAsideOptions'
|
||||
}
|
||||
@@ -193,7 +193,7 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
async openBookMeetingModal(task: any) {
|
||||
let classs;
|
||||
if( window.innerWidth <= 800){
|
||||
classs = 'book-meeting-modal'
|
||||
classs = 'book-meeting-modal modal modal-desktop'
|
||||
} else {
|
||||
classs = 'modal modal-desktop showAsideOptions'
|
||||
}
|
||||
|
||||
@@ -65,14 +65,7 @@ export class ExpedientePage implements OnInit {
|
||||
}
|
||||
|
||||
async viewExpedientDetail(serialNumber:any) {
|
||||
console.log(this.profile);
|
||||
|
||||
let classs;
|
||||
if( window.innerWidth <= 800){
|
||||
classs = 'modal modal-desktop'
|
||||
} else {
|
||||
classs = 'gabinete-digital-mobile-modal-to-Desktop'
|
||||
}
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: ExpedienteDetailPage,
|
||||
@@ -80,7 +73,7 @@ export class ExpedientePage implements OnInit {
|
||||
serialNumber: serialNumber,
|
||||
profile: this.profile,
|
||||
},
|
||||
cssClass: classs,
|
||||
cssClass: 'modal modal-desktop',
|
||||
backdropDismiss: false
|
||||
});
|
||||
await modal.present();
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
</div>
|
||||
|
||||
<div class="aside overflow-y-auto d-flex flex-wrap width-100">
|
||||
<div class="exp-card d-flex flex-column" (click)="openEventsToApprovePage('MDGPR')">
|
||||
<div [class.active]="selectedElement == 'approval'" (click)="openEventsToApprovePage('MDGPR');selectedElement='approval'" class="exp-card d-flex flex-column" >
|
||||
<div class="d-flex justify-center">
|
||||
<ion-icon src="assets/images/icons-agenda.svg"></ion-icon>
|
||||
</div>
|
||||
@@ -28,7 +28,7 @@
|
||||
<p class="text-center exp-card-content">{{count_ev_md+count_ev_pr}} <span class="title1">Documentos</span></p>
|
||||
</div>
|
||||
|
||||
<div class="exp-card d-flex flex-column justify-center" (click)="openExpedientListPage()">
|
||||
<div [class.active]="selectedElement == 'Correspondence'" (click)="openExpedientListPage(); selectedElement='Correspondence'" class="exp-card d-flex flex-column justify-center" >
|
||||
<div class="d-flex justify-center">
|
||||
<ion-icon src="assets/images/icons-correspondencia.svg"></ion-icon>
|
||||
</div>
|
||||
@@ -36,7 +36,7 @@
|
||||
<p class="text-center exp-card-content">{{count_exp_dailywork}} <span class="title1">Documentos</span></p>
|
||||
</div>
|
||||
|
||||
<div class="exp-card d-flex flex-column justify-center" (click)="notImplemented()">
|
||||
<div [class.active]="selectedElement == 'Pending'" (click)="notImplemented()" class="exp-card d-flex flex-column justify-center" >
|
||||
<div class="d-flex justify-center">
|
||||
<ion-icon src="assets/images/icons-expediente-pendente.svg"></ion-icon>
|
||||
</div>
|
||||
@@ -44,21 +44,24 @@
|
||||
<p class="text-center exp-card-title ">Pendentes</p>
|
||||
<p class="text-center exp-card-content"><span class="number">-</span> <span class="title1">Documentos</span></p>
|
||||
</div>
|
||||
<div class="exp-card d-flex flex-column justify-center" (click)="notImplemented()">
|
||||
|
||||
<div [class.active]="selectedElement == 'RequestsForOpinion'" class="exp-card d-flex flex-column justify-center" (click)="notImplemented()">
|
||||
<div class="d-flex justify-center">
|
||||
<ion-icon src="assets/images/icons-expediente-parecer.svg"></ion-icon>
|
||||
</div>
|
||||
<p class="text-center exp-card-title ">Pedidos de Parecer</p>
|
||||
<p class="text-center exp-card-content"><span class="number">-</span> <span class="title1">Documentos</span></p>
|
||||
</div>
|
||||
<div class="exp-card d-flex flex-column justify-center" (click)="notImplemented()">
|
||||
|
||||
<div [class.active]="selectedElement == 'RequestForApproval'" class="exp-card d-flex flex-column justify-center" (click)="notImplemented()">
|
||||
<div class="d-flex justify-center">
|
||||
<ion-icon src="assets/images/icons-expediente-deferimento.svg"></ion-icon>
|
||||
</div>
|
||||
<p class="text-center exp-card-title ">Pedidos de Deferimento</p>
|
||||
<p class="text-center exp-card-content"><span class="number">-</span> <span class="title1">Documentos</span></p>
|
||||
</div>
|
||||
<div class="exp-card d-flex flex-column justify-center" (click)="notImplemented()">
|
||||
|
||||
<div [class.active]="selectedElement == '£££££££'" class="exp-card d-flex flex-column justify-center" (click)="notImplemented()">
|
||||
<div class="d-flex justify-center">
|
||||
<ion-icon src="assets/images/icons-expediente-diploma.svg"></ion-icon>
|
||||
</div>
|
||||
@@ -66,15 +69,15 @@
|
||||
<p class="text-center exp-card-content"><span class="number">-</span> <span class="title1">Documentos</span> </p>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="exp-card d-flex d-none flex-column justify-center" (click)="notImplemented()">
|
||||
<div [class.active]="selectedElement == '£££££££'" class="exp-card d-flex d-none flex-column justify-center" (click)="notImplemented()">
|
||||
<div class="d-flex justify-center">
|
||||
<ion-icon src="assets/images/icons-expediente-presidente.svg"></ion-icon>
|
||||
</div>
|
||||
<p class="text-center exp-card-title ">Expediente Presidente</p>
|
||||
<p class="text-center exp-card-content"><span class="number">-</span> <span class="title1">Documentos</span></p>
|
||||
</div>
|
||||
<div class="exp-card d-flex d-none flex-column justify-center" (click)="notImplemented()">
|
||||
|
||||
<div [class.active]="selectedElement == '£££££££'" class="exp-card d-flex d-none flex-column justify-center" (click)="notImplemented()">
|
||||
<div class="d-flex justify-center">
|
||||
<ion-icon src="assets/images/icons-despachos-presidente.svg"></ion-icon>
|
||||
</div>
|
||||
@@ -82,9 +85,7 @@
|
||||
<p class="text-center exp-card-content"><span class="number">-</span> <span class="title1">Documentos</span> </p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="exp-card-long justify-center width-100" (click)="notImplemented()">
|
||||
<div [class.active]="selectedElement == '£££££££'" class="exp-card-long justify-center width-100" (click)="notImplemented()">
|
||||
<div class="center-div">
|
||||
<div class="exp-card-icon">
|
||||
<ion-icon src="assets/images/icons-expediente-presidente.svg"></ion-icon>
|
||||
@@ -95,7 +96,8 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="exp-card-long width-100" (click)="notImplemented()">
|
||||
|
||||
<div [class.active]="selectedElement == '£££££££'" class="exp-card-long width-100" (click)="notImplemented()">
|
||||
<div class="center-div">
|
||||
<div class="exp-card-icon">
|
||||
<ion-icon src="assets/images/icons-despachos-presidente.svg"></ion-icon>
|
||||
@@ -107,14 +109,16 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="exp-card d-flex flex-column justify-center" (click)="notImplemented()">
|
||||
<div [class.active]="selectedElement == '£££££££'" class="exp-card d-flex flex-column justify-center" (click)="notImplemented()">
|
||||
<div class="d-flex justify-center">
|
||||
<ion-icon src="assets/images/icons-diplomas-assinados-presidente.svg"></ion-icon>
|
||||
</div>
|
||||
<p class="text-center exp-card-title ">Diplomas assinaldos PR</p>
|
||||
<p class="text-center exp-card-content"><span class="number">-</span> <span class="title1">Documentos</span> </p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- Aside right -->
|
||||
|
||||
@@ -345,3 +345,9 @@ ion-content{
|
||||
width: 25%;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.active {
|
||||
border: 1px solid green;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
@@ -12,6 +12,7 @@ import { ActivatedRoute, NavigationEnd, Router } from '@angular/router';
|
||||
templateUrl: './gabinete-digital.page.html',
|
||||
styleUrls: ['./gabinete-digital.page.scss'],
|
||||
})
|
||||
|
||||
export class GabineteDigitalPage implements OnInit {
|
||||
|
||||
segment:string;
|
||||
@@ -27,11 +28,13 @@ export class GabineteDigitalPage implements OnInit {
|
||||
count_ev_pr=0;
|
||||
count_ev_md=0;
|
||||
|
||||
selectedElement = "";
|
||||
|
||||
desktopComponent: any = {
|
||||
showEventList: false,
|
||||
showExpediente : false
|
||||
}
|
||||
|
||||
showEventsToApprove = false;
|
||||
showEmptyContainer = false;
|
||||
showExpedients = true;
|
||||
@@ -46,17 +49,15 @@ export class GabineteDigitalPage implements OnInit {
|
||||
private alertService: AlertService,
|
||||
private activatedRoute: ActivatedRoute,
|
||||
private router: Router,
|
||||
) {
|
||||
) {
|
||||
|
||||
window.onresize = (event) => {
|
||||
// if not mobile remove all component
|
||||
if( window.innerWidth <= 1024){
|
||||
this.modalController.dismiss();
|
||||
}
|
||||
this.adjastModalHeight();
|
||||
};
|
||||
|
||||
this.adjastModalHeight();
|
||||
};
|
||||
|
||||
this.activatedRoute.queryParams.subscribe(params => {
|
||||
if(params["show"]){
|
||||
@@ -69,24 +70,6 @@ export class GabineteDigitalPage implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
adjastModalHeight(){
|
||||
setTimeout(() => {
|
||||
if( window.innerWidth <= 1366){
|
||||
|
||||
document.querySelectorAll('.gabinete-digital-mobile-modal-to-Desktop').forEach(e=>{
|
||||
console.log('adjast width')
|
||||
e.setAttribute('style',`height:${window.innerHeight - (74 + 57)}px`)
|
||||
})
|
||||
} else if( window.innerWidth >= 1366){
|
||||
document.querySelectorAll('.gabinete-digital-mobile-modal-to-Desktop').forEach(e=>{
|
||||
console.log('adjast width')
|
||||
e.setAttribute('style',`height:${window.innerHeight - (74)}px`)
|
||||
})
|
||||
}
|
||||
}, 200);
|
||||
|
||||
|
||||
}
|
||||
|
||||
closeAllDesktopComponent(){
|
||||
this.desktopComponent = {
|
||||
@@ -94,6 +77,7 @@ export class GabineteDigitalPage implements OnInit {
|
||||
showExpediente: false
|
||||
}
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
//Initialize profile as mdgpr
|
||||
this.profile = "MDGPR";
|
||||
@@ -178,22 +162,13 @@ this.processesbackend.GetActionsList().subscribe(res=>{
|
||||
async openEventsToApproveList(profile:any){
|
||||
|
||||
this.closeAllDesktopComponent();
|
||||
|
||||
let classs;
|
||||
if( window.innerWidth <= 800){
|
||||
classs = 'modal'
|
||||
} else {
|
||||
classs = 'gabinete-digital-mobile-modal-to-Desktop'
|
||||
}
|
||||
|
||||
//if( window.innerWidth <= 1024){
|
||||
this.adjastModalHeight();
|
||||
const modal = await this.modalController.create({
|
||||
component: EventListPage,
|
||||
componentProps:{
|
||||
profile: profile,
|
||||
},
|
||||
cssClass: classs,
|
||||
cssClass: 'modal modal-desktop',
|
||||
backdropDismiss: false
|
||||
});
|
||||
await modal.present();
|
||||
@@ -203,6 +178,7 @@ this.processesbackend.GetActionsList().subscribe(res=>{
|
||||
//}
|
||||
|
||||
}
|
||||
|
||||
openExpedientListPage(){
|
||||
this.closeAllDesktopComponents();
|
||||
if( window.innerWidth <= 1024){
|
||||
@@ -212,6 +188,7 @@ this.processesbackend.GetActionsList().subscribe(res=>{
|
||||
this.showExpedients = true;
|
||||
}
|
||||
}
|
||||
|
||||
openExpedientPage(data){
|
||||
console.log(data);
|
||||
|
||||
@@ -224,24 +201,18 @@ this.processesbackend.GetActionsList().subscribe(res=>{
|
||||
this.showExpedientDetail = true;
|
||||
}
|
||||
}
|
||||
|
||||
async openExpedientList(){
|
||||
|
||||
this.closeAllDesktopComponent();
|
||||
let classs;
|
||||
if( window.innerWidth <= 1024){
|
||||
classs = 'modal'
|
||||
} else {
|
||||
classs = 'gabinete-digital-mobile-modal-to-Desktop'
|
||||
}
|
||||
|
||||
//if( window.innerWidth <= 1024){
|
||||
this.adjastModalHeight();
|
||||
const modal = await this.modalController.create({
|
||||
component: ExpedientePage,
|
||||
componentProps:{
|
||||
profile: this.profile,
|
||||
},
|
||||
cssClass: classs,
|
||||
cssClass: 'modal modal-desktop',
|
||||
backdropDismiss: false
|
||||
});
|
||||
await modal.present();
|
||||
|
||||
@@ -11,6 +11,7 @@ import { PhotoService } from 'src/app/services/photo.service';
|
||||
import { NotificationsService } from 'src/app/services/notifications.service';
|
||||
import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http';
|
||||
import { Token } from '../../models/token.model';
|
||||
import { FCM } from 'cordova-plugin-fcm-with-dependecy-updated/ionic/ngx';
|
||||
|
||||
/* import { Plugins, PushNotification, PushNotificationToken, PushNotificationActionPerformed } from '@capacitor/core';
|
||||
|
||||
@@ -38,7 +39,8 @@ export class LoginPage implements OnInit {
|
||||
private storageService: StorageService,
|
||||
private toastService: ToastService,
|
||||
private photoService: PhotoService,
|
||||
public alertController: AlertController) { }
|
||||
public alertController: AlertController,
|
||||
private fcm: FCM) { }
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
@@ -78,40 +80,9 @@ export class LoginPage implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
/* storeUserIdANdToken() {
|
||||
|
||||
(PushNotifications as any).requestPermission().then(result => {
|
||||
PushNotifications.register();
|
||||
});
|
||||
|
||||
PushNotifications.addListener(
|
||||
'registration',
|
||||
(token: PushNotificationToken) => {
|
||||
console.log('FIREBASE TOKEN', token.value)
|
||||
this.storageService.store(this.username, token.value);
|
||||
this.storageService.get(this.username).then(value => {
|
||||
console.log('STORAGE TOKEN', value)
|
||||
this.storageService.get(AuthConnstants.USER).then(res => {
|
||||
console.log('USERID', res);
|
||||
const headers = { 'Authorization': 'Basic cGF1bG8ucGludG9AZ2FiaW5ldGVkaWdpdGFsLmxvY2FsOnRhYnRlc3RlQDAwNg==' };
|
||||
const body = {
|
||||
UserId: res,
|
||||
TokenId: token.value,
|
||||
Status: 1,
|
||||
Service: 1
|
||||
};
|
||||
|
||||
this.http.post<Token>('https://equilibrium.dyndns.info/GabineteDigital.Services/V4/api/notifications/token', body, { headers }).subscribe(data => {
|
||||
console.log('TOKEN USER MIDLE', data);
|
||||
})
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
},
|
||||
);
|
||||
|
||||
}; */
|
||||
getToken() {
|
||||
this.notificatinsservice.getAndpostToken(this.username);
|
||||
}
|
||||
|
||||
|
||||
async Login() {
|
||||
@@ -127,7 +98,7 @@ export class LoginPage implements OnInit {
|
||||
}
|
||||
if (await this.authService.login(this.userattempt)) {
|
||||
this.loginRocketChat();
|
||||
//this.storeUserIdANdToken();
|
||||
this.getToken();
|
||||
|
||||
this.router.navigate(['/home/events']);
|
||||
}
|
||||
|
||||
@@ -1,18 +1,3 @@
|
||||
<ion-header class="ion-no-border">
|
||||
<ion-toolbar class="ion-no-border bg-blue">
|
||||
<div class="div-top-header">
|
||||
<div class="div-search">
|
||||
<ion-icon src='assets/images/icons-search.svg'></ion-icon>
|
||||
</div>
|
||||
<div class="div-logo">
|
||||
<img src='assets/images/logo-no-bg.png' alt='logo'>
|
||||
</div>
|
||||
<div class="div-profile">
|
||||
<ion-icon src='assets/images/icons-profile.svg'></ion-icon>
|
||||
</div>
|
||||
</div>
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
|
||||
<ion-content>
|
||||
<div class="content-container">
|
||||
|
||||
@@ -14,7 +14,6 @@ ion-toolbar{
|
||||
border-width: 0 !important;
|
||||
}
|
||||
.div-top-header{
|
||||
width: 400px;
|
||||
margin: 0 auto;
|
||||
background-color: #0782c9;
|
||||
overflow: auto;
|
||||
@@ -41,7 +40,6 @@ ion-toolbar{
|
||||
margin-right: 10px;
|
||||
}
|
||||
.content-top{
|
||||
width: 344px;
|
||||
background: #f3f2f2;
|
||||
height: 20px;
|
||||
margin: 0 auto;
|
||||
@@ -60,7 +58,6 @@ ion-toolbar{
|
||||
overflow: auto;
|
||||
}
|
||||
.title-content{
|
||||
width: 360px;
|
||||
margin: 0px auto;
|
||||
overflow: auto;
|
||||
padding: 0 !important;
|
||||
@@ -79,7 +76,6 @@ font-size: 25px;
|
||||
overflow: auto;
|
||||
}
|
||||
.ion-item-container{
|
||||
width: 360px;
|
||||
margin: 15px auto;
|
||||
border: 1px solid #ebebeb;
|
||||
border-radius: 5px;
|
||||
@@ -92,8 +88,8 @@ font-size: 25px;
|
||||
overflow: auto;
|
||||
}
|
||||
.ion-item-class-2{
|
||||
width: 360px;
|
||||
margin: 0px auto;
|
||||
display: flex;
|
||||
}
|
||||
.ion-icon-class{
|
||||
width: 45px;
|
||||
@@ -101,24 +97,23 @@ font-size: 25px;
|
||||
float: left;
|
||||
padding: 10px;
|
||||
font-size: 25px;
|
||||
|
||||
}
|
||||
.ion-input-class{
|
||||
width: 315px;
|
||||
height: auto;
|
||||
border: 1px solid #ebebeb;
|
||||
border-radius: 5px;
|
||||
padding-left: 5px;
|
||||
padding-right: 10px;
|
||||
float: left;
|
||||
flex: 1;
|
||||
}
|
||||
.ion-textarea-class{
|
||||
width: 315px;
|
||||
height: auto;
|
||||
border: 1px solid #ebebeb;
|
||||
border-radius: 5px;
|
||||
padding-left: 5px;
|
||||
padding-right: 10px;
|
||||
float: left;
|
||||
flex: 1;
|
||||
}
|
||||
.ion-input-class-no-height{
|
||||
border: 1px solid #ebebeb;
|
||||
|
||||
@@ -1,18 +1,4 @@
|
||||
<ion-header class="ion-no-border">
|
||||
<ion-toolbar class="ion-no-border bg-blue">
|
||||
<div class="div-top-header">
|
||||
<div class="div-search">
|
||||
<ion-icon src='assets/images/icons-search.svg'></ion-icon>
|
||||
</div>
|
||||
<div class="div-logo">
|
||||
<img src='assets/images/logo-no-bg.png' alt='logo'>
|
||||
</div>
|
||||
<div class="div-profile">
|
||||
<ion-icon src='assets/images/icons-profile.svg'></ion-icon>
|
||||
</div>
|
||||
</div>
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
|
||||
|
||||
<ion-content>
|
||||
<div class="content-container">
|
||||
|
||||
@@ -14,7 +14,6 @@ ion-toolbar{
|
||||
border-width: 0 !important;
|
||||
}
|
||||
.div-top-header{
|
||||
width: 400px;
|
||||
margin: 0 auto;
|
||||
background-color: #0782c9;
|
||||
overflow: auto;
|
||||
@@ -41,7 +40,6 @@ ion-toolbar{
|
||||
margin-right: 10px;
|
||||
}
|
||||
.content-top{
|
||||
width: 344px;
|
||||
background: #f3f2f2;
|
||||
height: 20px;
|
||||
margin: 0 auto;
|
||||
@@ -60,7 +58,6 @@ ion-toolbar{
|
||||
overflow: auto;
|
||||
}
|
||||
.title-content{
|
||||
width: 360px;
|
||||
margin: 0px auto;
|
||||
overflow: auto;
|
||||
padding: 0 !important;
|
||||
@@ -79,7 +76,6 @@ font-size: 25px;
|
||||
overflow: auto;
|
||||
}
|
||||
.ion-item-container{
|
||||
width: 360px;
|
||||
margin: 15px auto;
|
||||
border: 1px solid #ebebeb;
|
||||
border-radius: 5px;
|
||||
@@ -92,8 +88,8 @@ font-size: 25px;
|
||||
overflow: auto;
|
||||
}
|
||||
.ion-item-class-2{
|
||||
width: 360px;
|
||||
margin: 0px auto;
|
||||
display: flex;
|
||||
}
|
||||
.ion-icon-class{
|
||||
width: 45px;
|
||||
@@ -109,7 +105,7 @@ font-size: 25px;
|
||||
border-radius: 5px;
|
||||
padding-left: 5px;
|
||||
padding-right: 10px;
|
||||
float: left;
|
||||
flex: 1;
|
||||
}
|
||||
.ion-input-class-no-height{
|
||||
border: 1px solid #ebebeb;
|
||||
|
||||
@@ -81,7 +81,7 @@ export class NewPublicationPage implements OnInit {
|
||||
this.capturedImage = imageData;
|
||||
this.capturedImageTitle = new Date().getTime() + '.jpeg';
|
||||
}, (err) => {
|
||||
console.log(err);
|
||||
/* console.log(err); */
|
||||
});
|
||||
}
|
||||
|
||||
@@ -102,7 +102,7 @@ export class NewPublicationPage implements OnInit {
|
||||
this.capturedImage = imageData;
|
||||
this.capturedImageTitle = new Date().getTime() + '.jpeg';
|
||||
}, (err) => {
|
||||
console.log(err);
|
||||
/* console.log(err); */
|
||||
});
|
||||
}
|
||||
|
||||
@@ -139,8 +139,8 @@ export class NewPublicationPage implements OnInit {
|
||||
FileBase64: this.publication.FileBase64,
|
||||
FileExtension: 'jpeg',
|
||||
}
|
||||
console.log('Edit - keep image');
|
||||
console.log(this.publication);
|
||||
/* console.log('Edit - keep image');
|
||||
console.log(this.publication); */
|
||||
this.publications.UpdatePublication(this.publication.ProcessId, this.publication);
|
||||
this.close();
|
||||
}
|
||||
@@ -159,8 +159,8 @@ export class NewPublicationPage implements OnInit {
|
||||
FileExtension: 'jpeg',
|
||||
}
|
||||
|
||||
console.log('Create');
|
||||
console.log(this.publication);
|
||||
/* console.log('Create');
|
||||
console.log(this.publication); */
|
||||
this.publications.CreatePublication(this.folderId, this.publication);
|
||||
this.close();
|
||||
}
|
||||
|
||||
@@ -1,21 +1,6 @@
|
||||
<ion-header class="ion-no-border">
|
||||
<ion-toolbar class="ion-no-border bg-blue">
|
||||
<div class="div-top-header">
|
||||
<div class="div-search">
|
||||
<ion-icon tappable src='assets/images/icons-search.svg'></ion-icon>
|
||||
</div>
|
||||
<div class="div-logo">
|
||||
<img src='assets/images/logo-no-bg.png' alt='logo'>
|
||||
</div>
|
||||
<div class="div-profile">
|
||||
<ion-icon src='assets/images/icons-profile.svg'></ion-icon>
|
||||
</div>
|
||||
</div>
|
||||
</ion-toolbar>
|
||||
|
||||
</ion-header>
|
||||
|
||||
<ion-content>
|
||||
<div class="content-top"></div>
|
||||
<div class="content-container">
|
||||
<div *ngIf="publication.Title != ''">
|
||||
<div class="title-content">
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
border-width: 0 !important;
|
||||
}
|
||||
.div-top-header{
|
||||
width: 400px;
|
||||
margin: 0 auto;
|
||||
background-color: #0782c9;
|
||||
overflow: auto;
|
||||
@@ -37,7 +36,6 @@
|
||||
margin-right: 10px;
|
||||
}
|
||||
.content-top{
|
||||
width: 344px;
|
||||
background: #f3f2f2;
|
||||
height: 20px;
|
||||
margin: 0 auto;
|
||||
@@ -55,7 +53,6 @@
|
||||
overflow: auto;
|
||||
}
|
||||
.title-content{
|
||||
width: 360px;
|
||||
margin: 0px auto;
|
||||
overflow: auto;
|
||||
padding: 0 !important;
|
||||
@@ -67,7 +64,6 @@
|
||||
overflow: auto;
|
||||
}
|
||||
.div-title{
|
||||
width: 270px;
|
||||
/* padding: 0!important; */
|
||||
float: left;
|
||||
margin: 2.5px 0 0 5px;
|
||||
@@ -88,7 +84,6 @@
|
||||
object-fit: cover;
|
||||
}
|
||||
.post-description{
|
||||
width: 360px;
|
||||
margin: 0 auto;
|
||||
margin-bottom: 35px;
|
||||
}
|
||||
@@ -94,7 +94,7 @@ export class PublicationDetailPage implements OnInit {
|
||||
publicationType: publicationType,
|
||||
publication: this.publication,
|
||||
},
|
||||
cssClass: 'new-publication',
|
||||
cssClass: 'new-publication modal modal-desktop',
|
||||
backdropDismiss: false
|
||||
});
|
||||
await modal.present();
|
||||
|
||||
@@ -16,9 +16,9 @@
|
||||
<!-- Header -->
|
||||
<ion-toolbar >
|
||||
<div class="main-header">
|
||||
<div class="title-content">
|
||||
<div class="div-title">
|
||||
<ion-label class="title">Acções Presidenciais</ion-label>
|
||||
<div class="title-content d-flex justify-space-between">
|
||||
<div class="div-title flex-grow-1">
|
||||
<ion-label class="title ">Acções Presidenciais</ion-label>
|
||||
</div>
|
||||
<div class="div-icon">
|
||||
<button class="btn-no-color" (click)="AddPublicationFolder()">
|
||||
|
||||
@@ -55,13 +55,11 @@ ion-toolbar{
|
||||
|
||||
.title-content{
|
||||
margin: 0px auto;
|
||||
overflow: auto;
|
||||
padding: 0 !important;
|
||||
background: #fff;
|
||||
}
|
||||
.div-title{
|
||||
padding: 0!important;
|
||||
float: left;
|
||||
}
|
||||
.title{
|
||||
font-size: 25px;
|
||||
@@ -71,7 +69,6 @@ ion-toolbar{
|
||||
/* width: 45px;
|
||||
float: right; */
|
||||
font-size: 35px;
|
||||
overflow: auto;
|
||||
padding: 0 !important;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
|
||||
@@ -116,7 +116,7 @@ export class PublicationsPage implements OnInit {
|
||||
componentProps:{
|
||||
item: item,
|
||||
},
|
||||
cssClass: 'new-action',
|
||||
cssClass: 'new-action modal modal-desktop',
|
||||
backdropDismiss: false
|
||||
});
|
||||
await modal.present();
|
||||
@@ -131,7 +131,6 @@ export class PublicationsPage implements OnInit {
|
||||
}
|
||||
|
||||
async viewPublications(folderId: string) {
|
||||
console.log('FOLDER', folderId)
|
||||
|
||||
const enterAnimation = (baseEl: any) => {
|
||||
const backdropAnimation = this.animationController.create()
|
||||
@@ -160,7 +159,7 @@ export class PublicationsPage implements OnInit {
|
||||
this.closeDesktopComponent();
|
||||
|
||||
// OpenModal
|
||||
if( window.innerWidth <= 1024){
|
||||
if( window.innerWidth <= 800){
|
||||
/* let item = this.publicationFolderList; */
|
||||
const modal = await this.modalController.create({
|
||||
component: ViewPublicationsPage,
|
||||
@@ -169,7 +168,7 @@ export class PublicationsPage implements OnInit {
|
||||
componentProps:{
|
||||
folderId:folderId,
|
||||
},
|
||||
cssClass: 'new-action',
|
||||
cssClass: 'new-action modal modal-desktop',
|
||||
backdropDismiss: false
|
||||
});
|
||||
await modal.present();
|
||||
|
||||
+5
-19
@@ -1,26 +1,11 @@
|
||||
<ion-header class="ion-no-border">
|
||||
<ion-toolbar class="ion-no-border bg-blue">
|
||||
<div class="div-top-header">
|
||||
<div class="div-search">
|
||||
<ion-icon src='assets/images/icons-search.svg'></ion-icon>
|
||||
</div>
|
||||
<div class="div-logo">
|
||||
<img src='assets/images/logo-no-bg.png' alt='logo'>
|
||||
</div>
|
||||
<div class="div-profile">
|
||||
<ion-icon src='assets/images/icons-profile.svg'></ion-icon>
|
||||
</div>
|
||||
</div>
|
||||
</ion-toolbar>
|
||||
|
||||
</ion-header>
|
||||
<ion-content>
|
||||
<div class="content-top"></div>
|
||||
|
||||
<div class="content-container">
|
||||
<div *ngIf="publication.Title != ''">
|
||||
<div class="title-content">
|
||||
<div class="title-content px-20" (click)="close()">
|
||||
<div class="back-icon">
|
||||
<ion-icon (click)="close()" slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
|
||||
<ion-icon slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
|
||||
</div>
|
||||
<div class="div-title">
|
||||
<ion-label class="title"> {{publication.Title}}</ion-label>
|
||||
@@ -39,7 +24,7 @@
|
||||
<div *ngIf="publication.FileBase64.length < 30" class="post-img">
|
||||
<img src="/assets/icon/icon-no-image.svg" alt="image">
|
||||
</div>
|
||||
<div class="post-description">
|
||||
<div class="post-description px-20">
|
||||
<p>{{publication.Message}}</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -67,6 +52,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</ion-content>
|
||||
|
||||
<ion-footer>
|
||||
<ion-toolbar class="footer-toolbar">
|
||||
<ion-buttons slot="start">
|
||||
|
||||
-6
@@ -14,7 +14,6 @@
|
||||
border-width: 0 !important;
|
||||
}
|
||||
.div-top-header{
|
||||
width: 400px;
|
||||
margin: 0 auto;
|
||||
background-color: #0782c9;
|
||||
overflow: auto;
|
||||
@@ -41,7 +40,6 @@
|
||||
margin-right: 10px;
|
||||
}
|
||||
.content-top{
|
||||
width: 344px;
|
||||
background: #f3f2f2;
|
||||
height: 20px;
|
||||
margin: 0 auto;
|
||||
@@ -60,10 +58,8 @@
|
||||
overflow: auto;
|
||||
}
|
||||
.title-content{
|
||||
width: 360px;
|
||||
margin: 0px auto;
|
||||
overflow: auto;
|
||||
padding: 0 !important;
|
||||
}
|
||||
.back-icon{
|
||||
width: auto;
|
||||
@@ -72,7 +68,6 @@
|
||||
overflow: auto;
|
||||
}
|
||||
.div-title{
|
||||
width: 270px;
|
||||
/* padding: 0!important; */
|
||||
float: left;
|
||||
margin: 2.5px 0 0 5px;
|
||||
@@ -93,7 +88,6 @@
|
||||
object-fit: cover;
|
||||
}
|
||||
.post-description{
|
||||
width: 360px;
|
||||
margin: 0 auto;
|
||||
margin-bottom: 35px;
|
||||
}
|
||||
+1
-1
@@ -90,7 +90,7 @@ export class PublicationDetailPage implements OnInit {
|
||||
publicationType: publicationType,
|
||||
publication: this.publication,
|
||||
},
|
||||
cssClass: 'new-publication',
|
||||
cssClass: 'new-publication modal modal-desktop',
|
||||
backdropDismiss: false
|
||||
});
|
||||
await modal.present();
|
||||
|
||||
@@ -1,35 +1,20 @@
|
||||
<ion-header class="ion-no-border">
|
||||
<ion-toolbar class="bg-blue">
|
||||
<div class="div-top-header">
|
||||
<div class="div-search">
|
||||
<ion-icon src='assets/images/icons-search.svg'></ion-icon>
|
||||
</div>
|
||||
<div class="div-logo">
|
||||
<img src='assets/images/logo-no-bg.png' alt='logo'>
|
||||
</div>
|
||||
<div class="div-profile">
|
||||
<ion-icon src='assets/images/icons-profile.svg'></ion-icon>
|
||||
</div>
|
||||
</div>
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
|
||||
|
||||
<ion-header class="ion-no-border">
|
||||
<ion-toolbar class="bg-blue">
|
||||
<div class="content-top"></div>
|
||||
<div class="main-header">
|
||||
<div class="title-content">
|
||||
<div class="back-icon">
|
||||
<ion-icon (click)="close()" slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
|
||||
<div class="title-content d-flex">
|
||||
<div class="back-icon" (click)="close()">
|
||||
<ion-icon slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
|
||||
</div>
|
||||
<div class="div-title">
|
||||
<div class="div-title flex-grow-1">
|
||||
<ion-label class="title">{{item.Description}}</ion-label>
|
||||
<p class="item-content-detail">{{item.Detail}}</p>
|
||||
<p class="item-content-date">{{item.DateBegin}}</p>
|
||||
</div>
|
||||
<div class="actions-icon">
|
||||
<div class="actions-icon" (click)="AddPublication('2',item.ProcessId)">
|
||||
<!-- <ion-icon (click)="AddPublication('1',item.ProcessId)" slot="end" src='assets/images/icons-add-photo.svg'></ion-icon> -->
|
||||
<ion-icon (click)="AddPublication('2',item.ProcessId)" slot="end" src='assets/images/icons-add.svg'></ion-icon>
|
||||
<ion-icon slot="end" src='assets/images/icons-add.svg'></ion-icon>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -54,7 +39,7 @@
|
||||
<div *ngIf="publication.FileBase64.length < 30" class="post-img">
|
||||
<img src="/assets/icon/icon-no-image.svg" alt="image">
|
||||
</div>
|
||||
<div class="post-content">
|
||||
<div class="post-content px-20">
|
||||
<div class="post-title-time">
|
||||
<div class="post-title">
|
||||
<ion-label>{{publication.Title}}</ion-label>
|
||||
@@ -70,7 +55,7 @@
|
||||
<div class="post-img">
|
||||
<img src="/assets/icon/icon-no-image.svg" alt="image">
|
||||
</div>
|
||||
<div class="post-content">
|
||||
<div class="post-content px-20">
|
||||
<div class="post-title-time">
|
||||
<div class="post-title">
|
||||
<ion-label><ion-skeleton-text animated animated style="width: 60%;"></ion-skeleton-text></ion-label>
|
||||
@@ -85,7 +70,7 @@
|
||||
<div class="post-img">
|
||||
<img src="/assets/icon/icon-no-image.svg" alt="image">
|
||||
</div>
|
||||
<div class="post-content">
|
||||
<div class="post-content px-20">
|
||||
<div class="post-title-time">
|
||||
<div class="post-title">
|
||||
<ion-label><ion-skeleton-text animated animated style="width: 60%;"></ion-skeleton-text></ion-label>
|
||||
|
||||
@@ -66,7 +66,6 @@
|
||||
padding: 15px 20px 0 20px;
|
||||
}
|
||||
.content-top{
|
||||
width: 344px;
|
||||
background: #f3f2f2;
|
||||
height: 20px;
|
||||
margin: 0 auto;
|
||||
@@ -86,7 +85,6 @@
|
||||
overflow: auto;
|
||||
}
|
||||
.title-content{
|
||||
width: 360px;
|
||||
margin: 0px auto;
|
||||
overflow: auto;
|
||||
padding: 0 !important;
|
||||
@@ -100,7 +98,6 @@
|
||||
|
||||
}
|
||||
.div-title{
|
||||
width: 221px;
|
||||
/* padding: 0!important; */
|
||||
float: left;
|
||||
margin: 2.5px 0 0 5px;
|
||||
@@ -148,7 +145,6 @@
|
||||
object-fit: cover;
|
||||
}
|
||||
.post-content{
|
||||
width: 360px;
|
||||
margin: 0 auto;
|
||||
margin-bottom: 35px;
|
||||
}
|
||||
|
||||
@@ -93,7 +93,7 @@ export class ViewPublicationsPage implements OnInit {
|
||||
publicationType: publicationType,
|
||||
folderId: folderId,
|
||||
},
|
||||
cssClass: 'new-publication',
|
||||
cssClass: 'new-publication modal modal-desktop',
|
||||
backdropDismiss: false
|
||||
});
|
||||
await modal.present();
|
||||
@@ -109,7 +109,7 @@ export class ViewPublicationsPage implements OnInit {
|
||||
publicationId: publicationId,
|
||||
folderId: this.folderId,
|
||||
},
|
||||
cssClass: 'publication-detail',
|
||||
cssClass: 'publication-detail modal modal-desktop',
|
||||
backdropDismiss: false
|
||||
});
|
||||
await modal.present();
|
||||
|
||||
@@ -146,7 +146,11 @@
|
||||
src="assets/images/icons-viagem.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="content ion-align-items-center">
|
||||
<p class="result-name">{{ searchDocument.Assunto}}</p>
|
||||
|
||||
<div class="d-flex ion-justify-content-between ">
|
||||
<span class="result-name">{{ searchDocument.Assunto}}</span>
|
||||
<span class="app-name" *ngIf="currentPath == '/home/gabinete-digital' ">{{ searchDocument.appName}}</span>
|
||||
</div>
|
||||
<div class="d-flex ion-justify-content-between ">
|
||||
<span class="organic-entity">{{ searchDocument.EntidadeOrganicaNome }}</span>
|
||||
<span class="documente-date">{{ formateIsoDate(searchDocument.Data) }}</span>
|
||||
|
||||
@@ -155,7 +155,7 @@ ion-slide{
|
||||
.content{
|
||||
width: 100%;
|
||||
margin-left: 10px;
|
||||
p{
|
||||
.result-name{
|
||||
margin: 0px;
|
||||
width: 100%;
|
||||
font-family: Roboto;
|
||||
@@ -169,6 +169,22 @@ ion-slide{
|
||||
font-weight: 300;
|
||||
color: #797979;
|
||||
}
|
||||
.app-name{
|
||||
background: #42b9f2;
|
||||
border-radius: 18px;
|
||||
text-align: center;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0px 5px;
|
||||
color: white;
|
||||
font-size: 9pt;
|
||||
font-weight: 500;
|
||||
height: 19px;
|
||||
-webkit-border-radius: 18px;
|
||||
-moz-border-radius: 18px;
|
||||
-ms-border-radius: 18px;
|
||||
-o-border-radius: 18px;
|
||||
}
|
||||
span.documente-date{
|
||||
|
||||
}
|
||||
|
||||
@@ -36,6 +36,8 @@ export class SearchPage implements OnInit {
|
||||
|
||||
showLoader: boolean;
|
||||
|
||||
currentPath: string
|
||||
|
||||
// See http://idangero.us/swiper/api/ for valid options.
|
||||
slideOpts = {
|
||||
slidesPerView: parseInt(`${window.innerWidth/147}`, 10),
|
||||
@@ -53,6 +55,8 @@ export class SearchPage implements OnInit {
|
||||
private search: SearchService,
|
||||
private modalCtrl: ModalController,) {
|
||||
this.ordinance = "recent";
|
||||
|
||||
this.currentPath= window.location.pathname;
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
@@ -220,6 +224,7 @@ export class SearchPage implements OnInit {
|
||||
// bind respose
|
||||
|
||||
this.sortArrayISODate(res.Documents).forEach(e => {
|
||||
e['appName'] = 'Correspondencia'
|
||||
this.searchDocuments.push(e)
|
||||
});
|
||||
|
||||
@@ -245,6 +250,7 @@ export class SearchPage implements OnInit {
|
||||
|
||||
|
||||
this.sortArrayISODate(res.Documents).forEach(e => {
|
||||
e['appName'] = 'ArquivoDespachoElect'
|
||||
this.searchDocuments.push(e)
|
||||
});
|
||||
|
||||
|
||||
@@ -1,14 +1,43 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http';
|
||||
import { environment } from 'src/environments/environment';
|
||||
import { StorageService } from 'src/app/services/storage.service';
|
||||
import { AuthConnstants } from 'src/app/config/auth-constants';
|
||||
import { Token } from '../models/token.model';
|
||||
import { FCM } from 'cordova-plugin-fcm-with-dependecy-updated/ionic/ngx';
|
||||
/* import { AgendaPage } from '../pages/agenda/agenda.page'
|
||||
import { ExpedientePage } from '../pages/gabinete-digital/expediente/expediente.page'
|
||||
import { EventListPage } from '../pages/gabinete-digital/event-list/event-list.page';
|
||||
import { PublicationsPage } from '../pages/publications/publications.page'
|
||||
import { ViewPublicationsPage } from '../pages/publications/view-publications/view-publications.page' */
|
||||
import { ModalController, AlertController, AnimationController, Platform } from '@ionic/angular';
|
||||
import { ViewEventPage } from '../pages/agenda/view-event/view-event.page';
|
||||
import { ExpedienteDetailPage } from '../pages/gabinete-digital/expediente/expediente-detail/expediente-detail.page';
|
||||
import { PublicationDetailPage } from '../pages/publications/publication-detail/publication-detail.page';
|
||||
import { ViewPublicationsPage } from '../pages/publications/view-publications/view-publications.page';
|
||||
import { ApproveEventModalPage } from '../pages/gabinete-digital/event-list/approve-event-modal/approve-event-modal.page';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class NotificationsService {
|
||||
|
||||
constructor(private http: HttpClient,) { }
|
||||
adding: "intervenient" | "CC" = "intervenient";
|
||||
folderId: string;
|
||||
|
||||
constructor(
|
||||
private http: HttpClient,
|
||||
private fcm: FCM,
|
||||
private storageService: StorageService,
|
||||
private modalController: ModalController,
|
||||
public modalCtrl: AlertController,
|
||||
private animationController: AnimationController,
|
||||
private platform: Platform/* ,
|
||||
public agenda: AgendaPage,
|
||||
public expediante: ExpedientePage,
|
||||
public eventList: EventListPage,
|
||||
public publication: PublicationsPage,
|
||||
public viewPublication: ViewPublicationsPage */) { }
|
||||
|
||||
getTokenByUserIdAndId(user, userID) {
|
||||
const geturl = environment.apiURL + 'notifications/user/' + userID;
|
||||
@@ -16,15 +45,199 @@ export class NotificationsService {
|
||||
return this.http.get<Token[]>(`${geturl}`);
|
||||
}
|
||||
|
||||
postToken(userId, token) {
|
||||
const geturl = environment.apiURL + 'notifications/token';
|
||||
getAndpostToken(username) {
|
||||
if(this.platform.is('desktop')) {
|
||||
console.log('Notifications not supported')
|
||||
} else {
|
||||
|
||||
const geturl = environment.apiURL + 'notifications/token';
|
||||
|
||||
let data = {
|
||||
UserId: userId,
|
||||
TokenId: token,
|
||||
Status: 1,
|
||||
Service: 2
|
||||
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': 'Basic cGF1bG8ucGludG9AZ2FiaW5ldGVkaWdpdGFsLmxvY2FsOnRhYnRlc3RlQDAwNg==' };
|
||||
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);
|
||||
})
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
}
|
||||
return this.http.post<Token[]>(`${geturl}`,data);
|
||||
|
||||
}
|
||||
|
||||
async onReceviNotification(viewEventDetail, viewExpedientDetail, openApproveModal, viewPublications, viewPublicationDetail) {
|
||||
this.fcm.onNotification().subscribe(data => {
|
||||
if (data.click_action) {
|
||||
console.log("Received in background: ", data);
|
||||
|
||||
if (data.Service === "agenda") {
|
||||
viewEventDetail(data.IdObject)
|
||||
}
|
||||
else if (data.Service === "gabinete-digital" && data.Object === "expediente") {
|
||||
console.log('expediante 1')
|
||||
viewExpedientDetail(data.IdObject)
|
||||
}
|
||||
else if (data.Service === "gabinete-digital" && data.Object === "event-list") {
|
||||
openApproveModal(data.IdObject);
|
||||
}
|
||||
else if (data.Service === "accoes" && data.Object === "accao") {
|
||||
viewPublications(data.IdObject)
|
||||
}
|
||||
else if (data.Service === "accoes" && data.Object === "publicacao") {
|
||||
viewPublicationDetail(data.IdObject)
|
||||
}
|
||||
|
||||
} /* else {
|
||||
console.log("Received in foreground: ", data);
|
||||
|
||||
console.log(data.Service)
|
||||
console.log(data.Object)
|
||||
console.log(data.IdObject)
|
||||
this.openApproveModal(data.IdObject);
|
||||
|
||||
}; */
|
||||
});
|
||||
}
|
||||
|
||||
platformVerify() {
|
||||
|
||||
if (this.platform.is('cordova')) {
|
||||
} else {
|
||||
}
|
||||
}
|
||||
|
||||
async viewEventDetail(eventId: any) {
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: ViewEventPage,
|
||||
componentProps: {
|
||||
eventId: eventId,
|
||||
adding: this.adding
|
||||
},
|
||||
cssClass: 'modal modal-desktop',
|
||||
backdropDismiss: false
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then((res) => {
|
||||
if (res) {
|
||||
//this.viewEventDetailDismiss(res);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
async openApproveModal(eventSerialNumber) {
|
||||
let classs;
|
||||
if (window.innerWidth <= 1024) {
|
||||
classs = 'cal-modal modal modal-desktop'
|
||||
} else {
|
||||
classs = 'gabinete-digital-mobile-modal-to-Desktop'
|
||||
}
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: ApproveEventModalPage,
|
||||
componentProps: {
|
||||
serialNumber: eventSerialNumber,
|
||||
},
|
||||
cssClass: 'event-list',
|
||||
backdropDismiss: false
|
||||
});
|
||||
|
||||
await modal.present();
|
||||
|
||||
modal.onDidDismiss();
|
||||
}
|
||||
|
||||
async viewExpedientDetail(serialNumber: any) {
|
||||
let classs;
|
||||
if (window.innerWidth <= 800) {
|
||||
classs = 'modal'
|
||||
} else {
|
||||
classs = 'modal modal-desktop showAsideOptions'
|
||||
}
|
||||
console.log(serialNumber);
|
||||
console.log('expediante 2')
|
||||
const modal = await this.modalController.create({
|
||||
component: ExpedienteDetailPage,
|
||||
componentProps: {
|
||||
serialNumber: serialNumber,
|
||||
profile: "MDGPR",
|
||||
},
|
||||
cssClass: classs,
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then((res) => {
|
||||
if (res) {
|
||||
console.log(res);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
async viewPublicationDetail(publicationId: string) {
|
||||
const modal = await this.modalController.create({
|
||||
component: PublicationDetailPage,
|
||||
componentProps: {
|
||||
publicationId: publicationId,
|
||||
folderId: this.folderId,
|
||||
},
|
||||
cssClass: 'publication-detail',
|
||||
backdropDismiss: false
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then(() => {
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
async viewPublications(folderId) {
|
||||
|
||||
const enterAnimation = (baseEl: any) => {
|
||||
const backdropAnimation = this.animationController.create()
|
||||
.addElement(baseEl.querySelector('ion-backdrop')!)
|
||||
.fromTo('opacity', '0.01', 'var(--backdrop-opacity)');
|
||||
|
||||
const wrapperAnimation = this.animationController.create()
|
||||
.addElement(baseEl.querySelector('.modal-wrapper')!)
|
||||
.keyframes([
|
||||
{ offset: 0, opacity: '0', transform: 'scale(0)' },
|
||||
{ offset: 1, opacity: '0.99', transform: 'scale(1)' }
|
||||
]);
|
||||
|
||||
return this.animationController.create()
|
||||
.addElement(baseEl)
|
||||
.easing('ease-out')
|
||||
.duration(500)
|
||||
.addAnimation([backdropAnimation, wrapperAnimation]);
|
||||
}
|
||||
|
||||
const leaveAnimation = (baseEl: any) => {
|
||||
return enterAnimation(baseEl).direction('reverse');
|
||||
}
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: ViewPublicationsPage,
|
||||
enterAnimation,
|
||||
leaveAnimation,
|
||||
componentProps: {
|
||||
folderId: folderId,
|
||||
},
|
||||
cssClass: 'new-action',
|
||||
backdropDismiss: false
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<div class="main-header">
|
||||
<div class="header-top">
|
||||
<div class="middle">
|
||||
<ion-label class="title">{{room.name.split('-').join(' ')}}</ion-label>
|
||||
<ion-label class="title">{{roomName}}</ion-label>
|
||||
</div>
|
||||
<div class="right">
|
||||
<button class="btn-no-color" (click)="openGroupMessagesOptions()">
|
||||
|
||||
@@ -23,10 +23,14 @@ export class GroupMessagesPage implements OnInit, OnChanges {
|
||||
|
||||
|
||||
room:any;
|
||||
roomName:any;
|
||||
members:any;
|
||||
|
||||
@Input() roomId:string;
|
||||
@Output() closeAllDesktopComponents:EventEmitter<any> = new EventEmitter<any>();
|
||||
@Output() showEmptyContainer:EventEmitter<any> = new EventEmitter<any>();
|
||||
@Output() openGroupContacts:EventEmitter<any> = new EventEmitter<any>();
|
||||
@Output() openEditGroup:EventEmitter<any> = new EventEmitter<any>();
|
||||
|
||||
constructor(
|
||||
private menu: MenuController,
|
||||
@@ -79,6 +83,7 @@ export class GroupMessagesPage implements OnInit, OnChanges {
|
||||
this.showLoader = true;
|
||||
this.chatService.getRoomInfo(this.roomId).subscribe(room=>{
|
||||
this.room = room['room'];
|
||||
this.roomName = this.room.name.split('-').join(' ');
|
||||
this.getGroupContacts(this.room);
|
||||
this.loadGroupMessages(this.room);
|
||||
this.showLoader = false;
|
||||
@@ -190,7 +195,32 @@ export class GroupMessagesPage implements OnInit, OnChanges {
|
||||
roomId: this.roomId,
|
||||
}
|
||||
});
|
||||
return await modal.present();
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then(res=>{
|
||||
console.log(res);
|
||||
if(res.data == 'leave'){
|
||||
console.log('LEAVE');
|
||||
|
||||
}
|
||||
else if(res.data == 'delete'){
|
||||
this.closeAllDesktopComponents.emit();
|
||||
this.showEmptyContainer.emit();
|
||||
}
|
||||
else if(res.data == 'cancel'){
|
||||
console.log('CANCEL');
|
||||
}
|
||||
else if(res.data == 'edit'){
|
||||
console.log('CANCEL');
|
||||
}
|
||||
else{
|
||||
this.roomName = res.data.name.split('-').join(' ');
|
||||
console.log(this.roomName);
|
||||
|
||||
this.getRoomInfo();
|
||||
//this.modalController.dismiss();
|
||||
};
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
openSendGroupMessageOptions(ev: any){
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<ion-content>
|
||||
<div class="title width-100">
|
||||
<div class="title-container">
|
||||
<div class="title-container d-flex justify-space-between">
|
||||
<span class="text-center mt-0 aside-title px-20"><label>Eventos para Aprovação</label></span>
|
||||
<button class="btn-no-color" (click)="doRefresh($event)">
|
||||
<ion-icon class="title-icon" name="reload-circle"></ion-icon>
|
||||
|
||||
@@ -27,16 +27,19 @@ export class ChatPopoverPage implements OnInit {
|
||||
}
|
||||
close(){
|
||||
if( window.innerWidth <= 1024){
|
||||
this.popoverController.dismiss();
|
||||
//this.popoverController.dismiss();
|
||||
this.modalController.dismiss('cancel');
|
||||
}
|
||||
else{
|
||||
this.modalController.dismiss();
|
||||
this.modalController.dismiss('cancel');
|
||||
}
|
||||
}
|
||||
|
||||
//Top menu options
|
||||
//Close
|
||||
leaveGroup(){
|
||||
console.log('leave');
|
||||
|
||||
let body = { "roomId":this.roomId, }
|
||||
|
||||
this.chatService.getRoomInfo(this.roomId).subscribe(room=>{
|
||||
@@ -53,7 +56,7 @@ export class ChatPopoverPage implements OnInit {
|
||||
});
|
||||
}
|
||||
});
|
||||
this.popoverController.dismiss(true);
|
||||
this.modalController.dismiss('leave');
|
||||
}
|
||||
//Delete
|
||||
deleteGroup(){
|
||||
@@ -72,12 +75,12 @@ export class ChatPopoverPage implements OnInit {
|
||||
});
|
||||
}
|
||||
});
|
||||
this.popoverController.dismiss(true);
|
||||
this.modalController.dismiss('delete');
|
||||
}
|
||||
async openChangeGroupName(){
|
||||
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
async openChangeGroupName(){
|
||||
this.modalController.dismiss('edit');
|
||||
/* const modal = await this.modalController.create({
|
||||
component: EditGroupPage,
|
||||
componentProps: {
|
||||
roomId: this.roomId,
|
||||
@@ -89,8 +92,8 @@ export class ChatPopoverPage implements OnInit {
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then((res)=>{
|
||||
console.log(res.data);
|
||||
this.popoverController.dismiss(res.data);
|
||||
});
|
||||
this.modalController.dismiss(res.data);
|
||||
}); */
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -70,10 +70,10 @@ export class NewPublicationPage implements OnInit {
|
||||
|
||||
getPublicationDetail(){
|
||||
this.showLoader = true;
|
||||
console.log(this.publicationId);
|
||||
//console.log(this.publicationId);
|
||||
/* console.log(this.folderId); */
|
||||
this.publications.GetPublicationById(this.publicationId).subscribe(res=>{
|
||||
console.log(res);
|
||||
//console.log(res);
|
||||
/* this.publication = res; */
|
||||
this.publication = {
|
||||
DateIndex: res.DateIndex,
|
||||
|
||||
@@ -108,7 +108,6 @@
|
||||
|
||||
.actions-icon{
|
||||
display: flex;
|
||||
overflow: auto;
|
||||
align-items: top;
|
||||
justify-content: flex-end;
|
||||
padding: 0 !important;
|
||||
@@ -116,7 +115,6 @@
|
||||
.actions-icon ion-icon{
|
||||
margin-left: 5px;
|
||||
font-size: 35px;
|
||||
float: right;
|
||||
padding: 0 !important;
|
||||
}
|
||||
/* .title-icon{
|
||||
|
||||
Reference in New Issue
Block a user