mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
new changes done
This commit is contained in:
@@ -175,7 +175,7 @@ export class EditEventPage implements OnInit {
|
||||
} else {
|
||||
this.postEvent.EventRecurrence.frequency = this.utils.recurenceTypeSeleted(this.postEvent.EventRecurrence.frequency)
|
||||
}
|
||||
|
||||
this.postEvent.Category = this.setEventType(this.postEvent.Category)
|
||||
console.log(this.postEvent?.Attachments)
|
||||
console.log(this.loadedEventAttachments)
|
||||
window.onresize = (event) => {
|
||||
@@ -800,4 +800,14 @@ export class EditEventPage implements OnInit {
|
||||
|
||||
return date
|
||||
}
|
||||
|
||||
setEventType(eventType) {
|
||||
var selectedEventType = {
|
||||
1: 'Meeting',
|
||||
2: 'Travel',
|
||||
3: 'Conference',
|
||||
4: 'Encontro'
|
||||
}
|
||||
return selectedEventType[eventType];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -157,11 +157,11 @@ export class Utils {
|
||||
|
||||
eventRecurence(type) {
|
||||
var selectedType = {
|
||||
'never': 1,
|
||||
'daily': 2,
|
||||
'weekly': 3,
|
||||
"monthly": 4,
|
||||
"yearly": 5
|
||||
'never': 0,
|
||||
'daily': 1,
|
||||
'weekly': 2,
|
||||
"monthly": 3,
|
||||
"yearly": 4
|
||||
}
|
||||
return selectedType[type];
|
||||
}
|
||||
|
||||
@@ -104,16 +104,16 @@
|
||||
<mat-form-field appearance="none" floatLabel="never" class="width-100" required>
|
||||
<!-- <input matInput type="text" > -->
|
||||
<mat-select placeholder="Selecione o tipo de evento*" matInput [(ngModel)]="_postEvent.Category">
|
||||
<mat-option value=1>
|
||||
<mat-option value="Meeting">
|
||||
Reunião
|
||||
</mat-option>
|
||||
<mat-option value=2>
|
||||
<mat-option value="Travel">
|
||||
Viagem
|
||||
</mat-option>
|
||||
<mat-option value=3>
|
||||
<mat-option value="Conference">
|
||||
Conferência
|
||||
</mat-option>
|
||||
<mat-option value=4>
|
||||
<mat-option value="Encontro">
|
||||
Encontro
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
|
||||
@@ -116,9 +116,9 @@ export class EditEventPage implements OnInit {
|
||||
|
||||
ngOnInit() {
|
||||
this.loadedEventAttachments = this.postEvent.Attachments
|
||||
console.log(this.postEvent)
|
||||
console.log(this.postEvent.Category)
|
||||
this._postEvent = this.postEvent
|
||||
this.setCalendarNameValue(this._postEvent.CalendarName);
|
||||
this._postEvent.Category = this.setEventType(this._postEvent.Category)
|
||||
if (!this._postEvent.IsRecurring) {
|
||||
this._postEvent.EventRecurrence.frequency = 'never';
|
||||
} else {
|
||||
@@ -774,12 +774,14 @@ export class EditEventPage implements OnInit {
|
||||
return date
|
||||
}
|
||||
|
||||
setCalendarNameValue(calendarName) {
|
||||
var selectedCalendar = {
|
||||
1: 'Oficial',
|
||||
2: 'Pessoal'
|
||||
setEventType(eventType) {
|
||||
var selectedEventType = {
|
||||
1: 'Meeting',
|
||||
2: 'Travel',
|
||||
3: 'Conference',
|
||||
4: 'Encontro'
|
||||
}
|
||||
return selectedCalendar[calendarName];
|
||||
return selectedEventType[eventType];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user