Skip to content

Commit 4e4fb24

Browse files
committed
hotfix(condo): HOTFIX fixed a loading of specializations, fixed dropdown on employee page (#6990)
* hotfix(condo): HOTFIX fixed a loading of specializations * hotfix(condo): HOTFIX fixed dropdown on employee page (cherry picked from commit 773ef57)
1 parent 5f4d352 commit 4e4fb24

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

apps/condo/domains/common/utils/next/apollo.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ const cacheConfig: InitCacheConfig = (cacheOptions) => {
138138
},
139139
allTicketCategoryClassifiers: {
140140
keyArgs: ['where'],
141-
read: listHelper.getReadFunction('paginate'),
141+
read: listHelper.getReadFunction('showAll'),
142142
merge: listHelper.mergeLists,
143143
},
144144
},

apps/condo/pages/employee/index.tsx

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,13 @@ import {
1313
ActionBar,
1414
Button,
1515
Dropdown,
16+
DropdownProps,
1617
Typography,
1718
} from '@open-condo/ui'
1819
import { colors } from '@open-condo/ui/colors'
1920

2021
import 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'
2223
import { TablePageContent } from '@condo/domains/common/components/containers/BaseLayout/BaseLayout'
2324
import { EmptyListContent } from '@condo/domains/common/components/EmptyListContent'
2425
import { ActiveModalType } from '@condo/domains/common/components/Import/BaseImportWrapper'
@@ -40,6 +41,9 @@ import { OrganizationEmployee } from '@condo/domains/organization/utils/clientSc
4041
import { 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+
4347
const ADD_EMPLOYEE_ROUTE = '/employee/create'
4448
const SORTABLE_PROPERTIES = ['name', 'role', 'position', 'phone', 'email']
4549
const 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

Comments
 (0)