Create ui for data filters. Add listeners to direct to the correct url. Update ui based on the list of selected params

This commit is contained in:
rebuilt 2022-07-21 20:54:11 -07:00
parent 4f0b92fa79
commit 765ad6a624
35 changed files with 14776 additions and 2878 deletions

View file

@ -0,0 +1,12 @@
class CreateRaces < ActiveRecord::Migration[7.0]
def change
create_table :races do |t|
t.string :designation
t.integer :qualtrics_code
t.timestamps
end
add_index :races, :designation, unique: true
add_index :races, :qualtrics_code, unique: true
end
end

View file

@ -0,0 +1,6 @@
class AddSlugToRace < ActiveRecord::Migration[7.0]
def change
add_column :races, :slug, :string
add_index :races, :slug, unique: true
end
end

View file

@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema[7.0].define(version: 2022_06_16_220352) do
ActiveRecord::Schema[7.0].define(version: 2022_07_22_030114) do
# These are extensions that must be enabled in order to support this database
enable_extension "pg_stat_statements"
enable_extension "plpgsql"
@ -290,6 +290,17 @@ ActiveRecord::Schema[7.0].define(version: 2022_06_16_220352) do
t.index ["subcategory_id"], name: "index_measures_on_subcategory_id"
end
create_table "races", force: :cascade do |t|
t.string "designation"
t.integer "qualtrics_code"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.string "slug"
t.index ["designation"], name: "index_races_on_designation", unique: true
t.index ["qualtrics_code"], name: "index_races_on_qualtrics_code", unique: true
t.index ["slug"], name: "index_races_on_slug", unique: true
end
create_table "respondents", force: :cascade do |t|
t.bigint "school_id", null: false
t.bigint "academic_year_id", null: false
@ -313,7 +324,6 @@ ActiveRecord::Schema[7.0].define(version: 2022_06_16_220352) do
t.datetime "updated_at", null: false
t.index ["academic_year_id"], name: "index_response_rates_on_academic_year_id"
t.index ["school_id", "subcategory_id"], name: "index_response_rates_on_school_id_and_subcategory_id"
t.index ["school_id"], name: "index_response_rates_on_school_id"
t.index ["subcategory_id"], name: "index_response_rates_on_subcategory_id"
end
@ -361,7 +371,6 @@ ActiveRecord::Schema[7.0].define(version: 2022_06_16_220352) do
t.index ["academic_year_id"], name: "index_survey_item_responses_on_academic_year_id"
t.index ["response_id"], name: "index_survey_item_responses_on_response_id"
t.index ["school_id", "academic_year_id"], name: "index_survey_item_responses_on_school_id_and_academic_year_id"
t.index ["school_id"], name: "index_survey_item_responses_on_school_id"
t.index ["survey_item_id"], name: "index_survey_item_responses_on_survey_item_id"
end

View file

@ -7,3 +7,4 @@ seeder.seed_districts_and_schools Rails.root.join('data', 'master_list_of_school
seeder.seed_surveys Rails.root.join('data', 'master_list_of_schools_and_districts.csv')
seeder.seed_respondents Rails.root.join('data', 'master_list_of_schools_and_districts.csv')
seeder.seed_sqm_framework Rails.root.join('data', 'sqm_framework.csv')
seeder.seed_demographics Rails.root.join('data', 'demographics.csv')