File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -156,7 +156,7 @@ export default function ContactForm({
156156 const lastName = nameParts . slice ( 1 ) . join ( ' ' ) || '' ;
157157
158158 setFormData ( {
159- type : contact . type || 'person' ,
159+ type : ( contact . type === 'group' ? 'person' : contact . type ) || 'person' ,
160160 firstName,
161161 lastName,
162162 email : contact . email || '' ,
Original file line number Diff line number Diff line change 11import { Badge } from '@evoapi/design-system' ;
2- import { User , Building2 } from 'lucide-react' ;
2+ import { User , Building2 , Users } from 'lucide-react' ;
33import { useLanguage } from '@/hooks/useLanguage' ;
44
55interface ContactTypeBadgeProps {
6- type : 'person' | 'company' ;
6+ type : 'person' | 'company' | 'group' ;
77 className ?: string ;
88}
99
1010export default function ContactTypeBadge ( { type, className = '' } : ContactTypeBadgeProps ) {
1111 const { t } = useLanguage ( 'contacts' ) ;
12+
13+ if ( type === 'group' ) {
14+ return (
15+ < Badge variant = "outline" className = { `gap-1 ${ className } ` } >
16+ < Users className = "h-3 w-3" />
17+ { t ( 'type.group' ) }
18+ </ Badge >
19+ ) ;
20+ }
21+
1222 const isPerson = type === 'person' ;
1323
1424 return (
Original file line number Diff line number Diff line change 491491 },
492492 "type" : {
493493 "person" : " Person" ,
494- "company" : " Company"
494+ "company" : " Company" ,
495+ "group" : " Group"
495496 },
496497 "filter" : {
497498 "title" : " Filter Contacts" ,
Original file line number Diff line number Diff line change 483483 },
484484 "type" : {
485485 "person" : " Persona" ,
486- "company" : " Empresa"
486+ "company" : " Empresa" ,
487+ "group" : " Grupo"
487488 },
488489 "filter" : {
489490 "title" : " Filtrar Contactos" ,
Original file line number Diff line number Diff line change 483483 },
484484 "type" : {
485485 "person" : " Personne" ,
486- "company" : " Entreprise"
486+ "company" : " Entreprise" ,
487+ "group" : " Groupe"
487488 },
488489 "filter" : {
489490 "title" : " Filtrer les Contacts" ,
Original file line number Diff line number Diff line change 483483 },
484484 "type" : {
485485 "person" : " Persona" ,
486- "company" : " Azienda"
486+ "company" : " Azienda" ,
487+ "group" : " Gruppo"
487488 },
488489 "filter" : {
489490 "title" : " Filtra Contatti" ,
Original file line number Diff line number Diff line change 491491 },
492492 "type" : {
493493 "person" : " Pessoa" ,
494- "company" : " Empresa"
494+ "company" : " Empresa" ,
495+ "group" : " Grupo"
495496 },
496497 "filter" : {
497498 "title" : " Filtrar Contatos" ,
Original file line number Diff line number Diff line change 491491 },
492492 "type" : {
493493 "person" : " Pessoa" ,
494- "company" : " Empresa"
494+ "company" : " Empresa" ,
495+ "group" : " Grupo"
495496 },
496497 "filter" : {
497498 "title" : " Filtrar Contatos" ,
Original file line number Diff line number Diff line change @@ -112,7 +112,7 @@ export interface ContactPipelineInfo {
112112export interface Contact {
113113 id : string ;
114114 name : string ;
115- type : 'person' | 'company' ;
115+ type : 'person' | 'company' | 'group' ;
116116 email : string ;
117117 phone_number : string ;
118118 thumbnail : string ;
@@ -210,7 +210,8 @@ export interface ContactsListParams {
210210 order ?: 'asc' | 'desc' ;
211211 labels ?: string [ ] ;
212212 q ?: string ;
213- type ?: 'person' | 'company' ;
213+ type ?: 'person' | 'company' | 'group' ;
214+ include_groups ?: boolean ;
214215 company_id ?: string ;
215216 include_contact_inboxes ?: boolean ;
216217 created_after ?: string ;
@@ -224,7 +225,7 @@ export interface ContactsSearchParams {
224225 page ?: number ;
225226 per_page ?: number ;
226227 sort ?: string ;
227- type ?: 'person' | 'company' ;
228+ type ?: 'person' | 'company' | 'group' ;
228229 labels ?: string [ ] ;
229230 include_contact_inboxes ?: boolean ;
230231}
You can’t perform that action at this time.
0 commit comments