The property "name" in the table "sighting_state" can have the values: "Pending", "Ongoing", "Confirmed", "Discarded".
This app helps track wildlife sightings reported by rangers. Rangers log sightings of species, including details like date, location, and status.
It links sightings to species and keeps track of their confirmation state (e.g., confirmed, discarding). It helps manage species data, sightings, and the rangers involved in reporting them.
In entity "sighting_state", name represents the state that will be displayed on the screen, label represents the value that programmer will use to filter the states, and the uuid represents a value to distinguish the states.
Note: The value of the field "uuid" is generated automatically.
When the sighting is created, it will automatically become "Pending".
The field "Sighting state" from entity "sighting" will be read-only in edit view.
Create a catalog for entities: "sighting_state", "sighting", "species" and "ranger".
Create event listeners for tables that needs validations (e.g., adding a species without a name, sighting without location, etc., should not be allowed).
Check if the sighting is available by date. If it is not → validation message.
Add a new entity action at the sighting level “Discard sighting”:
It will change the sighting state to "Discarded";
A sighting cannot be discarded if it is in the "Confirmed" or "Ongoing" state → validation message;
First check if the sighting has already been discarded (it has the status "Discarded"), if it has → validation message.
Add a new entity action at the species level "Initiate sighting":
Ensure that each sighting is associated with at least one species, if it is not → validation message;
First check if the sighting is already in the "Ongoing" state (it was already initiated), if it is → validation message;
After the initiation of the sighting, the state will change from "Pending" → "Ongoing";
A sighting cannot be initiated if it is in the "Completed" or "Discarded" state, if it has → validation message.
Add a new entity action at the sighting level "Confirm sighting":
It can't be confirmed if it is "Pending" → validation message;
It can't be confirmed if it is "Discarded" → validation message;
If it is already in "Confirmed" state → validation message.
Sighting report: species situation at sighting level (total number of species observed).
Species report: sighting situation at species level (total number of sightings, location details).
Ranger report: sighting situation at ranger level (total number of sightings, location details).