[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

This commit is contained in:
2026-09-15 08:33:07 -03:00
parent c6859bf9e3
commit 81528f805b
2 changed files with 14 additions and 6 deletions

View File

@@ -1001,7 +1001,7 @@
CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
CODE_SIGN_STYLE = Manual; CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 2026.09.11.0.0.1; CURRENT_PROJECT_VERSION = 2026.09.15.0.01;
DEVELOPMENT_TEAM = ""; DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = K4E5BZMM4V; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = K4E5BZMM4V;
ENABLE_PREVIEWS = YES; ENABLE_PREVIEWS = YES;
@@ -1025,7 +1025,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.br.pedifoods.app; PRODUCT_BUNDLE_IDENTIFIER = com.br.pedifoods.app;
PRODUCT_NAME = PediFoods; PRODUCT_NAME = PediFoods;
PROVISIONING_PROFILE_SPECIFIER = ""; PROVISIONING_PROFILE_SPECIFIER = "";
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "LC Prov PediFoods Dist Profile"; "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "LC Prov PediFoods Dist Profile McPro";
SDKROOT = iphoneos; SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
SUPPORTS_MACCATALYST = NO; SUPPORTS_MACCATALYST = NO;
@@ -1046,7 +1046,7 @@
CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Manual; CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 2026.09.11.0.0.1; CURRENT_PROJECT_VERSION = 2026.09.15.0.01;
DEVELOPMENT_TEAM = ""; DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = K4E5BZMM4V; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = K4E5BZMM4V;
ENABLE_PREVIEWS = YES; ENABLE_PREVIEWS = YES;
@@ -1070,7 +1070,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.br.pedifoods.app; PRODUCT_BUNDLE_IDENTIFIER = com.br.pedifoods.app;
PRODUCT_NAME = PediFoods; PRODUCT_NAME = PediFoods;
PROVISIONING_PROFILE_SPECIFIER = ""; PROVISIONING_PROFILE_SPECIFIER = "";
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "LC Prov PediFoods Dev Profile"; "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "LC Prov PediFoods Dev Profile McPro";
SDKROOT = iphoneos; SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
SUPPORTS_MACCATALYST = NO; SUPPORTS_MACCATALYST = NO;
@@ -1124,7 +1124,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.br.pedifoods.app.NotificationService; PRODUCT_BUNDLE_IDENTIFIER = com.br.pedifoods.app.NotificationService;
PRODUCT_NAME = NotificationService; PRODUCT_NAME = NotificationService;
PROVISIONING_PROFILE_SPECIFIER = ""; PROVISIONING_PROFILE_SPECIFIER = "";
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "LC Prov PediFoods Dev Push Profile"; "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "LC Prov PediFoods Dev Push Profile McPro";
SDKROOT = iphoneos; SDKROOT = iphoneos;
SKIP_INSTALL = YES; SKIP_INSTALL = YES;
SWIFT_VERSION = 6; SWIFT_VERSION = 6;
@@ -1255,7 +1255,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.br.pedifoods.app.NotificationService; PRODUCT_BUNDLE_IDENTIFIER = com.br.pedifoods.app.NotificationService;
PRODUCT_NAME = NotificationService; PRODUCT_NAME = NotificationService;
PROVISIONING_PROFILE_SPECIFIER = ""; PROVISIONING_PROFILE_SPECIFIER = "";
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "LC Prov PediFoods Dist Push Profile"; "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "LC Prov PediFoods Dist Push Profile McPro";
SDKROOT = iphoneos; SDKROOT = iphoneos;
SKIP_INSTALL = YES; SKIP_INSTALL = YES;
SWIFT_VERSION = 6; SWIFT_VERSION = 6;

View File

@@ -180,6 +180,9 @@ struct CartView: View {
} }
private var deliveryFeeLabel: String { private var deliveryFeeLabel: String {
guard appState.session.isAuthenticated else {
return "Login para calcular"
}
if isLoadingDeliveryFee { if isLoadingDeliveryFee {
return "Calculando..." return "Calculando..."
} }
@@ -293,6 +296,11 @@ struct CartView: View {
selectedCustomerAddress = nil selectedCustomerAddress = nil
return return
} }
guard appState.session.isAuthenticated else {
deliveryFee = nil
selectedCustomerAddress = nil
return
}
isLoadingDeliveryFee = true isLoadingDeliveryFee = true
defer { isLoadingDeliveryFee = false } defer { isLoadingDeliveryFee = false }