Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add feature tag to show the entry to beta data #436

Merged
merged 2 commits into from
Sep 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .env.sample
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
GCS_CREDENTIALS_FILE=
GCS_BUCKET=
MQ_BETA_ENABLED=true
2 changes: 2 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
MQ_BETA_ENABLED: 'true'

name: Tests
on: push
Expand Down Expand Up @@ -58,6 +59,7 @@ jobs:
PGHOST: localhost
PGUSER: ${{ env.POSTGRES_USER }}
PGPASSWORD: ${{ env.POSTGRES_PASSWORD }}
MQ_BETA_ENABLED: ${{ env.MQ_BETA_ENABLED }}
run: yarn test:rails
- name: Upload Code Coverage
uses: actions/upload-artifact@v2
Expand Down
2 changes: 0 additions & 2 deletions app/views/tpi/companies/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
<div class="container is-hidden-touch">
<div class="mq-beta-scores">
<%= render 'tpi/shared/mq_beta_scores' %>
<div class="mq-beta-scores__divider"></div>
<div>
<a href="#management-quality" class="link with-icon is-pulled-left">
<img src="<%= asset_path 'icons/arrow-down.svg'%>" alt="arrow down" />
Expand All @@ -40,7 +39,6 @@
<div class="container is-hidden-desktop">
<div class="mq-beta-scores is-hidden-desktop">
<%= render 'tpi/shared/mq_beta_scores' %>
<div class="mq-beta-scores__divider"></div>
<div>
<a href="#management-quality" class="link with-icon is-pulled-left">
Management Quality
Expand Down
1 change: 0 additions & 1 deletion app/views/tpi/sectors/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
<div class="container">
<div class="mq-beta-scores">
<%= render 'tpi/shared/mq_beta_scores' %>
<div class="mq-beta-scores__divider"></div>
<div>
<a href="#management-quality" class="link with-icon">
<img src="<%= asset_path 'icons/arrow-down.svg'%>" alt="arrow down" class="is-hidden-touch" />
Expand Down
2 changes: 0 additions & 2 deletions app/views/tpi/sectors/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
<div class="container is-hidden-touch">
<div class="mq-beta-scores">
<%= render 'tpi/shared/mq_beta_scores' %>
<div class="mq-beta-scores__divider"></div>
<div>
<a href="#management-quality" class="link with-icon is-pulled-left">
<img src="<%= asset_path 'icons/arrow-down.svg'%>" alt="arrow down" />
Expand All @@ -43,7 +42,6 @@
<div class="container is-hidden-desktop">
<div class="mq-beta-scores">
<%= render 'tpi/shared/mq_beta_scores' %>
<div class="mq-beta-scores__divider"></div>
<div>
<a href="#management-quality" class="link with-icon is-pulled-left">
Management Quality
Expand Down
29 changes: 16 additions & 13 deletions app/views/tpi/shared/_mq_beta_scores.html.erb
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
<div class="mq-beta-scores__container">
<span class="mq-beta-scores__text">MQ Methodology</span>
<%= link_to disable_beta_data_tpi_mq_assessments_path,
class: class_names('button', 'is-primary', 'no-margin', 'weight-normal': session[:enable_beta_mq_assessments], 'with-border': !session[:enable_beta_mq_assessments]),
style: "min-width: 0;" do %>
Current (V4.0)
<% end %>
<%= link_to enable_beta_data_tpi_mq_assessments_path,
class: class_names('button', 'is-primary', 'mq-beta-scores__beta-button', 'with-border': session[:enable_beta_mq_assessments]),
style: "min-width: 0;" do %>
BETA (V5.0)
<% end %>
</div>
<% if ENV['MQ_BETA_ENABLED'].to_s === 'true' %>
<div class="mq-beta-scores__container">
<span class="mq-beta-scores__text">MQ Methodology</span>
<%= link_to disable_beta_data_tpi_mq_assessments_path,
class: class_names('button', 'is-primary', 'no-margin', 'weight-normal': session[:enable_beta_mq_assessments], 'with-border': !session[:enable_beta_mq_assessments]),
style: "min-width: 0;" do %>
Current (V4.0)
<% end %>
<%= link_to enable_beta_data_tpi_mq_assessments_path,
class: class_names('button', 'is-primary', 'mq-beta-scores__beta-button', 'with-border': session[:enable_beta_mq_assessments]),
style: "min-width: 0;" do %>
BETA (V5.0)
<% end %>
</div>
<div class="mq-beta-scores__divider"></div>
<% end %>
Loading