Skip to content

A free open source IT asset/license management system

Merge remote-tracking branch 'origin/develop' into calendar-ui

snipe0bd693846e58
diff --cc app/Http/Transformers/CalendarEventsTransformer.php
index bc300f521c,0000000000..82b3d3e939
mode 100644,000000..100644
--- a/app/Http/Transformers/CalendarEventsTransformer.php
+++ b/app/Http/Transformers/CalendarEventsTransformer.php
@@@ -1,195 -1,0 +1,208 @@@
+<?php
+
+namespace App\Http\Transformers;
+
+use App\Models\CalendarEvent;
+use Carbon\Carbon;
+use DateTimeInterface;
+use Illuminate\Database\Eloquent\Model;
+
+/**
+ * Turns `calendar_events` rows + their resolved source models into the
+ * FullCalendar-v6 Event Object payloads the calendar endpoint returns.
+ *
+ * Takes over both the shape (title with event-type label, all-day
+ * detection from cast / definition, url + color from source presenter,
+ * extendedProps) and the last-mile date formatting so the controller
+ * doesn't have to know about any of it.
+ *
+ * The controller batch-loads sources per source_type (to avoid N+1)
+ * and hands the pre-loaded map + filtered rows to
+ * transformCalendarEvents(). Anything with no matching source or that
+ * fails the per-row view policy is filtered out by the controller
+ * before it reaches this transformer.
+ */
+class CalendarEventsTransformer
+{
+ /**
+ * Human-readable labels for each `event_type` string emitted by
+ * source models' `calendarEventDefinitions()`. Unknown types fall
+ * through to the raw string so a new source at least reads
+ * coherently before its label is wired up.
+ *
+ * @var array<string, string>
+ */
+ private const EVENT_TYPE_LABEL_KEYS = [
+ 'maintenance.start' => 'general.calendar_event_maintenance',
+ 'asset.audit_due' => 'general.calendar_event_asset_audit_due',
+ 'asset.expected_checkin' => 'general.calendar_event_asset_expected_checkin',
+ 'asset.checkout' => 'general.calendar_event_asset_checkout',
+ 'asset.eol' => 'general.calendar_event_asset_eol',
+ 'asset.warranty_expiration' => 'general.calendar_event_asset_warranty_expiration',
+ 'license.expiration' => 'general.calendar_event_license_expiration',
+ 'license.termination' => 'general.calendar_event_license_termination',
+ 'user.end_date' => 'general.calendar_event_user_end_date',
++ 'request.reservation' => 'general.calendar_event_request_reservation',
+ ];
+
+ /**
+ * @param iterable<CalendarEvent> $rows
+ * @param array<class-string, \Illuminate\Support\Collection> $sourcesByType
+ * @return array<int, array<string, mixed>>
+ */
+ public function transformCalendarEvents(iterable $rows, array $sourcesByType): array
+ {
+ $out = [];
+ foreach ($rows as $row) {
+ $source = $sourcesByType[$row->source_type][$row->source_id] ?? null;
+ if (! $source) {
+ continue;
+ }
+ $out[] = $this->transformCalendarEvent($row, $source);
+ }
+
+ return $out;
+ }
+
+ /**
+ * @return array<string, mixed>
+ */
+ public function transformCalendarEvent(CalendarEvent $row, Model $source): array
+ {
+ $allDay = $this->isAllDayField($source, $row->source_field);
+
+ return [
+ 'id' => $row->id,
+ 'title' => $this->titleFor($source, $row->event_type),
+ 'start' => $this->formatDate($row->start, $allDay),
+ 'end' => $this->formatDate($row->end, $allDay),
+ 'allDay' => $allDay,
+ 'url' => $this->urlFor($source),
+ 'color' => $this->colorFor($source),
+ 'extendedProps' => [
+ 'source_type' => $row->source_type,
+ 'source_id' => $row->source_id,
+ 'source_field' => $row->source_field,
+ 'event_type' => $row->event_type,
+ ],
+ ];
+ }
+
+ /**
+ * Display name prefixed with the human-readable event-type label
+ * so a viewer can tell why a row is on the calendar ("Audit due:
+ * Laptop #7" vs. just "Laptop #7"). Presenter's name() is the
+ * canonical Snipe-IT accessor; falls through to common attribute
+ * names for models without a presenter wired up yet.
+ */
+ private function titleFor(Model $source, string $eventType): string
+ {
+ if (method_exists($source, 'present')) {
+ $presenter = $source->present();
+ if (method_exists($presenter, 'name')) {
+ $name = (string) $presenter->name();
+ }
+ }
+
+ $name ??= (string) ($source->display_name ?? $source->name ?? (class_basename($source).'#'.$source->getKey()));
+
+ $label = $this->eventTypeLabel($eventType);
+
+ return $label ? sprintf('%s: %s', $label, $name) : $name;
+ }
+
+ private function eventTypeLabel(string $eventType): string
+ {
+ if (! array_key_exists($eventType, self::EVENT_TYPE_LABEL_KEYS)) {
+ return $eventType;
+ }
+
+ return trans(self::EVENT_TYPE_LABEL_KEYS[$eventType]);
+ }
+
+ /**
+ * True when the underlying source field is cast as a bare date
+ * (not a datetime). Rendering these on a timegrid as ISO-8601
+ * with a T00:00:00 component stacks the whole day's events at
+ * midnight; FullCalendar's `allDay: true` mode turns them into a
+ * solid bar across the day instead.
+ */
+ private function isAllDayField(Model $source, ?string $field): bool
+ {
+ if (! $field) {
+ return false;
+ }
+
+ if (method_exists($source, 'calendarEventDefinitions')) {
+ foreach ($source->calendarEventDefinitions() as $definition) {
+ if (($definition['field'] ?? null) === $field && array_key_exists('all_day', $definition)) {
+ return (bool) $definition['all_day'];
+ }
+ }
+ }
+
+ $cast = $source->getCasts()[$field] ?? null;
+
+ return in_array($cast, ['date', 'immutable_date'], true);
+ }
+
+ /**
+ * Normalize to Carbon so we get toIso8601String() (Carbon-only,
+ * not on DateTimeInterface). All-day events serialize as
+ * `YYYY-MM-DD` (no time component) so FullCalendar doesn't
+ * reinterpret them as UTC midnight in the browser's local zone.
+ */
+ private function formatDate(mixed $date, bool $allDay): ?string
+ {
+ if ($date === null || $date === '') {
+ return null;
+ }
+
+ $date = $date instanceof Carbon
+ ? $date
+ : ($date instanceof DateTimeInterface ? Carbon::instance($date) : Carbon::parse($date));
+
+ return $allDay ? $date->format('Y-m-d') : $date->toIso8601String();
+ }
+
+ private function urlFor(Model $source): ?string
+ {
++ // Source model can expose calendarUrl() directly (used by
++ // CheckoutRequest which doesn't ride the Presenter/Presentable
++ // chain) or via its presenter (Asset/License/etc use the
++ // presenter path).
++ if (method_exists($source, 'calendarUrl')) {
++ return $source->calendarUrl();
++ }
++
+ if (method_exists($source, 'present')) {
+ $presenter = $source->present();
+ if (method_exists($presenter, 'calendarUrl')) {
+ return $presenter->calendarUrl();
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * Null means "no per-event color". The frontend paints from a
+ * per-event_type CSS palette so uncolored installs still read
+ * cleanly.
+ */
+ private function colorFor(Model $source): ?string
+ {
++ if (method_exists($source, 'calendarColor')) {
++ return $source->calendarColor();
++ }
++
+ if (method_exists($source, 'present')) {
+ $presenter = $source->present();
+ if (method_exists($presenter, 'calendarColor')) {
+ return $presenter->calendarColor();
+ }
+ }
+
+ return null;
+ }
+}
diff --cc app/Models/CheckoutRequest.php
index f33a89789e,bf93b1f066..174c931d89
--- a/app/Models/CheckoutRequest.php
+++ b/app/Models/CheckoutRequest.php
@@@ -2,20 -2,121 +2,199 @@@
namespace App\Models;
+ use App\Enums\CheckoutRequestState;
+ use App\Exceptions\InvalidCheckoutRequestTransition;
++use App\Models\Traits\HasCalendarEvents;
+ use App\Models\Traits\Searchable;
+ use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
+ use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\SoftDeletes;
+ use Illuminate\Support\Collection;
+ /**
+ * @property CheckoutRequestState $state
+ */
class CheckoutRequest extends Model
{
++ use HasCalendarEvents;
use HasFactory;
+ use Searchable;
use SoftDeletes;
- protected $fillable = ['user_id', 'quantity'];
+ protected $fillable = [
+ 'user_id',
+ 'quantity',
+ 'fulfilled_quantity',
+ 'start_date',
+ 'end_date',
+ 'notes',
+ 'state',
+ ];
protected $table = 'checkout_requests';
- public function user()
+ /**
+ * Direct-column search targets for TextSearch (called by
+ * Api\CheckoutRequest::index's ?search= handler).
+ */
+ protected $searchableAttributes = ['notes'];
+
+ /**
+ * Relation-scoped search targets. The requester side goes here;
+ * the polymorphic requestable side is handled in
+ * advancedTextSearch() below since Searchable doesn't understand
+ * morphTo.
+ */
+ protected $searchableRelations = [
+ 'user' => ['first_name', 'last_name', 'username', 'email'],
+ ];
+
+ protected $casts = [
+ 'start_date' => 'date',
+ 'end_date' => 'date',
+ 'canceled_at' => 'datetime',
+ 'fulfilled_at' => 'datetime',
+ 'quantity' => 'integer',
+ 'fulfilled_quantity' => 'integer',
+ 'state' => CheckoutRequestState::class,
+ ];
+
+ protected $attributes = [
+ 'state' => 'pending',
+ 'fulfilled_quantity' => 0,
+ ];
+
+ /**
+ * Remaining qty on this request. Requested minus fulfilled;
+ * capped at 0 so an accidental over-fulfill upstream can't
+ * return a negative here. Used by the partial-fulfillment
+ * flow to figure out how much of an incoming fulfillment
+ * should count against this row.
+ */
+ public function remainingQuantity(): int
+ {
+ return max(0, (int) $this->quantity - (int) $this->fulfilled_quantity);
+ }
+
++ /**
++ * Only pending rows publish a calendar event. Accessors return
++ * null once the request has been fulfilled or canceled so the
++ * HasCalendarEvents trait's null-check deletes the row on the
++ * transition (state is listed in trigger_fields so the observer
++ * re-runs the sync when state changes).
++ */
++ protected function getCalendarStartAttribute(): mixed
++ {
++ return $this->state === CheckoutRequestState::Pending
++ ? $this->start_date
++ : null;
++ }
++
++ protected function getCalendarEndAttribute(): mixed
++ {
++ return $this->state === CheckoutRequestState::Pending
++ ? $this->end_date
++ : null;
++ }
++
++ /**
++ * Calendar-event URL / color for the requestable this row points
++ * at. Reused by CalendarEventsTransformer, which falls back to
++ * these methods when a source model isn't wired through the
++ * Presenter/Presentable chain (which CheckoutRequest isn't - it
++ * extends the plain Eloquent Model, not SnipeModel).
++ */
++ public function calendarUrl(): ?string
++ {
++ $item = $this->itemRequested();
++ if ($item && method_exists($item, 'present')) {
++ $presenter = $item->present();
++ if (method_exists($presenter, 'calendarUrl')) {
++ return $presenter->calendarUrl();
++ }
++ }
++
++ return null;
++ }
++
++ public function calendarColor(): ?string
++ {
++ $item = $this->itemRequested();
++ if ($item && method_exists($item, 'present')) {
++ $presenter = $item->present();
++ if (method_exists($presenter, 'calendarColor')) {
++ return $presenter->calendarColor();
++ }
++ }
++
++ return null;
++ }
++
++ /**
++ * Emit the reservation window as a single all-day range event.
++ * Uses the calendar_start / calendar_end accessors above so
++ * fulfilled + canceled rows drop off the calendar without
++ * touching the underlying date columns (which the notification
++ * templates and admin queue still read from).
++ *
++ * @return array<int, array<string, mixed>>
++ */
++ public function calendarEventDefinitions(): array
++ {
++ return [
++ [
++ 'field' => 'calendar_start',
++ 'end_field' => 'calendar_end',
++ 'event_type' => 'request.reservation',
++ 'trigger_fields' => ['state', 'start_date', 'end_date'],
++ 'all_day' => true,
++ ],
++ ];
++ }
++
+ /**
+ * True when at least one unit has been fulfilled but the row
+ * hasn't been fully satisfied yet. Renders as an in-between
+ * badge on the admin queue + requester tab so both parties
+ * see "partial" as distinct from "untouched pending".
+ */
+ public function isPartiallyFulfilled(): bool
+ {
+ return $this->state === CheckoutRequestState::Pending
+ && $this->fulfilled_quantity > 0
+ && $this->fulfilled_quantity < $this->quantity;
+ }
+
+ /**
+ * Keep canceled_at + state in lockstep for the "one field says
+ * WHEN, the other says WHAT" pattern the migration comment
+ * calls out. Anyone assigning canceled_at directly (factories
+ * with legacy `'canceled_at' => now()` shape, older callsites
+ * that predate the state machine) gets state=canceled for free
+ * so the pending-state scopes stay accurate.
+ *
+ * fulfilled_at is deliberately NOT mirrored here. FulfillCheckoutRequestAction
+ * is the only fulfillment path (via the checkout-hook listener)
+ * and sets both explicitly, so a synthetic mutator would just
+ * hide bugs where someone reaches around the action.
+ */
+ protected static function booted(): void
+ {
+ static::saving(function (self $request): void {
+ if ($request->canceled_at !== null
+ && $request->state === CheckoutRequestState::Pending
+ ) {
+ $request->state = CheckoutRequestState::Canceled;
+ }
+ });
+ }
+
+ /**
+ * @return BelongsTo<User, $this>
+ */
+ public function user(): BelongsTo
{
return $this->belongsTo(User::class, 'user_id', 'id');
}
diff --cc app/Models/License.php
index 8b97ef1cef,d694ea53a7..25a20fc6bb
--- a/app/Models/License.php
+++ b/app/Models/License.php
@@@ -5,9 -5,9 +5,10 @@@ namespace App\Models
use App\Console\Commands\SendExpiringLicenseNotifications;
use App\Helpers\Helper;
use App\Models\Traits\CompanyableTrait;
+use App\Models\Traits\HasCalendarEvents;
use App\Models\Traits\HasUploads;
use App\Models\Traits\Loggable;
+ use App\Models\Traits\Requestable;
use App\Models\Traits\Searchable;
use App\Presenters\LicensePresenter;
use App\Presenters\Presentable;
@@@ -29,9 -29,9 +30,10 @@@ class License extends Depreciabl
protected $presenter = LicensePresenter::class;
use CompanyableTrait;
+ use HasCalendarEvents;
use HasUploads;
use Loggable, Presentable;
+ use Requestable;
use SoftDeletes;
protected $injectUniqueIdentifier = true;
@@@ -184,20 -187,31 +189,45 @@@
&& ($this->deleted_at == '');
}
+ public function calendarEventDefinitions(): array
+ {
+ return [
+ [
+ 'field' => 'expiration_date',
+ 'event_type' => 'license.expiration',
+ ],
+ [
+ 'field' => 'termination_date',
+ 'event_type' => 'license.termination',
+ ],
+ ];
+ }
+
+ /**
+ * Normalize the requestable form input so an empty string from an
+ * unchecked checkbox lands as false rather than a truthy "0" cast
+ * (matches Accessory / Consumable / Component setRequestableAttribute).
+ */
+ public function setRequestableAttribute($value)
+ {
+ if ($value == '') {
+ $value = null;
+ }
+ $this->attributes['requestable'] = filter_var($value, FILTER_VALIDATE_BOOLEAN);
+ }
+
+ /**
+ * Scope query to only requestable licenses. FMCS + location
+ * scoping falls out of the CompanyableTrait global scope, so the
+ * usual "user only sees rows in their reachable companies" rule
+ * applies without any additional wrapping here (matches the
+ * Accessory / Consumable / Component scope shape).
+ */
+ public function scopeRequestable($query)
+ {
+ return $query->where('licenses.requestable', '1');
+ }
+
/**
* @return Attribute<string|null, never>
*/
diff --cc app/Presenters/AssetPresenter.php
index 648c39f04c,bb268a581e..0cb37fd9b1
--- a/app/Presenters/AssetPresenter.php
+++ b/app/Presenters/AssetPresenter.php
@@@ -9,12 -9,6 +9,12 @@@ use Illuminate\Support\Facades\Storage
/**
* Class AssetPresenter
+ *
+ * @property \App\Models\Asset $model Concrete-typed override of the base
- * Presenter's $model so PHPStan can resolve Asset-specific
- * properties (supplier, model relation, tag_color, etc)
- * without falling back to SnipeModel and flagging every
- * access as property.notFound.
++ * Presenter's $model so PHPStan can resolve Asset-specific
++ * properties (supplier, model relation, tag_color, etc)
++ * without falling back to SnipeModel and flagging every
++ * access as property.notFound.
*/
class AssetPresenter extends Presenter
{
@@@ -777,21 -771,130 +777,148 @@@
return '<x-icon type="assets" />';
}
+ public function calendarUrl(): ?string
+ {
+ return route('hardware.show', $this->model->id);
+ }
+
+ public function calendarColor(): ?string
+ {
+ // Trailing `?->tag_color` (right before the ??) is stylistically
+ // redundant per PHPStan since if the left-hand relation is
+ // null the ?-> short-circuits already and the ?? catches the
+ // null. Drop the trailing nullsafe on the last hop only;
+ // keep it on intermediate relation hops that really can be
+ // null at runtime (model->category, supplier).
+ return $this->model->tag_color
+ ?? $this->model->model?->category?->tag_color
+ ?? $this->model->supplier?->tag_color;
+ }
++
+ /**
+ * Column layout for the assets tab on /account/requestable. Feeds
+ * <x-table> via api.assets.requestable. Row shape comes from
+ * AssetsTransformer with available_actions.request/cancel
+ * populated so the assetRequestActionsFormatter JS helper can
+ * render the request/cancel button-swap. Custom fields flagged
+ * show_in_requestable_list=1 append as extra columns so admin-
+ * defined per-asset attributes surface here without a code
+ * change.
+ */
+ public static function dataTableLayoutRequestable(): string
+ {
+ $layout = [
+ [
+ 'field' => 'image',
+ 'scope' => 'col',
+ 'searchable' => false,
+ 'sortable' => true,
+ 'title' => trans('general.image'),
+ 'formatter' => 'imageFormatter',
+ ], [
+ 'field' => 'asset_tag',
+ 'scope' => 'col',
+ 'searchable' => true,
+ 'sortable' => true,
+ 'title' => trans('general.asset_tag'),
+ ], [
+ 'field' => 'model',
+ 'scope' => 'col',
+ 'searchable' => true,
+ 'sortable' => true,
+ 'title' => trans('admin/hardware/table.asset_model'),
+ ], [
+ 'field' => 'model_number',
+ 'scope' => 'col',
+ 'searchable' => true,
+ 'sortable' => true,
+ 'title' => trans('admin/models/table.modelnumber'),
+ ], [
+ 'field' => 'name',
+ 'scope' => 'col',
+ 'searchable' => true,
+ 'sortable' => true,
+ 'title' => trans('admin/hardware/form.name'),
+ ], [
+ 'field' => 'serial',
+ 'scope' => 'col',
+ 'searchable' => true,
+ 'sortable' => true,
+ 'title' => trans('admin/hardware/table.serial'),
+ ], [
+ // Full object (not .name) so the formatter can read
+ // tag_color for the color-square icon prefix.
+ // Not searchable because Asset::$searchableRelations
+ // doesn't include category (Asset's category lives
+ // through the model relation, not a direct join),
+ // so a `search=` query wouldn't hit it.
+ 'field' => 'category',
+ 'scope' => 'col',
+ 'searchable' => false,
+ 'sortable' => false,
+ 'title' => trans('general.category'),
+ 'formatter' => 'categoriesLinkObjFormatter',
+ ], [
+ 'field' => 'company.name',
+ 'scope' => 'col',
+ 'searchable' => true,
+ 'sortable' => false,
+ 'title' => trans('general.company'),
+ ], [
+ 'field' => 'location',
+ 'scope' => 'col',
+ 'searchable' => true,
+ 'sortable' => true,
+ 'title' => trans('admin/hardware/table.location'),
+ ], [
+ 'field' => 'status',
+ 'scope' => 'col',
+ 'searchable' => true,
+ 'sortable' => true,
+ 'title' => trans('admin/hardware/table.status'),
+ ], [
+ 'field' => 'expected_checkin',
+ 'scope' => 'col',
+ 'searchable' => false,
+ 'sortable' => true,
+ 'title' => trans('admin/hardware/form.expected_checkin'),
+ 'formatter' => 'dateDisplayFormatter',
+ ],
+ ];
+
+ // Custom fields flagged for the requestable list. Same
+ // fieldset-must-be-attached-to-a-model guard as the standard
+ // asset layout uses (see dataTableLayout above) so the JS
+ // side doesn't ask for row properties that never travel over
+ // the REST API.
+ $fields = CustomField::whereHas('fieldset', function ($query) {
+ $query->whereHas('models');
+ })->where('field_encrypted', 0)
+ ->where('show_in_requestable_list', 1)
+ ->get();
+
+ foreach ($fields as $field) {
+ $layout[] = [
+ 'field' => 'custom_fields.'.$field->db_column,
+ 'scope' => 'col',
+ 'searchable' => true,
+ 'sortable' => true,
+ 'title' => e($field->name),
+ ];
+ }
+
+ $layout[] = [
+ 'field' => 'actions',
+ 'scope' => 'col',
+ 'searchable' => false,
+ 'sortable' => false,
+ 'switchable' => false,
+ 'title' => trans('table.actions'),
+ 'formatter' => 'assetRequestActionsFormatter',
+ 'printIgnore' => true,
+ 'class' => 'hidden-print',
+ ];
+
+ return json_encode($layout);
+ }
}
diff --cc app/Presenters/LicensePresenter.php
index e54dc337d9,f36ad1e367..9d8a3356fd
--- a/app/Presenters/LicensePresenter.php
+++ b/app/Presenters/LicensePresenter.php
@@@ -500,15 -508,53 +510,65 @@@ class LicensePresenter extends Presente
return route('licenses.show', $this->id);
}
+ public function calendarUrl(): ?string
+ {
+ return route('licenses.show', $this->model->id);
+ }
+
+ public function calendarColor(): ?string
+ {
+ return $this->model->category?->tag_color
+ ?? $this->model->manufacturer?->tag_color
+ ?? $this->model->supplier?->tag_color;
+ }
++
+ /**
+ * Column layout for the licenses tab on /account/requestable.
+ * Licenses don't carry an image column; category + free-seats
+ * remaining stand in for the location + numRemaining pair the
+ * other tabs use. Paired with api.licenses.requestable +
+ * LicensesTransformer.
+ */
+ public static function dataTableLayoutRequestable(): string
+ {
+ return json_encode([
+ [
+ 'field' => 'name',
+ 'scope' => 'col',
+ 'searchable' => true,
+ 'sortable' => true,
+ 'title' => trans('general.name'),
+ 'formatter' => 'licenseRequestableNameFormatter',
+ ], [
+ 'field' => 'category',
+ 'scope' => 'col',
+ 'searchable' => true,
+ 'sortable' => false,
+ 'title' => trans('general.category'),
+ 'formatter' => 'categoriesLinkObjFormatter',
+ ], [
+ 'field' => 'company.name',
+ 'scope' => 'col',
+ 'searchable' => true,
+ 'sortable' => false,
+ 'title' => trans('general.company'),
+ ], [
+ 'field' => 'remaining',
+ 'scope' => 'col',
+ 'searchable' => false,
+ 'sortable' => false,
+ 'title' => trans('admin/licenses/form.remaining_seats'),
+ ], [
+ 'field' => 'actions',
+ 'scope' => 'col',
+ 'searchable' => false,
+ 'sortable' => false,
+ 'switchable' => false,
+ 'title' => trans('table.actions'),
+ 'formatter' => 'licenseRequestableActionsFormatter',
+ 'printIgnore' => true,
+ 'class' => 'hidden-print',
+ ],
+ ]);
+ }
}
diff --cc resources/lang/en-US/general.php
index c48eb09477,667acf4cd5..f58cc1b0ce
--- a/resources/lang/en-US/general.php
+++ b/resources/lang/en-US/general.php
@@@ -83,36 -83,6 +83,37 @@@ return
'change' => 'In/Out',
'changeemail' => 'Change Email Address',
'changepassword' => 'Change Password',
+ 'calendar' => 'Calendar',
+ 'calendar_today' => 'Today',
+ 'calendar_tomorrow' => 'Tomorrow',
+ 'calendar_event_maintenance' => 'Maintenance',
+ 'calendar_event_asset_audit_due' => 'Audit due',
+ 'calendar_event_asset_expected_checkin' => 'Expected checkin',
+ 'calendar_event_asset_checkout' => 'Checked out',
+ 'calendar_event_asset_eol' => 'Asset EOL',
+ 'calendar_event_asset_warranty_expiration' => 'Warranty expires',
+ 'calendar_event_license_expiration' => 'License expires',
+ 'calendar_event_license_termination' => 'License terminates',
+ '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.',
+ 'calendar_today_more' => '+:count more on the calendar',
+ 'calendar_upcoming' => 'Today & Up Next',
+ 'calendar_upcoming_more' => '+:count more on the calendar',
+ 'dashboard_low_stock' => 'Low Inventory',
+ 'dashboard_low_stock_none' => 'Nothing below its minimum quantity threshold.',
+ 'dashboard_attention' => 'Needs Attention',
+ 'dashboard_overdue_audits' => 'Audits overdue',
+ 'dashboard_overdue_checkins' => 'Checkins overdue',
+ 'dashboard_overdue_maintenances' => 'Maintenances overdue',
+ 'dashboard_unaccepted_assets' => 'Unaccepted acceptances',
+ 'dashboard_pending_requests' => 'Open checkout requests',
+ 'dashboard_licenses_expiring_soon' => 'Licenses expiring in 30 days',
+ 'dashboard_assets_past_eol' => 'Assets past EOL',
+ 'dashboard_users_offboarding_soon' => 'Employees offboarding in 30 days',
+ 'dashboard_low_stock_empty' => 'Nothing below its minimum quantity threshold.',
+ 'dashboard_low_stock_help' => 'Items show here when remaining quantity falls below the item\'s minimum plus the site-wide alert threshold (currently :threshold), set in Notifications settings.',
+ 'dashboard_activity_empty' => 'No recent activity yet.',
'tag_color' => 'Tag Color',
'tag_color_help' => 'If you wish to use a custom color indicator for this entry, enter a hex color code (e.g., #ffffff for white). Otherwise, you can leave this blank.',
'checkin' => 'Checkin',