Skip to content

Commit

Permalink
Merge branch 'master' into 137-allow-debugging-in-docker-configuraton
Browse files Browse the repository at this point in the history
  • Loading branch information
WorkSutton authored Jan 8, 2021
2 parents ed2ffda + 726bf68 commit d5eb448
Show file tree
Hide file tree
Showing 15 changed files with 297 additions and 201 deletions.
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ ruby '2.5.8'
gem 'passwordless', '~> 0.9'
gem 'bootsnap', '>= 1.4.2', require: false
gem 'jbuilder', '~> 2.7'
gem 'kaminari'
gem 'kaminari', '>= 1.2.1'
gem 'paper_trail'
gem 'pg', '>= 0.18', '< 2.0'
gem 'puma', '~> 4.1'
gem 'rails', '~> 6.0.2', '>= 6.0.2.2'
gem 'rails', '~> 6.0.3', '>= 6.0.3.4'
gem 'sass-rails', '>= 6'
gem 'turbolinks', '~> 5'
gem 'webpacker', '~> 4.0'
Expand Down
150 changes: 75 additions & 75 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9,63 +9,63 @@ GIT
GEM
remote: https://rubygems.org/
specs:
actioncable (6.0.2.2)
actionpack (= 6.0.2.2)
actioncable (6.0.3.4)
actionpack (= 6.0.3.4)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailbox (6.0.2.2)
actionpack (= 6.0.2.2)
activejob (= 6.0.2.2)
activerecord (= 6.0.2.2)
activestorage (= 6.0.2.2)
activesupport (= 6.0.2.2)
actionmailbox (6.0.3.4)
actionpack (= 6.0.3.4)
activejob (= 6.0.3.4)
activerecord (= 6.0.3.4)
activestorage (= 6.0.3.4)
activesupport (= 6.0.3.4)
mail (>= 2.7.1)
actionmailer (6.0.2.2)
actionpack (= 6.0.2.2)
actionview (= 6.0.2.2)
activejob (= 6.0.2.2)
actionmailer (6.0.3.4)
actionpack (= 6.0.3.4)
actionview (= 6.0.3.4)
activejob (= 6.0.3.4)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (6.0.2.2)
actionview (= 6.0.2.2)
activesupport (= 6.0.2.2)
actionpack (6.0.3.4)
actionview (= 6.0.3.4)
activesupport (= 6.0.3.4)
rack (~> 2.0, >= 2.0.8)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
actiontext (6.0.2.2)
actionpack (= 6.0.2.2)
activerecord (= 6.0.2.2)
activestorage (= 6.0.2.2)
activesupport (= 6.0.2.2)
actiontext (6.0.3.4)
actionpack (= 6.0.3.4)
activerecord (= 6.0.3.4)
activestorage (= 6.0.3.4)
activesupport (= 6.0.3.4)
nokogiri (>= 1.8.5)
actionview (6.0.2.2)
activesupport (= 6.0.2.2)
actionview (6.0.3.4)
activesupport (= 6.0.3.4)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.1, >= 1.2.0)
activejob (6.0.2.2)
activesupport (= 6.0.2.2)
activejob (6.0.3.4)
activesupport (= 6.0.3.4)
globalid (>= 0.3.6)
activemodel (6.0.2.2)
activesupport (= 6.0.2.2)
activerecord (6.0.2.2)
activemodel (= 6.0.2.2)
activesupport (= 6.0.2.2)
activemodel (6.0.3.4)
activesupport (= 6.0.3.4)
activerecord (6.0.3.4)
activemodel (= 6.0.3.4)
activesupport (= 6.0.3.4)
activerecord-import (1.0.5)
activerecord (>= 3.2)
activestorage (6.0.2.2)
actionpack (= 6.0.2.2)
activejob (= 6.0.2.2)
activerecord (= 6.0.2.2)
activestorage (6.0.3.4)
actionpack (= 6.0.3.4)
activejob (= 6.0.3.4)
activerecord (= 6.0.3.4)
marcel (~> 0.3.1)
activesupport (6.0.2.2)
activesupport (6.0.3.4)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
zeitwerk (~> 2.2)
zeitwerk (~> 2.2, >= 2.2.2)
addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0)
ast (2.4.0)
Expand All @@ -87,7 +87,7 @@ GEM
xpath (~> 3.2)
childprocess (3.0.0)
coderay (1.1.2)
concurrent-ruby (1.1.6)
concurrent-ruby (1.1.7)
crass (1.0.6)
csv (1.0.0)
cucumber (3.1.2)
Expand Down Expand Up @@ -117,7 +117,7 @@ GEM
em-websocket (0.5.2)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0.6.0)
erubi (1.9.0)
erubi (1.10.0)
eventmachine (1.2.7)
factory_bot (5.1.2)
activesupport (>= 4.2.0)
Expand Down Expand Up @@ -151,7 +151,7 @@ GEM
guard-compat (~> 1.0)
multi_json (~> 1.8)
http_parser.rb (0.6.0)
i18n (1.8.2)
i18n (1.8.5)
concurrent-ruby (~> 1.0)
jaro_winkler (1.5.4)
jbuilder (2.10.0)
Expand All @@ -161,23 +161,23 @@ GEM
activesupport (>= 5.0)
pg (>= 0.18.1)
jwt (2.2.1)
kaminari (1.2.0)
kaminari (1.2.1)
activesupport (>= 4.1.0)
kaminari-actionview (= 1.2.0)
kaminari-activerecord (= 1.2.0)
kaminari-core (= 1.2.0)
kaminari-actionview (1.2.0)
kaminari-actionview (= 1.2.1)
kaminari-activerecord (= 1.2.1)
kaminari-core (= 1.2.1)
kaminari-actionview (1.2.1)
actionview
kaminari-core (= 1.2.0)
kaminari-activerecord (1.2.0)
kaminari-core (= 1.2.1)
kaminari-activerecord (1.2.1)
activerecord
kaminari-core (= 1.2.0)
kaminari-core (1.2.0)
kaminari-core (= 1.2.1)
kaminari-core (1.2.1)
listen (3.1.5)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
ruby_dep (~> 1.2)
loofah (2.4.0)
loofah (2.8.0)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
lumberjack (1.2.8)
Expand All @@ -189,16 +189,16 @@ GEM
mime-types (3.3.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2019.1009)
mimemagic (0.3.4)
mimemagic (0.3.5)
mini_mime (1.0.2)
mini_portile2 (2.4.0)
minitest (5.14.0)
minitest (5.14.2)
msgpack (1.3.3)
multi_json (1.14.1)
multi_test (0.1.2)
nenv (0.3.0)
nio4r (2.5.4)
nokogiri (1.10.9)
nokogiri (1.10.10)
mini_portile2 (~> 2.4.0)
notiffany (0.1.3)
nenv (~> 0.1)
Expand Down Expand Up @@ -240,20 +240,20 @@ GEM
rack
rack-test (1.1.0)
rack (>= 1.0, < 3)
rails (6.0.2.2)
actioncable (= 6.0.2.2)
actionmailbox (= 6.0.2.2)
actionmailer (= 6.0.2.2)
actionpack (= 6.0.2.2)
actiontext (= 6.0.2.2)
actionview (= 6.0.2.2)
activejob (= 6.0.2.2)
activemodel (= 6.0.2.2)
activerecord (= 6.0.2.2)
activestorage (= 6.0.2.2)
activesupport (= 6.0.2.2)
rails (6.0.3.4)
actioncable (= 6.0.3.4)
actionmailbox (= 6.0.3.4)
actionmailer (= 6.0.3.4)
actionpack (= 6.0.3.4)
actiontext (= 6.0.3.4)
actionview (= 6.0.3.4)
activejob (= 6.0.3.4)
activemodel (= 6.0.3.4)
activerecord (= 6.0.3.4)
activestorage (= 6.0.3.4)
activesupport (= 6.0.3.4)
bundler (>= 1.3.0)
railties (= 6.0.2.2)
railties (= 6.0.3.4)
sprockets-rails (>= 2.0.0)
rails-controller-testing (1.0.4)
actionpack (>= 5.0.1.x)
Expand All @@ -264,9 +264,9 @@ GEM
nokogiri (>= 1.6)
rails-html-sanitizer (1.3.0)
loofah (~> 2.3)
railties (6.0.2.2)
actionpack (= 6.0.2.2)
activesupport (= 6.0.2.2)
railties (6.0.3.4)
actionpack (= 6.0.3.4)
activesupport (= 6.0.3.4)
method_source
rake (>= 0.8.7)
thor (>= 0.20.3, < 2.0)
Expand Down Expand Up @@ -334,10 +334,10 @@ GEM
spring-watcher-listen (2.0.1)
listen (>= 2.7, < 4.0)
spring (>= 1.2, < 3.0)
sprockets (4.0.0)
sprockets (4.0.2)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-rails (3.2.1)
sprockets-rails (3.2.2)
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets (>= 3.0.0)
Expand All @@ -350,7 +350,7 @@ GEM
turbolinks (5.2.1)
turbolinks-source (~> 5.2)
turbolinks-source (5.2.0)
tzinfo (1.2.6)
tzinfo (1.2.9)
thread_safe (~> 0.1)
unicode-display_width (1.7.0)
validates_timeliness (4.1.1)
Expand All @@ -368,12 +368,12 @@ GEM
activesupport (>= 4.2)
rack-proxy (>= 0.6.1)
railties (>= 4.2)
websocket-driver (0.7.1)
websocket-driver (0.7.3)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.4)
websocket-extensions (0.1.5)
xpath (3.2.0)
nokogiri (~> 1.8)
zeitwerk (2.3.0)
zeitwerk (2.4.2)

PLATFORMS
ruby
Expand All @@ -396,7 +396,7 @@ DEPENDENCIES
guard-livereload (~> 2.5.2)
jbuilder (~> 2.7)
jsonb_accessor (~> 1.0.0)
kaminari
kaminari (>= 1.2.1)
listen (>= 3.0.5, < 3.2)
paper_trail
paranoia (~> 2.2)
Expand All @@ -408,7 +408,7 @@ DEPENDENCIES
puma (~> 4.1)
pundit (~> 2.1.0)
rack-livereload
rails (~> 6.0.2, >= 6.0.2.2)
rails (~> 6.0.3, >= 6.0.3.4)
rails-controller-testing
roo (~> 2.8)
rspec-rails (~> 4.0.0)
Expand Down
14 changes: 12 additions & 2 deletions app/assets/stylesheets/_layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@ body{
min-height: 100vh;
}

.environment-banner {
width: 100%;
background: $yellow-lighter;
color: $text;
margin-bottom: 10px;
padding: 15px 0;
text-align: center;
font-size: 1.17rem;
}

.content-pane{
background: $pale;
flex: 1;
Expand Down Expand Up @@ -109,7 +119,7 @@ body{
}
}

.vulnerable-banner, .no-call-banner, .deceased-banner{
.vulnerable-banner, .no-call-banner, .deceased-banner {
padding: 25px;
background: $red;
color: $white;
Expand All @@ -118,7 +128,7 @@ body{
justify-content: flex-start;
align-items: center;
font-size: 1.2rem;
.vulnerable-banner__icon, .no-call-banner__icon, .deceased-banner__icon{
.vulnerable-banner__icon, .no-call-banner__icon, .deceased-banner__icon {
margin-right: 15px;
}
}
Expand Down
1 change: 1 addition & 0 deletions app/assets/stylesheets/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ $blue-hover: #e8f1fe;

$green: #22C99B;
$yellow: #F7C745;
$yellow-lighter: #F4E781;
$red: #E1655B;

// breakpoints
Expand Down
8 changes: 7 additions & 1 deletion app/assets/stylesheets/contacts.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@import "variables";

.assessment-operations {
flex: 1;
margin-bottom: 15px;
Expand All @@ -19,4 +21,8 @@
@media all and (-ms-high-contrast:none)
{
*::-ms-backdrop, .lead-service-dropdown-container { margin-left: 95px !important; } /* IE11 */
}
}

.under-18 {
color: $red;
}
7 changes: 7 additions & 0 deletions app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,11 @@ def sort_icon(field)
def sort_direction(_field)
(SORT_DIRECTIONS - [params[:order_dir]]).first
end

def environment_from_hostname
return 'staging' if ENV['HOSTNAME']&.include?('staging')
return 'test' if ENV['HOSTNAME']&.include?('test') # This refers to another staging environment, not an automanted test environment
return 'development' if ENV['HOSTNAME']&.include?('localhost')
return 'production' if ENV['HOSTNAME']&.include?('production')
end
end
6 changes: 6 additions & 0 deletions app/models/contact.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,10 @@ def support_actions_names
def assigned_to
role.id.to_s if role
end

def under_18?
return false if date_of_birth.blank?

((Time.zone.now.beginning_of_day - date_of_birth.to_time) / 1.year.seconds).floor < 18
end
end
Loading

0 comments on commit d5eb448

Please sign in to comment.