Commit Graph

87 Commits

Author SHA1 Message Date
Daniel Arantes Loverde
eae9613ed5 fix(checkout): display snackbar on top of sheet modals 2026-06-04 16:17:34 -03:00
Daniel Arantes Loverde
39ddf9c86c fix(api): map API response error payload and validate card saving synchronously 2026-06-04 16:06:22 -03:00
Daniel Arantes Loverde
8c19b1323c fix(payment): accept either 2-digit or 4-digit years in card expiry validation 2026-06-04 15:58:52 -03:00
Daniel Arantes Loverde
f49e4ea337 fix(payment): validate card expiry date month range and fix PaymentCardView character length 2026-06-04 15:48:00 -03:00
Daniel Arantes Loverde
2809131c25 fix(payment): move detectedBrandLogo computed property into correct scope inside PaymentCardView 2026-06-04 15:41:30 -03:00
Daniel Arantes Loverde
b633adad61 Merge branch 'feature/card-management' into feature/card-brand-logo
# Conflicts:
#	pedi-foods/Sources/PediFoods/Views/Main/CheckoutView.swift
2026-06-04 15:38:50 -03:00
Daniel Arantes Loverde
c31875ec3b fix(payment): set text field foreground color to brandDark for card input fields 2026-06-04 15:28:20 -03:00
Daniel Arantes Loverde
a319a8f534 feat(payment): add custom logo for PIX payment method 2026-06-04 15:27:15 -03:00
Daniel Arantes Loverde
46d955a92f feat(payment): identify card brand and display logo dynamically 2026-06-04 15:23:02 -03:00
Daniel Arantes Loverde
ee8745553e feat(payment): implement change payment method (PATCH /payment-method)
- ChangePaymentMethodPayload + ChangePaymentMethodResult models
- ApiService.changePaymentMethod()
- PixPaymentContext gains storeId + order data for payment switch
- PaymentPixView: Trocar button opens ChangePaymentSheet with 3 options
- ChangePaymentSheet: Novo PIX (new QR), Cartão (saved or new), Pagar na Entrega
- ChangePaymentCardSheet + ChangePaymentNewCardView with same card masks/validation
- OrdersView/OrderEntryDestinationView: threaded appState binding
2026-06-03 18:49:07 -03:00
Daniel Arantes Loverde
9525c19b6b fix(cards): propagate API validation error message to user on card submit failure 2026-06-03 18:06:43 -03:00
Daniel Arantes Loverde
abd58ac36d feat(cards): add input masks and char limits to card form fields
- Card number: groups of 4 digits (0000 0000 0000 0000), max 16 digits
- Expiry: MM/AAAA mask, max 6 digits
- CVV: digits only, max 4
- CPF: 000.000.000-00 mask, max 11 digits
- canSubmit validates stripped digit counts
2026-06-03 17:58:44 -03:00
Daniel Arantes Loverde
a548955320 fix(cards): replace NavigationStack header with custom X button, new card form opens as sheet 2026-06-03 17:44:10 -03:00
Daniel Arantes Loverde
6b397db494 feat(cards): implement full saved card management and transparent checkout
- ApiCardModels.swift: SavedCard, SaveCardPayload, CreditCardOrderPayload, etc.
- ApiOrderModels.swift: add savedCardId, clientCpfCnpj, creditCard, creditCardHolderInfo to CreateOrderPayload; Codable for item/addon payloads
- ApiService.swift: listCards, saveCard, updateCard, deleteCard, updateProfileCpf
- AppState.ProfileState: add cpf field
- CheckoutView: CardSelectionSheet (list saved cards + add new), rewrite PaymentCardView (submits order with card data), CardPaymentContext carries full order data
- CheckoutView+Logic: buildCreateOrderPayload accepts card params, new loadSavedCards/confirmOrderWithSavedCard/handleOrderResponse helpers, redirect credit card confirm to CardSelectionSheet
- OrdersView: CREDIT_CARD pending orders go to tracking (not card form, since card is now submitted with order)
- UserProfileView: CPF field with mask, save via PATCH /api/customer/profile
2026-06-03 17:32:30 -03:00
Daniel Arantes Loverde
2d27240cee feat(checkout): replace dual payment group cards with single toggle switch
Toggle ON = Pagar Pelo App (default), shows in-app methods (PIX, Credit Card)
Toggle OFF = Pagar Na Maquininha, shows store machine methods
Automatically resets paymentMethod on toggle switch
Removes paymentGroupCard helper, saves vertical space
2026-06-03 15:49:26 -03:00
Daniel Arantes Loverde
c89c80e8d1 fix(store): replace pinnedViews with ZStack overlay to prevent EXC_BAD_ACCESS crash
pinnedViews + rapid state changes from stretchAmount every frame during overscroll
triggers SwiftUI memory corruption. ZStack overlay approach is crash-free:
- LazyVStack with no pinnedViews
- Inline tabs fade out when pinned threshold reached
- Overlay tabs (with safeAreaTop padding) fade in at top of ZStack
2026-06-03 15:20:44 -03:00
Daniel Arantes Loverde
82ab29388f fix(store): revert non-image elements to original, stretch only cover image 2026-06-03 15:16:23 -03:00
Daniel Arantes Loverde
3e18c02f4d fix(store): pin all non-image elements during overscroll bounce
Apply offset(y: -stretchAmount) to gradient, buttons, summaryCard, storeLogoBadge, and hard-cut rectangle so only the cover image stretches on pull-down
2026-06-03 15:09:17 -03:00
Daniel Arantes Loverde
1f2089772c fix(store): separate gradient from cover image so only image stretches on overscroll 2026-06-03 15:03:54 -03:00
Daniel Arantes Loverde
d2189bb701 feat(store): stretch cover image on pull-down overscroll
- Remove max(0) clamp in ScrollOffsetReader to allow negative values during bounce
- Add stretchAmount computed var (max(0, -scrollOffset))
- Hero image frame grows by stretchAmount and offsets upward on overscroll
- isCategoryTabsPinned still uses max(0, scrollOffset) via >= check
2026-06-03 15:01:23 -03:00
Daniel Arantes Loverde
f51319b486 master merged 2026-06-03 14:52:27 -03:00
Daniel Arantes Loverde
980a106661 Merge branch 'main' of https://git.loverde.com.br/Loverde-Company-LTDA/Pedi-Foods-Skip 2026-06-03 14:52:19 -03:00
ff4e88c148 Merge pull request 'feature/step-001' (#4) from feature/step-001 into main
Reviewed-on: Loverde-Company-LTDA/Pedi-Foods-Skip#4
2026-06-03 14:50:19 -03:00
bdae1972b6 Merge branch 'main' into feature/step-001 2026-06-03 14:50:10 -03:00
Daniel Arantes Loverde
aa38153f11 chore: remove SkipFuseUI dependency and replace with OSLog
- Remove skip-fuse-ui package from Package.swift dependencies and target products
- Replace `import SkipFuse` with `import OSLog` in PediFoodsApp.swift

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-03 14:43:00 -03:00
Daniel Arantes Loverde
637c851388 Merge branch 'main' into feature/step-001 2026-06-03 14:31:21 -03:00
Daniel Arantes Loverde
74848192a0 bck 2026-06-03 14:31:11 -03:00
Daniel Arantes Loverde
69dd67b8a5 fix(store): replace ZStack overlay sticky approach with native pinnedViews + reliable scroll tracking
- Use LazyVStack(pinnedViews: [.sectionHeaders]) for native section header stickiness
- Move ScrollOffsetReader outside LazyVStack (sibling) to prevent lazy-unload breaking scroll tracking
- Add baseline capture to ScrollOffsetReader to correctly normalize offset regardless of ScrollView content insets
- Apply safeAreaTop padding to categoryTabs only when pinned (isCategoryTabsPinned), preventing oversized header before scroll
- Remove complex ZStack dual-tabs overlay, stickyProgress logic, and categoryTabsStickyProgress
- categoryTabs now accepts isPinned flag with easeInOut(0.15s) animation on pin transition

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-03 14:26:23 -03:00
Daniel Arantes Loverde
b61f59c253 fix(store): read scrollOffset from ScrollView background to prevent geometry loss during cell recycling 2026-06-03 11:45:32 -03:00
Daniel Arantes Loverde
981703bcc5 fix(store): scan all window scenes and fallback to app windows to reliably calculate appSafeAreaTop 2026-06-03 11:43:29 -03:00
Daniel Arantes Loverde
aa1d78b53c fix(store): replace custom geometry safe area top reader with computed property to fix category tabs placement 2026-06-03 11:41:23 -03:00
Daniel Arantes Loverde
dad2070933 fix(store): remove section header pinning to prevent categories from blocking under dynamic island 2026-06-03 11:35:05 -03:00
Daniel Arantes Loverde
235b6d44cc fix(store): position categories view below dynamic island using reactive safe area top reader & refactor layout components 2026-06-03 11:29:27 -03:00
Daniel Arantes Loverde
9fb8dae45a fix(android): restore bundle mapping for module resources and local login animation 2026-05-27 15:22:57 -03:00
Daniel Arantes Loverde
be6c31832f fix(android): resolve background image visibility and local flow animations on login 2026-05-27 15:12:38 -03:00
Daniel Arantes Loverde
215d208f4f fix(android): resolve local asset image resource loading using asyncimage and bundle url 2026-05-27 15:01:49 -03:00
Daniel Arantes Loverde
c14bd7a928 fix(android): apply robust static RGB colors and compatible background opacity fallback 2026-05-27 14:38:02 -03:00
Daniel Arantes Loverde
68864ee21a fix(android): resolve color parser and resource bundle resolution issues 2026-05-27 09:55:00 -03:00
Daniel Arantes Loverde
0e6206f899 fix(android): replace default android launcher icons with pedifoods branding 2026-05-27 09:14:29 -03:00
Daniel Arantes Loverde
2f4e47105e docs(android): mark Task 6 as completed in action plan 2026-05-26 19:13:06 -03:00
Daniel Arantes Loverde
6bb941bd16 fix(android): resolve adaptive icon crash in native splash xml 2026-05-26 19:12:54 -03:00
Daniel Arantes Loverde
2a2d078257 fix(android): resolve coordinateSpace compatibility for Android in StoreDetailView 2026-05-26 18:57:10 -03:00
Daniel Arantes Loverde
a12cfb6bf3 Lixo 2026-04-28 09:26:08 -03:00
Daniel Arantes Loverde
e54c0a029f fix(android): add coordinate space fallbacks for android build 2026-04-17 15:57:17 -03:00
Daniel Arantes Loverde
66de1e3031 Apps 2026-04-17 14:57:53 -03:00
Daniel Arantes Loverde
5f7e8b29d5 fix(android): enable home header scroll observer 2026-04-17 14:56:36 -03:00
Daniel Arantes Loverde
16df939a1c feat(android): add native launch splash theme 2026-04-17 14:55:37 -03:00
Daniel Arantes Loverde
4587ec838f fix(android): refresh location cache on resume 2026-04-17 14:48:50 -03:00
Daniel Arantes Loverde
246e1a272b refactor(android): centralize clipboard handling 2026-04-17 14:44:27 -03:00
Daniel Arantes Loverde
3c78f2558e feat(android): improve profile avatar parity 2026-04-17 14:41:19 -03:00