feat: add admin crud for resources and rooms

This commit is contained in:
fromme committed 2026-09-17 16:26:29 +02:00
1 parent ad5d5acb00
commit 3d67942c62
19 files changed
+1059 -4

No files matched your search

+13 -2
View File
@@ -8,8 +8,8 @@ namespace App\Enum;
* The kinds of thing that can be booked.
*
* **This enum is the extension point.** The dashboard builds one tile per case, the board route
* accepts one backing value per case, and the floor plan renders every kind the same way.
* Adding a third bookable kind is therefore: a case here and rows in `app:seed`.
* accepts one backing value per case, and the floor plan and the admin screen render every kind
* the same way. Adding a third bookable kind is therefore: a case here.
* Nothing else needs editing — in particular no template lists the kinds by hand.
*
* The backing value is both what is persisted in `resource.type` and what appears in a URL, so
@@ -45,6 +45,17 @@ enum ResourceType: string
};
}
/**
* What a ResourceGroup of this kind is called: an office has rooms, a car park has areas.
*/
public function groupLabel(): string
{
return match ($this) {
self::DESK => 'Raum',
self::PARKING => 'Bereich',
};
}
public function icon(): string
{
return match ($this) {