final adjustments to the field task list and the field drawer and field page using the tasks with the permissions in the correct way
This commit is contained in:
parent
8633c197ab
commit
186604dccf
11 changed files with 97 additions and 177 deletions
|
|
@ -512,7 +512,7 @@ export default function Bin(props: Props) {
|
|||
if (showTasks()) {
|
||||
return (
|
||||
<React.Fragment>
|
||||
<TaskViewer drawerView objectKey={binID} loadKeys={[binID]} />
|
||||
<TaskViewer drawerView keys={[binID]} types={["bin"]} overlayButton />
|
||||
</React.Fragment>
|
||||
);
|
||||
}
|
||||
|
|
@ -1156,7 +1156,7 @@ export default function Bin(props: Props) {
|
|||
<IconButton style={{ width: 50 }} onClick={() => setTaskDrawer(false)}>
|
||||
<Close />
|
||||
</IconButton>
|
||||
<TaskViewer drawerView objectKey={binID} loadKeys={[binID]} />
|
||||
<TaskViewer drawerView keys={[binID]} types={["bin"]} overlayButton />
|
||||
</Box>
|
||||
</Drawer>
|
||||
)}
|
||||
|
|
|
|||
|
|
@ -10,12 +10,12 @@ import { Settings } from "@mui/icons-material";
|
|||
import { pond } from "protobuf-ts/pond";
|
||||
import FieldMinimap from "field/Fieldminimap";
|
||||
import Weather from "weather/weather";
|
||||
import TaskViewer from "tasks/TaskViewer";
|
||||
import HarvestPlanDisplay from "harvestPlan/HarvestPlanDisplay";
|
||||
import { cloneDeep } from "lodash";
|
||||
import HarvestPlanTable from "harvestPlan/HarvestPlanTable";
|
||||
import { makeStyles } from "@mui/styles";
|
||||
import FieldSettings from "field/FieldSettings";
|
||||
import FieldTaskList from "field/FieldTaskList";
|
||||
|
||||
const useStyles = makeStyles((theme: Theme) => {
|
||||
return ({
|
||||
|
|
@ -185,12 +185,9 @@ export default function FieldPage() {
|
|||
}
|
||||
|
||||
const tasks = () => {
|
||||
let taskLoadKeys: string[] = [];
|
||||
if (!planLoading) {
|
||||
field.key() !== "" && taskLoadKeys.push(field.key());
|
||||
//hPlan.key() !== "" && taskLoadKeys.push(hPlan.key());
|
||||
}
|
||||
return (<TaskViewer drawerView objectKey={field.key()} loadKeys={taskLoadKeys} overlayButton={isMobile}/>)
|
||||
return (
|
||||
<FieldTaskList field={field.key()}/>
|
||||
)
|
||||
}
|
||||
|
||||
const desktopView = () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue