Add persistent header with role switcher and lazy provisioning#13
Merged
Conversation
- Create AppHeader component with title, DEMO badge, RoleSwitcher, user info, and sign-out - Integrate AppHeader in layout.tsx inside the provider tree - RoleSwitcher now navigates to the corresponding role page on switch - Home page role cards call setRole() before navigating - ProductionAuthProvider responds to role changes and eagerly fetches vendor/delivery IDs - Add lazy provisioning: auto-create vendor/delivery records when user switches roles - Handle null vendorId/deliveryPersonId gracefully with loading spinners - Guard useVendorOrders/useDeliveryAssignments against empty string UUIDs - Add RLS INSERT policies for vendors, delivery_persons, and users tables Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Summary
AppHeadercomponent with persistent header on every page (title, DEMO badge, RoleSwitcher avatar, user info, sign-out)setRole()before navigating, removed duplicate headersProductionAuthProviderresponds to role changes with lazy provisioning: auto-creates vendor/delivery records on first role switchvendors,delivery_persons, anduserstablesTest plan
npm run type-checkandnpm run buildpass🤖 Generated with Claude Code