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 b78c3b45c..ac883e43d 100644
--- a/src/app/modals/profile/edit-profile/edit-profile.page.html
+++ b/src/app/modals/profile/edit-profile/edit-profile.page.html
@@ -10,15 +10,17 @@
-
GABINETE DIGITAL
+
Presidente da República
+
GABINETE DIGITAL
-
GABINETE DIGITAL
+
Presidente da República
+
GABINETE DIGITAL
diff --git a/src/app/modals/profile/profile.page.html b/src/app/modals/profile/profile.page.html
index b38f1be0f..748cc3ee3 100644
--- a/src/app/modals/profile/profile.page.html
+++ b/src/app/modals/profile/profile.page.html
@@ -9,15 +9,17 @@
-
GABINETE DIGITAL
+
Presidente da República
+
GABINETE DIGITAL
-
GABINETE DIGITAL
+
Presidente da República
+
GABINETE DIGITAL
diff --git a/src/app/pages/events/events.page.ts b/src/app/pages/events/events.page.ts
index 92769a9e4..f87892e88 100644
--- a/src/app/pages/events/events.page.ts
+++ b/src/app/pages/events/events.page.ts
@@ -82,62 +82,62 @@ export class EventsPage implements OnInit {
) {
- // window['zipPhoneCallback'] = function (zipphone) {
- // var frame = document.getElementById('home-iframe');
- // if(frame) {
- // frame['contentWindow']['postMessage']({call:'cookies', value: { cookies: {} }});
- // }
- // }
+ window['zipPhoneCallback'] = function (zipphone) {
+ var frame = document.getElementById('home-iframe');
+ if(frame) {
+ frame['contentWindow']['postMessage']({call:'cookies', value: { cookies: {} }});
+ }
+ }
- // this.changeProfileService.registerCallback(() => {
+ this.changeProfileService.registerCallback(() => {
- // this.listToPresent = [];
- // this.listToPresentexpediente = []
- // })
+ this.listToPresent = [];
+ this.listToPresentexpediente = []
+ })
}
ngOnInit() {
- // this.showGreeting();
+ this.showGreeting();
- // this.router.events.forEach((event) => {
- // if (event instanceof NavigationEnd && event.url == '/home/events') {
- // this.RefreshEvents();
- // setTimeout(() => {
- // this.LoadList();
- // }, 1500)
- // }
- // });
- // this.hideSearch();
+ this.router.events.forEach((event) => {
+ if (event instanceof NavigationEnd && event.url == '/home/events') {
+ this.RefreshEvents();
+ setTimeout(() => {
+ this.LoadList();
+ }, 1500)
+ }
+ });
+ this.hideSearch();
- // this.backgroundservice.registerBackService('Online', () => {
- // this.showGreeting();
- // this.RefreshEvents();
- // this.LoadList();
- // this.hideSearch();
- // });
+ this.backgroundservice.registerBackService('Online', () => {
+ this.showGreeting();
+ this.RefreshEvents();
+ this.LoadList();
+ this.hideSearch();
+ });
}
hideSearch() {
- // if (this.router.url == '/home/events') {
- // this.hideSearchBtn = true;
- // }
+ if (this.router.url == '/home/events') {
+ this.hideSearchBtn = true;
+ }
}
doRefresh() {
- // this.RefreshEvents();
- // this.LoadList();
+ this.RefreshEvents();
+ this.LoadList();
}
onSegmentChange() {
- // this.doRefresh();
+ this.doRefresh();
}
async RefreshEvents() {
- console.log('im here')
+
this.currentEvent = "";
this.showLoader = true;
this.showAgendaLoader = true;
@@ -156,185 +156,184 @@ export class EventsPage implements OnInit {
this.showLoader = false;
this.showAgendaLoader = false;
} else {
- this.showLoader = true;
- this.showAgendaLoader = true;
+
}
}
addEventToDb(list) {
- // if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
- // this.storage.set('events', list).then(() => {
- // //
- // })
- // } else {
- // if (list.length > 0) {
- // list.forEach(element => {
- // this.sqliteservice.addEvent(element)
+ if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
+ this.storage.set('events', list).then(() => {
+ //
+ })
+ } else {
+ if (list.length > 0) {
+ list.forEach(element => {
+ this.sqliteservice.addEvent(element)
- // this.sqliteservice.getAllEvents().then((event: any[] = []) => {
- // let todayEvents = new Array()
- // event.forEach((element) => {
- // let eventObject = {
- // AppointmentState: element.AppointmentState,
- // Attachments: element.Attachments,
- // Attendees: element.Attendees,
- // CalendarId: element.CalendarId,
- // CalendarName: element.CalendarName,
- // Category: element.Category,
- // EndDate: element.EndDate,
- // EventId: element.EventId,
- // EventRecurrence: element.EventRecurrence,
- // EventType: element.EventType,
- // HasAttachments: element.HasAttachments,
- // HumanDate: element.HumanDate,
- // IsAllDayEvent: element.IsAllDayEvent,
- // IsMeeting: element.IsMeeting,
- // IsRecurring: element.IsRecurring,
- // Location: element.Location,
- // Organizer: element.Organizer,
- // Profile: element.Profile,
- // StartDate: element.StartDate,
- // Subject: element.Subject
- // }
- // todayEvents.push(eventObject);
- // })
+ this.sqliteservice.getAllEvents().then((event: any[] = []) => {
+ let todayEvents = new Array()
+ event.forEach((element) => {
+ let eventObject = {
+ AppointmentState: element.AppointmentState,
+ Attachments: element.Attachments,
+ Attendees: element.Attendees,
+ CalendarId: element.CalendarId,
+ CalendarName: element.CalendarName,
+ Category: element.Category,
+ EndDate: element.EndDate,
+ EventId: element.EventId,
+ EventRecurrence: element.EventRecurrence,
+ EventType: element.EventType,
+ HasAttachments: element.HasAttachments,
+ HumanDate: element.HumanDate,
+ IsAllDayEvent: element.IsAllDayEvent,
+ IsMeeting: element.IsMeeting,
+ IsRecurring: element.IsRecurring,
+ Location: element.Location,
+ Organizer: element.Organizer,
+ Profile: element.Profile,
+ StartDate: element.StartDate,
+ Subject: element.Subject
+ }
+ todayEvents.push(eventObject);
+ })
- // })
- // });
- // }
- // }
+ })
+ });
+ }
+ }
}
addProcessToDb(list) {
- // if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
- // this.storage.set('process', list).then(() => {
- // //
- // })
- // } else {
- // if (list.length > 0) {
- // list.forEach(element => {
- // this.sqliteservice.addProcess(element)
- // });
- // }
- // }
+ if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
+ this.storage.set('process', list).then(() => {
+ //
+ })
+ } else {
+ if (list.length > 0) {
+ list.forEach(element => {
+ this.sqliteservice.addProcess(element)
+ });
+ }
+ }
}
getEventsFromLocalDb() {
- // let date = new Date();
- // let month = date.getMonth() + 1;
- // //date.setMonth(date.getMonth() + 1);
- // let dateToday = date.getFullYear() + "-" + month + "-" + date.getDate();
- // // ('dateeeeee', dateToday)
- // if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
- // this.storage.get('events').then((events: any[] = []) => {
- // //
- // let todayEvents = new Array()
- // this.listToPresent = events
- // this.totalEvent = this.listToPresent.length
- // this.currentEvent = this.listToPresent[0].Subject
- // this.currentHoursMinutes = this.listToPresent[0].StartDate
- // //
- // })
+ let date = new Date();
+ let month = date.getMonth() + 1;
+ //date.setMonth(date.getMonth() + 1);
+ let dateToday = date.getFullYear() + "-" + month + "-" + date.getDate();
+ // ('dateeeeee', dateToday)
+ if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
+ this.storage.get('events').then((events: any[] = []) => {
+ //
+ let todayEvents = new Array()
+ this.listToPresent = events
+ this.totalEvent = this.listToPresent.length
+ this.currentEvent = this.listToPresent[0].Subject
+ this.currentHoursMinutes = this.listToPresent[0].StartDate
+ //
+ })
- // this.storage.get('process').then((process: any[] = []) => {
- // //
- // const ExpedienteTask = process.map(e => this.expedienteTaskPipe.transform(e))
- // this.listToPresentexpediente = ExpedienteTask;
- // })
+ this.storage.get('process').then((process: any[] = []) => {
+ //
+ const ExpedienteTask = process.map(e => this.expedienteTaskPipe.transform(e))
+ this.listToPresentexpediente = ExpedienteTask;
+ })
- // this.showLoader = false;
+ this.showLoader = false;
- // } else {
- // this.sqliteservice.getAllEvents().then((event: any[] = []) => {
- // let todayEvents = new Array()
- // event.forEach((element) => {
- // let eventObject = {
- // AppointmentState: element.AppointmentState,
- // Attachments: element.Attachments,
- // Attendees: element.Attendees,
- // CalendarId: element.CalendarId,
- // CalendarName: element.CalendarName,
- // Category: element.Category,
- // EndDate: element.EndDate,
- // EventId: element.EventId,
- // EventRecurrence: element.EventRecurrence,
- // EventType: element.EventType,
- // HasAttachments: element.HasAttachments,
- // HumanDate: element.HumanDate,
- // IsAllDayEvent: element.IsAllDayEvent,
- // IsMeeting: element.IsMeeting,
- // IsRecurring: element.IsRecurring,
- // Location: element.Location,
- // Organizer: element.Organizer,
- // Profile: element.Profile,
- // StartDate: element.StartDate,
- // Subject: element.Subject
- // }
- // let starteDate = momentG(new Date(element.StartDate), 'yyyy-MM-dd');
- // //
- // if (dateToday == starteDate) {
- // todayEvents.push(eventObject);
- // }
- // })
- // this.listToPresent = todayEvents
- // this.totalEvent = this.listToPresent.length
- // this.currentEvent = this.listToPresent[0].Subject
- // this.currentHoursMinutes = this.listToPresent[0].StartDate
- // //
- // })
+ } else {
+ this.sqliteservice.getAllEvents().then((event: any[] = []) => {
+ let todayEvents = new Array()
+ event.forEach((element) => {
+ let eventObject = {
+ AppointmentState: element.AppointmentState,
+ Attachments: element.Attachments,
+ Attendees: element.Attendees,
+ CalendarId: element.CalendarId,
+ CalendarName: element.CalendarName,
+ Category: element.Category,
+ EndDate: element.EndDate,
+ EventId: element.EventId,
+ EventRecurrence: element.EventRecurrence,
+ EventType: element.EventType,
+ HasAttachments: element.HasAttachments,
+ HumanDate: element.HumanDate,
+ IsAllDayEvent: element.IsAllDayEvent,
+ IsMeeting: element.IsMeeting,
+ IsRecurring: element.IsRecurring,
+ Location: element.Location,
+ Organizer: element.Organizer,
+ Profile: element.Profile,
+ StartDate: element.StartDate,
+ Subject: element.Subject
+ }
+ let starteDate = momentG(new Date(element.StartDate), 'yyyy-MM-dd');
+ //
+ if (dateToday == starteDate) {
+ todayEvents.push(eventObject);
+ }
+ })
+ this.listToPresent = todayEvents
+ this.totalEvent = this.listToPresent.length
+ this.currentEvent = this.listToPresent[0].Subject
+ this.currentHoursMinutes = this.listToPresent[0].StartDate
+ //
+ })
- // this.sqliteservice.getprocessByworkflow("Expediente").then((process: any[] = []) => {
+ this.sqliteservice.getprocessByworkflow("Expediente").then((process: any[] = []) => {
- // //
+ //
- // if (process.length > 0 || process != undefined) {
+ if (process.length > 0 || process != undefined) {
- // var expedientlist: any = new Array();
- // process.forEach((element) => {
- // if(JSON.parse(element.workflowInstanceDataFields).TaskMessage || JSON.parse(element.workflowInstanceDataFields).Note) {
+ var expedientlist: any = new Array();
+ process.forEach((element) => {
+ if(JSON.parse(element.workflowInstanceDataFields).TaskMessage || JSON.parse(element.workflowInstanceDataFields).Note) {
- // let task = {
- // activityInstanceName: element.activityInstanceName,
- // deadline: null,
- // serialNumber: element.serialNumber,
- // taskStartDate: element.taskStartDate,
- // totalDocuments: element.totalDocuments,
- // workflowDisplayName: element.workflowDisplayName,
- // workflowInstanceDataFields: JSON.parse(element.workflowInstanceDataFields)
- // }
- // expedientlist.push(task);
+ let task = {
+ activityInstanceName: element.activityInstanceName,
+ deadline: null,
+ serialNumber: element.serialNumber,
+ taskStartDate: element.taskStartDate,
+ totalDocuments: element.totalDocuments,
+ workflowDisplayName: element.workflowDisplayName,
+ workflowInstanceDataFields: JSON.parse(element.workflowInstanceDataFields)
+ }
+ expedientlist.push(task);
- // }
- // })
+ }
+ })
- // //
- // const ExpedienteTask = expedientlist.map(e => this.expedienteTaskPipe.transform(e))
- // this.listToPresentexpediente = ExpedienteTask;
+ //
+ const ExpedienteTask = expedientlist.map(e => this.expedienteTaskPipe.transform(e))
+ this.listToPresentexpediente = ExpedienteTask;
- // }
+ }
- // this.showLoader = false;
- // })
- // }
- // // });
+ this.showLoader = false;
+ })
+ }
+ // });
}
showGreeting() {
- // if (this.today.getHours() >= 6 && this.today.getHours() < 12) {
- // this.greetting = this.grettings[0];
- // }
- // else if (this.today.getHours() >= 12 && this.today.getHours() < 18) {
- // this.greetting = this.grettings[1];
- // }
- // else /* if(this.today.getHours() < 6 && this.today.getHours() >= 18) */ {
- // this.greetting = this.grettings[2];
- // }
+ if (this.today.getHours() >= 6 && this.today.getHours() < 12) {
+ this.greetting = this.grettings[0];
+ }
+ else if (this.today.getHours() >= 12 && this.today.getHours() < 18) {
+ this.greetting = this.grettings[1];
+ }
+ else /* if(this.today.getHours() < 6 && this.today.getHours() >= 18) */ {
+ this.greetting = this.grettings[2];
+ }
}
gotTo() {
@@ -342,16 +341,16 @@ export class EventsPage implements OnInit {
}
changeProfile() {
- // if (this.profile == "mdgpr") {
- // //
- // this.profile = "pr";
- // this.RefreshEvents();
- // }
- // else {
- // //
- // this.profile = "mdgpr";
- // this.RefreshEvents();
- // }
+ if (this.profile == "mdgpr") {
+ //
+ this.profile = "pr";
+ this.RefreshEvents();
+ }
+ else {
+ //
+ this.profile = "mdgpr";
+ this.RefreshEvents();
+ }
}
async openEventDetail1(id: any) {
@@ -443,9 +442,4 @@ export class EventsPage implements OnInit {
}
}
-
-
-}
-
-
-
+}
\ No newline at end of file
diff --git a/src/app/shared/header/header.page.html b/src/app/shared/header/header.page.html
index 35919d65b..4c3a5e947 100644
--- a/src/app/shared/header/header.page.html
+++ b/src/app/shared/header/header.page.html
@@ -19,14 +19,16 @@
-
GABINETE DIGITAL
+
Presidente da República
+
GABINETE DIGITAL
-
GABINETE DIGITAL
+
Presidente da República
+
GABINETE DIGITAL