AtlasOfLivingAustralia / biocollect

Biocollect front end application
https://biocollect.ala.org.au/
Other
10 stars 15 forks source link

Science type tags will never display in About page. #633

Open javier-molina opened 8 years ago

javier-molina commented 8 years ago

When creating a project there is a section to fill in the type of science.

In theory some of those entries will be displayed as tags in the about page, just next to where No cost and Difficulty are displayed.

in practice looks like the code below will not match any value hence never displaying tags for type of science.

TBC: Are these tags required? If so which ones. If not, then the relevant code should be removed to avoid confusion in the future.

screen shot 2016-08-11 at 2 19 40 pm screen shot 2016-08-11 at 2 20 11 pm

var scienceTypesList = [ {name:'Biodiversity', value:'biodiversity'}, {name:'Ecology', value:'ecology'}, {name:'Natural resource management', value:'nrm'} ]; var ecoScienceTypesList = [ {name:'Biodiversity', value:'biodiversity'}, {name:'Ecology', value:'ecology'}, {name:'Natural resource management', value:'nrm'} ]; self.transients.availableScienceTypes = fcConfig.scienceTypes; self.transients.availableEcoScienceTypes = fcConfig.ecoScienceTypes; self.transients.scienceTypeDisplay = ko.pureComputed(function () { debugger; for (var st = self.scienceType(), i = 0; i < scienceTypesList.length; i++) if (st === scienceTypesList[i].value) return scienceTypesList[i].name; }); self.transients.ecoScienceTypeDisplay = ko.pureComputed(function () { debugger; for (var st = self.ecoScienceType(), i = 0; i < ecoScienceTypesList.length; i++) if (st === ecoScienceTypesList[i].value) return ecoScienceTypesList[i].name; });

pbrenton commented 8 years ago

I would like to include science type tags in the "About" page display for both CS and ES project types, though it is not a priority for the current sprint.