Hi, this is how i have included in my app:
in admin.module.ts
import { FullCalendarModule } from 'primeng/fullcalendar'; NgModule({ imports: [ .... FullCalendarModule,
here is my calendar.component.ts
`import { Component, Injector, OnDestroy, OnInit, AfterViewChecked } from '@angular/core';
import { AppComponentBase } from '@shared/common/app-component-base';
import { appModuleAnimation } from '@shared/animations/routerTransition';
import dayGridPlugin from '@fullcalendar/daygrid';
import timeGridPlugin from '@fullcalendar/timegrid';
import interactionPlugin from '@fullcalendar/interaction';
import { CalendarEventServiceProxy, CalendarEventDto } from '@shared/service-proxies/service-proxies'; import * as moment from 'moment';
@Component({ templateUrl: './calendar.component.html', animations: [appModuleAnimation()], styleUrls: ['./calendar.component.less'] }) export class CalendarComponent extends AppComponentBase implements OnDestroy, OnInit, AfterViewChecked {
events: any[];
options: any;
calendarEvent: CalendarEventDto = new CalendarEventDto();
constructor(
injector: Injector,
private _calendarServiceProxy: CalendarEventServiceProxy
) {
super(injector);
}
ngOnDestroy(): void {
}
addEvent(calendarEvent: CalendarEventDto): void {
this.events = [...this.events, {
title: calendarEvent.title,
start: calendarEvent.start.toDate(),
description: calendarEvent.description,
allDay: calendarEvent.isFullDay
}];
console.log('nr items in events = ' + this.events.length);
};
ngOnInit(): void {
this.events = new Array();
this._calendarServiceProxy.getCalendarEvents().subscribe((result) => {
console.log('nr items = ' + result.items.length);
result.items.forEach((item) => {
let input = new CalendarEventDto();
input.start = item.start;
input.end = item.end;
input.title = item.title;
input.isFullDay = item.isFullDay;
this.addEvent(input);
}
);
});
this.options = {
plugins: [dayGridPlugin, timeGridPlugin, interactionPlugin],
defaultDate: new Date(),
header: {
left: 'prev,next today',
center: 'title',
right: 'dayGridMonth,dayGridWeek,timeGridDay'
},
minTime: "08:00:00",
maxTime: "22:00:00",
timeFormat: 'HH:mm',
displayEventEnd: true,
locale: "nl",
};
}
ngAfterViewChecked(): void {
}
}And this is a part of my calendar.component.html
<div [class]="containerClass + ' kt-grid__item kt-grid__item--fluid'">
When i remove the default sorting 'PreferredFullName' it works Thanks
PreferredFullName is when people get married in the Netherlands they can chose how to use lastname, lastname type is an enum PreferredFullName is not stored in DB
`[NotMapped] public virtual string PreferredLastName { get { _partnerFullLastName = GetLastName(PartnerSurName, PartnerSurNamePrefix); _birthFullLastName = GetLastName(Surname, SurnamePrefix);
switch (PreferredLastNameType)
{
case LastNameType.PartnerNaam:
_preferredFullName = _partnerFullLastName;
break;
case LastNameType.PartnerGeboorte:
_preferredFullName = _partnerFullLastName + " - " + _birthFullLastName;
break;
case LastNameType.GeboortePartner:
_preferredFullName = _birthFullLastName + " - " + _partnerFullLastName;
break;
default:
_preferredFullName = _birthFullLastName;
break;
}
return _preferredFullName;
}
}`
thanks
Hi, yes await was missing, but now i get the following error in the log
ERROR 2020-03-10 15:17:10,626 [27 ] Mvc.ExceptionHandling.AbpExceptionFilter - The LINQ expression 'DbSet<User> .Where(u => __ef_filter__p_0 || !(((ISoftDelete)u).IsDeleted) && __ef_filter__p_1 || ((IMayHaveTenant)u).TenantId == __ef_filter__CurrentTenantId_2) .Where(u => u.UserName != "admin") .OrderByDescending(u => u.HireDate) .OrderBy(u => u.PreferredFullName)' could not be translated. Either rewrite the query in a form that can be translated, or switch to client evaluation explicitly by inserting a call to either AsEnumerable(), AsAsyncEnumerable(), ToList(), or ToListAsync(). See https://go.microsoft.com/fwlink/?linkid=2101038 for more information.
I have in the Core.Shared project in the [ProjectName]Consts.cs the following: public const bool MultiTenancyEnabled = false;
I can confirm this, i have the same
AbpSession.TenantId
Nice! any idea when v8.0 is ready?
Forget it, found it. Was missing VideoPlayerRenderer