mirror of
https://github.com/nowcommunity/nowdatabase.git
synced 2026-10-12 19:13:52 +03:00
* split pages.tsx into multiple files, and update ui e2e test since occurrence rename * reduce size of countryBoundingBoxes and countryPolygons * update files again, and update countryExport script * update files again, add more simplified geojson files, and update countryExport with Copilot
25 lines
776 B
TypeScript
25 lines
776 B
TypeScript
import { fullRights, noRights } from '@/components/pages'
|
|
import { ProjectDetails } from '@/components/Project/ProjectDetails'
|
|
import { ProjectTable } from '@/components/Project/ProjectTable'
|
|
import { UserState } from '@/redux/userReducer'
|
|
import { ProjectDetailsType, Role } from '@/shared/types'
|
|
|
|
import { Page } from '../components/Page'
|
|
|
|
export const ProjectPage = () => {
|
|
return (
|
|
<Page
|
|
allowedRoles={[Role.Admin]}
|
|
tableView={<ProjectTable />}
|
|
detailView={<ProjectDetails />}
|
|
viewName="project"
|
|
idFieldName="pid"
|
|
createTitle={(project: ProjectDetailsType) => `${project.proj_name}`}
|
|
getEditRights={(user: UserState) => {
|
|
if (user.role === Role.Admin) return fullRights
|
|
return noRights
|
|
}}
|
|
/>
|
|
)
|
|
}
|