Move amenities management to home menu

This commit is contained in:
androidlover5842
2026-01-27 04:27:11 +05:30
parent b4a4b17af6
commit 2c296a2cb3
5 changed files with 61 additions and 14 deletions

View File

@@ -63,6 +63,9 @@ class MainActivity : ComponentActivity() {
userName = state.userName,
isSuperAdmin = state.isSuperAdmin,
onAddProperty = { route.value = AppRoute.AddProperty },
onAmenities = {
selectedPropertyId.value?.let { route.value = AppRoute.Amenities(it) }
},
refreshKey = refreshKey.value,
selectedPropertyId = selectedPropertyId.value,
onSelectProperty = { id, name ->
@@ -109,7 +112,6 @@ class MainActivity : ComponentActivity() {
propertyId = currentRoute.propertyId,
onBack = { route.value = AppRoute.Rooms(currentRoute.propertyId) },
onAdd = { route.value = AppRoute.AddRoomType(currentRoute.propertyId) },
onAmenities = { route.value = AppRoute.Amenities(currentRoute.propertyId) },
canManageRoomTypes = canManageProperty(currentRoute.propertyId),
onEdit = {
selectedRoomType.value = it
@@ -132,6 +134,7 @@ class MainActivity : ComponentActivity() {
propertyId = currentRoute.propertyId,
onBack = { route.value = AppRoute.RoomTypes(currentRoute.propertyId) },
onAdd = { route.value = AppRoute.AddAmenity(currentRoute.propertyId) },
canManageAmenities = state.isSuperAdmin,
onEdit = {
selectedAmenity.value = it
route.value = AppRoute.EditAmenity(currentRoute.propertyId, it.id ?: "")