Commit Graph

115 Commits

Author SHA1 Message Date
45a89c2e72 Merge pull request 'Fix apikey.json generation to escape multi-line PEM content' (#13) from fix/ci/apikey-json-escaping into main
Reviewed-on: Loverde-Company-LTDA/Pedi-Foods-Skip#13
2026-07-09 16:29:13 -03:00
Daniel Arantes Loverde
5761523344 [ci-bitrise] Mirror LC Wallet's bitrise.yml structure exactly
Switch from fastlane-driven build (build_app + hand-rolled apikey.json)
to Bitrise's own xcode-archive step, matching LC Wallet 1:1: manage-ios-
code-signing + xcode-archive@5 (automatic_code_signing: api-key) do the
build/sign, deploy-to-itunesconnect-deliver@2 handles TestFlight in the
beta workflow, fastlane only runs for the release lane (metadata push +
App Store upload) reading BITRISE_IPA_PATH — same shape as LC Wallet's
Fastfile beta/release lanes.

Only genuine differences from LC Wallet, all forced by this project's
actual layout:
- BITRISE_PROJECT_PATH/SCHEME point at Darwin/PediFoods.xcodeproj
- fastlane work_dir is Darwin/ (Fastfile lives there, not repo root)
- build number bumps CURRENT_PROJECT_VERSION in Skip.env instead of
  agvtool — this project has no VERSIONING_SYSTEM set, Skip.env is the
  actual shared source of truth for both Darwin and Android
- team_id comes from a DEVELOPMENT_TEAM secret instead of a hardcoded
  literal — LC Wallet's Apple team ID isn't necessarily this app's
2026-07-09 16:24:23 -03:00
Daniel Arantes Loverde
74526d0fb9 [ci-bitrise] Fix apikey.json generation to escape multi-line PEM content
ASC_KEY_CONTENT is the raw .p8 private key, which contains literal
newlines. The heredoc interpolated it straight into a JSON string,
producing invalid JSON (JSON::ParserError in get_provisioning_profile).
Build the file with Ruby's JSON encoder instead so newlines are escaped
correctly. Verified locally against a realistic multi-line PEM value.
2026-07-09 16:21:02 -03:00
8cb0c57da6 Bitrise Test
Merge pull request 'Update ContentView.swift' (#12) from feature/ci/bitrise-setup into main
Reviewed-on: Loverde-Company-LTDA/Pedi-Foods-Skip#12
2026-07-09 15:53:16 -03:00
6218595355 Merge branch 'main' into feature/ci/bitrise-setup 2026-07-09 15:52:51 -03:00
Daniel Arantes Loverde
a2df5d5e7b Update ContentView.swift 2026-07-09 15:51:29 -03:00
a91086b187 Merge pull request '[ci-bitrise] Fix envs and versioning to match this project's actual config' (#10) from feature/ci/bitrise-setup into main
Reviewed-on: Loverde-Company-LTDA/Pedi-Foods-Skip#10
2026-07-09 15:20:34 -03:00
289344a620 Merge branch 'main' into feature/ci/bitrise-setup 2026-07-09 15:19:57 -03:00
Daniel Arantes Loverde
ffd7ca6125 [ci-bitrise] Fix envs and versioning to match this project's actual config
agvtool doesn't apply here — no VERSIONING_SYSTEM set, CURRENT_PROJECT_VERSION
comes from Skip.env (shared with the Android side) via #include in
Darwin/PediFoods.xcconfig. Bump it there instead.

Dropped APPLE_ID, ITC_TEAM_ID and unused BITRISE_DISTRIBUTION_METHOD carried
over from LC Wallet's Fastfile/Appfile shape — none of them are read anywhere
in this project's Appfile or Fastfile.

Added the actual missing piece: DEVELOPMENT_TEAM, which both
Darwin/PediFoods.xcconfig and Darwin/fastlane/AppStore.xcconfig leave blank
on purpose for CI to fill in. Wired BITRISE_DISTRIBUTION_METHOD into
build_app's export_method so it stops being dead config.
2026-07-09 14:07:57 -03:00
c73f34a98f Merge pull request 'Add Bitrise pipeline for TestFlight and App Store deploys' (#9) from feature/ci/bitrise-setup into main
Reviewed-on: Loverde-Company-LTDA/Pedi-Foods-Skip#9
2026-07-09 13:51:48 -03:00
Daniel Arantes Loverde
38e641a082 [ci-bitrise] Add Bitrise pipeline for TestFlight and App Store deploys
Modeled on LC Wallet's bitrise.yml. Push-only trigger map (develop->beta,
main->release), no PR-triggered checks. Reuses the existing Skip fastlane
lanes directly instead of a generic xcode-archive step, since build_app
already carries the Skip-specific xcconfig and build flags. Adds a beta
lane (TestFlight) to match release, which was the only lane wired before.
2026-07-09 13:46:49 -03:00
8728bc1438 Merge pull request '[ci] Remove Gitea Actions workflows' (#8) from feature/legal/api-links into main
Reviewed-on: Loverde-Company-LTDA/Pedi-Foods-Skip#8
2026-07-09 13:36:19 -03:00
2510aa0646 Merge branch 'main' into feature/legal/api-links 2026-07-09 13:35:40 -03:00
Daniel Arantes Loverde
2124886e28 [ci] Remove Gitea Actions workflows
iOS build/tests do not run through Gitea CI.
2026-07-09 10:57:21 -03:00
7fc140793f Merge pull request 'Load Terms of Use and Privacy Policy from Atomenta API' (#7) from feature/legal/api-links into main
Reviewed-on: Loverde-Company-LTDA/Pedi-Foods-Skip#7
2026-07-09 10:11:23 -03:00
Daniel Arantes Loverde
91c53c90d5 [legal-api-links] Load Terms of Use and Privacy Policy from Atomenta API
Terms and Privacy screens now fetch the real PediFoods customer PDFs
from the backend instead of showing static placeholder text. Also
surfaces both links on the Profile screen below the version label,
not just during registration.
2026-07-09 09:55:36 -03:00
83b991c0f0 Merge pull request 'Commit' (#6) from feature/card-brand-logo into main
Reviewed-on: Loverde-Company-LTDA/Pedi-Foods-Skip#6
2026-07-07 16:34:51 -03:00
b80c03f1d5 Merge branch 'main' into feature/card-brand-logo 2026-07-07 15:44:53 -03:00
Daniel Arantes Loverde
e51c99973f Commit 2026-07-07 15:11:31 -03:00
024fd589ef Merge pull request 'feature/card-brand-logo' (#5) from feature/card-brand-logo into main
Reviewed-on: Loverde-Company-LTDA/Pedi-Foods-Skip#5
2026-06-12 16:47:46 -03:00
Daniel Arantes Loverde
8b9ebdcb44 Readme 2026-06-12 16:47:18 -03:00
Daniel Arantes Loverde
35418cc4a2 docs(api): document pizza item payload format in Create Order endpoint
Add choices[] field documentation with format table, example payload
and business rules for size/flavor/dough/crust serialization.
2026-06-09 08:58:26 -03:00
Daniel Arantes Loverde
23d9752bfd Almost done 2026-06-08 10:46:52 -03:00
Daniel Arantes Loverde
aec1193944 docs(api): add Set Default Address endpoint documentation
PATCH /api/customer/addresses/:addressId/default — sets isDefault=true
on the target address and false on all others. Documents id field now
present in address_book entries, isDefault behavior, and example payload.
2026-06-06 09:44:29 -03:00
Daniel Arantes Loverde
18818f909a cards 2026-06-05 16:32:08 -03:00
Daniel Arantes Loverde
e62bd60e9a docs(feature-control): fix flag key prefix fc. → at. across all docs
Real key pattern is at.<domain>.<name> (e.g. at.ios.only, at.promo).
The fc. prefix in the BFF README and API_Mobile_App.md was incorrect.

- API_Mobile_App.md: updated request keys, response raw examples,
  flag table, and Swift usage examples to at. prefix
- API_Mobile_App.md: clarified that app uses raw["at.key"] not
  simplified flags object (FeatureFlagsState.isEnabled reads raw)
- feature-control-bff/README.md: updated DEFAULTS_JSON example,
  request keys, response flags/raw examples, added note about raw usage
2026-06-05 16:30:57 -03:00
Daniel Arantes Loverde
09396ebcf3 docs(api): add Feature Control section to API_Mobile_App.md
Full contract for iOS integration:
- POST /feature-control/bootstrap: request/response, context fields,
  flags camelCase mapping table, source/fallback strategy
- POST /feature-control/telemetry/exposure: batch event format
- Available flags reference table (fc.ios, fc.android, fc.promo, etc.)
- Recommended session flow with cache guidance (15 min client-side)
2026-06-05 16:19:26 -03:00
Daniel Arantes Loverde
ff1ad1254d docs(api): fix and expand PATCH /api/customer/profile documentation
Corrected method (was POST /api/customer/:id, now PATCH /api/customer/profile).
Added profilePicture field: base64 data URL, max 2 MB, jpeg/png/webp.
Added field table, format examples, profilePictureUrl response, error table.
2026-06-04 21:23:13 -03:00
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