wdelfuego / nova-calendar Goto Github PK
View Code? Open in Web Editor NEWA powerful event calendar Tool for Laravel's Nova 4
License: Other
A powerful event calendar Tool for Laravel's Nova 4
License: Other
Hello! I installed nova-calendar on a new project and immediately noticed some display issues:
I tried it on Chrome, Safari, and Firefox with the same results. I am using version 2.1.4. In another project, where I have version 2.1.2, it works normally and the display is fine.
Under some conditions, the default layout of the calendar has borders that are too dark.
I haven’t been able to reproduce this yet.
If you encounter this issue, please indicate your os and browser and if you can, inspect the html elements and let me know which css class causes the borders to turn out so dark.
I have not been able to find how to do this in the documentation. Thanks in advance.
Hello,
In my app I have calendar_events table with all calendar events morphed to many other models.
My generator look like this:
class CrmCalendarEventGenerator extends CustomEventGenerator
{
protected function modelQuery(EloquentBuilder $queryBuilder, Carbon $startOfCalendar, Carbon $endOfCalendar): EloquentBuilder
{
return $queryBuilder->with(['eventable'])->where('start', '>=', $startOfCalendar)
->where(function ($q) use ($endOfCalendar) {
$q->where('end', '<=', $endOfCalendar)
->orWhereNull('end');
})->where('type', 'recall');
}
/**
* @return array<Event>
*/
protected function resourceToEvents(NovaResource $resource, Carbon $startOfCalendar, Carbon $endOfCalendar): array
{
$model = $resource->model();
assert($model instanceof CalendarEvent);
assert($model->eventable instanceof HasCalendarEvents);
$event = new Event($model->eventable->getCalendarTitle(), $model->start);
$event->notes($model->description);
$event->addStyle($model->style ?? 'default');
// TODO: not working
$event->withUrl('/resources/' . Str::plural($model->eventable_type) . '/' . $model->eventable_id);
return [$event];
}
}
And like you see, there is no option to change url by method withUrl()
, when events are created by generator. Calendar Event always redirects to CalendarEvent model, instead of my customized URL.
Hi, I have those warnings
[Vue warn]: Failed to resolve component: DropdownTrigger
If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.
I have being playing with component long time, just notice them right now.
I am with nova 4.32.11 it it matters.
Please help
The CSS applied to events is already very customizable.
It would be nice to have something similar for the calendar day cells (td elements in the table).
Could possibly even use the same style definitions already supplied by the calendar data provider.
Thank you for creating and sharing this package;
I am trying to implement reoccurring events (currently simply Users birthday, later reoccurring tasks). I got the query working well but my issue is the event creation process, as I need to modify the original year, to the one currently being displayed (which can be for current month either last year or current year even).
Would it be possible to gain access to the $startOfCalendar
and $endOfCalendar
within the resourceToEvents
function or am I missing something?
Or maybe even as callable function or property of the EventGenerator
class?
Right now, the CalendarController
expects a CalendarDataProviderInterface
which is supplied through dependency injection.
For that to work, users of this package need to manually bind their own calendar data provider to the CalendarDataProviderInterface
class in the boot()
method of their NovaServiceProvider
:
use App\Providers\CalendarDataProvider;
public function register()
{
$this->app->bind(CalendarDataProviderInterface::class, function($app) {
return new CalendarDataProvider();
});
}
It would be nice if instead, the calendar data provider could be supplied through the tool's constructor within the tools()
method, like this:
use App\Providers\CalendarDataProvider;
public function tools()
{
return [
new NovaCalendar(new CalendarDataProvider),
];
}
That would open the door to having multiple instances of the calendar Tool, each with their own data provider. It would have the added benefit of making the installation of the package slightly simpler.
Add a comment to this issue and we'll talk about it.
Please find the full log here: https://flareapp.io/share/Lm89jgpP
This error only happens when the routes are cached.
the api route for fetching the events is broken due to a missing slash (using default config and settings)
The route nova-vendor/wdelfuego/nova-calendarmy-calendar/month could not be found.
I would love to be able to quickly identify the current day by applying a border around the current calendar day. And I would like to add a general faded opacity level on past days, they would still be clickable but they would be less prominent since they are in the past.
Any way to do this currently? If not would be a nice addition to the upcoming release : )
Thanks!
The following files need unit tests:
I'm marking this 'good first issue' because it's a small task that will help a lot in getting to understand the internals of this package, and new contributors can do parts of it.
Add a comment to this issue and we'll talk about it
This new feature will be available in version 1.1
I have a json field that contains an array, each array item has a date that I want to show on the calendar.
I'm creating the functionality and will send a PR.
I am using the latest nova version and just installed nova-calendar. I have removed the nova prefix from my url through the config file of nova and its just '/' . When i add the calendar in the menu the modal shows 404 no page found. Any help with this is much appreciated
Hi, first of all, this package is amazing. Thanks for sharing it, and sorry about the title. I couln't define one with short words.
The only feature that I miss is the ability to filters events from an specific calendar. I will try to explain:
The idea is to keep just one instance of the Tool in nova.
Imagine that whe have 2 calendars in DB, and for each calendar, we have multiple events:
Calendar 1: Family
---- Event 1
---- Event 2
---- Event 3
Calendar 2: Job
---- Event 10
---- Event 11
---- Event 12
---- Event 13
The Idea is be able to display teh events of just one of this calendars per time, and be able to change the calendar that is been displayed.
Did you roll back todays changes, I got this notice
added week view to Nova Calendar
views can be enabled in nova-calendar.php config file, selector buttons are located in top right area
direct links from month view to selected week enabled
README updated
I'm using 2.x and I have a calendar that shows aggregated data through nonNovaEvents
it all works great, but I would like to be able to optionally open this calendar with a url parameter in order to only display events related to id passed in the url
So.. default calendar: /nova/calendar/lessons-summary
But sometimes via clicking on a Nova resource I want to open /nova/calendar/lessons-summary?bookingId=1
And then in my calendar I have
$query = Booking::with([
'bookingLessons.bookingLessonDetails',
])
->whereBetween('starts_at', [
$this->startOfCalendar(),
$this->endOfCalendar()
])
->orderBy('starts_at', 'asc');
$bookings = $query->get();
Now I would have liked to simply add a
if(request()->has('bookingId')) {
$query->where('id', request('bookingId'));
}
But unfortunately while I'm inside the calendar I can't seem to gain access to the url parameters via the request object. I tried both request()->all()
and request()->route()
and neither seem to expose my url parameter.
I'm not entirely sure why that is, I'm guessing it's because the calendar provider is not so much a controller but powers the api.
I was wondering if you have any insight on how I may be able to achieve the desired result? Many thanks!
Hi,
Can you tell me what is the status of day view, week view implementation?
Thank you
Regards
The new month/year picker of version 2.1 (https://github.com/wdelfuego/nova-calendar#v21) does not work well. When i try to select something, it disappears and does not leave time to select anything.
I'm getting this error when trying to use 2.1
My Laravel Nova is frozen at 4.22.2
because that's when my 1 year of free updates has expired.
I wonder if the schemeAndHttpHost
method was only added afterwards?
I don't understand why else I would be getting this error. My calendar does not load at all as a result.
Would it be possible to make your package compatible with Laravel Nova 4.0 and not depend on a new method that many people won't have access to unless they have an active subscription? If that is even the problem.. if you have any other ideas I'd love to hear them.
Many thanks for your continued development!
Thanks a lot for your input! I'll be exploring something analogous to this, hope to launch the feature with version 2.0 in January or February.
Originally posted by @wdelfuego in #43 (comment)
Regarding that, I was wondering if you could tell which features might be included and if you still plan on releasing it in Jan/Feb?
Anyway, thank you for that amazing package, made my life a lot easier already.
Right now, the $event->style()
and $event->withStyle()
helpers only allow setting the single event style. It is desirable to be able to apply multiple style classes to a single event.
I'm using 2.x and I have a calenda
By default, clicking takes you to the resource event view
/nova/resource/resourceName/{id}
which I am only using to get the calendar events but it should take me to the tool view
/nova/mytool/mytoolview/{param1}/{param2}
Is there a way to do it or to obtain the events directly from the model, omitting the resource and the click?
Using tenancy for laravel
PHP 8.1.1
Nova 4 latest
[stacktrace]
#0 C:\\Users\\Jeremiah\\Desktop\\projects\\valet\\app2\\vendor\\laravel\\framework\\src\\Illuminate\\Support\\Str.php(242): str_contains(Object(Closure), '@')
#1 C:\\Users\\Jeremiah\\Desktop\\projects\\valet\\app2\\vendor\\laravel\\framework\\src\\Illuminate\\Support\\Str.php(692): Illuminate\\Support\\Str::contains(Object(Closure), Array)
#2 C:\\Users\\Jeremiah\\Desktop\\projects\\valet\\app2\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Route.php(307): Illuminate\\Support\\Str::parseCallback(Object(Closure))
#3 C:\\Users\\Jeremiah\\Desktop\\projects\\valet\\app2\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Route.php(287): Illuminate\\Routing\\Route->parseControllerCallback()
#4 C:\\Users\\Jeremiah\\Desktop\\projects\\valet\\app2\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Route.php(272): Illuminate\\Routing\\Route->getControllerClass()
#5 C:\\Users\\Jeremiah\\Desktop\\projects\\valet\\app2\\vendor\\formfeed-uk\\nova-dependable-panel\\src\\Http\\Middleware\\InterceptValidationFailure.php(64): Illuminate\\Routing\\Route->getController()
#6 C:\\Users\\Jeremiah\\Desktop\\projects\\valet\\app2\\vendor\\formfeed-uk\\nova-dependable-panel\\src\\Http\\Middleware\\InterceptValidationFailure.php(31): Formfeed\\DependablePanel\\Http\\Middleware\\InterceptValidationFailure->isDependentFieldRequest(Object(Illuminate\\Http\\Request))
#7 C:\\Users\\Jeremiah\\Desktop\\projects\\valet\\app2\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(180): Formfeed\\DependablePanel\\Http\\Middleware\\InterceptValidationFailure->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#8 C:\\Users\\Jeremiah\\Desktop\\projects\\valet\\app2\\vendor\\formfeed-uk\\nova-dependable-panel\\src\\Http\\Middleware\\InterceptDependentFields.php(31): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#9 C:\\Users\\Jeremiah\\Desktop\\projects\\valet\\app2\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(180): Formfeed\\DependablePanel\\Http\\Middleware\\InterceptDependentFields->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#10 C:\\Users\\Jeremiah\\Desktop\\projects\\valet\\app2\\vendor\\laravel\\nova\\src\\Http\\Middleware\\BootTools.php(20): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#11 C:\\Users\\Jeremiah\\Desktop\\projects\\valet\\app2\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(180): Laravel\\Nova\\Http\\Middleware\\BootTools->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#12 C:\\Users\\Jeremiah\\Desktop\\projects\\valet\\app2\\vendor\\laravel\\nova\\src\\Http\\Middleware\\DispatchServingNovaEvent.php(24): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#13 C:\\Users\\Jeremiah\\Desktop\\projects\\valet\\app2\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(180): Laravel\\Nova\\Http\\Middleware\\DispatchServingNovaEvent->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#14 C:\\Users\\Jeremiah\\Desktop\\projects\\valet\\app2\\vendor\\inertiajs\\inertia-laravel\\src\\Middleware.php(92): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#15 C:\\Users\\Jeremiah\\Desktop\\projects\\valet\\app2\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(180): Inertia\\Middleware->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#16 C:\\Users\\Jeremiah\\Desktop\\projects\\valet\\app2\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Middleware\\SubstituteBindings.php(50): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#17 C:\\Users\\Jeremiah\\Desktop\\projects\\valet\\app2\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(180): Illuminate\\Routing\\Middleware\\SubstituteBindings->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#18 C:\\Users\\Jeremiah\\Desktop\\projects\\valet\\app2\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\VerifyCsrfToken.php(78): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#19 C:\\Users\\Jeremiah\\Desktop\\projects\\valet\\app2\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(180): Illuminate\\Foundation\\Http\\Middleware\\VerifyCsrfToken->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#20 C:\\Users\\Jeremiah\\Desktop\\projects\\valet\\app2\\vendor\\laravel\\framework\\src\\Illuminate\\View\\Middleware\\ShareErrorsFromSession.php(49): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#21 C:\\Users\\Jeremiah\\Desktop\\projects\\valet\\app2\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(180): Illuminate\\View\\Middleware\\ShareErrorsFromSession->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#22 C:\\Users\\Jeremiah\\Desktop\\projects\\valet\\app2\\vendor\\laravel\\framework\\src\\Illuminate\\Session\\Middleware\\StartSession.php(121): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#23 C:\\Users\\Jeremiah\\Desktop\\projects\\valet\\app2\\vendor\\laravel\\framework\\src\\Illuminate\\Session\\Middleware\\StartSession.php(64): Illuminate\\Session\\Middleware\\StartSession->handleStatefulRequest(Object(Illuminate\\Http\\Request), Object(Illuminate\\Session\\Store), Object(Closure))
#24 C:\\Users\\Jeremiah\\Desktop\\projects\\valet\\app2\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(180): Illuminate\\Session\\Middleware\\StartSession->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#25 C:\\Users\\Jeremiah\\Desktop\\projects\\valet\\app2\\vendor\\stancl\\tenancy\\src\\Middleware\\IdentificationMiddleware.php(36): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#26 C:\\Users\\Jeremiah\\Desktop\\projects\\valet\\app2\\vendor\\stancl\\tenancy\\src\\Middleware\\InitializeTenancyBySubdomain.php(52): Stancl\\Tenancy\\Middleware\\IdentificationMiddleware->initializeTenancy(Object(Illuminate\\Http\\Request), Object(Closure), 'checkpoint')
#27 C:\\Users\\Jeremiah\\Desktop\\projects\\valet\\app2\\vendor\\stancl\\tenancy\\src\\Middleware\\InitializeTenancyByDomainOrSubdomain.php(22): Stancl\\Tenancy\\Middleware\\InitializeTenancyBySubdomain->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#28 C:\\Users\\Jeremiah\\Desktop\\projects\\valet\\app2\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(180): Stancl\\Tenancy\\Middleware\\InitializeTenancyByDomainOrSubdomain->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#29 C:\\Users\\Jeremiah\\Desktop\\projects\\valet\\app2\\vendor\\laravel\\framework\\src\\Illuminate\\Cookie\\Middleware\\AddQueuedCookiesToResponse.php(37): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#30 C:\\Users\\Jeremiah\\Desktop\\projects\\valet\\app2\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(180): Illuminate\\Cookie\\Middleware\\AddQueuedCookiesToResponse->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#31 C:\\Users\\Jeremiah\\Desktop\\projects\\valet\\app2\\vendor\\laravel\\framework\\src\\Illuminate\\Cookie\\Middleware\\EncryptCookies.php(67): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#32 C:\\Users\\Jeremiah\\Desktop\\projects\\valet\\app2\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(180): Illuminate\\Cookie\\Middleware\\EncryptCookies->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#33 C:\\Users\\Jeremiah\\Desktop\\projects\\valet\\app2\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(116): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#34 C:\\Users\\Jeremiah\\Desktop\\projects\\valet\\app2\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php(726): Illuminate\\Pipeline\\Pipeline->then(Object(Closure))
#35 C:\\Users\\Jeremiah\\Desktop\\projects\\valet\\app2\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php(703): Illuminate\\Routing\\Router->runRouteWithinStack(Object(Illuminate\\Routing\\Route), Object(Illuminate\\Http\\Request))
#36 C:\\Users\\Jeremiah\\Desktop\\projects\\valet\\app2\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php(667): Illuminate\\Routing\\Router->runRoute(Object(Illuminate\\Http\\Request), Object(Illuminate\\Routing\\Route))
#37 C:\\Users\\Jeremiah\\Desktop\\projects\\valet\\app2\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php(656): Illuminate\\Routing\\Router->dispatchToRoute(Object(Illuminate\\Http\\Request))
#38 C:\\Users\\Jeremiah\\Desktop\\projects\\valet\\app2\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php(190): Illuminate\\Routing\\Router->dispatch(Object(Illuminate\\Http\\Request))
#39 C:\\Users\\Jeremiah\\Desktop\\projects\\valet\\app2\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(141): Illuminate\\Foundation\\Http\\Kernel->Illuminate\\Foundation\\Http\\{closure}(Object(Illuminate\\Http\\Request))
#40 C:\\Users\\Jeremiah\\Desktop\\projects\\valet\\app2\\vendor\\livewire\\livewire\\src\\DisableBrowserCache.php(19): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#41 C:\\Users\\Jeremiah\\Desktop\\projects\\valet\\app2\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(180): Livewire\\DisableBrowserCache->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#42 C:\\Users\\Jeremiah\\Desktop\\projects\\valet\\app2\\vendor\\laravel\\nova\\src\\Http\\Middleware\\ServeNova.php(23): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#43 C:\\Users\\Jeremiah\\Desktop\\projects\\valet\\app2\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(180): Laravel\\Nova\\Http\\Middleware\\ServeNova->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#44 C:\\Users\\Jeremiah\\Desktop\\projects\\valet\\app2\\vendor\\barryvdh\\laravel-debugbar\\src\\Middleware\\InjectDebugbar.php(66): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#45 C:\\Users\\Jeremiah\\Desktop\\projects\\valet\\app2\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(180): Barryvdh\\Debugbar\\Middleware\\InjectDebugbar->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#46 C:\\Users\\Jeremiah\\Desktop\\projects\\valet\\app2\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#47 C:\\Users\\Jeremiah\\Desktop\\projects\\valet\\app2\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull.php(31): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#48 C:\\Users\\Jeremiah\\Desktop\\projects\\valet\\app2\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(180): Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#49 C:\\Users\\Jeremiah\\Desktop\\projects\\valet\\app2\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#50 C:\\Users\\Jeremiah\\Desktop\\projects\\valet\\app2\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TrimStrings.php(40): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#51 C:\\Users\\Jeremiah\\Desktop\\projects\\valet\\app2\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(180): Illuminate\\Foundation\\Http\\Middleware\\TrimStrings->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#52 C:\\Users\\Jeremiah\\Desktop\\projects\\valet\\app2\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize.php(27): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#53 C:\\Users\\Jeremiah\\Desktop\\projects\\valet\\app2\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(180): Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#54 C:\\Users\\Jeremiah\\Desktop\\projects\\valet\\app2\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance.php(86): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#55 C:\\Users\\Jeremiah\\Desktop\\projects\\valet\\app2\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(180): Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#56 C:\\Users\\Jeremiah\\Desktop\\projects\\valet\\app2\\vendor\\laravel\\framework\\src\\Illuminate\\Http\\Middleware\\HandleCors.php(49): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#57 C:\\Users\\Jeremiah\\Desktop\\projects\\valet\\app2\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(180): Illuminate\\Http\\Middleware\\HandleCors->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#58 C:\\Users\\Jeremiah\\Desktop\\projects\\valet\\app2\\vendor\\laravel\\framework\\src\\Illuminate\\Http\\Middleware\\TrustProxies.php(39): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#59 C:\\Users\\Jeremiah\\Desktop\\projects\\valet\\app2\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(180): Illuminate\\Http\\Middleware\\TrustProxies->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#60 C:\\Users\\Jeremiah\\Desktop\\projects\\valet\\app2\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(116): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#61 C:\\Users\\Jeremiah\\Desktop\\projects\\valet\\app2\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php(165): Illuminate\\Pipeline\\Pipeline->then(Object(Closure))
#62 C:\\Users\\Jeremiah\\Desktop\\projects\\valet\\app2\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php(134): Illuminate\\Foundation\\Http\\Kernel->sendRequestThroughRouter(Object(Illuminate\\Http\\Request))
#63 C:\\Users\\Jeremiah\\Desktop\\projects\\valet\\app2\\public\\index.php(52): Illuminate\\Foundation\\Http\\Kernel->handle(Object(Illuminate\\Http\\Request))
#64 C:\\Users\\Jeremiah\\AppData\\Roaming\\Composer\\vendor\\cretueusebiu\\valet-windows\\server.php(241): require('C:\\\\Users\\\\Jeremi...')
#65 {main}
Hi @wdelfuego and thanks for this great package.
I'd like to request the following change:
To create the default calendar data provider there is the following artisan command provided by this package:
php artisan create:default-calendar-data-provider
The command should be refactored to the following usage:
php artisan nova-calendar:create-default-calendar-data-provider
This will ensure that you can add more commands in the future under the same namespace and will separate the CLI from default artisan commands to those that are supported by third parties.
If you agree with this change I will submit the needed changes as a PR in the next days.
I would like to have multiple calendars, completely distinct from each other, on different URIs.
I see how I can change the URI of a single calendar, but can't seem to figure out how to have two distinct calendars.
Some guidance would be much appreciated.
Many thanks!
I tried adding some simple html inside my notes so that I could style part of the note differently and the html itself got printed as a string. This may require letting us use the v-html
directive which in some cases can be unsafe but as part of an internal admin tool I think it would be fine.
I have emojis as part of my notes and they are really tiny right now and I would like them to stand out more, but don't want to make all the text bigger.
And I'm also already using badges, but I need to use both badges and emojis inside the notes.
Let me know if that's that possible :)
Thanks!
This package will not install on my version of PHP, which is 8.0.24. I would suggest considering making it PHP 8.0 compatible. For now, all AWS PHP-managed instances are using 8.0.*, and so many of us that deploy to Amazon are locked into it. Otherwise, the package looks really promising.
Originally posted by pitchayakit August 26, 2022
For example, I have 2 rows for some resources like
Could you please suggest a solution?
The following files need docblocks:
I'm marking this 'good first issue' because it's a small task that will help a lot in getting to understand the internals of this package, and new contributors can do parts of it.
Follow the DocBlock guidelines as described by Spatie; most importantly:
Don't use docblocks for methods that can be fully type hinted (unless you need a description).
Add a comment to this issue and we'll talk about it
We've created a custom event generator to handle bookings for our customers.
class BookingEventGenerator extends CustomEventGenerator
{
protected function modelQuery(EloquentBuilder $queryBuilder, Carbon $startOfCalendar, Carbon $endOfCalendar): EloquentBuilder
{
return $queryBuilder
->with([
'electrician',
])
->where('from', '>=', $startOfCalendar)
->where('from', '<=', $endOfCalendar)
;
}
protected function resourceToEvents(NovaResource $resource): array
{
$out = [];
$model = $resource->model();
$event = new Event(
'Booking #' . $model->id,
$model->from,
$model->to,
);
$event->notes('<b>Installer: </b>' . $model->electrician->first_name . ' ' . $model->electrician->last_name);
$out[] = $event;
return $out;
}
}
We've eager loaded the electrician relationship in the query because we don't want to reload it every time we handle an event. BUT, the nova-calendar
library uses ->cursor()
on the relationship in ->generateEvents()
. This will only keep one relationship in memory at a time meaning a separate query is run to get the relationship for every event.
We've got a fork of your project and for our purposes, swapping ->cursor()
to ->get()
works fine.
It'd be nice though, if nova-calendar
could allow you to specify the method used in a custom event generator, or something similar.
Pretty Please : )
php artisan nova-calendar:create-default-calendar-data-provider
ERROR There are no commands defined in the "nova-calendar" namespace.
Hello, as I have some custom needs I decided to work with a javascript calendar library instead of using this package for now, but I wanted to suggest the following library for future versions:
https://github.com/vkurko/calendar
If I have the time, I would like to help to integrate it into v2, after the initial release, as I use it in my custom nova tool already.
I might post some pictures of my usecase including event and resource filtering. Might be interesting for #26
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.