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">
+
+
+
+
+
+
+
+
+
+
+
+
-
+ app:layout_constraintStart_toStartOf="@+id/tv_waiting_detail_name"
+ app:layout_constraintTop_toBottomOf="@+id/layout_waiting_detail_front_waiting">
-
+
+
+
+
+
+
-
-