Commit Graph

193 Commits

Author SHA1 Message Date
Rene 183d6c629d Remove crash-prone dev:repair and dev:browser-use from dev:start
Build & Auto-Repair / build (push) Has been cancelled
These two processes exit with code 1 (Python not found / watch mode crash)
and are non-essential for the CRM. The core services needed are:
AI server (3001), Signaling (3007), and Next.js (3006).
2026-07-01 15:55:18 +02:00
JCBSComputer 6f622b6329 Add client portal themes (Cyberpunk etc.), settings page, semantic Tailwind classes
Build & Auto-Repair / build (push) Has been cancelled
2026-07-01 15:47:44 +02:00
Uwais ef2e12ec5e fix: force high-contrast user name text in resource planning cards
Build & Auto-Repair / build (push) Has been cancelled
2026-07-01 15:45:29 +02:00
Rene a02f013f38 Replace native selects with shadcn Select across all pages
Build & Auto-Repair / build (push) Has been cancelled
- lead-scoring-settings.tsx: Feature type dropdown
- bug-report-modal.tsx: Severity dropdown
- client-portal/support/page.tsx: Severity dropdown
- time-tracking/page.tsx: Timer project + manual entry project dropdowns
- proposals/new/page.tsx: Lead + customer dropdowns
2026-07-01 15:39:00 +02:00
Rene 2979078edd Fix customer/owner dropdown readability in New Project dialog
Build & Auto-Repair / build (push) Has been cancelled
Replace native <select> elements with shadcn Select component
so dropdown options use the theme's styled popover colors
2026-07-01 15:32:31 +02:00
Rene 3fe32d923e Add descriptive error messages across all API routes and toast notifications on client pages
Build & Auto-Repair / build (push) Has been cancelled
- 86 catch blocks in 49 API route files now return the actual error message via error.message
- 14 campaign/lead/config catch blocks that lacked console.error now log errors
- 17 client pages/components now show toast.error notifications on API failures
- Silent .catch(() => {}) and finally-only try blocks now surface errors to users
2026-07-01 15:20:30 +02:00
Uwais 727dcddf37 Update cyberpunk theme: light mode overrides synced to dark mode colors
Build & Auto-Repair / build (push) Has been cancelled
2026-07-01 14:34:59 +02:00
JCBSComputer 9bfd4e47ee Added Client Portal(Working)
Build & Auto-Repair / build (push) Has been cancelled
2026-07-01 13:34:58 +02:00
Rene 00bda54695 Add Lead Scoring ML + Email Sequences/Drip Campaigns
Build & Auto-Repair / build (push) Has been cancelled
Lead Scoring:
- lead_scoring_config table with configurable feature weights
- Scoring engine: boolean, keyword, and range-based feature scoring
- Settings tab: configure scoring features, run scoring on all leads
- ml_score + ml_score_details columns on leads table
- API: /api/leads/score, /api/leads/score/config
- mlScore returned in lead detail and list APIs

Email Campaigns:
- email_campaigns, email_campaign_steps, subscribers, logs tables
- Campaign list page with status badges and subscriber counts
- Campaign detail with step management, subscriber search/add, send
- Drip logic: steps with configurable delay days, template variables
- Variable replacement ({{name}}, {{email}}) in email bodies
- Sidebar: Campaigns nav item
2026-07-01 13:33:24 +02:00
Rene 963ea1d1b8 Revert "Add CI/CD pipeline (Gitea Actions)"
Build & Auto-Repair / build (push) Has been cancelled
This reverts commit eef290a20a.
2026-07-01 13:20:06 +02:00
Rene eef290a20a Add CI/CD pipeline (Gitea Actions)
Build & Auto-Repair / build (push) Has been cancelled
CI / build (push) Has been cancelled
Runs on push/PR to main: npm ci -> tsc --noEmit -> next build
Also fixes eslint flat config imports and adds typecheck script
2026-07-01 13:17:33 +02:00
Rene ef75d16bf4 Add Resource Planning: team capacity, utilisation, workload overview
Build & Auto-Repair / build (push) Has been cancelled
- Migration 024: adds capacity_hours column to users (default 40h/week)
- /api/resource-planning: aggregates hours from time_entries, open tasks,
  active projects per user with utilisation calculations
- /resource-planning page: overview stats cards, per-member capacity bars
  with colour-coded status (green=available, yellow=busy, orange=near
  capacity, red=overloaded)
- Sidebar: new Resources nav item (BarChart3 icon)
2026-07-01 13:12:48 +02:00
Rene 9f4dd4fc6b Revert "Add CI/CD pipeline (Gitea Actions) and fix eslint flat config"
Build & Auto-Repair / build (push) Has been cancelled
This reverts commit bcd2d73e70.
2026-07-01 13:06:02 +02:00
Rene bcd2d73e70 Add CI/CD pipeline (Gitea Actions) and fix eslint flat config
Build & Auto-Repair / build (push) Has been cancelled
CI / build (push) Has been cancelled
- .gitea/workflows/ci.yml: lint, typecheck, build on push/PR
- package.json: add typecheck script (tsc --noEmit)
- eslint.config.mjs: add .js extensions for flat config module resolution
2026-07-01 13:04:55 +02:00
JCBSComputer 72b839f5d4 Fix Projects/Time pages: guard array state + merge conflict resolution
Build & Auto-Repair / build (push) Has been cancelled
2026-07-01 12:10:33 +02:00
JCBSComputer cb1944a9ea Fixed Projects/Proposals/Time 2026-07-01 12:08:22 +02:00
Rene 48f78cf2ca Center New Proposal page with mx-auto
Build & Auto-Repair / build (push) Has been cancelled
2026-07-01 11:51:31 +02:00
Rene c1745df329 Fix users.map crash in NewProjectDialog
Build & Auto-Repair / build (push) Has been cancelled
/api/users returns { users: [...] } but setUsers was receiving
the full wrapper object instead of the inner array.
2026-07-01 11:46:22 +02:00
Rene 72f872b2f9 Fix projects.map crash on API error response
Build & Auto-Repair / build (push) Has been cancelled
Added res.ok guards on projects and time-tracking pages so that
setProjects receives [] instead of an error object when the API
returns a non-200 response.
2026-07-01 11:35:34 +02:00
Rene 838ec9617a Fix ensure-ollama.mjs: sleep -> timeout for Windows compatibility
Build & Auto-Repair / build (push) Has been cancelled
2026-07-01 11:29:16 +02:00
JCBSComputer b75351112e Merge branch 'main' of https://git.coastit.co.za/CRM_ENVIROMENT/Newbie_CRM
Build & Auto-Repair / build (push) Has been cancelled
2026-07-01 11:25:15 +02:00
JCBSComputer 6016ab2855 Client portal: profile, activity pages + middleware fix 2026-07-01 11:25:08 +02:00
Rene 545065b527 Kanban board, Project Management, Proposals/Quotes, Time Tracking, Custom Fields
Build & Auto-Repair / build (push) Has been cancelled
- Kanban board with drag-and-drop per stage, colour-coded cards, score bars
- Project Management with milestones, Gantt timeline, inline add milestone/task
- Proposal/Quote builder with line items, VAT, terms, e-signature capture
- Time Tracking with stopwatch, manual entry, hours-by-project chart
- Custom Fields system: admin-defined fields per entity (leads/customers/
  projects/opportunities) with drag-and-drop reordering in settings
- Reusable CustomFieldsSection component for entity detail pages
- Customers API endpoint
- All builds pass with zero errors
2026-07-01 11:18:59 +02:00
JCBSComputer 5d971dc749 Fixed AI server Not booting
Build & Auto-Repair / build (push) Has been cancelled
2026-07-01 10:08:32 +02:00
JCBSComputer eedf528a33 Fixed AI
Build & Auto-Repair / build (push) Has been cancelled
2026-07-01 09:46:09 +02:00
JCBSComputer 8ef283a528 Merge caitlin/CRM_ENVR: AI chat ref+health, tips panel, cyberpunk theme, app-shell/bg improvements 2026-07-01 09:36:04 +02:00
JCBSComputer 4eba6fe476 Fixed Themes not showing 2026-06-30 16:48:59 +02:00
Uwais feb2549373 Add cyberpunk theme files: CSS overrides and color config 2026-06-30 16:19:39 +02:00
JCBSComputer 1e4950009d Optimization for AI Chat/ Fixed Themes not loading 2026-06-30 15:54:16 +02:00
Hannah_Bagga 7a5e833722 GIFs work now 2026-06-30 15:11:15 +02:00
JCBSComputer db487e4614 Added New Themes/Optimization 2026-06-30 14:28:39 +02:00
JCBSComputer 4b2ea3db2a Themes Name changed 2026-06-30 11:55:44 +02:00
Hannah_Bagga 1e8f979cf9 AI Assistant page looks better. 2026-06-29 22:00:05 +02:00
Hannah_Bagga 98145f0264 light and dark mode fixed and default mode is the default unless you pick Spidey mode 2026-06-29 19:28:35 +02:00
JCBSComputer 1d080761fb Themes/ Ram Increased to 16GB 2026-06-29 16:38:40 +02:00
caitlin 7a722a7d7e Merge remote-tracking branch 'origin/main' into master 2026-06-29 15:38:18 +02:00
caitlin 61e9fac352 Fixed Light Mode 2026-06-29 15:26:44 +02:00
Ace 878627a6ba Merge branch 'main' of https://git.coastit.co.za/caitlin/CRM_ENVR 2026-06-29 15:08:09 +02:00
Ace 2c3a8e5333 Added qwen to serve as an repair agent. 2026-06-29 15:06:03 +02:00
Hannah_Bagga d870fb3ac7 Merge branch 'main' of https://git.coastit.co.za/caitlin/CRM_ENVR 2026-06-29 14:52:13 +02:00
Hannah_Bagga f6d1d91fc6 AI Chat page looks better. Caitlin is my witness 2026-06-29 14:51:59 +02:00
TroodonEnjoyer bc3e345a27 Fix login session persistence + add admin accounts
- Fix JWT secret regenerating on every HMR cycle (globalThis cache)
- Replace unreliable response.cookies.set() with manual Set-Cookie header
- Remove jwt-secret.ts abstraction — JWT_SECRET back inline in auth.ts
- Sidebar logo links directly to /dashboard instead of server-redirect /
- Add 3 admin users to seed: ewan/caitlin/dillen (ADMIN role)
- Fix bcrypt hash corruption from PowerShell $ interpolation
- Remove plaintext passwords from codebase
- Fix audit_password_change trigger UUID type error
2026-06-29 14:42:16 +02:00
JCBSComputer 54b19123ca Merge branch 'main' of https://git.coastit.co.za/CRM_ENVIROMENT/Newbie_CRM 2026-06-29 13:50:54 +02:00
caitlin 3c0e7d76ca Merge branch 'main' of https://git.coastit.co.za/caitlin/CRM_ENVR 2026-06-29 10:42:58 +02:00
TroodonEnjoyer 39fb39db12 Fixed the login again? 2026-06-26 22:30:54 +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
caitlin 4d7a59c278 Changes in lightmode and dark mode header 2026-06-26 21:31:20 +02:00
TroodonEnjoyer aac9817ee7 Fix double login: set cookie on response object, invalidate sessions on dev restart
- Move cookie setting from cookies().set() to response.cookies.set() in
  login/logout routes (Next.js 15 ambient cookie merge is unreliable)
- Generate random JWT_SECRET at module scope in auth.ts for dev mode so
  every server start invalidates all prior sessions
- Replace blank page on auth failure with redirect to /login in dashboard layout
- Preserve ?redirect= param from middleware in login form
- Wrap login page in Suspense boundary for useSearchParams()

Fixes: double-login bug, session persistence across restarts, blank page on
session expiry
2026-06-26 21:29:36 +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