@hed-hog/contact 0.0.296 → 0.0.298
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/contact-type/contact-type.controller.d.ts +1 -1
- package/dist/contact-type/contact-type.service.d.ts +1 -1
- package/dist/document-type/document-type.controller.d.ts +1 -1
- package/dist/document-type/document-type.service.d.ts +1 -1
- package/dist/person/person.controller.d.ts +5 -5
- package/dist/person/person.service.d.ts +3 -3
- package/hedhog/frontend/app/_lib/crm-sections.tsx.ejs +9 -9
- package/hedhog/frontend/app/accounts/_components/account-form-sheet.tsx.ejs +573 -573
- package/hedhog/frontend/app/accounts/_components/account-types.ts.ejs +9 -9
- package/hedhog/frontend/app/accounts/page.tsx.ejs +970 -970
- package/hedhog/frontend/app/activities/_components/activity-detail-sheet.tsx.ejs +240 -240
- package/hedhog/frontend/app/activities/_components/activity-types.ts.ejs +66 -66
- package/hedhog/frontend/app/activities/page.tsx.ejs +460 -460
- package/hedhog/frontend/app/dashboard/_components/dashboard-types.ts.ejs +70 -70
- package/hedhog/frontend/app/dashboard/page.tsx.ejs +639 -639
- package/hedhog/frontend/app/follow-ups/page.tsx.ejs +785 -785
- package/hedhog/frontend/app/person/_components/person-interaction-dialog.tsx.ejs +10 -10
- package/hedhog/frontend/app/reports/_components/report-types.ts.ejs +84 -84
- package/hedhog/frontend/app/reports/page.tsx.ejs +1196 -1196
- package/hedhog/frontend/messages/en.json +242 -242
- package/hedhog/frontend/messages/pt.json +242 -242
- package/package.json +6 -6
|
@@ -98,11 +98,11 @@ export function PersonInteractionDialog({
|
|
|
98
98
|
if (!person) return;
|
|
99
99
|
try {
|
|
100
100
|
setIsSubmitting(true);
|
|
101
|
-
await request({
|
|
102
|
-
url: `/person/${person.id}/interaction`,
|
|
103
|
-
method: 'POST',
|
|
104
|
-
data: values,
|
|
105
|
-
});
|
|
101
|
+
await request({
|
|
102
|
+
url: `/person/${person.id}/interaction`,
|
|
103
|
+
method: 'POST',
|
|
104
|
+
data: values,
|
|
105
|
+
});
|
|
106
106
|
toast.success(t('interactionSuccess'));
|
|
107
107
|
onOpenChange(false);
|
|
108
108
|
onSuccess();
|
|
@@ -117,11 +117,11 @@ export function PersonInteractionDialog({
|
|
|
117
117
|
if (!person) return;
|
|
118
118
|
try {
|
|
119
119
|
setIsSubmitting(true);
|
|
120
|
-
await request({
|
|
121
|
-
url: `/person/${person.id}/followup`,
|
|
122
|
-
method: 'POST',
|
|
123
|
-
data: values,
|
|
124
|
-
});
|
|
120
|
+
await request({
|
|
121
|
+
url: `/person/${person.id}/followup`,
|
|
122
|
+
method: 'POST',
|
|
123
|
+
data: values,
|
|
124
|
+
});
|
|
125
125
|
toast.success(t('followupSuccess'));
|
|
126
126
|
onOpenChange(false);
|
|
127
127
|
onSuccess();
|
|
@@ -1,84 +1,84 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import type {
|
|
4
|
-
PersonLifecycleStage,
|
|
5
|
-
PersonSource,
|
|
6
|
-
} from '../../person/_components/person-types';
|
|
7
|
-
|
|
8
|
-
export type ReportGroupBy = 'day' | 'week' | 'month' | 'year';
|
|
9
|
-
|
|
10
|
-
export type ReportSummary = {
|
|
11
|
-
new_leads: number;
|
|
12
|
-
qualified_moves: number;
|
|
13
|
-
customer_moves: number;
|
|
14
|
-
lost_moves: number;
|
|
15
|
-
interactions: number;
|
|
16
|
-
followups_completed: number;
|
|
17
|
-
conversion_rate: number;
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
export type ReportTimelineItem = {
|
|
21
|
-
period: string;
|
|
22
|
-
label: string;
|
|
23
|
-
} & ReportSummary;
|
|
24
|
-
|
|
25
|
-
export type ReportBreakdownBucket<T extends string> = {
|
|
26
|
-
key: T;
|
|
27
|
-
total: number;
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
export type ReportOwnerPerformanceItem = {
|
|
31
|
-
owner_user_id: number;
|
|
32
|
-
owner_name: string;
|
|
33
|
-
interactions: number;
|
|
34
|
-
followups_completed: number;
|
|
35
|
-
customer_moves: number;
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
export type ReportActivityType =
|
|
39
|
-
| 'call'
|
|
40
|
-
| 'email'
|
|
41
|
-
| 'meeting'
|
|
42
|
-
| 'whatsapp'
|
|
43
|
-
| 'task'
|
|
44
|
-
| 'note';
|
|
45
|
-
|
|
46
|
-
export type ReportResponse = {
|
|
47
|
-
summary: ReportSummary;
|
|
48
|
-
timeline: ReportTimelineItem[];
|
|
49
|
-
breakdowns: {
|
|
50
|
-
source: ReportBreakdownBucket<PersonSource>[];
|
|
51
|
-
current_stage: ReportBreakdownBucket<PersonLifecycleStage>[];
|
|
52
|
-
activity_type: ReportBreakdownBucket<ReportActivityType>[];
|
|
53
|
-
};
|
|
54
|
-
owners: ReportOwnerPerformanceItem[];
|
|
55
|
-
table: ReportTimelineItem[];
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
export const REPORT_STAGE_ORDER: PersonLifecycleStage[] = [
|
|
59
|
-
'new',
|
|
60
|
-
'contacted',
|
|
61
|
-
'qualified',
|
|
62
|
-
'proposal',
|
|
63
|
-
'negotiation',
|
|
64
|
-
'customer',
|
|
65
|
-
'lost',
|
|
66
|
-
];
|
|
67
|
-
|
|
68
|
-
export const REPORT_SOURCE_ORDER: PersonSource[] = [
|
|
69
|
-
'website',
|
|
70
|
-
'referral',
|
|
71
|
-
'social',
|
|
72
|
-
'inbound',
|
|
73
|
-
'outbound',
|
|
74
|
-
'other',
|
|
75
|
-
];
|
|
76
|
-
|
|
77
|
-
export const REPORT_ACTIVITY_ORDER: ReportActivityType[] = [
|
|
78
|
-
'call',
|
|
79
|
-
'email',
|
|
80
|
-
'meeting',
|
|
81
|
-
'whatsapp',
|
|
82
|
-
'task',
|
|
83
|
-
'note',
|
|
84
|
-
];
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import type {
|
|
4
|
+
PersonLifecycleStage,
|
|
5
|
+
PersonSource,
|
|
6
|
+
} from '../../person/_components/person-types';
|
|
7
|
+
|
|
8
|
+
export type ReportGroupBy = 'day' | 'week' | 'month' | 'year';
|
|
9
|
+
|
|
10
|
+
export type ReportSummary = {
|
|
11
|
+
new_leads: number;
|
|
12
|
+
qualified_moves: number;
|
|
13
|
+
customer_moves: number;
|
|
14
|
+
lost_moves: number;
|
|
15
|
+
interactions: number;
|
|
16
|
+
followups_completed: number;
|
|
17
|
+
conversion_rate: number;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export type ReportTimelineItem = {
|
|
21
|
+
period: string;
|
|
22
|
+
label: string;
|
|
23
|
+
} & ReportSummary;
|
|
24
|
+
|
|
25
|
+
export type ReportBreakdownBucket<T extends string> = {
|
|
26
|
+
key: T;
|
|
27
|
+
total: number;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export type ReportOwnerPerformanceItem = {
|
|
31
|
+
owner_user_id: number;
|
|
32
|
+
owner_name: string;
|
|
33
|
+
interactions: number;
|
|
34
|
+
followups_completed: number;
|
|
35
|
+
customer_moves: number;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export type ReportActivityType =
|
|
39
|
+
| 'call'
|
|
40
|
+
| 'email'
|
|
41
|
+
| 'meeting'
|
|
42
|
+
| 'whatsapp'
|
|
43
|
+
| 'task'
|
|
44
|
+
| 'note';
|
|
45
|
+
|
|
46
|
+
export type ReportResponse = {
|
|
47
|
+
summary: ReportSummary;
|
|
48
|
+
timeline: ReportTimelineItem[];
|
|
49
|
+
breakdowns: {
|
|
50
|
+
source: ReportBreakdownBucket<PersonSource>[];
|
|
51
|
+
current_stage: ReportBreakdownBucket<PersonLifecycleStage>[];
|
|
52
|
+
activity_type: ReportBreakdownBucket<ReportActivityType>[];
|
|
53
|
+
};
|
|
54
|
+
owners: ReportOwnerPerformanceItem[];
|
|
55
|
+
table: ReportTimelineItem[];
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
export const REPORT_STAGE_ORDER: PersonLifecycleStage[] = [
|
|
59
|
+
'new',
|
|
60
|
+
'contacted',
|
|
61
|
+
'qualified',
|
|
62
|
+
'proposal',
|
|
63
|
+
'negotiation',
|
|
64
|
+
'customer',
|
|
65
|
+
'lost',
|
|
66
|
+
];
|
|
67
|
+
|
|
68
|
+
export const REPORT_SOURCE_ORDER: PersonSource[] = [
|
|
69
|
+
'website',
|
|
70
|
+
'referral',
|
|
71
|
+
'social',
|
|
72
|
+
'inbound',
|
|
73
|
+
'outbound',
|
|
74
|
+
'other',
|
|
75
|
+
];
|
|
76
|
+
|
|
77
|
+
export const REPORT_ACTIVITY_ORDER: ReportActivityType[] = [
|
|
78
|
+
'call',
|
|
79
|
+
'email',
|
|
80
|
+
'meeting',
|
|
81
|
+
'whatsapp',
|
|
82
|
+
'task',
|
|
83
|
+
'note',
|
|
84
|
+
];
|