mirror of
https://github.com/shaulascr/ecommerce_serang.git
synced 2025-12-16 07:51:02 +00:00
fix UI evidence
This commit is contained in:
@ -145,7 +145,7 @@ class HomeFragment : Fragment() {
|
|||||||
binding.loadingAll.root.visibility = View.VISIBLE
|
binding.loadingAll.root.visibility = View.VISIBLE
|
||||||
binding.error.root.isVisible = false
|
binding.error.root.isVisible = false
|
||||||
binding.home.isVisible = false
|
binding.home.isVisible = false
|
||||||
delay(3000)
|
delay(5000)
|
||||||
}
|
}
|
||||||
is HomeUiState.Success -> {
|
is HomeUiState.Success -> {
|
||||||
binding.loadingAll.root.visibility = View.GONE
|
binding.loadingAll.root.visibility = View.GONE
|
||||||
|
|||||||
@ -282,12 +282,12 @@ class CheckoutActivity : AppCompatActivity() {
|
|||||||
isNestedScrollingEnabled = false
|
isNestedScrollingEnabled = false
|
||||||
}
|
}
|
||||||
|
|
||||||
if (checkoutData.cartItems.isEmpty()) {
|
// if (checkoutData.cartItems.isEmpty()) {
|
||||||
// Show empty products state
|
// // Show empty products state
|
||||||
binding.containerEmptyProducts.visibility = View.VISIBLE
|
// binding.containerEmptyProducts.visibility = View.VISIBLE
|
||||||
binding.rvProductItems.visibility = View.GONE
|
// binding.rvProductItems.visibility = View.GONE
|
||||||
return
|
// return
|
||||||
}
|
// }
|
||||||
|
|
||||||
binding.containerEmptyProducts.visibility = View.GONE
|
binding.containerEmptyProducts.visibility = View.GONE
|
||||||
binding.rvProductItems.visibility = View.VISIBLE
|
binding.rvProductItems.visibility = View.VISIBLE
|
||||||
|
|||||||
@ -61,8 +61,8 @@ class AddEvidencePaymentActivity : AppCompatActivity() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private val paymentMethods = arrayOf(
|
private val paymentMethods = arrayOf(
|
||||||
|
"Pilih Metode Pembayaran",
|
||||||
"Transfer Bank",
|
"Transfer Bank",
|
||||||
"QRIS",
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// private val getContent = registerForActivityResult(ActivityResultContracts.GetContent()) { uri: Uri? ->
|
// private val getContent = registerForActivityResult(ActivityResultContracts.GetContent()) { uri: Uri? ->
|
||||||
@ -313,10 +313,10 @@ class AddEvidencePaymentActivity : AppCompatActivity() {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if (binding.spinnerPaymentMethod.selectedItemPosition == 0) {
|
// if (binding.spinnerPaymentMethod.selectedItemPosition == 0) {
|
||||||
Toast.makeText(this, "Silahkan pilih metode pembayaran", Toast.LENGTH_SHORT).show()
|
// Toast.makeText(this, "Silahkan pilih metode pembayaran", Toast.LENGTH_SHORT).show()
|
||||||
return
|
// return
|
||||||
}
|
// }
|
||||||
binding.etAccountNumber.visibility = View.GONE
|
binding.etAccountNumber.visibility = View.GONE
|
||||||
|
|
||||||
// if (binding.etAccountNumber.text.toString().trim().isEmpty()) {
|
// if (binding.etAccountNumber.text.toString().trim().isEmpty()) {
|
||||||
@ -324,10 +324,10 @@ class AddEvidencePaymentActivity : AppCompatActivity() {
|
|||||||
// return
|
// return
|
||||||
// }
|
// }
|
||||||
|
|
||||||
if (binding.tvPaymentDate.text.toString() == "Pilih tanggal") {
|
// if (binding.tvPaymentDate.text.toString() == "Pilih tanggal") {
|
||||||
Toast.makeText(this, "Silahkan pilih tanggal pembayaran", Toast.LENGTH_SHORT).show()
|
// Toast.makeText(this, "Silahkan pilih tanggal pembayaran", Toast.LENGTH_SHORT).show()
|
||||||
return
|
// return
|
||||||
}
|
// }
|
||||||
|
|
||||||
// All validations passed, proceed with upload
|
// All validations passed, proceed with upload
|
||||||
uploadPaymentProof()
|
uploadPaymentProof()
|
||||||
|
|||||||
@ -97,7 +97,7 @@ class SellsAdapter(
|
|||||||
val product = order.orderItems?.firstOrNull()
|
val product = order.orderItems?.firstOrNull()
|
||||||
tvSellsProductName.text = product?.productName
|
tvSellsProductName.text = product?.productName
|
||||||
tvSellsProductQty.text = "x${product?.quantity}"
|
tvSellsProductQty.text = "x${product?.quantity}"
|
||||||
tvSellsProductPrice.text = product?.price?.let { formatPrice(it.toInt()) }
|
tvSellsProductPrice.text = product?.price?.let { formatPrice(it.toDouble().toInt()) }
|
||||||
|
|
||||||
val fullImageUrl = when (val img = product?.productImage) {
|
val fullImageUrl = when (val img = product?.productImage) {
|
||||||
is String -> {
|
is String -> {
|
||||||
@ -170,7 +170,7 @@ class SellsAdapter(
|
|||||||
val product = order.orderItems?.firstOrNull()
|
val product = order.orderItems?.firstOrNull()
|
||||||
tvSellsProductName.text = product?.productName
|
tvSellsProductName.text = product?.productName
|
||||||
tvSellsProductQty.text = "x${product?.quantity}"
|
tvSellsProductQty.text = "x${product?.quantity}"
|
||||||
tvSellsProductPrice.text = product?.price?.let { formatPrice(it.toInt()) }
|
tvSellsProductPrice.text = product?.price?.let { formatPrice(it.toDouble().toInt()) }
|
||||||
|
|
||||||
val fullImageUrl = when (val img = product?.productImage) {
|
val fullImageUrl = when (val img = product?.productImage) {
|
||||||
is String -> {
|
is String -> {
|
||||||
@ -186,7 +186,7 @@ class SellsAdapter(
|
|||||||
.into(ivSellsProduct)
|
.into(ivSellsProduct)
|
||||||
|
|
||||||
tvSellsQty.text = "${order.orderItems?.size} produk"
|
tvSellsQty.text = "${order.orderItems?.size} produk"
|
||||||
tvSellsPrice.text = order.totalAmount?.let { formatPrice(it.toInt()) }
|
tvSellsPrice.text = order.totalAmount?.let { formatPrice(it.toDouble().toInt()) }
|
||||||
}
|
}
|
||||||
"paid" -> {
|
"paid" -> {
|
||||||
layoutOrders.visibility = View.GONE
|
layoutOrders.visibility = View.GONE
|
||||||
|
|||||||
@ -113,6 +113,7 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="16dp"
|
android:layout_marginTop="16dp"
|
||||||
|
android:visibility="gone"
|
||||||
android:text="Metode Pembayaran *"
|
android:text="Metode Pembayaran *"
|
||||||
android:fontFamily="@font/dmsans_semibold"
|
android:fontFamily="@font/dmsans_semibold"
|
||||||
android:textSize="16sp" />
|
android:textSize="16sp" />
|
||||||
@ -122,6 +123,7 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="8dp"
|
||||||
|
android:visibility="gone"
|
||||||
android:background="@drawable/edit_text_background"
|
android:background="@drawable/edit_text_background"
|
||||||
android:minHeight="50dp"
|
android:minHeight="50dp"
|
||||||
android:padding="12dp" />
|
android:padding="12dp" />
|
||||||
|
|||||||
Reference in New Issue
Block a user