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'">
Hi i have used Primeng FullCalendar in my Core / Angular app, latest version.
The events in the calendar are unreadable grey font on blue blackground
To overrule the css i have added a .less file with
` .fc-unthemed .fc-event .fc-title, .fc-unthemed .fc-event-dot .fc-title { color: #ffffff !important;
}`
It seems that the .less file isn't overruling it.
but without effect, what am i missing?
Hi guys, i hope you are doing fine and everybody is still healthy!
I want to use the fullcalendar from primeng https://primefaces.org/primeng/showcase/#/fullcalendar
I have an ApplicationAppService with CalendarEvents
To load data in the fullcalendar, fullcalendar needs an simple array
"data": [ { "id": 1, "title": "All Day Event", "start": "2017-02-01" }, { "id": 2, "title": "Long Event", "start": "2017-02-07", "end": "2017-02-10" }, { "id": 3, "title": "Repeating Event", "start": "2017-02-09T16:00:00" }, //...
My question is can i return an simple array from my applicationservice "CalendarEventAppService" or should i use an mvc controller to return JSON?
I'm using ASP.NET CORE & Angular (single solution) .NET Core 3.1 8.5
ASP.NET CORE & Angular (single solution) .NET Core 3.1 v8.2.1
I want to use the Primeng Editor <p-editor> in a modal But the data isn't updated, is there a trick to make in work in a modal?
Thanks in advance, Rene van Woezik
Hi Guys,
ANZ Core - Angular 8.21
I am forced to work from home, and on my home computer running refresh.bat gives the following error.
nswag run gives error:
Executing file 'D:\repo\FP.Phoogle.v821\src\FP.Phoogle.Web.Host\nswag\service.config.nswag' with variables ''... Newtonsoft.Json.JsonReaderException: Invalid character after parsing property name. Expected ':' but got: ". Path 'codeGenerators.openApiToTypeScriptClient.handleReferences', line 51, position 6.
Searched Google but could only find something about path length to long.
Please advice Kind Regards, Rene van Woezik
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.
ASP.NET Core - Angular 8.21 Hi, i have something weird. I have an EmployeeAppService which query users, it worked in v8.0
public async Task<PagedResultDto<EmployeeListDto>> GetEmployees(GetEmployeesInput input)
{
var query = _userRepository.GetAll()
.Include(u => u.TherapistWorkHours)
.Include(u => u.HomeAddress)
.Include(u => u.PostalAddress)
.WhereIf(
!input.Filter.IsNullOrWhiteSpace(),
u =>
u.Name.Contains(input.Filter) ||
u.Surname.Contains(input.Filter) ||
u.UserName.Contains(input.Filter) ||
u.EmailAddress.Contains(input.Filter)
);
var users = query
.Where(u => u.UserName != "admin")
.OrderByDescending(u => u.HireDate).AsQueryable();
var employeesCount = await query.CountAsync();
var employees = users
.OrderBy(input.Sorting)
.PageBy(input)
.ToListAsync();
var employeeListDtos = ObjectMapper.Map<List<EmployeeListDto>>(employees);
return new PagedResultDto<EmployeeListDto>(
employeesCount,
employeeListDtos
);
}
In the log it says missing map, but i am sure the map is there When i debug and put a watch on employees is says Status Faulted
If i put the same function in UserAppService it works
What am i missing?
I see that in the userappservice the filtering of the users is moved to a private function
I have in the Core.Shared project in the [ProjectName]Consts.cs the following: public const bool MultiTenancyEnabled = false;
Hi, I have a project which i have made single tenant. When i go to the Xamarin Sign In Screen i get the option to change tenant. How to disable this?
Kind regards, Rene van Woezik