1
0

65 Commits

Author SHA1 Message Date
cryptogopher
8b17b33603 WIP: Targets configurable with Quantities 2021-02-07 11:02:41 +01:00
cryptogopher
14285b510c Removed migration with defaults in favor of seeds 2020-08-29 01:46:36 +02:00
cryptogopher
1b7f2f0abd Added test_defaults_seed_and_load_into_empty_project
Added :defaults scopes to models
Added :sources and :formulas fixtures
Loading defaults from seeds.rb using rake task instead of migration
2020-08-29 01:26:36 +02:00
cryptogopher
59a14043c8 Added is_binding attribute to Goal
Fixed test_index to check for data rows only
2020-08-18 17:40:46 +02:00
cryptogopher
66a364d017 Added system tests under Redmine 4 2020-08-08 15:39:13 +02:00
cryptogopher
1dd2e2b596 Added Goal model and preliminary Targets index 2020-06-25 03:56:49 +02:00
cryptogopher
8240e5e868 Added Target and Threshold models 2020-06-21 02:48:32 +02:00
cryptogopher
4df88598f8 Fixed Quantity defaults import after removing :name uniqueness
Added awesome_nested_set #each_with_path
2020-06-20 00:52:37 +02:00
cryptogopher
61498018e7 Added Targets table
Fixed Quantity#after_save for default quantities
2020-06-18 01:53:09 +02:00
cryptogopher
1a807d24d7 Removed 'project: nil' 2020-06-16 02:52:44 +02:00
cryptogopher
fb46784248 Added energy from macronutrients defaults 2020-06-16 01:13:20 +02:00
cryptogopher
fd184df9c7 Merged Nutrient and Readout into QuantityValue
Aliased date attributes of Meal and Measurement
2020-05-11 19:36:30 +02:00
cryptogopher
9c3d31c131 Fixes for formula computation
Added default quantity
2020-05-05 22:02:48 +02:00
cryptogopher
36a2e7bcbe Shortened defaults names 2020-05-02 21:49:34 +02:00
cryptogopher
e78803e474 Added MealsController#new and form autocomplete for Food
Renamed QuantityColumn -> Exposure
2020-04-15 23:42:58 +02:00
cryptogopher
8e8160c41a Renamed Ingredient -> Food
Ingredient is now part of composition (meal/recipe/dish)
2020-04-14 19:44:19 +02:00
cryptogopher
ced06a25bc Added :meals and :compositions_ingredients tables
Changed Column -> QuantityColumn
Updated :ingredients table to handle recipes
2020-04-13 01:11:34 +02:00
cryptogopher
18419f1aeb Added MeasurementRoutine as a nested Measurement model
Updated ItemsWithQuantities to work with MeasurementRoutine
Replaced ColumnViews HABTM with polymorphic HMT
Added Measurement notes
Added destroy restrictions on Quantity
Replaced BodyTrackingPluginController with Finders concern
Removed 'body_trackers' prefix from paths
Unified styling for textarea
2020-03-29 00:56:37 +01:00
cryptogopher
031b857925 Added reference to Unit in Formula
Updated defaults identifiers and units in default formulas
2020-03-25 17:57:49 +01:00
cryptogopher
c262e82c7b Renamed Ingredient comment -> notes 2020-03-25 00:26:35 +01:00
cryptogopher
b1e7236460 Added zero_nil to Quantity form and import 2020-02-20 21:55:38 +01:00
cryptogopher
9bddc67a3f Added body composition quantities 2020-02-20 21:30:57 +01:00
cryptogopher
4e537f3981 Moved Formula to separate model 2020-02-16 18:34:07 +01:00
cryptogopher
80dac0dc9d Updated energy formula to accept nils 2020-01-12 00:00:03 +01:00
cryptogopher
cc62ef1002 Added Ingredient comment attribute
Minor view updates
2019-12-27 22:40:07 +01:00
cryptogopher
056d3b150d Removed Measurement 'hidden' attribute 2019-12-27 01:48:22 +01:00
cryptogopher
530dba0612 ColumnView fixes 2019-12-21 12:18:31 +01:00
cryptogopher
0c0ca1d286 Replaced Quantity 'primary' attr with ColumnView model 2019-12-14 23:56:36 +01:00
cryptogopher
ccf26d1830 Added ColumnView model
cmd:
rails generate redmine_plugin_model body_tracking column_view
project:references name:string domain:integer
rails generate migration CreateQuantitiesColumnViews quantity:references
column_view:references
2019-12-14 19:48:52 +01:00
cryptogopher
d74f290a4f Removed ReadoutValue 2019-11-30 00:19:26 +01:00
cryptogopher
18203165b4 Added default measurement quantities 2019-11-29 21:07:11 +01:00
cryptogopher
158685459d Unified hash options style 2019-11-27 21:24:49 +01:00
cryptogopher
793edbe7ae Merged new models migrations 2019-11-15 23:13:38 +01:00
cryptogopher
687269062c Added measurement, readout and readout_value models
commands:
rails generate redmine_plugin_model body_tracking measurement
name:string hidden:boolean source:references
rails generate redmine_plugin_model body_tracking readout
measurement:references quantity:references unit:references
rails generate redmine_plugin_model body_tracking readout_value
readout:references value:decimal taken_at:timestamp
2019-11-15 21:52:12 +01:00
cryptogopher
3ce5d5c940 Fix migration of default quantities
Allow Quantity formula to be nil but not blank
Add computed energy quantity
Reverse default quantities deletion order
2019-11-15 00:04:34 +01:00
cryptogopher
0e5a53b4b9 Moved defaults into separate migration 2019-11-14 22:21:40 +01:00
cryptogopher
12015f6083 Added Quantity.formula
Added timestamps to all models
2019-11-02 23:35:08 +01:00
cryptogopher
fcec8364bc Extra quantities styling in Nutrients listing
Fixed decimal precision/scale
2019-10-31 22:13:39 +01:00
cryptogopher
c0e3fd2e85 Changed Quantity.displayed -> Quantity.primary 2019-10-22 23:19:58 +02:00
cryptogopher
9664df4888 Added ingredient source setting/display/import 2019-09-23 22:33:40 +02:00
cryptogopher
0e6bbd8c74 Added loading default sources 2019-09-23 21:55:04 +02:00
cryptogopher
ce9f011694 Added Source perms and routing
Added Quantity displayed defaults
2019-09-23 15:05:26 +02:00
cryptogopher
e58952b0e7 Merged source db migration
Added Quantity 'displayed' column
2019-09-23 14:55:20 +02:00
cryptogopher
0b549b909a Added Sources model + controller
commands:
rails generate redmine_plugin_model body_tracking source
project:references name:string description:text
rails generate redmine_plugin_controller body_tracking sources index
create destroy
2019-09-23 14:45:13 +02:00
cryptogopher
eb43c4be21 Import fixes 2019-09-21 23:48:59 +02:00
cryptogopher
f039917d0e Added nested nutrients in ingredient form 2019-09-13 19:21:28 +02:00
cryptogopher
c82f903360 Added ingredient index and form 2019-09-13 14:48:43 +02:00
cryptogopher
c916e7fd3c Created ingredients controller
command: rails generate redmine_plugin_controller body_tracking
ingredients index create destroy
2019-09-13 14:03:39 +02:00
cryptogopher
7062652d0d Added nutrient model
command: rails generate redmine_plugin_model body_tracking nutrient
ingredient:references quantity:references unit:references amount:decimal
2019-09-13 13:54:56 +02:00
cryptogopher
8ea838b380 Added default quantity 2019-09-12 22:28:15 +02:00