mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 13:02:56 +00:00
merge
This commit is contained in:
@@ -16,9 +16,6 @@ registerLocaleData(localeDe);
|
||||
|
||||
import { CalendarModule, DateAdapter } from 'angular-calendar';
|
||||
import { adapterFactory } from 'angular-calendar/date-adapters/date-fns';
|
||||
import { EventsToApprovePage } from 'src/app/shared/gabinete-digital/events-to-approve/events-to-approve.page';
|
||||
|
||||
|
||||
|
||||
import { AttendeeModalPageModule } from 'src/app/shared/event/attendee-modal/attendee-modal.module';
|
||||
import { HeaderPageModule } from 'src/app/shared/header/header.module';
|
||||
|
||||
@@ -123,7 +123,7 @@
|
||||
<ion-icon class="right-icons d-md-none" src="assets/images/icons-profile-calendar-pr.svg"></ion-icon>
|
||||
</button>
|
||||
|
||||
<button title="Visualizar a lista de Eventos para aprovação" class="btn-no-color cursor-pointer resize" (click)="viewEventsToApprove()" *ngIf="loggeduser.Profile != 'PR'">
|
||||
<button title="Visualizar a lista de Eventos para aprovação" class="btn-no-color cursor-pointer resize" (click)="viewEventsToApprove()" *ngIf="p.userPermission([p.permissionList.Gabinete.aprove_event])">
|
||||
<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>
|
||||
@@ -154,7 +154,7 @@
|
||||
|
||||
<calendar
|
||||
class="calendar-component"
|
||||
[eventSource]="listToPresent"
|
||||
[eventSource]="CalendarStore.eventSource"
|
||||
[calendarMode]="calendar.mode"
|
||||
[currentDate]="calendar.currentDate"
|
||||
(onEventSelected)="onEventSelected($event)"
|
||||
@@ -229,11 +229,11 @@
|
||||
|
||||
<div class="calendar-title-container px-20 d-none d-md-flex" *ngIf="loggeduser.Profile == 'MDGPR'">
|
||||
<div class="calendar-title-description flex-grow-1 text-grey d-flex justify-center align-center">
|
||||
<div *ngIf="loggeduser.Profile == 'PR' || loggeduser.Profile == 'MDGPR'">Calendário do MDGPR</div>
|
||||
<div *ngIf="loggeduser.Profile == 'PR' || loggeduser.Profile == 'MDGPR'">Meu Calendário</div>
|
||||
</div>
|
||||
<div class="calendar-title-description text-black align-center">
|
||||
<div class="flex-grow-1 text-grey d-flex justify-center align-center">
|
||||
<div *ngIf="loggeduser.Profile == 'PR' || loggeduser.Profile == 'MDGPR'">Calendário do Presidente da República</div>
|
||||
<div *ngIf="loggeduser.Profile == 'PR' || loggeduser.Profile == 'MDGPR'">Calendário Partilhado</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -293,7 +293,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fs-timeline flex-grow-1 d-none d-md-block d-md-block text-black pr-20 width-100 height-100 overflow-y-auto" *ngIf="loggeduser.OwnerCalendars.length">
|
||||
<div class="fs-timeline flex-grow-1 d-none d-md-block d-md-block text-black pr-20 width-100 height-100 overflow-y-auto" *ngIf="loggeduser.OwnerCalendars.length && loggeduser.Profile != 'PR' ">
|
||||
<div *ngFor="let events of TimelineMDList | keyvalue;" >
|
||||
|
||||
<div class="EventListBox-container" >
|
||||
@@ -334,7 +334,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="sd-timeline flex-grow-1 d-none d-md-block timeline-md text-black pl-20 pr-20 width-100 height-100 overflow-y-auto" *ngIf="loggeduser.SharedCalendars.length != 0" >
|
||||
<div class="sd-timeline flex-grow-1 d-none d-md-block timeline-md text-black pl-20 pr-20 width-100 height-100 overflow-y-auto" *ngIf="loggeduser.SharedCalendars.length != 0 || loggeduser.Profile == 'PR' " >
|
||||
<div *ngFor="let events of TimelinePRList | keyvalue;">
|
||||
|
||||
<div class="EventListBox-container" >
|
||||
|
||||
@@ -9,6 +9,7 @@ import { DomSanitizer } from "@angular/platform-browser";
|
||||
import { EventPerson } from 'src/app/models/eventperson.model';
|
||||
import { removeDuplicate } from 'src/plugin/removeDuplicate.js';
|
||||
import { Storage } from '@ionic/storage';
|
||||
import { environment } from 'src/environments/environment';
|
||||
|
||||
// showTimeline
|
||||
import { setHours, setMinutes } from 'date-fns';
|
||||
@@ -33,6 +34,7 @@ import { SqliteService } from 'src/app/services/sqlite.service';
|
||||
import { BackgroundService } from 'src/app/services/background.service';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { SessionStore } from 'src/app/store/session.service';
|
||||
import { PermissionService } from 'src/app/services/permission.service';
|
||||
|
||||
|
||||
@Component({
|
||||
@@ -166,6 +168,7 @@ export class AgendaPage implements OnInit {
|
||||
array = []
|
||||
|
||||
sessionStore = SessionStore;
|
||||
environment
|
||||
|
||||
constructor(
|
||||
private alertCtrl: AlertController,
|
||||
@@ -183,7 +186,8 @@ export class AgendaPage implements OnInit {
|
||||
private platform: Platform,
|
||||
private backgroundservice: BackgroundService,
|
||||
public ThemeService: ThemeService,
|
||||
private storage:Storage
|
||||
private storage:Storage,
|
||||
public p: PermissionService
|
||||
) {
|
||||
|
||||
this.dateAdapter.setLocale('es');
|
||||
@@ -204,6 +208,8 @@ export class AgendaPage implements OnInit {
|
||||
|
||||
this.CalendarStore.ResetList([])
|
||||
|
||||
this.listToPresent = []
|
||||
|
||||
})
|
||||
|
||||
if (this.loggeduser.Profile == 'MDGPR') {
|
||||
@@ -251,9 +257,7 @@ export class AgendaPage implements OnInit {
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
//this.getFromDB();
|
||||
|
||||
setTimeout(() =>{
|
||||
setTimeout(() => {
|
||||
const pathname = window.location.pathname
|
||||
let realoadCounter = 0
|
||||
this.router.events.forEach((event) => {
|
||||
@@ -348,7 +352,7 @@ export class AgendaPage implements OnInit {
|
||||
// calendar change date
|
||||
this.eventSelectedDate = new Date(ev);
|
||||
|
||||
this.updateEventListBox()
|
||||
this.updateEventListBox();
|
||||
|
||||
};
|
||||
|
||||
@@ -1478,7 +1482,7 @@ export class AgendaPage implements OnInit {
|
||||
|
||||
|
||||
// THIS LINE
|
||||
this.updateEventListBox()
|
||||
this.updateEventListBox();
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -117,9 +117,9 @@
|
||||
|
||||
<div class="ion-input-class flex-grow-1 justify-center align-center material-inputs materia-top" [class.input-error]="Form?.get('Date')?.invalid && validateFrom ">
|
||||
|
||||
<mat-form-field class="date-hour-picker">
|
||||
<mat-form-field appearance="none" class="date-hour-picker">
|
||||
<input matInput [ngxMatDatetimePicker]="picker1"
|
||||
placeholder="Choose a date"
|
||||
placeholder="Data Inicio*"
|
||||
[(ngModel)]="postEvent.StartDate"
|
||||
[disabled]="disabled"
|
||||
[min]="currentDate"
|
||||
@@ -149,9 +149,9 @@
|
||||
-->
|
||||
<div (click)="openFim()" class="ion-input-class flex-grow-1 justify-center align-center materia-top" [class.input-error]="Form?.get('Date')?.invalid && validateFrom ">
|
||||
|
||||
<mat-form-field class="date-hour-picker">
|
||||
<mat-form-field appearance="none" class="date-hour-picker">
|
||||
<input matInput [ngxMatDatetimePicker]="fim"
|
||||
placeholder="Choose a date"
|
||||
placeholder="Data de fim*"
|
||||
[(ngModel)]="postEvent.EndDate"
|
||||
[disabled]="disabled"
|
||||
[min]="currentDate"
|
||||
|
||||
@@ -104,21 +104,6 @@ export class NewEventPage implements OnInit {
|
||||
this.selectedDate = this.navParams.get('eventSelectedDate');
|
||||
this.taskParticipants = this.navParams.get('attendees');
|
||||
|
||||
let now = new Date();
|
||||
|
||||
if(now.getMinutes() <= 30){
|
||||
this.autoStartTime = new Date(now.setMinutes(30));
|
||||
this.postEvent.StartDate = this.autoStartTime;
|
||||
this.autoEndTime = new Date(this.autoStartTime.getTime() + 30 * 60000);
|
||||
this.postEvent.EndDate = this.autoEndTime;
|
||||
}
|
||||
else{
|
||||
this.autoStartTime = new Date(now.setHours(now.getHours()+1));
|
||||
this.autoStartTime = new Date(this.autoStartTime.setMinutes(0));
|
||||
this.postEvent.StartDate = this.autoStartTime;
|
||||
this.autoEndTime = new Date(this.autoStartTime.getTime() + 30 * 60000);
|
||||
this.postEvent.EndDate = this.autoEndTime;
|
||||
}
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
@@ -40,12 +40,13 @@
|
||||
<div class="content-location">
|
||||
<span class="date">{{loadedEvent.Location}}</span>
|
||||
<div *ngIf="loadedEvent.Organizer">
|
||||
<div *ngIf="eventsService.isMyEvent(loadedEvent) == false">
|
||||
|
||||
<div *ngIf="eventsService.isMyEvent(loadedEvent) == false || sesseionStora.user.Profile =='PR'">
|
||||
<span class="label" *ngIf="loadedEvent.CalendarName == 'Oficial' " style="background-color: #99e47b;">{{loadedEvent.CalendarName}}</span>
|
||||
<span class="label" *ngIf="loadedEvent.CalendarName == 'Pessoal' " style="background-color: #958bfc;">{{loadedEvent.CalendarName}}</span>
|
||||
</div>
|
||||
|
||||
<div *ngIf="eventsService.isMyEvent(loadedEvent) == true">
|
||||
<div *ngIf="eventsService.isMyEvent(loadedEvent) == true && sesseionStora.user.Profile !='PR'">
|
||||
<span class="label" *ngIf="loadedEvent.CalendarName == 'Oficial' " style="background-color: #ffb703;">{{loadedEvent.CalendarName}}</span>
|
||||
<span class="label" *ngIf="loadedEvent.CalendarName == 'Pessoal' " style="background-color: #f05d5e;">{{loadedEvent.CalendarName}}</span>
|
||||
</div>
|
||||
|
||||
@@ -71,8 +71,9 @@ export class ViewEventPage implements OnInit {
|
||||
public ThemeService: ThemeService,
|
||||
private RouteService: RouteService,
|
||||
private ionicStorage: Storage,
|
||||
private CalendarService: CalendarService
|
||||
private CalendarService: CalendarService,
|
||||
) {
|
||||
|
||||
|
||||
this.isEventEdited = false;
|
||||
this.loadedEvent = new Event();
|
||||
|
||||
Reference in New Issue
Block a user