@hed-hog/contact 0.0.299 → 0.0.300

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.
Files changed (29) hide show
  1. package/dist/person/person.service.js +350 -350
  2. package/hedhog/data/dashboard.yaml +6 -0
  3. package/hedhog/data/dashboard_component.yaml +87 -0
  4. package/hedhog/data/dashboard_component_role.yaml +55 -0
  5. package/hedhog/data/dashboard_item.yaml +95 -0
  6. package/hedhog/data/dashboard_role.yaml +6 -0
  7. package/hedhog/data/route.yaml +68 -68
  8. package/hedhog/frontend/app/dashboard/_components/dashboard-widgets.tsx.ejs +508 -0
  9. package/hedhog/frontend/app/dashboard/_components/use-crm-dashboard-data.ts.ejs +104 -0
  10. package/hedhog/frontend/app/dashboard/page.tsx.ejs +37 -431
  11. package/hedhog/frontend/widgets/next-actions.tsx.ejs +40 -0
  12. package/hedhog/frontend/widgets/overview-kpis.tsx.ejs +47 -0
  13. package/hedhog/frontend/widgets/owner-performance.tsx.ejs +42 -0
  14. package/hedhog/frontend/widgets/quick-access.tsx.ejs +29 -0
  15. package/hedhog/frontend/widgets/source-breakdown.tsx.ejs +40 -0
  16. package/hedhog/frontend/widgets/stage-distribution.tsx.ejs +40 -0
  17. package/hedhog/frontend/widgets/top-owners.tsx.ejs +42 -0
  18. package/hedhog/frontend/widgets/unattended.tsx.ejs +40 -0
  19. package/hedhog/table/crm_activity.yaml +68 -68
  20. package/hedhog/table/crm_stage_history.yaml +34 -34
  21. package/hedhog/table/person_company.yaml +27 -27
  22. package/package.json +4 -4
  23. package/src/person/dto/account.dto.ts +100 -100
  24. package/src/person/dto/activity.dto.ts +54 -54
  25. package/src/person/dto/dashboard-query.dto.ts +25 -25
  26. package/src/person/dto/followup-query.dto.ts +25 -25
  27. package/src/person/dto/reports-query.dto.ts +25 -25
  28. package/src/person/person.controller.ts +176 -176
  29. package/src/person/person.service.ts +4825 -4825
@@ -0,0 +1,6 @@
1
+ - slug: crm-overview
2
+ icon: users
3
+ is_template: true
4
+ name:
5
+ en: CRM Dashboard
6
+ pt: Painel de CRM
@@ -0,0 +1,87 @@
1
+ - slug: overview-kpis
2
+ library_slug: contact
3
+ width: 12
4
+ height: 3
5
+ name:
6
+ en: CRM Overview KPIs
7
+ pt: KPIs Gerais do CRM
8
+ description:
9
+ en: Shows the main CRM performance indicators for leads, pipeline and follow-up health.
10
+ pt: Mostra os principais indicadores do CRM para leads, pipeline e saúde de acompanhamento.
11
+
12
+ - slug: stage-distribution
13
+ library_slug: contact
14
+ width: 7
15
+ height: 5
16
+ name:
17
+ en: Stage Distribution
18
+ pt: Distribuição por Etapa
19
+ description:
20
+ en: Displays the lead lifecycle distribution across CRM stages.
21
+ pt: Exibe a distribuição do funil por etapa do ciclo de vida.
22
+
23
+ - slug: source-breakdown
24
+ library_slug: contact
25
+ width: 5
26
+ height: 5
27
+ name:
28
+ en: Source Breakdown
29
+ pt: Distribuição por Origem
30
+ description:
31
+ en: Shows the share of contacts by acquisition source.
32
+ pt: Mostra a participação dos contatos por origem de aquisição.
33
+
34
+ - slug: owner-performance
35
+ library_slug: contact
36
+ width: 7
37
+ height: 5
38
+ name:
39
+ en: Owner Performance
40
+ pt: Performance por Responsável
41
+ description:
42
+ en: Compares leads and customers by CRM owner.
43
+ pt: Compara leads e clientes por responsável do CRM.
44
+
45
+ - slug: top-owners
46
+ library_slug: contact
47
+ width: 5
48
+ height: 5
49
+ name:
50
+ en: Top Owners
51
+ pt: Melhores Responsáveis
52
+ description:
53
+ en: Highlights the owners with the highest pipeline value.
54
+ pt: Destaca os responsáveis com maior valor em pipeline.
55
+
56
+ - slug: next-actions
57
+ library_slug: contact
58
+ width: 4
59
+ height: 5
60
+ name:
61
+ en: Next Actions
62
+ pt: Próximas Ações
63
+ description:
64
+ en: Lists leads that need the next planned follow-up.
65
+ pt: Lista leads que precisam da próxima ação planejada.
66
+
67
+ - slug: unattended
68
+ library_slug: contact
69
+ width: 4
70
+ height: 5
71
+ name:
72
+ en: Unattended Leads
73
+ pt: Leads sem Atendimento
74
+ description:
75
+ en: Highlights unattended or neglected CRM records.
76
+ pt: Destaca registros do CRM sem atendimento ou negligenciados.
77
+
78
+ - slug: quick-access
79
+ library_slug: contact
80
+ width: 4
81
+ height: 5
82
+ name:
83
+ en: CRM Quick Access
84
+ pt: Acesso Rápido do CRM
85
+ description:
86
+ en: Shortcut links to the main CRM sections in the contact library.
87
+ pt: Atalhos para as principais seções do CRM na library contact.
@@ -0,0 +1,55 @@
1
+ - component_id:
2
+ where:
3
+ slug: overview-kpis
4
+ role_id:
5
+ where:
6
+ slug: admin-contact
7
+
8
+ - component_id:
9
+ where:
10
+ slug: stage-distribution
11
+ role_id:
12
+ where:
13
+ slug: admin-contact
14
+
15
+ - component_id:
16
+ where:
17
+ slug: source-breakdown
18
+ role_id:
19
+ where:
20
+ slug: admin-contact
21
+
22
+ - component_id:
23
+ where:
24
+ slug: owner-performance
25
+ role_id:
26
+ where:
27
+ slug: admin-contact
28
+
29
+ - component_id:
30
+ where:
31
+ slug: top-owners
32
+ role_id:
33
+ where:
34
+ slug: admin-contact
35
+
36
+ - component_id:
37
+ where:
38
+ slug: next-actions
39
+ role_id:
40
+ where:
41
+ slug: admin-contact
42
+
43
+ - component_id:
44
+ where:
45
+ slug: unattended
46
+ role_id:
47
+ where:
48
+ slug: admin-contact
49
+
50
+ - component_id:
51
+ where:
52
+ slug: quick-access
53
+ role_id:
54
+ where:
55
+ slug: admin-contact
@@ -0,0 +1,95 @@
1
+ - component_id:
2
+ where:
3
+ slug: overview-kpis
4
+ library_slug: contact
5
+ dashboard_id:
6
+ where:
7
+ slug: crm-overview
8
+ width: 12
9
+ height: 3
10
+ x_axis: 0
11
+ y_axis: 0
12
+
13
+ - component_id:
14
+ where:
15
+ slug: stage-distribution
16
+ library_slug: contact
17
+ dashboard_id:
18
+ where:
19
+ slug: crm-overview
20
+ width: 7
21
+ height: 5
22
+ x_axis: 0
23
+ y_axis: 3
24
+
25
+ - component_id:
26
+ where:
27
+ slug: source-breakdown
28
+ library_slug: contact
29
+ dashboard_id:
30
+ where:
31
+ slug: crm-overview
32
+ width: 5
33
+ height: 5
34
+ x_axis: 7
35
+ y_axis: 3
36
+
37
+ - component_id:
38
+ where:
39
+ slug: owner-performance
40
+ library_slug: contact
41
+ dashboard_id:
42
+ where:
43
+ slug: crm-overview
44
+ width: 7
45
+ height: 5
46
+ x_axis: 0
47
+ y_axis: 8
48
+
49
+ - component_id:
50
+ where:
51
+ slug: top-owners
52
+ library_slug: contact
53
+ dashboard_id:
54
+ where:
55
+ slug: crm-overview
56
+ width: 5
57
+ height: 5
58
+ x_axis: 7
59
+ y_axis: 8
60
+
61
+ - component_id:
62
+ where:
63
+ slug: next-actions
64
+ library_slug: contact
65
+ dashboard_id:
66
+ where:
67
+ slug: crm-overview
68
+ width: 4
69
+ height: 5
70
+ x_axis: 0
71
+ y_axis: 13
72
+
73
+ - component_id:
74
+ where:
75
+ slug: unattended
76
+ library_slug: contact
77
+ dashboard_id:
78
+ where:
79
+ slug: crm-overview
80
+ width: 4
81
+ height: 5
82
+ x_axis: 4
83
+ y_axis: 13
84
+
85
+ - component_id:
86
+ where:
87
+ slug: quick-access
88
+ library_slug: contact
89
+ dashboard_id:
90
+ where:
91
+ slug: crm-overview
92
+ width: 4
93
+ height: 5
94
+ x_axis: 8
95
+ y_axis: 13
@@ -0,0 +1,6 @@
1
+ - dashboard_id:
2
+ where:
3
+ slug: crm-overview
4
+ role_id:
5
+ where:
6
+ slug: admin-contact
@@ -29,74 +29,74 @@
29
29
  - url: /person/duplicates
30
30
  method: GET
31
31
  relations: *a3
32
- - url: /person/stats
33
- method: GET
34
- relations:
35
- role:
36
- - where:
37
- slug: admin
38
- - where:
39
- slug: admin-contact
40
- - url: /person/dashboard
41
- method: GET
42
- relations:
43
- role:
44
- - where:
45
- slug: admin
46
- - where:
47
- slug: admin-contact
48
- - url: /person/reports
49
- method: GET
50
- relations:
51
- role:
52
- - where:
53
- slug: admin
54
- - where:
55
- slug: admin-contact
56
- - url: /person/owner-options
57
- method: GET
58
- relations:
59
- role:
60
- - where:
61
- slug: admin
62
- - where:
63
- slug: admin-contact
64
- - url: /person/followups
65
- method: GET
66
- relations: *a3
67
- - url: /person/followups/stats
68
- method: GET
69
- relations: *a3
70
- - url: /person/activities
71
- method: GET
72
- relations: *a3
73
- - url: /person/activities/stats
74
- method: GET
75
- relations: *a3
76
- - url: /person/activities/:id
77
- method: GET
78
- relations: *a3
79
- - url: /person/activities/:id/complete
80
- method: POST
81
- relations: *a3
82
- - url: /person/accounts
83
- method: GET
84
- relations: *a3
85
- - url: /person/accounts/stats
86
- method: GET
87
- relations: *a3
88
- - url: /person/accounts
89
- method: POST
90
- relations: *a3
91
- - url: /person/accounts/:id
92
- method: PATCH
93
- relations: *a3
94
- - url: /person/accounts
95
- method: DELETE
96
- relations: *a3
97
- - url: /person
98
- method: POST
99
- relations: *a3
32
+ - url: /person/stats
33
+ method: GET
34
+ relations:
35
+ role:
36
+ - where:
37
+ slug: admin
38
+ - where:
39
+ slug: admin-contact
40
+ - url: /person/dashboard
41
+ method: GET
42
+ relations:
43
+ role:
44
+ - where:
45
+ slug: admin
46
+ - where:
47
+ slug: admin-contact
48
+ - url: /person/reports
49
+ method: GET
50
+ relations:
51
+ role:
52
+ - where:
53
+ slug: admin
54
+ - where:
55
+ slug: admin-contact
56
+ - url: /person/owner-options
57
+ method: GET
58
+ relations:
59
+ role:
60
+ - where:
61
+ slug: admin
62
+ - where:
63
+ slug: admin-contact
64
+ - url: /person/followups
65
+ method: GET
66
+ relations: *a3
67
+ - url: /person/followups/stats
68
+ method: GET
69
+ relations: *a3
70
+ - url: /person/activities
71
+ method: GET
72
+ relations: *a3
73
+ - url: /person/activities/stats
74
+ method: GET
75
+ relations: *a3
76
+ - url: /person/activities/:id
77
+ method: GET
78
+ relations: *a3
79
+ - url: /person/activities/:id/complete
80
+ method: POST
81
+ relations: *a3
82
+ - url: /person/accounts
83
+ method: GET
84
+ relations: *a3
85
+ - url: /person/accounts/stats
86
+ method: GET
87
+ relations: *a3
88
+ - url: /person/accounts
89
+ method: POST
90
+ relations: *a3
91
+ - url: /person/accounts/:id
92
+ method: PATCH
93
+ relations: *a3
94
+ - url: /person/accounts
95
+ method: DELETE
96
+ relations: *a3
97
+ - url: /person
98
+ method: POST
99
+ relations: *a3
100
100
  - url: /person/merge
101
101
  method: POST
102
102
  relations: *a3