Commit Graph

288 Commits

Author SHA1 Message Date
Paul Weidner 2ea0c1f1f0 Link created logs to the quick form. 2020-07-07 14:24:45 -04:00
Michael Stenta faa9fdadba Use #default_value instead of #value and unset $form_state['input'] so that custom geometries are saved. 2020-07-03 08:48:18 -04:00
Michael Stenta ede70d0358 Pass geometry for farm_movement_create() instead of using farm_map_geofield_populate() because that doesn't populate movement geometries. 2020-07-03 08:48:18 -04:00
paul121 01c7147ddb Remove the current location layer if an asset has no location. 2020-07-03 08:48:18 -04:00
paul121 19db0bd560 Move next location ajax logic to form builder function. 2020-07-03 08:48:18 -04:00
paul121 948944e6bf Move current location ajax logic to form builder function. 2020-07-03 08:48:18 -04:00
paul121 64b4860a42 Rename ajax function to farm_livestock_move_form_current_location_ajax. 2020-07-03 08:48:18 -04:00
paul121 ec7aa6c19b Use log_save() method instead of $log->save(). 2020-07-03 08:48:18 -04:00
paul121 6f231744f1 Create an editable Movement layer that updates with area geometry. 2020-07-03 08:48:18 -04:00
paul121 baa8fd5329 Display the assets current location on the map. 2020-07-03 08:48:18 -04:00
paul121 69ca698238 Link post grazing logs to area(s) animals are moving from. 2020-07-03 08:48:18 -04:00
paul121 f4d6aaabfb Create post grazing observation log before movement log. 2020-07-03 08:48:18 -04:00
paul121 f0dd507f80 Link pre grazing logs to the area animals are moving to. 2020-07-03 08:48:18 -04:00
paul121 544ef28f5a Create pre and post grazing observation logs. 2020-07-03 08:48:18 -04:00
paul121 b818781b5c Validate pasture height and forage quality are numbers. 2020-07-03 08:48:18 -04:00
paul121 75bb72069e Determine pasture height unit based on system of measurement. 2020-07-03 08:48:18 -04:00
paul121 208ffb4ed0 Create movement activity logs with optional precise geometry. 2020-07-03 08:48:18 -04:00
paul121 7fcc984e41 Validate animal or group asset. 2020-07-03 08:48:18 -04:00
paul121 5580aa9e85 Make the movement form a tree. 2020-07-03 08:48:18 -04:00
paul121 bfbed98499 Add movement date field. 2020-07-03 08:48:18 -04:00
Michael Stenta 292bc23b44 Initial sketch of post/pre-grazing observation fields. 2020-07-03 08:47:03 -04:00
Michael Stenta be0fa3b336 Add geometry field. 2020-07-03 08:45:28 -04:00
Michael Stenta 588796769b Initial animal move quick form sketch. 2020-07-03 08:43:14 -04:00
Michael Stenta be8fb3ef5e Require "create animal farm_asset entities" permission for the birth quick form. 2020-07-03 07:52:40 -04:00
paul121 4f5e1b655d Add spaces to table headers. 2020-06-01 10:02:27 -04:00
paul121 23be7573a0 Add archived label to archived animals in result table. 2020-06-01 10:02:27 -04:00
paul121 a94def9208 Add checkbox to include archived animals in weight report. 2020-06-01 10:02:27 -04:00
paul121 2c40b97b72 Display archived asset groups with archived label. 2020-06-01 10:02:27 -04:00
Michael Stenta 2e12d76553 Issue #3129409: Use click sorting instead of exposed sort in Views 2020-04-23 14:59:43 -04:00
Michael Stenta 6bd7c0aa84 Don't escape more variables that are being saved to log names. 2020-04-23 11:29:45 -04:00
Michael Stenta ba90a84c19 Don't escape measure and units before saving them. They will be sanitized by Drupal when they are loaded into the form #default_value. 2020-04-23 10:49:24 -04:00
Michael Stenta 9b1a87dcbe Translate untranslated drupal_set_message() function calls. 2020-04-23 10:46:19 -04:00
Michael Stenta 27f657d399 Escape characters in log names through quick forms #265 2020-04-23 10:21:10 -04:00
Michael Stenta 0944d92ad1 Fix preg_match() in birth and milk quick forms to work with archived assets. 2020-04-23 09:40:49 -04:00
Michael Stenta ff88327dac Issue #3092756: Add quantity fields to medical logs 2020-04-21 14:49:21 -04:00
Michael Stenta 75a4e8e491 Issue #3092757: Add Vet field to Medical log 2020-04-21 14:49:17 -04:00
Michael Stenta 5a8c774e39 Misc Livestock Features updates. 2020-04-20 15:23:09 -04:00
Michael Stenta aae298097e Issue #3049153: Duplicate assets when filtering by multiple groups or location 2020-04-20 15:17:40 -04:00
Michael Stenta 31cfe1686e Fix Notice: Undefined variable: options in farm_livestock_weight_group_report_form() 2020-04-16 10:47:19 -04:00
Michael Stenta b1a961ae86 Remove Openlayers modules, patches, dependencies, configuration, and related code. 2020-02-10 14:27:50 -05:00
Michael Stenta 4f30833bed Use farm_map_geofield widget in all geofields. 2020-02-10 14:27:49 -05:00
Michael Stenta 42ef0068a4 Use farm_map_geofield formatter in all geofield displays. 2020-02-10 14:27:49 -05:00
Michael Stenta 1178d1fbb2 Change all area type styles to match those provided by farmOS-map. 2020-02-10 14:27:49 -05:00
Michael Stenta 97c872cdc0 Allow decimal values in the milk quick form. 2020-02-07 14:10:03 -05:00
Michael Stenta f731b378da Only include observation logs in livestock weight reports. #208 2019-10-10 12:40:21 -04:00
Michael Stenta d47db78086 Trim whitespace from CSV fields: Asset names, Parent names, Areas, Categories, Crop/variety, Nicknames, Material. 2019-10-09 12:38:25 -04:00
Michael Stenta 148eda32b0 Issue #3086611: Allow CSV imports to reference assets by name 2019-10-09 12:38:25 -04:00
Michael Stenta 6c6ada79ce Fix birth log importer's mother reference target. 2019-10-09 12:38:25 -04:00
Paul Weidner 66f08494e2 Use the average weight calculated on the server in graphs. 2019-09-25 11:05:05 -04:00
Paul Weidner 61df12ed89 Add the average animal gain per day to group report 2019-09-25 11:05:05 -04:00
Paul Weidner f17c1c448a Rename Average Weight graph 2019-09-25 11:05:05 -04:00
Paul Weidner ced00f371f Display graphs of average animal weights in group reports 2019-09-25 11:05:05 -04:00
Paul Weidner 875c46bbc6 Update group report, display HTML table and CSV Export 2019-09-25 11:05:05 -04:00
Paul Weidner 8bc35866bb Update name of individual report method. 2019-09-25 11:05:05 -04:00
Michael Stenta e99011881c Move individual weight report access callback to main module file. 2019-09-25 11:05:05 -04:00
Paul Weidner 76ace07782 Improve header formatting of CSV 2019-09-25 11:05:05 -04:00
Paul Weidner 229630bf5a Change to use a while loop to walk through columns + logs 2019-09-25 11:05:05 -04:00
Paul Weidner 655daacec1 Collect log dates unique to each animal 2019-09-25 11:05:05 -04:00
Paul Weidner a49c727a56 Unset the default start date, change the date_year_range to -10:+1 2019-09-25 11:05:05 -04:00
Paul Weidner 37dacdb43e Change CSV format to one animal per line, columns specific to date 2019-09-25 11:05:05 -04:00
Michael Stenta d453bad45f Remove asset ID and make "Current weight" bold. 2019-09-25 11:05:05 -04:00
Michael Stenta 6ad3ac254d Float graph to the right of the weights table. 2019-09-25 11:05:05 -04:00
Michael Stenta 1f1f8105a4 Allow creating a report of groups that contain other asset types in addition to animals (but skip them). 2019-09-25 11:05:05 -04:00
Michael Stenta 5e0c4e7507 Fix farm_livestock_weight_report_access(). 2019-09-25 11:05:05 -04:00
Michael Stenta c44662ed6c Install the Farm Report module (dependency of Livestock Weight Report). 2019-09-25 11:05:05 -04:00
Michael Stenta c9a21f92e2 Add a default "Info" tab to /farm/reports. Make weight report a local task. 2019-09-25 11:05:05 -04:00
Michael Stenta a731896a5e Pass $end_date into farm_quantity_log_asset() as the timestamp upper bound. 2019-09-25 11:05:05 -04:00
Michael Stenta a1e802b8f8 Do not include parameter variables in function call. 2019-09-25 11:05:05 -04:00
Michael Stenta 0a34e87a6d Simplify start/end date default value code. 2019-09-25 11:05:05 -04:00
Michael Stenta f629d8d9fd Misc whitespace, comments, Drupal coding standards fixes. 2019-09-25 11:05:05 -04:00
Paul Weidner f29b18742e Save weights for graph 2019-09-25 11:05:05 -04:00
Paul Weidner d7c5c9fe33 Prevent Weight tab from appearing on non-animal assets 2019-09-25 11:05:05 -04:00
Paul Weidner e64090e04f Change the name of animal weight graph page from 'report' to 'weight' 2019-09-25 11:05:05 -04:00
Paul Weidner 8e72ca9d45 Update the name of the JS graph behavior 2019-09-25 11:05:05 -04:00
Paul Weidner ed7d893842 Use the drupal theme function to render table of recorded weights 2019-09-25 11:05:05 -04:00
Paul Weidner ae7f8df22c Add start and end date filter to CSV export 2019-09-25 11:05:05 -04:00
Paul Weidner d4276befcf Export CSV file of weights from all animals of selected group(s) 2019-09-25 11:05:05 -04:00
Paul Weidner f2fc551b54 Remove the group ID from Select list 2019-09-25 11:05:05 -04:00
Paul Weidner 366332c4ba Add a form for selecting groups of animal assets 2019-09-25 11:05:05 -04:00
Paul Weidner 6b32df38a6 Add a Weight graph to the Livestock Report tab 2019-09-25 11:05:05 -04:00
Paul Weidner 9ade46dc83 Only display the table of weights if weights have been logged 2019-09-25 11:05:05 -04:00
Paul Weidner 4df8640b60 Move the report view to farm_livestock_report.inc 2019-09-25 11:05:05 -04:00
Paul Weidner 3d0789c0df Display all recorded weights in the Animal Reports tab 2019-09-25 11:05:05 -04:00
Paul Weidner 91f938e106 Add simple animal report view, show ID and current weight 2019-09-25 11:05:05 -04:00
Paul Weidner bbf9a7776f Add link to animal report 2019-09-25 11:05:05 -04:00
Michael Stenta 766454b0b7 Split animal weight code to farm_livestock_weight. 2019-07-09 14:04:42 -04:00
Michael Stenta 5c89340268 Adjust field group weights for consistency. 2019-04-11 00:00:39 -04:00
Michael Stenta 5fab821aa3 Add timestamp to log name patterns. 2019-04-09 14:38:55 -04:00
Michael Stenta 130b9301a5 Add metrics for total number of areas, and total area of certain area types. 2019-04-01 15:56:17 -04:00
Michael Stenta 3f17afcf63 Implement hook_restws_field_collection_info() for field collections: Group Memberships, Inventory Adjustments, Animal Tag IDs, Movements, and Quantity Measurements. 2019-03-06 17:35:11 -05:00
Michael Stenta e7a781a714 Move default livestock area types to new farm_livestock_area_types module. 2018-12-04 15:19:43 -05:00
Michael Stenta 4f9fbf6a06 Move Birth and Milk quick forms to separate include files (requires menu rebuild). 2018-11-30 11:51:08 -05:00
Michael Stenta e9b408119e Link milk logs to the quick form that created them. 2018-10-01 16:27:43 -04:00
Michael Stenta a3f77ec8a7 Wrap farm_quick_entity_link() calls in function_exists() condition. 2018-10-01 15:03:52 -04:00
Michael Stenta a798e64cd0 Use new farm_term() function where possible. 2018-10-01 14:49:24 -04:00
Michael Stenta 0c9038218e Remove #format parameter from submit field. 2018-09-05 12:59:25 -04:00
Michael Stenta 9895a39d89 Link birth quick form to assets and logs created by it. 2018-09-05 12:59:11 -04:00
Michael Stenta c1fb41daea Add KML button to all Views that need it. 2018-05-30 16:36:14 -04:00
Michael Stenta 6961cd4786 Add "Clone" button to all asset Views. 2018-05-23 12:33:16 -04:00
Michael Stenta 9929e12cb3 Add exposed "Areas" filter to all log Views. 2018-04-25 11:54:11 -04:00