Panly API docsstaging

Screens / Settings

Settings

Settings hub in the refined design (PAN-136): rows open Business profile (/settings/business), Language (/settings/language), Charges (/settings/charges), Change password (/settings/password) and Plan and storage (/settings/plan); a Businesses sheet lists the merchants with switch and Add business (disabled at the plan's limit, PAN-98). Staff summary from GET /v1/members. Back on the tab (PAN-59) the data shows at once and refreshes quietly.

App routes
/settings
Access
settings.manage, items.manage, stock.manage, expenses.manage
Screen code
lib/screens/settings/settings_page.dart
lib/screens/settings/settings_controller.dart
lib/screens/shell/widgets/business_limit_note.dart
lib/screens/settings/widgets/businesses_sheet.dart
lib/screens/settings/widgets/settings_plan_card.dart
lib/screens/settings/widgets/settings_row.dart
Source
elmermj/panly-app @ pre-staging-test (72aaffd)

API calls (5)

CallWhy the screen makes itWhere in the app code
GET /v1/merchants/me
Get my merchant (tier, storage usage)
Business profile lib/screens/settings/settings_controller.dart:108
lib/data/repositories/settings_repository.dart:14
PATCH /v1/merchants/me
Update my merchant
Save name or timezone (only the changed fields; `merchant_name` for the name)
Renames the business currently open; to rename another one, switch to it first. A 422 on the name shows the server's text for now.
lib/screens/settings/settings_controller.dart:183
lib/data/repositories/settings_repository.dart:25
GET /v1/members
List members (memberships) of my merchant
Staff summary lib/screens/settings/settings_controller.dart:133
lib/data/repositories/staff_repository.dart:17
GET /v1/me/merchants
List the merchants I belong to
Merchant list lib/screens/settings/settings_bindings.dart:25
lib/screens/shell/shell_controller.dart:206
lib/data/repositories/auth_repository.dart:360
POST /v1/auth/switch-merchant
Switch to another merchant of the same account
Switch to another merchant lib/screens/settings/widgets/businesses_sheet.dart:65
lib/screens/shell/shell_controller.dart:276
lib/data/repositories/auth_repository.dart:316

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.