remove unused imports

This commit is contained in:
Peter Maquiran
2022-10-12 17:01:09 +01:00
parent de16765d97
commit 959bb53b82
59 changed files with 116 additions and 277 deletions
+2 -2
View File
@@ -1,9 +1,9 @@
<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 *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>
+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 { UserSession } from '../models/user.model';
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 = "";
public user: UserSession;
permissionList = new PermissionList();
loggeduser: LoginUserRespose;
SessionStore = SessionStore
constructor(
private router: Router,
@@ -89,11 +87,9 @@ export class HomePage implements OnInit {
private eventservice: EventsService,
private processservice: ProcessesService,
public RouteService: RouteService,
private authService: AuthService,
private NativeNotificationService: NativeNotificationService,
private sqliteservice: SqliteService,
) {
this.loggeduser = authService.ValidatedUser;
if (SessionStore.exist) {
this.user = SessionStore.user;
}
@@ -1,10 +1,9 @@
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 { EventPerson } from 'src/app/models/eventperson.model';
import { Participant } from 'src/app/models/participant.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 { 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';
@@ -21,6 +20,7 @@ import { DespachoService } from 'src/app/Rules/despacho.service';
import { PedidoService } from 'src/app/Rules/pedido.service'
import { fullTask } from 'src/app/models/dailyworktask.model';
import { ThemeService } from 'src/app/services/theme.service'
import { SessionStore } from 'src/app/store/session.service';
const CUSTOM_DATE_FORMATS: NgxMatDateFormats = {
@@ -93,16 +93,13 @@ export class CreateProcessPage implements OnInit {
private modalController: ModalController,
private processes:ProcessesService,
private navParams: NavParams,
private authService: AuthService,
private userAuth: AuthService,
private animationController: AnimationController,
private toastService: ToastService,
public p: PermissionService,
private despachoService: DespachoService,
private pedidoService: PedidoService,
public ThemeService: ThemeService
) {
this.loggeduser = userAuth.ValidatedUser;
this.loggeduser = SessionStore.user;
this.task = this.navParams.get('task');
if (this.task.SerialNumber) {
@@ -18,6 +18,7 @@ import { EventsService } from 'src/app/services/events.service';
import { EventService } from 'src/app/services/rules/event.service';
import { EventPipe } from 'src/app/pipes/event.pipe';
import { ThemeService } from 'src/app/services/theme.service'
import { SessionStore } from 'src/app/store/session.service';
const CUSTOM_DATE_FORMATS: NgxMatDateFormats = {
@@ -105,7 +106,7 @@ export class DocumentSetUpMeetingPage implements OnInit {
public ThemeService: ThemeService,
public _eventService: EventsService,
) {
this.loggeduser = authService.ValidatedUser;
this.loggeduser = SessionStore.user;
this.document = this.navParams.get('document')
this.subject = this.navParams.get('subject')
+2 -3
View File
@@ -1,5 +1,5 @@
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 { LoginUserRespose } from 'src/app/models/user.model';
import { AuthService } from 'src/app/services/auth.service';
@@ -10,7 +10,6 @@ import { NotificationsService } from '../../services/notifications.service';
import { SessionStore } from 'src/app/store/session.service';
import { EventTrigger } from '../../services/eventTrigger.service';
import { ThemeService } from 'src/app/services/theme.service'
import { SortService } from 'src/app/services/functions/sort.service';
@Component({
selector: 'app-profile',
@@ -47,7 +46,7 @@ export class ProfilePage implements OnInit {
public ThemeService: ThemeService,
) {
this.loggeduser = authService.ValidatedUser;
this.loggeduser = SessionStore.user;
router.events.subscribe((val) => {
this.isProfileOpen = false
});
@@ -1,8 +1,6 @@
import { HttpClient } from '@angular/common/http';
import { Component, OnInit } from '@angular/core';
import { ModalController, NavParams } from '@ionic/angular';
import { AuthService } from 'src/app/services/auth.service';
import { ChatService } from 'src/app/services/chat.service';
import { ChatSystemService } from 'src/app/services/chat/chat-system.service';
import { ThemeService } from 'src/app/services/theme.service'
import { ToastService } from 'src/app/services/toast.service';
@@ -20,9 +18,6 @@ export class SetRoomOwnerPage implements OnInit {
constructor(
private modalController: ModalController,
private http: HttpClient,
private chatService: ChatService,
private authService: AuthService,
private navParams: NavParams,
public ThemeService: ThemeService,
private toastService: ToastService,
+9 -9
View File
@@ -21,7 +21,7 @@
<div>
<!-- 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 ">
<ion-row class="ion-justify-content-between calendar-tool-tip">
@@ -103,7 +103,7 @@
</ion-row>
<ion-row class="ion-align-items-center">
<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="calendar-letters cal-reverse" *ngIf="SessionStore.user.Profile != 'PR' && SessionStore.user.Profile != 'MDGPR' && eventService.calendarIds.length >= 2" class="calendar-letters" [class.cal-reverse]="SessionStore.user.Profile != 'PR' && SessionStore.user.Profile != 'MDGPR' && profile == 'mdgpr' " (click)="changeProfile()">
<div class="text" *ngIf="profile == 'mdgpr'">
MC
</div>
@@ -114,11 +114,11 @@
</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>
</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>
</button>
@@ -226,13 +226,13 @@
</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" *ngIf="SessionStore.user.Profile == 'MDGPR'">
<div class="calendar-title-description flex-grow-1 text-grey d-flex justify-center align-center">
<div *ngIf="loggeduser.Profile == 'PR' || loggeduser.Profile == 'MDGPR'">Meu Calendário</div>
<div *ngIf="SessionStore.user.Profile == 'PR' || SessionStore.user.Profile == 'MDGPR'">Meu Calendário</div>
</div>
<div class="calendar-title-description text-black 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 Partilhado</div>
<div *ngIf="SessionStore.user.Profile == 'PR' || SessionStore.user.Profile == 'MDGPR'">Calendário Partilhado</div>
</div>
</div>
</div>
@@ -291,7 +291,7 @@
</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 class="EventListBox-container" >
@@ -332,7 +332,7 @@
</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 class="EventListBox-container" >
+4 -10
View File
@@ -1,15 +1,14 @@
import { Component, OnInit, ViewChild, Inject, LOCALE_ID } from '@angular/core';
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 { Event } from '../../models/event.model';
import { Router, NavigationEnd, NavigationExtras } from '@angular/router';
import { momentG } from 'src/plugin/momentG';
import { DomSanitizer } from "@angular/platform-browser";
import { EventPerson } from 'src/app/models/eventperson.model';
import { removeDuplicate } from 'src/plugin/removeDuplicate.js';
import { Storage } from '@ionic/storage';
import { environment } from 'src/environments/environment';
// showTimeline
import { setHours, setMinutes } from 'date-fns';
@@ -21,7 +20,6 @@ import {
} from 'angular-calendar';
import { CustomDateFormatter } from './custom-date-formatter.provider';
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 { DateAdapter } from '@angular/material/core';
import { ToastService } from 'src/app/services/toast.service';
@@ -36,7 +34,6 @@ import { ThemeService } from 'src/app/services/theme.service'
import { SessionStore } from 'src/app/store/session.service';
import { PermissionService } from 'src/app/services/permission.service';
@Component({
selector: 'app-agenda',
templateUrl: './agenda.page.html',
@@ -167,17 +164,14 @@ export class AgendaPage implements OnInit {
listToPresent
array = []
sessionStore = SessionStore;
SessionStore = SessionStore;
environment
constructor(
private alertCtrl: AlertController,
@Inject(LOCALE_ID) private locale: string,
private modalCtrl: ModalController,
public eventService: EventsService,
private router: Router,
private sanitizer: DomSanitizer,
authService: AuthService,
private dateAdapter: DateAdapter<any>,
private toastService: ToastService,
private listBoxService: ListBoxService,
@@ -193,7 +187,7 @@ export class AgendaPage implements OnInit {
this.dateAdapter.setLocale('es');
this.locale = 'pt'
this.loggeduser = authService.ValidatedUser;
this.loggeduser = SessionStore.user;
this.changeProfileService.registerCallback(() => {
this.tigerUpdate()
@@ -17,6 +17,7 @@ import { FormControl, FormGroup, Validators } from '@angular/forms';
import { ThemeService } from 'src/app/services/theme.service';
import { NgxMatDateFormats } 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 = {
parse: {
@@ -91,10 +92,9 @@ export class NewEventPage implements OnInit {
public eventService: EventsService,
private attachmentsService: AttachmentsService,
private toastService: ToastService,
userService: AuthService,
public ThemeService: ThemeService
) {
this.loggeduser = userService.ValidatedUser;
this.loggeduser = SessionStore.user;
this.postEvent = new Event();
this.postEvent.EventRecurrence = {Type:'-1'};
this.eventBody = { BodyType : "1", Text : ""};
+1 -1
View File
@@ -115,7 +115,7 @@ export class ChatPage implements OnInit {
public ChatSystemService: ChatSystemService,
) {
this.loggedUserChat = authService.ValidatedUserChat['data'];
this.loggedUserChat = SessionStore.user.ChatData['data'];
this.headers = new HttpHeaders();
window.onresize = (event) => {
if (window.innerWidth > 701) {
@@ -16,7 +16,6 @@ import { ChatSystemService } from 'src/app/services/chat/chat-system.service';
})
export class GroupContactsPage implements OnInit {
showLoader: boolean;
loggedUser: any;
users = [];
contact: string[] = [" Ana M.", "Andre F.", "Bruno G.", "Catarina T", "Tiago"];
@@ -44,7 +43,6 @@ export class GroupContactsPage implements OnInit {
public ChatSystemService: ChatSystemService,
)
{
this.loggedUser = authService.ValidatedUserChat['data'];
this.textSearch="";
this.dm=null;
@@ -90,7 +90,6 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
public popoverController: PopoverController,
private chatService: ChatService,
private navParams: NavParams,
private authService: AuthService,
private alertService: AlertService,
private route: Router,
private timeService: TimeService,
@@ -107,7 +106,7 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
private file: File,
private fileOpener: FileOpener,
) {
this.loggedUserChat = authService.ValidatedUserChat['data'];
this.loggedUserChat = SessionStore.user.ChatData['data'];
this.isGroupCreated = true;
this.roomId = this.navParams.get('roomId');
window.onresize = (event) => {
@@ -33,7 +33,7 @@ export class ContactsPage implements OnInit {
public ChatSystemService: ChatSystemService,
)
{
this.loggedUser = authService.ValidatedUserChat['data'];
this.loggedUser = SessionStore.user.ChatData['data'];
this.textSearch="";
this.dm=null;
+1 -12
View File
@@ -111,34 +111,23 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
public popoverController: PopoverController,
private modalController: ModalController,
private navParams: NavParams,
private chatService: ChatService,
private authService: AuthService,
private alertService: AlertService,
private toastService: ToastService,
private route: Router,
private activatedRoute: ActivatedRoute,
private fileService: FileService,
private gestureController: GestureController,
private processes: ProcessesService,
public ThemeService: ThemeService,
private changeDetectorRef: ChangeDetectorRef,
private platform: Platform,
private sqlservice: SqliteService,
public ChatSystemService: ChatSystemService,
private AttachmentsService: AttachmentsService,
private CameraService: CameraService,
private processesService: ProcessesService,
private storage: Storage,
private fileToBase64Service: FileToBase64Service,
private sant: DomSanitizer,
//private fileOpener: FileOpener,
private sanitiser: DomSanitizer,
private alertController: AlertController,
// private document: DocumentViewer
private file: File,
private fileOpener: FileOpener,
) {
this.loggedUser = authService.ValidatedUserChat['data'];
this.loggedUser = SessionStore.user.ChatData['data'];
this.roomId = this.navParams.get('roomId');
@@ -56,15 +56,7 @@ export class ContactsPage implements OnInit {
private http: HttpClient,
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() {
this.loadUsers();
@@ -72,23 +64,7 @@ export class ContactsPage implements OnInit {
}
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) => {
if(a.first < b.first){
return -1;
@@ -101,17 +77,7 @@ export class ContactsPage implements OnInit {
}
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){
return record.first[0];
}
@@ -31,12 +31,9 @@ export class NewGroupPage implements OnInit {
private modalController: ModalController,
private navParams: NavParams,
public ThemeService: ThemeService,
private chatService: ChatService,
private processesService: ProcessesService,
public ChatSystemService: ChatSystemService,
private authService: AuthService,
) {
this.loggedUserChat = authService.ValidatedUserChat['data'];
this.loggedUserChat = SessionStore.user.ChatData['data'];
this.isGroupCreated = false;
this.groupName = this.navParams.get('name');
this.documents = this.navParams.get('documents');
+3 -2
View File
@@ -26,6 +26,7 @@ import { PermissionList } from 'src/app/models/permission/permissionList';
import { PermissionService } from 'src/app/services/permission.service';
import { ViewEventPage } from 'src/app/modals/view-event/view-event.page';
import { ChangeProfileService } from 'src/app/services/change-profile.service';
import { SessionStore } from 'src/app/store/session.service';
@Component({
selector: 'app-events',
templateUrl: './events.page.html',
@@ -94,7 +95,7 @@ export class EventsPage implements OnInit {
private changeProfileService: ChangeProfileService,
) {
this.loggeduser = authService.ValidatedUser;
this.loggeduser = SessionStore.user;
this.platform.resize.subscribe(async () => {
@@ -415,7 +416,7 @@ export class EventsPage implements OnInit {
}
logout() {
this.authService.ValidatedUser.BasicAuthKey = "";
SessionStore.user.BasicAuthKey = "";
this.router.navigate(['/home/login']);
}
@@ -65,7 +65,7 @@ export class DespachosPrPage implements OnInit {
public ThemeService: ThemeService
) {
this.loggeduser = authService.ValidatedUser;
this.loggeduser = SessionStore.user;
this.profile = 'mdgpr';
}
@@ -133,7 +133,7 @@ export class BookMeetingModalPage implements OnInit {
) {
this.taskParticipants = [];
this.loggeduser = authService.ValidatedUser;
this.loggeduser = SessionStore.user;
this.task = this.navParams.get('task');
this.postData = new Event();
@@ -22,6 +22,7 @@ import { task } from 'src/app/models/ExpedientTaskModalPage';
import { DespachoService } from 'src/app/Rules/despacho.service';
import { SearchDocumentPipe } from 'src/app/pipes/search-document.pipe';
import { ThemeService } from 'src/app/services/theme.service'
import { SessionStore } from 'src/app/store/session.service';
const CUSTOM_DATE_FORMATS: NgxMatDateFormats = {
@@ -111,7 +112,7 @@ export class ExpedientTaskModalPage implements OnInit {
public ThemeService: ThemeService
) {
this.loggeduser = userAuth.ValidatedUser;
this.loggeduser = SessionStore.user;
this.task = this.navParams.get('task');
@@ -34,6 +34,7 @@ import { RouteService } from 'src/app/services/route.service';
import { Storage } from '@ionic/storage';
import { LoginUserRespose } from 'src/app/models/user.model';
import { AuthService } from 'src/app/services/auth.service';
import { SessionStore } from 'src/app/store/session.service';
@Component({
selector: 'app-expediente-detail',
@@ -88,7 +89,7 @@ export class ExpedienteDetailPage implements OnInit {
private storage: Storage,
private userAuth: AuthService,
) {
this.loggeduser = userAuth.ValidatedUser
this.loggeduser = SessionStore.user
this.activatedRoute.paramMap.subscribe(params => {
if (params["params"].SerialNumber) {
this.serialNumber = params["params"].SerialNumber;
@@ -21,6 +21,7 @@ import { AttachmentList } from 'src/app/models/Excludetask';
import { ViewDocumentPage } from 'src/app/modals/view-document/view-document.page';
import { ThemeService } from 'src/app/services/theme.service'
import { RouteService } from 'src/app/services/route.service';
import { SessionStore } from 'src/app/store/session.service';
@Component({
selector: 'app-expediente-pr',
@@ -62,7 +63,7 @@ export class ExpedientePrPage implements OnInit {
public ThemeService: ThemeService
) {
this.loggeduser = userAuth.ValidatedUser;
this.loggeduser = SessionStore.user;
this.activatedRoute.paramMap.subscribe(params => {
if(params["params"].SerialNumber) {
this.serialnumber = params["params"].SerialNumber;
@@ -12,6 +12,7 @@ import { ExpedienteTaskPipe } from 'src/app/pipes/expediente-task.pipe';
import { ThemeService } from 'src/app/services/theme.service'
import { SortService } from 'src/app/services/functions/sort.service';
import { RouteService } from 'src/app/services/route.service';
import { SessionStore } from 'src/app/store/session.service';
@Component({
selector: 'app-expedientes-pr',
@@ -43,7 +44,7 @@ export class ExpedientesPrPage implements OnInit {
public ThemeService: ThemeService,
private sortService: SortService,
) {
this.loggeduser = authService.ValidatedUser;
this.loggeduser = SessionStore.user;
}
@@ -149,7 +149,7 @@ export class GabineteDigitalPage implements OnInit {
public p: PermissionService
) {
this.loggeduser = authService.ValidatedUser;
this.loggeduser = SessionStore.user;
window.onresize = (event) => {
// if not mobile remove all component
if (window.innerWidth < 701) {
@@ -28,6 +28,7 @@ import { ThemeService } from 'src/app/services/theme.service'
import { DataService } from 'src/app/services/data.service';
import { NewGroupPage } from 'src/app/pages/chat/new-group/new-group.page';
import { RouteService } from 'src/app/services/route.service';
import { SessionStore } from 'src/app/store/session.service';
@Component({
selector: 'app-pedido',
@@ -68,7 +69,7 @@ export class PedidoPage implements OnInit {
public ThemeService: ThemeService,
private dataService: DataService,
) {
this.loggeduser = authService.ValidatedUser;
this.loggeduser = SessionStore.user;
this.activatedRoute.paramMap.subscribe(params => {
//
@@ -15,6 +15,7 @@ import { BackgroundService } from 'src/app/services/background.service';
import { Platform } from '@ionic/angular';
import { SortService } from 'src/app/services/functions/sort.service';
import { Storage } from '@ionic/storage';
import { SessionStore } from 'src/app/store/session.service';
@Component({
@@ -50,7 +51,7 @@ export class PendentesPage implements OnInit {
private sortService: SortService,
private storage: Storage
) {
this.loggeduser = authService.ValidatedUser;
this.loggeduser = SessionStore.user;
this.profile = 'mdgpr';
}
+2 -14
View File
@@ -28,9 +28,7 @@ export class AuthService {
userData$ = new BehaviorSubject<any>('');
userId$ = new BehaviorSubject<any>('');
headers: HttpHeaders;
public ValidatedUser: UserSession;
public wsValidatedUserChat:any;
public ValidatedUserChat:any = {}
public isWsAuthenticated: boolean = false;
opts:any;
@@ -54,17 +52,11 @@ export class AuthService {
this.headers = new HttpHeaders();
if (SessionStore.exist) {
this.ValidatedUser = SessionStore.user
if(this.p.userPermission(this.p.permissionList.Chat.access) == true ) {
this.loginToChatWs()
}
}
if(SessionStore?.user?.ChatData) {
this.ValidatedUserChat = SessionStore.user.ChatData
}
}
@@ -110,7 +102,6 @@ export class AuthService {
session.BasicAuthKey = user.BasicAuthKey
SessionStore.reset(session)
this.ValidatedUser = SessionStore.user;
this.storageService.store(AuthConnstants.USER, response);
@@ -120,11 +111,9 @@ export class AuthService {
this.initialsService.getInitials(session.FullName);
}
async loginChat(responseChat = this.ValidatedUserChat) {
async loginChat(responseChat?) {
if(SessionStore?.user?.ChatData) {
this.ValidatedUserChat = SessionStore.user.ChatData
}
}
async autoLoginChat(expirationDate:number) {
@@ -234,7 +223,6 @@ export class AuthService {
logout() {
this.ValidatedUser = null;
localStorage.removeItem('userChat');
SessionStore.setInativity(false)
+2 -1
View File
@@ -5,6 +5,7 @@ import { Observable } from 'rxjs';
import { environment } from 'src/environments/environment';
import { AuthService } from '../services/auth.service';
import { LoginUserRespose } from '../models/user.model';
import { SessionStore } from '../store/session.service';
@Injectable({
providedIn: 'root'
@@ -16,7 +17,7 @@ export class ContactsService {
headers: HttpHeaders;
constructor(private http: HttpClient, user: AuthService) {
this.loggeduser = user.ValidatedUser;
this.loggeduser = SessionStore.user;
this.headers = new HttpHeaders();
this.headers = this.headers.set('Authorization', this.loggeduser.BasicAuthKey);
}
+3 -2
View File
@@ -11,6 +11,7 @@ import { OfflineManagerService } from 'src/app/services/offline-manager.service'
import { catchError } from "rxjs/operators";
import { Storage } from '@ionic/storage';
import { BackgroundService } from 'src/app/services/background.service';
import { SessionStore } from '../store/session.service';
@Injectable({
@@ -71,7 +72,7 @@ export class EventsService {
private storage: Storage,
private backgroundservice: BackgroundService) {
this.loggeduser = this.user.ValidatedUser;
this.loggeduser = SessionStore.user;
this.headers = new HttpHeaders();
this.headersMdOficial = new HttpHeaders();
@@ -93,7 +94,7 @@ export class EventsService {
this.setHeader()
this.changeProfileService.registerCallback(() => {
this.loggeduser = this.user.ValidatedUser;
this.loggeduser = SessionStore.user;
this.setHeader()
})
+5 -7
View File
@@ -1,11 +1,9 @@
import { Component, OnInit, LOCALE_ID, EventEmitter, Output, Renderer2, ElementRef } 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 { NavigationExtras, Router } from '@angular/router';
import { ActivatedRoute, NavigationEnd } from '@angular/router';
import { AuthService } from 'src/app/services/auth.service';
import { StorageService } from 'src/app/services/storage.service';
import { ModalController, Platform } from '@ionic/angular';
import { EventDetailPage } from './event-detail/event-detail.page';
import { ProcessesService } from '../../services/processes.service';
@@ -15,6 +13,7 @@ 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 { ExpedienteGdStore } from 'src/app/store/expedientegd-store.service';
import { SessionStore } from 'src/app/store/session.service';
@Component({
selector: 'app-events',
@@ -75,9 +74,7 @@ export class EventsPage implements OnInit {
constructor(
private eventService: EventsService,
private router: Router,
private storageService:StorageService,
public activatedRoute: ActivatedRoute,
private authService: AuthService,
private processes:ProcessesService,
/* private gabineteService: GabineteDigitalPage, */
private modalController:ModalController,
@@ -87,7 +84,7 @@ export class EventsPage implements OnInit {
this.existingScreenOrientation = this.screenOrientation.type;
this.loggeduser = authService.ValidatedUser;
this.loggeduser = SessionStore.user;
this.prEventList = null;
@@ -309,7 +306,8 @@ export class EventsPage implements OnInit {
logout()
{
this.authService.ValidatedUser.BasicAuthKey = "";
SessionStore.user.BasicAuthKey = ""
this.router.navigate(['/home/login']);
}
+2 -1
View File
@@ -6,6 +6,7 @@ import { environment } from 'src/environments/environment';
import { AuthService } from '../services/auth.service';
import { LoginUserRespose } from '../models/user.model';
import { OrganicEntity } from 'src/app/models/organic-entity.model';
import { SessionStore } from '../store/session.service';
@Injectable({
providedIn: 'root'
@@ -17,7 +18,7 @@ export class OrganicEntityService {
headers: HttpHeaders;
constructor(private http: HttpClient, user: AuthService) {
this.loggeduser = user.ValidatedUser;
this.loggeduser = SessionStore.user;
this.headers = new HttpHeaders();
this.headers = this.headers.set('Authorization', this.loggeduser.BasicAuthKey);
}
+2 -1
View File
@@ -8,6 +8,7 @@ import { catchError } from 'rxjs/operators'
import { Publication } from '../models/publication';
import { getUrl } from 'ionicons/dist/types/components/icon/utils';
import { ActivatedRoute, Router } from '@angular/router';
import { SessionStore } from '../store/session.service';
@Injectable({
providedIn: 'root'
@@ -23,7 +24,7 @@ export class PublicationsService {
constructor(private http: HttpClient, user: AuthService,
private activatedRoute: ActivatedRoute,
private router: Router) {
this.loggeduser = user.ValidatedUser;
this.loggeduser = SessionStore.user;
this.headers = new HttpHeaders();
this.headers = this.headers.set('Authorization', this.loggeduser.BasicAuthKey);
+2 -1
View File
@@ -7,6 +7,7 @@ import { AuthService } from '../services/auth.service';
import { LoginUserRespose } from '../models/user.model';
import { EventSearch } from "src/app/models/event-search";
import { TopSearch } from 'src/app/models/top-search';
import { SessionStore } from '../store/session.service';
@Injectable({
providedIn: 'root'
@@ -21,7 +22,7 @@ export class SearchService {
// setup
constructor(private http: HttpClient, user: AuthService) {
this.loggeduser = user.ValidatedUser;
this.loggeduser = SessionStore.user;
this.headers = new HttpHeaders();
this.headers = this.headers.set('Authorization', this.loggeduser.BasicAuthKey);
}
@@ -131,7 +131,6 @@ export class EditEventToApprovePage implements OnInit {
private processes:ProcessesService,
private toastService: ToastService,
public ThemeService: ThemeService,
private router: Router,
) {
this.isEventEdited = false;
}
@@ -3,9 +3,9 @@ import { EventBody } from 'src/app/models/eventbody.model';
import { EventPerson } from 'src/app/models/eventperson.model';
import { ProcessesService } from 'src/app/services/processes.service';
import { NavigationEnd, Router } from '@angular/router';
import { AuthService } from 'src/app/services/auth.service';
import { LoginUserRespose } from 'src/app/models/user.model';
import { SortService } from 'src/app/services/functions/sort.service';
import { SessionStore } from 'src/app/store/session.service';
@Component({
selector: 'app-event-list',
@@ -34,10 +34,9 @@ export class EventListPage implements OnInit {
constructor(
private processes:ProcessesService,
private router: Router,
private userAuth: AuthService,
private sortService: SortService,
) {
this.loggeduser = userAuth.ValidatedUser;
this.loggeduser = SessionStore.user;
}
ngOnInit() {
@@ -12,7 +12,6 @@ import { EventAttachment } from 'src/app/models/attachment.model';
import { ToastService } from 'src/app/services/toast.service';
import { LoginUserRespose } from 'src/app/models/user.model';
import { AuthService } from 'src/app/services/auth.service';
import {DateAdapter} from '@angular/material/core';
import * as _moment from 'moment';
@@ -26,6 +25,7 @@ import { FormGroup, Validators } from '@angular/forms';
import { NGX_MAT_DATE_FORMATS } from '@angular-material-components/datetime-picker';
import { ThemeService } from 'src/app/services/theme.service'
import { ChatMethodsService } from 'src/app/services/chat/chat-methods.service';
import { SessionStore } from 'src/app/store/session.service';
const CUSTOM_DATE_FORMATS: NgxMatDateFormats = {
parse: {
@@ -124,14 +124,13 @@ export class NewEventPage implements OnInit {
public eventService: EventsService,
private attachmentsService: AttachmentsService,
private toastService: ToastService,
private userService: AuthService,
private dateAdapter: DateAdapter<any>,
public ThemeService: ThemeService,
private chatMethodService: ChatMethodsService,
// private translate: TranslateService
) {
this.dateAdapter.setLocale('pt');
this.loggeduser = userService.ValidatedUser;
this.loggeduser = SessionStore.user;
this.postEvent = new Event();
}
@@ -12,8 +12,7 @@ import { ExpedientTaskModalPageNavParamsTask } from 'src/app/models/ExpedientTas
import { DocumentSetUpMeetingPage } from 'src/app/modals/document-set-up-meeting/document-set-up-meeting.page';
import { ExpedientTaskModalPage } from 'src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page';
import { ViewDocumentPage } from 'src/app/modals/view-document/view-document.page';
import { ThemeService } from 'src/app/services/theme.service'
import { CalendarService } from 'src/app/store/calendar.service';
import { ThemeService } from 'src/app/services/theme.service';
import { SessionStore } from 'src/app/store/session.service';
@@ -59,7 +58,6 @@ export class ViewEventPage implements OnInit {
public popoverController: PopoverController,
private toastService: ToastService,
public ThemeService: ThemeService,
private CalendarService: CalendarService
) {
this.isEventEdited = false;
this.loadedEvent = new Event();
@@ -1,9 +1,9 @@
import { HttpErrorResponse } from '@angular/common/http';
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { ModalController, PickerController } from '@ionic/angular';
import { AuthService } from 'src/app/services/auth.service';
import { ChatService } from 'src/app/services/chat.service';
import { ThemeService } from 'src/app/services/theme.service'
import { SessionStore } from 'src/app/store/session.service';
@Component({
selector: 'app-edit-group',
@@ -27,10 +27,9 @@ export class EditGroupPage implements OnInit {
private modalController: ModalController,
private pickerController: PickerController,
private chatService: ChatService,
private authService: AuthService,
public ThemeService: ThemeService
) {
this.loggedUser = authService.ValidatedUserChat['data'];
this.loggedUser = SessionStore.user.ChatData['data'];
}
ngOnInit() {
@@ -1,8 +1,7 @@
import { HttpClient, HttpErrorResponse, HttpHeaders } from '@angular/common/http';
import { HttpHeaders } from '@angular/common/http';
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { ModalController, NavParams } from '@ionic/angular';
import { ModalController } from '@ionic/angular';
import * as _ from 'lodash';
import { AuthService } from 'src/app/services/auth.service';
import { ChatService } from 'src/app/services/chat.service';
import { NewGroupPage } from '../../new-group/new-group.page';
import { GroupMessagesPage } from '../group-messages.page';
@@ -22,7 +21,6 @@ export class GroupContactsPage implements OnInit {
contact: string[] = [" Ana M.", "Andre F.", "Bruno G.", "Catarina T", "Tiago"];
headers: HttpHeaders;
options:any;
listContacts: any[];
contacts: any;
@@ -40,14 +38,12 @@ export class GroupContactsPage implements OnInit {
constructor(
private modalController: ModalController,
private http: HttpClient,
private chatService: ChatService,
private authService: AuthService,
public ThemeService: ThemeService,
public ChatSystemService: ChatSystemService
)
{
this.loggedUser = authService.ValidatedUserChat['data'];
this.loggedUser = SessionStore.user.ChatData['data'];
this.textSearch="";
this.dm=null;
this.room=null;
@@ -144,10 +140,8 @@ export class GroupContactsPage implements OnInit {
this.showLoader = false;
}
loadUsers1(members:any){
this.options = {
headers: this.headers,
};
loadUsers1(members:any) {
this.chatService.getAllUsers().subscribe((res:any)=>{
@@ -175,9 +169,7 @@ export class GroupContactsPage implements OnInit {
}
loadUsers(){
this.options = {
headers: this.headers,
};
this.chatService.getAllUsers().subscribe((res:any)=>{
@@ -273,24 +265,6 @@ export class GroupContactsPage implements OnInit {
});
}
/* createGroup(){
if(!this.isGroupCreated){
let body = { "name":this.groupName, }
this.chatService.addGroup(body).subscribe(res=>{
this.addContacts(res['group']);
this.openGroupMessages(res['group']);
});
}
else{
this.addContacts(this.room);
this.close();
}
} */
async newGroup(){
this.close();
@@ -1,19 +1,16 @@
import { Component, OnChanges, OnInit, Input, SimpleChanges, ChangeDetectorRef, Output, EventEmitter, ViewChild, ElementRef, AfterViewInit, OnDestroy, ComponentFactoryResolver } from '@angular/core';
import { Component, OnChanges, OnInit, Input, SimpleChanges, Output, EventEmitter, ViewChild, ElementRef, AfterViewInit, OnDestroy } from '@angular/core';
import { AnimationController, ModalController, PopoverController, Platform } from '@ionic/angular';
import { AlertService } from 'src/app/services/alert.service';
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 { ChatPopoverPage } from 'src/app/shared/popover/chat-popover/chat-popover.page';
import { GroupContactsPage } from './group-contacts/group-contacts.page';
import { Router } from '@angular/router'
import { ChatOptionsPopoverPage } from '../../popover/chat-options-popover/chat-options-popover.page';
import { ChatOptionsFeaturesPage } from 'src/app/modals/chat-options-features/chat-options-features.page';
import { TimeService } from 'src/app/services/functions/time.service';
import { FileLoaderService } from 'src/app/services/file/file-loader.service';
import { FileToBase64Service } from 'src/app/services/file/file-to-base64.service';
// import { FileToBase64Service } from 'src/app/services/file/file-to-base64.service';
import { SearchPage } from 'src/app/pages/search/search.page';
import { SearchList } from 'src/app/models/search-document';
import { ProcessesService } from 'src/app/services/processes.service';
import { FileService } from 'src/app/services/functions/file.service';
import { ViewDocumentPage } from 'src/app/modals/view-document/view-document.page';
import { ThemeService } from 'src/app/services/theme.service'
@@ -21,7 +18,6 @@ import { ViewEventPage } from 'src/app/modals/view-event/view-event.page';
import { Storage } from '@ionic/storage';
import { ChatSystemService } from 'src/app/services/chat/chat-system.service';
import { MessageService } from 'src/app/services/chat/message.service';
import { AttachmentsService } from 'src/app/services/attachments.service';
import { CameraService } from 'src/app/services/camera.service';
import { FileType } from 'src/app/models/fileType';
@@ -30,22 +26,12 @@ import { Camera, CameraResultType, CameraSource } from '@capacitor/camera';
import { VoiceRecorder, RecordingData, GenericResponse } from 'capacitor-voice-recorder';
import { Filesystem, Directory } from '@capacitor/filesystem';
import { DomSanitizer } from '@angular/platform-browser';
import { AlertController } from '@ionic/angular';
import { File } from '@awesome-cordova-plugins/file/ngx';
import { FileOpener } from '@awesome-cordova-plugins/file-opener/ngx';
import { SessionStore } from 'src/app/store/session.service';
import { HttpErrorResponse } from '@angular/common/http';
import { ViewMediaPage } from 'src/app/modals/view-media/view-media.page';
/*
import * as pdfjsLib from 'pdfjs-dist';
if( pdfjsLib !== undefined ){
pdfjsLib.GlobalWorkerOptions.workerSrc = "https://npmcdn.com/pdfjs-dist@2.4.456/build/pdf.worker.js";
}
*/
@Component({
selector: 'app-group-messages',
templateUrl: './group-messages.page.html',
@@ -110,24 +96,17 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
private modalController: ModalController,
public popoverController: PopoverController,
private chatService: ChatService,
private authService: AuthService,
//private authService: AuthService,
private animationController: AnimationController,
private alertService: AlertService,
private route: Router,
private timeService: TimeService,
private fileLoaderService: FileLoaderService,
private fileToBase64Service: FileToBase64Service,
private processesService: ProcessesService,
// private fileToBase64Service: FileToBase64Service,
private fileService: FileService,
public ThemeService: ThemeService,
private changeDetectorRef: ChangeDetectorRef,
private storage: Storage,
private AttachmentsService: AttachmentsService,
private CameraService: CameraService,
private toastService: ToastService,
private sanitiser: DomSanitizer,
private alertController: AlertController,
private file: File,
private platform: Platform,
private fileOpener: FileOpener,
@@ -136,7 +115,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
) {
this.loggedUserChat = authService.ValidatedUserChat['data'];
this.loggedUserChat = SessionStore.user.ChatData['data'];
this.isGroupCreated = true;
this.roomCountDownDate = "";
this.roomCountDownTime = "";
@@ -1,7 +1,6 @@
import { HttpErrorResponse, HttpHeaders } from '@angular/common/http';
import { HttpHeaders } from '@angular/common/http';
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { ModalController } from '@ionic/angular';
import { AuthService } from 'src/app/services/auth.service';
import { ChatService } from 'src/app/services/chat.service';
import { MessagesPage } from '../messages.page';
import { ThemeService } from 'src/app/services/theme.service'
@@ -31,11 +30,10 @@ export class ContactsPage implements OnInit {
constructor(
private modalController: ModalController,
private chatService: ChatService,
private authService: AuthService,
public ThemeService: ThemeService,
public ChatSystemService: ChatSystemService
) {
this.loggedUser = authService.ValidatedUserChat['data'];
this.loggedUser = SessionStore.user.ChatData['data'];
this.textSearch="";
this.dm=null;
this.room=null;
@@ -108,7 +108,6 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
private modalController: ModalController,
/* private navParams: NavParams, */
private chatService: ChatService,
private authService: AuthService,
private animationController: AnimationController,
private toastService: ToastService,
private timeService: TimeService,
@@ -118,7 +117,6 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
private storage: Storage,
public ChatSystemService: ChatSystemService,
public RochetChatConnectorService: RochetChatConnectorService,
private AttachmentsService: AttachmentsService,
private CameraService: CameraService,
private sanitiser: DomSanitizer,
private file: File,
@@ -1,6 +1,5 @@
import { Component, EventEmitter, Input, OnDestroy, OnInit, Output } from '@angular/core';
import { NavigationStart, Router } from '@angular/router';
import { ModalController, NavParams, PickerController, PopoverController } from '@ionic/angular';
import { ModalController, PickerController, PopoverController } from '@ionic/angular';
import { AuthService } from 'src/app/services/auth.service';
import { ChatSystemService } from 'src/app/services/chat/chat-system.service';
import { DataService } from 'src/app/services/data.service';
@@ -10,6 +9,7 @@ import { GroupContactsPage } from '../group-messages/group-contacts/group-contac
import { ToastService } from 'src/app/services/toast.service';
import { ThemeService } from 'src/app/services/theme.service';
import { RouteService } from 'src/app/services/route.service';
import { Router } from '@angular/router';
@Component({
selector: 'app-new-group',
templateUrl: './new-group.page.html',
@@ -49,7 +49,7 @@ export class NewGroupPage implements OnInit{
private RouteService: RouteService,
)
{
this.loggedUserChat = authService.ValidatedUserChat['data'];
this.loggedUserChat = SessionStore.user.ChatData['data'];
this.isGroupCreated = false;
}
@@ -1,10 +1,6 @@
import { Component, OnInit } from '@angular/core';
import { NavigationStart, Router } from '@angular/router';
import { LoginUserRespose } from 'src/app/models/user.model';
import { AuthService } from 'src/app/services/auth.service';
import { ProcessesService } from 'src/app/services/processes.service';
import { removeDuplicate } from 'src/plugin/removeDuplicate.js';
import { SortService } from 'src/app/services/functions/sort.service';
import { ThemeService } from 'src/app/services/theme.service'
import { ExpedienteGdStore } from 'src/app/store/expedientegd-store.service';
import { DeplomasStore } from 'src/app/store/deplomas.service';
@@ -40,13 +36,10 @@ export class AllProcessesPage implements OnInit {
constructor(
private processesService: ProcessesService,
private router: Router,
private authService: AuthService,
private sortService: SortService,
public ThemeService: ThemeService
) {
this.loggeduser = authService.ValidatedUser;
this.loggeduser = SessionStore.user;
}
ngOnInit() {
@@ -7,6 +7,7 @@ import { NavigationStart, Router } from '@angular/router';
import { DespachosprStore } from 'src/app/store/despachospr-store.service';
import { CustomTaskPipe } from 'src/app/pipes/custom-task.pipe';
import { SortService } from 'src/app/services/functions/sort.service';
import { SessionStore } from 'src/app/store/session.service';
@Component({
selector: 'app-despachos-pr',
@@ -28,7 +29,7 @@ constructor (
private sortService: SortService,
) {
this.loggeduser = authService.ValidatedUser;
this.loggeduser = SessionStore.user;
}
ngOnInit() {
@@ -1,5 +1,5 @@
import { Component, Input, OnInit } from '@angular/core';
import { ActivatedRoute, NavigationStart, Router } from '@angular/router';
import { NavigationStart, Router } from '@angular/router';
import { DailyWorkTask } from '../../../models/dailyworktask.model';
import { ProcessesService } from 'src/app/services/processes.service';
import { CustomTaskPipe } from 'src/app/pipes/custom-task.pipe';
@@ -30,7 +30,6 @@ export class DiplomasPage implements OnInit {
constructor(
private processes:ProcessesService,
private router: Router,
private activatedRoute: ActivatedRoute,
public ThemeService: ThemeService,
private sortService: SortService,
public p: PermissionService,
@@ -9,6 +9,7 @@ import { AuthService } from 'src/app/services/auth.service';
import { EventoAprovacaoStore } from 'src/app/store/eventoaprovacao-store.service';
import { SortService } from 'src/app/services/functions/sort.service';
import { Storage } from '@ionic/storage';
import { SessionStore } from 'src/app/store/session.service';
@Component({
selector: 'app-events-to-approve',
@@ -37,7 +38,7 @@ export class EventsToApprovePage implements OnInit {
private storage: Storage
)
{
this.loggeduser = userAuth.ValidatedUser;
this.loggeduser = SessionStore.user;
}
ngOnInit() {
@@ -1,14 +1,13 @@
import { Component, EventEmitter, OnInit, Output } from '@angular/core';
import { NavigationStart, Router } from '@angular/router';
import { ProcessesService } from 'src/app/services/processes.service';
import { ModalController } from '@ionic/angular';
import { LoginUserRespose } from 'src/app/models/user.model';
import { AuthService } from 'src/app/services/auth.service';
import { CustomTaskPipe } from 'src/app/pipes/custom-task.pipe';
import { ExpedienteGdStore } from 'src/app/store/expedientegd-store.service';
import { ExpedienteTaskPipe } from 'src/app/pipes/expediente-task.pipe';
import { ThemeService } from 'src/app/services/theme.service'
import { SortService } from 'src/app/services/functions/sort.service';
import { SessionStore } from 'src/app/store/session.service';
@Component({
@@ -30,13 +29,11 @@ export class ExpedientesPrPage implements OnInit {
constructor(
private processes:ProcessesService,
private modalController: ModalController,
private authService: AuthService,
private router: Router,
public ThemeService: ThemeService,
private sortService: SortService,
) {
this.loggeduser = authService.ValidatedUser;
this.loggeduser = SessionStore.user;
}
ngOnInit() {
@@ -9,6 +9,7 @@ import { LoginUserRespose } from 'src/app/models/user.model';
import { CustomTaskPipe } from 'src/app/pipes/custom-task.pipe';
import { SortService } from 'src/app/services/functions/sort.service';
import { Storage } from '@ionic/storage';
import { SessionStore } from 'src/app/store/session.service';
@Component({
selector: 'app-pendentes',
@@ -34,7 +35,7 @@ export class PendentesPage implements OnInit {
private sortService: SortService,
private storage: Storage
) {
this.loggeduser = authService.ValidatedUser;
this.loggeduser = SessionStore.user;
}
ngOnInit() {
+2 -1
View File
@@ -1,6 +1,7 @@
import { Component, OnInit } from '@angular/core';
import { LoginUserRespose } from 'src/app/models/user.model';
import { AuthService } from 'src/app/services/auth.service';
import { SessionStore } from 'src/app/store/session.service';
@Component({
selector: 'app-header-pr',
@@ -13,7 +14,7 @@ export class HeaderPrPage implements OnInit {
constructor(authService: AuthService) {
this.loggeduser = authService.ValidatedUser;
this.loggeduser = SessionStore.user;
}
ngOnInit() {
-4
View File
@@ -7,12 +7,10 @@ import { ProfilePage } from 'src/app/modals/profile/profile.page';
import { StorageService } from '../../services/storage.service';
import { SessionStore } from 'src/app/store/session.service';
import { environment } from 'src/environments/environment';
import { EventTrigger } from '../../services/eventTrigger.service';
import { ThemeService } from '../../services/theme.service';
import { RouteService } from 'src/app/services/route.service';
import { PermissionList } from 'src/app/models/permission/permissionList';
import { PermissionService } from 'src/app/services/permission.service';
import { models } from 'beast-orm';
@Component({
selector: 'app-header',
@@ -42,8 +40,6 @@ export class HeaderPage implements OnInit {
private animationController: AnimationController,
private storageservice: StorageService,
public platform: Platform,
//private notificationsService: NotificationsService,
private eventrigger: EventTrigger,
public ThemeService: ThemeService,
public RouteService: RouteService,
public p: PermissionService,
@@ -1,9 +1,7 @@
import { Component, OnInit } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { ModalController, NavParams, PopoverController } from '@ionic/angular';
import { AddNotePage } from 'src/app/modals/add-note/add-note.page';
import { BookMeetingModalPage } from 'src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page';
import { DeplomaService } from 'src/app/Rules/deploma.service';
import { ProcessesService } from 'src/app/services/processes.service';
import { ToastService } from 'src/app/services/toast.service';
import { RouteService } from 'src/app/services/route.service';
@@ -26,12 +24,9 @@ export class DeplomaOptionsPage implements OnInit {
constructor(
public popoverController: PopoverController,
private modalController: ModalController,
private activatedRoute: ActivatedRoute,
private processes: ProcessesService,
private navParams: NavParams,
private toastService: ToastService,
private router: Router,
private deplomaService: DeplomaService,
private RouteService: RouteService,
public p: PermissionService,) {
this.serialNumber = this.navParams.get('serialNumber');
@@ -1,6 +1,5 @@
import { Component, OnInit } from '@angular/core';
import { ProcessesService } from 'src/app/services/processes.service';
import { ActivatedRoute, Router } from '@angular/router';
import { ModalController, NavParams, PopoverController } from '@ionic/angular';
import { CreateProcessPage } from 'src/app/modals/create-process/create-process.page';
import { DelegarPage } from 'src/app/modals/delegar/delegar.page';
@@ -24,9 +23,8 @@ export class DespachosOptionsPage implements OnInit {
fulltask: fullTask;
serialNumber: string;
constructor(private activateRoute: ActivatedRoute,
constructor(
private processes: ProcessesService,
private router: Router,
private modalController: ModalController,
public popoverController: PopoverController,
private navParams: NavParams,
@@ -1,10 +1,9 @@
import { Component, OnInit } from '@angular/core';
import { ModalController, NavParams, PopoverController } from '@ionic/angular';
import { ProcessesService } from 'src/app/services/processes.service';
import { ActivatedRoute, Router } from '@angular/router';
import { Router } from '@angular/router';
import { ToastService } from 'src/app/services/toast.service';
import { ThemeService } from 'src/app/services/theme.service'
import { RouteService } from 'src/app/services/route.service';
import { DespachoService } from 'src/app/Rules/despacho.service'
import { DelegarPage } from 'src/app/modals/delegar/delegar.page';
import { AddNotePage } from 'src/app/modals/add-note/add-note.page';
@@ -26,9 +25,7 @@ export class DiplomasGerarOptionsPage implements OnInit {
private processes: ProcessesService,
public popoverController: PopoverController,
private modalController: ModalController,
private activatedRoute: ActivatedRoute,
private toastService: ToastService,
private RouteService: RouteService,
public ThemeService: ThemeService,
private despachoService: DespachoService,
private navParams: NavParams,
@@ -1,4 +1,3 @@
import { HttpErrorResponse } from '@angular/common/http';
import { Component, OnInit } from '@angular/core';
import { ModalController, NavParams, PopoverController } from '@ionic/angular';
import { ChatService } from 'src/app/services/chat.service';
@@ -1,5 +1,5 @@
import { Component, OnInit } from '@angular/core';
import { AnimationController, ModalController, NavParams, PopoverController } from '@ionic/angular';
import { ModalController, NavParams, PopoverController } from '@ionic/angular';
import { AddNotePage } from 'src/app/modals/add-note/add-note.page';
import { SearchList } from 'src/app/models/search-document';
import { LoginUserRespose } from 'src/app/models/user.model';
@@ -8,12 +8,12 @@ import { BookMeetingModalPage } from 'src/app/pages/gabinete-digital/expediente/
import { ExpedientTaskModalPage } from 'src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page';
import { SearchPage } from 'src/app/pages/search/search.page';
import { AttachmentsService } from 'src/app/services/attachments.service';
import { AuthService } from 'src/app/services/auth.service';
import { ProcessesService } from 'src/app/services/processes.service';
import { ToastService } from 'src/app/services/toast.service';
import { ThemeService } from 'src/app/services/theme.service'
import { RouteService } from 'src/app/services/route.service';
import { PermissionService } from 'src/app/services/permission.service';
import { SessionStore } from 'src/app/store/session.service';
@Component({
selector: 'app-opts-expediente-pr',
@@ -45,7 +45,6 @@ export class OptsExpedientePrPage implements OnInit {
private modalController: ModalController,
private processes: ProcessesService,
private attachmentsService: AttachmentsService,
private userAuth: AuthService,
private navParams: NavParams,
private toastService: ToastService,
private RouteService: RouteService,
@@ -57,7 +56,7 @@ export class OptsExpedientePrPage implements OnInit {
this.task = this.navParams.get('task');
this.fulltask = this.navParams.get('fulltask');
this.loggeduser = userAuth.ValidatedUser;
this.loggeduser = SessionStore.user;
if(this.task.Status != 'Pending'){
this.showEnviarPendentes = true;
}
@@ -18,7 +18,7 @@ import { ThemeService } from 'src/app/services/theme.service'
import { NewGroupPage } from 'src/app/pages/chat/new-group/new-group.page';
import { RouteService } from 'src/app/services/route.service';
import { LoginUserRespose } from 'src/app/models/user.model';
import { AuthService } from 'src/app/services/auth.service';
import { SessionStore } from 'src/app/store/session.service';
@Component({
selector: 'app-opts-expediente',
@@ -49,10 +49,9 @@ export class OptsExpedientePage implements OnInit {
private attachmentsService: AttachmentsService,
private RouteService: RouteService,
private expedienteService: ExpedienteService,
public ThemeService: ThemeService,
private userAuth: AuthService,
public ThemeService: ThemeService
) {
this.loggeduser = userAuth.ValidatedUser
this.loggeduser = SessionStore.user
this.task = this.navParams.get('task');
this.fulltask = this.navParams.get('fulltask');
@@ -1,5 +1,5 @@
import { Component, OnInit } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { ActivatedRoute } from '@angular/router';
import { ModalController, NavParams, PopoverController } from '@ionic/angular';
import { AddNotePage } from 'src/app/modals/add-note/add-note.page';
import { CreateProcessPage } from 'src/app/modals/create-process/create-process.page';
@@ -10,7 +10,6 @@ import { ProcessesService } from 'src/app/services/processes.service';
import { ToastService } from 'src/app/services/toast.service';
import { PedidoService } from 'src/app/Rules/pedido.service';
import { PermissionService } from 'src/app/services/permission.service';
import { DataService } from 'src/app/services/data.service';
import { NewGroupPage } from 'src/app/pages/chat/new-group/new-group.page';
@@ -34,10 +33,8 @@ export class RequestOptionsPage implements OnInit {
private processes: ProcessesService,
private activatedRoute: ActivatedRoute,
private toastService: ToastService,
private router: Router,
public p: PermissionService,
private pedidoService: PedidoService,
private dataService: DataService,
) {
this.task = this.navParams.get('task');
this.fulltask = this.navParams.get('fulltask');
@@ -44,12 +44,6 @@ export class NewActionPage implements OnInit {
) {
this.folder = new PublicationFolder();
/* this.folder = Object.assign(this.folder, {
DateBegin: new Date().toISOString(),
DateEnd: (new Date(new Date().getTime() + 15 * 60000)).toISOString(),
}) */
}
get dateStart () {