[cart-guest-delivery-fee] Show login prompt instead of unavailable for guest cart delivery fee
Some checks failed
Validation (test + coverage) / test (push) Has been cancelled
Some checks failed
Validation (test + coverage) / test (push) Has been cancelled
This commit is contained in:
@@ -180,6 +180,9 @@ struct CartView: View {
|
||||
}
|
||||
|
||||
private var deliveryFeeLabel: String {
|
||||
guard appState.session.isAuthenticated else {
|
||||
return "Login para calcular"
|
||||
}
|
||||
if isLoadingDeliveryFee {
|
||||
return "Calculando..."
|
||||
}
|
||||
@@ -293,6 +296,11 @@ struct CartView: View {
|
||||
selectedCustomerAddress = nil
|
||||
return
|
||||
}
|
||||
guard appState.session.isAuthenticated else {
|
||||
deliveryFee = nil
|
||||
selectedCustomerAddress = nil
|
||||
return
|
||||
}
|
||||
|
||||
isLoadingDeliveryFee = true
|
||||
defer { isLoadingDeliveryFee = false }
|
||||
|
||||
Reference in New Issue
Block a user