fix UI evidence

This commit is contained in:
shaulascr
2025-08-22 14:38:02 +07:00
parent 2f28a23114
commit 2f16542e5e
5 changed files with 21 additions and 19 deletions

View File

@ -145,7 +145,7 @@ class HomeFragment : Fragment() {
binding.loadingAll.root.visibility = View.VISIBLE
binding.error.root.isVisible = false
binding.home.isVisible = false
delay(3000)
delay(5000)
}
is HomeUiState.Success -> {
binding.loadingAll.root.visibility = View.GONE

View File

@ -282,12 +282,12 @@ class CheckoutActivity : AppCompatActivity() {
isNestedScrollingEnabled = false
}
if (checkoutData.cartItems.isEmpty()) {
// Show empty products state
binding.containerEmptyProducts.visibility = View.VISIBLE
binding.rvProductItems.visibility = View.GONE
return
}
// if (checkoutData.cartItems.isEmpty()) {
// // Show empty products state
// binding.containerEmptyProducts.visibility = View.VISIBLE
// binding.rvProductItems.visibility = View.GONE
// return
// }
binding.containerEmptyProducts.visibility = View.GONE
binding.rvProductItems.visibility = View.VISIBLE

View File

@ -61,8 +61,8 @@ class AddEvidencePaymentActivity : AppCompatActivity() {
}
private val paymentMethods = arrayOf(
"Pilih Metode Pembayaran",
"Transfer Bank",
"QRIS",
)
// private val getContent = registerForActivityResult(ActivityResultContracts.GetContent()) { uri: Uri? ->
@ -313,10 +313,10 @@ class AddEvidencePaymentActivity : AppCompatActivity() {
return
}
if (binding.spinnerPaymentMethod.selectedItemPosition == 0) {
Toast.makeText(this, "Silahkan pilih metode pembayaran", Toast.LENGTH_SHORT).show()
return
}
// if (binding.spinnerPaymentMethod.selectedItemPosition == 0) {
// Toast.makeText(this, "Silahkan pilih metode pembayaran", Toast.LENGTH_SHORT).show()
// return
// }
binding.etAccountNumber.visibility = View.GONE
// if (binding.etAccountNumber.text.toString().trim().isEmpty()) {
@ -324,10 +324,10 @@ class AddEvidencePaymentActivity : AppCompatActivity() {
// return
// }
if (binding.tvPaymentDate.text.toString() == "Pilih tanggal") {
Toast.makeText(this, "Silahkan pilih tanggal pembayaran", Toast.LENGTH_SHORT).show()
return
}
// if (binding.tvPaymentDate.text.toString() == "Pilih tanggal") {
// Toast.makeText(this, "Silahkan pilih tanggal pembayaran", Toast.LENGTH_SHORT).show()
// return
// }
// All validations passed, proceed with upload
uploadPaymentProof()

View File

@ -97,7 +97,7 @@ class SellsAdapter(
val product = order.orderItems?.firstOrNull()
tvSellsProductName.text = product?.productName
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) {
is String -> {
@ -170,7 +170,7 @@ class SellsAdapter(
val product = order.orderItems?.firstOrNull()
tvSellsProductName.text = product?.productName
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) {
is String -> {
@ -186,7 +186,7 @@ class SellsAdapter(
.into(ivSellsProduct)
tvSellsQty.text = "${order.orderItems?.size} produk"
tvSellsPrice.text = order.totalAmount?.let { formatPrice(it.toInt()) }
tvSellsPrice.text = order.totalAmount?.let { formatPrice(it.toDouble().toInt()) }
}
"paid" -> {
layoutOrders.visibility = View.GONE

View File

@ -113,6 +113,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:visibility="gone"
android:text="Metode Pembayaran *"
android:fontFamily="@font/dmsans_semibold"
android:textSize="16sp" />
@ -122,6 +123,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:visibility="gone"
android:background="@drawable/edit_text_background"
android:minHeight="50dp"
android:padding="12dp" />