@hed-hog/contact 0.0.295 → 0.0.297

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 (46) hide show
  1. package/dist/contact-type/contact-type.controller.d.ts +1 -1
  2. package/dist/contact-type/contact-type.service.d.ts +1 -1
  3. package/dist/document-type/document-type.controller.d.ts +1 -1
  4. package/dist/document-type/document-type.service.d.ts +1 -1
  5. package/dist/person/dto/reports-query.dto.d.ts +8 -0
  6. package/dist/person/dto/reports-query.dto.d.ts.map +1 -0
  7. package/dist/person/dto/reports-query.dto.js +33 -0
  8. package/dist/person/dto/reports-query.dto.js.map +1 -0
  9. package/dist/person/person.controller.d.ts +67 -10
  10. package/dist/person/person.controller.d.ts.map +1 -1
  11. package/dist/person/person.controller.js +26 -6
  12. package/dist/person/person.controller.js.map +1 -1
  13. package/dist/person/person.service.d.ts +61 -5
  14. package/dist/person/person.service.d.ts.map +1 -1
  15. package/dist/person/person.service.js +656 -298
  16. package/dist/person/person.service.js.map +1 -1
  17. package/dist/person-relation-type/person-relation-type.controller.d.ts +2 -2
  18. package/dist/person-relation-type/person-relation-type.service.d.ts +2 -2
  19. package/hedhog/data/menu.yaml +163 -163
  20. package/hedhog/data/route.yaml +68 -60
  21. package/hedhog/frontend/app/_lib/crm-sections.tsx.ejs +9 -9
  22. package/hedhog/frontend/app/accounts/_components/account-form-sheet.tsx.ejs +573 -573
  23. package/hedhog/frontend/app/accounts/_components/account-types.ts.ejs +9 -9
  24. package/hedhog/frontend/app/accounts/page.tsx.ejs +970 -970
  25. package/hedhog/frontend/app/activities/_components/activity-detail-sheet.tsx.ejs +240 -240
  26. package/hedhog/frontend/app/activities/_components/activity-types.ts.ejs +66 -66
  27. package/hedhog/frontend/app/activities/page.tsx.ejs +460 -460
  28. package/hedhog/frontend/app/dashboard/_components/dashboard-types.ts.ejs +70 -70
  29. package/hedhog/frontend/app/dashboard/page.tsx.ejs +639 -639
  30. package/hedhog/frontend/app/follow-ups/page.tsx.ejs +785 -785
  31. package/hedhog/frontend/app/person/_components/person-interaction-dialog.tsx.ejs +10 -12
  32. package/hedhog/frontend/app/reports/_components/report-types.ts.ejs +84 -0
  33. package/hedhog/frontend/app/reports/page.tsx.ejs +1196 -15
  34. package/hedhog/frontend/messages/en.json +242 -123
  35. package/hedhog/frontend/messages/pt.json +242 -123
  36. package/hedhog/table/crm_activity.yaml +68 -68
  37. package/hedhog/table/crm_stage_history.yaml +34 -0
  38. package/hedhog/table/person_company.yaml +27 -27
  39. package/package.json +9 -9
  40. package/src/person/dto/account.dto.ts +100 -100
  41. package/src/person/dto/activity.dto.ts +54 -54
  42. package/src/person/dto/dashboard-query.dto.ts +25 -25
  43. package/src/person/dto/followup-query.dto.ts +25 -25
  44. package/src/person/dto/reports-query.dto.ts +25 -0
  45. package/src/person/person.controller.ts +176 -159
  46. package/src/person/person.service.ts +4825 -4288
@@ -1,163 +1,163 @@
1
- - icon: users
2
- name:
3
- en: CRM
4
- pt: CRM
5
- slug: /contact
6
- order: 40
7
- relations:
8
- role:
9
- - where:
10
- slug: admin
11
- - where:
12
- slug: admin-contact
13
-
14
- - menu_id:
15
- where:
16
- slug: /contact
17
- icon: layout-dashboard
18
- url: /contact/dashboard
19
- name:
20
- en: Dashboard
21
- pt: Dashboard
22
- slug: /contact/dashboard
23
- order: 41
24
- relations:
25
- role:
26
- - where:
27
- slug: admin
28
- - where:
29
- slug: admin-contact
30
-
31
- - menu_id:
32
- where:
33
- slug: /contact
34
- icon: rows-3
35
- url: /contact/pipeline
36
- name:
37
- en: Pipeline
38
- pt: Pipeline
39
- slug: /contact/pipeline
40
- order: 42
41
- relations:
42
- role:
43
- - where:
44
- slug: admin
45
- - where:
46
- slug: admin-contact
47
-
48
- - menu_id:
49
- where:
50
- slug: /contact
51
- icon: users
52
- url: /contact/person
53
- name:
54
- en: Leads and Contacts
55
- pt: Leads e Contatos
56
- slug: /contact/person
57
- order: 43
58
- relations:
59
- role:
60
- - where:
61
- slug: admin
62
- - where:
63
- slug: admin-contact
64
-
65
- - menu_id:
66
- where:
67
- slug: /contact
68
- icon: activity
69
- url: /contact/activities
70
- name:
71
- en: Activities
72
- pt: Atividades
73
- slug: /contact/activities
74
- order: 44
75
- relations:
76
- role:
77
- - where:
78
- slug: admin
79
- - where:
80
- slug: admin-contact
81
-
82
- - menu_id:
83
- where:
84
- slug: /contact
85
- icon: calendar-clock
86
- url: /contact/follow-ups
87
- name:
88
- en: Follow-ups
89
- pt: Follow-ups
90
- slug: /contact/follow-ups
91
- order: 45
92
- relations:
93
- role:
94
- - where:
95
- slug: admin
96
- - where:
97
- slug: admin-contact
98
-
99
- - menu_id:
100
- where:
101
- slug: /contact
102
- icon: building-2
103
- url: /contact/accounts
104
- name:
105
- en: Accounts
106
- pt: Contas
107
- slug: /contact/accounts
108
- order: 46
109
- relations:
110
- role:
111
- - where:
112
- slug: admin
113
- - where:
114
- slug: admin-contact
115
-
116
- - menu_id:
117
- where:
118
- slug: /contact
119
- icon: bar-chart-3
120
- url: /contact/reports
121
- name:
122
- en: Reports
123
- pt: Relatórios
124
- slug: /contact/reports
125
- order: 47
126
- relations:
127
- role:
128
- - where:
129
- slug: admin
130
- - where:
131
- slug: admin-contact
132
-
133
- - menu_id:
134
- where:
135
- slug: /core/management
136
- url: /contact/contact-type
137
- icon: phone
138
- name:
139
- en: Contact Type
140
- pt: Tipos de Contato
141
- slug: /contact/contact-type
142
- relations:
143
- role:
144
- - where:
145
- slug: admin
146
- - where:
147
- slug: admin-contact
148
-
149
- - menu_id:
150
- where:
151
- slug: /core/management
152
- url: /contact/document-type
153
- icon: file-text
154
- name:
155
- en: Document Type
156
- pt: Tipos de Documento
157
- slug: /contact/document-type
158
- relations:
159
- role:
160
- - where:
161
- slug: admin
162
- - where:
163
- slug: admin-contact
1
+ - icon: users
2
+ name:
3
+ en: CRM
4
+ pt: CRM
5
+ slug: /contact
6
+ order: 40
7
+ relations:
8
+ role:
9
+ - where:
10
+ slug: admin
11
+ - where:
12
+ slug: admin-contact
13
+
14
+ - menu_id:
15
+ where:
16
+ slug: /contact
17
+ icon: layout-dashboard
18
+ url: /contact/dashboard
19
+ name:
20
+ en: Dashboard
21
+ pt: Dashboard
22
+ slug: /contact/dashboard
23
+ order: 41
24
+ relations:
25
+ role:
26
+ - where:
27
+ slug: admin
28
+ - where:
29
+ slug: admin-contact
30
+
31
+ - menu_id:
32
+ where:
33
+ slug: /contact
34
+ icon: rows-3
35
+ url: /contact/pipeline
36
+ name:
37
+ en: Pipeline
38
+ pt: Pipeline
39
+ slug: /contact/pipeline
40
+ order: 42
41
+ relations:
42
+ role:
43
+ - where:
44
+ slug: admin
45
+ - where:
46
+ slug: admin-contact
47
+
48
+ - menu_id:
49
+ where:
50
+ slug: /contact
51
+ icon: users
52
+ url: /contact/person
53
+ name:
54
+ en: Leads and Contacts
55
+ pt: Leads e Contatos
56
+ slug: /contact/person
57
+ order: 43
58
+ relations:
59
+ role:
60
+ - where:
61
+ slug: admin
62
+ - where:
63
+ slug: admin-contact
64
+
65
+ - menu_id:
66
+ where:
67
+ slug: /contact
68
+ icon: activity
69
+ url: /contact/activities
70
+ name:
71
+ en: Activities
72
+ pt: Atividades
73
+ slug: /contact/activities
74
+ order: 44
75
+ relations:
76
+ role:
77
+ - where:
78
+ slug: admin
79
+ - where:
80
+ slug: admin-contact
81
+
82
+ - menu_id:
83
+ where:
84
+ slug: /contact
85
+ icon: calendar-clock
86
+ url: /contact/follow-ups
87
+ name:
88
+ en: Follow-ups
89
+ pt: Follow-ups
90
+ slug: /contact/follow-ups
91
+ order: 45
92
+ relations:
93
+ role:
94
+ - where:
95
+ slug: admin
96
+ - where:
97
+ slug: admin-contact
98
+
99
+ - menu_id:
100
+ where:
101
+ slug: /contact
102
+ icon: building-2
103
+ url: /contact/accounts
104
+ name:
105
+ en: Accounts
106
+ pt: Contas
107
+ slug: /contact/accounts
108
+ order: 46
109
+ relations:
110
+ role:
111
+ - where:
112
+ slug: admin
113
+ - where:
114
+ slug: admin-contact
115
+
116
+ - menu_id:
117
+ where:
118
+ slug: /contact
119
+ icon: bar-chart-3
120
+ url: /contact/reports
121
+ name:
122
+ en: Reports
123
+ pt: Relatórios
124
+ slug: /contact/reports
125
+ order: 47
126
+ relations:
127
+ role:
128
+ - where:
129
+ slug: admin
130
+ - where:
131
+ slug: admin-contact
132
+
133
+ - menu_id:
134
+ where:
135
+ slug: /core/management
136
+ url: /contact/contact-type
137
+ icon: phone
138
+ name:
139
+ en: Contact Type
140
+ pt: Tipos de Contato
141
+ slug: /contact/contact-type
142
+ relations:
143
+ role:
144
+ - where:
145
+ slug: admin
146
+ - where:
147
+ slug: admin-contact
148
+
149
+ - menu_id:
150
+ where:
151
+ slug: /core/management
152
+ url: /contact/document-type
153
+ icon: file-text
154
+ name:
155
+ en: Document Type
156
+ pt: Tipos de Documento
157
+ slug: /contact/document-type
158
+ relations:
159
+ role:
160
+ - where:
161
+ slug: admin
162
+ - where:
163
+ slug: admin-contact
@@ -29,66 +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/owner-options
49
- method: GET
50
- relations:
51
- role:
52
- - where:
53
- slug: admin
54
- - where:
55
- slug: admin-contact
56
- - url: /person/followups
57
- method: GET
58
- relations: *a3
59
- - url: /person/followups/stats
60
- method: GET
61
- relations: *a3
62
- - url: /person/activities
63
- method: GET
64
- relations: *a3
65
- - url: /person/activities/stats
66
- method: GET
67
- relations: *a3
68
- - url: /person/activities/:id
69
- method: GET
70
- relations: *a3
71
- - url: /person/activities/:id/complete
72
- method: POST
73
- relations: *a3
74
- - url: /person/accounts
75
- method: GET
76
- relations: *a3
77
- - url: /person/accounts/stats
78
- method: GET
79
- relations: *a3
80
- - url: /person/accounts
81
- method: POST
82
- relations: *a3
83
- - url: /person/accounts/:id
84
- method: PATCH
85
- relations: *a3
86
- - url: /person/accounts
87
- method: DELETE
88
- relations: *a3
89
- - url: /person
90
- method: POST
91
- 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
92
100
  - url: /person/merge
93
101
  method: POST
94
102
  relations: *a3
@@ -66,15 +66,15 @@ export const crmSections: CrmSection[] = [
66
66
  colorClass: 'from-lime-500/20 via-green-500/10 to-transparent',
67
67
  glowClass: 'bg-lime-500/10 text-lime-700',
68
68
  },
69
- {
70
- href: '/contact/reports',
71
- translationKey: 'reports',
72
- icon: BarChart3,
73
- implemented: false,
74
- colorClass: 'from-slate-500/20 via-zinc-500/10 to-transparent',
75
- glowClass: 'bg-slate-500/10 text-slate-700',
76
- },
77
- ];
69
+ {
70
+ href: '/contact/reports',
71
+ translationKey: 'reports',
72
+ icon: BarChart3,
73
+ implemented: true,
74
+ colorClass: 'from-slate-500/20 via-zinc-500/10 to-transparent',
75
+ glowClass: 'bg-slate-500/10 text-slate-700',
76
+ },
77
+ ];
78
78
 
79
79
  export const crmImplementedSections = crmSections.filter(
80
80
  (section) => section.implemented