This commit is contained in:
Peter Maquiran
2023-07-25 15:56:42 +01:00
parent a26f7c4f75
commit 2628bc91e8
6 changed files with 111 additions and 66 deletions
@@ -17,6 +17,7 @@ import { NGX_MAT_DATE_FORMATS } from '@angular-material-components/datetime-pick
import { SessionStore } from 'src/app/store/session.service';
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service'
import { environment } from 'src/environments/environment';
import { ContactsService } from 'src/app/services/contacts.service';
const CUSTOM_DATE_FORMATS: NgxMatDateFormats = {
parse: {
@@ -96,7 +97,8 @@ export class EditEventPage implements OnInit {
private toastService: ToastService,
private router: Router,
public ThemeService: ThemeService,
private httpErrorHandle: HttpErrorHandle
private httpErrorHandle: HttpErrorHandle,
private contactsService: ContactsService
) {
/* this.postEvent = new Event(); */
@@ -108,6 +110,20 @@ export class EditEventPage implements OnInit {
this.caller = this.navParams.get('caller');
this.initCalendarName = this.postEvent.CalendarName;
for(const index in this.postEvent.Attendees) {
const user = this.postEvent.Attendees[index]
const userData = this.contactsService.constacts.find(e => user.EmailAddress == e.EmailAddress)
if(userData) {
this.postEvent.Attendees[index].UserType = userData.UserType
}
}
if(this.postEvent){
if( this.postEvent.Body){
if(typeof(this.postEvent.Body.Text) == 'string'){