Fix/970 move farm contact to left menu - #1012
Open
yjm7vj wants to merge 2 commits into
Open
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Description
Fixes #970
Moved farm name and primary contact details into the account side menu, removed the old account header from the account shell, and fixed /account routing so the account landing page is protected like the nested account pages.
Changes by file:
apps/site/src/app/(authenticated)/(shell)/(accounts)/account/(with-shell)/layout.tsx
Removed the account header from the account layout.
Passed farm/contact shell data into AccountSideMenu.
Updated the loading skeleton to match the headerless layout.
apps/site/src/app/(authenticated)/(shell)/(accounts)/account/components/account-side-menu/account-side-menu.tsx
Added farm name and contact details to the top of the account side menu.
Updated the component to accept typed props.
apps/site/src/app/(authenticated)/(shell)/(accounts)/account/components/account-side-menu/types.ts
Added AccountSideMenuProps.
apps/site/src/app/(authenticated)/(shell)/(accounts)/account/components/account-side-menu/account-side-menu.test.tsx
Updated tests to pass the new side menu props.
Added coverage for rendered farm/contact details.
apps/site/src/app/(authenticated)/(shell)/(accounts)/account/db.ts
Extended getAccountShellData() to return farm name plus contact name, email, and phone.
apps/site/src/proxy/auth.ts
Added /account as an exact protected route so the account landing page works correctly.
apps/site/src/proxy/auth.test.ts
Updated route protection expectations for /account.
packages/db/scripts/seed-local-db.ts
Made OpenAI embedding import lazy so local DB seeding can run without OPENAI_EMBEDDINGS_KEY.
Checklist