@@ -13,12 +13,13 @@ import {
1313 ActionBar ,
1414 Button ,
1515 Dropdown ,
16+ DropdownProps ,
1617 Typography ,
1718} from '@open-condo/ui'
1819import { colors } from '@open-condo/ui/colors'
1920
2021import Input from '@condo/domains/common/components/antd/Input'
21- import { PageHeader , PageWrapper } from '@condo/domains/common/components/containers/BaseLayout'
22+ import { PageHeader , PageWrapper , useLayoutContext } from '@condo/domains/common/components/containers/BaseLayout'
2223import { TablePageContent } from '@condo/domains/common/components/containers/BaseLayout/BaseLayout'
2324import { EmptyListContent } from '@condo/domains/common/components/EmptyListContent'
2425import { ActiveModalType } from '@condo/domains/common/components/Import/BaseImportWrapper'
@@ -40,6 +41,9 @@ import { OrganizationEmployee } from '@condo/domains/organization/utils/clientSc
4041import { IFilters } from '@condo/domains/organization/utils/helpers'
4142
4243
44+ const DROPDOWN_TRIGGER : DropdownProps [ 'trigger' ] = [ 'hover' ]
45+ const MOBILE_DROPDOWN_TRIGGER : DropdownProps [ 'trigger' ] = [ 'hover' , 'click' ]
46+
4347const ADD_EMPLOYEE_ROUTE = '/employee/create'
4448const SORTABLE_PROPERTIES = [ 'name' , 'role' , 'position' , 'phone' , 'email' ]
4549const EMPLOYEE_DEFAULT_SORT_BY = [ 'createdAt_DESC' ]
@@ -65,6 +69,8 @@ export const EmployeesPageContent = ({
6569 const AddEmployeeUploadExcelLabel = intl . formatMessage ( { id : 'AddDropdown.UploadExcel' } )
6670 const AddEmployeeUploadExcelDescription = intl . formatMessage ( { id : 'AddDropdown.UploadExcelDescription' } )
6771
72+ const { isMobile } = useLayoutContext ( )
73+
6874 const router = useRouter ( )
6975 const filtersFromQuery = getFiltersFromQuery < IFilters > ( router . query )
7076
@@ -147,6 +153,10 @@ export const EmployeesPageContent = ({
147153 { isEmployeeImporterEnabled ?
148154 < Dropdown . Button
149155 type = 'primary'
156+ dropdownProps = { {
157+ trigger : isMobile ? MOBILE_DROPDOWN_TRIGGER : DROPDOWN_TRIGGER ,
158+ placement : 'topLeft' ,
159+ } }
150160 items = { [
151161 {
152162 key : 'create' ,
0 commit comments