{{task.taskStartDate | date: 'dd-MM-yyyy'}}
diff --git a/src/app/pages/events/events.page.ts b/src/app/pages/events/events.page.ts
index 021e447cc..0ceb9b85d 100644
--- a/src/app/pages/events/events.page.ts
+++ b/src/app/pages/events/events.page.ts
@@ -351,7 +351,7 @@ export class EventsPage implements OnInit {
this.router.navigate(['/home/events', eventId, 'events']);
}
- goToExpediente(SerialNumber:any){
+ goToExpediente(SerialNumber:any) {
if(this.loggeduser.Profile == 'MDGPR'){
this.router.navigate(['/home/events/expediente', SerialNumber, 'events']);
}
diff --git a/src/app/pages/login/login.page.ts b/src/app/pages/login/login.page.ts
index 7e0284329..b2fd26e37 100644
--- a/src/app/pages/login/login.page.ts
+++ b/src/app/pages/login/login.page.ts
@@ -86,6 +86,7 @@ export class LoginPage implements OnInit {
this.authService.loginChat(this.userattempt);
this.getToken();
SessionStore.setInativity(true)
+
this.goback()
} else {
SessionStore.delete()
diff --git a/src/app/pipes/participants.pipe.spec.ts b/src/app/pipes/participants.pipe.spec.ts
new file mode 100644
index 000000000..bffcde3cd
--- /dev/null
+++ b/src/app/pipes/participants.pipe.spec.ts
@@ -0,0 +1,8 @@
+import { ParticipantsPipe } from './participants.pipe';
+
+describe('ParticipantsPipe', () => {
+ it('create an instance', () => {
+ const pipe = new ParticipantsPipe();
+ expect(pipe).toBeTruthy();
+ });
+});
diff --git a/src/app/pipes/participants.pipe.ts b/src/app/pipes/participants.pipe.ts
new file mode 100644
index 000000000..9856911c6
--- /dev/null
+++ b/src/app/pipes/participants.pipe.ts
@@ -0,0 +1,24 @@
+import { Pipe, PipeTransform } from '@angular/core';
+import { EventPerson } from 'src/app/models/eventperson.model'
+
+@Pipe({
+ name: 'participants'
+})
+export class ParticipantsPipe implements PipeTransform {
+
+ transform(EventPerson: EventPerson[]): any {
+ let taskParticipants = [];
+ let taskParticipantsCc = [];
+
+ EventPerson.forEach(e =>{
+ if(e.IsRequired) {
+ taskParticipants.push(e);
+ } else {
+ taskParticipantsCc.push(e);
+ }
+ })
+
+ return {taskParticipants, taskParticipantsCc}
+ }
+
+}
diff --git a/src/app/pipes/pipes.module.ts b/src/app/pipes/pipes.module.ts
index 3e5ccac18..f2017b539 100644
--- a/src/app/pipes/pipes.module.ts
+++ b/src/app/pipes/pipes.module.ts
@@ -5,10 +5,11 @@ import { CustomTaskPipe } from './custom-task.pipe';
import { EventPipe } from './event.pipe';
import { PublicationPipe } from './publication.pipe';
import { ExpedienteTaskPipe } from './expediente-task.pipe';
+import { ParticipantsPipe } from './participants.pipe';
@NgModule({
- declarations: [FilterPipe, SearchDocumentPipe, CustomTaskPipe, EventPipe, PublicationPipe, ExpedienteTaskPipe],
+ declarations: [FilterPipe, SearchDocumentPipe, CustomTaskPipe, EventPipe, PublicationPipe, ExpedienteTaskPipe, ParticipantsPipe],
exports: [FilterPipe],
imports: []
})
diff --git a/src/app/services/ageanda/list-box.service.ts b/src/app/services/ageanda/list-box.service.ts
index 98245a350..dc8a988b1 100644
--- a/src/app/services/ageanda/list-box.service.ts
+++ b/src/app/services/ageanda/list-box.service.ts
@@ -35,10 +35,11 @@ export class ListBoxService {
list(eventSource: EventListStore[], profile: 'md' | 'pr' | 'all', rangeStartDate, randEndDate, {segment = 'Combinado', selectedDate= null}) {
+ // filter range
if(selectedDate) {
eventSource = eventSource.filter(data =>
- data.startTime.toLocaleDateString('pt')>= selectedDate.toLocaleDateString('pt') &&
- data.startTime.getMonth() == selectedDate.getMonth()
+ data.startTime.toLocaleDateString('pt')>= selectedDate.toLocaleDateString('pt') &&
+ data.endTime.toLocaleDateString('pt')>= selectedDate.toLocaleDateString('pt')
)
}
@@ -50,8 +51,6 @@ export class ListBoxService {
eventSource = this.filterProfile(eventSource, profile)
}
- eventSource = this.getEventInsideRange(eventSource, rangeStartDate, randEndDate)
-
let newStracture:CustomCalendarEvent[];
if(profile == 'md') {
@@ -60,10 +59,10 @@ export class ListBoxService {
newStracture = this.encapsulation(eventSource, 'pr');
}
- return this.display(newStracture)
+ return this.display(newStracture, profile, selectedDate)
}
- display(list: CustomCalendarEvent[]) {
+ display(list: CustomCalendarEvent[], profile, selectedDate) {
let days = {};
list.forEach( (event:CustomCalendarEvent, index)=> {
@@ -75,7 +74,7 @@ export class ListBoxService {
endTime: event.end
})
- const day = (((new Date (event.start)).getDate())).toString().padStart(2,'0')
+ const day = this.dateService.getDay(event.start)
event['manyDays'] = false
event['todayOnly'] = this.dateService.isSameDate(event.start, event.end)
@@ -88,23 +87,23 @@ export class ListBoxService {
const diffDays = this.dateService.deferenceBetweenDays(endDate, startDate)
- if (diffDays <= 150 && !event.event.IsAllDayEvent ) {
+ if (diffDays <= 150 && !event.event.IsAllDayEvent ) {
if (diffDays >= 1) {
- const StartEvent = this.transForm(event, {startMany: true,endMany: false, middle: false})
+ const StartEvent = this.transForm(event, {startMany: true,endMany: false, middle: false, profile})
- days[day].push(StartEvent)
+ if(this.push(event, selectedDate)) days[day].push(StartEvent)
let i = 1;
+ // create event between date
while (startDate.getFullYear() != endDate.getFullYear() ||
startDate.getMonth() != endDate.getMonth() ||
startDate.getDate() != endDate.getDate()) {
const newDate = startDate.setDate(startDate.getDate()+ i)
-
- let otherDays = (((new Date (newDate)).getDate())).toString().padStart(2,'0')
+ let otherDays = this.dateService.getDay(newDate)
event['other'] = true
@@ -119,32 +118,47 @@ export class ListBoxService {
startDate.getDate() != endDate.getDate())) {
// last push
- const EndEvent = this.transForm(event, {startMany: false,endMany: true, middle: false})
- days[otherDays].push(EndEvent)
+ const EndEvent = this.transForm(event, {startMany: false,endMany: true, middle: false, profile})
+ if(this.push(event, selectedDate)) days[otherDays].push(EndEvent)
} else {
- const EndEvent = this.transForm(event, {startMany: false,endMany: true, middle: true})
- days[otherDays].push(EndEvent)
+ const EndEvent = this.transForm(event, {startMany: false,endMany: true, middle: true, profile})
+ if(this.push(event, selectedDate)) days[otherDays].push(EndEvent)
}
}
} else {
- days[day].push(event)
+ if(this.push(event, selectedDate)) days[day].push(event)
}
} else {
- days[day].push(event)
+ if(this.push(event, selectedDate)) days[day].push(event)
}
}
- days[day].push(event)
+ if(this.push(event, selectedDate)) days[day].push(event)
})
+ // remove days that haven't event
+ Object.entries(days).forEach(([index, value]) => {
+ const _value: any = value
+
+ if(_value.length == 0) {
+ delete days[index]
+ }
+
+ })
+
return days
}
+
+ push(event: any, selectedDate: Date) {
+ return new Date(event.start).getMonth() == selectedDate.getMonth()
+ }
+
encapsulation(eventsList:EventListStore[], profile): CustomCalendarEvent[] {
// remove all event
@@ -165,12 +179,12 @@ export class ListBoxService {
}
- transForm(event: CustomCalendarEvent, {startMany, endMany, middle}) {
+ transForm(event: CustomCalendarEvent, {startMany, endMany, middle, profile}) {
return Object.assign({}, {
start: event.start,
end: event.end,
id: event.id,
- profile: event,
+ profile: profile,
event: {
Subject: event.event.Subject,
StartDate: event.event.StartDate,
diff --git a/src/app/services/date.service.ts b/src/app/services/date.service.ts
index f64ef6fbd..2895fea2d 100644
--- a/src/app/services/date.service.ts
+++ b/src/app/services/date.service.ts
@@ -37,4 +37,10 @@ export class DateService {
return new Date(endTime)
}
}
+
+
+
+ getDay(date) {
+ return (((new Date (date)).getDate())).toString().padStart(2,'0')
+ }
}
diff --git a/src/app/services/events.service.ts b/src/app/services/events.service.ts
index be0456111..833d4323f 100644
--- a/src/app/services/events.service.ts
+++ b/src/app/services/events.service.ts
@@ -4,7 +4,7 @@ import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http';
import { Observable } from 'rxjs';
import { environment } from 'src/environments/environment';
import { AuthService } from '../services/auth.service';
-import { LoginUserRespose } from '../models/user.model';
+import { LoginUserRespose, UserSession } from '../models/user.model';
import { EventList } from '../models/agenda/AgendaEventList';
@@ -14,7 +14,7 @@ import { EventList } from '../models/agenda/AgendaEventList';
export class EventsService {
authheader = {};
- loggeduser: LoginUserRespose;
+ loggeduser: UserSession;
headers: HttpHeaders;
headersPrOficial: HttpHeaders;
diff --git a/src/app/services/notifications.service.ts b/src/app/services/notifications.service.ts
index d04433176..54bd07f16 100644
--- a/src/app/services/notifications.service.ts
+++ b/src/app/services/notifications.service.ts
@@ -14,7 +14,7 @@ import { ToastService } from '../services/toast.service';
import { Optional } from '@angular/core';
import { JsonStore } from './jsonStore.service';
import { synchro } from './socket/synchro.service';
-
+import { v4 as uuidv4 } from 'uuid'
@Injectable({
providedIn: 'root'
})
@@ -27,10 +27,11 @@ export class NotificationsService {
callbacks: {
type: string,
funx: Function
+ id: string
}[] = []
constructor(
- private http: HttpClient,
+ private http: HttpClient,
private storageService: StorageService,
private modalController: ModalController,
public modalCtrl: AlertController,
@@ -51,15 +52,28 @@ export class NotificationsService {
}
- registerCallback(type: string, funx: Function, object: any = {} ) {
+ registerCallback(type: string, funx: Function, object: any = {} ) {
- this.callbacks.push({type, funx})
- if(!object.hasOwnProperty('desktop') && object['desktop'] != false) {
- synchro.registerCallback('Notification',funx, type)
- }
-
+ const id = uuidv4()
+ this.callbacks.push({type, funx, id})
+ if(!object.hasOwnProperty('desktop') && object['desktop'] != false) {
+ synchro.registerCallback('Notification',funx, type)
}
+ return id;
+ }
+
+ deleteCallback(id) {
+ this.callbacks.forEach((e, index)=>{
+ if(e.id == id) {
+ if (index > -1) {
+ this.callbacks.splice(index, 1);
+ }
+ }
+ })
+
+ }
+
getTokenByUserIdAndId(user, userID) {
const geturl = environment.apiURL + 'notifications/user/' + userID;
diff --git a/src/app/shared/agenda/edit-event/edit-event.page.ts b/src/app/shared/agenda/edit-event/edit-event.page.ts
index 2106c2e83..4dedc8a17 100644
--- a/src/app/shared/agenda/edit-event/edit-event.page.ts
+++ b/src/app/shared/agenda/edit-event/edit-event.page.ts
@@ -12,6 +12,7 @@ import { Attachment } from 'src/app/models/attachment.model';
import { ToastService } from 'src/app/services/toast.service';
import { FormControl, FormGroup, Validators } from '@angular/forms';
import * as moment from 'moment';
+import { ParticipantsPipe } from 'src/app/pipes/participants.pipe';
@Component({
selector: 'app-edit-event',
@@ -34,8 +35,6 @@ export class EditEventPage implements OnInit {
recurringTypes = [];
selectedRecurringType: any;
- public dateControlOccurrence = new FormControl(moment("DD MM YYYY hh"));
-
public date: any;
public disabled = false;
public showSpinners = true;
@@ -86,19 +85,19 @@ export class EditEventPage implements OnInit {
public stepMinutes = [1, 5, 10, 15, 20, 25];
public stepSeconds = [1, 5, 10, 15, 20, 25];
+ private participantsPipe = new ParticipantsPipe()
+
constructor(
private modalController: ModalController,
private eventsService: EventsService,
public alertController: AlertController,
private attachmentsService: AttachmentsService,
- private toastService: ToastService ) {
+ private toastService: ToastService,
+ ) {
}
ngOnInit() {
- this.dateControlOccurrence = new FormControl(moment(this.postEvent.EventRecurrence.LastOccurrence));
-
- this.postEvent.EventRecurrence.Type = '-1'
if(!this.restoreTemporaryData()) {
// clear
@@ -111,16 +110,9 @@ export class EditEventPage implements OnInit {
}
}
- // attendees list
- if(this.postEvent.Attendees != null) {
- this.postEvent.Attendees.forEach(e =>{
- if(e.IsRequired) {
- this.taskParticipants.push(e);
- } else {
- this.taskParticipantsCc.push(e);
- }
- })
- }
+ const result = this.participantsPipe.transform(this.postEvent.Attendees)
+ this.taskParticipants = result.taskParticipants
+ this.taskParticipantsCc = result.taskParticipantsCc
this.taskParticipants = removeDuplicate(this.taskParticipants);
this.taskParticipantsCc = removeDuplicate(this.taskParticipantsCc);
@@ -142,6 +134,7 @@ export class EditEventPage implements OnInit {
this.getRecurrenceTypes();
this.postEvent.EventRecurrence.Type = this.postEvent.EventRecurrence.Type.toString();
+
setTimeout(() => {
this.postEvent.EventRecurrence.Type = this.postEvent.EventRecurrence.Type.toString();
console.log( this.postEvent.EventRecurrence.Type);
@@ -250,9 +243,10 @@ export class EditEventPage implements OnInit {
if(!this.postEvent.EventRecurrence.hasOwnProperty('Type')) {
this.postEvent.EventRecurrence.Type = '-1'
+ } else {
+
}
- //
if(this.postEvent.EventRecurrence.Type == undefined) {
this.postEvent.EventRecurrence.Type = '-1'
}
diff --git a/src/app/shared/agenda/view-event/view-event.page.html b/src/app/shared/agenda/view-event/view-event.page.html
index be905a8f3..a2e90819c 100644
--- a/src/app/shared/agenda/view-event/view-event.page.html
+++ b/src/app/shared/agenda/view-event/view-event.page.html
@@ -26,6 +26,7 @@
+
diff --git a/src/app/shared/headers/header-no-search/header-no-search-routing.module.ts b/src/app/shared/headers/header-no-search/header-no-search-routing.module.ts
deleted file mode 100644
index 6e1f8a04c..000000000
--- a/src/app/shared/headers/header-no-search/header-no-search-routing.module.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-import { NgModule } from '@angular/core';
-import { Routes, RouterModule } from '@angular/router';
-
-import { HeaderNoSearchPage } from './header-no-search.page';
-
-const routes: Routes = [
- {
- path: '',
- component: HeaderNoSearchPage
- },
{
- path: 'profile',
- loadChildren: () => import('./profile/profile.module').then( m => m.ProfilePageModule)
- }
-
-];
-
-@NgModule({
- imports: [RouterModule.forChild(routes)],
- exports: [RouterModule],
-})
-export class HeaderNoSearchPageRoutingModule {}
diff --git a/src/app/shared/headers/header-no-search/header-no-search.module.ts b/src/app/shared/headers/header-no-search/header-no-search.module.ts
deleted file mode 100644
index e9ecd8556..000000000
--- a/src/app/shared/headers/header-no-search/header-no-search.module.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-import { NgModule } from '@angular/core';
-import { CommonModule } from '@angular/common';
-import { FormsModule } from '@angular/forms';
-
-import { IonicModule } from '@ionic/angular';
-
-import { HeaderNoSearchPageRoutingModule } from './header-no-search-routing.module';
-
-import { HeaderNoSearchPage } from './header-no-search.page';
-
-@NgModule({
- imports: [
- CommonModule,
- FormsModule,
- IonicModule,
- HeaderNoSearchPageRoutingModule
- ],
- exports: [HeaderNoSearchPage],
- declarations: [HeaderNoSearchPage]
-})
-export class HeaderNoSearchPageModule {}
diff --git a/src/app/shared/headers/header-no-search/header-no-search.page.html b/src/app/shared/headers/header-no-search/header-no-search.page.html
deleted file mode 100644
index e4be665c1..000000000
--- a/src/app/shared/headers/header-no-search/header-no-search.page.html
+++ /dev/null
@@ -1,69 +0,0 @@
-
-
-
-
-
-
-
-
-

-
-
-
-
-
-
- Início
-
-
-
-
- Agenda
-
-
-
-
- Gabinete
-
-
-
-
- Acções
-
-
-
-
-
- Chat
-
-
-
-
-
-
-
-
-
- {{profileLabel(loggeduser.Profile)}}
-
-
-
-
-
-
-
-
diff --git a/src/app/shared/headers/header-no-search/header-no-search.page.scss b/src/app/shared/headers/header-no-search/header-no-search.page.scss
deleted file mode 100644
index 5f8417188..000000000
--- a/src/app/shared/headers/header-no-search/header-no-search.page.scss
+++ /dev/null
@@ -1,67 +0,0 @@
-@import '~src/function.scss';
-
-.div-top-header{
- margin: 0 em(20px);
- // background-color: #0782c9;
- padding-top: em(15px);
- border: 0!important;
-}
-
-.div-logo{
- background: transparent;
- width: em(140px);
- justify-content: center;
- display: flex;
-}
-.div-logo img{
- width: 100%;
- margin: 0px auto;
-}
-.div-profile{
- width: 45px;
- height: 45px;
- font-size: 45px;
- justify-content: flex-end;
- display: flex;
- background-color: transparent;
- justify-content: center;
- align-items: center;
- overflow: hidden;
-
- .icon{
- position: relative;
- border: none !important;
- }
-
- .profile-text{
- font-size: 20px;
- font-weight: 300;
- width: fit-content;
- position: absolute;
- }
-}
-
-.desktop{
- display: none;
-}
-
-@media only screen and (min-width: 1366px) {
-
- .mobile{
- display: none !important;
- }
- .desktop{
- display: block;
- }
-
-}
-
-.tab{
- height: 65px;
- cursor: pointer;
- user-select: none;
-}
-
-.active{
- border-top: 7px solid white;
-}
diff --git a/src/app/shared/headers/header-no-search/header-no-search.page.spec.ts b/src/app/shared/headers/header-no-search/header-no-search.page.spec.ts
deleted file mode 100644
index 8b820d37c..000000000
--- a/src/app/shared/headers/header-no-search/header-no-search.page.spec.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-import { async, ComponentFixture, TestBed } from '@angular/core/testing';
-import { IonicModule } from '@ionic/angular';
-
-import { HeaderNoSearchPage } from './header-no-search.page';
-
-describe('HeaderNoSearchPage', () => {
- let component: HeaderNoSearchPage;
- let fixture: ComponentFixture
;
-
- beforeEach(async(() => {
- TestBed.configureTestingModule({
- declarations: [ HeaderNoSearchPage ],
- imports: [IonicModule.forRoot()]
- }).compileComponents();
-
- fixture = TestBed.createComponent(HeaderNoSearchPage);
- component = fixture.componentInstance;
- fixture.detectChanges();
- }));
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/src/app/shared/headers/header-no-search/header-no-search.page.ts b/src/app/shared/headers/header-no-search/header-no-search.page.ts
deleted file mode 100644
index 21a69fac9..000000000
--- a/src/app/shared/headers/header-no-search/header-no-search.page.ts
+++ /dev/null
@@ -1,85 +0,0 @@
-import { Component, OnInit } from '@angular/core';
-import { AnimationController, ModalController } from '@ionic/angular';
-import { Router } from '@angular/router';
-import { LoginUserRespose } from 'src/app/models/user.model';
-import { ProfilePage } from 'src/app/modals/profile/profile.page';
-import { SessionStore } from 'src/app/store/session.service';
-
-
-@Component({
- selector: 'app-header-no-search',
- templateUrl: './header-no-search.page.html',
- styleUrls: ['./header-no-search.page.scss'],
-})
-export class HeaderNoSearchPage implements OnInit {
-
- loggeduser: LoginUserRespose;
- SessionStore = SessionStore
-
- constructor(private modalController: ModalController,
- private animationController: AnimationController,
- private router: Router) {
-
- this.loggeduser = SessionStore.user;
- }
-
- ngOnInit() {
- }
-
- async openProfile() {
-
- const enterAnimation = (baseEl: any) => {
- const backdropAnimation = this.animationController.create()
- .addElement(baseEl.querySelector('ion-backdrop')!)
- .fromTo('opacity', '0.01', 'var(--backdrop-opacity)');
-
- const wrapperAnimation = this.animationController.create()
- .addElement(baseEl.querySelector('.modal-wrapper')!)
- .keyframes([
- { offset: 0, opacity: '1', right: '-100%' },
- { offset: 1, opacity: '1', right: '0px' }
- ]);
-
- return this.animationController.create()
- .addElement(baseEl)
- .easing('ease-out')
- .duration(500)
- .addAnimation([backdropAnimation, wrapperAnimation]);
- }
-
- const leaveAnimation = (baseEl: any) => {
- return enterAnimation(baseEl).direction('reverse');
- }
-
-
- const modal = await this.modalController.create({
- enterAnimation,
- leaveAnimation,
- component: ProfilePage,
- cssClass: 'model profile-modal',
- componentProps: {
- }
- });
- return await modal.present();
- }
-
- changeRoute(path){
- this.router.navigateByUrl(path)
- }
-
- locationPathname(): string {
- return window.location.pathname
- }
-
-
- profileLabel(text) {
- if (text == 'MDGPR') {
- return 'MD'
- } else if (text=='PR') {
- return text
- } else {
- return 'UN'
- }
- }
-
-}
diff --git a/src/app/shared/headers/header-no-search/profile/profile-routing.module.ts b/src/app/shared/headers/header-no-search/profile/profile-routing.module.ts
deleted file mode 100644
index 3b21e8195..000000000
--- a/src/app/shared/headers/header-no-search/profile/profile-routing.module.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-import { NgModule } from '@angular/core';
-import { Routes, RouterModule } from '@angular/router';
-
-import { ProfileComponent } from './profile.page';
-
-const routes: Routes = [
- {
- path: '',
- component: ProfileComponent
- }
-];
-
-@NgModule({
- imports: [RouterModule.forChild(routes)],
- exports: [RouterModule],
-})
-export class ProfilePageRoutingModule {}
diff --git a/src/app/shared/headers/header-no-search/profile/profile.module.ts b/src/app/shared/headers/header-no-search/profile/profile.module.ts
deleted file mode 100644
index fba2e4bfa..000000000
--- a/src/app/shared/headers/header-no-search/profile/profile.module.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-import { NgModule } from '@angular/core';
-import { CommonModule } from '@angular/common';
-import { FormsModule } from '@angular/forms';
-
-import { IonicModule } from '@ionic/angular';
-
-import { ProfilePageRoutingModule } from './profile-routing.module';
-
-import { ProfileComponent } from './profile.page';
-
-@NgModule({
- imports: [
- CommonModule,
- FormsModule,
- IonicModule,
- ProfilePageRoutingModule
- ],
- declarations: [ProfileComponent]
-})
-export class ProfilePageModule {}
diff --git a/src/app/shared/headers/header-no-search/profile/profile.page.html b/src/app/shared/headers/header-no-search/profile/profile.page.html
deleted file mode 100644
index f57d93beb..000000000
--- a/src/app/shared/headers/header-no-search/profile/profile.page.html
+++ /dev/null
@@ -1,82 +0,0 @@
-
-
-
-
-
-
-
-
-
-
Dados Perfil
-
{{loggeduser.RoleDescription}}
-
{{loggeduser.Email}}
-
-
-
-
Preferência Login
-
-
-
-
-
- PIN
-
-
-
-
-
-
- Impressão Digital
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/app/shared/headers/header-no-search/profile/profile.page.scss b/src/app/shared/headers/header-no-search/profile/profile.page.scss
deleted file mode 100644
index acab1b075..000000000
--- a/src/app/shared/headers/header-no-search/profile/profile.page.scss
+++ /dev/null
@@ -1,64 +0,0 @@
-.profile-content{
- padding: 20px 20px;
-}
-
-.icon{
- font-size: 35px;
-}
-
-.go-back{
- font-family: Roboto;
- font-size: 25px;
- .icon{
- margin-right: 7px;
- }
-}
-
-.profile-pic{
- width: 200px;
- height: 200px;
- border-radius: 20px;
- margin: 0px auto;
-}
-
-.profile-info{
- .label-text{
- font-size: 15px;
- font-weight: bold;
- color: white;
- margin-bottom: 10px;
- }
-
- .user-role{
- background-color: white;
- border-radius: 5px;
- padding: 12px;
- font-family: Roboto;
- font-size: 13px;
- color: black;
- text-align: center;
- }
-
- .email {
- margin-top: 15px;
- }
-
-}
-
-.login-preference{
- margin-top: 44px;
-
- .preference{
- font-family: Roboto;
- font-size: 15px;
- margin-bottom: 20px;
- font-weight: bold;
- }
- .checkBox{
- margin-right: 10px;
- }
-}
-
-.buttonSize {
- width: 100% !important;
-}
\ No newline at end of file
diff --git a/src/app/shared/headers/header-no-search/profile/profile.page.spec.ts b/src/app/shared/headers/header-no-search/profile/profile.page.spec.ts
deleted file mode 100644
index e3f18689f..000000000
--- a/src/app/shared/headers/header-no-search/profile/profile.page.spec.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
-import { IonicModule } from '@ionic/angular';
-
-import { ProfileComponent } from './profile.page';
-
-describe('ProfilePage', () => {
- let component: ProfileComponent;
- let fixture: ComponentFixture;
-
- beforeEach(waitForAsync(() => {
- TestBed.configureTestingModule({
- declarations: [ ProfileComponent ],
- imports: [IonicModule.forRoot()]
- }).compileComponents();
-
- fixture = TestBed.createComponent(ProfileComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- }));
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/src/app/shared/headers/header-no-search/profile/profile.page.ts b/src/app/shared/headers/header-no-search/profile/profile.page.ts
deleted file mode 100644
index 6a2a5029c..000000000
--- a/src/app/shared/headers/header-no-search/profile/profile.page.ts
+++ /dev/null
@@ -1,158 +0,0 @@
-import { Component, OnInit } from '@angular/core';
-import { Router } from '@angular/router';
-import { AnimationController, ModalController } from '@ionic/angular';
-import { LoginUserRespose } from 'src/app/models/user.model';
-import { AuthService } from 'src/app/services/auth.service';
-import { FingerprintPage } from 'src/app/shared/fingerprint/fingerprint.page';
-import { PinPage } from 'src/app/shared/pin/pin.page';
-import { LocalstoreService } from 'src/app/store/localstore.service';
-
-@Component({
- selector: 'app-profile',
- templateUrl: './profile.page.html',
- styleUrls: ['./profile.page.scss'],
-})
-export class ProfileComponent implements OnInit {
-
- loggeduser: LoginUserRespose;
- userLoginPreference = ''
-
- constructor(private modalController:ModalController,
- private authService: AuthService,
- private animationController: AnimationController,
- private router: Router,
- private localstoreService: LocalstoreService
- ) {
-
- this.loggeduser = authService.ValidatedUser;
-
- // console.log(this.loggeduser.RoleDescription)
-
- this.checkState()
- }
-
- ngOnInit() {}
-
- close() {
- this.modalController.dismiss();
- }
-
- async addPin() {
- const enterAnimation = (baseEl: any) => {
- const backdropAnimation = this.animationController.create()
- .addElement(baseEl.querySelector('ion-backdrop')!)
- .fromTo('opacity', '0.01', 'var(--backdrop-opacity)');
-
- const wrapperAnimation = this.animationController.create()
- .addElement(baseEl.querySelector('.modal-wrapper')!)
- .keyframes([
- { offset: 0, opacity: '1', right: '-100%' },
- { offset: 1, opacity: '1', right: '0px' }
- ]);
-
- return this.animationController.create()
- .addElement(baseEl)
- .easing('ease-out')
- .duration(500)
- .addAnimation([backdropAnimation, wrapperAnimation]);
- }
-
- const leaveAnimation = (baseEl: any) => {
- return enterAnimation(baseEl).direction('reverse');
- }
-
-
- const modal = await this.modalController.create({
- enterAnimation,
- leaveAnimation,
- component: PinPage,
- cssClass: 'model profile-modal',
- componentProps: {
- }
- });
-
- modal.present();
- }
-
-
- async addFingerprint() {
- const enterAnimation = (baseEl: any) => {
- const backdropAnimation = this.animationController.create()
- .addElement(baseEl.querySelector('ion-backdrop')!)
- .fromTo('opacity', '0.01', 'var(--backdrop-opacity)');
-
- const wrapperAnimation = this.animationController.create()
- .addElement(baseEl.querySelector('.modal-wrapper')!)
- .keyframes([
- { offset: 0, opacity: '1', right: '-100%' },
- { offset: 1, opacity: '1', right: '0px' }
- ]);
-
- return this.animationController.create()
- .addElement(baseEl)
- .easing('ease-out')
- .duration(500)
- .addAnimation([backdropAnimation, wrapperAnimation]);
- }
-
- const leaveAnimation = (baseEl: any) => {
- return enterAnimation(baseEl).direction('reverse');
- }
-
-
- const modal = await this.modalController.create({
- enterAnimation,
- leaveAnimation,
- component: FingerprintPage,
- cssClass: 'model profile-modal',
- componentProps: {
- }
- });
-
- modal.present();
- }
-
- logout() {
- // clear local storage
- window.localStorage.clear();
-
- setTimeout(()=> {
- this.router.navigateByUrl('/', { replaceUrl: true });
- },100)
-
- }
-
- LoginPreferenceMethod(type: string) {
-
- let userData = this.localstoreService.get('UserData', {})
-
- if (userData.hasOwnProperty('loginPreference')) {
- if (userData.loginPreference != type) {
- if (type) {
- userData.loginPreference = type
- }
- } else {
- userData.loginPreference = 'none'
- }
-
- } else {
- userData.loginPreference = 'none'
- }
-
-
- this.localstoreService.set('UserData', userData)
- }
-
- checkState() {
-
- let userData = this.localstoreService.get('UserData', {})
-
- if (userData.hasOwnProperty('loginPreference')) {
- this.userLoginPreference = userData.loginPreference
- } else {
- this.userLoginPreference = ''
- }
-
- }
-
-}
diff --git a/src/app/store/session.service.ts b/src/app/store/session.service.ts
index d2e8f225e..3e480e7bc 100644
--- a/src/app/store/session.service.ts
+++ b/src/app/store/session.service.ts
@@ -58,6 +58,7 @@ class SessionService {
setInativity(value: boolean) {
this._user.Inactivity = value
+ this._user.UrlBeforeInactivity = ''
this.save()
}