Screens / Plan and storage
Plan and storage
Settings > Plan and storage (owner only), opened from the Plan card in Settings. The plan card names the real plan: Lifetime shows "Lifetime" with "Assigned by Panly" and the header "Now (Lifetime)", an active Monthly plan reads "Now (Premium)" (PAN-98). Free, or Free with a saved Premium choice, shows a note that nothing was charged, the saved add-ons, the limits table (the effective limits the server enforces, including businesses), "Switch to Free" and "Manage add-ons"; the "What happens next" card shows only for Free or a pending plan. No payment is taken in the app yet: a payment-method placeholder stands in.
- App routes
/settings/plan- Access
- settings.manage
- Screen code
lib/screens/plans/plan_page.dartlib/screens/plans/plan_controller.dartlib/screens/plans/plan_copy.dartlib/screens/plans/plans_bindings.dartlib/screens/plans/widgets/plan_state_card.dartlib/screens/plans/widgets/limits_table.dartlib/screens/plans/widgets/manage_add_ons_sheet.dartlib/screens/plans/widgets/saved_add_ons_card.dartlib/screens/plans/widgets/what_happens_next_card.dartlib/screens/plans/widgets/pending_banner.dartlib/domain/plans/plan_state_rules.dartlib/data/repositories/plans_repository.dart- Source
- elmermj/panly-app @ pre-staging-test (72aaffd)
API calls (4)
| Call | Why the screen makes it | Where in the app code |
|---|---|---|
GET /v1/merchants/meGet my merchant (tier, storage usage) |
The business with its plan_state, plan_selection and limits (also read again after every change) | lib/screens/plans/plan_controller.dart:49lib/domain/usecases/settings/settings_usecase.dart:12lib/data/repositories/settings_repository.dart:14 |
GET /v1/plansList plans and add-ons |
The plans and add-ons on offer, with prices, for the limits table and Manage add-ons. A failure leaves the catalogue out and the rest of the page works | lib/screens/plans/plan_controller.dart:50lib/domain/usecases/plans/plans_usecase.dart:12lib/data/repositories/plans_repository.dart:16 |
POST /v1/merchants/me/plan-selectionSave the plan choice (stub, charges nothing) |
Save add-ons: the saved tier with the full replace list of add-ons (an empty list is valid). Nothing is charged Plan or add-on not available answers are worded for the owner by code. |
lib/screens/plans/plan_controller.dart:95lib/domain/usecases/plans/plans_usecase.dart:14lib/data/repositories/plans_repository.dart:38 |
DELETE /v1/merchants/me/plan-selectionClear the saved plan choice |
Switch to Free: clears the saved choice (idempotent); the business is read again | lib/screens/plans/plan_controller.dart:113lib/domain/usecases/plans/plans_usecase.dart:22lib/data/repositories/plans_repository.dart:43 |
Each call links to its operation in the API reference. Code locations are file:line in panly-app at 72aaffd, listed from the screen down to the line that sends the request.