A free open source IT asset/license management system
Fixed #19813 - added Employment Start to calendar
snipe997c4ace646d
diff --git a/app/Http/Transformers/CalendarEventsTransformer.php b/app/Http/Transformers/CalendarEventsTransformer.phpindex 82b3d3e939..6d74dc3738 100644--- a/app/Http/Transformers/CalendarEventsTransformer.php+++ b/app/Http/Transformers/CalendarEventsTransformer.php@@ -41,6 +41,7 @@ class CalendarEventsTransformer'asset.warranty_expiration' => 'general.calendar_event_asset_warranty_expiration','license.expiration' => 'general.calendar_event_license_expiration','license.termination' => 'general.calendar_event_license_termination',+ 'user.start_date' => 'general.calendar_event_user_start_date','user.end_date' => 'general.calendar_event_user_end_date','request.reservation' => 'general.calendar_event_request_reservation',];diff --git a/app/Models/User.php b/app/Models/User.phpindex 79a4216a7f..5c45a1e86a 100644--- a/app/Models/User.php+++ b/app/Models/User.php@@ -682,6 +682,11 @@ class User extends SnipeModel implements AuthenticatableContract, AuthorizableCopublic function calendarEventDefinitions(): array{return [+ [+ 'field' => 'start_date',+ 'event_type' => 'user.start_date',+ 'all_day' => true,+ ],['field' => 'end_date','event_type' => 'user.end_date',diff --git a/resources/lang/en-US/general.php b/resources/lang/en-US/general.phpindex f5bc8bc4b5..f62b817cbf 100644--- a/resources/lang/en-US/general.php+++ b/resources/lang/en-US/general.php@@ -94,6 +94,7 @@ return ['calendar_event_asset_warranty_expiration' => 'Warranty expires','calendar_event_license_expiration' => 'License expires','calendar_event_license_termination' => 'License terminates',+ 'calendar_event_user_start_date' => 'Employment start','calendar_event_user_end_date' => 'Employment end','calendar_event_request_reservation' => 'Reservation','calendar_truncation_banner' => 'Showing :returned of :total events in this range. Narrow the date range or use the filter buttons to see the rest.',diff --git a/resources/views/calendar/index.blade.php b/resources/views/calendar/index.blade.phpindex fd897b4f8b..0469a655d9 100644--- a/resources/views/calendar/index.blade.php+++ b/resources/views/calendar/index.blade.php@@ -94,6 +94,10 @@},@endcan@can('view', \App\Models\User::class)+ {+ name: 'user.start_date',+ text: '{{ trans('general.calendar_event_user_start_date') }}'+ },{name: 'user.end_date',text: '{{ trans('general.calendar_event_user_end_date') }}'