Moving queries into dedicated files (#1210)
* Moving queries into dedicated files * fix ci
This commit is contained in:
@ -17,6 +17,7 @@ import { useTableViewFields } from '@/views/hooks/useTableViewFields';
|
||||
import { useViewSorts } from '@/views/hooks/useViewSorts';
|
||||
import { currentViewIdState } from '@/views/states/currentViewIdState';
|
||||
import {
|
||||
SortOrder,
|
||||
UpdateOneCompanyMutationVariables,
|
||||
useGetCompaniesQuery,
|
||||
useUpdateOneCompanyMutation,
|
||||
@ -24,8 +25,6 @@ import {
|
||||
import { companiesFilters } from '~/pages/companies/companies-filters';
|
||||
import { availableSorts } from '~/pages/companies/companies-sorts';
|
||||
|
||||
import { defaultOrderBy } from '../../queries';
|
||||
|
||||
export function CompanyTable() {
|
||||
const currentViewId = useRecoilValue(currentViewIdState);
|
||||
const orderBy = useRecoilScopedValue(
|
||||
@ -61,7 +60,15 @@ export function CompanyTable() {
|
||||
<GenericEntityTableData
|
||||
getRequestResultKey="companies"
|
||||
useGetRequest={useGetCompaniesQuery}
|
||||
orderBy={orderBy.length ? orderBy : defaultOrderBy}
|
||||
orderBy={
|
||||
orderBy.length
|
||||
? orderBy
|
||||
: [
|
||||
{
|
||||
createdAt: SortOrder.Desc,
|
||||
},
|
||||
]
|
||||
}
|
||||
whereFilters={whereFilters}
|
||||
filterDefinitionArray={companiesFilters}
|
||||
setContextMenuEntries={setContextMenuEntries}
|
||||
|
||||
Reference in New Issue
Block a user