Skip to content

Commit

Permalink
Reservations home screen works - no img, text, button implementation yet
Browse files Browse the repository at this point in the history
  • Loading branch information
joemacd committed Feb 25, 2024
1 parent 83cefc9 commit 7b84e12
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -484,17 +484,17 @@ class HomeAdapter(private val dataModel: HomepageDataModel) :
//TODO: button on click
val reservations = cell.reservations
//holder.itemView.home_card_rv.adapter = HomeGsrBuildingAdapter(reservations)
if(reservations.isNotEmpty()){
if(reservations.isNotEmpty()) {
val res = reservations[0];
holder.itemView.home_card_subtitle.text = res.name;
//holder.itemView.home_card_subtitle.text = res.name;
//
}


holder.itemView.home_card_rv.layoutManager = LinearLayoutManager(mContext,
LinearLayoutManager.VERTICAL, false)
LinearLayoutManager.VERTICAL, false)
holder.itemView.home_card_rv.adapter = HomeGsrReservationAdapter(reservations)


}

// holder.itemView.home_card_title.text = "Favorites"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class HomeGsrReservationAdapter (reservations: List<GSRReservation>) : RecyclerV
private var activeReservations: List<GSRReservation> = reservations

private lateinit var itemImage: ImageView
private lateinit var itemLocation: TextView
//private lateinit var itemLocation: TextView

private lateinit var itemName: TextView
private lateinit var itemStatus: TextView
Expand All @@ -58,7 +58,6 @@ class HomeGsrReservationAdapter (reservations: List<GSRReservation>) : RecyclerV



TODO("Not yet implemented")
}

override fun getItemCount(): Int {
Expand All @@ -77,7 +76,6 @@ class HomeGsrReservationAdapter (reservations: List<GSRReservation>) : RecyclerV
inner class ViewHolder (itemView: View) : RecyclerView.ViewHolder(itemView) {

init {
TODO("Put shit here and look at dining card adapter")
itemImage = itemView.item_gsr_image
itemName = itemView.item_gsr_name
itemStatus = itemView.item_gsr_status
Expand Down

0 comments on commit 7b84e12

Please sign in to comment.