Ace
dba4c84cd5
Added finishing touch on other languages
Build & Auto-Repair / build (push) Has been cancelled
2026-07-08 14:24:03 +02:00
Ace
0bc3ca58ed
Merge branch 'main' of https://git.coastit.co.za/caitlin/CRM_ENVR
Build & Auto-Repair / build (push) Has been cancelled
2026-07-07 10:03:38 +02:00
Ace
d793604e92
Added 4 Languages English, Afrikaans, Xhosa, Zulu, tested but brought leads down to 3 leads only will see how to make it more without losing effiency of the model.
2026-07-07 10:03:35 +02:00
TroodonEnjoyer
bc83af8e00
Started PostgreSQL — data directory was uninitialized, ran initdb, set password, switched to md5 auth, all 24 migrations applied.
...
Build & Auto-Repair / build (push) Has been cancelled
Hardened db.ts — added statement_timeout: 30000, idle_in_transaction_session_timeout: 10000, created transaction() helper (BEGIN/COMMIT/ROLLBACK).
Multi-step API routes wrapped in transactions — Events POST, Conversations POST use atomic blocks.
Fixed leads pagination — status filter pushed into SQL WHERE (no client-side filtering after LIMIT/OFFSET), added SELECT COUNT(*) for total.
Rewrote dashboard — SQL aggregations (COUNT + GROUP BY + date_trunc) replace loading all leads into memory.
Optimized conversations GET — merged duplicate correlated subqueries into single LEFT JOIN LATERAL.
Created migration 021_performance_indexes.sql — 8 missing indexes + set_session_user_context() function caching current_user_hierarchy_level() as session variable (avoids per-query RLS join).
Fixed build error — duplicate const other in conversations route. Also fixed a TypeScript never error in dashboard breakdown map.
Verified — npx tsc --noEmit clean, npm test (13 pass, 7 integration skip gracefully), npx next build succeeds.
2026-07-06 13:36:48 +02:00
Hannah_Bagga
c0cb715ced
ai assistant page fixed
Build & Auto-Repair / build (push) Has been cancelled
2026-07-01 21:07:42 +02:00
Hannah_Bagga
1269f6cce8
Revert "Removed quick tips, recent prompts Messages today, Tokens used"
...
Build & Auto-Repair / build (push) Has been cancelled
This reverts commit 370f935cbb .
2026-07-01 14:36:47 +02:00
Hannah_Bagga
370f935cbb
Removed quick tips, recent prompts Messages today, Tokens used
Build & Auto-Repair / build (push) Has been cancelled
2026-07-01 14:24:32 +02:00
Ace
16710e3019
Getting the 10 syncs and adding my AI that works but has issues
Build & Auto-Repair / build (push) Has been cancelled
2026-07-01 12:16:22 +02:00
Ace
e920d4925a
Updated the to use targeted jobs but its weird
2026-07-01 12:15:37 +02:00
Hannah_Bagga
1e8f979cf9
AI Assistant page looks better.
Build & Auto-Repair / build (push) Has been cancelled
2026-06-29 22:00:05 +02:00
caitlin
7a722a7d7e
Merge remote-tracking branch 'origin/main' into master
Build & Auto-Repair / build (push) Has been cancelled
2026-06-29 15:38:18 +02:00
caitlin
61e9fac352
Fixed Light Mode
2026-06-29 15:26:44 +02:00
Hannah_Bagga
f6d1d91fc6
AI Chat page looks better. Caitlin is my witness
2026-06-29 14:51:59 +02:00
Ace
cd37d5a987
Merge branch 'main' of https://git.coastit.co.za/caitlin/CRM_ENVR
2026-06-26 21:36:17 +02:00
Ace
d138c60203
Fixing calander
2026-06-26 21:36:09 +02:00
Hannah_Bagga
fa97abb5b6
Merge branch 'main' of https://git.coastit.co.za/caitlin/CRM_ENVR
2026-06-26 20:59:21 +02:00
Hannah_Bagga
4c1db42873
Chat page fits whole screen now
2026-06-26 20:46:20 +02:00
Hannah_Bagga
c428435f2f
Removed video call, fixed logo, CRM changes with color theme
2026-06-26 20:30:46 +02:00
TroodonEnjoyer
1b5f244f28
Login possible fix and something else I can't remember
2026-06-26 19:39:45 +02:00
Hannah_Bagga
a876f2d769
Merge branch 'main' of https://git.coastit.co.za/caitlin/CRM_ENVR
2026-06-26 19:23:02 +02:00
Hannah_Bagga
214c4a1852
Spiderman Theme Fixed
2026-06-26 19:22:54 +02:00
Ace
d6534eb338
Commit Test
2026-06-26 18:47:39 +02:00
caitlin
fe09d15359
Fixed the route issue
2026-06-26 17:59:40 +02:00
caitlin
2b8f2e7b59
Resolve merge conflicts in chats/page.tsx
2026-06-26 17:16:18 +02:00
JCBSComputer
a022e3cca3
Merge origin/main into local (conflict resolved in chats/page.tsx)
2026-06-26 16:43:44 +02:00
JCBSComputer
68483e9b60
Calender & Linked Added
2026-06-26 16:38:18 +02:00
Rene
77b246b565
Attachment fixed
2026-06-26 16:35:31 +02:00
Ace
bd581739f9
Fuckups fixed
2026-06-26 16:30:48 +02:00
Hannah_Bagga
66ae711cf0
Merge branch 'main' of https://git.coastit.co.za/caitlin/CRM_ENVR
...
# Conflicts:
# src/app/(dashboard)/chats/page.tsx
2026-06-26 15:20:42 +02:00
Hannah_Bagga
827b0598e6
voice note and sticker pack and gifs
2026-06-26 15:18:09 +02:00
Chariah
7a76841309
Current state
2026-06-26 14:31:38 +02:00
Hannah_Bagga
1465016b56
.....
2026-06-25 15:15:35 +02:00
Ace
1f032dc098
Added rene changes
2026-06-24 18:43:38 +02:00
Hannah_Bagga
3a927b25b6
.
2026-06-23 19:12:10 +02:00
Hannah_Bagga
b4be369f25
no clue
2026-06-23 19:11:42 +02:00
Ace
1adc4806fa
Files Changed
...
Security Fixes
File Change
.env.local Placeholder JWT secret (rotate to random value: openssl rand -base64 64)
src/middleware.ts Removed /api/auth/me bypass; API routes return JSON 401 (not 302 redirect)
src/lib/auth.ts sameSite: "lax" → "strict" (create + destroy cookie); SVG name chars are pre-computed (no injection)
src/lib/avatar.ts Added sanitizeName() — strips non-alphanumeric/safe chars, max 50 chars
src/app/api/users/route.ts POST restricted to super_admin; validates role against whitelist ["sales","admin","super_admin","dev"]; validates active defaults to true
src/app/api/users/[id]/route.ts DELETE restricted to super_admin; blocks self-deletion
src/app/api/leads/[id]/route.ts GET: non-admin users filtered by assigned_to; PATCH: ownership check + score validated 0-100 range
src/app/api/leads/route.ts DELETE: ownership + admin check; GET: ownership filter for non-admin users
src/app/api/conversations/[id]/messages/route.ts GET/POST: verify user is a conversation_participant before access
rust-ai/src/main.rs CORS: AllowOrigin::list(["localhost:3006", "127.0.0.1:3006"]) (was Any)
Performance Fixes
File Change
src/app/api/leads/route.ts Added limit (default 50), offset query params; ownership filter in SQL
src/app/api/users/route.ts Added limit (default 50), offset query params
src/app/api/conversations/route.ts Added LIMIT 50
src/app/api/leads/[id]/notes/route.ts Added limit (default 50), offset query params
src/app/api/conversations/[id]/messages/route.ts Added limit (default 100), offset, before query params
src/app/(dashboard)/chats/page.tsx Pruned to 5 cached conversations; useMemo wraps messages/conversation/filteredConversations; otherParticipant moved outside component; added 10MB file size limit; recordingChunksRef cleared on discard
src/app/(dashboard)/leads/[id]/page.tsx Optimistic status update rolls back on fetch failure
database/migrations/003_chat.sql Added composite index idx_messages_conversation_created on (conversation_id, created_at DESC)
Code Quality Fixes
File Change
src/lib/ai.ts Removed dead getInstructions()/updateInstructions() (called nonexistent /ai/instructions)
src/lib/auth.ts bcrypt.hash(password, 12) — kept (acceptable, OWASP-recommended)
src/app/login/page.tsx "Forgot password?" button now shows alert to contact admin (was no-op)
src/components/users/user-form-dialog.tsx Password min 6 → 8 chars
26 silent catch {} blocks across 16 files (see below) Added console.warn("...") context messages
2026-06-23 09:45:30 +02:00
Ace
be5808f3fc
AI somewhat added
2026-06-22 12:37:38 +02:00
Ace
adbcc4b9af
feat: add system monitor component and API for performance metrics
...
feat: implement conversations API with message retrieval and posting
feat: add avatar URL handling for users and update user role definitions
feat: create chat system tables in the database with initial seed data
fix: update user roles from "sales_user" to "sales" for consistency
chore: add middleware for system API route access
fixed fuckups on john's side, added a benchmark
Made Graphs actualy load from database and realtime data, graphs will update and percentages will be mathematically made, and made realtime
added chatcart edits, made graphs glow.
added in some little small home feeling fuctions
added in a slide show, in login with qoutes from creators because i want to leave a print on it saying we made this shit, we built it brick for brick
login page added qoutes some random, and made them shuffle from left to right one dissapears other come in
adding shape to the textbox for the qoutes
Fixed my chat fuckups when it comes to chats
2026-06-18 22:48:03 +02:00
caitlin
02ef2b9f1f
I Fixed the notifications
2026-06-18 16:52:30 +02:00
caitlin
1e4b8df8dd
I added functioonality to the notifications
2026-06-18 16:43:26 +02:00
Hannah_Bagga
13555c3fab
Fix duplicate import of use() in leads/[id] page
2026-06-18 16:09:31 +02:00
Ace
0880c13890
Merge branch 'main' of https://git.coastit.co.za/caitlin/CRM_ENVR
2026-06-18 15:46:02 +02:00
Ace
5b115ae9ff
SuperAdmin changes
2026-06-18 15:45:59 +02:00
Hannah_Bagga
3d03440ffa
Changed Dashboards
2026-06-18 15:37:08 +02:00
Hannah_Bagga
10b5de7a21
Fix ESLint import paths and Next.js 15 params type for leads page
2026-06-18 15:32:08 +02:00
Hannah_Bagga
0898ad4ebf
Changed the dashboards
2026-06-18 15:21:56 +02:00
TroodonEnjoyer
ca96f4b185
Merge branch 'main' of https://git.coastit.co.za/caitlin/CRM_ENVR
2026-06-18 13:49:18 +02:00
TroodonEnjoyer
e6a6face98
Merge: resolve topbar conflict, align types with DB schema
2026-06-18 13:48:58 +02:00
TroodonEnjoyer
c6ce93c564
yo
2026-06-18 13:45:57 +02:00
caitlin
24dc4855d7
Fixed button in view
2026-06-18 13:45:46 +02:00