Skip to content

feat: connect organization settings profile to backend#455

Merged
codeZe-us merged 1 commit into
SafeVault:devfrom
MooreTheAnalyst:feat/connect-org-settings-profile-427
Apr 29, 2026
Merged

feat: connect organization settings profile to backend#455
codeZe-us merged 1 commit into
SafeVault:devfrom
MooreTheAnalyst:feat/connect-org-settings-profile-427

Conversation

@MooreTheAnalyst
Copy link
Copy Markdown

What this PR does

Connects the Organization Settings pages to the backend so administrators can view and update their company's operational details in real time.

Changes

  • src/lib/api/organization.ts (new): OrganizationApi with getProfile() and updateProfile() wrapping GET / PUT /api/v1/company/profile.
  • settings/page.tsx: fetches real org data on mount — company name, registration number, country, and addresses are all live. Addresses section shows saved values with an Edit link, or an add prompt when empty.
  • settings/company/company-info/page.tsx: pre-fills from the API on load; submits name, registration number, and country via updateProfile.
  • settings/company/addresses/billing-address/page.tsx: pre-fills from profile.billing; submits billing address fields.
  • settings/company/addresses/registered-address/page.tsx: pre-fills from profile.registered; submits registered address fields.

All forms show a loading state while fetching, a saving state on submit, and inline success/error feedback.

Testing

TypeScript type-check passes with no errors in the changed files (npx tsc --noEmit).

Closes #427

- Add src/lib/api/organization.ts with OrganizationApi.getProfile() and
  OrganizationApi.updateProfile() wrapping GET/PUT /api/v1/company/profile
- Pre-fill company-info page from API on mount; submit calls updateProfile
- Pre-fill billing-address page from profile.billing; submit persists changes
- Pre-fill registered-address page from profile.registered; submit persists changes
- Update settings/page.tsx to fetch real org data on mount: company name,
  registration number, country, and address fields all reflect live API data
- Addresses section shows saved address text with Edit link, or an add prompt
  when empty

Closes SafeVault#427
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 27, 2026

@MooreTheAnalyst is attempting to deploy a commit to the vestroll's projects Team on Vercel.

A member of the Team first needs to authorize it.

@codeZe-us codeZe-us merged commit dd9032c into SafeVault:dev Apr 29, 2026
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants