feat: fix basic api paging + offset + page params + added meta/option…#186
Merged
feat: fix basic api paging + offset + page params + added meta/option…#186
Conversation
…s columns for both user & company
- Add onboarding_completed_at and onboarding_completed_by_uuid to companies table - Add fields to Company model fillable and casts - Add onboarding_completed boolean to Organization resource (for frontend) - Fixes issue where additional users couldn't access console after org onboarding complete - Company-level tracking ensures all users see same onboarding state
- verifyEmail() now sets company onboarding fields after successful verification - Email verification is the final step of basic self-hosted onboarding - Only sets if onboarding_completed_at is null (prevents overwriting) - Ensures company onboarding status is consistent across all flows
Issue: First user created during onboarding not tracked in billing system Root cause: User created BEFORE company exists, so company_uuid is null Solution: Create company FIRST, then set company_uuid before user creation Flow before: 1. User::create() - no company_uuid 2. Company created 3. assignCompany() - sets company_uuid after creation Flow after: 1. Company::create() - company exists first 2. Set company_uuid in attributes 3. User::create() - with company_uuid set 4. assignCompany() - maintains relationship This ensures ResourceCreatedListener can track the first user properly since it requires company_uuid to log usage to billing_resource_usage table. Related to fleetops driver creation fix (same issue, same solution).
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.
…s columns for both user & company