mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
show calendar field by default
This commit is contained in:
@@ -27,7 +27,11 @@
|
||||
<div class="ion-input-class flex-grow-1 justify-center align-center material-inputs " [class.input-error]="Form?.get('CalendarName')?.invalid && validateFrom ">
|
||||
|
||||
<mat-form-field appearance="none" class="width-100" color="ion-color-secondary" placeholder="Selecione agenda">
|
||||
<mat-select [(value)]="CalendarName" (selectionChange)="changeAgenda()">
|
||||
<div *ngIf="hasPrCalendar(calendarData) && !hasChangeCalendar " style="margin-bottom: -20px;">PR </div>
|
||||
<div *ngIf="selectedUserCalendar == SessionStore.user.UserId && !hasChangeCalendar " style="margin-bottom: -20px;">
|
||||
Minha agenda
|
||||
</div>
|
||||
<mat-select [(value)]="hasChangeCalendar" (selectionChange)="changeAgenda();changeSegmentCalendar()">
|
||||
|
||||
<mat-option *ngFor="let calendars of calendarData" value="{{calendars.wxUserId}}">
|
||||
|
||||
|
||||
@@ -175,6 +175,17 @@ export class NewEventPage implements OnInit {
|
||||
this.setCalendarByDefault(true)
|
||||
}
|
||||
|
||||
|
||||
hasPrCalendar(data: TableSharedCalendar[]) {
|
||||
for(const e of data) {
|
||||
if(e.roleId == this.RoleIdService.PRES) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
async setCalendarByDefault(force) {
|
||||
if (!this.selectedUserCalendar || force) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user