added some minor functionality to the field page so clicking a harvest plan from the table updated the overview with it, also fixed a bug that came up regarding that with the settings using the plan permissions when they should be using the permissions passed in
This commit is contained in:
parent
9966e90f7a
commit
f6e53aff1c
6 changed files with 23 additions and 27 deletions
|
|
@ -6,26 +6,17 @@ import {
|
|||
Button,
|
||||
Grid2,
|
||||
IconButton,
|
||||
Paper,
|
||||
Stack,
|
||||
Tab,
|
||||
Table,
|
||||
TableBody,
|
||||
TableCell,
|
||||
TableContainer,
|
||||
TableHead,
|
||||
TableRow,
|
||||
Tabs,
|
||||
Typography
|
||||
} from "@mui/material";
|
||||
import React, { useCallback, useEffect, useState } from "react";
|
||||
import { useMobile, useSnackbar, useUserAPI } from "hooks";
|
||||
import { useMobile, useSnackbar } from "hooks";
|
||||
import { useGlobalState, useFieldAPI, useJohnDeereProxyAPI, useCNHiProxyAPI } from "providers";
|
||||
//import HarvestTable from "harvestPlan/HarvestTable";
|
||||
import { Field, fieldScope, teamScope } from "models";
|
||||
import { Field } from "models";
|
||||
import GrainDescriber from "grain/GrainDescriber";
|
||||
import { pond } from "protobuf-ts/pond";
|
||||
import HarvestSettings from "harvestPlan/HarvestSettings";
|
||||
import ResponsiveTable, { Column } from "common/ResponsiveTable";
|
||||
import FieldMinimap from "./Fieldminimap";
|
||||
import FieldActions from "./FieldActions";
|
||||
|
|
@ -36,12 +27,6 @@ import ShareAllFields from "./ShareAllFields";
|
|||
import EventBlocker from "common/EventBlocker";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
|
||||
interface TabPanelProps {
|
||||
children?: React.ReactNode;
|
||||
index: any;
|
||||
value: any;
|
||||
}
|
||||
|
||||
export default function FieldList() {
|
||||
const [{ as }] = useGlobalState();
|
||||
const isMobile = useMobile();
|
||||
|
|
@ -50,7 +35,6 @@ export default function FieldList() {
|
|||
const cnhAPI = useCNHiProxyAPI();
|
||||
const { openSnack } = useSnackbar();
|
||||
const [tabValue, setTabValue] = React.useState(0);
|
||||
const [openHarvestSettings, setOpenHarvestSettings] = useState(false);
|
||||
// const [fieldForPlan, setFieldForPlan] = useState(Field.create());
|
||||
const [fields, setFields] = useState<Field[]>([]);
|
||||
const [total, setTotal] = useState(0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue