From d8d1fc7b0c745435920eb4fc516ae9b69361f9c5 Mon Sep 17 00:00:00 2001 From: Peter Maquiran Date: Mon, 4 Jul 2022 17:53:39 +0100 Subject: [PATCH 1/3] add skeleton to gabinete page --- .../pages/chat/messages/messages.page.html | 3 - .../gabinete-digital.page.html | 222 +++++++++--------- .../pendentes/pendentes.page.ts | 14 +- 3 files changed, 124 insertions(+), 115 deletions(-) diff --git a/src/app/pages/chat/messages/messages.page.html b/src/app/pages/chat/messages/messages.page.html index d00f37b80..09e4eb52c 100644 --- a/src/app/pages/chat/messages/messages.page.html +++ b/src/app/pages/chat/messages/messages.page.html @@ -1,8 +1,5 @@ -
diff --git a/src/app/pages/gabinete-digital/gabinete-digital.page.html b/src/app/pages/gabinete-digital/gabinete-digital.page.html index 3ea279daa..16823370d 100644 --- a/src/app/pages/gabinete-digital/gabinete-digital.page.html +++ b/src/app/pages/gabinete-digital/gabinete-digital.page.html @@ -98,41 +98,45 @@ - -
- -

-

-
-
- - -
- -

-

-
-
- - -
- -

-

-
-
- - -
- -

-

-
-
+ class="item-skeleton width-100 d-flex ion-no-border ion-no-margin ion-no-padding"> + +
+
+
+
+
+ + + + +
+
+
+
+
+ +
+ + +
+
+
+
+
+ +
+ + +
+
+
+
+
+ +
@@ -282,79 +286,87 @@ - -
- -

-

-
-
- - -
- -

-

-
-
- - -
- -

-

-
-
- - -
- -

-

-
-
+ class="item-skeleton width-100 d-flex ion-no-border ion-no-margin ion-no-padding"> + +
+
+
+
+
+ + + + +
+
+
+
+
+ +
+ + +
+
+
+
+
+ +
+ + +
+
+
+
+
+ +
- -
- -

-

-
-
- - -
- -

-

-
-
- - -
- -

-

-
-
- - -
- -

-

-
-
+ class="item-skeleton width-100 d-flex ion-no-border ion-no-margin ion-no-padding"> + +
+
+
+
+
+ + + + +
+
+
+
+
+ +
+ + +
+
+
+
+
+ +
+ + +
+
+
+
+
+ +
diff --git a/src/app/shared/gabinete-digital/pendentes/pendentes.page.ts b/src/app/shared/gabinete-digital/pendentes/pendentes.page.ts index db9bb0e79..76984ad0f 100644 --- a/src/app/shared/gabinete-digital/pendentes/pendentes.page.ts +++ b/src/app/shared/gabinete-digital/pendentes/pendentes.page.ts @@ -35,7 +35,7 @@ export class PendentesPage implements OnInit { private storage: Storage ) { this.loggeduser = authService.ValidatedUser; - } + } ngOnInit() { @@ -80,13 +80,13 @@ export class PendentesPage implements OnInit { } }) -} + } -getFromDb() { - this.storage.get('pendente-list').then((pendentes) => { - this.listToPresent =pendentes - }) -} + getFromDb() { + this.storage.get('pendente-list').then((pendentes) => { + this.listToPresent =pendentes + }) + } doRefresh() { setTimeout(()=>{ From e625fbfeb2860cf1aa6a203953750d78430225b8 Mon Sep 17 00:00:00 2001 From: Peter Maquiran Date: Mon, 4 Jul 2022 18:15:55 +0100 Subject: [PATCH 2/3] fix agenda calendar names --- src/app/services/events.service.ts | 56 +++++++++---------- .../shared/agenda/new-event/new-event.page.ts | 8 +-- 2 files changed, 32 insertions(+), 32 deletions(-) diff --git a/src/app/services/events.service.ts b/src/app/services/events.service.ts index b018aac9f..cc02c8c08 100644 --- a/src/app/services/events.service.ts +++ b/src/app/services/events.service.ts @@ -225,7 +225,6 @@ export class EventsService { } }); - for (let sharedCalendar of this.loggeduser.SharedCalendars) { @@ -252,38 +251,39 @@ export class EventsService { this.headerSharedPessoal = this.headerSharedPessoal.set('CalendarRoleId', sharedCalendar.CalendarRoleId); this.headerSharedPessoal = this.headerSharedPessoal.set('CalendarName', sharedCalendar.CalendarName); } + } - for (let sharedCalendar of this.loggeduser.SharedCalendars) { - if(sharedCalendar?.OwnerUserId) { - this.GetCalendarName(sharedCalendar.OwnerUserId).subscribe((e)=> { - this.calendarNames[sharedCalendar.CalendarId] = e.FullName - this.myCalendarNames[sharedCalendar.CalendarId] = e.FullName - if(!this.calendarNamesAry.includes(e.FullName)) { - this.calendarNamesAry.push(e.FullName) - this.calendarNamesType[e.FullName] = {} - } + for (let sharedCalendar of this.loggeduser.SharedCalendars) { + if(sharedCalendar?.OwnerUserId) { + this.GetCalendarName(sharedCalendar.OwnerUserId).subscribe((e)=> { + this.calendarNames[sharedCalendar.CalendarId] = e.FullName + this.myCalendarNames[sharedCalendar.CalendarId] = e.FullName - this.calendarNamesType[e.FullName][sharedCalendar.CalendarName] = true - this.calendarNamesType[e.FullName][sharedCalendar.CalendarName+'Id'] = sharedCalendar.CalendarId - - }) - } - + if(!this.calendarNamesAry.includes(e.FullName)) { + this.calendarNamesAry.push(e.FullName) + this.calendarNamesType[e.FullName] = {} + } + + this.calendarNamesType[e.FullName][sharedCalendar.CalendarName] = true + this.calendarNamesType[e.FullName][sharedCalendar.CalendarName+'Id'] = sharedCalendar.CalendarId + + }) + } + + } + + for (let sharedCalendar of this.loggeduser.OwnerCalendars) { + + this.calendarNames[sharedCalendar.CalendarId] = 'Meu calendario' + + if(!this.calendarNamesAry.includes('Meu calendario')) { + this.calendarNamesAry.push('Meu calendario') + this.calendarNamesType['Meu calendario'] = {} } - for (let sharedCalendar of this.loggeduser.OwnerCalendars) { - - this.calendarNames[sharedCalendar.CalendarId] = 'Meu calendario' - - if(!this.calendarNamesAry.includes('Meu calendario')) { - this.calendarNamesAry.push('Meu calendario') - this.calendarNamesType['Meu calendario'] = {} - } - - this.calendarNamesType['Meu calendario'][sharedCalendar.CalendarName] = true - this.calendarNamesType['Meu calendario'][sharedCalendar.CalendarName+'Id'] = sharedCalendar.CalendarId - } + this.calendarNamesType['Meu calendario'][sharedCalendar.CalendarName] = true + this.calendarNamesType['Meu calendario'][sharedCalendar.CalendarName+'Id'] = sharedCalendar.CalendarId } } } diff --git a/src/app/shared/agenda/new-event/new-event.page.ts b/src/app/shared/agenda/new-event/new-event.page.ts index ecec57ed6..16ed46908 100644 --- a/src/app/shared/agenda/new-event/new-event.page.ts +++ b/src/app/shared/agenda/new-event/new-event.page.ts @@ -165,7 +165,7 @@ export class NewEventPage implements OnInit { this.eventBody = { BodyType : "1", Text : ""}; this.postEvent.Body = this.eventBody; - if(this.selectedSegment != "Combinada"){ + if(this.selectedSegment != "Combinada") { this.postEvent ={ EventId: '', Subject: '', @@ -188,7 +188,7 @@ export class NewEventPage implements OnInit { }; } else{ - this.postEvent ={ + this.postEvent = { EventId: '', Subject: '', Body: this.eventBody, @@ -207,11 +207,11 @@ export class NewEventPage implements OnInit { Category: 'Reunião', HasAttachments: false, EventRecurrence: {Type:'-1',LastOccurrence:this.autoEndTime}, - }; + } } if(this.postEvent.Attendees != null) { - this.postEvent.Attendees.forEach(e =>{ + this.postEvent.Attendees.forEach(e => { if(e.IsRequired) { this.taskParticipants.push(e); } else { From 744883bd6a9a7c0bc6c8ec3351a02a3f92d1e52d Mon Sep 17 00:00:00 2001 From: Peter Maquiran Date: Mon, 4 Jul 2022 19:13:28 +0100 Subject: [PATCH 3/3] fix, agenda list box not showing --- src/app/pages/agenda/agenda.page.html | 6 +++--- src/app/pages/agenda/agenda.page.ts | 8 +++++-- src/app/services/events.service.ts | 21 ++++++++++++++----- .../agenda/view-event/view-event.page.ts | 3 +++ 4 files changed, 28 insertions(+), 10 deletions(-) diff --git a/src/app/pages/agenda/agenda.page.html b/src/app/pages/agenda/agenda.page.html index 86e045240..b62c42f52 100644 --- a/src/app/pages/agenda/agenda.page.html +++ b/src/app/pages/agenda/agenda.page.html @@ -293,7 +293,7 @@
-
+
@@ -333,8 +333,8 @@
- -
+ +
diff --git a/src/app/pages/agenda/agenda.page.ts b/src/app/pages/agenda/agenda.page.ts index a5a9765a6..88cbdc9c2 100644 --- a/src/app/pages/agenda/agenda.page.ts +++ b/src/app/pages/agenda/agenda.page.ts @@ -212,7 +212,7 @@ export class AgendaPage implements OnInit { } else if (this.loggeduser.Profile == 'PR') { this.profile = "pr"; } else { - if(this.eventService.calendarIds.length >= 2) { + if(this.eventService.usersCalendarIds.length >= 2) { this.profile = "mdgpr"; } else if (this.eventService.hasOwnCalendar) { this.profile = "mdgpr"; @@ -804,6 +804,8 @@ export class AgendaPage implements OnInit { this.addEventToDB(response, "md"); let eventsList = response; + + console.log('response', response); this.CalendarStore.removeRange(startTime, endTime, 'md') @@ -813,7 +815,9 @@ export class AgendaPage implements OnInit { this.listToPresent = this.CalendarStore.eventSource this.TimelineMDList = this.listBoxService.list(this.listToPresent, 'md', this.rangeStartDate, this.rangeEndDate, { segment: this.segment, selectedDate: this.eventSelectedDate }) - + + console.log('this.TimelineMDList', this.TimelineMDList); + this.myCal.update(); this.myCal.loadEvents(); diff --git a/src/app/services/events.service.ts b/src/app/services/events.service.ts index cc02c8c08..572de619c 100644 --- a/src/app/services/events.service.ts +++ b/src/app/services/events.service.ts @@ -42,6 +42,8 @@ export class EventsService { calendarIds = [] + usersCalendarIds = [] + hasSharedOficial: boolean = false; hasSharedPessoal: boolean = false; hasOwnOficial: boolean = false; @@ -122,7 +124,7 @@ export class EventsService { this.userCalendarNameOwnOficial = ''; this.userCalendarNameOwnPessoal = ''; - this.calendarIds = []; + this.usersCalendarIds = []; this.calendarNames = {} this.calendarNamesAry = [] @@ -200,9 +202,14 @@ export class EventsService { this.loggeduser.OwnerCalendars.forEach(calendar => { - if(!this.calendarIds.includes(calendar.OwnerUserId)) { - this.calendarIds.push(calendar.OwnerUserId) + if(!this.usersCalendarIds.includes(calendar.OwnerUserId)) { + this.usersCalendarIds.push(calendar.OwnerUserId) } + + if(!this.calendarIds.includes(calendar.CalendarId)) { + this.calendarIds.push(calendar.CalendarId) + } + this.hasOwnCalendar = true if (calendar.CalendarName == 'Oficial') { @@ -228,8 +235,12 @@ export class EventsService { for (let sharedCalendar of this.loggeduser.SharedCalendars) { - if(!this.calendarIds.includes(sharedCalendar.OwnerUserId)) { - this.calendarIds.push(sharedCalendar.OwnerUserId) + if(!this.usersCalendarIds.includes(sharedCalendar.OwnerUserId)) { + this.usersCalendarIds.push(sharedCalendar.OwnerUserId) + } + + if(!this.calendarIds.includes(sharedCalendar.CalendarId)) { + this.calendarIds.push(sharedCalendar.CalendarId) } this.hasSharedCalendar = true diff --git a/src/app/shared/agenda/view-event/view-event.page.ts b/src/app/shared/agenda/view-event/view-event.page.ts index 2ba00dd4d..b961de149 100644 --- a/src/app/shared/agenda/view-event/view-event.page.ts +++ b/src/app/shared/agenda/view-event/view-event.page.ts @@ -65,9 +65,12 @@ export class ViewEventPage implements OnInit { this.loadedEvent = new Event(); this.eventBody = { BodyType : "1", Text : ""}; this.loadedEvent.Body = this.eventBody; + + } ngOnInit() { + this.loadEvent(); }