mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
fix bug
This commit is contained in:
@@ -33,7 +33,6 @@
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="icon-only" src="assets/images/icons-calendar-arrow-left.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="icon-only" src="assets/images/theme/gov/icons-calendar-arrow-left.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " slot="icon-only" src="assets/images/theme/{{ThemeService.currentTheme}}/icons-calendar-arrow-left.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'tribunal' " slot="icon-only" src="assets/images/theme/gov/icons-calendar-arrow-left.svg"></ion-icon>
|
||||
</button>
|
||||
|
||||
</div>
|
||||
@@ -45,7 +44,6 @@
|
||||
<div (click)="dropdownScrollWeal = true; onDropDownScrollWeal()" class="cursor-pointer">
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " style="font-size: 19pt;" src="assets/images/icons-arrow-arrow-down.svg" ></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " style="font-size: 19pt;" src="assets/images/theme/gov/icons-arrow-arrow-down.svg" ></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'tribunal' " style="font-size: 19pt;" src="assets/images/theme/gov/icons-arrow-arrow-down.svg" ></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " slot="icon-only" src="assets/images/theme/{{ThemeService.currentTheme}}/icons-arrow-arrow-down.svg"></ion-icon>
|
||||
</div>
|
||||
|
||||
@@ -99,7 +97,6 @@
|
||||
<div (click)="next()" class="arrow cursor-pointer resize">
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="icon-only" src="assets/images/icons-calendar-arrow-right.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="icon-only" src="assets/images/theme/gov/icons-calendar-arrow-right.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'tribunal' " slot="icon-only" src="assets/images/theme/gov/icons-calendar-arrow-right.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " slot="icon-only" src="assets/images/theme/{{ThemeService.currentTheme}}/icons-calendar-arrow-right.svg"></ion-icon>
|
||||
</div>
|
||||
|
||||
@@ -129,7 +126,6 @@
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="right-icons" src="assets/images/icons-received-event.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && !mobileComponent.showEventList" class="right-icons" src="assets/images/theme/gov/icons-received-event.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && mobileComponent.showEventList" class="right-icons" src="assets/images/theme/gov/icons-received-event-selected.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'tribunal' " class="right-icons" src="assets/images/theme/tribunal/icons-received-event.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " class="right-icons" src="assets/images/theme/{{ThemeService.currentTheme}}/icons-received-event.svg"></ion-icon>
|
||||
</button>
|
||||
|
||||
@@ -137,7 +133,6 @@
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="right-icons" src="assets/images/icons-add.svg" ></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && !mobileComponent.showAddNewEvent" class="right-icons" src="assets/images/theme/gov/icons-add.svg" ></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && mobileComponent.showAddNewEvent" class="right-icons" src="assets/images/theme/gov/icons-add-selected.svg" ></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'tribunal' " class="right-icons" src="assets/images/theme/tribunal/icons-add.svg" ></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " class="right-icons" slot="icon-only" src="assets/images/theme/{{ThemeService.currentTheme}}/icons-add.svg"></ion-icon>
|
||||
</button>
|
||||
|
||||
@@ -200,14 +195,12 @@
|
||||
<button class="btn-no-color" *ngIf="showCalendar" (click)="calendarHeight='75px';showCalendar=false">
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="collaps btn-no-color" src="assets/images/icons-collaps-up.svg" ></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="collaps btn-no-color" src="assets/images/theme/gov/icons-collaps-up.svg" ></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'tribunal' " class="collaps btn-no-color" src="assets/images/theme/tribunal/icons-collaps-up.svg" ></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " class="collaps btn-no-color" src="assets/images/theme/{{ThemeService.currentTheme}}/icons-collaps-up.svg"></ion-icon>
|
||||
</button>
|
||||
<button class="btn-no-color" *ngIf="!showCalendar" (click)="calendarHeight='356px';showCalendar=true">
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="collaps btn-no-color" src="assets/images/icons-collaps-down.svg" ></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="collaps btn-no-color" src="assets/images/theme/gov/icons-collaps-down.svg" ></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " class="collaps btn-no-color" src="assets/images/theme/{{ThemeService.currentTheme}}/icons-collaps-down.svg" ></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'tribunal' " class="collaps btn-no-color" src="assets/images/theme/tribunal/icons-collaps-down.svg" ></ion-icon>
|
||||
</button >
|
||||
|
||||
</ion-row>
|
||||
@@ -221,7 +214,6 @@
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " style="font-size: 19pt;" src="assets/images/icons-arrow-arrow-down.svg" ></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " style="font-size: 19pt;" src="assets/images/theme/gov/icons-arrow-arrow-down.svg" ></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " style="font-size: 19pt;" src="assets/images/theme/{{ThemeService.currentTheme}}/icons-arrow-arrow-down.svg" ></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'tribunal' " style="font-size: 19pt;" src="assets/images/theme/gov/icons-arrow-arrow-down.svg" ></ion-icon>
|
||||
</button>
|
||||
|
||||
<!-- List -->
|
||||
@@ -234,13 +226,13 @@
|
||||
</ion-row>
|
||||
</ion-row>
|
||||
|
||||
<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="SessionStore.user.Profile == 'PR' || SessionStore.user.Profile == 'MDGPR'">Meu Calendário</div>
|
||||
<div class="calendar-title-container px-20 d-none d-md-flex">
|
||||
<div class="calendar-title-description flex-grow-1 text-grey d-flex justify-center align-center" *ngIf="eventService.hasOwnCalendar">
|
||||
<div >Meu Calendário</div>
|
||||
</div>
|
||||
<div class="calendar-title-description text-black align-center">
|
||||
<div class="calendar-title-description text-black align-center" *ngIf="eventService.hasSharedCalendar">
|
||||
<div class="flex-grow-1 text-grey d-flex justify-center align-center">
|
||||
<div *ngIf="SessionStore.user.Profile == 'PR' || SessionStore.user.Profile == 'MDGPR'">Calendário Partilhado</div>
|
||||
<div >Calendário Partilhado</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -250,7 +242,6 @@
|
||||
|
||||
</div>
|
||||
<div class="timeline-wrapper flex-grow-1 height-100" >
|
||||
<!-- Timeline -->
|
||||
|
||||
<div class="height-100">
|
||||
<div class="timeline-container height-100 d-flex pt-20 pl-20 pl-20 filter-{{segment}}" >
|
||||
|
||||
@@ -745,46 +745,40 @@ export class AgendaPage implements OnInit {
|
||||
} else if(this.loggeduser.Profile == 'PR') {
|
||||
|
||||
// view PR calendar with PR profile
|
||||
this.eventService.getAllPrEvents(momentG(new Date(startTime), 'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime), 'yyyy-MM-dd 23:59:59')).then((response: any) => {
|
||||
if(this.loggeduser.OwnerCalendars.length != 0 ) {
|
||||
|
||||
this.addEventToDB(response, "pr");
|
||||
let eventsList;
|
||||
if (this.segment == 'Oficial') {
|
||||
eventsList = response.filter(data => data.CalendarName == "Oficial");
|
||||
} else if (this.segment == 'Pessoal') {
|
||||
eventsList = response.filter(data => data.CalendarName == "Pessoal");
|
||||
} else {
|
||||
eventsList = response;
|
||||
}
|
||||
this.eventService.getAllOwnEvents(momentG(new Date(startTime), 'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime), 'yyyy-MM-dd 23:59:59')).then((response: any) => {
|
||||
|
||||
// clear the current month only
|
||||
this.CalendarStore.removeRange(startTime, endTime, 'pr')
|
||||
this.addEventToDB(response, "pr");
|
||||
let eventsList = response;
|
||||
|
||||
this.CalendarStore.removeRange(startTime, endTime, 'pr')
|
||||
|
||||
// loop
|
||||
this.CalendarStore.pushEvent(eventsList, 'pr');
|
||||
|
||||
this.listToPresent = this.CalendarStore.eventSource
|
||||
|
||||
this.TimelineMDList = this.listBoxService.list(this.listToPresent, 'pr', this.rangeStartDate, this.rangeEndDate, { segment: this.segment, selectedDate: this.eventSelectedDate })
|
||||
|
||||
// console.log('this.TimelineMDList', this.TimelineMDList);
|
||||
|
||||
this.CalendarStore.pushEvent(eventsList, 'pr');
|
||||
this.listToPresent = this.CalendarStore.eventSource
|
||||
|
||||
this.TimelinePRList = this.listBoxService.list(this.listToPresent, 'pr', this.rangeStartDate, this.rangeEndDate, { segment: this.segment, selectedDate: this.eventSelectedDate })
|
||||
|
||||
|
||||
//
|
||||
this.myCal.update();
|
||||
this.myCal.loadEvents();
|
||||
|
||||
this.showTimelinePR = true;
|
||||
|
||||
counter++;
|
||||
|
||||
if (counter == 1 || this.loggeduser.Profile == 'PR') {
|
||||
this.myCal.update();
|
||||
this.myCal.loadEvents();
|
||||
|
||||
this.showTimelineMD = true;
|
||||
|
||||
this.showLoader = false;
|
||||
}
|
||||
|
||||
}).catch((error) => {
|
||||
this.getFromDB()
|
||||
}).finally(() => {
|
||||
if (counter == 1 || this.loggeduser.Profile == 'PR') {
|
||||
|
||||
|
||||
}).catch((error) => {
|
||||
this.getFromDB()
|
||||
}).finally(() => {
|
||||
this.showLoader = false;
|
||||
}
|
||||
})
|
||||
})
|
||||
} else {
|
||||
this.showLoader = false;
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user