New column on WebAppConfig table: show_first_party_farmware

pull/633/head
Rick Carlino 2018-01-21 13:21:01 -06:00
parent 19dd5292d5
commit d97734dc8b
4 changed files with 16 additions and 2 deletions

View File

@ -0,0 +1,8 @@
class AddFirstPartyFarmwareToFbosConfigs < ActiveRecord::Migration[5.1]
def change
add_column :web_app_configs,
:show_first_party_farmware,
:boolean,
default: false
end
end

View File

@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20180109165402) do
ActiveRecord::Schema.define(version: 20180121191538) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@ -353,6 +353,7 @@ ActiveRecord::Schema.define(version: 20180109165402) do
t.integer "fun_log", default: 1
t.integer "debug_log", default: 1
t.boolean "stub_config", default: false
t.boolean "show_first_party_farmware", default: false
t.index ["device_id"], name: "index_web_app_configs_on_device_id"
end

View File

@ -38,6 +38,7 @@ export interface WebAppConfig {
fun_log: number;
debug_log: number;
stub_config: boolean;
show_first_party_farmware: boolean;
}
export type NumberConfigKey = "id"
@ -73,4 +74,5 @@ export type BooleanConfigKey = "confirm_step_deletion"
|"x_axis_inverted"
|"y_axis_inverted"
|"z_axis_inverted"
|"stub_config";
|"stub_config"
|"show_first_party_farmware";

View File

@ -22,6 +22,9 @@ export const BooleanSetting: Record<BooleanConfigKey, BooleanConfigKey> = {
disable_animations: "disable_animations",
display_trail: "display_trail",
encoder_figure: "encoder_figure",
/** Farmware Settings Panel */
show_first_party_farmware: "show_first_party_farmware"
};
export const NumericSetting: Record<NumberConfigKey, NumberConfigKey> = {