diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css index ddc43d5..980cbce 100644 --- a/app/assets/stylesheets/application.css +++ b/app/assets/stylesheets/application.css @@ -1496,6 +1496,11 @@ div[style*="color: red"], text-align: left; } +.dashboard-community-pulse-anchor { + margin-top: 2rem; + margin-bottom: 2rem; +} + .community-pulse-panel { border: 1px solid var(--border-color); border-radius: 0.75rem; @@ -1543,17 +1548,19 @@ div[style*="color: red"], .community-pulse-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); - gap: 0.45rem; + gap: 0.4rem; } .community-pulse-option { border: 1px solid var(--border-color); - border-radius: 0.55rem; + border-radius: 0.48rem; background: var(--bg-secondary); color: var(--text-primary); - padding: 0.55rem 0.65rem; + padding: 0.48rem 0.57rem; font-size: 0.82rem; font-weight: 600; + width: 100%; + text-align: center; cursor: pointer; transition: background-color 0.15s ease, transform 0.15s ease; } @@ -1681,6 +1688,7 @@ div[style*="color: red"], .community-pulse-options { grid-template-columns: 1fr; + gap: 0.32rem; } .community-pulse-bar-row { diff --git a/app/controllers/community_pulse_votes_controller.rb b/app/controllers/community_pulse_votes_controller.rb index 8aa4754..9bef8a9 100644 --- a/app/controllers/community_pulse_votes_controller.rb +++ b/app/controllers/community_pulse_votes_controller.rb @@ -53,7 +53,7 @@ def create format.html do flash[:alert] = error_message if error_message.present? - redirect_to new_user_session_path(anchor: "community-pulse") + redirect_to dashboard_path(anchor: "community-pulse") end end end diff --git a/app/controllers/companies_controller.rb b/app/controllers/companies_controller.rb index 62df103..6808a0b 100644 --- a/app/controllers/companies_controller.rb +++ b/app/controllers/companies_controller.rb @@ -3,7 +3,7 @@ class CompaniesController < ApplicationController # GET /companies or /companies.json def index - @companies = current_or_demo_user.companies.includes(:opportunities) + @companies = current_or_demo_user.companies @technologies = Technology.order(:name) # Filter by company name search @@ -22,9 +22,6 @@ def index @selected_technology = params[:technology] end - # Always include technologies for display - @companies = @companies.includes(opportunities: :technologies) - # Skip sorting for tech_stack since it's aggregated data, but allow other columns if params[:sort].present? && params[:sort] != "tech_stack" direction = params[:direction] == "desc" ? "desc" : "asc" diff --git a/app/controllers/dashboard_controller.rb b/app/controllers/dashboard_controller.rb index 0cbc398..8976f09 100644 --- a/app/controllers/dashboard_controller.rb +++ b/app/controllers/dashboard_controller.rb @@ -12,6 +12,14 @@ def index 0.0 end + pulse_vote_cookie = cookies.encrypted[:community_pulse_daily_votes] + pulse_daily_count = if pulse_vote_cookie.is_a?(Hash) && (pulse_vote_cookie["date"] || pulse_vote_cookie[:date]) == Date.current.iso8601 + (pulse_vote_cookie["count"] || pulse_vote_cookie[:count]).to_i + else + 0 + end + @pulse_votes_remaining = [ CommunityPulseVotesController::DAILY_LIMIT_MAX - pulse_daily_count, 0 ].max + # Role-based focus insights focus_analyzer = RoleFocusAnalyzer.new(opportunities) @focus_insights = focus_analyzer.generate_insights(limit: 4) diff --git a/app/controllers/opportunities_controller.rb b/app/controllers/opportunities_controller.rb index 898608c..77a9a06 100644 --- a/app/controllers/opportunities_controller.rb +++ b/app/controllers/opportunities_controller.rb @@ -3,7 +3,7 @@ class OpportunitiesController < ApplicationController # GET /opportunities or /opportunities.json def index - @opportunities = current_or_demo_user.opportunities.includes(:company, :technologies) + @opportunities = current_or_demo_user.opportunities.includes(:company, :technologies, :rich_text_other_tech_stack) if params[:company_query].present? company_query = "%#{params[:company_query].strip}%" diff --git a/app/views/dashboard/index.html.erb b/app/views/dashboard/index.html.erb index 8b2b073..39d96f3 100644 --- a/app/views/dashboard/index.html.erb +++ b/app/views/dashboard/index.html.erb @@ -180,3 +180,10 @@ <% end %> + +
Browse in read-only demo mode
- - <% pulse_vote_cookie = cookies.encrypted[:community_pulse_daily_votes] %> - <% pulse_daily_count = if pulse_vote_cookie.is_a?(Hash) && (pulse_vote_cookie["date"] || pulse_vote_cookie[:date]) == Date.current.iso8601 - (pulse_vote_cookie["count"] || pulse_vote_cookie[:count]).to_i - else - 0 - end %> - <% pulse_remaining = [CommunityPulseVotesController::DAILY_LIMIT_MAX - pulse_daily_count, 0].max %> - -