feat: add room and car resource types

This commit is contained in:
fromme committed 2026-09-28 16:40:47 +02:00
1 parent ce5d858627
commit be37fc81f6
3 files changed
+19 -1

No files matched your search

+1
View File
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M10 21H2m8-18H7a2 2 0 0 0-2 2v16m9-9h.01"/><path d="M19 21V5a2 2 0 0 0-1.675-1.974l-6.163-1.013A1 1 0 0 0 10 3v18a1 1 0 0 0 1.124.992zm3 0h-3"/></g></svg>

After

Width:  |  Height:  |  Size: 324 B

+1
View File
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><rect width="18" height="18" x="3" y="3" rx="2"/><path d="M9 17V7h4a3 3 0 0 1 0 6H9"/></g></svg>

After

Width:  |  Height:  |  Size: 257 B

+17 -1
View File
@@ -21,6 +21,8 @@ enum ResourceType: string
case DESK = 'desk';
case PARKING = 'parking';
case MONITOR = 'monitor';
case ROOM = 'room';
case CAR = 'car';
public function label(): string
{
@@ -28,6 +30,8 @@ enum ResourceType: string
self::DESK => 'Schreibtisch',
self::PARKING => 'Parkplatz',
self::MONITOR => 'Mobiler Monitor',
self::ROOM => 'Zimmer',
self::CAR => 'Fahrzeug',
};
}
@@ -37,6 +41,8 @@ enum ResourceType: string
self::DESK => 'Schreibtische',
self::PARKING => 'Parkplätze',
self::MONITOR => 'Mobile Monitore',
self::ROOM => 'Zimmer',
self::CAR => 'Fahrzeuge',
};
}
@@ -46,12 +52,18 @@ enum ResourceType: string
self::DESK => 'Einen Platz im Büro reservieren.',
self::PARKING => 'Einen Stellplatz reservieren.',
self::MONITOR => 'Einen mobilen Monitor ausleihen.',
self::ROOM => 'Ein Zimmer reservieren.',
self::CAR => 'Ein Fahrzeug reservieren.',
};
}
/**
* What a ResourceGroup of this kind is called: an office has rooms, a car park has areas,
* a portable device a place it is kept.
*
* A kind that is not split up still needs a word here, because the admin screen always
* offers to add a group. Leaving it unused is the supported case: a kind with no groups is
* listed flat, on the plan as on the admin screen.
*/
public function groupLabel(): string
{
@@ -59,6 +71,8 @@ enum ResourceType: string
self::DESK => 'Raum',
self::PARKING => 'Bereich',
self::MONITOR => 'Standort',
self::ROOM => 'Standort',
self::CAR => 'Standort',
};
}
@@ -66,8 +80,10 @@ enum ResourceType: string
{
return match ($this) {
self::DESK => 'lucide:armchair',
self::PARKING => 'lucide:car',
self::PARKING => 'lucide:square-parking',
self::MONITOR => 'lucide:monitor',
self::ROOM => 'lucide:door-open',
self::CAR => 'lucide:car',
};
}
}