update 16 mei urutan dan tampilan user admin

This commit is contained in:
[Valentino Heman Budiarto]
2026-05-16 15:30:23 +07:00
parent 4970220a24
commit 8e7f5f539b
9 changed files with 225 additions and 122 deletions
+4 -2
View File
@@ -66,7 +66,10 @@ export default function ManageRoomsPage() {
</div>
<div className="grid grid-cols-1 md:grid-cols-2 gap-6">
{rooms.map((room) => (
{/* TAMBAHKAN [...rooms].sort(...) SEBELUM .map */}
{[...rooms]
.sort((a, b) => a.name.localeCompare(b.name))
.map((room) => (
<div key={room.room_id} className={`bg-white p-6 rounded-2xl border transition-all shadow-sm flex items-center justify-between
${room.status === 'Maintenance' ? 'border-orange-200 bg-orange-50/20' : 'border-gray-100'}`}>
@@ -93,7 +96,6 @@ export default function ManageRoomsPage() {
>
Set to {room.status === 'Available' ? 'Maintenance' : 'Available'}
</button>
<span className="text-[10px] text-gray-400 font-medium italic">ID: {room.room_id}</span>
</div>
</div>
))}