|
@@ -157,18 +157,20 @@ class HotelResourceListFragment : BaseFragment<FragmentHotelResourceListBinding>
|
|
|
setCanDelete(OASystem.authorization(OASystem.HOTEL_RESOURCE, OASystem.DELETE))
|
|
|
addBindView { itemView, data ->
|
|
|
itemView.findViewById<TextView>(R.id.hotel_name).text = data.name
|
|
|
- itemView.findViewById<TextView>(R.id.hotel_location).text = data.city
|
|
|
- if (data.tel.isNotBlank()) {
|
|
|
- itemView.findViewById<TextView>(R.id.hotel_phone).text = data.tel
|
|
|
+ itemView.findViewById<TextView>(R.id.hotel_location).text = data.city.ifBlank {
|
|
|
+ resources.getString(R.string.no_info)
|
|
|
}
|
|
|
- if (data.fax.isNotBlank()) {
|
|
|
- itemView.findViewById<TextView>(R.id.hotel_fax).text = data.fax
|
|
|
+ itemView.findViewById<TextView>(R.id.hotel_phone).text = data.tel.ifBlank {
|
|
|
+ resources.getString(R.string.no_info)
|
|
|
}
|
|
|
- if (data.contact.isNotBlank()){
|
|
|
- itemView.findViewById<TextView>(R.id.contacts).text = data.contact
|
|
|
+ itemView.findViewById<TextView>(R.id.hotel_fax).text = data.fax.ifBlank {
|
|
|
+ resources.getString(R.string.no_info)
|
|
|
}
|
|
|
- if (data.contactPhone.isNotBlank()) {
|
|
|
- itemView.findViewById<TextView>(R.id.contacts_phone).text = data.contactPhone
|
|
|
+ itemView.findViewById<TextView>(R.id.contacts).text = data.contact.ifBlank {
|
|
|
+ resources.getString(R.string.no_info)
|
|
|
+ }
|
|
|
+ itemView.findViewById<TextView>(R.id.contacts_phone).text = data.contactPhone.ifBlank {
|
|
|
+ resources.getString(R.string.no_info)
|
|
|
}
|
|
|
}
|
|
|
}.create()
|