@hed-hog/contact 0.0.285 → 0.0.286
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.service.d.ts +2 -148
- package/dist/contact.service.d.ts.map +1 -1
- package/hedhog/frontend/app/_lib/crm-sections.tsx.ejs +2 -2
- package/hedhog/frontend/app/accounts/page.tsx.ejs +24 -18
- package/hedhog/frontend/app/activities/page.tsx.ejs +805 -8
- package/hedhog/frontend/app/dashboard/page.tsx.ejs +32 -47
- package/hedhog/frontend/app/follow-ups/page.tsx.ejs +689 -8
- package/hedhog/frontend/app/person/page.tsx.ejs +18 -14
- package/hedhog/frontend/app/pipeline/page.tsx.ejs +37 -63
- package/hedhog/frontend/messages/en.json +161 -0
- package/hedhog/frontend/messages/pt.json +127 -0
- package/package.json +6 -6
- package/src/contact.service.ts +2 -2
|
@@ -10,154 +10,8 @@ export declare class ContactService {
|
|
|
10
10
|
private readonly mailService;
|
|
11
11
|
private readonly jwtService;
|
|
12
12
|
constructor(configService: ConfigService, prismaService: PrismaService, mailService: MailService, jwtService: JwtService);
|
|
13
|
-
getPerson(personId: number): Promise<
|
|
14
|
-
|
|
15
|
-
id: number;
|
|
16
|
-
address_type: import("@prisma/client").$Enums.address_address_type_enum;
|
|
17
|
-
country_code: string;
|
|
18
|
-
state: string;
|
|
19
|
-
city: string;
|
|
20
|
-
postal_code: string;
|
|
21
|
-
line1: string;
|
|
22
|
-
line2: string;
|
|
23
|
-
is_primary: boolean;
|
|
24
|
-
created_at: Date;
|
|
25
|
-
updated_at: Date;
|
|
26
|
-
}[];
|
|
27
|
-
contact: {
|
|
28
|
-
value: string;
|
|
29
|
-
id: number;
|
|
30
|
-
is_primary: boolean;
|
|
31
|
-
created_at: Date;
|
|
32
|
-
updated_at: Date;
|
|
33
|
-
person_id: number;
|
|
34
|
-
contact_type_id: number;
|
|
35
|
-
}[];
|
|
36
|
-
document: {
|
|
37
|
-
value: string;
|
|
38
|
-
id: number;
|
|
39
|
-
created_at: Date;
|
|
40
|
-
updated_at: Date;
|
|
41
|
-
person_id: number;
|
|
42
|
-
document_type_id: number;
|
|
43
|
-
}[];
|
|
44
|
-
person_metadata: {
|
|
45
|
-
value: import("@prisma/client/runtime/library").JsonValue;
|
|
46
|
-
id: number;
|
|
47
|
-
created_at: Date;
|
|
48
|
-
updated_at: Date;
|
|
49
|
-
person_id: number;
|
|
50
|
-
key: string;
|
|
51
|
-
}[];
|
|
52
|
-
name: string;
|
|
53
|
-
type: import("@prisma/client").$Enums.person_type_enum;
|
|
54
|
-
id: number;
|
|
55
|
-
created_at: Date;
|
|
56
|
-
updated_at: Date;
|
|
57
|
-
status: import("@prisma/client").$Enums.person_status_enum;
|
|
58
|
-
avatar_id: number | null;
|
|
59
|
-
}>;
|
|
60
|
-
getPersonOrCreateIfNotExists(type_id: number, name: string, email: string, phone: string, cpf: string, cnpj: string): Promise<{
|
|
61
|
-
person: {
|
|
62
|
-
address: {
|
|
63
|
-
id: number;
|
|
64
|
-
address_type: import("@prisma/client").$Enums.address_address_type_enum;
|
|
65
|
-
country_code: string;
|
|
66
|
-
state: string;
|
|
67
|
-
city: string;
|
|
68
|
-
postal_code: string;
|
|
69
|
-
line1: string;
|
|
70
|
-
line2: string;
|
|
71
|
-
is_primary: boolean;
|
|
72
|
-
created_at: Date;
|
|
73
|
-
updated_at: Date;
|
|
74
|
-
}[];
|
|
75
|
-
contact: {
|
|
76
|
-
value: string;
|
|
77
|
-
id: number;
|
|
78
|
-
is_primary: boolean;
|
|
79
|
-
created_at: Date;
|
|
80
|
-
updated_at: Date;
|
|
81
|
-
person_id: number;
|
|
82
|
-
contact_type_id: number;
|
|
83
|
-
}[];
|
|
84
|
-
document: {
|
|
85
|
-
value: string;
|
|
86
|
-
id: number;
|
|
87
|
-
created_at: Date;
|
|
88
|
-
updated_at: Date;
|
|
89
|
-
person_id: number;
|
|
90
|
-
document_type_id: number;
|
|
91
|
-
}[];
|
|
92
|
-
person_metadata: {
|
|
93
|
-
value: import("@prisma/client/runtime/library").JsonValue;
|
|
94
|
-
id: number;
|
|
95
|
-
created_at: Date;
|
|
96
|
-
updated_at: Date;
|
|
97
|
-
person_id: number;
|
|
98
|
-
key: string;
|
|
99
|
-
}[];
|
|
100
|
-
name: string;
|
|
101
|
-
type: import("@prisma/client").$Enums.person_type_enum;
|
|
102
|
-
id: number;
|
|
103
|
-
created_at: Date;
|
|
104
|
-
updated_at: Date;
|
|
105
|
-
status: import("@prisma/client").$Enums.person_status_enum;
|
|
106
|
-
avatar_id: number | null;
|
|
107
|
-
};
|
|
108
|
-
created: boolean;
|
|
109
|
-
code?: undefined;
|
|
110
|
-
} | {
|
|
111
|
-
person: {
|
|
112
|
-
address: {
|
|
113
|
-
id: number;
|
|
114
|
-
address_type: import("@prisma/client").$Enums.address_address_type_enum;
|
|
115
|
-
country_code: string;
|
|
116
|
-
state: string;
|
|
117
|
-
city: string;
|
|
118
|
-
postal_code: string;
|
|
119
|
-
line1: string;
|
|
120
|
-
line2: string;
|
|
121
|
-
is_primary: boolean;
|
|
122
|
-
created_at: Date;
|
|
123
|
-
updated_at: Date;
|
|
124
|
-
}[];
|
|
125
|
-
contact: {
|
|
126
|
-
value: string;
|
|
127
|
-
id: number;
|
|
128
|
-
is_primary: boolean;
|
|
129
|
-
created_at: Date;
|
|
130
|
-
updated_at: Date;
|
|
131
|
-
person_id: number;
|
|
132
|
-
contact_type_id: number;
|
|
133
|
-
}[];
|
|
134
|
-
document: {
|
|
135
|
-
value: string;
|
|
136
|
-
id: number;
|
|
137
|
-
created_at: Date;
|
|
138
|
-
updated_at: Date;
|
|
139
|
-
person_id: number;
|
|
140
|
-
document_type_id: number;
|
|
141
|
-
}[];
|
|
142
|
-
person_metadata: {
|
|
143
|
-
value: import("@prisma/client/runtime/library").JsonValue;
|
|
144
|
-
id: number;
|
|
145
|
-
created_at: Date;
|
|
146
|
-
updated_at: Date;
|
|
147
|
-
person_id: number;
|
|
148
|
-
key: string;
|
|
149
|
-
}[];
|
|
150
|
-
name: string;
|
|
151
|
-
type: import("@prisma/client").$Enums.person_type_enum;
|
|
152
|
-
id: number;
|
|
153
|
-
created_at: Date;
|
|
154
|
-
updated_at: Date;
|
|
155
|
-
status: import("@prisma/client").$Enums.person_status_enum;
|
|
156
|
-
avatar_id: number | null;
|
|
157
|
-
};
|
|
158
|
-
created: boolean;
|
|
159
|
-
code: string;
|
|
160
|
-
}>;
|
|
13
|
+
getPerson(personId: number): Promise<any>;
|
|
14
|
+
getPersonOrCreateIfNotExists(type_id: number, name: string, email: string, phone: string, cpf: string, cnpj: string): Promise<any>;
|
|
161
15
|
addContactIfNotExists(personId: number, value: string, typeId: number): Promise<{
|
|
162
16
|
value: string;
|
|
163
17
|
id: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contact.service.d.ts","sourceRoot":"","sources":["../src/contact.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AACzE,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAG5E,qBACa,cAAc;IAEvB,OAAO,CAAC,QAAQ,CAAC,aAAa;IAC9B,OAAO,CAAC,QAAQ,CAAC,aAAa;IAC9B,OAAO,CAAC,QAAQ,CAAC,WAAW;IAC5B,OAAO,CAAC,QAAQ,CAAC,UAAU;gBAHV,aAAa,EAAE,aAAa,EAC5B,aAAa,EAAE,aAAa,EAC5B,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,UAAU;IAGnC,SAAS,CAAC,QAAQ,EAAE,MAAM
|
|
1
|
+
{"version":3,"file":"contact.service.d.ts","sourceRoot":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
@@ -46,7 +46,7 @@ export const crmSections: CrmSection[] = [
|
|
|
46
46
|
href: '/contact/activities',
|
|
47
47
|
translationKey: 'activities',
|
|
48
48
|
icon: Activity,
|
|
49
|
-
implemented:
|
|
49
|
+
implemented: true,
|
|
50
50
|
colorClass: 'from-violet-500/20 via-fuchsia-500/10 to-transparent',
|
|
51
51
|
glowClass: 'bg-violet-500/10 text-violet-700',
|
|
52
52
|
},
|
|
@@ -54,7 +54,7 @@ export const crmSections: CrmSection[] = [
|
|
|
54
54
|
href: '/contact/follow-ups',
|
|
55
55
|
translationKey: 'followups',
|
|
56
56
|
icon: Activity,
|
|
57
|
-
implemented:
|
|
57
|
+
implemented: true,
|
|
58
58
|
colorClass: 'from-pink-500/20 via-rose-500/10 to-transparent',
|
|
59
59
|
glowClass: 'bg-pink-500/10 text-pink-700',
|
|
60
60
|
},
|
|
@@ -7,7 +7,6 @@ import {
|
|
|
7
7
|
PaginationFooter,
|
|
8
8
|
SearchBar,
|
|
9
9
|
type SearchBarControl,
|
|
10
|
-
StatsCards,
|
|
11
10
|
} from '@/components/entity-list';
|
|
12
11
|
import {
|
|
13
12
|
AlertDialog,
|
|
@@ -22,6 +21,7 @@ import { Avatar, AvatarFallback } from '@/components/ui/avatar';
|
|
|
22
21
|
import { Badge } from '@/components/ui/badge';
|
|
23
22
|
import { Button } from '@/components/ui/button';
|
|
24
23
|
import { Card, CardContent } from '@/components/ui/card';
|
|
24
|
+
import { KpiCardsGrid } from '@/components/ui/kpi-cards-grid';
|
|
25
25
|
import {
|
|
26
26
|
DropdownMenu,
|
|
27
27
|
DropdownMenuContent,
|
|
@@ -483,32 +483,36 @@ export default function AccountsPage() {
|
|
|
483
483
|
|
|
484
484
|
const statsCards = [
|
|
485
485
|
{
|
|
486
|
+
key: 'total',
|
|
486
487
|
title: t('statsTotal'),
|
|
487
488
|
value: stats.total,
|
|
488
|
-
icon:
|
|
489
|
-
|
|
490
|
-
|
|
489
|
+
icon: Building2,
|
|
490
|
+
accentClassName: 'from-slate-500/20 via-slate-400/10 to-transparent',
|
|
491
|
+
iconContainerClassName: 'bg-slate-100 text-slate-700',
|
|
491
492
|
},
|
|
492
493
|
{
|
|
494
|
+
key: 'active',
|
|
493
495
|
title: t('statsActive'),
|
|
494
496
|
value: stats.active,
|
|
495
|
-
icon:
|
|
496
|
-
|
|
497
|
-
|
|
497
|
+
icon: Building2,
|
|
498
|
+
accentClassName: 'from-green-500/20 via-emerald-500/10 to-transparent',
|
|
499
|
+
iconContainerClassName: 'bg-green-50 text-green-600',
|
|
498
500
|
},
|
|
499
501
|
{
|
|
502
|
+
key: 'customers',
|
|
500
503
|
title: t('statsCustomers'),
|
|
501
504
|
value: stats.customers,
|
|
502
|
-
icon:
|
|
503
|
-
|
|
504
|
-
|
|
505
|
+
icon: Building2,
|
|
506
|
+
accentClassName: 'from-blue-500/20 via-cyan-500/10 to-transparent',
|
|
507
|
+
iconContainerClassName: 'bg-blue-50 text-blue-600',
|
|
505
508
|
},
|
|
506
509
|
{
|
|
510
|
+
key: 'prospects',
|
|
507
511
|
title: t('statsProspects'),
|
|
508
512
|
value: stats.prospects,
|
|
509
|
-
icon:
|
|
510
|
-
|
|
511
|
-
|
|
513
|
+
icon: Building2,
|
|
514
|
+
accentClassName: 'from-amber-500/20 via-orange-500/10 to-transparent',
|
|
515
|
+
iconContainerClassName: 'bg-amber-50 text-amber-600',
|
|
512
516
|
},
|
|
513
517
|
];
|
|
514
518
|
|
|
@@ -566,7 +570,7 @@ export default function AccountsPage() {
|
|
|
566
570
|
]}
|
|
567
571
|
/>
|
|
568
572
|
|
|
569
|
-
<
|
|
573
|
+
<KpiCardsGrid items={statsCards} />
|
|
570
574
|
|
|
571
575
|
<div className="flex flex-col gap-4 xl:flex-row xl:items-center">
|
|
572
576
|
<div className="flex-1">
|
|
@@ -839,12 +843,14 @@ export default function AccountsPage() {
|
|
|
839
843
|
)}
|
|
840
844
|
|
|
841
845
|
<PaginationFooter
|
|
842
|
-
table={table}
|
|
843
|
-
pageSize={pageSize}
|
|
844
|
-
setPageSize={setPageSize}
|
|
845
846
|
currentPage={page}
|
|
846
|
-
|
|
847
|
+
pageSize={pageSize}
|
|
848
|
+
totalItems={filteredAccounts.length}
|
|
847
849
|
onPageChange={setPage}
|
|
850
|
+
onPageSizeChange={(nextPageSize) => {
|
|
851
|
+
setPageSize(nextPageSize);
|
|
852
|
+
setPage(1);
|
|
853
|
+
}}
|
|
848
854
|
/>
|
|
849
855
|
</>
|
|
850
856
|
)}
|