Closed braughtg closed 3 years ago
Link to pull request: #152
Summary: The contributors for this epic are Bruno Kaboyi, Katya Egorova and Savid Basnyat. The group worked on the Direct Seeding Report sub-tab which appears in the Barn Kit tab on Farm Data 2. Through this sub-tab, users can now successfully search the direct seeding report for a specific crop over a specified date range where the report is displayed as a table. There are features to edit and delete any particular direct seeding report as well. More elaborate description of the completed and incomplete stories is given below:
SAVID
Task - Crop Dropdown Menu: The crop dropdown menu enables the user to search the direct seeding report for a specific crop. The option ‘All’ enables the user to search the direct seeding report for all crops at once. The crop names in the dropdown menu are retrieved from the farmOS API and are sorted in alphabetical order.
Task - Generate Report Button: When the ‘Generate Report’ button is clicked, direct seeding report is generated according to the specified crop and date range. The report is generated as a table.
Task - Direct Seeding Report Table: The direct seeding report table is only visible after the ‘generate report’ button is clicked. The table consists of ‘Date', 'Crop', 'Field', 'Bed Feet', 'Rows/Bed', 'Row Feet', 'Hours', 'Annual', 'Comments' and 'User' as table headers. Among these, ‘Date', 'Crop', 'Rows/Bed', 'Row Feet', 'Comments' and 'User' are retrieved from farmOS API, 'Bed Feet' is calculated with the help of a JavaScript function and there is no data for ‘Field’, ‘Hours’ and ‘Annual’. The table also consists of ‘Edit’ and ‘Delete’ buttons for each row.
KATYA
Task – Field Dropdown Menu:
The field dropdown menu enables the user to search the direct seeding report for a specific field. The option ‘All’ enables the user to search the direct seeding report for all crops at once. The field names in the dropdown menu are retrieved from the farmOS API and are sorted in alphabetical order.
Task – Edit Feature: The edit feature enables user to edit information in the selected log – table row. Each row in the table has ‘edit’ button, which transforms the selected row to edit mode on click using row index. Once ‘edit’ is clicked the row is switched to edit mode with input and dropdown fields, so the user can alter the information. In edit mode the ‘edit’ button is switched with the ‘save’ button, which on click saves information and switches the row back to the default mode. One limitation is that the date field in the edit mode does not open a calendar and relies on user entering the date in the appropriate format in the input field. The edit feature does not edit the information in the database at this point of the implementation, just changes the displayed table.
Task – Run Another Button:
The ‘run another report’ button is shown after ‘generate report button is clicked and it allows user to reset the search page to default state (clear the table from the previous search and clear the search fields) and run another report with new search criteria.
BRUNO:
Task – Dates From and To Menu: The dates menu enables user to the specify the dates range for the search of logs. The entered dates are converted to timestamps to later filter appropriate logs. If no dates are entered then all available logs will be displayed regardless of the date.
Task – Delete Button and Feature: The ‘delete’ button allows user to delete selected log – table row. It appears at the end of each row of the table and once clicked the popup window appears with buttons ‘ok’ and ‘cancel’. If ‘ok’ Is clicked then the row will be removed from the table, otherwise the table will remain unchanged. The delete feature does not edit the information in the database at this point of the implementation, just changes the displayed table.
Incomplete stories:
We were not able to complete the feature that allows the user to filter the direct seeding report according to a specified field. It turns out that there is no data for field in the database. As a result, the field column in the displayed table will always be empty.
We were also not able to complete the ‘download report’ functionality.
We were only able to include the first 100 objects of the API response.
Closing as the course is now complete. A new issue will be created for the completion of this feature.
See Seed -> Direct Seeding -> Report in the original FarmData at https://farmdata.dickinson.edu/guest.php
Displays query results of raw data inputted for direct seeding of CROP from FIELD over selected date range. Summary data includes sum of row feet and bed feet planted, also converted to acres.
Also see #136 for some additional general language that applies to all reports.