mirror of
https://github.com/nowcommunity/nowdatabase.git
synced 2026-10-12 19:13:52 +03:00
Rename type projectdetails to ProjectDetailsType
This commit is contained in:
Vendored
+1
-1
@@ -31,7 +31,7 @@ export type LocalityUpdate = Prisma.now_lau & { now_lr: Prisma.now_lr }
|
||||
export type SpeciesUpdate = Prisma.now_sau & { now_lr: Prisma.now_sr }
|
||||
export type Museum = Prisma.com_mlist
|
||||
export type ProjectPeople = Prisma.now_proj_people
|
||||
export type ProjectDetails = Prisma.now_proj & { now_proj_people: Array<Editable<ProjectPeople>> }
|
||||
export type ProjectDetailsType = Prisma.now_proj & { now_proj_people: Array<Editable<ProjectPeople>> }
|
||||
export type Project = Prisma.now_proj
|
||||
export type Region = Prisma.now_reg_coord
|
||||
export type RegionCoordinator = Prisma.now_reg_coord_people
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { EditDataType, Editable, ProjectDetails, ProjectPeople } from '@/backendTypes'
|
||||
import { EditDataType, Editable, ProjectDetailsType, ProjectPeople } from '@/backendTypes'
|
||||
import { useDetailContext } from '@/components/DetailView/Context/DetailContext'
|
||||
import { ArrayFrame, Grouped } from '@/components/DetailView/common/tabLayoutHelpers'
|
||||
import { MRT_ColumnDef } from 'material-react-table'
|
||||
import { EditableTable } from '@/components/DetailView/common/EditableTable'
|
||||
|
||||
export const CoordinatorTab = () => {
|
||||
const { data, editData, mode, radioSelection, textField } = useDetailContext<ProjectDetails>()
|
||||
const { data, editData, mode, radioSelection, textField } = useDetailContext<ProjectDetailsType>()
|
||||
|
||||
const getStatusText = () => (data.proj_records ? <>Private</> : <>Public</>)
|
||||
|
||||
@@ -61,7 +61,7 @@ export const CoordinatorTab = () => {
|
||||
<>
|
||||
<ArrayFrame half array={projectInformation} title="Project Information" />
|
||||
<Grouped title="Project Members">
|
||||
<EditableTable<EditDataType<Editable<ProjectPeople>>, ProjectDetails>
|
||||
<EditableTable<EditDataType<Editable<ProjectPeople>>, ProjectDetailsType>
|
||||
columns={people}
|
||||
editTableData={editData.now_proj_people}
|
||||
field="now_proj_people"
|
||||
|
||||
@@ -43,8 +43,8 @@ export const TimeUnitTab = () => {
|
||||
header: 'Comment',
|
||||
},
|
||||
]
|
||||
const checkRowRestriction = (row: TimeUnit) => {
|
||||
return !!0
|
||||
const checkRowRestriction = () => {
|
||||
return false
|
||||
}
|
||||
|
||||
return (
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { api } from './api'
|
||||
import { Project, ProjectDetails } from '@/backendTypes'
|
||||
import { Project, ProjectDetailsType } from '@/backendTypes'
|
||||
|
||||
const projectsApi = api.injectEndpoints({
|
||||
endpoints: builder => ({
|
||||
@@ -8,7 +8,7 @@ const projectsApi = api.injectEndpoints({
|
||||
url: `/project/all`,
|
||||
}),
|
||||
}),
|
||||
getProjectDetails: builder.query<ProjectDetails, string>({
|
||||
getProjectDetails: builder.query<ProjectDetailsType, string>({
|
||||
query: id => ({
|
||||
url: `/project/${id}`,
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user