compassmock/drizzle/seed-users.sql
Nicholai a0f7852845
feat(agent): add AI chat panel and dashboard updates (#34)
* feat(agent): add AI chat panel and dashboard updates

Add ElizaOS-powered agent chat panel with streaming,
voice input, markdown rendering, and page-aware context.
Update dashboard layout with context menu and refactored
pages. Add agent memory schema, new UI components,
and fix lint errors across AI-related files.

* fix(auth): use Host header for SSO redirect URI

nextUrl.origin returns http://localhost:3000 on CF Workers,
breaking OAuth callbacks. Use Host header to derive the
correct production origin for WorkOS redirect URI.

* fix(auth): add Toaster to auth layout, fix error codes

Auth pages had no Toaster component so toast.error() calls
were invisible. Also return 401 for auth errors instead of
generic 500 from the login API.

---------

Co-authored-by: Nicholai <nicholaivogelfilms@gmail.com>
2026-02-05 15:56:06 -07:00

51 lines
2.8 KiB
SQL
Executable File

-- seed users for development
INSERT INTO users (id, email, first_name, last_name, display_name, avatar_url, role, is_active, last_login_at, created_at, updated_at)
VALUES
('user-1', 'admin@compass.io', 'Admin', 'User', 'Admin User', NULL, 'admin', 1, '2026-02-04T12:00:00Z', '2026-01-01T00:00:00Z', '2026-02-04T12:00:00Z'),
('user-2', 'john@compass.io', 'John', 'Smith', 'John Smith', NULL, 'office', 1, '2026-02-03T10:30:00Z', '2026-01-15T00:00:00Z', '2026-02-03T10:30:00Z'),
('user-3', 'sarah@compass.io', 'Sarah', 'Johnson', 'Sarah Johnson', NULL, 'office', 1, '2026-02-04T08:15:00Z', '2026-01-20T00:00:00Z', '2026-02-04T08:15:00Z'),
('user-4', 'mike@compass.io', 'Mike', 'Wilson', 'Mike Wilson', NULL, 'field', 1, '2026-02-02T14:20:00Z', '2026-01-25T00:00:00Z', '2026-02-02T14:20:00Z'),
('user-5', 'client@example.com', 'Jane', 'Client', 'Jane Client', NULL, 'client', 1, '2026-02-01T09:00:00Z', '2026-02-01T00:00:00Z', '2026-02-01T09:00:00Z');
-- seed organizations
INSERT INTO organizations (id, name, slug, type, logo_url, is_active, created_at, updated_at)
VALUES
('org-1', 'Open Range Construction', 'open-range', 'internal', NULL, 1, '2026-01-01T00:00:00Z', '2026-01-01T00:00:00Z'),
('org-2', 'Example Corp', 'example-corp', 'client', NULL, 1, '2026-02-01T00:00:00Z', '2026-02-01T00:00:00Z');
-- seed organization members
INSERT INTO organization_members (id, organization_id, user_id, role, joined_at)
VALUES
('om-1', 'org-1', 'user-1', 'admin', '2026-01-01T00:00:00Z'),
('om-2', 'org-1', 'user-2', 'office', '2026-01-15T00:00:00Z'),
('om-3', 'org-1', 'user-3', 'office', '2026-01-20T00:00:00Z'),
('om-4', 'org-1', 'user-4', 'field', '2026-01-25T00:00:00Z'),
('om-5', 'org-2', 'user-5', 'client', '2026-02-01T00:00:00Z');
-- seed teams
INSERT INTO teams (id, organization_id, name, description, created_at)
VALUES
('team-1', 'org-1', 'Engineering Team', 'Main engineering team', '2026-01-01T00:00:00Z'),
('team-2', 'org-1', 'Field Crew Alpha', 'Field crew for site work', '2026-01-01T00:00:00Z');
-- seed team members
INSERT INTO team_members (id, team_id, user_id, joined_at)
VALUES
('tm-1', 'team-1', 'user-2', '2026-01-15T00:00:00Z'),
('tm-2', 'team-1', 'user-3', '2026-01-20T00:00:00Z'),
('tm-3', 'team-2', 'user-4', '2026-01-25T00:00:00Z');
-- seed groups
INSERT INTO groups (id, organization_id, name, description, color, created_at)
VALUES
('group-1', 'org-1', 'Project Managers', 'Project management group', '#3b82f6', '2026-01-01T00:00:00Z'),
('group-2', 'org-1', 'Field Supervisors', 'Field supervision group', '#10b981', '2026-01-01T00:00:00Z');
-- seed group members
INSERT INTO group_members (id, group_id, user_id, joined_at)
VALUES
('gm-1', 'group-1', 'user-2', '2026-01-15T00:00:00Z'),
('gm-2', 'group-2', 'user-4', '2026-01-25T00:00:00Z');
-- project_members are seeded in seed.sql (after projects exist)