Skip to main content

Profile

Your personal profile — avatar, user details, active account, and role-aware account editing.

Pilot
Agronomist
Farmer

The Profile page is each user's personal view. Pilots, agronomists, technicians, members, and owners all share the same Profile shape — but owners see extra editing affordances on the Account card.

This feature ships in the open PR #207 (Feature/Customer Profile). The behavior described here matches that PR.

Where to find it

  • Click your avatar in the lower-left of the sidebar.
  • Pick View Profile.

The URL pattern is /<locale>/<accountId>/profile (under the active account, since some details — like active role — are account-scoped).

Page layout

The page has three primary sections:

1. Avatar Upload Section

A drop-zone-style component (AvatarUploadSection) with:

  • Drag-and-drop to upload a new picture.
  • Camera overlay on hover (the picture-replace affordance).
  • 5 MB size cap. Files larger than this trigger the size-limit alert.

Upload mechanics:

  1. The portal calls generatePictureUploadUrl to get a presigned S3 URL.
  2. Your browser uploads the file directly to S3 via PUT.
  3. The portal saves the new URL on your user record.

If the file is too large, you'll see the size error alert. If the upload fails for any other reason (network, S3), an error alert appears and the previous avatar is preserved.

2. User info

Your own user fields:

  • Full Name
  • Email Address
  • Phone Number
  • Profile language preference

A pencil/edit icon opens the Edit User drawer.

3. Account info

The active account's fields:

  • Account name
  • Billing address
  • Tax / EIN information (where applicable)

Role-aware behavior:

  • Owner: a Edit Account button is visible and opens the Edit Account drawer.
  • Non-owner (Administrator, Member, Pilot, etc.): the section is read-only. The edit button is hidden.

4. Activity stats

Quick rollup:

  • Last sign-in.
  • Most recent actions (last few prescriptions / flights generated by you).

Edit User drawer

Form built with React Hook Form + Zod validation. Editable fields:

  • Full Name
  • Phone Number
  • Language preference

On submit, the portal sends PATCH /v1/users/me. A success alert confirms. Errors surface inline on the form.

Edit Account drawer (Owner-only)

Editable fields:

  • Account name (legal entity).
  • Billing address.
  • Tax info.

The drawer is gated behind an OWNER role check on the server. Even if a non-owner crafts the request, the API refuses.

Flight Records — pagination fix

PR #207 also ports the pagination fix from the OEM/Dealer apps to the customer app's FlightRecordsTab via a new useFlightRecordsQuery hook. Practically:

  • The Flight Log tab on the drone detail page now correctly paginates with larger date ranges.
  • You should no longer see the "frozen middle page" issue.

Permissions

ActionRole
View own profileEvery user.
Upload own avatarEvery user.
Edit own user infoEvery user.
View account infoEvery user.
Edit account infoOwner only.

Was this page helpful?

Edit this page on GitHub

Last updated Oct 20, 2018