This commit is contained in:
Peter Maquiran
2023-01-24 15:56:47 +01:00
parent 0748612054
commit fbd50137f3
153 changed files with 5997 additions and 953 deletions
+13 -14
View File
@@ -93,7 +93,6 @@
</div>
<!-- Move forward one screen of the slides -->
<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>
@@ -103,7 +102,7 @@
</ion-row>
<ion-row class="ion-align-items-center">
<div class="calendar-letters cal-reverse" *ngIf="SessionStore.user.Profile != 'PR' && SessionStore.user.Profile != 'MDGPR' && eventService.calendarIds.length >= 2" class="calendar-letters" [class.cal-reverse]="profile == 'mdgpr' " (click)="changeProfile()">
<div class="calendar-letters cal-reverse" *ngIf="SessionStore.user.Profile != 'PR' && SessionStore.user.Profile != 'MDGPR' && eventService.hasSharedCalendar && eventService.hasOwnCalendar" class="calendar-letters" [class.cal-reverse]="profile == 'mdgpr' " (click)="changeProfile()">
<div class="text" *ngIf="profile == 'mdgpr'">
MC
</div>
@@ -114,11 +113,11 @@
</div>
<button *ngIf="profile == 'mdgpr' && ( SessionStore.user.Profile == 'PR' || SessionStore.user.Profile == 'MDGPR') " (click)="changeProfile()" class="d-md-none btn-no-color resize">
<button *ngIf="profile == 'mdgpr' && ( SessionStore.user.Profile == 'PR' || SessionStore.user.Profile == 'MDGPR') && eventService.hasSharedCalendar " (click)="changeProfile()" class="d-md-none btn-no-color resize">
<ion-icon class="right-icons" src="assets/images/icons-profile-calendar-md.svg"></ion-icon>
</button>
<button title="Mudar de Agenda" *ngIf="profile == 'pr'&& ( SessionStore.user.Profile == 'PR' || SessionStore.user.Profile == 'MDGPR')" (click)="changeProfile()" class="btn-no-color resize">
<button title="Mudar de Agenda" *ngIf="profile == 'pr'&& ( SessionStore.user.Profile == 'PR' || SessionStore.user.Profile == 'MDGPR') && eventService.hasSharedCalendar" (click)="changeProfile()" class="btn-no-color resize">
<ion-icon class="right-icons d-md-none" src="assets/images/icons-profile-calendar-pr.svg"></ion-icon>
</button>
@@ -279,13 +278,12 @@
<div class="time-end text-center">o dia</div>
</div>
<div class="schedule-details">
{{ event.event.CalendarName }}
<div class="location">{{event.event.Location}}</div>
<div class="description">
<p class="m-0">{{event.event.Subject}}</p>
</div>
<div class="font-13"*ngIf="eventService.getCalendarOwnNameByCalendarId(event.event.CalendarId) == 'Meu calendario'">{{SessionStore.user.FullName}} </div>
<ng-template #other_content>{{eventService.getCalendarOwnNameByCalendarId(event.event.CalendarId)}}</ng-template>
<div class="location">{{event.event.Location}}</div>
<div class="font-13 calendar-owner"*ngIf="eventService.getCalendarOwnNameByCalendarId(event.event.CalendarId) == 'Meu calendario'">{{SessionStore.user.FullName}} </div>
<ng-template #other_content>{{eventService.getCalendarOwnNameByCalendarId(event.event.CalendarId)}}</ng-template>
</div>
</div>
@@ -322,11 +320,11 @@
<div class="time-end">o dia</div>
</div>
<div class="schedule-details">
<div class="location">{{event.event.Location}}</div>
<div class="description">
<p class="m-0">{{event.event.Subject}}</p>
</div>
<div class="font-13"*ngIf="eventService.getCalendarOwnNameByCalendarId(event.event.CalendarId) == 'Meu calendario'">{{SessionStore.user.FullName}} </div>
<div class="location">{{event.event.Location}}</div>
<div class="font-13 calendar-owner"*ngIf="eventService.getCalendarOwnNameByCalendarId(event.event.CalendarId) == 'Meu calendario'">{{SessionStore.user.FullName}} </div>
<ng-template #other_content>{{eventService.getCalendarOwnNameByCalendarId(event.event.CalendarId)}}</ng-template>
</div>
</div>
@@ -366,11 +364,12 @@
<div class="time-end">o dia</div>
</div>
<div class="schedule-details">
<div class="location">{{event.event.Location}}</div>
<div class="description">
<p class="m-0">{{event.event.Subject}}</p>
<p class="m-0">{{event.event.Subject}} ....</p>
</div>
<div class="font-13"*ngIf="eventService.getCalendarOwnNameByCalendarId(event.event.CalendarId) == 'Meu calendario'"> {{SessionStore.user.FullName}} </div>
<div class="location">{{event.event.Location}}</div>
<div class="font-13 calendar-owner"*ngIf="eventService.getCalendarOwnNameByCalendarId(event.event.CalendarId) == 'Meu calendario'"> {{SessionStore.user.FullName}} </div>
<ng-template #other_content>{{eventService.getCalendarOwnNameByCalendarId(event.event.CalendarId)}}</ng-template>
</div>
</div>
@@ -417,7 +416,7 @@
[eventAttendees]="contacts"
(clearContact)="clearContact()"
(setContact)="setContact($event)"
[CalendarDate]="viewDate"
(setIntervenient)="setIntervenient($event)"
(setIntervenientCC)="setIntervenientCC($event)"
></app-new-event>
+8 -3
View File
@@ -509,17 +509,21 @@ td.monthview-primary-with-event {
width: 100%;
overflow: auto;
.location{
.location {
width: 100%;
font-family: Roboto;
font-size: 13px;
color: black;
font-size: 14px;
}
.calendar-owner {
font-size: 14px;
}
.description{
width: 100%;
font-family: Roboto;
font-size: 15px;
font-weight: bold;
color: var(--title-text-color);
}
@@ -528,6 +532,7 @@ td.monthview-primary-with-event {
white-space: nowrap;
overflow: hidden !important;
text-overflow: ellipsis !important;
font-size: 17px;
}
}
+15 -3
View File
@@ -108,8 +108,8 @@ export class AgendaPage implements OnInit {
postEvent: any;
// temporary data
taskParticipants: any[] = [];
taskParticipantsCc: any[] = [];
taskParticipants: EventPerson[] = [];
taskParticipantsCc: EventPerson[] = [];
adding: "intervenient" | "CC" = "intervenient";
@ViewChild(CalendarComponent) myCal: CalendarComponent;
@@ -1225,12 +1225,19 @@ export class AgendaPage implements OnInit {
this.IsEvent = 'add';
if (window.innerWidth <= 1024) {
let taskParticipants = [{
EmailAddress: SessionStore.user.Email,
IsRequired: true,
Name: SessionStore.user.UserName
}]
const modal = await this.modalCtrl.create({
component: NewEventPage,
componentProps: {
segment: this.segment,
profile: this.profile,
eventSelectedDate: this.eventSelectedDate
eventSelectedDate: this.eventSelectedDate,
attendees: taskParticipants,
CalendarDate: this.viewDate
},
cssClass: 'modal modal-desktop',
backdropDismiss: false
@@ -1244,6 +1251,11 @@ export class AgendaPage implements OnInit {
});
} else {
this.mobileComponent.showAddNewEvent = true;
this.taskParticipants = [{
EmailAddress: SessionStore.user.Email,
IsRequired: true,
Name: SessionStore.user.UserName
}]
}
}
@@ -30,7 +30,7 @@
<mat-option *ngFor="let calendars of eventService.calendarNamesAry" value="{{calendars}}">
<div *ngIf="calendars != 'Meu calendario' "> Agenda de {{calendars}} </div>
<div *ngIf="calendars == 'Meu calendario'"> Agenda de {{loggeduser.FullName}} </div>
<div *ngIf="calendars == 'Meu calendario'"> Agenda de {{loggeduser.FullName}} </div>
</mat-option>
@@ -1,5 +1,5 @@
import { Component, OnInit } from '@angular/core';
import { ModalController, NavParams } from '@ionic/angular';
import { ModalController, NavParams, Platform } from '@ionic/angular';
import { EventAttachment } from 'src/app/models/attachment.model';
import { EventBody } from 'src/app/models/eventbody.model';
import { EventPerson } from 'src/app/models/eventperson.model';
@@ -17,6 +17,7 @@ import { ThemeService } from 'src/app/services/theme.service';
import { NgxMatDateFormats } from '@angular-material-components/datetime-picker';
import { NGX_MAT_DATE_FORMATS } from '@angular-material-components/datetime-picker';
import { SessionStore } from 'src/app/store/session.service';
import { ChatMethodsService } from 'src/app/services/chat/chat-methods.service';
const CUSTOM_DATE_FORMATS: NgxMatDateFormats = {
parse: {
@@ -62,6 +63,7 @@ export class NewEventPage implements OnInit {
eventAttendees: EventPerson[];
selectedSegment: string;
selectedDate: Date;
CalendarDate: Date;
recurringTypes: any;
selectedRecurringType: any;
@@ -84,6 +86,7 @@ export class NewEventPage implements OnInit {
autoStartTime;
autoEndTime;
CalendarNamesOptions = ['Oficial', 'Pessoal']
roomId:string;
constructor(
private modalController: ModalController,
@@ -91,7 +94,9 @@ export class NewEventPage implements OnInit {
public eventService: EventsService,
private attachmentsService: AttachmentsService,
private toastService: ToastService,
public ThemeService: ThemeService
public ThemeService: ThemeService,
private platform: Platform,
private chatMethodService: ChatMethodsService,
) {
this.loggeduser = SessionStore.user;
this.postEvent = new Event();
@@ -99,27 +104,29 @@ export class NewEventPage implements OnInit {
this.eventBody = { BodyType : "1", Text : ""};
this.postEvent.Body = this.eventBody;
this.roomId = this.navParams.get('roomId');
this.selectedSegment = this.navParams.get('segment');
this.selectedDate = this.navParams.get('eventSelectedDate');
this.taskParticipants = this.navParams.get('attendees');
this.CalendarDate = this.navParams.get('CalendarDate')
}
ngOnInit() {
if (this.platform.is('desktop')) {
// this.taskParticipants = [];
}
if(!this.CalendarName) {
if(this.eventService.calendarNamesAry.includes('Meu calendario')) {
this.CalendarName = 'Meu calendario';
} else if(this.eventService.calendarNamesAry.length == 1 ) {
console.log(this.eventService.calendarNamesAry)
} else {
this.CalendarName = this.eventService.calendarNamesAry[0]
}
}
}
ngOnInit() {
this.CalendarName = this.loggeduser.Profile;
this.selectedRecurringType = "-1";
this.getRecurrenceTypes();
@@ -174,14 +181,23 @@ export class NewEventPage implements OnInit {
}
};
this.setDefaultTime()
}
setDefaultTime() {
console.log(this.CalendarDate)
this.postEvent.StartDate = this.roundTimeQuarterHour(this.CalendarDate);
this.postEvent.EndDate = this.postEvent.StartDate;
}
close() {
this.modalController.dismiss();
}
roundTimeQuarterHour() {
var timeToReturn = new Date();
roundTimeQuarterHour(timeToReturn?) {
var timeToReturn = timeToReturn || new Date();
var minutes = timeToReturn.getMinutes();
var hours = timeToReturn.getHours();
@@ -412,8 +428,22 @@ export class NewEventPage implements OnInit {
});
let data1 = {
"subject": this.postEvent.Subject,
"start": this.postEvent.StartDate,
"end": this.postEvent.EndDate,
"venue": this.postEvent.Location,
"id": eventId,
"calendarId": CalendarId
}
if(this.roomId) {
this.chatMethodService.sendMessage(this.roomId, data1);
}
this.toastService._successMessage()
this.modalController.dismiss(this.postEvent);
let data = Object.assign(this.postEvent,{id:eventId})
this.modalController.dismiss(data);
} catch (error) {
this.toastService._badRequest()
@@ -485,12 +515,8 @@ export class NewEventPage implements OnInit {
const newAttendees: EventPerson[] = data['taskParticipants'];
const newAttendeesCC: EventPerson[] = data['taskParticipantsCc'];
if(newAttendees.length) {
this.setIntervenient(newAttendees);
}
if(newAttendeesCC) {
this.setIntervenientCC(newAttendeesCC);
}
this.setIntervenient(newAttendees);
this.setIntervenientCC(newAttendeesCC);
}
@@ -499,11 +525,13 @@ export class NewEventPage implements OnInit {
}
setIntervenient(data) {
this.taskParticipants = [];
this.taskParticipants = data;
this.postEvent.Attendees = data;
}
setIntervenientCC(data){
this.taskParticipantsCc = [];
this.taskParticipantsCc = data;
}