mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 21:35:50 +00:00
corretion on interceptor
This commit is contained in:
@@ -36,6 +36,8 @@ import { Subject } from 'rxjs';
|
||||
import { TaskService } from 'src/app/services/task.service'
|
||||
import { ContactsService } from 'src/app/services/contacts.service';
|
||||
import { DomSanitizerService } from 'src/app/services/DomSanitizer.service';
|
||||
import { ChangeProfileService } from 'src/app/services/change-profile.service';
|
||||
|
||||
const CUSTOM_DATE_FORMATS: NgxMatDateFormats = {
|
||||
parse: {
|
||||
dateInput: "YYYY-MMMM-DD HH:mm"
|
||||
@@ -102,8 +104,6 @@ export class NewEventPage implements OnInit {
|
||||
|
||||
documents: SearchList[] = [];
|
||||
|
||||
// minDate: string;
|
||||
|
||||
loggeduser: LoginUserRespose;
|
||||
@ViewChild('picker') picker: any;
|
||||
@ViewChild('fim') fim: any;
|
||||
@@ -148,7 +148,8 @@ export class NewEventPage implements OnInit {
|
||||
private processeService: ProcessesService,
|
||||
public TaskService: TaskService,
|
||||
private contactsService: ContactsService,
|
||||
private domSanitazerService: DomSanitizerService
|
||||
private domSanitazerService: DomSanitizerService,
|
||||
private changeProfileService: ChangeProfileService,
|
||||
) {
|
||||
this.dateAdapter.setLocale('pt');
|
||||
this.loggeduser = SessionStore.user;
|
||||
@@ -159,6 +160,9 @@ export class NewEventPage implements OnInit {
|
||||
ngOnInit() {
|
||||
|
||||
console.log(' INTERVENIENTES',this.taskParticipants)
|
||||
this.changeProfileService.registerCallback(() => {
|
||||
this.initializeData()
|
||||
})
|
||||
|
||||
if (!this.CalendarName) {
|
||||
if (this.eventService.calendarNamesAry.includes('Meu calendario')) {
|
||||
@@ -174,50 +178,7 @@ export class NewEventPage implements OnInit {
|
||||
this.eventBody = { BodyType: "1", Text: "" };
|
||||
this.postEvent.Body = this.eventBody;
|
||||
|
||||
if (this.selectedSegment != "Combinada") {
|
||||
this.postEvent = {
|
||||
EventId: '',
|
||||
Subject: '',
|
||||
Body: this.eventBody,
|
||||
Location: '',
|
||||
CalendarId: '',
|
||||
CalendarName: 'Oficial',
|
||||
StartDate: this.autoStartTime,
|
||||
EndDate: this.autoEndTime,
|
||||
EventType: 'Reunião',
|
||||
Attendees: this.attendees || null,
|
||||
IsMeeting: false,
|
||||
IsRecurring: false,
|
||||
AppointmentState: 0,
|
||||
TimeZone: '',
|
||||
Organizer: '',
|
||||
Category: 'Reunião',
|
||||
HasAttachments: false,
|
||||
EventRecurrence: { Type: '-1', LastOccurrence: this.autoEndTime },
|
||||
};
|
||||
}
|
||||
else {
|
||||
this.postEvent = {
|
||||
EventId: '',
|
||||
Subject: '',
|
||||
Body: this.eventBody,
|
||||
Location: '',
|
||||
CalendarId: '',
|
||||
CalendarName: 'Oficial',
|
||||
StartDate: this.autoStartTime,
|
||||
EndDate: this.autoEndTime,
|
||||
EventType: 'Reunião',
|
||||
Attendees: this.attendees || null,
|
||||
IsMeeting: false,
|
||||
IsRecurring: false,
|
||||
AppointmentState: 0,
|
||||
TimeZone: '',
|
||||
Organizer: '',
|
||||
Category: 'Reunião',
|
||||
HasAttachments: false,
|
||||
EventRecurrence: { Type: '-1', LastOccurrence: this.autoEndTime },
|
||||
}
|
||||
}
|
||||
this.initializeData()
|
||||
|
||||
if (this.postEvent.Attendees != null) {
|
||||
this.postEvent.Attendees.forEach(e => {
|
||||
@@ -247,6 +208,53 @@ export class NewEventPage implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
initializeData() {
|
||||
if (this.selectedSegment != "Combinada") {
|
||||
this.postEvent = {
|
||||
EventId: '',
|
||||
Subject: '',
|
||||
Body: this.eventBody,
|
||||
Location: '',
|
||||
CalendarId: '',
|
||||
CalendarName: 'Oficial',
|
||||
StartDate: this.autoStartTime,
|
||||
EndDate: this.autoEndTime,
|
||||
EventType: 'Reunião',
|
||||
Attendees: this.attendees || null,
|
||||
IsMeeting: false,
|
||||
IsRecurring: false,
|
||||
AppointmentState: 0,
|
||||
TimeZone: '',
|
||||
Organizer: '',
|
||||
Category: 'Reunião',
|
||||
HasAttachments: false,
|
||||
EventRecurrence: { Type: '-1', LastOccurrence: this.autoEndTime },
|
||||
};
|
||||
}
|
||||
else {
|
||||
this.postEvent = {
|
||||
EventId: '',
|
||||
Subject: '',
|
||||
Body: this.eventBody,
|
||||
Location: '',
|
||||
CalendarId: '',
|
||||
CalendarName: 'Oficial',
|
||||
StartDate: this.autoStartTime,
|
||||
EndDate: this.autoEndTime,
|
||||
EventType: 'Reunião',
|
||||
Attendees: this.attendees || null,
|
||||
IsMeeting: false,
|
||||
IsRecurring: false,
|
||||
AppointmentState: 0,
|
||||
TimeZone: '',
|
||||
Organizer: '',
|
||||
Category: 'Reunião',
|
||||
HasAttachments: false,
|
||||
EventRecurrence: { Type: '-1', LastOccurrence: this.autoEndTime },
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
setDefaultTime() {
|
||||
this.postEvent.StartDate = this.roundTimeQuarterHour(this.CalendarDate);
|
||||
this.postEvent.EndDate = this.roundTimeQuarterHourPlus15(this.postEvent.StartDate);
|
||||
@@ -510,7 +518,7 @@ export class NewEventPage implements OnInit {
|
||||
this.postEvent.Subject = this.domSanitazerService.sanitizeInput(this.postEvent.Subject);
|
||||
this.postEvent.Location = this.domSanitazerService.sanitizeInput(this.postEvent.Location);
|
||||
this.postEvent.Body.Text = this.domSanitazerService.sanitizeInput(this.postEvent.Body.Text);
|
||||
|
||||
|
||||
|
||||
|
||||
if (this.documents.length > 0) {
|
||||
@@ -688,7 +696,7 @@ export class NewEventPage implements OnInit {
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
if (DocumentToSave.length == 0) {
|
||||
this.afterSave();
|
||||
} */
|
||||
@@ -732,7 +740,7 @@ export class NewEventPage implements OnInit {
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
if (DocumentToSave.length == 0) {
|
||||
this.afterSave();
|
||||
} */
|
||||
@@ -745,7 +753,7 @@ export class NewEventPage implements OnInit {
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user