Moving queries into dedicated files (#1210)

* Moving queries into dedicated files

* fix ci
This commit is contained in:
Weiko
2023-08-14 19:31:20 -07:00
committed by GitHub
parent 656f1af15c
commit 24e5132029
149 changed files with 2908 additions and 3094 deletions

View File

@ -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}