resolve conflit

This commit is contained in:
Hirondino Van-Dunem
2022-12-15 18:04:49 +01:00
416 changed files with 37702 additions and 2316 deletions
-1
View File
@@ -18,7 +18,6 @@
**/Dockerfile* **/Dockerfile*
**/node_modules **/node_modules
**/npm-debug.log **/npm-debug.log
**/www
**/secrets.dev.yaml **/secrets.dev.yaml
**/values.dev.yaml **/values.dev.yaml
LICENSE LICENSE
+2 -1
View File
@@ -4,6 +4,7 @@ COPY ./package*.json /app/
RUN npm config set unsafe-perm true RUN npm config set unsafe-perm true
RUN npm install -g ionic RUN npm install -g ionic
RUN npm config set legacy-peer-deps true RUN npm config set legacy-peer-deps true
RUN npm i -D typescript@4.3.5
RUN npm install --save --legacy-peer-deps RUN npm install --save --legacy-peer-deps
COPY ./ /app/ COPY ./ /app/
RUN ionic build --prod RUN ionic build --prod
@@ -11,4 +12,4 @@ RUN ionic build --prod
FROM nginx:alpine FROM nginx:alpine
COPY ./nginx/default.conf /etc/nginx/conf.d/default.conf COPY ./nginx/default.conf /etc/nginx/conf.d/default.conf
RUN rm -rf /usr/share/nginx/html/* RUN rm -rf /usr/share/nginx/html/*
COPY --from=build /app/www/ /usr/share/nginx/html/ COPY /www/ /usr/share/nginx/html/
+31983
View File
File diff suppressed because it is too large Load Diff
-1
View File
@@ -1 +0,0 @@
/* /index.html 200
+8
View File
@@ -245,8 +245,16 @@ const routes = [
{ {
path: 'diplomas-gerar-options', path: 'diplomas-gerar-options',
loadChildren: () => import('./shared/popover/diplomas-gerar-options/diplomas-gerar-options.module').then( m => m.DiplomasGerarOptionsPageModule) loadChildren: () => import('./shared/popover/diplomas-gerar-options/diplomas-gerar-options.module').then( m => m.DiplomasGerarOptionsPageModule)
},
{
path: 'chat-debugging',
loadChildren: () => import('./shared/popover/chat-debugging/chat-debugging.module').then( m => m.ChatDebuggingPageModule)
},
{
path: 'chat-message-debugging',
loadChildren: () => import('./shared/popover/chat-message-debugging/chat-message-debugging.module').then( m => m.ChatMessageDebuggingPageModule) loadChildren: () => import('./shared/popover/chat-message-debugging/chat-message-debugging.module').then( m => m.ChatMessageDebuggingPageModule)
} }
/* /*
path: 'chat', path: 'chat',
-5
View File
@@ -92,11 +92,6 @@ export class AppComponent {
} }
}) })
this.storageservice.get('theme').then((theme) =>{
console.log('THEME: ', theme)
this.ThemeService.setTheme(theme)
})
}); });
} }
} }
+1 -5
View File
@@ -24,13 +24,10 @@ import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { CalendarModule, DateAdapter } from 'angular-calendar'; import { CalendarModule, DateAdapter } from 'angular-calendar';
import { adapterFactory } from 'angular-calendar/date-adapters/date-fns'; import { adapterFactory } from 'angular-calendar/date-adapters/date-fns';
import { NoopAnimationsModule } from '@angular/platform-browser/animations'; import { NoopAnimationsModule } from '@angular/platform-browser/animations';
import { MessagesPage } from './pages/chat/messages/messages.page';
import { WebsocketService } from './services/websocket.service'
import { ChatService } from './services/chat.service'; import { ChatService } from './services/chat.service';
import {MatDatepickerModule} from '@angular/material/datepicker'; import {MatDatepickerModule} from '@angular/material/datepicker';
// import { FCM } from 'cordova-plugin-fcm-with-dependecy-updated/ionic/ngx'; // import { FCM } from 'cordova-plugin-fcm-with-dependecy-updated/ionic/ngx';
import {MAT_DATE_FORMATS, MAT_DATE_LOCALE} from '@angular/material/core'; import {MAT_DATE_LOCALE} from '@angular/material/core';
import { NgxMatDateFormats, NGX_MAT_DATE_FORMATS } from '@angular-material-components/datetime-picker';
import { Network } from '@ionic-native/network/ngx'; import { Network } from '@ionic-native/network/ngx';
import { MultipleDocumentsPicker } from '@awesome-cordova-plugins/multiple-document-picker/ngx'; import { MultipleDocumentsPicker } from '@awesome-cordova-plugins/multiple-document-picker/ngx';
import { DocumentViewer } from '@awesome-cordova-plugins/document-viewer/ngx'; import { DocumentViewer } from '@awesome-cordova-plugins/document-viewer/ngx';
@@ -130,7 +127,6 @@ import { FirebaseX } from '@ionic-native/firebase-x/ngx'; */
FilePath, FilePath,
/* FCM, /* FCM,
FirebaseX, */ FirebaseX, */
WebsocketService,
ChatService, ChatService,
ScreenOrientation, ScreenOrientation,
Network, Network,
+1 -1
View File
@@ -33,7 +33,7 @@ export class AuthGuard implements CanActivate {
return false return false
} else { } else {
if(this.p.userPermission(this.p.permissionList.Chat.access) == true) { if(this.p.userPermission(this.p.permissionList.Chat.access) == true) {
this.authService.loginChat(); // this.authService.loginChat();
} }
const pathname = state.url const pathname = state.url
+2 -2
View File
@@ -1,9 +1,9 @@
<ion-tabs class="tab" > <ion-tabs class="tab" >
<ion-tab-bar *ngIf="p.userPermissionCount([permissionList.Agenda.access, permissionList.Gabinete.access, permissionList.Actions.access, permissionList.Chat.access]) >= 2 || (p.userPermission([permissionList.Agenda.access]) && loggeduser.OwnerCalendars.length != 0) || p.userPermission([permissionList.Gabinete.access])" class="bottoms" slot="bottom"> <ion-tab-bar *ngIf="p.userPermissionCount([permissionList.Agenda.access, permissionList.Gabinete.access, permissionList.Actions.access, permissionList.Chat.access]) >= 2 || (p.userPermission([permissionList.Agenda.access]) && SessionStore.user.OwnerCalendars.length != 0) || p.userPermission([permissionList.Gabinete.access])" class="bottoms" slot="bottom">
<ion-tab-button *ngIf="loggeduser.OwnerCalendars.length >= 1 || p.userPermission([permissionList.Gabinete.access])" (click)="goto('/home/events')" tab="events" [class.active]="pathname === '/home/events'"> <ion-tab-button *ngIf="SessionStore.user.OwnerCalendars.length >= 1 || p.userPermission([permissionList.Gabinete.access])" (click)="goto('/home/events')" tab="events" [class.active]="pathname === '/home/events'">
<!-- <ion-icon name="home"></ion-icon> --> <!-- <ion-icon name="home"></ion-icon> -->
<ion-icon *ngIf="pathname != '/home/events'" class="nav-icon" src="assets/images/icons-nav-home.svg"></ion-icon> <ion-icon *ngIf="pathname != '/home/events'" class="nav-icon" src="assets/images/icons-nav-home.svg"></ion-icon>
<ion-icon *ngIf="pathname == '/home/events'" class="nav-icon" src="assets/images/nav-hover/icons-nav-home-active.svg"></ion-icon> <ion-icon *ngIf="pathname == '/home/events'" class="nav-icon" src="assets/images/nav-hover/icons-nav-home-active.svg"></ion-icon>
+2 -6
View File
@@ -20,8 +20,7 @@ import { RouteService } from 'src/app/services/route.service';
import { NativeNotificationService } from 'src/app/services/native-notification.service'; import { NativeNotificationService } from 'src/app/services/native-notification.service';
import { UserSession } from '../models/user.model'; import { UserSession } from '../models/user.model';
import { PermissionList } from '../models/permission/permissionList'; import { PermissionList } from '../models/permission/permissionList';
import { LoginUserRespose } from 'src/app/models/user.model';
import { AuthService } from 'src/app/services/auth.service';
@@ -75,8 +74,7 @@ export class HomePage implements OnInit {
audioName: string = ""; audioName: string = "";
public user: UserSession; public user: UserSession;
permissionList = new PermissionList(); permissionList = new PermissionList();
loggeduser: LoginUserRespose; SessionStore = SessionStore
constructor( constructor(
private router: Router, private router: Router,
@@ -89,11 +87,9 @@ export class HomePage implements OnInit {
private eventservice: EventsService, private eventservice: EventsService,
private processservice: ProcessesService, private processservice: ProcessesService,
public RouteService: RouteService, public RouteService: RouteService,
private authService: AuthService,
private NativeNotificationService: NativeNotificationService, private NativeNotificationService: NativeNotificationService,
private sqliteservice: SqliteService, private sqliteservice: SqliteService,
) { ) {
this.loggeduser = authService.ValidatedUser;
if (SessionStore.exist) { if (SessionStore.exist) {
this.user = SessionStore.user; this.user = SessionStore.user;
} }
@@ -14,6 +14,8 @@
<div class="attach-icon"> <div class="attach-icon">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-attach-doc.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-attach-doc.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/theme/gov/icons-attach-doc.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/theme/gov/icons-attach-doc.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " src="assets/images/theme/{{ThemeService.currentTheme}}/icons-attach-doc.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " slot="icon-only" src="assets/images/theme/{{ThemeService.currentTheme}}/icons-attach-doc.svg"></ion-icon>
</div> </div>
<div class="attach-document pl-10 "> <div class="attach-document pl-10 ">
<ion-label>Anexar Documentos</ion-label> <ion-label>Anexar Documentos</ion-label>
@@ -3,6 +3,7 @@
<button class="btn-no-color" (click)="close()"> <button class="btn-no-color" (click)="close()">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="end" class="arrow-right-icon" src='assets/images/icons-arrow-arrow-right.svg'></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="end" class="arrow-right-icon" src='assets/images/icons-arrow-arrow-right.svg'></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" class="arrow-right-icon" src='assets/images/theme/gov/icons-calendar-arrow-right.svg'></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" class="arrow-right-icon" src='assets/images/theme/gov/icons-calendar-arrow-right.svg'></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " slot="icon-only" class="arrow-right-icon" src="assets/images/theme/{{ThemeService.currentTheme}}/icons-calendar-arrow-right.svg"></ion-icon>
</button> </button>
</div> </div>
<div class="buttons"> <div class="buttons">
@@ -48,7 +48,7 @@ export class ChatOptionsFeaturesPage implements OnInit {
} }
ngOnInit() { ngOnInit() {
this.chatService.refreshtoken(); // this.chatService.refreshtoken();
} }
notImplemented() { notImplemented() {
@@ -96,6 +96,8 @@
<div class="add-people" > <div class="add-people" >
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="start" src="assets/images/theme/gov/icons-arrow-forward.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="start" src="assets/images/theme/gov/icons-arrow-forward.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " slot="start" src="assets/images/theme/{{ThemeService.currentTheme}}/icons-arrow-forward.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " slot="start" src="assets/images/theme/{{ThemeService.currentTheme}}/icons-arrow-forward.svg"></ion-icon>
</div> </div>
</div> </div>
</div> </div>
@@ -118,6 +120,8 @@
<div class="add-people" > <div class="add-people" >
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="start" src="assets/images/theme/gov/icons-arrow-forward.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="start" src="assets/images/theme/gov/icons-arrow-forward.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " slot="start" src="assets/images/theme/{{ThemeService.currentTheme}}/icons-arrow-forward.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " slot="start" src="assets/images/theme/{{ThemeService.currentTheme}}/icons-arrow-forward.svg"></ion-icon>
</div> </div>
</div> </div>
</div> </div>
@@ -128,6 +132,8 @@
<div class="attach-icon d-flex align-center"> <div class="attach-icon d-flex align-center">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' "src="assets/images/icons-attach-doc.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' "src="assets/images/icons-attach-doc.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/theme/gov/icons-attach-doc.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/theme/gov/icons-attach-doc.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " src="assets/images/theme/{{ThemeService.currentTheme}}/icons-attach-doc.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " src="assets/images/theme/{{ThemeService.currentTheme}}/icons-attach-doc.svg"></ion-icon>
</div> </div>
<div class="attach-document pl-10"> <div class="attach-document pl-10">
<ion-label>Anexar Documentos</ion-label> <ion-label>Anexar Documentos</ion-label>
@@ -1,10 +1,9 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { AnimationController, ModalController, NavParams } from '@ionic/angular'; import { ModalController, NavParams } from '@ionic/angular';
import { Despacho } from 'src/app/models/despacho.model'; import { Despacho } from 'src/app/models/despacho.model';
import { EventPerson } from 'src/app/models/eventperson.model'; import { EventPerson } from 'src/app/models/eventperson.model';
import { Participant } from 'src/app/models/participant.model'; import { Participant } from 'src/app/models/participant.model';
import { Folder } from 'src/app/models/folder.model'; import { Folder } from 'src/app/models/folder.model';
import { AuthService } from 'src/app/services/auth.service';
import { ProcessesService } from 'src/app/services/processes.service'; import { ProcessesService } from 'src/app/services/processes.service';
import { DiscartExpedientModalPage } from 'src/app/pages/gabinete-digital/discart-expedient-modal/discart-expedient-modal.page'; import { DiscartExpedientModalPage } from 'src/app/pages/gabinete-digital/discart-expedient-modal/discart-expedient-modal.page';
import { ExpedienteDetailPage } from 'src/app/pages/gabinete-digital/expediente/expediente-detail/expediente-detail.page'; import { ExpedienteDetailPage } from 'src/app/pages/gabinete-digital/expediente/expediente-detail/expediente-detail.page';
@@ -21,6 +20,7 @@ import { DespachoService } from 'src/app/Rules/despacho.service';
import { PedidoService } from 'src/app/Rules/pedido.service' import { PedidoService } from 'src/app/Rules/pedido.service'
import { fullTask } from 'src/app/models/dailyworktask.model'; import { fullTask } from 'src/app/models/dailyworktask.model';
import { ThemeService } from 'src/app/services/theme.service' import { ThemeService } from 'src/app/services/theme.service'
import { SessionStore } from 'src/app/store/session.service';
const CUSTOM_DATE_FORMATS: NgxMatDateFormats = { const CUSTOM_DATE_FORMATS: NgxMatDateFormats = {
@@ -93,16 +93,13 @@ export class CreateProcessPage implements OnInit {
private modalController: ModalController, private modalController: ModalController,
private processes:ProcessesService, private processes:ProcessesService,
private navParams: NavParams, private navParams: NavParams,
private authService: AuthService,
private userAuth: AuthService,
private animationController: AnimationController,
private toastService: ToastService, private toastService: ToastService,
public p: PermissionService, public p: PermissionService,
private despachoService: DespachoService, private despachoService: DespachoService,
private pedidoService: PedidoService, private pedidoService: PedidoService,
public ThemeService: ThemeService public ThemeService: ThemeService
) { ) {
this.loggeduser = userAuth.ValidatedUser; this.loggeduser = SessionStore.user;
this.task = this.navParams.get('task'); this.task = this.navParams.get('task');
if (this.task.SerialNumber) { if (this.task.SerialNumber) {
@@ -19,6 +19,8 @@
<div class="attach-icon d-flex align-center"> <div class="attach-icon d-flex align-center">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' "src="assets/images/icons-attach-doc.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' "src="assets/images/icons-attach-doc.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/theme/gov/icons-attach-doc.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/theme/gov/icons-attach-doc.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " src="assets/images/theme/{{ThemeService.currentTheme}}/icons-attach-doc.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " src="assets/images/theme/{{ThemeService.currentTheme}}/icons-attach-doc.svg"></ion-icon>
</div> </div>
<div class="attach-document pl-10"> <div class="attach-document pl-10">
<ion-label>Anexar Documentos</ion-label> <ion-label>Anexar Documentos</ion-label>
+2
View File
@@ -25,6 +25,7 @@
<div class="add-people" (click)="addParticipants()"> <div class="add-people" (click)="addParticipants()">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="start" src="assets/images/theme/gov/icons-arrow-forward.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="start" src="assets/images/theme/gov/icons-arrow-forward.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " slot="start" src="assets/images/theme/{{ThemeService.currentTheme}}/icons-arrow-forward.svg"></ion-icon>
</div> </div>
</div> </div>
</div> </div>
@@ -46,6 +47,7 @@
<div class="attach-icon"> <div class="attach-icon">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-attach-doc.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-attach-doc.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/theme/gov/icons-attach-doc.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/theme/gov/icons-attach-doc.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " src="assets/images/theme/{{ThemeService.currentTheme}}/icons-attach-doc.svg"></ion-icon>
</div> </div>
<div class="attach-document"> <div class="attach-document">
<ion-label>Anexar Documentos</ion-label> <ion-label>Anexar Documentos</ion-label>
@@ -11,6 +11,7 @@
<div class="div-icon" (click)="openOptions()"> <div class="div-icon" (click)="openOptions()">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="font-25 cursor-pointer" src="assets/images/icons-menu.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="font-25 cursor-pointer" src="assets/images/icons-menu.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="font-25 cursor-pointer" src="assets/images/theme/gov/icons-menu.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="font-25 cursor-pointer" src="assets/images/theme/gov/icons-menu.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " class="font-25 cursor-pointer" src="assets/images/theme/{{ThemeService.currentTheme}}/icons-menu.svg"></ion-icon>
<!-- <ion-icon class="font-25 cursor-pointer" src="assets/images/theme/gov/icons-menu.svg"></ion-icon> --> <!-- <ion-icon class="font-25 cursor-pointer" src="assets/images/theme/gov/icons-menu.svg"></ion-icon> -->
</div> </div>
</div> </div>
@@ -302,6 +302,7 @@
<div class="add-people" > <div class="add-people" >
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="start" src="assets/images/theme/gov/icons-arrow-forward.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="start" src="assets/images/theme/gov/icons-arrow-forward.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " slot="start" src="assets/images/theme/{{ThemeService.currentTheme}}/icons-arrow-forward.svg"></ion-icon>
</div> </div>
</div> </div>
</div> </div>
@@ -324,6 +325,7 @@
<div class="add-people" > <div class="add-people" >
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="start" src="assets/images/theme/gov/icons-arrow-forward.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="start" src="assets/images/theme/gov/icons-arrow-forward.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " slot="start" src="assets/images/theme/{{ThemeService.currentTheme}}/icons-arrow-forward.svg"></ion-icon>
</div> </div>
</div> </div>
</div> </div>
@@ -345,6 +347,8 @@
<div class="attach-icon cursor-pointer"> <div class="attach-icon cursor-pointer">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-attach-doc.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-attach-doc.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/theme/gov/icons-attach-doc.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/theme/gov/icons-attach-doc.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " src="assets/images/theme/{{ThemeService.currentTheme}}/icons-attach-doc.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " src="assets/images/theme/{{ThemeService.currentTheme}}/icons-attach-doc.svg"></ion-icon>
</div> </div>
<div class="attach-document"> <div class="attach-document">
<ion-label>Anexar Documentos</ion-label> <ion-label>Anexar Documentos</ion-label>
@@ -18,6 +18,7 @@ import { EventsService } from 'src/app/services/events.service';
import { EventService } from 'src/app/services/rules/event.service'; import { EventService } from 'src/app/services/rules/event.service';
import { EventPipe } from 'src/app/pipes/event.pipe'; import { EventPipe } from 'src/app/pipes/event.pipe';
import { ThemeService } from 'src/app/services/theme.service' import { ThemeService } from 'src/app/services/theme.service'
import { SessionStore } from 'src/app/store/session.service';
const CUSTOM_DATE_FORMATS: NgxMatDateFormats = { const CUSTOM_DATE_FORMATS: NgxMatDateFormats = {
@@ -105,7 +106,7 @@ export class DocumentSetUpMeetingPage implements OnInit {
public ThemeService: ThemeService, public ThemeService: ThemeService,
public _eventService: EventsService, public _eventService: EventsService,
) { ) {
this.loggeduser = authService.ValidatedUser; this.loggeduser = SessionStore.user;
this.document = this.navParams.get('document') this.document = this.navParams.get('document')
this.subject = this.navParams.get('subject') this.subject = this.navParams.get('subject')
@@ -5,6 +5,7 @@
<div class="cursor-pointer" (click)="close()"> <div class="cursor-pointer" (click)="close()">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="font-35" src="assets/images/icons-arrow-arrow-left.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="font-35" src="assets/images/icons-arrow-arrow-left.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="font-35" src="assets/images/theme/gov/icons-calendar-arrow-left.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="font-35" src="assets/images/theme/gov/icons-calendar-arrow-left.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " class="font-35" src="assets/images/theme/{{ThemeService.currentTheme}}/icons-calendar-arrow-left.svg"></ion-icon>
</div> </div>
<div class="font-25">{{ fileName }}</div> <div class="font-25">{{ fileName }}</div>
+1
View File
@@ -26,6 +26,7 @@
<div class="add-people" > <div class="add-people" >
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="start" src="assets/images/theme/gov/icons-arrow-forward.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="start" src="assets/images/theme/gov/icons-arrow-forward.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " slot="start" src="assets/images/theme/{{ThemeService.currentTheme}}/icons-arrow-forward.svg"></ion-icon>
</div> </div>
</div> </div>
</div> </div>
@@ -5,7 +5,8 @@
<ion-toolbar> <ion-toolbar>
<div class="title-content width-100 d-flex justify-space-between align-center"> <div class="title-content width-100 d-flex justify-space-between align-center">
<div class= "btn-dismiss font-30 cursor-pointer" (click)="close()"> <div class= "btn-dismiss font-30 cursor-pointer" (click)="close()">
<ion-icon style="margin-bottom:-8px" slot="end" src="assets/images/icons-arrow-arrow-left.svg" class="iconsarrowarrow-left"></ion-icon> <ion-icon style="margin-bottom:-8px" *ngIf="ThemeService.currentTheme == 'doneIt' " class="font-35" src="assets/images/theme/doneIt/icons-arrow-arrow-left.svg"></ion-icon>
<ion-icon style="margin-bottom:-8px" slot="end" *ngIf="ThemeService.currentTheme != 'doneIt' " src="assets/images/icons-arrow-arrow-left.svg" class="iconsarrowarrow-left"></ion-icon>
</div> </div>
<div class="middle d-flex align-center flex-grow-1"> <div class="middle d-flex align-center flex-grow-1">
<div><b><ion-label class="digitalizacao_001pd">{{name}} </ion-label></b><br> <div><b><ion-label class="digitalizacao_001pd">{{name}} </ion-label></b><br>
@@ -6,6 +6,7 @@ import { GroupIconsPage } from '../group-icons/group-icons.page';
import { Share } from '@capacitor/share'; import { Share } from '@capacitor/share';
import { Router } from '@angular/router'; import { Router } from '@angular/router';
import { Directory, Filesystem } from '@capacitor/filesystem'; import { Directory, Filesystem } from '@capacitor/filesystem';
import { ThemeService } from 'src/app/services/theme.service'
@Component({ @Component({
selector: 'app-preview-camera', selector: 'app-preview-camera',
@@ -17,7 +18,8 @@ export class PreviewCameraPage implements OnInit {
constructor( private modalController: ModalController, constructor( private modalController: ModalController,
private navParams:NavParams, private navParams:NavParams,
public router: Router, public router: Router,
private publicService: PublicationsService) { } private publicService: PublicationsService,
public ThemeService: ThemeService,) { }
@ViewChild(IonSlides) slides : IonSlides @ViewChild(IonSlides) slides : IonSlides
@@ -1,31 +1,39 @@
<ion-content class=" bg-blue"> <ion-content class=" bg-blue">
<div class="main-content width-100 overflow-y-auto height-100"> <div class="main-content width-100 overflow-y-auto height-100">
<div class="profile-header width-100"> <div class="profile-header width-100">
<div class="div-logo d-md-none width-40"> <div class="div-logo width-40">
<div class="logo-icon"> <div class="logo-icon">
<img *ngIf="ThemeService.currentTheme == 'default' " src='assets/images/logo-no-bg.png' alt='logo'> <img *ngIf="ThemeService.currentTheme == 'default' " src='assets/images/logo-no-bg.png' alt='logo'>
<img *ngIf="ThemeService.currentTheme == 'gov' " src='assets/images/theme/gov/governoangola_A.png' alt='logo'> <img *ngIf="ThemeService.currentTheme == 'gov' " src='assets/images/theme/gov/governoangola_A.png' alt='logo'>
<img *ngIf="ThemeService.currentTheme == 'tribunal' " src='assets/images/theme/tribunal/tribunal-constitucional.png' alt='logo'> <img *ngIf="ThemeService.currentTheme == 'doneIt' " src='assets/images/theme/{{ThemeService.currentTheme}}/governoangola_A1.png' alt='logo'>
</div> </div>
<div *ngIf="ThemeService.currentTheme == 'gov'" class="logo-description d-flex align-center justify-content-center"> <div *ngIf="ThemeService.currentTheme == 'gov'" class="logo-description d-flex align-center justify-content-center">
<div class="logo-description-content"> <div class="logo-description-content">
<p class="logo-description-text">Presidente da República</p> <!-- <p class="logo-description-text">Calendário Partilhado</p> -->
<div class="add-line"></div>
<p class="logo-description-text tp-5">GABINETE DIGITAL</p> <p class="logo-description-text tp-5">GABINETE DIGITAL</p>
<div class="add-line"></div>
</div> </div>
</div> </div>
<div *ngIf="ThemeService.currentTheme == 'default'" class="logo-description d-flex align-center justify-content-center"> <div *ngIf="ThemeService.currentTheme == 'default'" class="logo-description d-flex align-center justify-content-center">
<div class="logo-description-content"> <div class="logo-description-content">
<p class="logo-description-text color-white">Presidente da República</p> <!-- <p class="logo-description-text color-white">Calendário Partilhado</p> -->
<div class="add-line-white"></div>
<p class="logo-description-text tp-5 color-white">GABINETE DIGITAL</p> <p class="logo-description-text tp-5 color-white">GABINETE DIGITAL</p>
<div class="add-line-white"></div>
</div>
</div>
<div *ngIf="ThemeService.currentTheme == 'doneIt'" class="logo-description d-flex align-center justify-content-center">
<div class="logo-description-content">
<!-- <p class="logo-description-text color-white">Calendário Partilhado</p> -->
<p class="logo-description-text tp-5 color-white" style="color: transparent;">DoneIt</p>
<div class="add-line-white"></div>
</div> </div>
</div> </div>
</div> </div>
<div class="btn-close d-flex cursor-pointer" (click)="close()"> <div class="btn-close d-flex cursor-pointer" (click)="close()">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="icon" src="assets/images/icons-search-close.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="icon" src="assets/images/icons-search-close.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="icon" src="assets/images/theme/gov/icons-search-close.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="icon" src="assets/images/theme/gov/icons-search-close.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'tribunal' " class="icon" src="assets/images/icons-search-close.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " class="icon" src="assets/images/theme/{{ThemeService.currentTheme}}/icons-search-close.svg"></ion-icon>
</div> </div>
</div> </div>
<div class="profile-content overflow-y-auto width-100 height-100"> <div class="profile-content overflow-y-auto width-100 height-100">
@@ -43,12 +51,12 @@
<div class="d-flex align-center"> <div class="d-flex align-center">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="profile-pic" src="assets/images/icons-default-profile.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="profile-pic" src="assets/images/icons-default-profile.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="profile-pic" src="assets/images/theme/gov/icons-profile.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="profile-pic" src="assets/images/theme/gov/icons-profile.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'tribunal' " class="profile-pic" src="assets/images/theme/gov/icons-profile.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " class="profile-pic" src="assets/images/theme/{{ThemeService.currentTheme}}/icons-profile.svg"></ion-icon>
</div> </div>
</div> </div>
<div class="profile-info"> <div class="profile-info">
<div class="user-role">{{SessionStore.user.RoleDescription}}</div> <div class="user-role" *ngIf="SessionStore.user.RoleDescription">{{SessionStore.user.RoleDescription}}</div>
<div class="container-div width-100"> <div class="container-div width-100">
<div class="ion-item-class-2"> <div class="ion-item-class-2">
@@ -84,14 +92,16 @@
<img style="width: 40px;" src="assets/images/theme/gov/governoangola_A.png"> <img style="width: 40px;" src="assets/images/theme/gov/governoangola_A.png">
</div> </div>
<div class="btn-close d-flex cursor-pointer pr-10" (click)="changeTheme('default')" > <div class="btn-close d-flex cursor-pointer pr-10 pl-10" (click)="changeTheme('default')" >
<img style="width: 40px;" src="assets/images/logo-removebg-preview.png"/> <img style="width: 40px;" src="assets/images/logo-removebg-preview.png"/>
</div> </div>
<!-- <div hidden class="btn-close d-flex cursor-pointer pr-10" (click)="changeTheme('tribunal')" > <!-- <div class="btn-close d-flex cursor-pointer pr-10" (click)="changeTheme('doneIt')" >
<img style="width: 40px;" src="assets/images/theme/tribunal/tribunal-constitucional-logo.png"/> <img *ngIf="ThemeService.currentTheme == 'gov'" style="width: 40px;" src="assets/images/theme/doneIt/governoangola_A.png"/>
<img *ngIf="ThemeService.currentTheme != 'gov'" style="width: 40px;" src="assets/images/theme/doneIt/governoangola_A1.png"/>
</div> --> </div> -->
</div> </div>
</div> </div>
@@ -20,7 +20,7 @@ export class EditProfilePage implements OnInit {
constructor(private modalController:ModalController, constructor(private modalController:ModalController,
private animationController: AnimationController, private animationController: AnimationController,
public platform: Platform, public platform: Platform,
private backgroundservice: BackgroundService, private BackgroundService: BackgroundService,
public ThemeService: ThemeService public ThemeService: ThemeService
) {} ) {}
@@ -118,6 +118,7 @@ export class EditProfilePage implements OnInit {
changeTheme(name) { changeTheme(name) {
this.ThemeService.setTheme(name) this.ThemeService.setTheme(name)
this.BackgroundService.paint();
} }
} }
+12 -12
View File
@@ -1,37 +1,41 @@
<ion-header class=" bg-blue ion-no-border"> <ion-header class=" bg-blue ion-no-border">
<div class="profile-header width-100"> <div class="profile-header width-100">
<div class="div-logo d-md-none width-40"> <div class="div-logo d-md-none width-40">
<div class="logo-icon"> <div class="logo-icon" *ngIf="hideImage">
<img *ngIf="ThemeService.currentTheme == 'default' " src='assets/images/logo-no-bg.png' alt='logo'> <img *ngIf="ThemeService.currentTheme == 'default' " src='assets/images/logo-no-bg.png' alt='logo'>
<img *ngIf="ThemeService.currentTheme == 'gov' " src='assets/images/theme/gov/governoangola_A.png' alt='logo'> <img *ngIf="ThemeService.currentTheme == 'gov' " src='assets/images/theme/gov/governoangola_A.png' alt='logo'>
<img *ngIf="ThemeService.currentTheme == 'tribunal' " src='assets/images/theme/tribunal/tribunal-constitucional.png' alt='logo'> <img *ngIf="ThemeService.currentTheme == 'doneIt' " src='assets/images/theme/{{ThemeService.currentTheme}}/governoangola_A.png' alt='logo'>
</div> </div>
<div *ngIf="ThemeService.currentTheme == 'gov'" class="logo-description d-flex align-center justify-content-center"> <div *ngIf="ThemeService.currentTheme == 'gov'" class="logo-description d-flex align-center justify-content-center">
<div class="logo-description-content"> <div class="logo-description-content">
<p class="logo-description-text">Presidente da República</p> <!-- <p class="logo-description-text">Calendário Partilhado</p> -->
<div class="add-line"></div>
<p class="logo-description-text tp-5">GABINETE DIGITAL</p> <p class="logo-description-text tp-5">GABINETE DIGITAL</p>
<div class="add-line"></div>
</div> </div>
</div> </div>
<div *ngIf="ThemeService.currentTheme == 'default'" class="logo-description d-flex align-center justify-content-center"> <div *ngIf="ThemeService.currentTheme == 'default'" class="logo-description d-flex align-center justify-content-center">
<div class="logo-description-content"> <div class="logo-description-content">
<p class="logo-description-text color-white">Presidente da República</p> <!-- <p class="logo-description-text color-white">Calendário Partilhado</p> -->
<div class="add-line-white"></div>
<p class="logo-description-text tp-5 color-white">GABINETE DIGITAL</p> <p class="logo-description-text tp-5 color-white">GABINETE DIGITAL</p>
<div class="add-line-white"></div>
</div> </div>
</div> </div>
</div> </div>
<div class="btn-close d-flex cursor-pointer" (click)="close()"> <div class="btn-close d-flex cursor-pointer" *ngIf="hideImage" (click)="close()">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' "class="icon" src="assets/images/icons-search-close.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' "class="icon" src="assets/images/icons-search-close.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="icon" src="assets/images/theme/gov/icons-search-close.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="icon" src="assets/images/theme/gov/icons-search-close.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " class="icon" src="assets/images/theme/{{ThemeService.currentTheme}}/icons-search-close.svg"></ion-icon>
</div> </div>
</div> </div>
</ion-header> </ion-header>
<ion-header class=" bg-blue ion-no-border"> <ion-header class=" bg-blue ion-no-border">
<div class="profile-content"> <div class="profile-content">
<div class="profile-name d-flex justify-content-center width-100">
<ion-label >{{loggeduser.FullName}}</ion-label>
</div>
<div class="profile-title d-flex justify-content-center width-100"> <div class="profile-title d-flex justify-content-center width-100">
<ion-label >{{loggeduser.RoleDescription}}</ion-label> <ion-label *ngIf="loggeduser.RoleDescription" >{{loggeduser.RoleDescription}}</ion-label>
</div> </div>
<div class="d-flex mt-10 width-100"> <div class="d-flex mt-10 width-100">
@@ -76,10 +80,6 @@
<h3 id="profile-title">{{item.title}}</h3> <h3 id="profile-title">{{item.title}}</h3>
<p id="profile-title" *ngIf = "item.Service != 'agenda'">{{item.body}}</p> <p id="profile-title" *ngIf = "item.Service != 'agenda'">{{item.body}}</p>
</div> </div>
<!-- <div class="notification-label-MD-official" *ngIf = "item.Service == 'agenda' && item.TypeAgenda == 'official' && item.Role == '100000011'" ></div>
<div class="notification-label-MD-pessoal" *ngIf = "item.Service == 'agenda' && item.TypeAgenda == 'pessoal' && item.Role == '100000011'" ></div>
<div class="notification-label-PR-official" *ngIf = "item.Service == 'agenda' && item.TypeAgenda == 'official' && item.Role == '100000014'" ></div>
<div class="notification-label-PR-pessoal" *ngIf = "item.Service == 'agenda' && item.TypeAgenda == 'pessoal' && item.Role == '100000014'" ></div> -->
</div> </div>
</div> </div>
</ion-list> </ion-list>
+7
View File
@@ -82,6 +82,13 @@
font-size: 40px; font-size: 40px;
} }
.profile-name {
font-weight: 300;
font-size: 20px !important;
margin-bottom: 17px !important;
color: var(--profile-text-color) !important;
}
.profile-title { .profile-title {
font-weight: 300; font-weight: 300;
font-size: 20px !important; font-size: 20px !important;
+22 -27
View File
@@ -1,16 +1,14 @@
import { Component, OnInit, NgZone } from '@angular/core'; import { Component, OnInit, NgZone } from '@angular/core';
import { Router, NavigationExtras } from '@angular/router'; import { Router } from '@angular/router';
import { AnimationController, ModalController, Platform } from '@ionic/angular'; import { AnimationController, ModalController, Platform } from '@ionic/angular';
import { LoginUserRespose } from 'src/app/models/user.model'; import { LoginUserRespose } from 'src/app/models/user.model';
import { AuthService } from 'src/app/services/auth.service'; import { AuthService } from 'src/app/services/auth.service';
import { LocalstoreService } from 'src/app/store/localstore.service';
import { EditProfilePage } from './edit-profile/edit-profile.page'; import { EditProfilePage } from './edit-profile/edit-profile.page';
import { StorageService } from '../../services/storage.service'; import { StorageService } from '../../services/storage.service';
import { NotificationsService } from '../../services/notifications.service'; import { NotificationsService } from '../../services/notifications.service';
import { SessionStore } from 'src/app/store/session.service'; import { SessionStore } from 'src/app/store/session.service';
import { EventTrigger } from '../../services/eventTrigger.service'; import { EventTrigger } from '../../services/eventTrigger.service';
import { ThemeService } from 'src/app/services/theme.service' import { ThemeService } from 'src/app/services/theme.service'
import { SortService } from 'src/app/services/functions/sort.service';
@Component({ @Component({
selector: 'app-profile', selector: 'app-profile',
@@ -31,23 +29,29 @@ export class ProfilePage implements OnInit {
md: "100000011"; md: "100000011";
date: "60:20"; date: "60:20";
location: "Gabinete"; location: "Gabinete";
isProfileOpen = false
hideImage = false
constructor(private modalController: ModalController, constructor(private modalController: ModalController,
private authService: AuthService, private authService: AuthService,
private animationController: AnimationController, private animationController: AnimationController,
private router: Router, private router: Router,
private localstoreService: LocalstoreService,
private storageservice: StorageService, private storageservice: StorageService,
private zone: NgZone, private zone: NgZone,
private notificationservice: NotificationsService, private notificationservice: NotificationsService,
private platform: Platform, private platform: Platform,
private eventtrigger: EventTrigger, private eventtrigger: EventTrigger,
public ThemeService: ThemeService, public ThemeService: ThemeService,
private sortService: SortService,
) { ) {
this.loggeduser = authService.ValidatedUser; this.loggeduser = SessionStore.user;
router.events.subscribe((val) => {
this.isProfileOpen = false
});
setTimeout(()=>{
this.hideImage = true
}, 2000)
} }
ngOnInit() { ngOnInit() {
@@ -58,15 +62,6 @@ export class ProfilePage implements OnInit {
this.getNotificationData(); this.getNotificationData();
} }
/* this.notificationsService.registerCallback(
'any',
() => {
setTimeout(()=>{
this.getNotificationData();
}, 100)
}
) */
} }
@@ -204,14 +199,7 @@ export class ProfilePage implements OnInit {
} }
logout() { logout() {
this.authService.logout() this.authService.logout();
/* SessionStore.setInativity(false)
SessionStore.setUrlBeforeInactivity(this.router.url)
setTimeout(() => {
this.router.navigateByUrl('/', { replaceUrl: true });
}, 100) */
} }
async editProfile() { async editProfile() {
@@ -240,15 +228,22 @@ export class ProfilePage implements OnInit {
} }
if(this.isProfileOpen == false) {
this.isProfileOpen = true;
const modal = await this.modalController.create({ const modal = await this.modalController.create({
enterAnimation,
leaveAnimation,
component: EditProfilePage, component: EditProfilePage,
cssClass: 'model profile-modal', cssClass: 'model profile-modal search-submodal',
componentProps: { componentProps: {
} }
}); });
return await modal.present(); await modal.present();
modal.onDidDismiss().then(() => {
this.isProfileOpen = false;
})
}
} }
} }
@@ -3,7 +3,9 @@
<div class="main-header"> <div class="main-header">
<div class="title-content width-100"> <div class="title-content width-100">
<div class="back-icon"> <div class="back-icon">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="end" src='assets/images/Theme/doneIt/icons-arrow-arrow-left.svg'></ion-icon>
<button class="btn-no-color cursor-pointer" (click)="close()"> <button class="btn-no-color cursor-pointer" (click)="close()">
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " slot="end" src='assets/images/theme/{{ThemeService.currentTheme}}/icons-arrow-arrow-left.svg'></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src='assets/images/theme/gov/icons-calendar-arrow-left.svg'></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src='assets/images/theme/gov/icons-calendar-arrow-left.svg'></ion-icon>
</button> </button>
@@ -1,9 +1,7 @@
import { HttpClient } from '@angular/common/http';
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { ModalController, NavParams } from '@ionic/angular'; import { ModalController, NavParams } from '@ionic/angular';
import { AuthService } from 'src/app/services/auth.service'; import { ChatSystemService } from 'src/app/services/chat/chat-system.service';
import { ChatService } from 'src/app/services/chat.service';
import { WsChatMethodsService } from 'src/app/services/chat/ws-chat-methods.service';
import { ThemeService } from 'src/app/services/theme.service' import { ThemeService } from 'src/app/services/theme.service'
import { ToastService } from 'src/app/services/toast.service'; import { ToastService } from 'src/app/services/toast.service';
@@ -20,20 +18,17 @@ export class SetRoomOwnerPage implements OnInit {
constructor( constructor(
private modalController: ModalController, private modalController: ModalController,
private http: HttpClient,
private chatService: ChatService,
private authService: AuthService,
private navParams: NavParams, private navParams: NavParams,
public ThemeService: ThemeService, public ThemeService: ThemeService,
private toastService: ToastService, private toastService: ToastService,
public wsChatMethodsService: WsChatMethodsService, public ChatSystemService: ChatSystemService,
) { ) {
this.roomId = this.navParams.get('roomId'); this.roomId = this.navParams.get('roomId');
this.members = this.navParams.get('members'); this.members = this.navParams.get('members');
} }
ngOnInit() { ngOnInit() {
this.chatService.refreshtoken(); // this.chatService.refreshtoken();
} }
async close(){ async close(){
@@ -60,7 +55,7 @@ export class SetRoomOwnerPage implements OnInit {
async setRoomOwner(user:any){ async setRoomOwner(user:any){
let res:any = await this.wsChatMethodsService.addRoomOwner(this.roomId, user._id); let res:any = await this.ChatSystemService.addRoomOwner(this.roomId, user._id);
if(res.error){ if(res.error){
@@ -15,7 +15,9 @@
<div class="left"> <div class="left">
<button class="btn-no-color d-flex align-center" (click)="goBack()"> <button class="btn-no-color d-flex align-center" (click)="goBack()">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="end" src='assets/images/theme/zoneIt/icons-arrow-arrow-left.svg'></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src='assets/images/theme/gov/icons-calendar-arrow-left.svg'></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src='assets/images/theme/gov/icons-calendar-arrow-left.svg'></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " slot="end" src='assets/images/theme/{{ThemeService.currentTheme}}/icons-calendar-arrow-left.svg'></ion-icon>
</button> </button>
</div> </div>
<div class="middle"> <div class="middle">
@@ -25,6 +27,7 @@
<button class="btn-no-color" (click)="editEvent()"> <button class="btn-no-color" (click)="editEvent()">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="edit" slot="end" src="assets/images/icons-edit.svg" ></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="edit" slot="end" src="assets/images/icons-edit.svg" ></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="edit" slot="end" src="assets/images/theme/gov/icons-edit.svg" ></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="edit" slot="end" src="assets/images/theme/gov/icons-edit.svg" ></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " class="edit" slot="end" src="assets/images/theme/{{ThemeService.currentTheme}}/icons-edit.svg" ></ion-icon>
</button> </button>
<button class="btn-no-color" (click)="deleteEvent()"> <button class="btn-no-color" (click)="deleteEvent()">
<ion-icon class="delete" name="trash-sharp"></ion-icon> <ion-icon class="delete" name="trash-sharp"></ion-icon>
@@ -40,7 +43,7 @@
<span class="date">{{loadedEvent.Location}}</span> <span class="date">{{loadedEvent.Location}}</span>
<div *ngIf="loadedEvent.Organizer"> <div *ngIf="loadedEvent.Organizer">
<div *ngIf="loadedEvent.Organizer.Name == 'Agenda do Presidente da República' "> <div *ngIf="loadedEvent.Organizer.Name == 'Agenda do Calendário Partilhado' ">
<span class="label" *ngIf="loadedEvent.CalendarName == 'Oficial' " style="background-color: #99e47b;">{{loadedEvent.CalendarName}}</span> <span class="label" *ngIf="loadedEvent.CalendarName == 'Oficial' " style="background-color: #99e47b;">{{loadedEvent.CalendarName}}</span>
<span class="label" *ngIf="loadedEvent.CalendarName == 'Pessoal' " style="background-color: #958bfc;">{{loadedEvent.CalendarName}}</span> <span class="label" *ngIf="loadedEvent.CalendarName == 'Pessoal' " style="background-color: #958bfc;">{{loadedEvent.CalendarName}}</span>
</div> </div>
@@ -106,6 +109,7 @@
<div (click)="docIndex(i);LoadDocumentDetails()" class="cursor-pointer" style="width: 35px; height: 41px;" autoHide="false"> <div (click)="docIndex(i);LoadDocumentDetails()" class="cursor-pointer" style="width: 35px; height: 41px;" autoHide="false">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-menu.svg" ></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-menu.svg" ></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/theme/gov/icons-menu.svg" ></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/theme/gov/icons-menu.svg" ></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " src="assets/images/theme/{{ThemeService.currentTheme}}/icons-menu.svg" ></ion-icon>
</div> </div>
</ion-label> </ion-label>
@@ -120,7 +120,7 @@ ion-menu{
.button-mdgpr-Oficial{ .button-mdgpr-Oficial{
width: 91px; width: 91px;
--border-radius: 20px; --border-radius: 20px;
--background: #ffb703; --background: var(--label-bg-color);
margin-left: 5px; margin-left: 5px;
float: left; float: left;
} }
@@ -294,7 +294,7 @@ ion-menu{
.label{ .label{
border-radius: 20px; border-radius: 20px;
background: #ffb703; background: var(--label-bg-color);
float: right; float: right;
padding: 5px 13.5px 5px 13.5px; padding: 5px 13.5px 5px 13.5px;
color: #fff; color: #fff;
+1 -1
View File
@@ -37,7 +37,7 @@ export class ViewMediaPage implements OnInit {
} }
ngOnInit() { ngOnInit() {
// console.log(this.image)
this.base64Sanitize = this.sanitizer.bypassSecurityTrustResourceUrl(this.image); this.base64Sanitize = this.sanitizer.bypassSecurityTrustResourceUrl(this.image);
if (this.platform.is('desktop')) { if (this.platform.is('desktop')) {
+1
View File
@@ -29,6 +29,7 @@ export interface CustomCalendarEvent {
end: Date end: Date
id: string id: string
event: EventList event: EventList
profile?: any
} }
+1
View File
@@ -72,6 +72,7 @@ export interface Message {
msg: string; msg: string;
ts: Ts; ts: Ts;
u: U; u: U;
from: 'Offline'|'History'|'stream'| 'send'
t: string; t: string;
_updatedAt: ''; _updatedAt: '';
mentions: any[]; mentions: any[];
+1 -1
View File
@@ -76,7 +76,7 @@ export class UserSession {
UserName: string UserName: string
Password: string Password: string
RochetChatUserId: string RochetChatUserId: string
Profile: 'PR' | 'MDGPR' | 'Consultant' | 'Department boss' | 'Assistant' | 'Director' | 'Deputy Director' | 'Secretariat' | 'Deputy Director' | 'General secretary' | 'Administrador'; Profile: 'PR' | 'MDGPR' | 'Consultant' | 'Unknown' ;
LoginPreference: 'None' | 'Password' | 'Pin' | null; LoginPreference: 'None' | 'Password' | 'Pin' | null;
PIN: string PIN: string
Inactivity: boolean Inactivity: boolean
+19 -22
View File
@@ -21,7 +21,7 @@
<div> <div>
<!-- Calendar is here --> <!-- Calendar is here -->
<div class="calendar-segment-{{profile}}" [class.calendar-segment-pr-force]="loggeduser.Profile =='PR'"> <div class="calendar-segment-{{profile}}" [class.calendar-segment-pr-force]="SessionStore.user.Profile =='PR'">
<div class="calendar-container" [style.height]="calendarHeight "> <div class="calendar-container" [style.height]="calendarHeight ">
<ion-row class="ion-justify-content-between calendar-tool-tip"> <ion-row class="ion-justify-content-between calendar-tool-tip">
@@ -32,7 +32,7 @@
<button (click)="back()" class="btn-no-color resize" > <button (click)="back()" class="btn-no-color resize" >
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="icon-only" src="assets/images/icons-calendar-arrow-left.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="icon-only" src="assets/images/icons-calendar-arrow-left.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="icon-only" src="assets/images/theme/gov/icons-calendar-arrow-left.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="icon-only" src="assets/images/theme/gov/icons-calendar-arrow-left.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'tribunal' " slot="icon-only" src="assets/images/theme/gov/icons-calendar-arrow-left.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " slot="icon-only" src="assets/images/theme/{{ThemeService.currentTheme}}/icons-calendar-arrow-left.svg"></ion-icon>
</button> </button>
</div> </div>
@@ -44,7 +44,7 @@
<div (click)="dropdownScrollWeal = true; onDropDownScrollWeal()" class="cursor-pointer"> <div (click)="dropdownScrollWeal = true; onDropDownScrollWeal()" class="cursor-pointer">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " style="font-size: 19pt;" src="assets/images/icons-arrow-arrow-down.svg" ></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " style="font-size: 19pt;" src="assets/images/icons-arrow-arrow-down.svg" ></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " style="font-size: 19pt;" src="assets/images/theme/gov/icons-arrow-arrow-down.svg" ></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " style="font-size: 19pt;" src="assets/images/theme/gov/icons-arrow-arrow-down.svg" ></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'tribunal' " style="font-size: 19pt;" src="assets/images/theme/gov/icons-arrow-arrow-down.svg" ></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " slot="icon-only" src="assets/images/theme/{{ThemeService.currentTheme}}/icons-arrow-arrow-down.svg"></ion-icon>
</div> </div>
</h2> </h2>
@@ -97,14 +97,13 @@
<div (click)="next()" class="arrow cursor-pointer resize"> <div (click)="next()" class="arrow cursor-pointer resize">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="icon-only" src="assets/images/icons-calendar-arrow-right.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="icon-only" src="assets/images/icons-calendar-arrow-right.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="icon-only" src="assets/images/theme/gov/icons-calendar-arrow-right.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="icon-only" src="assets/images/theme/gov/icons-calendar-arrow-right.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'tribunal' " slot="icon-only" src="assets/images/theme/gov/icons-calendar-arrow-right.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " slot="icon-only" src="assets/images/theme/{{ThemeService.currentTheme}}/icons-calendar-arrow-right.svg"></ion-icon>
</div> </div>
</ion-row> </ion-row>
<ion-row class="ion-align-items-center"> <ion-row class="ion-align-items-center">
<!-- <div *ngIf="loggeduser.Profile != 'PR' && loggeduser.Profile != 'MDGPR'" class="calendar-letters"> --> <div class="calendar-letters cal-reverse" *ngIf="SessionStore.user.Profile != 'PR' && SessionStore.user.Profile != 'MDGPR' && eventService.calendarIds.length >= 2" class="calendar-letters" [class.cal-reverse]="profile == 'mdgpr' " (click)="changeProfile()">
<div class="calendar-letters cal-reverse" *ngIf="loggeduser.Profile != 'PR' && loggeduser.Profile != 'MDGPR' && eventService.calendarIds.length >= 2" class="calendar-letters" [class.cal-reverse]="loggeduser.Profile != 'PR' && loggeduser.Profile != 'MDGPR' && profile == 'mdgpr' " (click)="changeProfile()">
<div class="text" *ngIf="profile == 'mdgpr'"> <div class="text" *ngIf="profile == 'mdgpr'">
MC MC
</div> </div>
@@ -115,11 +114,11 @@
</div> </div>
<button *ngIf="profile == 'mdgpr' && ( loggeduser.Profile == 'PR' || loggeduser.Profile == 'MDGPR') " (click)="changeProfile()" class="d-md-none btn-no-color resize"> <button *ngIf="profile == 'mdgpr' && ( SessionStore.user.Profile == 'PR' || SessionStore.user.Profile == 'MDGPR') " (click)="changeProfile()" class="d-md-none btn-no-color resize">
<ion-icon class="right-icons" src="assets/images/icons-profile-calendar-md.svg"></ion-icon> <ion-icon class="right-icons" src="assets/images/icons-profile-calendar-md.svg"></ion-icon>
</button> </button>
<button title="Mudar de Agenda" *ngIf="profile == 'pr'&& ( loggeduser.Profile == 'PR' || loggeduser.Profile == 'MDGPR')" (click)="changeProfile()" class="btn-no-color resize"> <button title="Mudar de Agenda" *ngIf="profile == 'pr'&& ( SessionStore.user.Profile == 'PR' || SessionStore.user.Profile == 'MDGPR')" (click)="changeProfile()" class="btn-no-color resize">
<ion-icon class="right-icons d-md-none" src="assets/images/icons-profile-calendar-pr.svg"></ion-icon> <ion-icon class="right-icons d-md-none" src="assets/images/icons-profile-calendar-pr.svg"></ion-icon>
</button> </button>
@@ -127,14 +126,14 @@
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="right-icons" src="assets/images/icons-received-event.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="right-icons" src="assets/images/icons-received-event.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && !mobileComponent.showEventList" class="right-icons" src="assets/images/theme/gov/icons-received-event.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' && !mobileComponent.showEventList" class="right-icons" src="assets/images/theme/gov/icons-received-event.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && mobileComponent.showEventList" class="right-icons" src="assets/images/theme/gov/icons-received-event-selected.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' && mobileComponent.showEventList" class="right-icons" src="assets/images/theme/gov/icons-received-event-selected.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'tribunal' " class="right-icons" src="assets/images/theme/tribunal/icons-received-event.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " class="right-icons" src="assets/images/theme/{{ThemeService.currentTheme}}/icons-received-event.svg"></ion-icon>
</button> </button>
<button title="Novo Evento" class="btn-no-color cy-add-event cursor-pointer resize" (click)="clearContact();openAddEvent();"> <button title="Novo Evento" class="btn-no-color cy-add-event cursor-pointer resize" (click)="clearContact();openAddEvent();">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="right-icons" src="assets/images/icons-add.svg" ></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="right-icons" src="assets/images/icons-add.svg" ></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && !mobileComponent.showAddNewEvent" class="right-icons" src="assets/images/theme/gov/icons-add.svg" ></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' && !mobileComponent.showAddNewEvent" class="right-icons" src="assets/images/theme/gov/icons-add.svg" ></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && mobileComponent.showAddNewEvent" class="right-icons" src="assets/images/theme/gov/icons-add-selected.svg" ></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' && mobileComponent.showAddNewEvent" class="right-icons" src="assets/images/theme/gov/icons-add-selected.svg" ></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'tribunal' " class="right-icons" src="assets/images/theme/tribunal/icons-add.svg" ></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " class="right-icons" slot="icon-only" src="assets/images/theme/{{ThemeService.currentTheme}}/icons-add.svg"></ion-icon>
</button> </button>
</ion-row> </ion-row>
@@ -196,12 +195,12 @@
<button class="btn-no-color" *ngIf="showCalendar" (click)="calendarHeight='75px';showCalendar=false"> <button class="btn-no-color" *ngIf="showCalendar" (click)="calendarHeight='75px';showCalendar=false">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="collaps btn-no-color" src="assets/images/icons-collaps-up.svg" ></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="collaps btn-no-color" src="assets/images/icons-collaps-up.svg" ></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="collaps btn-no-color" src="assets/images/theme/gov/icons-collaps-up.svg" ></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="collaps btn-no-color" src="assets/images/theme/gov/icons-collaps-up.svg" ></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'tribunal' " class="collaps btn-no-color" src="assets/images/theme/tribunal/icons-collaps-up.svg" ></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " class="collaps btn-no-color" src="assets/images/theme/{{ThemeService.currentTheme}}/icons-collaps-up.svg"></ion-icon>
</button> </button>
<button class="btn-no-color" *ngIf="!showCalendar" (click)="calendarHeight='356px';showCalendar=true"> <button class="btn-no-color" *ngIf="!showCalendar" (click)="calendarHeight='356px';showCalendar=true">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="collaps btn-no-color" src="assets/images/icons-collaps-down.svg" ></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="collaps btn-no-color" src="assets/images/icons-collaps-down.svg" ></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="collaps btn-no-color" src="assets/images/theme/gov/icons-collaps-down.svg" ></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="collaps btn-no-color" src="assets/images/theme/gov/icons-collaps-down.svg" ></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'tribunal' " class="collaps btn-no-color" src="assets/images/theme/tribunal/icons-collaps-down.svg" ></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " class="collaps btn-no-color" src="assets/images/theme/{{ThemeService.currentTheme}}/icons-collaps-down.svg" ></ion-icon>
</button > </button >
</ion-row> </ion-row>
@@ -214,7 +213,7 @@
<button class="arrow-down btn-no-color" (click)="showTimelineFilterState=!showTimelineFilterState"> <button class="arrow-down btn-no-color" (click)="showTimelineFilterState=!showTimelineFilterState">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " style="font-size: 19pt;" src="assets/images/icons-arrow-arrow-down.svg" ></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " style="font-size: 19pt;" src="assets/images/icons-arrow-arrow-down.svg" ></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " style="font-size: 19pt;" src="assets/images/theme/gov/icons-arrow-arrow-down.svg" ></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " style="font-size: 19pt;" src="assets/images/theme/gov/icons-arrow-arrow-down.svg" ></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'tribunal' " style="font-size: 19pt;" src="assets/images/theme/gov/icons-arrow-arrow-down.svg" ></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " style="font-size: 19pt;" src="assets/images/theme/{{ThemeService.currentTheme}}/icons-arrow-arrow-down.svg" ></ion-icon>
</button> </button>
<!-- List --> <!-- List -->
@@ -227,13 +226,13 @@
</ion-row> </ion-row>
</ion-row> </ion-row>
<div class="calendar-title-container px-20 d-none d-md-flex" *ngIf="loggeduser.Profile == 'MDGPR'"> <div class="calendar-title-container px-20 d-none d-md-flex">
<div class="calendar-title-description flex-grow-1 text-grey d-flex justify-center align-center"> <div class="calendar-title-description flex-grow-1 text-grey d-flex justify-center align-center" *ngIf="eventService.hasOwnCalendar">
<div *ngIf="loggeduser.Profile == 'PR' || loggeduser.Profile == 'MDGPR'">Calendário do MDGPR</div> <div >Meu Calendário</div>
</div> </div>
<div class="calendar-title-description text-black align-center"> <div class="calendar-title-description text-black align-center" *ngIf="eventService.hasSharedCalendar">
<div class="flex-grow-1 text-grey d-flex justify-center align-center"> <div class="flex-grow-1 text-grey d-flex justify-center align-center">
<div *ngIf="loggeduser.Profile == 'PR' || loggeduser.Profile == 'MDGPR'">Calendário do Presidente da República</div> <div >Calendário Partilhado</div>
</div> </div>
</div> </div>
</div> </div>
@@ -243,13 +242,11 @@
</div> </div>
<div class="timeline-wrapper flex-grow-1 height-100" > <div class="timeline-wrapper flex-grow-1 height-100" >
<!-- Timeline -->
<div class="height-100"> <div class="height-100">
<div class="timeline-container height-100 d-flex pt-20 pl-20 pl-20 filter-{{segment}}" > <div class="timeline-container height-100 d-flex pt-20 pl-20 pl-20 filter-{{segment}}" >
<div class="ss-timeline timeline-mobile flex-grow-1 d-md-none text-black height-100 width-100 overflow-y-auto" > <div class="ss-timeline timeline-mobile flex-grow-1 d-md-none text-black height-100 width-100 overflow-y-auto" >
<div *ngFor="let events of TimelineMDList | keyvalue;" > <div *ngFor="let events of TimelineMDList | keyvalue;" >
<div class="EventListBox-container" > <div class="EventListBox-container" >
@@ -293,7 +290,7 @@
</div> </div>
</div> </div>
<div class="fs-timeline flex-grow-1 d-none d-md-block d-md-block text-black pr-20 width-100 height-100 overflow-y-auto" *ngIf="loggeduser.OwnerCalendars.length && loggeduser.Profile != 'PR' "> <div class="fs-timeline flex-grow-1 d-none d-md-block d-md-block text-black pr-20 width-100 height-100 overflow-y-auto" *ngIf="SessionStore.user.OwnerCalendars.length && SessionStore.user.Profile != 'PR' ">
<div *ngFor="let events of TimelineMDList | keyvalue;" > <div *ngFor="let events of TimelineMDList | keyvalue;" >
<div class="EventListBox-container" > <div class="EventListBox-container" >
@@ -334,7 +331,7 @@
</div> </div>
</div> </div>
<div class="sd-timeline flex-grow-1 d-none d-md-block timeline-md text-black pl-20 pr-20 width-100 height-100 overflow-y-auto" *ngIf="loggeduser.SharedCalendars.length != 0 || loggeduser.Profile == 'PR' " > <div class="sd-timeline flex-grow-1 d-none d-md-block timeline-md text-black pl-20 pr-20 width-100 height-100 overflow-y-auto" *ngIf="SessionStore.user.SharedCalendars.length != 0 || SessionStore.user.Profile == 'PR' " >
<div *ngFor="let events of TimelinePRList | keyvalue;"> <div *ngFor="let events of TimelinePRList | keyvalue;">
<div class="EventListBox-container" > <div class="EventListBox-container" >
+28
View File
@@ -582,6 +582,34 @@ td.monthview-primary-with-event {
} }
.myCalendar {
.content--Oficial {
border-radius: 5px;
border-right: 5px solid #ffb703;
overflow: auto;
}
.content--Pessoal {
border-radius: 5px;
border-right: 5px solid #f05d5e;
overflow: auto;
}
}
.sharedCalendar {
.content-Oficial{
width: 85%;
float: left;
border-left: 4px solid #cab0dc;
padding: 0 0 0 12px;
}
.content-Pessoal{
width: 85%;
float: left;
border-left: 4px solid #cbeecb;
padding: 0 0 0 12px;
}
}
.calendar-border{ .calendar-border{
background: #ebebeb; background: #ebebeb;
margin: 13px 20px; margin: 13px 20px;
+19 -40
View File
@@ -1,11 +1,11 @@
import { Component, OnInit, ViewChild, Inject, LOCALE_ID } from '@angular/core'; import { Component, OnInit, ViewChild, Inject, LOCALE_ID } from '@angular/core';
import { CalendarComponent } from 'ionic2-calendar'; import { CalendarComponent } from 'ionic2-calendar';
import { AlertController, ModalController, Platform } from '@ionic/angular'; import { ModalController, Platform } from '@ionic/angular';
import { EventsService } from 'src/app/services/events.service'; import { EventsService } from 'src/app/services/events.service';
import { Event } from '../../models/event.model'; import { Event } from '../../models/event.model';
import { Router, NavigationEnd, NavigationExtras } from '@angular/router'; import { Router, NavigationEnd, NavigationExtras } from '@angular/router';
import { momentG } from 'src/plugin/momentG'; import { momentG } from 'src/plugin/momentG';
import { DomSanitizer } from "@angular/platform-browser";
import { EventPerson } from 'src/app/models/eventperson.model'; import { EventPerson } from 'src/app/models/eventperson.model';
import { removeDuplicate } from 'src/plugin/removeDuplicate.js'; import { removeDuplicate } from 'src/plugin/removeDuplicate.js';
import { Storage } from '@ionic/storage'; import { Storage } from '@ionic/storage';
@@ -20,10 +20,8 @@ import {
} from 'angular-calendar'; } from 'angular-calendar';
import { CustomDateFormatter } from './custom-date-formatter.provider'; import { CustomDateFormatter } from './custom-date-formatter.provider';
import { NewEventPage } from './new-event/new-event.page'; import { NewEventPage } from './new-event/new-event.page';
import { AuthService } from 'src/app/services/auth.service';
import { LoginUserRespose } from 'src/app/models/user.model'; import { LoginUserRespose } from 'src/app/models/user.model';
import { DateAdapter } from '@angular/material/core'; import { DateAdapter } from '@angular/material/core';
import { ToastService } from 'src/app/services/toast.service';
import { eventSource } from 'src/app/models/agenda/eventSource'; import { eventSource } from 'src/app/models/agenda/eventSource';
import { CalendarStore } from 'src/app/store/calendar.service'; import { CalendarStore } from 'src/app/store/calendar.service';
import { ListBoxService } from 'src/app/services/agenda/list-box.service'; import { ListBoxService } from 'src/app/services/agenda/list-box.service';
@@ -35,7 +33,6 @@ import { ThemeService } from 'src/app/services/theme.service'
import { SessionStore } from 'src/app/store/session.service'; import { SessionStore } from 'src/app/store/session.service';
import { PermissionService } from 'src/app/services/permission.service'; import { PermissionService } from 'src/app/services/permission.service';
@Component({ @Component({
selector: 'app-agenda', selector: 'app-agenda',
templateUrl: './agenda.page.html', templateUrl: './agenda.page.html',
@@ -166,18 +163,15 @@ export class AgendaPage implements OnInit {
listToPresent listToPresent
array = [] array = []
sessionStore = SessionStore; SessionStore = SessionStore;
environment
constructor( constructor(
private alertCtrl: AlertController,
@Inject(LOCALE_ID) private locale: string, @Inject(LOCALE_ID) private locale: string,
private modalCtrl: ModalController, private modalCtrl: ModalController,
public eventService: EventsService, public eventService: EventsService,
private router: Router, private router: Router,
private sanitizer: DomSanitizer,
authService: AuthService,
private dateAdapter: DateAdapter<any>, private dateAdapter: DateAdapter<any>,
private toastService: ToastService,
private listBoxService: ListBoxService, private listBoxService: ListBoxService,
private changeProfileService: ChangeProfileService, private changeProfileService: ChangeProfileService,
private sqliteservice: SqliteService, private sqliteservice: SqliteService,
@@ -191,7 +185,7 @@ export class AgendaPage implements OnInit {
this.dateAdapter.setLocale('es'); this.dateAdapter.setLocale('es');
this.locale = 'pt' this.locale = 'pt'
this.loggeduser = authService.ValidatedUser; this.loggeduser = SessionStore.user;
this.changeProfileService.registerCallback(() => { this.changeProfileService.registerCallback(() => {
this.tigerUpdate() this.tigerUpdate()
@@ -365,12 +359,6 @@ export class AgendaPage implements OnInit {
} }
// changedate
dropDownChangeDate(id: string) {
/* const currentCandarDayYear = formatDate(this.eventSelectedDate,'dd -- yyyy', 'pt');
const newDate = new Date(currentCandarDayYear.replace('--',id));
this.onCurrentChanged(newDate); */
}
onTimeSelected = (ev: { selectedTime: Date, events: any[] }) => { onTimeSelected = (ev: { selectedTime: Date, events: any[] }) => {
this.eventSelectedDate2 = ev.selectedTime; this.eventSelectedDate2 = ev.selectedTime;
@@ -757,46 +745,40 @@ export class AgendaPage implements OnInit {
} else if(this.loggeduser.Profile == 'PR') { } else if(this.loggeduser.Profile == 'PR') {
// view PR calendar with PR profile // view PR calendar with PR profile
this.eventService.getAllPrEvents(momentG(new Date(startTime), 'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime), 'yyyy-MM-dd 23:59:59')).then((response: any) => { if(this.loggeduser.OwnerCalendars.length != 0 ) {
this.eventService.getAllOwnEvents(momentG(new Date(startTime), 'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime), 'yyyy-MM-dd 23:59:59')).then((response: any) => {
this.addEventToDB(response, "pr"); this.addEventToDB(response, "pr");
let eventsList; let eventsList = response;
if (this.segment == 'Oficial') {
eventsList = response.filter(data => data.CalendarName == "Oficial");
} else if (this.segment == 'Pessoal') {
eventsList = response.filter(data => data.CalendarName == "Pessoal");
} else {
eventsList = response;
}
// clear the current month only
this.CalendarStore.removeRange(startTime, endTime, 'pr') this.CalendarStore.removeRange(startTime, endTime, 'pr')
// loop
this.CalendarStore.pushEvent(eventsList, 'pr'); this.CalendarStore.pushEvent(eventsList, 'pr');
this.listToPresent = this.CalendarStore.eventSource this.listToPresent = this.CalendarStore.eventSource
this.TimelinePRList = this.listBoxService.list(this.listToPresent, 'pr', this.rangeStartDate, this.rangeEndDate, { segment: this.segment, selectedDate: this.eventSelectedDate }) this.TimelineMDList = this.listBoxService.list(this.listToPresent, 'pr', this.rangeStartDate, this.rangeEndDate, { segment: this.segment, selectedDate: this.eventSelectedDate })
// console.log('this.TimelineMDList', this.TimelineMDList);
//
this.myCal.update(); this.myCal.update();
this.myCal.loadEvents(); this.myCal.loadEvents();
this.showTimelinePR = true; this.showTimelineMD = true;
counter++;
if (counter == 1 || this.loggeduser.Profile == 'PR') {
this.showLoader = false; this.showLoader = false;
}
}).catch((error) => { }).catch((error) => {
this.getFromDB() this.getFromDB()
}).finally(() => { }).finally(() => {
if (counter == 1 || this.loggeduser.Profile == 'PR') { this.showLoader = false;
})
} else {
this.showLoader = false; this.showLoader = false;
} }
})
} else { } else {
@@ -807,8 +789,6 @@ export class AgendaPage implements OnInit {
this.addEventToDB(response, "md"); this.addEventToDB(response, "md");
let eventsList = response; let eventsList = response;
console.log('response', response);
this.CalendarStore.removeRange(startTime, endTime, 'md') this.CalendarStore.removeRange(startTime, endTime, 'md')
// loop // loop
@@ -818,7 +798,7 @@ export class AgendaPage implements OnInit {
this.TimelineMDList = this.listBoxService.list(this.listToPresent, 'md', this.rangeStartDate, this.rangeEndDate, { segment: this.segment, selectedDate: this.eventSelectedDate }) this.TimelineMDList = this.listBoxService.list(this.listToPresent, 'md', this.rangeStartDate, this.rangeEndDate, { segment: this.segment, selectedDate: this.eventSelectedDate })
console.log('this.TimelineMDList', this.TimelineMDList); // console.log('this.TimelineMDList', this.TimelineMDList);
this.myCal.update(); this.myCal.update();
this.myCal.loadEvents(); this.myCal.loadEvents();
@@ -850,7 +830,6 @@ export class AgendaPage implements OnInit {
if(this.loggeduser.SharedCalendars.length != 0 ) { if(this.loggeduser.SharedCalendars.length != 0 ) {
this.eventService.genericGetAllSharedEvents(momentG(new Date(startTime), 'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime), 'yyyy-MM-dd 23:59:59')).then((response: any) => { this.eventService.genericGetAllSharedEvents(momentG(new Date(startTime), 'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime), 'yyyy-MM-dd 23:59:59')).then((response: any) => {
this.addEventToDB(response, "pr"); this.addEventToDB(response, "pr");
@@ -249,6 +249,7 @@
<div class="add-people"> <div class="add-people">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="start" src="assets/images/theme/gov/icons-arrow-forward.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="start" src="assets/images/theme/gov/icons-arrow-forward.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " slot="start" src="assets/images/theme/{{ThemeService.currentTheme}}/icons-arrow-forward.svg"></ion-icon>
</div> </div>
</div> </div>
</div> </div>
@@ -271,6 +272,7 @@
<div class="add-people"> <div class="add-people">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="start" src="assets/images/theme/gov/icons-arrow-forward.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="start" src="assets/images/theme/gov/icons-arrow-forward.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " slot="start" src="assets/images/theme/{{ThemeService.currentTheme}}/icons-arrow-forward.svg"></ion-icon>
</div> </div>
</div> </div>
</div> </div>
@@ -294,6 +296,7 @@
<div class="attach-icon"> <div class="attach-icon">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' "src="assets/images/icons-attach-doc.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' "src="assets/images/icons-attach-doc.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/theme/gov/icons-attach-doc.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/theme/gov/icons-attach-doc.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " src="assets/images/theme/{{ThemeService.currentTheme}}/icons-attach-doc.svg"></ion-icon>
</div> </div>
<div class="attach-document"> <div class="attach-document">
<ion-label>Adicionar documentos</ion-label> <ion-label>Adicionar documentos</ion-label>
@@ -2,6 +2,7 @@
<div class="header-content"> <div class="header-content">
<div hidden class="header-icon-left"> <div hidden class="header-icon-left">
<button class="btn-no-color cursor-pointer" (click)="close()"> <button class="btn-no-color cursor-pointer" (click)="close()">
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " src="assets/images/theme/doneIt/icons-calendar-arrow-left.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-arrow-arrow-left.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-arrow-arrow-left.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/icons-arrow-arrow-left.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/icons-arrow-arrow-left.svg"></ion-icon>
@@ -3,6 +3,7 @@
<button class="btn-no-color"> <button class="btn-no-color">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' "slot="end" class="arrow-right-icon" src='assets/images/icons-arrow-arrow-right.svg'></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' "slot="end" class="arrow-right-icon" src='assets/images/icons-arrow-arrow-right.svg'></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" class="arrow-right-icon" src='assets/images/theme/gov/icons-calendar-arrow-right.svg'></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" class="arrow-right-icon" src='assets/images/theme/gov/icons-calendar-arrow-right.svg'></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " slot="end" class="arrow-right-icon" src='assets/images/theme/{{ThemeService.currentTheme}}/icons-calendar-arrow-right.svg'></ion-icon>
</button> </button>
</div> </div>
@@ -239,6 +239,7 @@
<div class="add-people cursor-pointer"> <div class="add-people cursor-pointer">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="start" src="assets/images/theme/gov/icons-arrow-forward.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="start" src="assets/images/theme/gov/icons-arrow-forward.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " slot="start" src="assets/images/theme/{{ThemeService.currentTheme}}/icons-arrow-forward.svg"></ion-icon>
</div> </div>
</div> </div>
</div> </div>
@@ -261,6 +262,7 @@
<div class="add-people cursor-pointer"> <div class="add-people cursor-pointer">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="start" src="assets/images/theme/gov/icons-arrow-forward.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="start" src="assets/images/theme/gov/icons-arrow-forward.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " slot="start" src="assets/images/theme/{{ThemeService.currentTheme}}/icons-arrow-forward.svg"></ion-icon>
</div> </div>
</div> </div>
</div> </div>
@@ -284,6 +286,7 @@
<div class="attach-icon"> <div class="attach-icon">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-attach-doc.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-attach-doc.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/theme/gov/icons-attach-doc.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/theme/gov/icons-attach-doc.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " src="assets/images/theme/{{ThemeService.currentTheme}}/icons-attach-doc.svg"></ion-icon>
</div> </div>
<div class="attach-document"> <div class="attach-document">
<ion-label>Adicionar documentos</ion-label> <ion-label>Adicionar documentos</ion-label>
@@ -6,7 +6,6 @@ import { EventPerson } from 'src/app/models/eventperson.model';
import { SearchList } from 'src/app/models/search-document'; import { SearchList } from 'src/app/models/search-document';
import { LoginUserRespose } from 'src/app/models/user.model'; import { LoginUserRespose } from 'src/app/models/user.model';
import { AttachmentsService } from 'src/app/services/attachments.service'; import { AttachmentsService } from 'src/app/services/attachments.service';
import { AuthService } from 'src/app/services/auth.service';
import { EventsService } from 'src/app/services/events.service'; import { EventsService } from 'src/app/services/events.service';
import { ToastService } from 'src/app/services/toast.service'; import { ToastService } from 'src/app/services/toast.service';
import { Event } from '../../../models/event.model'; import { Event } from '../../../models/event.model';
@@ -17,6 +16,7 @@ import { FormControl, FormGroup, Validators } from '@angular/forms';
import { ThemeService } from 'src/app/services/theme.service'; import { ThemeService } from 'src/app/services/theme.service';
import { NgxMatDateFormats } from '@angular-material-components/datetime-picker'; import { NgxMatDateFormats } from '@angular-material-components/datetime-picker';
import { NGX_MAT_DATE_FORMATS } from '@angular-material-components/datetime-picker'; import { NGX_MAT_DATE_FORMATS } from '@angular-material-components/datetime-picker';
import { SessionStore } from 'src/app/store/session.service';
const CUSTOM_DATE_FORMATS: NgxMatDateFormats = { const CUSTOM_DATE_FORMATS: NgxMatDateFormats = {
parse: { parse: {
@@ -91,10 +91,9 @@ export class NewEventPage implements OnInit {
public eventService: EventsService, public eventService: EventsService,
private attachmentsService: AttachmentsService, private attachmentsService: AttachmentsService,
private toastService: ToastService, private toastService: ToastService,
userService: AuthService,
public ThemeService: ThemeService public ThemeService: ThemeService
) { ) {
this.loggeduser = userService.ValidatedUser; this.loggeduser = SessionStore.user;
this.postEvent = new Event(); this.postEvent = new Event();
this.postEvent.EventRecurrence = {Type:'-1'}; this.postEvent.EventRecurrence = {Type:'-1'};
this.eventBody = { BodyType : "1", Text : ""}; this.eventBody = { BodyType : "1", Text : ""};
@@ -15,8 +15,9 @@
<div class="title-content d-flex justify-between width-100"> <div class="title-content d-flex justify-between width-100">
<div class="left"> <div class="left">
<button class="btn-no-color d-flex align-center" (click)="goBack()"> <button class="btn-no-color d-flex align-center" (click)="goBack()">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " src="assets/images/theme/doneIt/icons-calendar-arrow-left.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src='assets/images/theme/gov/icons-calendar-arrow-left.svg'></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src='assets/images/theme/gov/icons-calendar-arrow-left.svg'></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " slot="end" src='assets/images/theme/{{ThemeService.currentTheme}}/icons-calendar-arrow-left.svg'></ion-icon>
</button> </button>
</div> </div>
<div class="middle"> <div class="middle">
@@ -83,7 +84,7 @@
<div *ngIf="loadedEvent.Body.Text"> <div *ngIf="loadedEvent.Body.Text">
<h5>Detalhes</h5> <h5>Detalhes</h5>
<ion-item lines="none" class="ion-no-margin ion-no-padding"> <ion-item lines="none" class="ion-no-margin ion-no-padding">
<div disabled class="width-100" [innerHTML]="loadedEvent.Body.Text" rows="6"></div> <div class="width-100 text" >{{ loadedEvent.Body.Text }}</div>
</ion-item> </ion-item>
<div class="line"></div> <div class="line"></div>
</div> </div>
@@ -120,7 +120,7 @@ ion-menu{
.button-mdgpr-Oficial{ .button-mdgpr-Oficial{
width: 91px; width: 91px;
--border-radius: 20px; --border-radius: 20px;
--background: #ffb703; --background: var(--label-bg-color);
margin-left: 5px; margin-left: 5px;
float: left; float: left;
} }
@@ -294,8 +294,12 @@ ion-menu{
.label{ .label{
border-radius: 20px; border-radius: 20px;
background: #ffb703; background: var(--label-bg-color);
float: right; float: right;
padding: 5px 13.5px 5px 13.5px; padding: 5px 13.5px 5px 13.5px;
color: #fff; color: #fff;
} }
.text {
text-transform: initial !important
}
+24 -6
View File
@@ -4,7 +4,7 @@
<ion-content class="height-100 container-wrapper"> <ion-content class="height-100 container-wrapper">
<ion-refresher name="refresher" slot="fixed" (ionRefresh)="doRefresh($event)"> <ion-refresher name="refresher" slot="fixed" (ionRefresh)="doRefresh($event)">
<ion-progress-bar type="indeterminate" *ngIf="wsChatMethodsService.loadingWholeList"></ion-progress-bar> <ion-progress-bar type="indeterminate" *ngIf="ChatSystemService.loadingWholeList"></ion-progress-bar>
<ion-refresher-content> <ion-refresher-content>
</ion-refresher-content> </ion-refresher-content>
</ion-refresher> </ion-refresher>
@@ -17,13 +17,19 @@
<ion-label class="title">Chat</ion-label> <ion-label class="title">Chat</ion-label>
</div> </div>
<div class="div-icon"> <div class="div-icon">
<!-- <button (click)="openChatDebuggingPageModal()" title="Nova Conversa Individual" class="btn-no-color font-12">
Dev
</button> -->
<button title="Nova Conversa Individual" class="btn-no-color" (click)="openContactsPage()"> <button title="Nova Conversa Individual" class="btn-no-color" (click)="openContactsPage()">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="end" src="assets/images/icons-chat-new-conversation.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="end" src="assets/images/icons-chat-new-conversation.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src="assets/images/theme/gov/icons-chat-new-conversation.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src="assets/images/theme/gov/icons-chat-new-conversation.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " slot="end" src="assets/images/theme/{{ThemeService.currentTheme}}/icons-chat-new-conversation.svg"></ion-icon>
</button> </button>
<button title="Novo Grupo" class="btn-no-color" (click)="openNewGroupPage()"> <button title="Novo Grupo" class="btn-no-color" (click)="openNewGroupPage()">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="end" src="assets/images/icons-chat-new-group.svg" ></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="end" src="assets/images/icons-chat-new-group.svg" ></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src="assets/images/theme/gov/icons-chat-new-group.svg" ></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src="assets/images/theme/gov/icons-chat-new-group.svg" ></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " slot="end" src="assets/images/theme/{{ThemeService.currentTheme}}/icons-chat-new-group.svg" ></ion-icon>
</button> </button>
</div> </div>
</div> </div>
@@ -44,12 +50,14 @@
<ion-list *ngSwitchCase="'Contactos'"> <ion-list *ngSwitchCase="'Contactos'">
<ion-item-sliding> <ion-item-sliding>
<div class="item item-hover width-100 d-flex ion-no-padding ion-no-margin" <div class="item item-hover width-100 d-flex ion-no-padding ion-no-margin"
*ngFor="let room of wsChatMethodsService._dm" *ngFor="let room of ChatSystemService._dm"
[class.item-active]="room.id == idSelected"> [class.item-active]="room.id == idSelected">
<div class="item-icon"> <div class="item-icon">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="icon" slot="start" src="assets/images/icons-chat-chat-40.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="icon" slot="start" src="assets/images/icons-chat-chat-40.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && room.id != idSelected " class="icon" slot="start" src="assets/images/theme/gov/icons-chat-chat-40.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' && room.id != idSelected " class="icon" slot="start" src="assets/images/theme/gov/icons-chat-chat-40.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && room.id == idSelected " class="icon" slot="start" src="assets/images/theme/gov/icons-chat-chat-40-hover.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' && room.id == idSelected " class="icon" slot="start" src="assets/images/theme/gov/icons-chat-chat-40-hover.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' && room.id != idSelected " class="icon" slot="start" src="assets/images/theme/{{ThemeService.currentTheme}}/icons-chat-chat-40.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' && room.id == idSelected " class="icon" slot="start" src="assets/images/theme/{{ThemeService.currentTheme}}/icons-chat-chat-40-hover.svg"></ion-icon>
</div> </div>
<div [class.highlight]="room.id =='cjFv5XfreKz5j3fWW'" <div [class.highlight]="room.id =='cjFv5XfreKz5j3fWW'"
(click)="openMessagesPage(room.id)" (click)="openMessagesPage(room.id)"
@@ -96,7 +104,7 @@
</div> </div>
</div> </div>
</ion-item-sliding> </ion-item-sliding>
<ion-item-sliding *ngIf="wsChatMethodsService.loadingWholeList == true && wsChatMethodsService._dm.length == 0"> <ion-item-sliding *ngIf="ChatSystemService.loadingWholeList == true && ChatSystemService._dm.length == 0">
<div *ngFor="let n of numSequence(8); let i = index;" class="item item-hover width-100 d-flex ion-no-padding ion-no-margin"> <div *ngFor="let n of numSequence(8); let i = index;" class="item item-hover width-100 d-flex ion-no-padding ion-no-margin">
<div class="item-icon"><ion-icon class="icon" slot="start" src="assets/icon/icons-chat-grey.svg"></ion-icon></div> <div class="item-icon"><ion-icon class="icon" slot="start" src="assets/icon/icons-chat-grey.svg"></ion-icon></div>
<div class="item-content flex-grow-1 cursor-pointer"> <div class="item-content flex-grow-1 cursor-pointer">
@@ -114,7 +122,7 @@
</ion-list> </ion-list>
<ion-list *ngSwitchCase="'Grupos'"> <ion-list *ngSwitchCase="'Grupos'">
<ion-item-sliding > <ion-item-sliding >
<div *ngFor="let group of wsChatMethodsService._group" <div *ngFor="let group of ChatSystemService._group"
[class.item-active]="group.id ==idSelected" [class.item-active]="group.id ==idSelected"
class="item item-hover d-flex"> class="item item-hover d-flex">
<div class="item-icon"> <div class="item-icon">
@@ -123,6 +131,8 @@
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="icon" slot="start" src="assets/images/icons-chat-group-chat-40.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="icon" slot="start" src="assets/images/icons-chat-group-chat-40.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && group.id != idSelected " class="icon" slot="start" src="assets/images/theme/gov/icons-chat-group-chat-40.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' && group.id != idSelected " class="icon" slot="start" src="assets/images/theme/gov/icons-chat-group-chat-40.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && group.id == idSelected " class="icon" slot="start" src="assets/images/theme/gov/icons-chat-group-chat-40-hover.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' && group.id == idSelected " class="icon" slot="start" src="assets/images/theme/gov/icons-chat-group-chat-40-hover.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' && group.id != idSelected " class="icon" slot="start" src="assets/images/theme/{{ThemeService.currentTheme}}/icons-chat-group-chat-40.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' && group.id == idSelected " class="icon" slot="start" src="assets/images/theme/{{ThemeService.currentTheme}}/icons-chat-group-chat-40-hover.svg"></ion-icon>
</div> </div>
<div (click)="openGroupMessagesPage(group.id)" class="item-content flex-grow-1 cursor-pointer"> <div (click)="openGroupMessagesPage(group.id)" class="item-content flex-grow-1 cursor-pointer">
<div class="item-title-time"> <div class="item-title-time">
@@ -153,7 +163,7 @@
</div> </div>
</div> </div>
</ion-item-sliding> </ion-item-sliding>
<ion-item-sliding *ngIf="wsChatMethodsService.loadingWholeList == true && wsChatMethodsService._group.length == 0"> <ion-item-sliding *ngIf="ChatSystemService.loadingWholeList == true && ChatSystemService._group.length == 0">
<div *ngFor="let n of numSequence(8); let i = index;" class="item item-hover width-100 d-flex ion-no-padding ion-no-margin"> <div *ngFor="let n of numSequence(8); let i = index;" class="item item-hover width-100 d-flex ion-no-padding ion-no-margin">
<div class="item-icon"><ion-icon class="icon" slot="start" src="assets/icon/icons-group-chat-grey.svg"></ion-icon></div> <div class="item-icon"><ion-icon class="icon" slot="start" src="assets/icon/icons-group-chat-grey.svg"></ion-icon></div>
<div class="item-content flex-grow-1 cursor-pointer"> <div class="item-content flex-grow-1 cursor-pointer">
@@ -199,16 +209,22 @@
<app-contacts <app-contacts
(openMessage)="openMessagesPage($event)" (openMessage)="openMessagesPage($event)"
(backToChat)="backToChat($event)"
(emptyTextDescriptionOpen)="emptyTextDescriptionOpen()" (emptyTextDescriptionOpen)="emptyTextDescriptionOpen()"
(closeAllDesktopComponents)="closeAllDesktopComponents()"
*ngIf="showContacts" *ngIf="showContacts"
[roomId]="roomId"
[style.display]="showContacts ? 'flex' : 'none'" [style.display]="showContacts ? 'flex' : 'none'"
class=" height-100 flex-column"> class=" height-100 flex-column">
</app-contacts> </app-contacts>
<app-new-group <app-new-group
(addGroupMessage)="openGroupContactsPage($event)" (addGroupMessage)="openGroupContactsPage($event)"
[roomId]="roomId"
(backToChat)="backToChat($event)"
(closeAllDesktopComponents)="closeAllDesktopComponents()" (closeAllDesktopComponents)="closeAllDesktopComponents()"
[style.display]="showNewGroup ? 'flex' : 'none'" [style.display]="showNewGroup ? 'flex' : 'none'"
*ngIf="showNewGroup"
class=" height-100 flex-column"> class=" height-100 flex-column">
</app-new-group> </app-new-group>
@@ -225,11 +241,12 @@
*ngIf="showGroupContacts" *ngIf="showGroupContacts"
[style.display]="showGroupContacts ? 'flex' : 'none'" [style.display]="showGroupContacts ? 'flex' : 'none'"
[roomId]="groupRoomId" class=" height-100 flex-column" [roomId]="groupRoomId" class=" height-100 flex-column"
(backToChat)="backToChat($event)"
> >
</app-group-contacts> </app-group-contacts>
<app-group-messages <app-group-messages
*ngIf="showGroupMessages && wsChatMethodsService.deleteRecently(roomId) == false" *ngIf="showGroupMessages && ChatSystemService.deleteRecently(roomId) == false"
[style.display]="showEmptyComponent ? 'flex' : 'none'" [style.display]="showEmptyComponent ? 'flex' : 'none'"
(closeAllDesktopComponents)="closeAllDesktopComponents()" (closeAllDesktopComponents)="closeAllDesktopComponents()"
(showEmptyContainer)="showEmptyContainer()" (showEmptyContainer)="showEmptyContainer()"
@@ -253,6 +270,7 @@
[eventAttendees]="contacts" [eventAttendees]="contacts"
(onAddEvent)="closeNewEventComponentAndOpenChat($event)" (onAddEvent)="closeNewEventComponentAndOpenChat($event)"
(openAttendeesComponent)="closeNewEventComponentAndOpenChat($event)" (openAttendeesComponent)="closeNewEventComponentAndOpenChat($event)"
(backToChat)="backToChat($event)"
[style.display]="showNewEvent ? 'flex' : 'none'" [style.display]="showNewEvent ? 'flex' : 'none'"
class=" height-100 flex-column"> class=" height-100 flex-column">
</app-new-event> </app-new-event>
+51 -18
View File
@@ -9,14 +9,14 @@ import {
import { ModalController, Platform } from '@ionic/angular'; import { ModalController, Platform } from '@ionic/angular';
import { AuthService } from 'src/app/services/auth.service'; import { AuthService } from 'src/app/services/auth.service';
import { ChatService } from 'src/app/services/chat.service'; import { ChatService } from 'src/app/services/chat.service';
import { WsChatMethodsService} from 'src/app/services/chat/ws-chat-methods.service' import { ChatSystemService } from 'src/app/services/chat/chat-system.service'
import { GroupMessagesPage } from './group-messages/group-messages.page'; import { GroupMessagesPage } from './group-messages/group-messages.page';
import { ContactsPage } from './messages/contacts/contacts.page'; import { ContactsPage } from './messages/contacts/contacts.page';
import { MessagesPage } from './messages/messages.page'; import { MessagesPage } from './messages/messages.page';
import { NewGroupPage } from './new-group/new-group.page'; import { NewGroupPage } from './new-group/new-group.page';
import { EditGroupPage } from 'src/app/shared/chat/edit-group/edit-group.page'; import { EditGroupPage } from 'src/app/shared/chat/edit-group/edit-group.page';
import { Subject } from "rxjs/Rx"; import { Subject } from "rxjs/Rx";
import { NavigationStart, Router } from '@angular/router'; import { NavigationStart, Router, NavigationEnd } from '@angular/router';
import { EventPerson } from 'src/app/models/eventperson.model'; import { EventPerson } from 'src/app/models/eventperson.model';
import { removeDuplicate } from 'src/plugin/removeDuplicate.js' import { removeDuplicate } from 'src/plugin/removeDuplicate.js'
import { environment } from 'src/environments/environment'; import { environment } from 'src/environments/environment';
@@ -26,7 +26,7 @@ import { DataService } from 'src/app/services/data.service';
import { SqliteService } from 'src/app/services/sqlite.service'; import { SqliteService } from 'src/app/services/sqlite.service';
import { StorageService } from 'src/app/services/storage.service'; import { StorageService } from 'src/app/services/storage.service';
import { SessionStore } from 'src/app/store/session.service'; import { SessionStore } from 'src/app/store/session.service';
import { ChatDebuggingPage } from 'src/app/shared/popover/chat-debugging/chat-debugging.page';
@Component({ @Component({
@@ -112,10 +112,10 @@ export class ChatPage implements OnInit {
private sqlservice: SqliteService, private sqlservice: SqliteService,
private platform: Platform, private platform: Platform,
private storageservice: StorageService, private storageservice: StorageService,
public wsChatMethodsService: WsChatMethodsService, public ChatSystemService: ChatSystemService,
) { ) {
this.loggedUserChat = authService.ValidatedUserChat['data']; this.loggedUserChat = SessionStore.user.ChatData['data'];
this.headers = new HttpHeaders(); this.headers = new HttpHeaders();
window.onresize = (event) => { window.onresize = (event) => {
if (window.innerWidth > 701) { if (window.innerWidth > 701) {
@@ -131,22 +131,30 @@ export class ChatPage implements OnInit {
ngOnInit() { ngOnInit() {
this.chatService.refreshtoken(); // this.chatService.refreshtoken();
this.segment = "Contactos"; this.segment = "Contactos";
this.authService.userData$.subscribe((res: any) => { this.authService.userData$.subscribe((res: any) => {
this.loggedUser = res; this.loggedUser = res;
}); });
this.hideRefreshButton(); this.hideRefreshButton();
this.getChatMembers(); this.getChatMembers();
let t = this.showDateDuration(new Date());
this.router.events.forEach((event) => { this.router.events.forEach((event) => {
if (event instanceof NavigationStart && event.url.startsWith('/home/chat')) {
if (event instanceof NavigationEnd && event.url == '/home/chat' ||
event instanceof NavigationEnd && event.url == "/home/chat?gbCreateGroup=true") {
this.checkCreateGroup();
}
});
}
checkCreateGroup() {
if (this.dataService.get("newGroup")) { if (this.dataService.get("newGroup")) {
this.openNewGroupPage(); this.openNewGroupPage();
} }
@@ -154,11 +162,7 @@ export class ChatPage implements OnInit {
this.closeAllDesktopComponents(); this.closeAllDesktopComponents();
this.showEmptyComponent = true; this.showEmptyComponent = true;
} }
}
else{
this.dataService.set("newGroup", false);
}
});
} }
numSequence(n: number): Array<number> { numSequence(n: number): Array<number> {
@@ -167,7 +171,6 @@ export class ChatPage implements OnInit {
ngOnDestroy() { ngOnDestroy() {
this.setStatus('offline'); this.setStatus('offline');
this.dataService.set("newGroup", false);
} }
@@ -230,6 +233,7 @@ export class ChatPage implements OnInit {
} }
openMessagesPage(rid) { openMessagesPage(rid) {
// this.chatService.refreshtoken();
this.roomId = rid; this.roomId = rid;
if (window.innerWidth < 701) { if (window.innerWidth < 701) {
@@ -277,6 +281,7 @@ export class ChatPage implements OnInit {
} }
openGroupMessagesPage(rid) { openGroupMessagesPage(rid) {
// this.chatService.refreshtoken();
this.roomId = rid; this.roomId = rid;
if (window.innerWidth < 701) { if (window.innerWidth < 701) {
@@ -348,7 +353,7 @@ export class ChatPage implements OnInit {
console.log(roomId) console.log(roomId)
this.wsChatMethodsService._group.forEach((room)=>{ this.ChatSystemService._group.forEach((room)=>{
if(room.id == roomId) { if(room.id == roomId) {
@@ -356,7 +361,7 @@ export class ChatPage implements OnInit {
} }
}) })
this.wsChatMethodsService._dm.forEach((room)=>{ this.ChatSystemService._dm.forEach((room)=>{
if(room.id == roomId) { if(room.id == roomId) {
this.openMessagesPage(roomId) this.openMessagesPage(roomId)
} }
@@ -365,7 +370,7 @@ export class ChatPage implements OnInit {
} }
onSegmentChange() { onSegmentChange() {
this.wsChatMethodsService.getAllRooms(); this.ChatSystemService.getAllRooms();
} }
doRefresh(event) { doRefresh(event) {
@@ -730,6 +735,34 @@ export class ChatPage implements OnInit {
modal.onDidDismiss(); modal.onDidDismiss();
} }
backToChat({roomId}) {
const room = this.ChatSystemService.getRoomById(roomId);
if(room.isGroup) {
this.segment = "Grupos"
this.openGroupMessagesPage(room.id);
} else {
this.segment = "Contactos"
this.openMessagesPage(room.id);
}
}
async openChatDebuggingPageModal(roomId?: any) {
const modal = await this.modalController.create({
component: ChatDebuggingPage,
cssClass: 'modal modal-desktop isMessagesChatOpened',
componentProps: {
// roomId: roomId,
},
});
await modal.present();
modal.onDidDismiss();
}
async openGroupMessagesModal(roomId: any) { async openGroupMessagesModal(roomId: any) {
const modal = await this.modalController.create({ const modal = await this.modalController.create({
@@ -6,6 +6,7 @@
<button class="btn-no-color" (click)="close()"> <button class="btn-no-color" (click)="close()">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src='assets/images/theme/gov/icons-calendar-arrow-left.svg'></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src='assets/images/theme/gov/icons-calendar-arrow-left.svg'></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " slot="end" src='assets/images/theme/{{ThemeService.currentTheme}}/icons-calendar-arrow-left.svg'></ion-icon>
</button> </button>
</div> </div>
<div class="middle"> <div class="middle">
@@ -29,7 +29,7 @@ export class EditGroupPage implements OnInit {
} }
ngOnInit() { ngOnInit() {
this.chatService.refreshtoken(); // this.chatService.refreshtoken();
this.getRoomInfo(); this.getRoomInfo();
} }
@@ -37,7 +37,12 @@ export class EditGroupPage implements OnInit {
this.chatService.getRoomInfo(this.roomId).subscribe(room=>{ this.chatService.getRoomInfo(this.roomId).subscribe(room=>{
this.room = room['room']; this.room = room['room'];
try {
this.groupName = this.room.name.split('-').join(' '); this.groupName = this.room.name.split('-').join(' ');
} catch(error) {
this.groupName = this.room.name;
}
}); });
} }
@@ -5,6 +5,7 @@
<div class="back-icon"> <div class="back-icon">
<button class="btn-no-color cursor-pointer" (click)="close()"> <button class="btn-no-color cursor-pointer" (click)="close()">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " src="assets/images/theme/doneIt/icons-calendar-arrow-left.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src='assets/images/theme/gov/icons-calendar-arrow-left.svg'></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src='assets/images/theme/gov/icons-calendar-arrow-left.svg'></ion-icon>
</button> </button>
</div> </div>
@@ -7,7 +7,7 @@ import { ChatService } from 'src/app/services/chat.service';
import { GroupMessagesPage } from '../group-messages.page'; import { GroupMessagesPage } from '../group-messages.page';
import { ThemeService } from 'src/app/services/theme.service' import { ThemeService } from 'src/app/services/theme.service'
import { SessionStore } from 'src/app/store/session.service'; import { SessionStore } from 'src/app/store/session.service';
import { WsChatMethodsService } from 'src/app/services/chat/ws-chat-methods.service'; import { ChatSystemService } from 'src/app/services/chat/chat-system.service';
@Component({ @Component({
selector: 'app-group-contacts', selector: 'app-group-contacts',
@@ -16,7 +16,6 @@ import { WsChatMethodsService } from 'src/app/services/chat/ws-chat-methods.serv
}) })
export class GroupContactsPage implements OnInit { export class GroupContactsPage implements OnInit {
showLoader: boolean; showLoader: boolean;
loggedUser: any;
users = []; users = [];
contact: string[] = [" Ana M.", "Andre F.", "Bruno G.", "Catarina T", "Tiago"]; contact: string[] = [" Ana M.", "Andre F.", "Bruno G.", "Catarina T", "Tiago"];
@@ -41,10 +40,9 @@ export class GroupContactsPage implements OnInit {
private authService: AuthService, private authService: AuthService,
private navParams: NavParams, private navParams: NavParams,
public ThemeService: ThemeService, public ThemeService: ThemeService,
public wsChatMethodsService: WsChatMethodsService, public ChatSystemService: ChatSystemService,
) )
{ {
this.loggedUser = authService.ValidatedUserChat['data'];
this.textSearch=""; this.textSearch="";
this.dm=null; this.dm=null;
@@ -56,7 +54,7 @@ export class GroupContactsPage implements OnInit {
} }
ngOnInit() { ngOnInit() {
this.chatService.refreshtoken(); // this.chatService.refreshtoken();
this.loadUsers(); this.loadUsers();
this.getMembers(); this.getMembers();
@@ -93,14 +91,12 @@ export class GroupContactsPage implements OnInit {
if(this.room.t == "p"){ if(this.room.t == "p"){
this.chatService.getGroupMembers(this.room._id).subscribe(res=>{ this.chatService.getGroupMembers(this.room._id).subscribe(res=>{
this.members = res['members']; this.members = res['members'];
this.wsChatMethodsService.getAllRooms()
this.loadUsers(); this.loadUsers();
}); });
} }
else if(this.room.t == "c"){ else if(this.room.t == "c"){
this.chatService.getChannelMembers(this.room._id).subscribe(res=>{ this.chatService.getChannelMembers(this.room._id).subscribe(res=>{
this.members = res['members']; this.members = res['members'];
this.wsChatMethodsService.getAllRooms()
this.loadUsers(); this.loadUsers();
}); });
} }
@@ -51,7 +51,7 @@
<ion-label>Esta conversa passou a grupo</ion-label><br /> <ion-label>Esta conversa passou a grupo</ion-label><br />
<ion-label>A conversa original mantêm-se como chat individual</ion-label> <ion-label>A conversa original mantêm-se como chat individual</ion-label>
</div> </div>
<div class="messages-list-item-wrapper container-width-100" *ngFor="let msg of wsChatMethodsService.getGroupRoom(roomId).messages; let last = last" [class.messages-list-item-wrapper-active]="msg._id == selectedMsgId"> <div class="messages-list-item-wrapper container-width-100" *ngFor="let msg of ChatSystemService.getGroupRoom(roomId).messages; let last = last" [class.messages-list-item-wrapper-active]="msg._id == selectedMsgId">
<div class='message-container incoming-{{msg.u.username!=sessionStore.user.UserName}}' *ngIf="msg.t != 'r' && msg.t != 'ul' && msg.t != 'au' && msg.t != 'ru' && msg.msg !=''" (press)="handlePress(msg._id)"> <div class='message-container incoming-{{msg.u.username!=sessionStore.user.UserName}}' *ngIf="msg.t != 'r' && msg.t != 'ul' && msg.t != 'au' && msg.t != 'ru' && msg.msg !=''" (press)="handlePress(msg._id)">
<div class="title"> <div class="title">
<ion-label>{{msg.u.name ?? ""}}</ion-label> <ion-label>{{msg.u.name ?? ""}}</ion-label>
@@ -217,13 +217,13 @@
<ion-footer> <ion-footer>
<div class="typing" *ngIf="wsChatMethodsService.getGroupRoom(roomId).otherUserType == true"> <div class="typing" *ngIf="ChatSystemService.getGroupRoom(roomId).otherUserType == true">
<ngx-letters-avatar *ngIf="showAvatar" <ngx-letters-avatar *ngIf="showAvatar"
[avatarName]= "wsChatMethodsService.getGroupRoom(roomId).name" [avatarName]= "ChatSystemService.getGroupRoom(roomId).name"
[width]="30" [width]="30"
[circular]="true" [circular]="true"
fontFamily="Roboto"></ngx-letters-avatar> fontFamily="Roboto"></ngx-letters-avatar>
{{ wsChatMethodsService.getGroupRoom(roomId).userThatIsTyping }} está a escrever... {{ ChatSystemService.getGroupRoom(roomId).userThatIsTyping }} está a escrever...
</div> </div>
<div class="width-100 pl-20 pr-20"> <div class="width-100 pl-20 pr-20">
@@ -243,7 +243,7 @@
</div> </div>
<div class="message-box width-80"> <div class="message-box width-80">
<div *ngIf="!recording && !lastAudioRecorded" class="type-message"> <div *ngIf="!recording && !lastAudioRecorded" class="type-message">
<ion-textarea *ngIf="allowTyping" autocomplete="on" autocorrect="on" spellcheck="true" clearOnEdit="true" placeholder="Escrever uma mensagem" auto-grow class="message-input" rows="1" [(ngModel)]="wsChatMethodsService.getGroupRoom(roomId).message" (ionChange)="wsChatMethodsService.getGroupRoom(roomId).sendTyping()"></ion-textarea> <ion-textarea *ngIf="allowTyping" autocomplete="on" autocorrect="on" spellcheck="true" clearOnEdit="true" placeholder="Escrever uma mensagem" auto-grow class="message-input" rows="1" [(ngModel)]="ChatSystemService.getGroupRoom(roomId).message" (ionChange)="ChatSystemService.getGroupRoom(roomId).sendTyping()"></ion-textarea>
</div> </div>
<div *ngIf="recording" class="d-flex align-items-center justify-content-center"> <div *ngIf="recording" class="d-flex align-items-center justify-content-center">
<button (click)="stopRecording()" class="btn-no-color d-flex align-items-center justify-content-center"> <button (click)="stopRecording()" class="btn-no-color d-flex align-items-center justify-content-center">
@@ -252,15 +252,15 @@
</div> </div>
</div> </div>
<div> <div>
<button #recordbtn *ngIf="!wsChatMethodsService.getGroupRoom(roomId).message && !lastAudioRecorded" (click)="startRecording()" class="btn-no-color"> <button #recordbtn *ngIf="!ChatSystemService.getGroupRoom(roomId).message && !lastAudioRecorded" (click)="startRecording()" class="btn-no-color">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="chat-icon-send" src="assets/icon/theme/default/icons-chat-record-audio.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="chat-icon-send" src="assets/icon/theme/default/icons-chat-record-audio.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="chat-icon-send" src="assets/icon/theme/gov/icons-chat-record-audio.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="chat-icon-send" src="assets/icon/theme/gov/icons-chat-record-audio.svg"></ion-icon>
</button> </button>
<button *ngIf="wsChatMethodsService.getGroupRoom(roomId).message" class="btn-no-color" (click)="sendMessage()"> <button *ngIf="ChatSystemService.getGroupRoom(roomId).message" class="btn-no-color" (click)="sendMessage()">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="chat-icon-send" src="assets/icon/icons-chat-send.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="chat-icon-send" src="assets/icon/icons-chat-send.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="chat-icon-send" src="assets/icon/theme/gov/icons-chat-send.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="chat-icon-send" src="assets/icon/theme/gov/icons-chat-send.svg"></ion-icon>
</button> </button>
<button *ngIf="!wsChatMethodsService.getGroupRoom(roomId).message && lastAudioRecorded" class="btn-no-color" (click)="sendAudio(lastAudioRecorded)"> <button *ngIf="!ChatSystemService.getGroupRoom(roomId).message && lastAudioRecorded" class="btn-no-color" (click)="sendAudio(lastAudioRecorded)">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="chat-icon-send" src="assets/icon/theme/gov/icons-chat-send.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="chat-icon-send" src="assets/icon/theme/gov/icons-chat-send.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="chat-icon-send" src="assets/icon/theme/gov/icons-chat-send.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="chat-icon-send" src="assets/icon/theme/gov/icons-chat-send.svg"></ion-icon>
</button> </button>
@@ -1,7 +1,6 @@
import { Component, ElementRef, OnInit, ViewChild, AfterViewInit, OnDestroy, ChangeDetectorRef, } from '@angular/core'; import { Component, ElementRef, OnInit, ViewChild, AfterViewInit, OnDestroy, ChangeDetectorRef, } from '@angular/core';
import { IonSlides, ModalController, NavParams, PopoverController, Platform } from '@ionic/angular'; import { IonSlides, ModalController, NavParams, PopoverController, Platform } from '@ionic/angular';
import { AlertService } from 'src/app/services/alert.service'; import { AlertService } from 'src/app/services/alert.service';
import { AuthService } from 'src/app/services/auth.service';
import { ChatService } from 'src/app/services/chat.service'; import { ChatService } from 'src/app/services/chat.service';
import { ChatOptionsPopoverPage } from 'src/app/shared/popover/chat-options-popover/chat-options-popover.page'; import { ChatOptionsPopoverPage } from 'src/app/shared/popover/chat-options-popover/chat-options-popover.page';
import { ChatPopoverPage } from 'src/app/shared/popover/chat-popover/chat-popover.page'; import { ChatPopoverPage } from 'src/app/shared/popover/chat-popover/chat-popover.page';
@@ -18,7 +17,7 @@ import { ViewDocumentPage } from 'src/app/modals/view-document/view-document.pag
import { ThemeService } from 'src/app/services/theme.service' import { ThemeService } from 'src/app/services/theme.service'
import { ViewEventPage } from 'src/app/modals/view-event/view-event.page'; import { ViewEventPage } from 'src/app/modals/view-event/view-event.page';
import { SqliteService } from 'src/app/services/sqlite.service'; import { SqliteService } from 'src/app/services/sqlite.service';
import { WsChatMethodsService } from 'src/app/services/chat/ws-chat-methods.service'; import { ChatSystemService } from 'src/app/services/chat/chat-system.service';
import { FileType } from 'src/app/models/fileType'; import { FileType } from 'src/app/models/fileType';
import { Storage } from '@ionic/storage'; import { Storage } from '@ionic/storage';
@@ -90,7 +89,6 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
public popoverController: PopoverController, public popoverController: PopoverController,
private chatService: ChatService, private chatService: ChatService,
private navParams: NavParams, private navParams: NavParams,
private authService: AuthService,
private alertService: AlertService, private alertService: AlertService,
private route: Router, private route: Router,
private timeService: TimeService, private timeService: TimeService,
@@ -100,14 +98,14 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
private changeDetectorRef: ChangeDetectorRef, private changeDetectorRef: ChangeDetectorRef,
private sqlservice: SqliteService, private sqlservice: SqliteService,
private platform: Platform, private platform: Platform,
public wsChatMethodsService: WsChatMethodsService, public ChatSystemService: ChatSystemService,
private storage: Storage, private storage: Storage,
private CameraService: CameraService, private CameraService: CameraService,
private sanitiser: DomSanitizer, private sanitiser: DomSanitizer,
private file: File, private file: File,
private fileOpener: FileOpener, private fileOpener: FileOpener,
) { ) {
this.loggedUserChat = authService.ValidatedUserChat['data']; this.loggedUserChat = SessionStore.user.ChatData['data'];
this.isGroupCreated = true; this.isGroupCreated = true;
this.roomId = this.navParams.get('roomId'); this.roomId = this.navParams.get('roomId');
window.onresize = (event) => { window.onresize = (event) => {
@@ -116,10 +114,10 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
} }
}; };
this.wsChatMethodsService.getGroupRoom(this.roomId).loadHistory({}); this.ChatSystemService.getGroupRoom(this.roomId).loadHistory({});
this.wsChatMethodsService.getGroupRoom(this.roomId).scrollDown = this.scrollToBottomClicked; this.ChatSystemService.getGroupRoom(this.roomId).scrollDown = this.scrollToBottomClicked;
this.wsChatMethodsService.openRoom(this.roomId) this.ChatSystemService.openRoom(this.roomId)
this.groupNameFormart = this.wsChatMethodsService.getGroupRoom(this.roomId).name.split('-').join(' ') this.groupNameFormart = this.ChatSystemService.getGroupRoom(this.roomId).name.split('-').join(' ')
setTimeout(() => { setTimeout(() => {
this.scrollToBottomClicked() this.scrollToBottomClicked()
@@ -136,7 +134,6 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
} }
ngOnInit() { ngOnInit() {
this.chatService.refreshtoken();
this.loggedUser = this.loggedUserChat; this.loggedUser = this.loggedUserChat;
this.getRoomInfo(); this.getRoomInfo();
@@ -146,9 +143,6 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
this.getChatMembers(); this.getChatMembers();
this.getRoomMessageDB(this.roomId); this.getRoomMessageDB(this.roomId);
this.wsChatMethodsService.getUserOfRoom(this.roomId).then((value) => {
})
} }
@@ -163,7 +157,7 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
} }
deleteMessage(msgId: string) { deleteMessage(msgId: string) {
const room = this.wsChatMethodsService.getGroupRoom(this.roomId) const room = this.ChatSystemService.getGroupRoom(this.roomId)
this.alertService.confirmDeleteMessage(msgId, room); this.alertService.confirmDeleteMessage(msgId, room);
} }
@@ -380,12 +374,17 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
// this.getGroupContacts(this.room); // this.getGroupContacts(this.room);
// this.showLoader = false; // this.showLoader = false;
// }); // });
this.wsChatMethodsService.getGroupRoom(this.roomId).loadHistory({}); this.ChatSystemService.getGroupRoom(this.roomId).loadHistory({});
let room = await this.chatService.getRoomInfo(this.roomId).toPromise(); let room = await this.chatService.getRoomInfo(this.roomId).toPromise();
// console.log('ROOM',room) // console.log('ROOM',room)
this.room = room['room']; this.room = room['room'];
if (this.room.name) { if (this.room.name) {
try {
this.roomName = this.room.name.split('-').join(' '); this.roomName = this.room.name.split('-').join(' ');
} catch (error) {
this.roomName = this.room.name;
}
} }
@@ -425,23 +424,25 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
} }
getGroupContacts(room: any) { getGroupContacts(room: any) {
this.showLoader = true; // this.showLoader = true;
//If group is private call getGroupMembers // //If group is private call getGroupMembers
if (this.room.t === 'p') { // if (this.room.t === 'p') {
this.chatService.getGroupMembers(this.roomId).subscribe(res => { // this.chatService.getGroupMembers(this.roomId).subscribe(res => {
this.members = res['members']; // this.members = res['members'];
this.showLoader = false; // this.showLoader = false;
}); // });
} // }
//Otherwise call getChannelMembers for públic groups // //Otherwise call getChannelMembers for públic groups
else { // else {
this.chatService.getChannelMembers(this.roomId).subscribe(res => { // this.chatService.getChannelMembers(this.roomId).subscribe(res => {
this.members = res['members']; // this.members = res['members'];
this.showLoader = false; // this.showLoader = false;
}); // });
} // }
this.members = this.ChatSystemService.getGroupRoom(this.roomId).members
} }
@@ -461,7 +462,7 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
} }
sendMessage() { sendMessage() {
this.wsChatMethodsService.getGroupRoom(this.roomId).send({}) this.ChatSystemService.getGroupRoom(this.roomId).send({})
} }
base64toBlob(base64Data, contentType) { base64toBlob(base64Data, contentType) {
@@ -506,7 +507,7 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
const formData = new FormData(); const formData = new FormData();
formData.append("blobFile", blob); formData.append("blobFile", blob);
this.wsChatMethodsService.getGroupRoom(roomId).send({ this.ChatSystemService.getGroupRoom(roomId).send({
file: { file: {
"type": "application/audio", "type": "application/audio",
"msDuration": audioFile.value.msDuration, "msDuration": audioFile.value.msDuration,
@@ -539,7 +540,7 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
modal.onDidDismiss().then(res => { modal.onDidDismiss().then(res => {
if (res.data == 'leave') { if (res.data == 'leave') {
//this.wsChatMethodsService.subscribeToRoomUpdate(this.roomId, this.room); //this.ChatSystemService.subscribeToRoomUpdate(this.roomId, this.room);
} }
else if (res.data == 'cancel') { else if (res.data == 'cancel') {
@@ -655,7 +656,7 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
const formData = new FormData(); const formData = new FormData();
formData.append("blobFile", blob); formData.append("blobFile", blob);
this.wsChatMethodsService.getGroupRoom(roomId).send({ this.ChatSystemService.getGroupRoom(roomId).send({
file: { file: {
"type": "application/img", "type": "application/img",
"guid": '' "guid": ''
@@ -694,7 +695,7 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
if (data.selected) { if (data.selected) {
this.wsChatMethodsService.getGroupRoom(this.roomId).send({ this.ChatSystemService.getGroupRoom(this.roomId).send({
file: { file: {
"name": res.data.selected.Assunto, "name": res.data.selected.Assunto,
"type": "application/webtrix", "type": "application/webtrix",
@@ -739,7 +740,7 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
formData.append('blobFile', blob); formData.append('blobFile', blob);
this.wsChatMethodsService.getGroupRoom(roomId).send({ this.ChatSystemService.getGroupRoom(roomId).send({
file: { file: {
"type": file.type, "type": file.type,
"guid": '', "guid": '',
@@ -1110,6 +1111,7 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
if (this.platform.is('desktop') || this.platform.is('mobileweb')) { if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
if (msg?.file?.type == "application/img") { if (msg?.file?.type == "application/img") {
const modal = await this.modalController.create({ const modal = await this.modalController.create({
component: ViewMediaPage, component: ViewMediaPage,
cssClass: 'modal modal-desktop', cssClass: 'modal modal-desktop',
@@ -1122,6 +1124,7 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
}); });
modal.present(); modal.present();
} else { } else {
this.downloadFileFromBrowser("file", str)
this.downloadFileFromBrowser(msg.attachments[0].name, str) this.downloadFileFromBrowser(msg.attachments[0].name, str)
} }
@@ -5,10 +5,12 @@
<div class="back-icon "> <div class="back-icon ">
<button class="btn-no-color cursor-pointer" (click)="close()"> <button class="btn-no-color cursor-pointer" (click)="close()">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " src="assets/images/theme/doneIt/icons-calendar-arrow-left.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src='assets/images/theme/gov/icons-calendar-arrow-left.svg'></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src='assets/images/theme/gov/icons-calendar-arrow-left.svg'></ion-icon>
</button> </button>
</div> </div>
<div class="div-title"> <div class="div-title">
<!-- MOBILE -->
<ion-label class="title">Nova Conversa</ion-label> <ion-label class="title">Nova Conversa</ion-label>
</div> </div>
</div> </div>
@@ -29,7 +31,7 @@
</ion-refresher> </ion-refresher>
<div class="main-content"> <div class="main-content">
<ion-virtual-scroll [items]="WsChatMethodsService.users | filter:textSearch: 'name'" approxItemHeight="70px" [headerFn]="separateLetter"> <ion-virtual-scroll [items]="ChatSystemService.users | filter:textSearch: 'name'" approxItemHeight="70px" [headerFn]="separateLetter">
<div class="item-divider" *virtualHeader="let header"> <div class="item-divider" *virtualHeader="let header">
<ion-label>{{header}}</ion-label> <ion-label>{{header}}</ion-label>
@@ -5,7 +5,7 @@ import { AuthService } from 'src/app/services/auth.service';
import { ChatService } from 'src/app/services/chat.service'; import { ChatService } from 'src/app/services/chat.service';
import { MessagesPage } from '../messages.page'; import { MessagesPage } from '../messages.page';
import { ThemeService } from 'src/app/services/theme.service' import { ThemeService } from 'src/app/services/theme.service'
import { WsChatMethodsService} from 'src/app/services/chat/ws-chat-methods.service' import { ChatSystemService} from 'src/app/services/chat/chat-system.service'
import { SessionStore } from 'src/app/store/session.service'; import { SessionStore } from 'src/app/store/session.service';
@Component({ @Component({
@@ -18,8 +18,6 @@ export class ContactsPage implements OnInit {
loggedUser: any; loggedUser: any;
users = []; users = [];
headers: HttpHeaders;
options:any;
contacts:any; contacts:any;
textSearch:string; textSearch:string;
room:any; room:any;
@@ -32,10 +30,10 @@ export class ContactsPage implements OnInit {
private chatService: ChatService, private chatService: ChatService,
private authService: AuthService, private authService: AuthService,
public ThemeService: ThemeService, public ThemeService: ThemeService,
public WsChatMethodsService: WsChatMethodsService, public ChatSystemService: ChatSystemService,
) )
{ {
this.loggedUser = authService.ValidatedUserChat['data']; this.loggedUser = SessionStore.user.ChatData['data'];
this.textSearch=""; this.textSearch="";
this.dm=null; this.dm=null;
@@ -43,7 +41,7 @@ export class ContactsPage implements OnInit {
} }
ngOnInit() { ngOnInit() {
this.chatService.refreshtoken(); // this.chatService.refreshtoken();
this.loadUsers(); this.loadUsers();
} }
@@ -52,9 +50,7 @@ export class ContactsPage implements OnInit {
} }
loadUsers(){ loadUsers(){
this.options = {
headers: this.headers,
};
this.chatService.getAllUsers().subscribe((res:any) => { this.chatService.getAllUsers().subscribe((res:any) => {
this.contacts = res.users.filter(data => data.username != this.sessionStore.user.UserName); this.contacts = res.users.filter(data => data.username != this.sessionStore.user.UserName);
@@ -68,6 +64,8 @@ export class ContactsPage implements OnInit {
return 0; return 0;
}); });
this.showLoader = false; this.showLoader = false;
}, (error) =>{
// this.chatService.refreshtoken();
}); });
} }
@@ -102,7 +100,7 @@ export class ContactsPage implements OnInit {
this.room = res['room']; this.room = res['room'];
await this.WsChatMethodsService.getAllRooms(); await this.ChatSystemService.getAllRooms();
this.getDirectMessage(this.room._id); this.getDirectMessage(this.room._id);
}); });
} }
+10 -10
View File
@@ -10,12 +10,12 @@
</div> </div>
<div class="middle-container" *ngIf="!showMessageOptions"> <div class="middle-container" *ngIf="!showMessageOptions">
<div class="middle"> <div class="middle">
<ion-label class="title">{{wsChatMethodsService.getDmRoom(roomId).name}}</ion-label> <ion-label class="title">{{ChatSystemService.getDmRoom(roomId).name}}</ion-label>
<!-- <span><ion-icon class="{{users.status}}" name="ellipse"></ion-icon></span> --> <!-- <span><ion-icon class="{{users.status}}" name="ellipse"></ion-icon></span> -->
</div> </div>
</div> </div>
<!-- <div (click)="wsChatMethodsService.getDmRoom(roomId).deleteAll()" >delete all</div> --> <!-- <div (click)="ChatSystemService.getDmRoom(roomId).deleteAll()" >delete all</div> -->
<div class="middle-container-options" *ngIf="showMessageOptions"> <div class="middle-container-options" *ngIf="showMessageOptions">
<fa-icon (click)="deleteMessage(selectedMsgId)" icon="trash" class="middle-container-options-icons"></fa-icon> <fa-icon (click)="deleteMessage(selectedMsgId)" icon="trash" class="middle-container-options-icons"></fa-icon>
<!-- <ion-icon name="trash"></ion-icon> --> <!-- <ion-icon name="trash"></ion-icon> -->
@@ -45,7 +45,7 @@
<div (click)="handleClick()" class="message-attachments messages" #scrollMe> <div (click)="handleClick()" class="message-attachments messages" #scrollMe>
<div class="messages-list-item-wrapper container-width-100 file" <div class="messages-list-item-wrapper container-width-100 file"
*ngFor="let msg of wsChatMethodsService.getDmRoom(this.roomId).messages; let last = last" *ngFor="let msg of ChatSystemService.getDmRoom(this.roomId).messages; let last = last"
[class.messages-list-item-wrapper-active]="msg._id == selectedMsgId"> [class.messages-list-item-wrapper-active]="msg._id == selectedMsgId">
<div (press)="handlePress(msg._id)" class='file message-container incoming-{{msg.u.username!=sessionStore.user.UserName}}' <div (press)="handlePress(msg._id)" class='file message-container incoming-{{msg.u.username!=sessionStore.user.UserName}}'
*ngIf="msg.msg !=''"> *ngIf="msg.msg !=''">
@@ -224,8 +224,8 @@
<ion-footer > <ion-footer >
<div class="typing" *ngIf="wsChatMethodsService.getDmRoom(roomId).otherUserType == true"> <div class="typing" *ngIf="ChatSystemService.getDmRoom(roomId).otherUserType == true">
<ngx-letters-avatar [avatarName]="wsChatMethodsService.getGroupRoom(roomId).name" [width]="30" [circular]="true" <ngx-letters-avatar [avatarName]="ChatSystemService.getGroupRoom(roomId).name" [width]="30" [circular]="true"
fontFamily="Roboto"></ngx-letters-avatar> fontFamily="Roboto"></ngx-letters-avatar>
está a escrever ... está a escrever ...
</div> </div>
@@ -251,8 +251,8 @@
<div *ngIf="!recording && !lastAudioRecorded" class="type-message"> <div *ngIf="!recording && !lastAudioRecorded" class="type-message">
<ion-textarea *ngIf="allowTyping" autocomplete="on" autocorrect="on" spellcheck="true" clearOnEdit="true" <ion-textarea *ngIf="allowTyping" autocomplete="on" autocorrect="on" spellcheck="true" clearOnEdit="true"
placeholder="Escrever uma mensagem" auto-grow class="message-input" rows="1" placeholder="Escrever uma mensagem" auto-grow class="message-input" rows="1"
[(ngModel)]="wsChatMethodsService.getDmRoom(roomId).message" [(ngModel)]="ChatSystemService.getDmRoom(roomId).message"
(ionChange)="wsChatMethodsService.getDmRoom(roomId).sendTyping()"></ion-textarea> (ionChange)="ChatSystemService.getDmRoom(roomId).sendTyping()"></ion-textarea>
</div> </div>
<div *ngIf="recording" class="d-flex align-items-center justify-content-center"> <div *ngIf="recording" class="d-flex align-items-center justify-content-center">
<button (click)="stopRecording()" class="btn-no-color d-flex align-items-center justify-content-center"> <button (click)="stopRecording()" class="btn-no-color d-flex align-items-center justify-content-center">
@@ -261,21 +261,21 @@
</div> </div>
</div> </div>
<div> <div>
<button #recordbtn *ngIf="!wsChatMethodsService.getDmRoom(roomId).message && !lastAudioRecorded" <button #recordbtn *ngIf="!ChatSystemService.getDmRoom(roomId).message && !lastAudioRecorded"
(click)="startRecording()" class="btn-no-color"> (click)="startRecording()" class="btn-no-color">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="chat-icon-send" <ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="chat-icon-send"
src="assets/icon/theme/default/icons-chat-record-audio.svg"></ion-icon> src="assets/icon/theme/default/icons-chat-record-audio.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="chat-icon-send" <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="chat-icon-send"
src="assets/icon/theme/gov/icons-chat-record-audio.svg"></ion-icon> src="assets/icon/theme/gov/icons-chat-record-audio.svg"></ion-icon>
</button> </button>
<button *ngIf="wsChatMethodsService.getDmRoom(roomId).message" class="btn-no-color" (click)="sendMessage()" <button *ngIf="ChatSystemService.getDmRoom(roomId).message" class="btn-no-color" (click)="sendMessage()"
class="btn-no-color"> class="btn-no-color">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="chat-icon-send" <ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="chat-icon-send"
src="assets/icon/theme/gov/icons-chat-send.svg"></ion-icon> src="assets/icon/theme/gov/icons-chat-send.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="chat-icon-send" <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="chat-icon-send"
src="assets/icon/theme/gov/icons-chat-send.svg"></ion-icon> src="assets/icon/theme/gov/icons-chat-send.svg"></ion-icon>
</button> </button>
<button *ngIf="!wsChatMethodsService.getDmRoom(roomId).message && lastAudioRecorded" <button *ngIf="!ChatSystemService.getDmRoom(roomId).message && lastAudioRecorded"
(click)="sendAudio(lastAudioRecorded)" class="btn-no-color"> (click)="sendAudio(lastAudioRecorded)" class="btn-no-color">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="chat-icon-send" <ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="chat-icon-send"
src="assets/icon/theme/gov/icons-chat-send.svg"></ion-icon> src="assets/icon/theme/gov/icons-chat-send.svg"></ion-icon>
+37 -42
View File
@@ -23,7 +23,7 @@ import { VoiceRecorder, RecordingData, GenericResponse } from 'capacitor-voice-r
import { Haptics, ImpactStyle } from '@capacitor/haptics'; import { Haptics, ImpactStyle } from '@capacitor/haptics';
import { SqliteService } from 'src/app/services/sqlite.service'; import { SqliteService } from 'src/app/services/sqlite.service';
import { ViewEventPage } from 'src/app/modals/view-event/view-event.page'; import { ViewEventPage } from 'src/app/modals/view-event/view-event.page';
import { WsChatMethodsService } from 'src/app/services/chat/ws-chat-methods.service' import { ChatSystemService } from 'src/app/services/chat/chat-system.service'
import { MessageService } from 'src/app/services/chat/message.service'; import { MessageService } from 'src/app/services/chat/message.service';
import { AttachmentsService } from 'src/app/services/attachments.service'; import { AttachmentsService } from 'src/app/services/attachments.service';
@@ -37,8 +37,8 @@ import { Camera, CameraResultType, CameraSource } from '@capacitor/camera';
import { DomSanitizer } from '@angular/platform-browser'; import { DomSanitizer } from '@angular/platform-browser';
import { SessionStore } from 'src/app/store/session.service'; import { SessionStore } from 'src/app/store/session.service';
import { HttpErrorResponse } from '@angular/common/http'; import { HttpErrorResponse } from '@angular/common/http';
import { File } from '@awesome-cordova-plugins/file/ngx';
import { ViewMediaPage } from 'src/app/modals/view-media/view-media.page'; import { ViewMediaPage } from 'src/app/modals/view-media/view-media.page';
import { File } from '@awesome-cordova-plugins/file/ngx';
import { FileOpener } from '@awesome-cordova-plugins/file-opener/ngx'; import { FileOpener } from '@awesome-cordova-plugins/file-opener/ngx';
import { Filesystem, Directory } from '@capacitor/filesystem'; import { Filesystem, Directory } from '@capacitor/filesystem';
@@ -111,34 +111,23 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
public popoverController: PopoverController, public popoverController: PopoverController,
private modalController: ModalController, private modalController: ModalController,
private navParams: NavParams, private navParams: NavParams,
private chatService: ChatService,
private authService: AuthService,
private alertService: AlertService, private alertService: AlertService,
private toastService: ToastService, private toastService: ToastService,
private route: Router,
private activatedRoute: ActivatedRoute,
private fileService: FileService, private fileService: FileService,
private gestureController: GestureController, private gestureController: GestureController,
private processes: ProcessesService,
public ThemeService: ThemeService, public ThemeService: ThemeService,
private changeDetectorRef: ChangeDetectorRef,
private platform: Platform, private platform: Platform,
private sqlservice: SqliteService, private sqlservice: SqliteService,
public wsChatMethodsService: WsChatMethodsService, public ChatSystemService: ChatSystemService,
private AttachmentsService: AttachmentsService,
private CameraService: CameraService, private CameraService: CameraService,
private processesService: ProcessesService,
private storage: Storage, private storage: Storage,
private fileToBase64Service: FileToBase64Service,
private sant: DomSanitizer,
//private fileOpener: FileOpener, //private fileOpener: FileOpener,
private sanitiser: DomSanitizer, private sanitiser: DomSanitizer,
private alertController: AlertController,
// private document: DocumentViewer // private document: DocumentViewer
private file: File, private file: File,
private fileOpener: FileOpener, private fileOpener: FileOpener,
) { ) {
this.loggedUser = authService.ValidatedUserChat['data']; this.loggedUser = SessionStore.user.ChatData['data'];
this.roomId = this.navParams.get('roomId'); this.roomId = this.navParams.get('roomId');
@@ -149,9 +138,9 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
} }
this.wsChatMethodsService.getDmRoom(this.roomId).loadHistory({}) this.ChatSystemService.getDmRoom(this.roomId).loadHistory({})
this.wsChatMethodsService.getDmRoom(this.roomId).scrollDown = this.scrollToBottomClicked this.ChatSystemService.getDmRoom(this.roomId).scrollDown = this.scrollToBottomClicked
this.wsChatMethodsService.openRoom(this.roomId) this.ChatSystemService.openRoom(this.roomId)
setTimeout(() => { setTimeout(() => {
this.scrollToBottomClicked() this.scrollToBottomClicked()
@@ -162,15 +151,15 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
ngOnInit() { ngOnInit() {
this.createDirectoryImage() this.createDirectoryImage()
this.wsChatMethodsService.getAllRooms(); // this.chatService.refreshtoken();
this.chatService.refreshtoken(); this.ChatSystemService.getUserOfRoom(this.roomId).then((value) => {
this.wsChatMethodsService.getUserOfRoom(this.roomId).then((value) => {
}) })
this.getChatMembers(); this.getChatMembers();
} }
ngAfterViewInit() { ngAfterViewInit() {
this.scrollChangeCallback = () => this.onContentScrolled(event); this.scrollChangeCallback = () => this.onContentScrolled(event);
window.addEventListener('scroll', this.scrollChangeCallback, true); window.addEventListener('scroll', this.scrollChangeCallback, true);
@@ -300,7 +289,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
} }
deleteMessage(msgId: string) { deleteMessage(msgId: string) {
const room = this.wsChatMethodsService.getDmRoom(this.roomId) const room = this.ChatSystemService.getDmRoom(this.roomId)
this.alertService.confirmDeleteMessage(msgId, room); this.alertService.confirmDeleteMessage(msgId, room);
} }
@@ -387,7 +376,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
} }
sendMessage() { sendMessage() {
this.wsChatMethodsService.getDmRoom(this.roomId).send({}) this.ChatSystemService.getDmRoom(this.roomId).send({})
} }
base64toBlob(base64Data, contentType) { base64toBlob(base64Data, contentType) {
@@ -433,7 +422,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
const formData = new FormData(); const formData = new FormData();
formData.append("blobFile", blob); formData.append("blobFile", blob);
this.wsChatMethodsService.getDmRoom(roomId).send({ this.ChatSystemService.getDmRoom(roomId).send({
file: { file: {
"type": "application/audio", "type": "application/audio",
"msDuration": audioFile.value.msDuration, "msDuration": audioFile.value.msDuration,
@@ -462,12 +451,6 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
} }
} }
/* playSound(url?:any){
alert('here')
//this.audioDownloaded = this.sanitiser.bypassSecurityTrustResourceUrl(url);
this.audioDownloaded = url;
} */
docIndex(index: number) { docIndex(index: number) {
this.dicIndex = index this.dicIndex = index
@@ -524,12 +507,15 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
} }
getChatMembers() { getChatMembers() {
this.showLoader = true; // this.showLoader = true;
this.chatService.getMembers(this.roomId).subscribe(res => { // this.chatService.getMembers(this.roomId).subscribe(res => {
this.members = res['members']; // this.members = res['members'];
this.dmUsers = res['members'].filter(data => data.username != this.sessionStore.user.UserName) // this.dmUsers = res['members'].filter(data => data.username != this.sessionStore.user.UserName)
this.showLoader = false; // this.showLoader = false;
}); // });
this.members = this.ChatSystemService.getDmRoom(this.roomId).members
this.dmUsers = this.ChatSystemService.getDmRoom(this.roomId).membersExcludeMe
} }
showDateDuration(start: any) { showDateDuration(start: any) {
@@ -625,6 +611,8 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
async takePicture() { async takePicture() {
alert("!");
const roomId = this.roomId const roomId = this.roomId
const image = await this.CameraService.takePicture(); const image = await this.CameraService.takePicture();
@@ -632,14 +620,15 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
const lastphoto: any = await this.fileService.loadFiles(); const lastphoto: any = await this.fileService.loadFiles();
const { capturedImage, capturedImageTitle } = await this.fileService.loadFileData(lastphoto); const { capturedImage, capturedImageTitle } = await this.fileService.loadFileData(lastphoto);
alert('!!');
const base64 = await fetch(capturedImage); const base64 = await fetch(capturedImage);
const blob = await base64.blob(); const blob = await base64.blob();
const formData = new FormData(); const formData = new FormData();
formData.append("blobFile", blob); formData.append("blobFile", blob);
console.log(capturedImage);
this.wsChatMethodsService.getDmRoom(roomId).send({ this.ChatSystemService.getDmRoom(roomId).send({
file: { file: {
"type": "application/img", "type": "application/img",
"guid": '' "guid": ''
@@ -683,7 +672,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
if (data.selected) { if (data.selected) {
this.wsChatMethodsService.getDmRoom(roomId).send({ this.ChatSystemService.getDmRoom(roomId).send({
file: { file: {
"name": res.data.selected.Assunto, "name": res.data.selected.Assunto,
"type": "application/webtrix", "type": "application/webtrix",
@@ -727,7 +716,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
const formData = new FormData(); const formData = new FormData();
formData.append("blobFile", blob); formData.append("blobFile", blob);
this.wsChatMethodsService.getDmRoom(roomId).send({ this.ChatSystemService.getDmRoom(roomId).send({
file: { file: {
"type": "application/img", "type": "application/img",
"guid": '' "guid": ''
@@ -766,7 +755,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
formData.append('blobFile', blob); formData.append('blobFile', blob);
this.wsChatMethodsService.getDmRoom(roomId).send({ this.ChatSystemService.getDmRoom(roomId).send({
file: { file: {
"type": file.type, "type": file.type,
"guid": '', "guid": '',
@@ -847,7 +836,6 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
this.sqlservice.getAllChatMSG(roomId).then((msg: any) => { this.sqlservice.getAllChatMSG(roomId).then((msg: any) => {
let chatmsgArray = []; let chatmsgArray = [];
let array = []
msg.forEach(element => { msg.forEach(element => {
@@ -1000,6 +988,8 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
if (this.platform.is('desktop') || this.platform.is('mobileweb')) { if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
console.log(msg)
if (msg.file.type == "application/img") { if (msg.file.type == "application/img") {
const modal = await this.modalController.create({ const modal = await this.modalController.create({
component: ViewMediaPage, component: ViewMediaPage,
@@ -1013,7 +1003,12 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
}); });
modal.present(); modal.present();
} else { } else {
this.downloadFileFromBrowser("file", str)
this.downloadFileFromBrowser(msg.attachments[0].name, str) this.downloadFileFromBrowser(msg.attachments[0].name, str)
this.downloadFileFromBrowser(msg.attachments[0].name, str)
} }
} else { } else {
@@ -5,6 +5,7 @@
<div class="back-icon"> <div class="back-icon">
<button class="btn-no-color cursor-pointer" (click)="close()"> <button class="btn-no-color cursor-pointer" (click)="close()">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " src="assets/images/theme/doneIt/icons-calendar-arrow-left.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src='assets/images/theme/gov/icons-calendar-arrow-left.svg'></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src='assets/images/theme/gov/icons-calendar-arrow-left.svg'></ion-icon>
</button> </button>
</div> </div>
@@ -1,4 +1,4 @@
import { HttpClient, HttpHeaders } from '@angular/common/http'; import { HttpHeaders } from '@angular/common/http';
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { ModalController } from '@ionic/angular'; import { ModalController } from '@ionic/angular';
import { GroupMessagesPage } from '../../group-messages/group-messages.page'; import { GroupMessagesPage } from '../../group-messages/group-messages.page';
@@ -53,18 +53,9 @@ export class ContactsPage implements OnInit {
constructor( constructor(
private modalController: ModalController, private modalController: ModalController,
private http: HttpClient,
public ThemeService: ThemeService public ThemeService: ThemeService
) )
{ { }
this.headers = new HttpHeaders();
this.headers = this.headers.set('Access-Control-Allow-Origin' , '*');
this.headers = this.headers.set('Access-Control-Allow-Methods', 'POST, GET, OPTIONS, PUT');
this.headers = this.headers.set('Accept','application/json');
this.headers = this.headers.set('content-type','application/json');
}
ngOnInit() { ngOnInit() {
this.loadUsers(); this.loadUsers();
@@ -72,23 +63,7 @@ export class ContactsPage implements OnInit {
} }
loadUsers(){ loadUsers(){
this.options = {
headers: this.headers,
};
/* this.http.get('https://randomuser.me/api/?results=100', this.options)
.subscribe(res => {
this.users = res['results'].sort((a,b) => {
if(a.name.first < b.name.first){
return -1;
}
if(a.name.first > b.name.first){
return 1;
}
return 0;
});
}); */
this.users = this.contacts.sort((a,b) => { this.users = this.contacts.sort((a,b) => {
if(a.first < b.first){ if(a.first < b.first){
return -1; return -1;
@@ -101,17 +76,7 @@ export class ContactsPage implements OnInit {
} }
separateLetter(record, recordIndex, records){ separateLetter(record, recordIndex, records){
/* if(recordIndex == 0){
return record.name.first[0];
}
let first_prev = records[recordIndex - 1].name.first[0];
let first_current = record.name.first[0];
if(first_prev != first_current){
return first_current;
}
return null; */
if(recordIndex == 0){ if(recordIndex == 0){
return record.first[0]; return record.first[0];
} }
@@ -5,6 +5,7 @@
<div class="left"> <div class="left">
<button class="btn-no-color" (click)="close()"> <button class="btn-no-color" (click)="close()">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " src="assets/images/theme/doneIt/icons-calendar-arrow-left.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src='assets/images/theme/gov/icons-calendar-arrow-left.svg'></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src='assets/images/theme/gov/icons-calendar-arrow-left.svg'></ion-icon>
</button> </button>
</div> </div>
+8 -10
View File
@@ -5,7 +5,7 @@ import { GroupContactsPage } from '../group-messages/group-contacts/group-contac
import { ThemeService } from 'src/app/services/theme.service'; import { ThemeService } from 'src/app/services/theme.service';
import { ChatService } from 'src/app/services/chat.service'; import { ChatService } from 'src/app/services/chat.service';
import { ProcessesService } from 'src/app/services/processes.service'; import { ProcessesService } from 'src/app/services/processes.service';
import { WsChatMethodsService } from 'src/app/services/chat/ws-chat-methods.service'; import { ChatSystemService } from 'src/app/services/chat/chat-system.service';
import { AuthService } from 'src/app/services/auth.service'; import { AuthService } from 'src/app/services/auth.service';
import { SessionStore } from 'src/app/store/session.service'; import { SessionStore } from 'src/app/store/session.service';
@@ -31,19 +31,16 @@ export class NewGroupPage implements OnInit {
private modalController: ModalController, private modalController: ModalController,
private navParams: NavParams, private navParams: NavParams,
public ThemeService: ThemeService, public ThemeService: ThemeService,
private chatService: ChatService, public ChatSystemService: ChatSystemService,
private processesService: ProcessesService,
public wsChatMethodsService: WsChatMethodsService,
private authService: AuthService,
) { ) {
this.loggedUserChat = authService.ValidatedUserChat['data']; this.loggedUserChat = SessionStore.user.ChatData['data'];
this.isGroupCreated = false; this.isGroupCreated = false;
this.groupName = this.navParams.get('name'); this.groupName = this.navParams.get('name');
this.documents = this.navParams.get('documents'); this.documents = this.navParams.get('documents');
} }
ngOnInit() { ngOnInit() {
this.chatService.refreshtoken(); // this.chatService.refreshtoken();
// console.log(this.documents) // console.log(this.documents)
} }
@@ -75,19 +72,20 @@ export class NewGroupPage implements OnInit {
let customFields = { let customFields = {
"countDownDate": this.thedate "countDownDate": this.thedate
} }
res = await this.wsChatMethodsService.createPrivateRoom(name, SessionStore.user.UserName, customFields); res = await this.ChatSystemService.createPrivateRoom(name, SessionStore.user.UserName, customFields);
} }
else{ else{
res = await this.wsChatMethodsService.createPrivateRoom(name, SessionStore.user.UserName, customFields); res = await this.ChatSystemService.createPrivateRoom(name, SessionStore.user.UserName, customFields);
} }
this.isGroupCreated = true; this.isGroupCreated = true;
this.addContacts(res.result); this.addContacts(res.result);
this.ChatSystemService.getAllRooms();
setTimeout(() => { setTimeout(() => {
this.wsChatMethodsService.subscribeToRoomUpdate(res.result.rid, res.result); this.ChatSystemService.subscribeToRoomUpdate(res.result.rid, res.result);
}, 10) }, 10)
} }
@@ -17,6 +17,7 @@
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="font-35" src="assets/images/icons-default-profile.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="font-35" src="assets/images/icons-default-profile.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="font-35" src="assets/images/theme/gov/icons-profile.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="font-35" src="assets/images/theme/gov/icons-profile.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " class="font-35" src="assets/images/theme/{{ThemeService.currentTheme}}/icons-profile.svg"></ion-icon>
</div> </div>
<ion-label> <ion-label>
@@ -26,6 +27,7 @@
<div> <div>
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="font-35" src="assets/images/icons-add-25.svg" ></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="font-35" src="assets/images/icons-add-25.svg" ></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="font-35" src="assets/images/theme/gov/icons-add-25.svg" ></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="font-35" src="assets/images/theme/gov/icons-add-25.svg" ></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " class="font-35" src="assets/images/theme/{{ThemeService.currentTheme}}/icons-add-25.svg" ></ion-icon>
</div> </div>
</ion-item> </ion-item>
</div> </div>
@@ -41,6 +43,7 @@
<div class="pr-10"> <div class="pr-10">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="font-35" src="assets/images/icons-default-profile.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="font-35" src="assets/images/icons-default-profile.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="font-35" src="assets/images/theme/gov/icons-profile.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="font-35" src="assets/images/theme/gov/icons-profile.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " class="font-35" src="assets/images/theme/{{ThemeService.currentTheme}}/icons-profile.svg"></ion-icon>
</div> </div>
<ion-label> <ion-label>
<h3>{{ attendee.Name }}</h3> <h3>{{ attendee.Name }}</h3>
@@ -61,6 +64,7 @@
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="font-35" src="assets/images/icons-default-profile.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="font-35" src="assets/images/icons-default-profile.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="font-35" src="assets/images/theme/gov/icons-profile.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="font-35" src="assets/images/theme/gov/icons-profile.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " class="font-35" src="assets/images/theme/{{ThemeService.currentTheme}}/icons-profile.svg"></ion-icon>
</div> </div>
<ion-label> <ion-label>
+7 -6
View File
@@ -28,7 +28,7 @@
<ion-progress-bar type="indeterminate" *ngIf="showLoader"></ion-progress-bar> <ion-progress-bar type="indeterminate" *ngIf="showLoader"></ion-progress-bar>
<div class="conteiner-box px-20 height-100" ng-swipe-up="swipe($event)"> <div class="conteiner-box px-20 height-100" ng-swipe-up="swipe($event)">
<div *ngIf="p.userPermission([permissionList.Agenda.access])" class="schedule height-100"> <div *ngIf="p.userPermission([p.permissionList.Agenda.access])" class="schedule height-100">
<div class="schedule-header"> <div class="schedule-header">
<div class="title"> <div class="title">
<ion-icon class="icon" slot="end" src="assets/images/icons-default-agenda.svg" ></ion-icon> <ion-icon class="icon" slot="end" src="assets/images/icons-default-agenda.svg" ></ion-icon>
@@ -50,10 +50,10 @@
></ion-icon> ></ion-icon>
<ion-icon <ion-icon
*ngIf="ThemeService.currentTheme == 'tribunal' " *ngIf="ThemeService.currentTheme == 'doneIt' "
class="icon-next" class="icon-next"
slot="end" slot="end"
src="assets/images/theme/tribunal/icons-arrow-circle-arrow-right.svg" src="assets/images/theme/doneIt/icons-arrow-circle-arrow-right.svg"
></ion-icon> ></ion-icon>
</button> </button>
@@ -88,7 +88,7 @@
</div> </div>
</div> </div>
<div *ngIf="p.userPermission([permissionList.Gabinete.access])" class="schedule height-100"> <div *ngIf="p.userPermission([p.permissionList.Gabinete.access])" class="schedule height-100">
<div class="schedule-header"> <div class="schedule-header">
<div class="title"> <div class="title">
<ion-icon class="icon" slot="end" src="assets/images/icons-correspondencias.svg"></ion-icon> <ion-icon class="icon" slot="end" src="assets/images/icons-correspondencias.svg"></ion-icon>
@@ -110,11 +110,12 @@
></ion-icon> ></ion-icon>
<ion-icon <ion-icon
*ngIf="ThemeService.currentTheme == 'tribunal' " *ngIf="ThemeService.currentTheme == 'doneIt' "
class="icon-next" class="icon-next"
slot="end" slot="end"
src="assets/images/theme/tribunal/icons-arrow-circle-arrow-right.svg" src="assets/images/theme/doneIt/icons-arrow-circle-arrow-right.svg"
></ion-icon> ></ion-icon>
</button> </button>
</div> </div>
<div class="content overflow-y-auto flex-grow-1 height-100"> <div class="content overflow-y-auto flex-grow-1 height-100">
+14 -32
View File
@@ -1,31 +1,23 @@
import { Component, OnInit, EventEmitter, Output } from '@angular/core'; import { Component, OnInit, EventEmitter, Output } from '@angular/core';
import { Event } from '../../models/event.model';
import { EventsService } from 'src/app/services/events.service'; import { EventsService } from 'src/app/services/events.service';
import { NavigationExtras, Router } from '@angular/router'; import { NavigationExtras, Router } from '@angular/router';
import { ActivatedRoute, NavigationEnd } from '@angular/router'; import { ActivatedRoute, NavigationEnd } from '@angular/router';
import { AlertService } from 'src/app/services/alert.service';
import { AuthService } from 'src/app/services/auth.service';
import { StorageService } from 'src/app/services/storage.service';
import { ModalController, Platform } from '@ionic/angular'; import { ModalController, Platform } from '@ionic/angular';
import { EventDetailPage } from './event-detail/event-detail.page'; import { EventDetailPage } from './event-detail/event-detail.page';
import { ProcessesService } from '../../services/processes.service'; import { ProcessesService } from '../../services/processes.service';
import { DailyWorkTask } from '../../models/dailyworktask.model';
import { LoginUserRespose } from 'src/app/models/user.model'; import { LoginUserRespose } from 'src/app/models/user.model';
import { ToDayEventStorage } from 'src/app/store/to-day-event-storage.service'; import { ToDayEventStorage } from 'src/app/store/to-day-event-storage.service';
import { ScreenOrientation } from '@ionic-native/screen-orientation/ngx';
import { ExpedienteTaskPipe } from 'src/app/pipes/expediente-task.pipe'; import { ExpedienteTaskPipe } from 'src/app/pipes/expediente-task.pipe';
import { ExpedienteGdStore } from 'src/app/store/expedientegd-store.service'; import { ExpedienteGdStore } from 'src/app/store/expedientegd-store.service';
import { SqliteService } from 'src/app/services/sqlite.service'; import { SqliteService } from 'src/app/services/sqlite.service';
import { NetworkConnectionService } from 'src/app/services/network-connection.service'
import { BackgroundService } from 'src/app/services/background.service'; import { BackgroundService } from 'src/app/services/background.service';
import { momentG } from 'src/plugin/momentG'; import { momentG } from 'src/plugin/momentG';
import { ThemeService } from 'src/app/services/theme.service' import { ThemeService } from 'src/app/services/theme.service'
import { Storage } from '@ionic/storage'; import { Storage } from '@ionic/storage';
import { PermissionList } from 'src/app/models/permission/permissionList';
import { PermissionService } from 'src/app/services/permission.service'; import { PermissionService } from 'src/app/services/permission.service';
import { ViewEventPage } from 'src/app/modals/view-event/view-event.page'; import { ViewEventPage } from 'src/app/modals/view-event/view-event.page';
import { ChangeProfileService } from 'src/app/services/change-profile.service'; import { ChangeProfileService } from 'src/app/services/change-profile.service';
import { SessionStore } from 'src/app/store/session.service';
@Component({ @Component({
selector: 'app-events', selector: 'app-events',
templateUrl: './events.page.html', templateUrl: './events.page.html',
@@ -72,21 +64,14 @@ export class EventsPage implements OnInit {
loggeduser: LoginUserRespose; loggeduser: LoginUserRespose;
permissionList = new PermissionList();
constructor( constructor(
private eventService: EventsService, private eventService: EventsService,
private router: Router, private router: Router,
private storageService: StorageService,
public activatedRoute: ActivatedRoute, public activatedRoute: ActivatedRoute,
private alertController: AlertService,
private authService: AuthService,
private processes: ProcessesService, private processes: ProcessesService,
private modalController: ModalController, private modalController: ModalController,
private screenOrientation: ScreenOrientation,
public platform: Platform, public platform: Platform,
private sqliteservice: SqliteService, private sqliteservice: SqliteService,
private networkconnection: NetworkConnectionService,
private backgroundservice: BackgroundService, private backgroundservice: BackgroundService,
public ThemeService: ThemeService, public ThemeService: ThemeService,
private storage: Storage, private storage: Storage,
@@ -94,7 +79,7 @@ export class EventsPage implements OnInit {
private changeProfileService: ChangeProfileService, private changeProfileService: ChangeProfileService,
) { ) {
this.loggeduser = authService.ValidatedUser; this.loggeduser = SessionStore.user;
this.platform.resize.subscribe(async () => { this.platform.resize.subscribe(async () => {
@@ -415,7 +400,7 @@ export class EventsPage implements OnInit {
} }
logout() { logout() {
this.authService.ValidatedUser.BasicAuthKey = ""; SessionStore.user.BasicAuthKey = "";
this.router.navigate(['/home/login']); this.router.navigate(['/home/login']);
} }
@@ -458,10 +443,6 @@ export class EventsPage implements OnInit {
let ExpedienteTask = result.map(e => this.expedienteTaskPipe.transform(e)) let ExpedienteTask = result.map(e => this.expedienteTaskPipe.transform(e))
ExpedienteTask = ExpedienteTask.filter((item) => {
return item.activityInstanceName != 'Retificar Expediente'
});
this.listToPresentexpediente = ExpedienteTask; this.listToPresentexpediente = ExpedienteTask;
this.showLoader = false; this.showLoader = false;
@@ -494,7 +475,17 @@ export class EventsPage implements OnInit {
} }
viewExpedientListPage() { viewExpedientListPage() {
if (this.loggeduser.Profile == 'MDGPR') {
if (this.loggeduser.Profile == 'PR') {
if (window.innerWidth < 701) {
this.router.navigate(['/home/gabinete-digital/expedientes-pr']);
}
else {
let navigationExtras: NavigationExtras = { queryParams: { "expedientes-pr": true, } };
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
}
} else {
if (window.innerWidth < 701) { if (window.innerWidth < 701) {
this.router.navigate(['/home/gabinete-digital/expediente']); this.router.navigate(['/home/gabinete-digital/expediente']);
} }
@@ -503,15 +494,6 @@ export class EventsPage implements OnInit {
this.router.navigate(['/home/gabinete-digital'], navigationExtras); this.router.navigate(['/home/gabinete-digital'], navigationExtras);
} }
} }
else if (this.loggeduser.Profile == 'PR') {
if (window.innerWidth < 701) {
this.router.navigate(['/home/gabinete-digital/expedientes-pr']);
}
else {
let navigationExtras: NavigationExtras = { queryParams: { "expedientes-pr": true, } };
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
}
}
} }
@@ -8,6 +8,7 @@
<div class="title-content width-100 d-flex justify-space-between align-center"> <div class="title-content width-100 d-flex justify-space-between align-center">
<div class="font-30 cursor-pointer align-center d-flex" (click)="goBack()" defaultHref="#"> <div class="font-30 cursor-pointer align-center d-flex" (click)="goBack()" defaultHref="#">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " src="assets/images/theme/doneIt/icons-calendar-arrow-left.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src='assets/images/theme/gov/icons-calendar-arrow-left.svg'></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src='assets/images/theme/gov/icons-calendar-arrow-left.svg'></ion-icon>
</div> </div>
<div class="middle d-flex align-center flex-grow-1"> <div class="middle d-flex align-center flex-grow-1">
@@ -16,6 +17,7 @@
<div class="div-icon" (click)="openOptions()"> <div class="div-icon" (click)="openOptions()">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="font-25 cursor-pointer" src="assets/images/icons-menu.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="font-25 cursor-pointer" src="assets/images/icons-menu.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="font-25 cursor-pointer" src="assets/images/theme/gov/icons-menu.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="font-25 cursor-pointer" src="assets/images/theme/gov/icons-menu.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " class="font-25 cursor-pointer" src="assets/images/theme/{{ThemeService.currentTheme}}/icons-menu.svg"></ion-icon>
</div> </div>
</div> </div>
</div> </div>
@@ -101,7 +101,7 @@ ion-button{
.label{ .label{
border-radius: 20px; border-radius: 20px;
background: #ffb703; background: var(--label-bg-color);
float: right; float: right;
padding: 5px 13.5px 5px 13.5px; padding: 5px 13.5px 5px 13.5px;
color: #fff; color: #fff;
@@ -192,7 +192,7 @@ ion-item{
.label{ .label{
border-radius: 15px; border-radius: 15px;
background: #ffb703; background: var(--label-bg-color);
/* font-size: 12px; */ /* font-size: 12px; */
float: right; float: right;
padding: 2.5px 13.5px 2.5px 13.5px; padding: 2.5px 13.5px 2.5px 13.5px;
@@ -65,7 +65,7 @@ export class DespachosPrPage implements OnInit {
public ThemeService: ThemeService public ThemeService: ThemeService
) { ) {
this.loggeduser = authService.ValidatedUser; this.loggeduser = SessionStore.user;
this.profile = 'mdgpr'; this.profile = 'mdgpr';
} }
@@ -127,7 +127,6 @@ export class DespachosPrPage implements OnInit {
if(this.loggeduser.Profile != "PR") { if(this.loggeduser.Profile != "PR") {
if(SessionStore.user.Profile != 'Consultant') { if(SessionStore.user.Profile != 'Consultant') {
despachosPr = await despachos.reverse().filter(data => data.activityInstanceName == "Tarefa de Despacho"); despachosPr = await despachos.reverse().filter(data => data.activityInstanceName == "Tarefa de Despacho");
} else { } else {
@@ -9,6 +9,7 @@
<div class="title-content width-100 d-flex justify-space-between align-center"> <div class="title-content width-100 d-flex justify-space-between align-center">
<div class=" btn-dismiss font-30 cursor-pointer" (click)="goBack()" defaultHref="#"> <div class=" btn-dismiss font-30 cursor-pointer" (click)="goBack()" defaultHref="#">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " src="assets/images/theme/doneIt/icons-calendar-arrow-left.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src='assets/images/theme/gov/icons-calendar-arrow-left.svg'></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src='assets/images/theme/gov/icons-calendar-arrow-left.svg'></ion-icon>
</div> </div>
<div class="middle d-flex align-center flex-grow-1"> <div class="middle d-flex align-center flex-grow-1">
@@ -17,6 +18,7 @@
<div class="div-icon" (click)="openOptions()" *ngIf="p.userPermission([p.permissionList.Agenda.access])"> <div class="div-icon" (click)="openOptions()" *ngIf="p.userPermission([p.permissionList.Agenda.access])">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-menu.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-menu.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/theme/gov/icons-menu.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/theme/gov/icons-menu.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " src="assets/images/theme/{{ThemeService.currentTheme}}/icons-menu.svg"></ion-icon>
</div> </div>
</div> </div>
</div> </div>
@@ -60,7 +60,7 @@ ion-button{
.label{ .label{
border-radius: 20px; border-radius: 20px;
background: #ffb703; background: var(--label-bg-color);
float: right; float: right;
padding: 5px 13.5px 5px 13.5px; padding: 5px 13.5px 5px 13.5px;
color: #fff; color: #fff;
@@ -173,7 +173,7 @@ ion-item{
.label{ .label{
border-radius: 15px; border-radius: 15px;
background: #ffb703; background: var(--label-bg-color);
/* font-size: 12px; */ /* font-size: 12px; */
float: right; float: right;
padding: 2.5px 13.5px 2.5px 13.5px; padding: 2.5px 13.5px 2.5px 13.5px;
@@ -9,6 +9,7 @@
<div class="title-content width-100 d-flex justify-space-between"> <div class="title-content width-100 d-flex justify-space-between">
<div class="font-30 cursor-pointer" (click)="goBack()" defaultHref="#"> <div class="font-30 cursor-pointer" (click)="goBack()" defaultHref="#">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " src="assets/images/theme/doneIt/icons-calendar-arrow-left.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src='assets/images/theme/gov/icons-calendar-arrow-left.svg'></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src='assets/images/theme/gov/icons-calendar-arrow-left.svg'></ion-icon>
</div> </div>
<div class="middle d-flex align-center flex-grow-1 "> <div class="middle d-flex align-center flex-grow-1 ">
@@ -120,7 +120,7 @@ ion-button{
.label{ .label{
border-radius: 20px; border-radius: 20px;
background: #ffb703; background: var(--label-bg-color);
float: right; float: right;
padding: 5px 13.5px 5px 13.5px; padding: 5px 13.5px 5px 13.5px;
color: #fff; color: #fff;
@@ -182,7 +182,7 @@ ion-item{
.label{ .label{
border-radius: 15px; border-radius: 15px;
background: #ffb703; background: var(--label-bg-color);
/* font-size: 12px; */ /* font-size: 12px; */
float: right; float: right;
padding: 2.5px 13.5px 2.5px 13.5px; padding: 2.5px 13.5px 2.5px 13.5px;
@@ -173,7 +173,7 @@ ion-item{
.label{ .label{
border-radius: 15px; border-radius: 15px;
background: #ffb703; background: var(--label-bg-color);
/* font-size: 12px; */ /* font-size: 12px; */
float: right; float: right;
padding: 2.5px 13.5px 2.5px 13.5px; padding: 2.5px 13.5px 2.5px 13.5px;
@@ -11,6 +11,7 @@
<div class="title-content width-100 d-flex justify-space-between"> <div class="title-content width-100 d-flex justify-space-between">
<div class="font-30 cursor-pointer" (click)="goBack()" > <div class="font-30 cursor-pointer" (click)="goBack()" >
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " src="assets/images/theme/doneIt/icons-calendar-arrow-left.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src='assets/images/theme/gov/icons-calendar-arrow-left.svg'></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src='assets/images/theme/gov/icons-calendar-arrow-left.svg'></ion-icon>
</div> </div>
<div class="middle d-flex align-center flex-grow-1 "> <div class="middle d-flex align-center flex-grow-1 ">
@@ -120,7 +120,7 @@ ion-button{
.label{ .label{
border-radius: 20px; border-radius: 20px;
background: #ffb703; background: var(--label-bg-color);
float: right; float: right;
padding: 5px 13.5px 5px 13.5px; padding: 5px 13.5px 5px 13.5px;
color: #fff; color: #fff;
@@ -9,6 +9,7 @@
<div class="title-content width-100 d-flex justify-space-between"> <div class="title-content width-100 d-flex justify-space-between">
<div class="font-30 cursor-pointer" (click)="goBack()" defaultHref="#"> <div class="font-30 cursor-pointer" (click)="goBack()" defaultHref="#">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " src="assets/images/theme/doneIt/icons-calendar-arrow-left.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src='assets/images/theme/gov/icons-calendar-arrow-left.svg'></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src='assets/images/theme/gov/icons-calendar-arrow-left.svg'></ion-icon>
</div> </div>
<div class="middle d-flex align-center flex-grow-1 "> <div class="middle d-flex align-center flex-grow-1 ">
@@ -20,6 +21,7 @@
</ion-menu-button> --> </ion-menu-button> -->
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="font-25 cursor-pointer" src="assets/images/icons-menu.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="font-25 cursor-pointer" src="assets/images/icons-menu.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="font-25 cursor-pointer" src="assets/images/theme/gov/icons-menu.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="font-25 cursor-pointer" src="assets/images/theme/gov/icons-menu.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " class="font-25 cursor-pointer" src="assets/images/theme/{{ThemeService.currentTheme}}/icons-menu.svg"></ion-icon>
</div> </div>
</div> </div>
</div> </div>
@@ -102,7 +102,7 @@ ion-button{
.label{ .label{
border-radius: 20px; border-radius: 20px;
background: #ffb703; background: var(--label-bg-color);
float: right; float: right;
padding: 5px 13.5px 5px 13.5px; padding: 5px 13.5px 5px 13.5px;
color: #fff; color: #fff;
@@ -172,7 +172,7 @@ ion-item{
.label{ .label{
border-radius: 15px; border-radius: 15px;
background: #ffb703; background: var(--label-bg-color);
/* font-size: 12px; */ /* font-size: 12px; */
float: right; float: right;
padding: 2.5px 13.5px 2.5px 13.5px; padding: 2.5px 13.5px 2.5px 13.5px;
@@ -3,6 +3,7 @@
<div class="header-icon-left"> <div class="header-icon-left">
<button class="btn-no-color cursor-pointer" (click)="close()"> <button class="btn-no-color cursor-pointer" (click)="close()">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-arrow-arrow-left.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-arrow-arrow-left.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " src="assets/images/theme/doneIt/icons-calendar-arrow-left.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src='assets/images/theme/gov/icons-calendar-arrow-left.svg'></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src='assets/images/theme/gov/icons-calendar-arrow-left.svg'></ion-icon>
</button> </button>
</div> </div>
@@ -12,6 +13,7 @@
<div class="header-icon-right cursor-pointer" (click)="editar(loadedEvent.serialNumber)"> <div class="header-icon-right cursor-pointer" (click)="editar(loadedEvent.serialNumber)">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-edit.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-edit.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/theme/gov/icons-edit.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/theme/gov/icons-edit.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " src="assets/images/theme/{{ThemeService.currentTheme}}/icons-edit.svg"></ion-icon>
</div> </div>
</div> </div>
</ion-header> </ion-header>
@@ -49,7 +49,7 @@ ion-menu{
.button-calendar-type{ .button-calendar-type{
width: 91px; width: 91px;
--border-radius: 12.5px; --border-radius: 12.5px;
--background: #ffb703; --background: var(--label-bg-color);
margin-left: 5px; margin-left: 5px;
float: left; float: left;
} }
@@ -7,7 +7,6 @@
<div class="pl-20 pr-20 text-center d-flex justify-center align-center" style="width:100%; height: 30px; background-color: var(--Event-approve-header-color); border-top-right-radius: 25px;border-top-left-radius: 25px;"> <div class="pl-20 pr-20 text-center d-flex justify-center align-center" style="width:100%; height: 30px; background-color: var(--Event-approve-header-color); border-top-right-radius: 25px;border-top-left-radius: 25px;">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="right-icons font-28" src="assets/images/icons-received-event.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="right-icons font-28" src="assets/images/icons-received-event.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov'" class="right-icons font-28" src="assets/images/theme/gov/icons-received-event.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov'" class="right-icons font-28" src="assets/images/theme/gov/icons-received-event.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'tribunal' " class="right-icons font-28" src="assets/images/theme/tribunal/icons-received-event.svg"></ion-icon>
<div style="color: white;"> <div style="color: white;">
Evento Pendente de Aprovação Evento Pendente de Aprovação
</div> </div>
@@ -19,6 +18,7 @@
<div class="header-content width-100 d-flex justify-space-between"> <div class="header-content width-100 d-flex justify-space-between">
<div (click)="goBack()" class="header-icon-left cursor-pointer"> <div (click)="goBack()" class="header-icon-left cursor-pointer">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-arrow-arrow-left.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-arrow-arrow-left.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " src="assets/images/theme/doneIt/icons-calendar-arrow-left.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src='assets/images/theme/gov/icons-calendar-arrow-left.svg'></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src='assets/images/theme/gov/icons-calendar-arrow-left.svg'></ion-icon>
</div> </div>
<div class="header-title flex-grow-1 cursor-pointer" *ngIf="loadedEvent.workflowInstanceDataFields.Subject"> <div class="header-title flex-grow-1 cursor-pointer" *ngIf="loadedEvent.workflowInstanceDataFields.Subject">
@@ -27,11 +27,13 @@
<div (click)="editar(loadedEvent.serialNumber)" class="header-icon-right display-none-true"> <div (click)="editar(loadedEvent.serialNumber)" class="header-icon-right display-none-true">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-edit.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-edit.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="edit" slot="end" src="assets/images/theme/gov/icons-edit.svg" ></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="edit" slot="end" src="assets/images/theme/gov/icons-edit.svg" ></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " class="edit" slot="end" src="assets/images/theme/{{ThemeService.currentTheme}}/icons-edit.svg" ></ion-icon>
</div> </div>
<div class="menu-ptions"> <div class="menu-ptions">
<button class="btn-no-color" (click)="openOptions(loadedEvent)"> <button class="btn-no-color" (click)="openOptions(loadedEvent)">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-menu.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-menu.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/theme/gov/icons-menu.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/theme/gov/icons-menu.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " src="assets/images/theme/gov/icons-menu.svg"></ion-icon>
</button> </button>
</div> </div>
</div> </div>
@@ -58,7 +58,7 @@ ion-menu{
.event-type-Oficial{ .event-type-Oficial{
font-family: Roboto; font-family: Roboto;
border-radius: 20px; border-radius: 20px;
background: #ffb703; background: var(--label-bg-color);
float: right !important; float: right !important;
padding: 5px 13.5px 5px 13.5px; padding: 5px 13.5px 5px 13.5px;
color: #fff; color: #fff;
@@ -7,6 +7,7 @@
<div class="header-icon-left"> <div class="header-icon-left">
<button class="btn-no-color cursor-pointer" (click)="goBack()"> <button class="btn-no-color cursor-pointer" (click)="goBack()">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-arrow-arrow-left.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-arrow-arrow-left.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " src="assets/images/theme/doneIt/icons-calendar-arrow-left.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src='assets/images/theme/gov/icons-calendar-arrow-left.svg'></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src='assets/images/theme/gov/icons-calendar-arrow-left.svg'></ion-icon>
</button> </button>
</div> </div>
@@ -19,7 +20,7 @@
Calendário MDGPR Calendário MDGPR
</ion-segment-button> </ion-segment-button>
<ion-segment-button value="PR"> <ion-segment-button value="PR">
Presidente da República Calendário Partilhado
</ion-segment-button> </ion-segment-button>
</ion-segment> </ion-segment>
</ion-toolbar> </ion-toolbar>
@@ -279,6 +279,7 @@
<div class="add-people" > <div class="add-people" >
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="start" src="assets/images/theme/gov/icons-arrow-forward.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="start" src="assets/images/theme/gov/icons-arrow-forward.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " slot="start" src="assets/images/theme/{{ThemeService.currentTheme}}/icons-arrow-forward.svg"></ion-icon>
</div> </div>
</div> </div>
</div> </div>
@@ -301,6 +302,7 @@
<div class="add-people" (click)="addParticipantsCc()"> <div class="add-people" (click)="addParticipantsCc()">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="start" src="assets/images/theme/gov/icons-arrow-forward.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="start" src="assets/images/theme/gov/icons-arrow-forward.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " slot="start" src="assets/images/theme/{{ThemeService.currentTheme}}/icons-arrow-forward.svg"></ion-icon>
</div> </div>
</div> </div>
</div> </div>
@@ -322,6 +324,7 @@
<div class="attach-icon"> <div class="attach-icon">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-attach-doc.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-attach-doc.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/theme/gov/icons-attach-doc.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/theme/gov/icons-attach-doc.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " src="assets/images/theme/{{ThemeService.currentTheme}}/icons-attach-doc.svg"></ion-icon>
</div> </div>
<div class="attach-document"> <div class="attach-document">
<ion-label>Anexar Documentos</ion-label> <ion-label>Anexar Documentos</ion-label>
@@ -133,7 +133,7 @@ export class BookMeetingModalPage implements OnInit {
) { ) {
this.taskParticipants = []; this.taskParticipants = [];
this.loggeduser = authService.ValidatedUser; this.loggeduser = SessionStore.user;
this.task = this.navParams.get('task'); this.task = this.navParams.get('task');
this.postData = new Event(); this.postData = new Event();
@@ -145,6 +145,7 @@
<div class="add-people" > <div class="add-people" >
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="start" src="assets/images/theme/gov/icons-arrow-forward.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="start" src="assets/images/theme/gov/icons-arrow-forward.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " slot="start" src="assets/images/theme/{{ThemeService.currentTheme}}/icons-arrow-forward.svg"></ion-icon>
</div> </div>
</div> </div>
</div> </div>
@@ -167,6 +168,7 @@
<div class="add-people" > <div class="add-people" >
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="start" src="assets/images/theme/gov/icons-arrow-forward.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="start" src="assets/images/theme/gov/icons-arrow-forward.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " slot="start" src="assets/images/theme/{{ThemeService.currentTheme}}/icons-arrow-forward.svg"></ion-icon>
</div> </div>
</div> </div>
</div> </div>
@@ -177,6 +179,7 @@
<div class="attach-icon d-flex align-center"> <div class="attach-icon d-flex align-center">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-attach-doc.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-attach-doc.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/theme/gov/icons-attach-doc.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/theme/gov/icons-attach-doc.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " src="assets/images/theme/{{ThemeService.currentTheme}}/icons-attach-doc.svg"></ion-icon>
</div> </div>
<div class="attach-document pl-10"> <div class="attach-document pl-10">
<ion-label>Anexar Documentos</ion-label> <ion-label>Anexar Documentos</ion-label>
@@ -22,6 +22,7 @@ import { task } from 'src/app/models/ExpedientTaskModalPage';
import { DespachoService } from 'src/app/Rules/despacho.service'; import { DespachoService } from 'src/app/Rules/despacho.service';
import { SearchDocumentPipe } from 'src/app/pipes/search-document.pipe'; import { SearchDocumentPipe } from 'src/app/pipes/search-document.pipe';
import { ThemeService } from 'src/app/services/theme.service' import { ThemeService } from 'src/app/services/theme.service'
import { SessionStore } from 'src/app/store/session.service';
const CUSTOM_DATE_FORMATS: NgxMatDateFormats = { const CUSTOM_DATE_FORMATS: NgxMatDateFormats = {
@@ -111,7 +112,7 @@ export class ExpedientTaskModalPage implements OnInit {
public ThemeService: ThemeService public ThemeService: ThemeService
) { ) {
this.loggeduser = userAuth.ValidatedUser; this.loggeduser = SessionStore.user;
this.task = this.navParams.get('task'); this.task = this.navParams.get('task');
@@ -13,8 +13,8 @@
<div class="title-content width-100 d-flex justify-between"> <div class="title-content width-100 d-flex justify-between">
<div class="font-30 cursor-pointer" (click)="goBack()" defaultHref="#"> <div class="font-30 cursor-pointer" (click)="goBack()" defaultHref="#">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " src="assets/images/theme/doneIt/icons-calendar-arrow-left.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src='assets/images/theme/gov/icons-calendar-arrow-left.svg'></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src='assets/images/theme/gov/icons-calendar-arrow-left.svg'></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'tribunal' " slot="end" src='assets/images/theme/gov/icons-calendar-arrow-left.svg'></ion-icon>
</div> </div>
<div class="middle flex-grow-1"> <div class="middle flex-grow-1">
<ion-label class="title">{{ task.Folio}}</ion-label> <ion-label class="title">{{ task.Folio}}</ion-label>
@@ -23,7 +23,7 @@
<button class="btn-no-color" (click)="openOptions()"> <button class="btn-no-color" (click)="openOptions()">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-menu.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-menu.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/theme/gov/icons-menu.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/theme/gov/icons-menu.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'tribunal' " src="assets/images/theme/gov/icons-menu.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " src="assets/images/theme/gov/icons-menu.svg"></ion-icon>
</button> </button>
</div> </div>
</div> </div>
@@ -100,7 +100,7 @@ ion-button{
.label{ .label{
border-radius: 20px; border-radius: 20px;
//background: #ffb703; //background: var(--label-bg-color);
background: var(--label-bg-color); background: var(--label-bg-color);
float: right; float: right;
padding: 5px 13.5px 5px 13.5px; padding: 5px 13.5px 5px 13.5px;
@@ -3,7 +3,7 @@ import { ProcessesService } from 'src/app/services/processes.service';
import { AttachmentsService } from 'src/app/services/attachments.service'; import { AttachmentsService } from 'src/app/services/attachments.service';
import { EventsService } from 'src/app/services/events.service'; import { EventsService } from 'src/app/services/events.service';
import { InAppBrowser } from '@ionic-native/in-app-browser/ngx'; import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
import { ActivatedRoute, Router } from '@angular/router'; import { ActivatedRoute, NavigationExtras, Router } from '@angular/router';
import { Event } from '../../../../models/event.model'; import { Event } from '../../../../models/event.model';
import { ModalController, PopoverController } from '@ionic/angular'; import { ModalController, PopoverController } from '@ionic/angular';
import { ExpedientTaskModalPage } from '../expedient-task-modal/expedient-task-modal.page'; import { ExpedientTaskModalPage } from '../expedient-task-modal/expedient-task-modal.page';
@@ -34,6 +34,7 @@ import { RouteService } from 'src/app/services/route.service';
import { Storage } from '@ionic/storage'; import { Storage } from '@ionic/storage';
import { LoginUserRespose } from 'src/app/models/user.model'; import { LoginUserRespose } from 'src/app/models/user.model';
import { AuthService } from 'src/app/services/auth.service'; import { AuthService } from 'src/app/services/auth.service';
import { SessionStore } from 'src/app/store/session.service';
@Component({ @Component({
selector: 'app-expediente-detail', selector: 'app-expediente-detail',
@@ -88,7 +89,7 @@ export class ExpedienteDetailPage implements OnInit {
private storage: Storage, private storage: Storage,
private userAuth: AuthService, private userAuth: AuthService,
) { ) {
this.loggeduser = userAuth.ValidatedUser this.loggeduser = SessionStore.user
this.activatedRoute.paramMap.subscribe(params => { this.activatedRoute.paramMap.subscribe(params => {
if (params["params"].SerialNumber) { if (params["params"].SerialNumber) {
this.serialNumber = params["params"].SerialNumber; this.serialNumber = params["params"].SerialNumber;
@@ -656,17 +657,17 @@ export class ExpedienteDetailPage implements OnInit {
openNewGroupPage() { openNewGroupPage() {
if (window.innerWidth < 701) { if (window.innerWidth < 701) {
this.router.navigate(['/home/chat']);
this.newGroup(); this.newGroup();
} }
else { else {
// console.log(this.task)
// console.log(this.fulltask)
this.dataService.set("newGroup", true); this.dataService.set("newGroup", true);
this.dataService.set("task", this.task); this.dataService.set("task", this.task);
this.dataService.set("newGroupName", this.task.Folio); this.dataService.set("newGroupName", this.task.Folio);
this.dataService.set("documents", this.fulltask.Documents); this.dataService.set("documents", this.fulltask.Documents);
this.dataService.set("link", window.location.pathname);
setTimeout(()=> {
this.router.navigate(['/home/chat']); this.router.navigate(['/home/chat']);
}, 100)
} }
} }
@@ -8,6 +8,7 @@
<div class="header-icon-left"> <div class="header-icon-left">
<button class="btn-no-color cursor-pointer" (click)="goBack()"> <button class="btn-no-color cursor-pointer" (click)="goBack()">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-arrow-arrow-left.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-arrow-arrow-left.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " src="assets/images/theme/doneIt/icons-calendar-arrow-left.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src='assets/images/theme/gov/icons-calendar-arrow-left.svg'></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src='assets/images/theme/gov/icons-calendar-arrow-left.svg'></ion-icon>
</button> </button>
</div> </div>
@@ -169,11 +169,15 @@ ion-item{
.label { .label {
border-radius: 15px; border-radius: 15px;
background: #ffb703; background: var(--label-bg-color);
/* font-size: 12px; */ /*font-size: 12px;
float: right; */float: right;
padding: 2.5px 13.5px 2.5px 13.5px; padding: 2.5px 13.5px 2.5px 13.5px;
color: #fff; color: #fff;
-webkit-border-radius: 15px;
-moz-border-radius: 15px;
-ms-border-radius: 15px;
-o-border-radius: 15px;
} }
} }
.exp-date{ .exp-date{
@@ -13,6 +13,7 @@
<div class="title-content width-100 d-flex justify-between"> <div class="title-content width-100 d-flex justify-between">
<div class="font-30 cursor-pointer" (click)="goBack()" defaultHref="#"> <div class="font-30 cursor-pointer" (click)="goBack()" defaultHref="#">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " src="assets/images/theme/doneIt/icons-calendar-arrow-left.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src='assets/images/theme/gov/icons-calendar-arrow-left.svg'></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src='assets/images/theme/gov/icons-calendar-arrow-left.svg'></ion-icon>
</div> </div>
<div class="middle flex-grow-1"> <div class="middle flex-grow-1">
@@ -100,7 +100,7 @@ ion-button{
.label{ .label{
border-radius: 20px; border-radius: 20px;
background: #ffb703; background: var(--label-bg-color);
float: right; float: right;
padding: 5px 13.5px 5px 13.5px; padding: 5px 13.5px 5px 13.5px;
color: #fff; color: #fff;
@@ -21,6 +21,7 @@ import { AttachmentList } from 'src/app/models/Excludetask';
import { ViewDocumentPage } from 'src/app/modals/view-document/view-document.page'; import { ViewDocumentPage } from 'src/app/modals/view-document/view-document.page';
import { ThemeService } from 'src/app/services/theme.service' import { ThemeService } from 'src/app/services/theme.service'
import { RouteService } from 'src/app/services/route.service'; import { RouteService } from 'src/app/services/route.service';
import { SessionStore } from 'src/app/store/session.service';
@Component({ @Component({
selector: 'app-expediente-pr', selector: 'app-expediente-pr',
@@ -62,7 +63,7 @@ export class ExpedientePrPage implements OnInit {
public ThemeService: ThemeService public ThemeService: ThemeService
) { ) {
this.loggeduser = userAuth.ValidatedUser; this.loggeduser = SessionStore.user;
this.activatedRoute.paramMap.subscribe(params => { this.activatedRoute.paramMap.subscribe(params => {
if(params["params"].SerialNumber) { if(params["params"].SerialNumber) {
this.serialnumber = params["params"].SerialNumber; this.serialnumber = params["params"].SerialNumber;

Some files were not shown because too many files have changed in this diff Show More