mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
fix calendar name
This commit is contained in:
@@ -56,25 +56,22 @@
|
||||
|
||||
|
||||
<!-- Debug line to print data -->
|
||||
<mat-form-field class="select-calendar" appearance="none" color="ion-color-secondary" placeholder="Selecione agenda" *ngIf="calendarData?.length && showCalendarField">
|
||||
<mat-select [(value)]="selectedUserCalendar" (selectionChange)="reloadCalendar()" >
|
||||
<mat-form-field class="select-calendar" appearance="none" color="ion-color-secondary" placeholder="Selecione agenda" *ngIf="calendarData?.length && showCalendarField" (click)="hasChangeCalendar=true">
|
||||
<div *ngIf="selectedUserCalendar != SessionStore.user.UserId && !hasChangeCalendar " style="margin-bottom: -20px;">PR </div>
|
||||
<div *ngIf="selectedUserCalendar == SessionStore.user.UserId && !hasChangeCalendar " style="margin-bottom: -20px;">
|
||||
Minha agenda
|
||||
</div>
|
||||
|
||||
<mat-select [(value)]="selectedUserCalendar" (selectionChange)="reloadCalendar();changeSegmentCalendar();" >
|
||||
|
||||
|
||||
<mat-option *ngFor="let calendars of calendarData" value="{{calendars.wxUserId}}">
|
||||
|
||||
<div *ngIf="environment.presidential">
|
||||
<div *ngIf="calendars.roleId == RoleIdService.PRES"> PR </div>
|
||||
<div *ngIf="calendars.roleId == RoleIdService.MD"> MDGPR </div>
|
||||
<div *ngIf="calendars.roleId != RoleIdService.MD && calendars.roleId != RoleIdService.PRES && calendars.wxFullName"> Agenda do {{calendars.wxFullName}} </div>
|
||||
<div *ngIf="calendars.roleId != RoleIdService.PRES && calendars.roleId != RoleIdService.MD && calendars.wxUserId == SessionStore.user.UserId ">
|
||||
Minha agenda
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div *ngIf="!environment.presidential">
|
||||
<div *ngIf="calendars.wxUserId != SessionStore.user.UserId && calendars.roleId == RoleIdService.PRES"> {{ environment.agendaPR}} </div>
|
||||
<div *ngIf="calendars.wxUserId != SessionStore.user.UserId && calendars.roleId == RoleIdService.MD"> {{ environment.agendaVP}} </div>
|
||||
<div *ngIf="calendars.wxUserId != SessionStore.user.UserId && calendars.roleId != RoleIdService.MD && calendars.roleId != RoleIdService.PRES"> Agenda do {{calendars.wxFullName}} </div>
|
||||
<div *ngIf="calendars.wxUserId == SessionStore.user.UserId">Minha agenda</div>
|
||||
<div *ngIf="calendars.roleId == RoleIdService.PRES">PR </div>
|
||||
<div *ngIf="calendars.roleId == RoleIdService.MD && calendars.roleId != SessionStore.user.RoleID">AGENDA DO MDGPR</div>
|
||||
<div *ngIf="calendars.roleId != RoleIdService.MD && calendars.roleId != RoleIdService.PRES && calendars.wxFullName"> Agenda do {{calendars.wxFullName}} </div>
|
||||
<div *ngIf="calendars.wxUserId == SessionStore.user.UserId ">
|
||||
Minha agenda
|
||||
</div>
|
||||
|
||||
</mat-option>
|
||||
|
||||
@@ -172,13 +172,14 @@ export class AgendaPage implements OnInit {
|
||||
|
||||
SessionStore = SessionStore;
|
||||
environment = environment
|
||||
selectedUserCalendar: number | string = ''
|
||||
selectedUserCalendar: number | string = null
|
||||
hasEventToday = false
|
||||
isSelectedDayHasEvent = true
|
||||
|
||||
sharedCalendar: Observable<TableSharedCalendar[]>
|
||||
|
||||
showCalendarField = false
|
||||
hasChangeCalendar = false
|
||||
|
||||
constructor(
|
||||
@Inject(LOCALE_ID) private locale: string,
|
||||
@@ -195,6 +196,7 @@ export class AgendaPage implements OnInit {
|
||||
public AgendaDataRepositoryService: AgendaDataRepositoryService,
|
||||
) {
|
||||
|
||||
this.selectedUserCalendar = SessionStore.user.UserId
|
||||
this.AgendaDataRepositoryService.getSharedCalendar().then(async ()=> {
|
||||
this.setCalendarByDefault(true)
|
||||
const selectedCalendarIds = await this.getSelectedAgendaCalendars();
|
||||
@@ -280,6 +282,10 @@ export class AgendaPage implements OnInit {
|
||||
this.weekToShow()
|
||||
}
|
||||
|
||||
segmentChanged() {
|
||||
this.showCalendarField = true
|
||||
}
|
||||
|
||||
tigerUpdate() {
|
||||
setTimeout(() => {
|
||||
try {
|
||||
@@ -386,11 +392,12 @@ export class AgendaPage implements OnInit {
|
||||
|
||||
if(prObject) {
|
||||
this.selectedUserCalendar = prObject.wxUserId
|
||||
this.showCalendarField = true
|
||||
} else {
|
||||
this.selectedUserCalendar = SessionStore.user.UserId
|
||||
this.showCalendarField = true
|
||||
}
|
||||
|
||||
this.showCalendarField = true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1159,6 +1166,11 @@ export class AgendaPage implements OnInit {
|
||||
this.loadRangeEvents(this.rangeStartDate, this.rangeEndDate);
|
||||
this.updateEventListBox();
|
||||
// this.onCurrentChanged(new Date(this.timelineDate))
|
||||
|
||||
}
|
||||
|
||||
changeSegmentCalendar() {
|
||||
this.hasChangeCalendar = true
|
||||
}
|
||||
|
||||
async EventToApproveGoBack() {
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<ion-toolbar >
|
||||
<ion-segment [(ngModel)]="selectedUserCalendar" (ionChange)="segmentChanged($event)" *ngIf="SessionStore.user.RoleID !== 100000014 && (sharedCalendar | async) as calendarData">
|
||||
<ion-toolbar *ngIf="(sharedCalendar | async) as calendarData">
|
||||
<ion-segment [(ngModel)]="selectedUserCalendar" (ionChange)="segmentChanged($event)" *ngIf="SessionStore.user.RoleID !== 100000014">
|
||||
<ion-segment-button *ngFor="let calendars of calendarData" value="{{calendars.wxUserId}}" >
|
||||
<div *ngIf="calendars.roleId == RoleIdService.PRES">AGENDA DO PR </div>
|
||||
<div *ngIf="calendars.roleId == RoleIdService.MD && calendars.roleId != SessionStore.user.RoleID">AGENDA DO MDGPR</div>
|
||||
|
||||
Reference in New Issue
Block a user