adding the harvest plan stuff to the field page
This commit is contained in:
parent
84885dc163
commit
c69636482a
8 changed files with 146 additions and 36 deletions
|
|
@ -9,7 +9,7 @@ import { permissionToString } from "pbHelpers/Permission";
|
|||
|
||||
export interface IFieldAPIContext {
|
||||
addField: (field: pond.FieldSettings, otherTeam?: string) => Promise<any>;
|
||||
getField: (fieldId: string, otherTeam?: string) => Promise<any>;
|
||||
getField: (fieldId: string, otherTeam?: string) => Promise<AxiosResponse<pond.Field>>;
|
||||
listFields: (
|
||||
limit: number,
|
||||
offset: number,
|
||||
|
|
@ -53,8 +53,8 @@ export default function FieldProvider(props: PropsWithChildren<Props>) {
|
|||
|
||||
const getField = (fieldId: string, otherTeam?: string) => {
|
||||
const view = otherTeam ? otherTeam : as
|
||||
if (view) return get(pondURL("/field/" + fieldId + "?as=" + view));
|
||||
return get(pondURL("/field/" + fieldId));
|
||||
if (view) return get<pond.Field>(pondURL("/field/" + fieldId + "?as=" + view));
|
||||
return get<pond.Field>(pondURL("/field/" + fieldId));
|
||||
};
|
||||
|
||||
const removeField = (key: string, otherTeam?: string) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue