mirror of
https://github.com/nowcommunity/nowdatabase.git
synced 2026-10-12 19:13:52 +03:00
Remove unnecessary checkRowRestriction functions #no-deploy
This commit is contained in:
@@ -61,15 +61,11 @@ export const PersonTable = ({ selectorFn }: { selectorFn?: (id: PersonDetailsTyp
|
||||
],
|
||||
[]
|
||||
)
|
||||
const checkRowRestriction = () => {
|
||||
return false
|
||||
}
|
||||
|
||||
return (
|
||||
<TableView<PersonDetailsType>
|
||||
title="People"
|
||||
selectorFn={selectorFn}
|
||||
checkRowRestriction={checkRowRestriction}
|
||||
idFieldName="initials"
|
||||
columns={columns}
|
||||
data={personQuery.data}
|
||||
|
||||
@@ -36,15 +36,11 @@ export const ProjectTable = ({ selectorFn }: { selectorFn?: (id: Project) => voi
|
||||
],
|
||||
[]
|
||||
)
|
||||
const checkRowRestriction = () => {
|
||||
return false
|
||||
}
|
||||
|
||||
return (
|
||||
<TableView<Project>
|
||||
title="Projects"
|
||||
selectorFn={selectorFn}
|
||||
checkRowRestriction={checkRowRestriction}
|
||||
idFieldName="pid"
|
||||
columns={columns}
|
||||
data={projectQuery.data}
|
||||
|
||||
@@ -6,15 +6,10 @@ import { referenceTableColumns } from '@/common'
|
||||
export const ReferenceTable = ({ selectorFn }: { selectorFn?: (id: Reference) => void }) => {
|
||||
const referenceQuery = useGetAllReferencesQuery()
|
||||
|
||||
const checkRowRestriction = () => {
|
||||
return false
|
||||
}
|
||||
|
||||
return (
|
||||
<TableView<Reference>
|
||||
title="References"
|
||||
selectorFn={selectorFn}
|
||||
checkRowRestriction={checkRowRestriction}
|
||||
idFieldName="rid"
|
||||
columns={referenceTableColumns}
|
||||
data={referenceQuery.data}
|
||||
|
||||
@@ -22,15 +22,11 @@ export const RegionTable = ({ selectorFn }: { selectorFn?: (id: Region) => void
|
||||
],
|
||||
[]
|
||||
)
|
||||
const checkRowRestriction = () => {
|
||||
return false
|
||||
}
|
||||
|
||||
return (
|
||||
<TableView<Region>
|
||||
title="Regions"
|
||||
selectorFn={selectorFn}
|
||||
checkRowRestriction={checkRowRestriction}
|
||||
idFieldName="reg_coord_id"
|
||||
columns={columns}
|
||||
data={regionQuery.data}
|
||||
|
||||
@@ -22,14 +22,10 @@ export const SequenceTable = ({ selectorFn }: { selectorFn?: (id: Sequence) => v
|
||||
],
|
||||
[]
|
||||
)
|
||||
const checkRowRestriction = () => {
|
||||
return false
|
||||
}
|
||||
|
||||
return (
|
||||
<TableView<Sequence>
|
||||
selectorFn={selectorFn}
|
||||
checkRowRestriction={checkRowRestriction}
|
||||
idFieldName="sequence"
|
||||
columns={columns}
|
||||
data={sequenceQuery.data}
|
||||
|
||||
@@ -62,15 +62,11 @@ export const SpeciesTable = ({ selectorFn }: { selectorFn?: (id: Species) => voi
|
||||
],
|
||||
[]
|
||||
)
|
||||
const checkRowRestriction = (row: Species) => {
|
||||
return !!row.sp_status
|
||||
}
|
||||
|
||||
return (
|
||||
<TableView<Species>
|
||||
title="Species"
|
||||
selectorFn={selectorFn}
|
||||
checkRowRestriction={checkRowRestriction}
|
||||
idFieldName="species_id"
|
||||
columns={columns}
|
||||
data={speciesQuery.data}
|
||||
|
||||
@@ -43,17 +43,6 @@ export const TimeUnitTab = () => {
|
||||
header: 'Comment',
|
||||
},
|
||||
]
|
||||
const checkRowRestriction = () => {
|
||||
return false
|
||||
}
|
||||
|
||||
return (
|
||||
<TableView<TimeUnit>
|
||||
checkRowRestriction={checkRowRestriction}
|
||||
idFieldName="tu_name"
|
||||
columns={columns}
|
||||
data={timeUnitsData}
|
||||
url="time-unit"
|
||||
/>
|
||||
)
|
||||
return <TableView<TimeUnit> idFieldName="tu_name" columns={columns} data={timeUnitsData} url="time-unit" />
|
||||
}
|
||||
|
||||
@@ -30,15 +30,10 @@ export const TimeBoundTable = ({ selectorFn }: { selectorFn?: (newTimeBound: Tim
|
||||
],
|
||||
[]
|
||||
)
|
||||
const checkRowRestriction = () => {
|
||||
return false
|
||||
}
|
||||
|
||||
return (
|
||||
<TableView<TimeBound>
|
||||
title="Time bounds"
|
||||
selectorFn={selectorFn}
|
||||
checkRowRestriction={checkRowRestriction}
|
||||
idFieldName="bid"
|
||||
columns={columns}
|
||||
data={time_boundQuery.data}
|
||||
|
||||
@@ -39,15 +39,11 @@ export const TimeUnitTable = ({ selectorFn }: { selectorFn?: (newTimeUnit: TimeU
|
||||
],
|
||||
[]
|
||||
)
|
||||
const checkRowRestriction = () => {
|
||||
return false
|
||||
}
|
||||
|
||||
return (
|
||||
<TableView<TimeUnit>
|
||||
title="Time units"
|
||||
selectorFn={selectorFn}
|
||||
checkRowRestriction={checkRowRestriction}
|
||||
idFieldName="tu_name"
|
||||
columns={columns}
|
||||
data={time_unitQuery.data}
|
||||
|
||||
Reference in New Issue
Block a user