Feature/species differentiation - #900
Conversation
80cd836 to
85dd999
Compare
1e94287 to
fe22f35
Compare
There was a problem hiding this comment.
Exclude this file from PR merge request.
There was a problem hiding this comment.
Exclude this file from PR merge request.
There was a problem hiding this comment.
Exclude this file from PR merge request.
There was a problem hiding this comment.
Exclude this file from PR merge request.
There was a problem hiding this comment.
Exclude this file from PR merge request.
There was a problem hiding this comment.
Exclude this file from PR merge request.
There was a problem hiding this comment.
Exclude this file from PR merge request.
There was a problem hiding this comment.
Can the query return color as well? This would be important in order for the vector panel to be built dynamically from the database information on recorded_species.
There was a problem hiding this comment.
Exclude this file from PR merge request.
There was a problem hiding this comment.
Exclude this file from PR merge request.
There was a problem hiding this comment.
Exclude this file from PR merge request.
There was a problem hiding this comment.
Exclude this file from PR merge request.
There was a problem hiding this comment.
Exclude this file from PR merge request.
There was a problem hiding this comment.
Exclude this file from PR merge request.
There was a problem hiding this comment.
Exclude this file from PR merge request.
There was a problem hiding this comment.
Rather than use a function/trigger to update the display_name, category, and color (does not account for fresh database instances at the moment), you can refer to this migration for countries? The proposed approach is the following:
- Create a fixed list of species in code with
display_name,categoryandcolor. - Create a migration that loops through this list of species, then for each entry: check if it exists in the
recorded_speciestable by looking at thespeciescolumn. If it exists, only update thedisplay_name,category, andcolor. If it does not, create a new species entry.
rogonion
left a comment
There was a problem hiding this comment.
Good foundation. Kindly take a look at the comments made on each file. TLDR, most files need to be ommited from the commit like the *-lock.json. Moreover, for the species catalogue migration, ensure it accounts for fresh database instances, you can refer to the countries migration to see how it was set up.
This change addresses:
-Change of filter drop down to address two categories, primary and secondary.
-Addition of a catalogue page to show the category of species.
-Database trigger that automatically classifies a species as primary or secondary and adds a display name based on species field.
-Translation to French and Portuguese.
- The table row is clickable only if one is an editor/admin to show a page to edit species color, category and display name.
- Filter drop down picks dynamically from database
- Added three columns to table recorded_species : category, color and display_name