mirror of
https://github.com/edcommonwealth/sqm-dashboards.git
synced 2026-03-07 21:48:16 -08:00
Rename 'Dashboard' to overview in page text and also modify 'dashboard' routes to be 'overview'. Finishes #180076071
This commit is contained in:
parent
2753888f11
commit
f553c3c11c
19 changed files with 34 additions and 34 deletions
|
|
@ -3,7 +3,7 @@
|
|||
@import "colors";
|
||||
@import "fonts";
|
||||
@import "borders";
|
||||
@import "dashboard";
|
||||
@import "overview";
|
||||
@import "navigation";
|
||||
@import "buttons";
|
||||
@import "@fortawesome/fontawesome-free/scss/fontawesome";
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
class DashboardController < SqmApplicationController
|
||||
class OverviewController < SqmApplicationController
|
||||
|
||||
def index
|
||||
@variance_chart_row_presenters = Measure.all.map(&method(:presenter_for_measure))
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
module HeaderHelper
|
||||
|
||||
def link_to_dashboard(district:, school:, academic_year:)
|
||||
"/districts/#{district.slug}/schools/#{school.slug}/dashboard?year=#{academic_year.range}"
|
||||
def link_to_overview(district:, school:, academic_year:)
|
||||
"/districts/#{district.slug}/schools/#{school.slug}/overview?year=#{academic_year.range}"
|
||||
end
|
||||
|
||||
def link_to_browse(district:, school:, academic_year:)
|
||||
|
|
@ -9,18 +9,18 @@ module HeaderHelper
|
|||
end
|
||||
|
||||
def district_url_for(district:, academic_year:)
|
||||
dashboard_link(district_slug: district.slug, school_slug: district.schools.alphabetic.first.slug, academic_year_range: academic_year.range, uri_path: request.fullpath)
|
||||
overview_link(district_slug: district.slug, school_slug: district.schools.alphabetic.first.slug, academic_year_range: academic_year.range, uri_path: request.fullpath)
|
||||
end
|
||||
|
||||
def school_url_for(school:, academic_year:)
|
||||
dashboard_link(district_slug: school.district.slug, school_slug: school.slug, academic_year_range: academic_year.range, uri_path: request.fullpath)
|
||||
overview_link(district_slug: school.district.slug, school_slug: school.slug, academic_year_range: academic_year.range, uri_path: request.fullpath)
|
||||
end
|
||||
|
||||
def school_mapper(school)
|
||||
{
|
||||
name: school.name,
|
||||
district_id: school.district_id,
|
||||
url: district_school_dashboard_index_path(school.district, school, {year: AcademicYear.first.range})
|
||||
url: district_school_overview_index_path(school.district, school, {year: AcademicYear.first.range})
|
||||
}
|
||||
end
|
||||
|
||||
|
|
@ -30,9 +30,9 @@ module HeaderHelper
|
|||
|
||||
private
|
||||
|
||||
def dashboard_link(district_slug:, school_slug:, academic_year_range:, uri_path:)
|
||||
if uri_path.include?("dashboard")
|
||||
return "/districts/#{district_slug}/schools/#{school_slug}/dashboard?year=#{academic_year_range}"
|
||||
def overview_link(district_slug:, school_slug:, academic_year_range:, uri_path:)
|
||||
if uri_path.include?("overview")
|
||||
return "/districts/#{district_slug}/schools/#{school_slug}/overview?year=#{academic_year_range}"
|
||||
end
|
||||
"/districts/#{district_slug}/schools/#{school_slug}/browse/teachers-and-leadership?year=#{academic_year_range}"
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
module DashboardHelper
|
||||
module OverviewHelper
|
||||
def format_academic_year(ay)
|
||||
years = ay.range.split('-')
|
||||
"#{years.first} – 20#{years.second}"
|
||||
|
|
@ -7,7 +7,7 @@ import * as ActiveStorage from "@rails/activestorage"
|
|||
Rails.start()
|
||||
Turbolinks.start()
|
||||
ActiveStorage.start()
|
||||
import { initializeListenersForNavDropdowns, initializePopovers } from "./dashboard"
|
||||
import { initializeListenersForNavDropdowns, initializePopovers } from "./overview"
|
||||
import { initializeListenersForHomeDropdowns } from "./home"
|
||||
import { showEmptyDatasetModal } from "./modal"
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
<div class="row py-4 justify-content-between align-items-center">
|
||||
<div class="col d-flex justify-content-start align-items-center">
|
||||
<%= link_to image_tag('sqm_logo.png', alt: 'MCIEA School Quality Measures Dashboard', class: 'height-56'), welcome_path, class: 'me-7' %>
|
||||
<a class="sub-header-3 link me-4 <%= link_weight(path: 'dashboard') %>" href="<%= link_to_dashboard(district: @district, school: @school, academic_year: @academic_year) %>">Dashboard</a>
|
||||
<a class="sub-header-3 link me-4 <%= link_weight(path: 'overview') %>" href="<%= link_to_overview(district: @district, school: @school, academic_year: @academic_year) %>">Overview</a>
|
||||
<a class="sub-header-3 link <%= link_weight(path: 'browse') %>" href="<%= link_to_browse(district: @district, school: @school, academic_year: @academic_year) %>">Browse</a>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ Rails.application.routes.draw do
|
|||
|
||||
resources :districts do
|
||||
resources :schools, only: [:index, :show] do
|
||||
resources :dashboard, only: [:index]
|
||||
resources :overview, only: [:index]
|
||||
resources :categories, only: [:show], path: 'browse'
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
require 'rails_helper'
|
||||
|
||||
describe DashboardController, type: :controller do
|
||||
describe OverviewController, type: :controller do
|
||||
include BasicAuthHelper
|
||||
let(:school) { create(:school) }
|
||||
let(:district) { create(:district) }
|
||||
|
|
@ -10,7 +10,7 @@ describe 'authentication' do
|
|||
page.driver.browser.basic_authorize('wrong username', 'wrong password')
|
||||
end
|
||||
it 'does not show any information' do
|
||||
visit dashboard_path
|
||||
visit overview_path
|
||||
|
||||
expect(page).not_to have_text(school.name)
|
||||
end
|
||||
|
|
@ -21,7 +21,7 @@ describe 'authentication' do
|
|||
page.driver.browser.basic_authorize(username, password)
|
||||
end
|
||||
it 'does show information' do
|
||||
visit dashboard_path
|
||||
visit overview_path
|
||||
|
||||
expect(page).to have_text(school.name)
|
||||
end
|
||||
|
|
@ -37,7 +37,7 @@ describe 'authentication' do
|
|||
"#{username}!"
|
||||
end
|
||||
|
||||
def dashboard_path
|
||||
district_school_dashboard_index_path(district, school, year: academic_year.range)
|
||||
def overview_path
|
||||
district_school_overview_index_path(district, school, year: academic_year.range)
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -65,15 +65,15 @@ describe 'District Admin', js: true do
|
|||
|
||||
visit '/welcome'
|
||||
expect(page).to have_text("Teachers & Leadership")
|
||||
go_to_school_dashboard_from_welcome_page(district, school)
|
||||
go_to_school_overview_from_welcome_page(district, school)
|
||||
|
||||
district_admin_sees_dashboard_content
|
||||
district_admin_sees_overview_content
|
||||
|
||||
click_on 'Teachers & Leadership'
|
||||
district_admin_sees_browse_content
|
||||
|
||||
click_on 'Dashboard'
|
||||
district_admin_sees_dashboard_content
|
||||
click_on 'Overview'
|
||||
district_admin_sees_overview_content
|
||||
|
||||
click_on 'Browse'
|
||||
district_admin_sees_browse_content
|
||||
|
|
@ -106,7 +106,7 @@ def district_admin_sees_problem_solving_emphasis
|
|||
expect(page).to have_css("[data-for-measure-id='4C-i'][width='60.0%'][x='0.0%']")
|
||||
end
|
||||
|
||||
def go_to_school_dashboard_from_welcome_page(district, school)
|
||||
def go_to_school_overview_from_welcome_page(district, school)
|
||||
select district.name, from: 'district-dropdown'
|
||||
select school.name, from: 'school-dropdown'
|
||||
click_on 'Go'
|
||||
|
|
@ -125,8 +125,8 @@ def go_to_browse_page_for_school_without_data(school)
|
|||
select school.name, from: 'select-school'
|
||||
end
|
||||
|
||||
def go_to_dashboard_page_for_school_without_data(school)
|
||||
click_on 'Dashboard'
|
||||
def go_to_overview_page_for_school_without_data(school)
|
||||
click_on 'Overview'
|
||||
select school.name, from: 'select-school'
|
||||
end
|
||||
|
||||
|
|
@ -140,7 +140,7 @@ def district_admin_sees_district_change
|
|||
expect(page).to have_current_path(expected_path)
|
||||
end
|
||||
|
||||
def district_admin_sees_dashboard_content
|
||||
def district_admin_sees_overview_content
|
||||
expect(page).to have_select('academic-year', selected: '2020 – 2021')
|
||||
expect(page).to have_select('district', selected: 'Winchester')
|
||||
expect(page).to have_select('school', selected: 'Winchester High School')
|
||||
|
|
|
|||
|
|
@ -13,8 +13,8 @@ describe 'SQM Application' do
|
|||
end
|
||||
|
||||
context 'when no measures meet their threshold' do
|
||||
it 'shows a modal on dashboard page' do
|
||||
visit dashboard_path
|
||||
it 'shows a modal on overview page' do
|
||||
visit overview_path
|
||||
expect(page).to have_css '.modal'
|
||||
end
|
||||
|
||||
|
|
@ -32,7 +32,7 @@ describe 'SQM Application' do
|
|||
end
|
||||
|
||||
it 'does not show a modal on any page' do
|
||||
[dashboard_path, browse_path].each do |path|
|
||||
[overview_path, browse_path].each do |path|
|
||||
visit path
|
||||
expect(page).not_to have_css '.modal'
|
||||
end
|
||||
|
|
@ -49,8 +49,8 @@ describe 'SQM Application' do
|
|||
"#{username}!"
|
||||
end
|
||||
|
||||
def dashboard_path
|
||||
district_school_dashboard_index_path(district, school, year: academic_year.range)
|
||||
def overview_path
|
||||
district_school_overview_index_path(district, school, year: academic_year.range)
|
||||
end
|
||||
|
||||
def browse_path
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
require 'rails_helper'
|
||||
|
||||
describe 'dashboard/index.html.erb' do
|
||||
describe 'overview/index.html.erb' do
|
||||
subject { Nokogiri::HTML(rendered) }
|
||||
|
||||
let(:support_for_teaching) { create(:measure, name: 'Support For Teaching Development & Growth') }
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
require 'rails_helper'
|
||||
|
||||
describe 'dashboard/_variance_chart.html.erb' do
|
||||
describe 'overview/_variance_chart.html.erb' do
|
||||
subject { Nokogiri::HTML(rendered) }
|
||||
|
||||
let(:higher_scoring_measure) { create(:measure) }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue