From bb7afc5629a20155a371a4925f25c6b7fca519f7 Mon Sep 17 00:00:00 2001 From: Hamza-Ayed Date: Wed, 22 Apr 2026 17:59:44 +0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=80=20Fix:=20Database=20schema=20sync?= =?UTF-8?q?=20for=20AI=20columns=20and=20UI=20contrast=20improvements?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db-fix.sh | 3 +++ frontend/src/pages/companies/CompaniesPage.tsx | 10 +++++----- .../src/pages/dashboard/MultiEntityDashboard.tsx | 6 +++--- frontend/src/pages/dashboard/RiskMonitorPage.tsx | 14 +++++++------- frontend/src/pages/settings/SettingsPage.tsx | 10 +++++----- frontend/src/pages/staff/StaffPage.tsx | 14 +++++++------- 6 files changed, 30 insertions(+), 27 deletions(-) diff --git a/db-fix.sh b/db-fix.sh index 7ca5d01..ab6ac28 100644 --- a/db-fix.sh +++ b/db-fix.sh @@ -32,6 +32,9 @@ ALTER TABLE "users" ADD COLUMN IF NOT EXISTS "company_id" uuid; -- Add missing columns to Invoice ALTER TABLE "invoices" ADD COLUMN IF NOT EXISTS "qr_code" text; ALTER TABLE "invoices" ADD COLUMN IF NOT EXISTS "ai_confidence_score" numeric(4,3); +ALTER TABLE "invoices" ADD COLUMN IF NOT EXISTS "ai_prompt_tokens" integer DEFAULT 0; +ALTER TABLE "invoices" ADD COLUMN IF NOT EXISTS "ai_completion_tokens" integer DEFAULT 0; +ALTER TABLE "invoices" ADD COLUMN IF NOT EXISTS "ai_total_cost" numeric(10,6) DEFAULT 0; -- Add missing columns to Company ALTER TABLE "companies" ADD COLUMN IF NOT EXISTS "certificate_path" varchar(255); diff --git a/frontend/src/pages/companies/CompaniesPage.tsx b/frontend/src/pages/companies/CompaniesPage.tsx index 874ee47..ba868dc 100644 --- a/frontend/src/pages/companies/CompaniesPage.tsx +++ b/frontend/src/pages/companies/CompaniesPage.tsx @@ -101,7 +101,7 @@ export const CompaniesPage = () => {

إدارة الشركات

-

أضف عملائك وشركاتك لربط فواتيرهم بنظام جو فوترة.

+

أضف عملائك وشركاتك لربط فواتيرهم بنظام جو فوترة.