Skip to content

Commit

Permalink
Merge branch 'master' into 153-manager-view-select-observatory-for-a-…
Browse files Browse the repository at this point in the history
…cycle
  • Loading branch information
AllanEngland committed Jun 13, 2024
2 parents 4dd7f7b + cf2c9b9 commit e491ec5
Show file tree
Hide file tree
Showing 2 changed files with 603 additions and 107 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import {ReactElement} from "react";
import {Table} from "@mantine/core";
import {useAvailableResourcesResourceGetCycleResources} from "../../generated/proposalToolComponents.ts";
import {
useAvailableResourcesResourceGetCycleAvailableResources
} from "../../generated/proposalToolComponents.ts";
import {notifyError} from "../../commonPanel/notifications.tsx";
import getErrorMessage from "../../errorHandling/getErrorMessage.tsx";

Expand All @@ -11,7 +13,7 @@ import getErrorMessage from "../../errorHandling/getErrorMessage.tsx";

export default function AvailableResourcesTable(selectedCycleCode: number) : ReactElement {

const availableResources = useAvailableResourcesResourceGetCycleResources(
const availableResources = useAvailableResourcesResourceGetCycleAvailableResources(
{pathParams: {cycleCode: selectedCycleCode}}
)

Expand All @@ -38,7 +40,7 @@ export default function AvailableResourcesTable(selectedCycleCode: number) : Rea
const AvailableResourcesTableBody = () : ReactElement => {
return (
<Table.Tbody>
{availableResources.data?.map((ar) =>(
{availableResources.data?.resources?.map((ar) =>(
<Table.Tr key={String(ar._id)}>
<Table.Td>{ar.type?.name}</Table.Td>
<Table.Td>{ar.type?.unit}</Table.Td>
Expand Down
Loading

0 comments on commit e491ec5

Please sign in to comment.