-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature/mq scores - DONT MERGE (#431)
* feat: Adding Beta scores to methodology version of 5 * feat: Enable to switch between MQ Beta scores and not * test: Fix of all broken tests * test: New tests for MQ Beta score feature * Add modal for mq methodology * fix: Api::Charts::Sector service takes enable_beta_mq_assessments from session * Show level 5 on accordion and change 5 to 5 beta labels * Render modal only once. Fix mobile styles * Fix X button and add do not show again button * Fix tests * Render modal in sectors and companies * Fix max level * Add local storage variable to limit modal appearances --------- Co-authored-by: martintomas <[email protected]>
- Loading branch information
1 parent
bb7f3ef
commit b877d51
Showing
59 changed files
with
1,646 additions
and
153 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
.mq-beta-scores { | ||
display: flex; | ||
flex-wrap: wrap; | ||
flex-direction: row; | ||
|
||
@include until($desktop) { | ||
flex-direction: column; | ||
} | ||
|
||
&__text { | ||
color: white; | ||
line-height: 40px; | ||
margin-right: 10px; | ||
} | ||
|
||
&__divider { | ||
margin: 0 15px 0 5px; | ||
border-right: 1px solid rgba(255, 255, 255, 0.5); | ||
|
||
@include until($desktop) { | ||
display: none; | ||
} | ||
} | ||
|
||
&__beta-button:before { | ||
content: ""; | ||
width: 8px; | ||
height: 8px; | ||
border-radius: 50%; | ||
margin-right: 5px; | ||
display: inline-block; | ||
background-color: $tpi-level5-background-color; | ||
vertical-align: middle; | ||
} | ||
|
||
&__download-button { | ||
flex-grow: 4; | ||
text-align: right; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
@import 'colors'; | ||
|
||
.modal-overlay { | ||
z-index: 999; | ||
position: fixed; | ||
top: 0; | ||
right: 0; | ||
bottom: 0; | ||
left: 0; | ||
background-color: rgba($dark, 0.5); | ||
} | ||
|
||
.modal-content { | ||
background-color: $white; | ||
position: absolute; | ||
top: 50%; | ||
left: 4px; | ||
right: 4px; | ||
transform: translateY(-50%); | ||
outline: none; | ||
display: flex; | ||
flex-direction: column; | ||
flex-grow: 1; | ||
padding: 40px 32px; | ||
margin: 0; | ||
|
||
@media (min-width: 640px) { | ||
left: 50%; | ||
transform: translate(-50%, -50%); | ||
width: 80%; // sm:w-4/5 | ||
} | ||
|
||
@media (min-width: 768px) { | ||
width: 66.66667%; // md:w-2/3 | ||
} | ||
|
||
@media (min-width: 1280px) { | ||
width: 45%; // xl:w-2/5 | ||
} | ||
|
||
.modal-title { | ||
margin-bottom: 20px; | ||
color: $dark; | ||
font-size: $size-5; | ||
font-weight: bold; | ||
} | ||
|
||
.content { | ||
line-height: 140%; /* 22.4px */ | ||
margin-bottom: 20px; | ||
} | ||
|
||
.close-btn { | ||
cursor: pointer; | ||
background-color: transparent; | ||
border: none; | ||
position: absolute; | ||
top: 27px; | ||
right: 21px; | ||
|
||
.icon__close { | ||
background-image: image-url('cclow/icons/close.svg'); | ||
background-position: center; | ||
background-repeat: no-repeat; | ||
height: 18px; | ||
width: 18px; | ||
} | ||
} | ||
|
||
.actions { | ||
display: flex; | ||
} | ||
|
||
.margin-left { | ||
margin-left: 8px; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,17 @@ | ||
module TPI | ||
class MQAssessmentsController < TPIController | ||
def show; end | ||
|
||
def enable_beta_data | ||
session[:enable_beta_mq_assessments] = true | ||
|
||
redirect_back fallback_location: tpi_root_url | ||
end | ||
|
||
def disable_beta_data | ||
session[:enable_beta_mq_assessments] = false | ||
|
||
redirect_back fallback_location: tpi_root_url | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.