realtimex-crm 0.14.0 → 0.14.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{DealList-BrMu9tSP.js → DealList-CRBXwi1I.js} +2 -2
- package/dist/assets/{DealList-BrMu9tSP.js.map → DealList-CRBXwi1I.js.map} +1 -1
- package/dist/assets/{index-Ce7mf_H5.js → index-D5uatqhL.js} +2 -2
- package/dist/assets/{index-Ce7mf_H5.js.map → index-D5uatqhL.js.map} +1 -1
- package/dist/index.html +1 -1
- package/dist/stats.html +1 -1
- package/package.json +1 -1
- package/supabase/migrations/20251225085142_enhance_companies.sql +3 -3
- package/supabase/migrations/{20251226120000_fix_ambiguous_column.sql → 20251225110000_fix_ambiguous_column.sql} +2 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "realtimex-crm",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.1",
|
|
4
4
|
"description": "RealTimeX CRM - A full-featured CRM built with React, shadcn-admin-kit, and Supabase. Fork of Atomic CRM with RealTimeX App SDK integration.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -110,7 +110,7 @@ CREATE TRIGGER set_internal_heartbeat_timestamp
|
|
|
110
110
|
-- Phase 5: Internal Heartbeat Computation Function
|
|
111
111
|
-- ============================================================================
|
|
112
112
|
|
|
113
|
-
CREATE OR REPLACE FUNCTION compute_company_internal_heartbeat(
|
|
113
|
+
CREATE OR REPLACE FUNCTION compute_company_internal_heartbeat(p_company_id bigint)
|
|
114
114
|
RETURNS void AS $$
|
|
115
115
|
DECLARE
|
|
116
116
|
score integer := 0;
|
|
@@ -131,7 +131,7 @@ BEGIN
|
|
|
131
131
|
LEFT JOIN deals d ON c.id = d.company_id
|
|
132
132
|
LEFT JOIN contacts co ON c.id = co.company_id
|
|
133
133
|
LEFT JOIN tasks t ON co.id = t.contact_id
|
|
134
|
-
WHERE c.id =
|
|
134
|
+
WHERE c.id = p_company_id;
|
|
135
135
|
|
|
136
136
|
-- Scoring algorithm (simple recency-based, 0-100 scale)
|
|
137
137
|
score := 100;
|
|
@@ -166,7 +166,7 @@ BEGIN
|
|
|
166
166
|
internal_heartbeat_score = score,
|
|
167
167
|
internal_heartbeat_status = status,
|
|
168
168
|
internal_heartbeat_updated_at = now()
|
|
169
|
-
WHERE id =
|
|
169
|
+
WHERE id = p_company_id;
|
|
170
170
|
END;
|
|
171
171
|
$$ LANGUAGE plpgsql;
|
|
172
172
|
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
-- Fix ambiguous column reference in compute_company_internal_heartbeat by renaming parameter
|
|
2
|
+
-- This fix is moved earlier in the migration sequence to ensure it's available
|
|
3
|
+
-- before the tasks enhancement migration runs its updates.
|
|
2
4
|
|
|
3
5
|
DROP FUNCTION IF EXISTS compute_company_internal_heartbeat(bigint);
|
|
4
6
|
|