realtimex-crm 0.11.0 → 0.12.2
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-B6Pgm8oq.js → DealList-BvoXZ_PI.js} +3 -3
- package/dist/assets/{DealList-B6Pgm8oq.js.map → DealList-BvoXZ_PI.js.map} +1 -1
- package/dist/assets/{index-BsUdjhpC.js → index-D-i5w9_j.js} +54 -54
- package/dist/assets/{index-BsUdjhpC.js.map → index-D-i5w9_j.js.map} +1 -1
- package/dist/index.html +1 -1
- package/dist/stats.html +1 -1
- package/package.json +1 -1
- package/src/components/atomic-crm/activity/ActivityLogCompanyNoteCreated.tsx +60 -0
- package/src/components/atomic-crm/activity/ActivityLogIterator.tsx +6 -0
- package/src/components/atomic-crm/companies/CompanyListFilter.tsx +2 -0
- package/src/components/atomic-crm/companies/CompanyShow.tsx +20 -1
- package/src/components/atomic-crm/consts.ts +1 -0
- package/src/components/atomic-crm/dashboard/DealsChart.tsx +29 -6
- package/src/components/atomic-crm/deals/stages.test.ts +54 -0
- package/src/components/atomic-crm/deals/stages.ts +3 -1
- package/src/components/atomic-crm/notes/NoteCreate.tsx +10 -3
- package/src/components/atomic-crm/notes/NotesIterator.tsx +1 -1
- package/src/components/atomic-crm/providers/commons/activity.ts +38 -2
- package/src/components/atomic-crm/providers/fakerest/dataGenerator/companyNotes.ts +20 -0
- package/src/components/atomic-crm/providers/fakerest/dataGenerator/index.ts +2 -0
- package/src/components/atomic-crm/providers/fakerest/dataGenerator/types.ts +2 -0
- package/src/components/atomic-crm/root/CRM.tsx +1 -0
- package/src/components/atomic-crm/types.ts +21 -0
- package/src/components/ui/input.tsx +10 -1
- package/src/components/ui/textarea.tsx +9 -1
- package/supabase/migrations/20251223185638_remove_large_payload_storage.sql +9 -0
- package/supabase/migrations/20251224000002_add_company_notes.sql +67 -0
- package/supabase/migrations/20251224000003_add_company_last_seen.sql +5 -0
- package/supabase/migrations/20251224000004_update_companies_summary_view.sql +16 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
-- Drop and recreate view with nb_notes
|
|
2
|
+
drop view if exists "public"."companies_summary";
|
|
3
|
+
|
|
4
|
+
create view "public"."companies_summary"
|
|
5
|
+
with (security_invoker=on)
|
|
6
|
+
as
|
|
7
|
+
select
|
|
8
|
+
c.*,
|
|
9
|
+
count(distinct d.id) as nb_deals,
|
|
10
|
+
count(distinct co.id) as nb_contacts,
|
|
11
|
+
count(distinct cn.id) as nb_notes
|
|
12
|
+
from "public"."companies" c
|
|
13
|
+
left join "public"."deals" d on c.id = d.company_id
|
|
14
|
+
left join "public"."contacts" co on c.id = co.company_id
|
|
15
|
+
left join "public"."companyNotes" cn on c.id = cn.company_id
|
|
16
|
+
group by c.id;
|