diff --git a/Gemfile.lock b/Gemfile.lock index 382be5d..7be1fea 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -60,7 +60,7 @@ GEM erubi (>= 1.0.0) rack (>= 0.9.0) bindex (0.8.1) - binding_of_caller (0.8.0) + binding_of_caller (1.0.0) debug_inspector (>= 0.0.1) bootsnap (1.5.1) msgpack (~> 1.0) @@ -86,21 +86,23 @@ GEM coffee-script-source execjs coffee-script-source (1.12.2) - concurrent-ruby (1.1.7) + concurrent-ruby (1.1.8) connection_pool (2.2.3) crass (1.0.6) - debug_inspector (0.0.3) + debug_inspector (1.0.0) erubi (1.10.0) execjs (2.7.0) - faraday (1.1.0) + faraday (1.3.0) + faraday-net_http (~> 1.0) multipart-post (>= 1.2, < 3) ruby2_keywords - ffi (1.13.1) + faraday-net_http (1.0.1) + ffi (1.14.2) figaro (1.2.0) thor (>= 0.14.0, < 2) globalid (0.4.2) activesupport (>= 4.2.0) - i18n (1.8.5) + i18n (1.8.7) concurrent-ruby (~> 1.0) io-like (0.3.1) jbuilder (2.10.1) @@ -109,7 +111,7 @@ GEM rb-fsevent (~> 0.9, >= 0.9.4) rb-inotify (~> 0.9, >= 0.9.7) ruby_dep (~> 1.2) - loofah (2.8.0) + loofah (2.9.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) mail (2.7.1) @@ -119,13 +121,14 @@ GEM method_source (1.0.0) mimemagic (0.3.5) mini_mime (1.0.2) - mini_portile2 (2.4.0) - minitest (5.14.2) + mini_portile2 (2.5.0) + minitest (5.14.3) msgpack (1.3.3) multipart-post (2.1.1) nio4r (2.5.4) - nokogiri (1.10.10) - mini_portile2 (~> 2.4.0) + nokogiri (1.11.1) + mini_portile2 (~> 2.5.0) + racc (~> 1.4) pg (1.2.3) pry (0.13.1) coderay (~> 1.1) @@ -134,6 +137,7 @@ GEM pry (>= 0.10.4) public_suffix (4.0.6) puma (3.12.6) + racc (1.5.2) rack (2.2.3) rack-test (1.1.0) rack (>= 1.0, < 3) @@ -161,7 +165,7 @@ GEM method_source rake (>= 0.8.7) thor (>= 0.19.0, < 2.0) - rake (13.0.1) + rake (13.0.3) rb-fsevent (0.10.4) rb-inotify (0.10.1) ffi (~> 1.0) @@ -172,9 +176,9 @@ GEM railties (>= 3.2) tilt regexp_parser (1.8.2) - ruby2_keywords (0.0.2) + ruby2_keywords (0.0.4) ruby_dep (1.5.0) - ruby_http_client (3.5.1) + ruby_http_client (3.5.2) rubyzip (2.3.0) sass (3.7.4) sass-listen (~> 4.0.0) @@ -190,7 +194,7 @@ GEM selenium-webdriver (3.142.7) childprocess (>= 0.5, < 4.0) rubyzip (>= 1.2.2) - sendgrid-ruby (6.3.7) + sendgrid-ruby (6.3.8) ruby_http_client (~> 3.4) spring (2.1.1) spring-watcher-listen (2.0.1) @@ -209,7 +213,7 @@ GEM turbolinks (5.2.1) turbolinks-source (~> 5.2) turbolinks-source (5.2.0) - tzinfo (1.2.8) + tzinfo (1.2.9) thread_safe (~> 0.1) uglifier (4.2.0) execjs (>= 0.3.0, < 3) @@ -226,7 +230,6 @@ GEM PLATFORMS ruby - x86_64-linux DEPENDENCIES annotate @@ -261,4 +264,4 @@ RUBY VERSION ruby 2.5.1p57 BUNDLED WITH - 2.2.0 + 2.1.4 diff --git a/app/assets/javascripts/bundle.js.LICENSE.txt b/app/assets/javascripts/bundle.js.LICENSE.txt index 434fc71..a4a2b7b 100644 --- a/app/assets/javascripts/bundle.js.LICENSE.txt +++ b/app/assets/javascripts/bundle.js.LICENSE.txt @@ -4,6 +4,13 @@ object-assign @license MIT */ +/*! + * Chart.js v2.9.4 + * https://www.chartjs.org + * (c) 2020 Chart.js Contributors + * Released under the MIT License + */ + /*! * Sizzle CSS Selector Engine v2.3.5 * https://sizzlejs.com/ @@ -72,3 +79,7 @@ object-assign * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ + +//! moment.js + +//! moment.js locale configuration diff --git a/app/assets/stylesheets/nav.scss b/app/assets/stylesheets/nav.scss index 425de54..55c794e 100644 --- a/app/assets/stylesheets/nav.scss +++ b/app/assets/stylesheets/nav.scss @@ -53,7 +53,7 @@ transition: all 0.3s ease-in-out; } -.navlinks:hover:before{ +.navlinks:hover:before, .navlinks.selected:before{ visibility: visible; transform: scaleX(1); } diff --git a/app/assets/stylesheets/splash.scss b/app/assets/stylesheets/splash.scss index 52a32b9..a2885bb 100644 --- a/app/assets/stylesheets/splash.scss +++ b/app/assets/stylesheets/splash.scss @@ -187,6 +187,10 @@ html, body, body > div, .splashbg { z-index: 4; padding-bottom: 200px; background: #f7f7f7; + + .MuiPaper-root{ + margin-top: 3%; + } &-contents { margin-top: -10%; diff --git a/frontend/components/chart/chart.jsx b/frontend/components/chart/chart.jsx index f3db537..71beb4f 100644 --- a/frontend/components/chart/chart.jsx +++ b/frontend/components/chart/chart.jsx @@ -35,11 +35,12 @@ export default function Graphs ({review, avgWage, avgSalary, displayedReviews}){ return (sumWages/wages.length).toFixed(2) } + function locationComp(){ let storage = []; let i = 0 while(i < displayedReviews.length) { - if(review.location === displayedReviews[i].location && displayedReviews[i].payFrequency === "Hourly" && !(displayedReviews[i].position.includes("Manager"))) { + if(review.location === displayedReviews[i].location && displayedReviews[i].payFrequency === 'Hourly') { storage.push(displayedReviews[i].wage) } i++ @@ -47,15 +48,21 @@ export default function Graphs ({review, avgWage, avgSalary, displayedReviews}){ return median(storage) } + function random_rgba() { + var o = Math.round, r = Math.random, s = 230; + return 'rgba(' + o(r()*s) + ',' + o(r()*s) + ',' + o(r()*s) + ',' + 1.0 + ')'; +} + const chart = () => { + debugger setChartData({ - labels: ['Current Wage', review.shopName + ' Avg Wage', 'City Wide Median Wage'], + labels: ['Current Wage', review.shopName + ' Avg Wage', review.location + ' Median Wage', 'National Average Wage'], title: 'review.shopName', datasets: [ { label: review.shopName, - data: [[0,review.wage], [0, shopComp()],[0,locationComp()]], + data: [[0,review.wage], [0, shopComp()],[0,locationComp()], [0, avgWage.toFixed(2)]], options: { title: { display: true, @@ -63,11 +70,13 @@ export default function Graphs ({review, avgWage, avgSalary, displayedReviews}){ } }, backgroundColor: [ - 'rgba(255, 99, 132, 0.2)', - 'yellow', - 'red' + random_rgba(), + random_rgba(), + random_rgba(), + random_rgba() ], - borderWidth: 4 + borderWidth: 4, + } ] }) @@ -82,6 +91,7 @@ export default function Graphs ({review, avgWage, avgSalary, displayedReviews}){ }, []); return( +