Skip to content

Commit a79f5dd

Browse files
committedApr 9, 2024
[MID-162] Merged changes from dev branch
2 parents 833e31a + 5756cdc commit a79f5dd

File tree

6 files changed

+37
-37
lines changed

6 files changed

+37
-37
lines changed
 

‎package-lock.json

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎src/app/_components/CardSpecialist/ShortCardWrapper.js

+24-22
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import { ChipList } from '@components/CardSpecialist/ChipList';
1919
import { OwnershipTypeTile } from '@components/CardSpecialist/Organization/OwnershipTypeTile';
2020
import { OrganizationChipLists } from '@components/CardSpecialist/Organization/OrganizationChipLists';
2121
import { transformClientCategoryIntoChipListItem } from '@components/CardSpecialist/utils';
22+
import { cn } from '@utils/cn';
2223

2324
export function ShortCardWrapper({ data, type, isHoveredOn, className }) {
2425
const { id } = data;
@@ -29,13 +30,15 @@ export function ShortCardWrapper({ data, type, isHoveredOn, className }) {
2930
const { lastName, firstName, surname } = data;
3031
const name = isOrganization ? data.name : [lastName, firstName, surname].filter(Boolean).join(' ');
3132

32-
const { yearsOnMarket, isFreeReception, formatOfWork } = data;
33+
const { yearsOnMarket, yearsOfExperience, isFreeReception, formatOfWork, isInclusiveSpace } = data;
3334
const labelsList = getLabelsList({
34-
yearsOfExperience: yearsOnMarket,
35+
yearsOfExperience: isOrganization ? yearsOnMarket : yearsOfExperience,
3536
isFreeReception,
3637
formatOfWork,
38+
isInclusiveSpace,
3739
specialistType: type,
3840
});
41+
3942
const isBadgeList = !!labelsList.filter(label => !!label.content).length;
4043

4144
const { instagram, facebook, tiktok, youtube, linkedin, viber, telegram } = data;
@@ -57,7 +60,6 @@ export function ShortCardWrapper({ data, type, isHoveredOn, className }) {
5760
transformClientCategoryIntoChipListItem({ workingWith: false }),
5861
);
5962
const clientsList = [...clientsWorkingWithList, ...clientsNotWorkingWithList];
60-
6163
return (
6264
<CardWrapper className={className} id={id} type={type}>
6365
<div className="flex w-full flex-col lg:hidden">
@@ -79,7 +81,7 @@ export function ShortCardWrapper({ data, type, isHoveredOn, className }) {
7981
{data.ownershipType && <OwnershipTypeTile ownershipType={data?.ownershipType} className="mt-1" />}
8082
</div>
8183
</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 })} />
8385
<MethodList
8486
specializations={specializationsList}
8587
methods={methodsList}
@@ -114,28 +116,28 @@ export function ShortCardWrapper({ data, type, isHoveredOn, className }) {
114116
extendedCardOpened
115117
className="flex-wrap"
116118
/>
117-
{data.ownershipType && <OwnershipTypeTile ownershipType={data?.ownershipType} className="mt-2.5" />}
118119
<SpecialistTitle id={id} truncate name={name} className="mt-2" />
120+
{data.ownershipType && <OwnershipTypeTile ownershipType={data?.ownershipType} className="mt-2.5" />}
119121
{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>
120139
{isHoveredOn && (
121140
<>
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>
139141
<ChipList id={`${id}-clientCategories`} items={clientsList} className="mt-4" />
140142
</>
141143
)}

‎src/app/_components/MapLink.js

+7-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { PillButton } from '@components/PillButton';
44
import { List, Map } from '@icons';
55
import React from 'react';
66
import PropTypes from 'prop-types';
7-
import { cn } from '@utils/cn';
87
import Link from 'next/link';
98
import { useSearchParams } from 'next/navigation';
109
import { motion } from 'framer-motion';
@@ -28,8 +27,13 @@ export function MapLink({ mapMode = false, className }) {
2827
}}
2928
className={className}
3029
>
31-
<Link href={href} aria-label="">
32-
<PillButton icon={icon} variant="filled" colorVariant="orange" className={cn('z-10 flex items-center')}>
30+
<Link href={href} aria-label={`Click to see specialist list${mapMode ? ' along with the map' : ''}`}>
31+
<PillButton
32+
icon={icon}
33+
variant="filled"
34+
colorVariant="orange"
35+
className="z-10 flex items-center *:gap-0 md:*:gap-2"
36+
>
3337
<span className="hidden md:block">{buttonText}</span>
3438
</PillButton>
3539
</Link>

‎src/app/_components/PillButton/component.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export function PillButton({ children, className, icon, variant, colorVariant, .
2323

2424
return (
2525
<button type="button" className={styles} {...props}>
26-
<div className={layoutStyle || ''}>
26+
<div className={cn(layoutStyle)}>
2727
{icon}
2828
<Paragraph className="text-inherit">{children}</Paragraph>
2929
</div>

‎src/app/_components/Specialists/Filters.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { DistrictFilter, FormatFilter, PriceFilter, SpecializationFilter, TypeFi
22

33
export function Filters() {
44
return (
5-
<section className="relative z-[50] -mb-[250px] inline-flex w-full flex-col items-start gap-6 py-6">
5+
<section className="relative z-10 -mb-[250px] inline-flex w-full flex-col items-start gap-6 py-6">
66
<div className="no-scrollbar relative flex w-full touch-pan-x content-start items-start gap-4 overflow-x-auto">
77
<TypeFilter />
88
<SpecializationFilter />

‎src/app/_components/Specialists/SpecialistListWrapper.js

+1-7
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,7 @@ export function SpecialistListWrapper({ className }) {
1515
const isMapMode = searchParams.get('mode') === 'map';
1616

1717
return (
18-
<section
19-
className={cn(
20-
{ 'mx-auto px-2 md:px-4 lg:max-w-[1600px]': isMapMode },
21-
{ 'mx-auto lg:max-w-[900px]': !isMapMode },
22-
className,
23-
)}
24-
>
18+
<section className={cn('mx-auto px-4 lg:max-w-[900px]', { 'lg:max-w-[1600px]': isMapMode }, className)}>
2519
<SearchProvider>
2620
<SearchInput />
2721
</SearchProvider>

0 commit comments

Comments
 (0)