@@ -19,6 +19,7 @@ import { ChipList } from '@components/CardSpecialist/ChipList';
19
19
import { OwnershipTypeTile } from '@components/CardSpecialist/Organization/OwnershipTypeTile' ;
20
20
import { OrganizationChipLists } from '@components/CardSpecialist/Organization/OrganizationChipLists' ;
21
21
import { transformClientCategoryIntoChipListItem } from '@components/CardSpecialist/utils' ;
22
+ import { cn } from '@utils/cn' ;
22
23
23
24
export function ShortCardWrapper ( { data, type, isHoveredOn, className } ) {
24
25
const { id } = data ;
@@ -29,13 +30,15 @@ export function ShortCardWrapper({ data, type, isHoveredOn, className }) {
29
30
const { lastName, firstName, surname } = data ;
30
31
const name = isOrganization ? data . name : [ lastName , firstName , surname ] . filter ( Boolean ) . join ( ' ' ) ;
31
32
32
- const { yearsOnMarket, isFreeReception, formatOfWork } = data ;
33
+ const { yearsOnMarket, yearsOfExperience , isFreeReception, formatOfWork, isInclusiveSpace } = data ;
33
34
const labelsList = getLabelsList ( {
34
- yearsOfExperience : yearsOnMarket ,
35
+ yearsOfExperience : isOrganization ? yearsOnMarket : yearsOfExperience ,
35
36
isFreeReception,
36
37
formatOfWork,
38
+ isInclusiveSpace,
37
39
specialistType : type ,
38
40
} ) ;
41
+
39
42
const isBadgeList = ! ! labelsList . filter ( label => ! ! label . content ) . length ;
40
43
41
44
const { instagram, facebook, tiktok, youtube, linkedin, viber, telegram } = data ;
@@ -57,7 +60,6 @@ export function ShortCardWrapper({ data, type, isHoveredOn, className }) {
57
60
transformClientCategoryIntoChipListItem ( { workingWith : false } ) ,
58
61
) ;
59
62
const clientsList = [ ...clientsWorkingWithList , ...clientsNotWorkingWithList ] ;
60
-
61
63
return (
62
64
< CardWrapper className = { className } id = { id } type = { type } >
63
65
< div className = "flex w-full flex-col lg:hidden" >
@@ -79,7 +81,7 @@ export function ShortCardWrapper({ data, type, isHoveredOn, className }) {
79
81
{ data . ownershipType && < OwnershipTypeTile ownershipType = { data ?. ownershipType } className = "mt-1" /> }
80
82
</ div >
81
83
</ div >
82
- < BadgeList labels = { labelsList } className = " mb-2 mt-4 flex-wrap border-0" />
84
+ < BadgeList labels = { labelsList } className = { cn ( 'mt mb-2 flex-wrap border-0' , { hidden : ! isBadgeList } ) } />
83
85
< MethodList
84
86
specializations = { specializationsList }
85
87
methods = { methodsList }
@@ -114,28 +116,28 @@ export function ShortCardWrapper({ data, type, isHoveredOn, className }) {
114
116
extendedCardOpened
115
117
className = "flex-wrap"
116
118
/>
117
- { data . ownershipType && < OwnershipTypeTile ownershipType = { data ?. ownershipType } className = "mt-2.5" /> }
118
119
< SpecialistTitle id = { id } truncate name = { name } className = "mt-2" />
120
+ { data . ownershipType && < OwnershipTypeTile ownershipType = { data ?. ownershipType } className = "mt-2.5" /> }
119
121
{ isBadgeList && < BadgeList labels = { labelsList } className = "mt-4 flex-wrap" /> }
122
+ < div className = "mt-5 w-full" >
123
+ { isOrganization ? (
124
+ < OrganizationChipLists
125
+ id = { id }
126
+ expertSpecializations = { data . expertSpecializations }
127
+ className = "border-t border-dashed border-t-gray-200 pt-4"
128
+ showCaption = { false }
129
+ />
130
+ ) : (
131
+ < MethodList
132
+ specializations = { specializationsList }
133
+ methods = { methodsList }
134
+ className = "max-w-[300px] border-0"
135
+ showCaption = { false }
136
+ />
137
+ ) }
138
+ </ div >
120
139
{ isHoveredOn && (
121
140
< >
122
- < div className = "border-1 mt-5 w-full border-t border-dashed border-t-gray-200" >
123
- { isOrganization ? (
124
- < OrganizationChipLists
125
- id = { id }
126
- expertSpecializations = { data . expertSpecializations }
127
- className = "border-t border-dashed border-t-gray-200 pt-4"
128
- showCaption = { false }
129
- />
130
- ) : (
131
- < MethodList
132
- specializations = { specializationsList }
133
- methods = { methodsList }
134
- className = "max-w-[300px] border-0"
135
- showCaption = { false }
136
- />
137
- ) }
138
- </ div >
139
141
< ChipList id = { `${ id } -clientCategories` } items = { clientsList } className = "mt-4" />
140
142
</ >
141
143
) }
0 commit comments