Closed nathcast closed 3 years ago
Highfield Bare Fallow has no "design" so that is an example where the site tab needs to go.
In this design.json file, there are fields but there are empty:
[ { "administrative": { "type": "experiment", "identifier": null, "localIdentifier": null, "name": null, "url": null, "description": "" }, "design": { "dateStart": null, "dateEnd": null, "description": null, "studyDesign": null, "factorCombinationNumber": "NA", "numberOdBlocks": null, "numberOfPlots": null, "numberOfReplicates": null, "numberOfSubplots": null, "numberOfHarvests": null }, "crops": "NA", "cropRotations": "NA", "factor": "NA", "factorCombinations": "NA", "measurements": "NA" } ]
What is the minimum information to decide if the tab is going to appear?
design is not shown when design[0]['administrative']['identifier'] is null (always has an identifier... )
site is not shown when site['administrative']['name'] is null : assuming a site always has a name (sometimes identifier is missing)
this seems to work. We can discuss the validitiy of these assumptions.
When displaying an experiment, hide the tabs that have no information like design and site.