Open javier-molina opened 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.
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; });
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.
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.
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; });