diff --git a/src/app/home/home.page.ts b/src/app/home/home.page.ts index 99dfec1bc..b759fa172 100644 --- a/src/app/home/home.page.ts +++ b/src/app/home/home.page.ts @@ -82,7 +82,6 @@ export class HomePage implements OnInit { document.querySelectorAll('ion-modal').forEach((e: any) => e.remove()) }); - this.updateList() window['platform'] = platform window['inactivity/function'] = () => { @@ -95,13 +94,6 @@ export class HomePage implements OnInit { } } - var myWorker = new Worker(new URL('./nice.worker.js', import.meta.url) ); - - myWorker.onmessage = function(oEvent) { - console.log('Worker said : ' + oEvent.data); - } - - myWorker.postMessage('ali'); } @@ -121,7 +113,17 @@ export class HomePage implements OnInit { this.notificationsService.onReceviNotification(); } + this.updateList() + + var myWorker = new Worker(new URL('./nice.worker.js', import.meta.url) ); + + myWorker.onmessage = function(oEvent) { + console.log('Worker said : ' + oEvent.data); + } + + myWorker.postMessage('ali'); } + mobilefirstConnect() { if(window['WLAuthorizationManager']) { @@ -194,6 +196,16 @@ export class HomePage implements OnInit { }, 'any') + + + document.addEventListener('pause', function () { + // console.log('App going to background'); + }); + + document.addEventListener('resume', function () { + // console.log('App coming to foreground'); + }); + } } diff --git a/src/app/modals/profile/edit-profile/edit-profile.page.html b/src/app/modals/profile/edit-profile/edit-profile.page.html index d1ed6cfd8..ec1f40183 100644 --- a/src/app/modals/profile/edit-profile/edit-profile.page.html +++ b/src/app/modals/profile/edit-profile/edit-profile.page.html @@ -53,7 +53,7 @@ -
+
Preferência Login
diff --git a/src/app/modals/profile/edit-profile/edit-profile.page.ts b/src/app/modals/profile/edit-profile/edit-profile.page.ts index 1a295dee2..84f1e8308 100644 --- a/src/app/modals/profile/edit-profile/edit-profile.page.ts +++ b/src/app/modals/profile/edit-profile/edit-profile.page.ts @@ -3,6 +3,7 @@ import { AnimationController, ModalController } from '@ionic/angular'; import { FingerprintPage } from 'src/app/shared/fingerprint/fingerprint.page'; import { PinPage } from 'src/app/shared/pin/pin.page'; import { SessionStore } from 'src/app/store/session.service'; +import { environment } from 'src/environments/environment'; @Component({ selector: 'app-edit-profile', @@ -12,6 +13,7 @@ import { SessionStore } from 'src/app/store/session.service'; export class EditProfilePage implements OnInit { SessionStore = SessionStore + production = environment.production constructor(private modalController:ModalController, private animationController: AnimationController diff --git a/src/app/models/agenda/AgendaEventList.ts b/src/app/models/agenda/AgendaEventList.ts index 63a798d4a..fad1343c4 100644 --- a/src/app/models/agenda/AgendaEventList.ts +++ b/src/app/models/agenda/AgendaEventList.ts @@ -1,3 +1,15 @@ + +export interface EventListStore { + title: string + startTime: Date + endTime: Date + allDay: boolean, + event: EventList, + calendarName: string + profile: "md" | "pr", + id: string +} + export interface EventList { HasAttachments: boolean; IsAllDayEvent: boolean; @@ -11,17 +23,6 @@ export interface EventList { HumanDate: string; } -export interface EventListStore { - title: string - startTime: Date - endTime: Date - allDay: boolean, - event: EventList, - calendarName: string - profile: "md" | "pr", - id: string -} - export interface CustomCalendarEvent { start: Date @@ -33,5 +34,5 @@ export interface CustomCalendarEvent { id: string index: number, CalendarName: string - event: EventListStore + event: EventList } \ No newline at end of file diff --git a/src/app/models/event.model.ts b/src/app/models/event.model.ts index dfa36d7d0..fb1e5b581 100644 --- a/src/app/models/event.model.ts +++ b/src/app/models/event.model.ts @@ -33,10 +33,6 @@ export class Event{ EventRecurrence: EventRecurrence; Name?: string Attachments?: Attachment[]; - - /* public Event(){ - this.EventRecurrence = new EventRecurrence(); - } */ } diff --git a/src/app/pages/agenda/agenda.page.ts b/src/app/pages/agenda/agenda.page.ts index 931a0390b..6af359567 100644 --- a/src/app/pages/agenda/agenda.page.ts +++ b/src/app/pages/agenda/agenda.page.ts @@ -25,8 +25,8 @@ import { LoginUserRespose } from 'src/app/models/user.model'; import { DateAdapter } from '@angular/material/core'; import { ToastService } from 'src/app/services/toast.service'; import { eventSource } from 'src/app/models/agenda/eventSource'; -import { eventListBox as eventListBoxComponent } from './eventListBox' import { CalendarService } from 'src/app/store/calendar.service'; +import { ListBoxService } from 'src/app/services/ageanda/list-box.service'; @Component({ selector: 'app-agenda', @@ -123,8 +123,6 @@ export class AgendaPage implements OnInit { startTime: Date; endTime: Date; - eventListBoxComponent = new eventListBoxComponent() - mobileComponent = { showAddNewEvent: false, showEditEvent: false, @@ -162,7 +160,8 @@ export class AgendaPage implements OnInit { authService: AuthService, private dateAdapter: DateAdapter, private toastService: ToastService, - public calendarService: CalendarService + public calendarService: CalendarService, + private listBoxService: ListBoxService ) { this.dateAdapter.setLocale('es'); @@ -457,7 +456,6 @@ export class AgendaPage implements OnInit { this.eventService.getAllMdEvents( momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59') ).then( (response:any) => { - console.log(response); // calendar @@ -466,7 +464,7 @@ export class AgendaPage implements OnInit { // loop this.calendarService.pushEvent(response, 'md'); - this.TimelineMDList = this.eventListBoxComponent.list(this.calendarService.eventSource, 'md', this.rangeStartDate, this.rangeEndDate, 'date') + this.TimelineMDList = this.listBoxService.list(this.calendarService.eventSource, 'md', this.rangeStartDate, this.rangeEndDate, 'date') this.myCal.update(); this.myCal.loadEvents(); @@ -487,7 +485,7 @@ export class AgendaPage implements OnInit { // calendar this.calendarService.pushEvent(response, 'pr'); - this.TimelineMDList = this.eventListBoxComponent.list(this.calendarService.eventSource, 'pr', this.rangeStartDate, this.rangeEndDate, 'date') + this.TimelineMDList = this.listBoxService.list(this.calendarService.eventSource, 'pr', this.rangeStartDate, this.rangeEndDate, 'date') this.myCal.update(); this.myCal.loadEvents(); @@ -513,7 +511,7 @@ export class AgendaPage implements OnInit { this.calendarService.pushEvent(response, 'pr'); - this.TimelineMDList = this.eventListBoxComponent.list(this.calendarService.eventSource, 'pr', this.rangeStartDate, this.rangeEndDate, 'date') + this.TimelineMDList = this.listBoxService.list(this.calendarService.eventSource, 'pr', this.rangeStartDate, this.rangeEndDate, 'date') this.myCal.update(); @@ -541,7 +539,7 @@ export class AgendaPage implements OnInit { this.calendarService.pushEvent(eventsList, 'md'); - this.TimelineMDList = this.eventListBoxComponent.list(this.calendarService.eventSource, 'md', this.rangeStartDate, this.rangeEndDate, 'date') + this.TimelineMDList = this.listBoxService.list(this.calendarService.eventSource, 'md', this.rangeStartDate, this.rangeEndDate, 'date') this.myCal.update(); this.myCal.loadEvents(); @@ -564,7 +562,7 @@ export class AgendaPage implements OnInit { this.calendarService.pushEvent(eventsList, 'pr'); - this.TimelineMDList = this.eventListBoxComponent.list(this.calendarService.eventSource, 'pr', this.rangeStartDate, this.rangeEndDate, 'date') + this.TimelineMDList = this.listBoxService.list(this.calendarService.eventSource, 'pr', this.rangeStartDate, this.rangeEndDate, 'date') this.myCal.update(); @@ -594,7 +592,7 @@ export class AgendaPage implements OnInit { this.calendarService.pushEvent(eventsList, 'md'); - this.TimelineMDList = this.eventListBoxComponent.list(this.calendarService.eventSource, 'md', this.rangeStartDate, this.rangeEndDate, 'date') + this.TimelineMDList = this.listBoxService.list(this.calendarService.eventSource, 'md', this.rangeStartDate, this.rangeEndDate, 'date') this.myCal.update(); this.myCal.loadEvents(); @@ -616,7 +614,7 @@ export class AgendaPage implements OnInit { this.calendarService.pushEvent(eventsList, 'pr'); - this.TimelineMDList = this.eventListBoxComponent.list(this.calendarService.eventSource, 'pr', this.rangeStartDate, this.rangeEndDate, 'date') + this.TimelineMDList = this.listBoxService.list(this.calendarService.eventSource, 'pr', this.rangeStartDate, this.rangeEndDate, 'date') this.myCal.update(); this.myCal.loadEvents(); @@ -647,7 +645,7 @@ export class AgendaPage implements OnInit { // loop this.calendarService.pushEvent(eventsList, 'md'); - this.TimelineMDList = this.eventListBoxComponent.list(this.calendarService.eventSource, 'md', this.rangeStartDate, this.rangeEndDate, 'date') + this.TimelineMDList = this.listBoxService.list(this.calendarService.eventSource, 'md', this.rangeStartDate, this.rangeEndDate, 'date') this.myCal.update(); this.myCal.loadEvents(); @@ -676,7 +674,7 @@ export class AgendaPage implements OnInit { this.calendarService.pushEvent(eventsList, 'pr'); - this.TimelinePRList = this.eventListBoxComponent.list(this.calendarService.eventSource, 'pr', this.rangeStartDate, this.rangeEndDate, 'date') + this.TimelinePRList = this.listBoxService.list(this.calendarService.eventSource, 'pr', this.rangeStartDate, this.rangeEndDate, 'date') this.myCal.update(); this.myCal.loadEvents(); @@ -714,7 +712,7 @@ export class AgendaPage implements OnInit { this.calendarService.pushEvent(eventsList, 'pr'); - this.TimelinePRList = this.eventListBoxComponent.list(this.calendarService.eventSource, 'pr', this.rangeStartDate, this.rangeEndDate, 'date') + this.TimelinePRList = this.listBoxService.list(this.calendarService.eventSource, 'pr', this.rangeStartDate, this.rangeEndDate, 'date') this.myCal.update(); @@ -741,8 +739,8 @@ export class AgendaPage implements OnInit { updateEventListBox() { - this.TimelinePRList = this.eventListBoxComponent.list(this.calendarService.eventSource, 'pr', this.rangeStartDate, this.rangeEndDate, 'date') - this.TimelineMDList = this.eventListBoxComponent.list(this.calendarService.eventSource, 'md', this.rangeStartDate, this.rangeEndDate, 'date') + this.TimelinePRList = this.listBoxService.list(this.calendarService.eventSource, 'pr', this.rangeStartDate, this.rangeEndDate, 'date') + this.TimelineMDList = this.listBoxService.list(this.calendarService.eventSource, 'md', this.rangeStartDate, this.rangeEndDate, 'date') } @@ -941,13 +939,13 @@ export class AgendaPage implements OnInit { if(this.profile == "mdgpr") { this.profile ="pr"; this.loadRangeEvents(this.rangeStartDate, this.rangeEndDate); - this.TimelineMDList = this.eventListBoxComponent.list(this.calendarService.eventSource, 'pr', this.rangeStartDate, this.rangeEndDate, 'date') + this.TimelineMDList = this.listBoxService.list(this.calendarService.eventSource, 'pr', this.rangeStartDate, this.rangeEndDate, 'date') } else { this.profile ="mdgpr"; this.loadRangeEvents(this.rangeStartDate, this.rangeEndDate); - this.TimelineMDList = this.eventListBoxComponent.list(this.calendarService.eventSource, 'md', this.rangeStartDate, this.rangeEndDate, 'date') + this.TimelineMDList = this.listBoxService.list(this.calendarService.eventSource, 'md', this.rangeStartDate, this.rangeEndDate, 'date') } } diff --git a/src/app/pages/events/events.page.html b/src/app/pages/events/events.page.html index 13052ad42..7ce9f393c 100644 --- a/src/app/pages/events/events.page.html +++ b/src/app/pages/events/events.page.html @@ -27,8 +27,8 @@ -
-
+
+
@@ -42,7 +42,7 @@ >
-
+
@@ -82,7 +82,7 @@
-
+
@@ -92,7 +92,7 @@
-
+
@@ -113,7 +113,6 @@
- +
+ +
+
+
+ +
+
+ + + +
+
+
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 fdef4a5bd..f4c28947b 100644 --- a/src/app/shared/agenda/edit-event/edit-event.page.ts +++ b/src/app/shared/agenda/edit-event/edit-event.page.ts @@ -31,7 +31,9 @@ export class EditEventPage implements OnInit { eventAttendees: EventPerson[]; // minDate: string; loadedEventAttachments: Attachment[]=[]; - recurringTypes: any; + recurringTypes = []; + selectedRecurringType: any; + public dateControlOccurrence = new FormControl(moment("DD MM YYYY hh")); public date: any; @@ -107,6 +109,7 @@ export class EditEventPage implements OnInit { ngOnInit() { this.dateControlOccurrence = new FormControl(moment(this.postEvent.EventRecurrence.LastOccurrence)); + if(!this.restoreTemporaryData()) { // clear diff --git a/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.module.ts b/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.module.ts index eb34ada4f..dab3db7f9 100644 --- a/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.module.ts +++ b/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.module.ts @@ -18,10 +18,10 @@ import { ReactiveFormsModule } from '@angular/forms'; import { MatButtonModule } from '@angular/material/button'; import { MatSelectModule } from '@angular/material/select'; import { NgxMatMomentModule } from '@angular-material-components/moment-adapter'; -import { MAT_DATE_LOCALE } from '@angular/material/core'; import { MatDatepickerModule } from '@angular/material/datepicker'; import { MatInputModule } from '@angular/material/input'; import { MatDialogModule } from '@angular/material/dialog'; +import { AttendeeModalPageModule } from 'src/app/shared/event/attendee-modal/attendee-modal.module'; @NgModule({ imports: [ @@ -41,6 +41,7 @@ import { MatDialogModule } from '@angular/material/dialog'; MatButtonModule, ReactiveFormsModule, MatDialogModule, + AttendeeModalPageModule, ], declarations: [ EditEventToApproveComponent diff --git a/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.html b/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.html index b20c12395..663009d0d 100644 --- a/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.html +++ b/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.html @@ -8,7 +8,7 @@
- Editar evento por aprovar + Editar evento por aprovar gg
@@ -68,13 +68,12 @@
-
-
+
-
+
-
+
@@ -305,7 +304,7 @@
-
+
diff --git a/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.ts b/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.ts index 49cc677c1..c7bc0343d 100644 --- a/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.ts +++ b/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.ts @@ -259,7 +259,6 @@ export class EditEventToApproveComponent implements OnInit { Category: this.eventProcess.workflowInstanceDataFields.Category } - console.log(event); this.eventsService.postEventToApproveEdit(event).subscribe(()=>{ this.toastService.successMessage('Evento editado'); @@ -342,7 +341,6 @@ export class EditEventToApproveComponent implements OnInit { addParticipants(){ this.adding = 'intervenient' this.openAttendees(); - console.log('LOGS'); } diff --git a/src/app/shared/header/header.page.ts b/src/app/shared/header/header.page.ts index 2c2ac03be..a0e0c561e 100644 --- a/src/app/shared/header/header.page.ts +++ b/src/app/shared/header/header.page.ts @@ -70,8 +70,6 @@ export class HeaderPage implements OnInit { this.storageservice.get("Notifications").then((value) => { console.log("Init get store", value) - if(value == 'žée') return false - /* var data = JSON.parse(value); */ this.notificationLength = value.length; }) diff --git a/src/app/store/localstore.service.ts b/src/app/store/localstore.service.ts index 7626ff8e7..221c3bf8a 100644 --- a/src/app/store/localstore.service.ts +++ b/src/app/store/localstore.service.ts @@ -14,11 +14,11 @@ export class LocalstoreService { this.set(key, this.prefix) } - getKey(keyName) { + getKey(keyName:string) { return this.prefix + keyName } - get( keyName, safe) { + get( keyName:string, safe) { keyName = this.getKey(keyName) @@ -40,7 +40,7 @@ export class LocalstoreService { } } - set(keyName, value) { + set(keyName:string, value) { keyName = this.getKey(keyName) @@ -55,7 +55,7 @@ export class LocalstoreService { localStorage.setItem(keyName, encoded) } - delete(keyName) { + delete(keyName:string) { keyName = this.getKey(keyName) localStorage.removeItem(keyName)