diff --git a/README.md b/README.md index ca89c12..06ac59b 100644 --- a/README.md +++ b/README.md @@ -1 +1,54 @@ -# Tabling-AOS \ No newline at end of file +# 🍴 Tabling-Android 🍴 +> DO SOPT 33RD 합동 μ„Έλ―Έλ‚˜ μ•± 9μ‘° AndroidνŒ€
+23.11.18 - 23.12.01 + +![image](https://github.com/DOSOPT-CDS-TABLING/Tabling-Android/assets/103172971/81033c2b-f9d7-4fea-9b8e-a1e51e4ee9be) + +## 🍽️ *****Contributors***** +| λ°°μ§€ν˜„
[@jihyunniiii](https://github.com/jihyunniiii) | κΉ€λ―Όμš°
[@DoReMinWoo](https://github.com/DoReMinWoo) | ν•˜μ§€μ€
[@HAJIEUN02](https://github.com/HAJIEUN02) | +|:---:| :---: | :---: | +| ||| +| `맀μž₯ 상세`, `λ°©λ¬Έ 인원 λͺ¨λ‹¬` |`맀μž₯ 검색_검색 κ²°κ³Ό`, `λŒ€κΈ° 상세`|`λŒ€κΈ° μ‹ μ²­ μ™„λ£Œ νŒμ—…`, `μ΄μš©μ˜ˆμ •/μ™„λ£Œ`| + +## πŸ“— *****Convention***** +[πŸ“• Git Convention & Branch Strategy](https://jihyunniiii.notion.site/Git-Convention-Branch-Strategy-ef6552f59ca5439d831eb3a9c306d6ae?pvs=4) +
+[πŸ“˜ Android Coding Convention](https://jihyunniiii.notion.site/Android-Coding-Convention-5732cddbd1b04c62b36de8bdd8870a22?pvs=4) +
+[πŸ“’ Package Convention](https://jihyunniiii.notion.site/Package-Convention-4a4895944f484883a2d59b044f85890d?pvs=4) + +## πŸ“· *****ScreenShot***** +### πŸ₯„ 맀μž₯ 검색_검색 κ²°κ³Ό, 맀μž₯ 상세, 방문인원 λͺ¨λ‹¬, λŒ€κΈ° μ‹ μ²­ μ™„λ£Œ νŒμ—… +https://github.com/DOSOPT-CDS-TABLING/Tabling-Android/assets/103172971/de5a1669-4d4f-4f5b-8aff-6c6d1216a2e2 + +### πŸ§‚ μ΄μš©μ˜ˆμ •/μ™„λ£Œ, λŒ€κΈ° 상세 +https://github.com/DOSOPT-CDS-TABLING/Tabling-Android/assets/103172971/e080dd36-af61-4b53-b007-2d3d3ee88ced + +## πŸ“ *****Foldering***** + +``` +πŸ“‚ org.sopt.tabling +┣ πŸ“‚ data +┃ ┣ πŸ“‚ datasource +┃ ┃ ┣ πŸ“‚ remote +┃ ┣ πŸ“‚ model +┃ ┃ ┣ πŸ“‚ request +┃ ┃ ┣ πŸ“‚ response +┃ ┣ πŸ“‚ repository +┃ ┣ πŸ“‚ service +┣ πŸ“‚ di +┣ πŸ“‚ domain +┃ ┣ πŸ“‚ model +┃ ┣ πŸ“‚ repository +┣ πŸ“‚ presentation +┃ ┣ πŸ“‚ common +┃ ┣ πŸ“‚ queue +┃ ┣ πŸ“‚Β reserve +┃ ┣ πŸ“‚ shopDetail +┃ ┣ πŸ“‚Β store +┃ ┣ πŸ“‚ type +┃ ┣ πŸ“‚ waiting +┣ πŸ“‚ util +┃ ┣ πŸ“‚ binding +┃ ┣ πŸ“‚ extension +``` diff --git a/app/src/main/java/org/sopt/tabling/data/service/WaitingDetailService.kt b/app/src/main/java/org/sopt/tabling/data/service/WaitingDetailService.kt index 1293927..d75bd06 100644 --- a/app/src/main/java/org/sopt/tabling/data/service/WaitingDetailService.kt +++ b/app/src/main/java/org/sopt/tabling/data/service/WaitingDetailService.kt @@ -6,5 +6,5 @@ import retrofit2.http.Path interface WaitingDetailService { @GET("/orders/{order_id}") - suspend fun getWaitingDetail(@Path("order_id") orderId: Int): ResponseWaitingDetailDto + suspend fun getWaitingDetail(@Path("order_id") orderId: Long): ResponseWaitingDetailDto } diff --git a/app/src/main/java/org/sopt/tabling/presentation/Reserve/ReserveDialog.kt b/app/src/main/java/org/sopt/tabling/presentation/Reserve/ReserveDialog.kt index d6bab49..609365a 100644 --- a/app/src/main/java/org/sopt/tabling/presentation/Reserve/ReserveDialog.kt +++ b/app/src/main/java/org/sopt/tabling/presentation/Reserve/ReserveDialog.kt @@ -6,7 +6,7 @@ import android.view.View import org.sopt.tabling.R import org.sopt.tabling.databinding.DialogReserveBinding import org.sopt.tabling.domain.model.Reserve -import org.sopt.tabling.presentation.store.PopularStoreActivity +import org.sopt.tabling.presentation.queue.QueueDetailsActivity import org.sopt.tabling.util.binding.BindingDialogFragment class ReserveDialog( @@ -31,7 +31,7 @@ class ReserveDialog( private fun addListeners() { binding.btnDialogConfirm.setOnClickListener { - startActivity(Intent(requireContext(), PopularStoreActivity::class.java)) + startActivity(Intent(requireContext(), QueueDetailsActivity::class.java)) } binding.ivIcExit24.setOnClickListener { diff --git a/app/src/main/java/org/sopt/tabling/presentation/queue/QueueDetailsActivity.kt b/app/src/main/java/org/sopt/tabling/presentation/queue/QueueDetailsActivity.kt index a1dc8f4..64416ba 100644 --- a/app/src/main/java/org/sopt/tabling/presentation/queue/QueueDetailsActivity.kt +++ b/app/src/main/java/org/sopt/tabling/presentation/queue/QueueDetailsActivity.kt @@ -16,5 +16,13 @@ class QueueDetailsActivity : .add(R.id.fcv_reservation, QueueReservationFragment()) .commit() } + + addListeners() + } + + private fun addListeners() { + binding.ivQueueDetailBack.setOnClickListener { + finish() + } } } diff --git a/app/src/main/java/org/sopt/tabling/presentation/queue/QueueReservationFragment.kt b/app/src/main/java/org/sopt/tabling/presentation/queue/QueueReservationFragment.kt index d65b186..c86e89a 100644 --- a/app/src/main/java/org/sopt/tabling/presentation/queue/QueueReservationFragment.kt +++ b/app/src/main/java/org/sopt/tabling/presentation/queue/QueueReservationFragment.kt @@ -1,5 +1,6 @@ package org.sopt.tabling.presentation.queue +import android.content.Intent import android.os.Bundle import android.view.LayoutInflater import android.view.View @@ -10,6 +11,7 @@ import org.sopt.tabling.data.model.request.RequestApplyCodeDto import org.sopt.tabling.data.model.response.ResponseApplyCodeDto import org.sopt.tabling.data.model.response.ResponseReservationDto import org.sopt.tabling.databinding.FragmentQueueReservationBinding +import org.sopt.tabling.presentation.waiting.WaitingDetailActivity import org.sopt.tabling.util.extension.showToast import retrofit2.Call import retrofit2.Response @@ -62,7 +64,8 @@ class QueueReservationFragment : Fragment() { } private fun setReservationAdapter(reserveList: List) { - val reservationAdapter = ReservationAdapter(requireContext(), ::patchApplyCode) + val reservationAdapter = + ReservationAdapter(requireContext(), ::patchApplyCode, ::moveToWaiting) reservationAdapter.setReservationList(reserveList) binding.rvReservationItems.adapter = reservationAdapter } @@ -83,7 +86,6 @@ class QueueReservationFragment : Fragment() { } else if (response.code() == 500) { context!!.showToast("μ„œλ²„ μ—λŸ¬ λ°œμƒ") } else { - context!!.showToast("변경이 μ™„λ£Œλ˜μ—ˆμŠ΅λ‹ˆλ‹€.") setReservationList() } } @@ -94,4 +96,15 @@ class QueueReservationFragment : Fragment() { } }) } + + private fun moveToWaiting(orderId: Long) { + Intent(requireContext(), WaitingDetailActivity::class.java).apply { + putExtra(ORDER_ID, orderId) + startActivity(this) + } + } + + companion object { + const val ORDER_ID = "orderId" + } } diff --git a/app/src/main/java/org/sopt/tabling/presentation/queue/ReservationAdapter.kt b/app/src/main/java/org/sopt/tabling/presentation/queue/ReservationAdapter.kt index 280509f..0937a32 100644 --- a/app/src/main/java/org/sopt/tabling/presentation/queue/ReservationAdapter.kt +++ b/app/src/main/java/org/sopt/tabling/presentation/queue/ReservationAdapter.kt @@ -12,6 +12,7 @@ import org.sopt.tabling.databinding.ItemReservationBinding class ReservationAdapter( context: Context, private val patchOnClick: (Int) -> Unit, + private val moveToWaiting: (Long) -> Unit ) : RecyclerView.Adapter() { private val inflater by lazy { LayoutInflater.from(context) } @@ -22,14 +23,17 @@ class ReservationAdapter( 1 -> ReservationViewHolder( ItemReservationBinding.inflate(inflater, parent, false), patchOnClick, + moveToWaiting ) 2 -> ReservationDoneViewHolder( ItemDoneReservationBinding.inflate(inflater, parent, false), + moveToWaiting ) 3 -> ReservationNoneViewHolder( ItemNoneReservationBinding.inflate(inflater, parent, false), + moveToWaiting ) else -> throw RuntimeException() diff --git a/app/src/main/java/org/sopt/tabling/presentation/queue/ReservationDoneViewHolder.kt b/app/src/main/java/org/sopt/tabling/presentation/queue/ReservationDoneViewHolder.kt index b85197e..9e64be9 100644 --- a/app/src/main/java/org/sopt/tabling/presentation/queue/ReservationDoneViewHolder.kt +++ b/app/src/main/java/org/sopt/tabling/presentation/queue/ReservationDoneViewHolder.kt @@ -4,7 +4,10 @@ import androidx.recyclerview.widget.RecyclerView import org.sopt.tabling.data.model.response.ResponseReservationDto import org.sopt.tabling.databinding.ItemDoneReservationBinding -class ReservationDoneViewHolder(private val binding: ItemDoneReservationBinding) : +class ReservationDoneViewHolder( + private val binding: ItemDoneReservationBinding, + private val moveToWaiting: (Long) -> Unit +) : RecyclerView.ViewHolder(binding.root) { fun onBind(item: ResponseReservationDto.Reservation) { binding.chipReservationWait.text = item.orderStatus @@ -12,5 +15,9 @@ class ReservationDoneViewHolder(private val binding: ItemDoneReservationBinding) binding.tvReservationPeople.text = item.personCount.toString() + "λͺ…" binding.tvStoreName.text = item.shopName binding.tvRemainReviewNum.text = item.remainingReviewPeriod.toString() + "일" + + binding.tvShowDetail.setOnClickListener { + moveToWaiting(item.orderId.toLong()) + } } } diff --git a/app/src/main/java/org/sopt/tabling/presentation/queue/ReservationNoneViewHolder.kt b/app/src/main/java/org/sopt/tabling/presentation/queue/ReservationNoneViewHolder.kt index 0ea5eac..18424a7 100644 --- a/app/src/main/java/org/sopt/tabling/presentation/queue/ReservationNoneViewHolder.kt +++ b/app/src/main/java/org/sopt/tabling/presentation/queue/ReservationNoneViewHolder.kt @@ -4,12 +4,19 @@ import androidx.recyclerview.widget.RecyclerView import org.sopt.tabling.data.model.response.ResponseReservationDto import org.sopt.tabling.databinding.ItemNoneReservationBinding -class ReservationNoneViewHolder(private val binding: ItemNoneReservationBinding) : +class ReservationNoneViewHolder( + private val binding: ItemNoneReservationBinding, + private val moveToWaiting: (Long) -> Unit +) : RecyclerView.ViewHolder(binding.root) { fun onBind(item: ResponseReservationDto.Reservation) { binding.chipReservationWait.text = item.orderStatus binding.tvReservationDate.text = item.orderDate binding.tvReservationPeople.text = item.personCount.toString() + "λͺ…" binding.tvStoreName.text = item.shopName + + binding.tvShowDetail.setOnClickListener { + moveToWaiting(item.orderId.toLong()) + } } } diff --git a/app/src/main/java/org/sopt/tabling/presentation/queue/ReservationViewHolder.kt b/app/src/main/java/org/sopt/tabling/presentation/queue/ReservationViewHolder.kt index b59c747..573faaa 100644 --- a/app/src/main/java/org/sopt/tabling/presentation/queue/ReservationViewHolder.kt +++ b/app/src/main/java/org/sopt/tabling/presentation/queue/ReservationViewHolder.kt @@ -7,6 +7,7 @@ import org.sopt.tabling.databinding.ItemReservationBinding class ReservationViewHolder( private val binding: ItemReservationBinding, private val patchOnClick: (Int) -> Unit, + private val moveToWaiting: (Long) -> Unit ) : RecyclerView.ViewHolder(binding.root) { fun onBind(item: ResponseReservationDto.Reservation) { @@ -20,5 +21,9 @@ class ReservationViewHolder( binding.btnCode.setOnClickListener { patchOnClick(item.orderId) } + + binding.tvShowDetail.setOnClickListener { + moveToWaiting(item.orderId.toLong()) + } } } diff --git a/app/src/main/java/org/sopt/tabling/presentation/shopDetail/ShopDetailActivity.kt b/app/src/main/java/org/sopt/tabling/presentation/shopDetail/ShopDetailActivity.kt index dc50285..7e980b3 100644 --- a/app/src/main/java/org/sopt/tabling/presentation/shopDetail/ShopDetailActivity.kt +++ b/app/src/main/java/org/sopt/tabling/presentation/shopDetail/ShopDetailActivity.kt @@ -18,9 +18,10 @@ import org.sopt.tabling.R import org.sopt.tabling.databinding.ActivityShopDetailBinding import org.sopt.tabling.domain.model.Reserve import org.sopt.tabling.domain.model.ShopDetail +import org.sopt.tabling.presentation.common.ViewModelFactory import org.sopt.tabling.presentation.reserve.ReserveBottomSheetDialogFragment import org.sopt.tabling.presentation.reserve.ReserveDialog -import org.sopt.tabling.presentation.common.ViewModelFactory +import org.sopt.tabling.presentation.store.PopularStoreActivity.Companion.SHOP_ID import org.sopt.tabling.presentation.type.StarType import org.sopt.tabling.util.UiState import org.sopt.tabling.util.binding.BindingActivity @@ -34,12 +35,16 @@ class ShopDetailActivity : private lateinit var shopDetailShopImgAdapter: ShopDetailShopImgAdapter private lateinit var shopDetailMenuListAdapter: ShopDetailMenuListAdapter private lateinit var shopDetailRecentReviewAdapter: ShopDetailRecentReviewAdapter + private var shopId: Long = -1 override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) binding.shopDetailViewModel = shopDetailViewModel + shopId = intent.getLongExtra(SHOP_ID, -1) + initLayout() + addListeners() collectData() } @@ -54,11 +59,19 @@ class ShopDetailActivity : } private fun initLayout() { + shopDetailViewModel.getShopDetail(shopId) + initAppBar() initTabLayout() initNestedScrollView() } + private fun addListeners() { + binding.ivShopDetailBack.setOnClickListener { + finish() + } + } + private fun collectData() { shopDetailViewModel.getShopDetailState.flowWithLifecycle(lifecycle).onEach { uiState -> when (uiState) { diff --git a/app/src/main/java/org/sopt/tabling/presentation/shopDetail/ShopDetailViewModel.kt b/app/src/main/java/org/sopt/tabling/presentation/shopDetail/ShopDetailViewModel.kt index 8e24a38..df5b369 100644 --- a/app/src/main/java/org/sopt/tabling/presentation/shopDetail/ShopDetailViewModel.kt +++ b/app/src/main/java/org/sopt/tabling/presentation/shopDetail/ShopDetailViewModel.kt @@ -15,11 +15,7 @@ class ShopDetailViewModel( private val _getShopDetailState = MutableStateFlow>(UiState.Empty) val getShopDetailState = _getShopDetailState.asStateFlow() - init { - getShopDetail() - } - - private fun getShopDetail(shopId: Long = 2) { + fun getShopDetail(shopId: Long) { viewModelScope.launch { _getShopDetailState.value = UiState.Loading shopDetailRepository.getShopDetail(shopId).onSuccess { shopDetail -> diff --git a/app/src/main/java/org/sopt/tabling/presentation/store/PopularStoreActivity.kt b/app/src/main/java/org/sopt/tabling/presentation/store/PopularStoreActivity.kt index 6833c85..1696aee 100644 --- a/app/src/main/java/org/sopt/tabling/presentation/store/PopularStoreActivity.kt +++ b/app/src/main/java/org/sopt/tabling/presentation/store/PopularStoreActivity.kt @@ -1,9 +1,11 @@ package org.sopt.tabling.presentation.store +import android.content.Intent import android.os.Bundle import androidx.activity.viewModels import org.sopt.tabling.R import org.sopt.tabling.databinding.ActivityPopularStoreBinding +import org.sopt.tabling.presentation.shopDetail.ShopDetailActivity import org.sopt.tabling.util.binding.BindingActivity class PopularStoreActivity : @@ -21,7 +23,7 @@ class PopularStoreActivity : } private fun initAdapter() { - popularStoreAdapter = PopularStoreAdapter(this) + popularStoreAdapter = PopularStoreAdapter(this, ::moveToShopDetail) binding.rvPopularStore.adapter = popularStoreAdapter } @@ -30,4 +32,15 @@ class PopularStoreActivity : popularStoreAdapter.setStoreList(storeList) } } + + private fun moveToShopDetail(shopId: Long) { + Intent(this@PopularStoreActivity, ShopDetailActivity::class.java).apply { + putExtra(SHOP_ID, shopId) + startActivity(this) + } + } + + companion object { + const val SHOP_ID = "shopId" + } } diff --git a/app/src/main/java/org/sopt/tabling/presentation/store/PopularStoreAdapter.kt b/app/src/main/java/org/sopt/tabling/presentation/store/PopularStoreAdapter.kt index ae3ac60..c44b376 100644 --- a/app/src/main/java/org/sopt/tabling/presentation/store/PopularStoreAdapter.kt +++ b/app/src/main/java/org/sopt/tabling/presentation/store/PopularStoreAdapter.kt @@ -6,31 +6,51 @@ import android.view.ViewGroup import androidx.recyclerview.widget.RecyclerView import org.sopt.tabling.data.model.response.ResponsePopularStoreDto import org.sopt.tabling.databinding.ItemPopularStoreBinding +import org.sopt.tabling.databinding.ItemPopularStoreWithTitleBinding -class PopularStoreAdapter(context: Context) : - RecyclerView.Adapter() { +class PopularStoreAdapter( + private val context: Context, + private val moveToShopDetail: (Long) -> Unit +) : RecyclerView.Adapter() { private val inflater by lazy { LayoutInflater.from(context) } private var storeList = listOf() - inner class PopularStoreViewHolder(val binding: ItemPopularStoreBinding) : - RecyclerView.ViewHolder(binding.root) { - fun onBind(storeData: ResponsePopularStoreDto.StoreData) { - binding.storeData = storeData - } - } + override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerView.ViewHolder { + return when (viewType) { + POPULAR_STORE_WITH_TITLE -> PopularStoreWithTitleViewHolder( + ItemPopularStoreWithTitleBinding.inflate(inflater, parent, false), + moveToShopDetail + ) - override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): PopularStoreViewHolder { - return PopularStoreViewHolder(ItemPopularStoreBinding.inflate(inflater, parent, false)) + else -> PopularStoreViewHolder( + ItemPopularStoreBinding.inflate(inflater, parent, false), + moveToShopDetail + ) + } } override fun getItemCount() = storeList.size - override fun onBindViewHolder(holder: PopularStoreViewHolder, position: Int) { - holder.onBind(storeList[position]) + override fun onBindViewHolder(holder: RecyclerView.ViewHolder, position: Int) { + when (holder) { + is PopularStoreWithTitleViewHolder -> holder.onBind(storeList[position]) + is PopularStoreViewHolder -> holder.onBind(storeList[position]) + } + } + + override fun getItemViewType(position: Int): Int = when (position) { + FIRST_POSITION -> POPULAR_STORE_WITH_TITLE + else -> POPULAR_STORE } fun setStoreList(storeDataList: List) { storeList = storeDataList notifyDataSetChanged() } + + companion object { + const val FIRST_POSITION = 0 + const val POPULAR_STORE_WITH_TITLE = 0 + const val POPULAR_STORE = 1 + } } diff --git a/app/src/main/java/org/sopt/tabling/presentation/store/PopularStoreViewHolder.kt b/app/src/main/java/org/sopt/tabling/presentation/store/PopularStoreViewHolder.kt new file mode 100644 index 0000000..8544d51 --- /dev/null +++ b/app/src/main/java/org/sopt/tabling/presentation/store/PopularStoreViewHolder.kt @@ -0,0 +1,17 @@ +package org.sopt.tabling.presentation.store + +import androidx.recyclerview.widget.RecyclerView +import org.sopt.tabling.data.model.response.ResponsePopularStoreDto +import org.sopt.tabling.databinding.ItemPopularStoreBinding + +class PopularStoreViewHolder( + private val binding: ItemPopularStoreBinding, + private val moveToShopDetail: (Long) -> Unit +) : RecyclerView.ViewHolder(binding.root) { + fun onBind(storeData: ResponsePopularStoreDto.StoreData) { + binding.storeData = storeData + binding.layoutPopularStore.setOnClickListener { + moveToShopDetail(storeData.shopId.toLong()) + } + } +} diff --git a/app/src/main/java/org/sopt/tabling/presentation/store/PopularStoreWithTitleViewHolder.kt b/app/src/main/java/org/sopt/tabling/presentation/store/PopularStoreWithTitleViewHolder.kt new file mode 100644 index 0000000..ab232f1 --- /dev/null +++ b/app/src/main/java/org/sopt/tabling/presentation/store/PopularStoreWithTitleViewHolder.kt @@ -0,0 +1,17 @@ +package org.sopt.tabling.presentation.store + +import androidx.recyclerview.widget.RecyclerView +import org.sopt.tabling.data.model.response.ResponsePopularStoreDto +import org.sopt.tabling.databinding.ItemPopularStoreWithTitleBinding + +class PopularStoreWithTitleViewHolder( + private val binding: ItemPopularStoreWithTitleBinding, + private val moveToShopDetail: (Long) -> Unit +) : RecyclerView.ViewHolder(binding.root) { + fun onBind(storeData: ResponsePopularStoreDto.StoreData) { + binding.storeData = storeData + binding.layoutPopularStore.setOnClickListener { + moveToShopDetail(storeData.shopId.toLong()) + } + } +} diff --git a/app/src/main/java/org/sopt/tabling/presentation/waiting/WaitingDetailActivity.kt b/app/src/main/java/org/sopt/tabling/presentation/waiting/WaitingDetailActivity.kt index cad0249..0595e33 100644 --- a/app/src/main/java/org/sopt/tabling/presentation/waiting/WaitingDetailActivity.kt +++ b/app/src/main/java/org/sopt/tabling/presentation/waiting/WaitingDetailActivity.kt @@ -4,24 +4,37 @@ import android.os.Bundle import androidx.activity.viewModels import org.sopt.tabling.R import org.sopt.tabling.databinding.ActivityWaitingDetailBinding +import org.sopt.tabling.presentation.queue.QueueReservationFragment.Companion.ORDER_ID import org.sopt.tabling.util.binding.BindingActivity class WaitingDetailActivity : BindingActivity(R.layout.activity_waiting_detail) { private val waitingViewModel by viewModels() + private var orderId: Long = -1 override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) - // View μ—°κ²° μ „ μž„μ˜λ‘œ μ„€μ •ν•œ orderId - val orderId = 2 - waitingViewModel.getWaitingDetail(orderId) + orderId = intent.getLongExtra(ORDER_ID, -1) + + initLayout() + addListeners() setWaitingDetailList() } + private fun initLayout() { + waitingViewModel.getWaitingDetail(orderId) + } + + private fun addListeners() { + binding.ivWaitingDetailBack.setOnClickListener { + finish() + } + } + private fun setWaitingDetailList() { - waitingViewModel.waitingDetail.observe(this) { waitingDetailList -> - binding.waitingData = waitingDetailList + waitingViewModel.waitingDetail.observe(this) { waitingDetail -> + binding.waitingData = waitingDetail } } } diff --git a/app/src/main/java/org/sopt/tabling/presentation/waiting/WaitingViewModel.kt b/app/src/main/java/org/sopt/tabling/presentation/waiting/WaitingViewModel.kt index ad04e22..d752a68 100644 --- a/app/src/main/java/org/sopt/tabling/presentation/waiting/WaitingViewModel.kt +++ b/app/src/main/java/org/sopt/tabling/presentation/waiting/WaitingViewModel.kt @@ -14,7 +14,7 @@ class WaitingViewModel : ViewModel() { MutableLiveData() val waitingDetail: LiveData = _waitingDetail - fun getWaitingDetail(orderId: Int) { + fun getWaitingDetail(orderId: Long) { viewModelScope.launch { val response = runCatching { ServicePool.waitingDetailService.getWaitingDetail(orderId) } diff --git a/app/src/main/res/drawable/shape_gray_000_line_8_rect.xml b/app/src/main/res/drawable/shape_gray_000_line_8_rect.xml new file mode 100644 index 0000000..ad381d7 --- /dev/null +++ b/app/src/main/res/drawable/shape_gray_000_line_8_rect.xml @@ -0,0 +1,9 @@ + + + + + + diff --git a/app/src/main/res/drawable/shape_gray_100_line_8_rect.xml b/app/src/main/res/drawable/shape_gray_100_line_8_rect.xml index d53b8f6..88dc3f1 100644 --- a/app/src/main/res/drawable/shape_gray_100_line_8_rect.xml +++ b/app/src/main/res/drawable/shape_gray_100_line_8_rect.xml @@ -6,7 +6,4 @@ - diff --git a/app/src/main/res/layout/activity_popular_store.xml b/app/src/main/res/layout/activity_popular_store.xml index 7c994f3..7eefa22 100644 --- a/app/src/main/res/layout/activity_popular_store.xml +++ b/app/src/main/res/layout/activity_popular_store.xml @@ -95,6 +95,12 @@ android:layout_height="match_parent" android:text="@string/area_seoul_seocho" /> + + @@ -122,64 +128,16 @@ app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@id/hsv_popular_store_chip" /> - - - - - - - - diff --git a/app/src/main/res/layout/activity_queue_details.xml b/app/src/main/res/layout/activity_queue_details.xml index c32aa21..df6f609 100644 --- a/app/src/main/res/layout/activity_queue_details.xml +++ b/app/src/main/res/layout/activity_queue_details.xml @@ -17,20 +17,47 @@ + app:layout_constraintTop_toTopOf="parent"> + + + + + + + + + + + app:layout_constraintTop_toTopOf="parent"> + + + + + + + + + + + + -