diff --git a/app/controllers/facilitators_controller.rb b/app/controllers/facilitators_controller.rb index 137434bc9..dd9736da5 100644 --- a/app/controllers/facilitators_controller.rb +++ b/app/controllers/facilitators_controller.rb @@ -98,8 +98,10 @@ def facilitator_params :primary_email_address, :primary_email_address_type, :street_address, :city, :state, :zip, :country, :mailing_address_type, :phone_number, :phone_number_type, + :phone_number_2, :phone_number_3, :best_time_to_call, + :date_of_birth, :created_by_id, :updated_by_id, - :bio, + :bio, :notes, :display_name_preference, :pronouns, :profile_show_name_preference, diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index e5fef04f5..6e2a25785 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -91,12 +91,26 @@ def generate_facilitator last_name: @user.last_name, primary_email_address: @user.email, phone_number: @user.phone, + phone_number_2: @user.phone2, + phone_number_3: @user.phone3, + best_time_to_call: @user.best_time_to_call, + date_of_birth: @user.birthday, street_address: @user.address, city: @user.city, state: @user.state, zip: @user.zip, created_by: current_user, - updated_by: current_user + updated_by: current_user, + notes: @user.notes, + # comment: @user.comment, + # t.string "address2" + # t.integer "agency_id" + # t.string "city2" + # t.boolean "inactive", default: false + # t.integer "primary_address" + # t.string "state2" + # t.string "subscribecode" + # t.string "zip2" ) if @facilitator.save redirect_to @facilitator, notice: "Facilitator was successfully created for this user." and return diff --git a/app/helpers/facilitator_helper.rb b/app/helpers/facilitator_helper.rb index 0dc429964..8f7be57eb 100644 --- a/app/helpers/facilitator_helper.rb +++ b/app/helpers/facilitator_helper.rb @@ -1,8 +1,10 @@ module FacilitatorHelper - def facilitator_profile_button(facilitator, size: 10) link_to facilitator_path(facilitator), - class: "btn btn-secondary-outline flex items-center gap-3 px-4 py-2 rounded-lg" do + class: "group inline-flex items-center gap-2 px-4 py-2 + border border-primary text-primary rounded-lg + hover:bg-primary hover:text-white transition-colors duration-200 + font-medium shadow-sm leading-none whitespace-nowrap w-60" do facilitator = facilitator.decorate @@ -10,32 +12,40 @@ def facilitator_profile_button(facilitator, size: 10) avatar = if facilitator.avatar_image.present? image_tag url_for(facilitator.avatar_image.file), class: "w-10 h-10 rounded-full object-cover border border-gray-300 shadow-sm" + elsif facilitator.user&.avatar.present? + image_tag url_for(facilitator.user.avatar), + class: "w-10 h-10 rounded-full object-cover border border-gray-300 shadow-sm" else image_tag "missing.png", class: "w-10 h-10 rounded-full object-cover border border-dashed border-gray-300" end - # --- Name (forced single line) --- + # --- Name: stays one line & turns white on hover --- name = content_tag( :span, - facilitator.name.to_s.truncate(28), # Prevent spillover - class: "font-semibold text-gray-900 whitespace-nowrap" + facilitator.name.to_s.truncate(21), + title: facilitator.name.to_s, + class: "font-semibold text-gray-900 whitespace-nowrap group-hover:text-white" ) - # --- Pronouns (small, optional, below) --- + # --- Pronouns --- pronouns = if facilitator.pronouns_display.present? - content_tag(:span, - facilitator.pronouns_display, - class: "text-xs text-gray-500 italic") + content_tag( + :span, + facilitator.pronouns_display, + class: "text-xs text-gray-500 italic group-hover:text-white" + ) end - # --- Text Block --- - text_block = content_tag(:div, - safe_join([name, pronouns].compact), - class: "flex flex-col leading-tight text-left") + text_block = content_tag( + :div, + safe_join([name, pronouns].compact), + class: "flex flex-col leading-tight text-left" + ) avatar + text_block end end + end diff --git a/app/views/events/_card.html.erb b/app/views/events/_card.html.erb index e7355743a..cc6cd3c71 100644 --- a/app/views/events/_card.html.erb +++ b/app/views/events/_card.html.erb @@ -11,7 +11,7 @@ -
+
@@ -30,7 +30,7 @@
-
+
<%= link_to event_path(event), class: "hover:underline block leading-tight", data: { turbo: false } do %> diff --git a/app/views/facilitators/_form.html.erb b/app/views/facilitators/_form.html.erb index 44238ef71..3320eae0a 100644 --- a/app/views/facilitators/_form.html.erb +++ b/app/views/facilitators/_form.html.erb @@ -12,8 +12,8 @@
- <%= u.input :first_name %> - <%= u.input :last_name %> + <%= f.input :first_name %> + <%= f.input :last_name %>
@@ -27,7 +27,7 @@
<%= f.input :pronouns %> - <%= u.input :birthday, + <%= f.input :date_of_birth, as: :string, input_html: { type: "date", @@ -66,10 +66,10 @@

Phones

- <%= u.input :phone %> - <%= u.input :phone2 %> - <%= u.input :phone3 %> - <%= u.input :best_time_to_call %> + <%= f.input :phone_number %> + <%= f.input :phone_number_2 %> + <%= f.input :phone_number_3 %> + <%= f.input :best_time_to_call %>
@@ -112,7 +112,7 @@ (only editable by admins)
- <% if false && current_user.super_user? %> + <% if current_user.super_user? %>
<%= u.fields_for :project_users do |project_user_form| %> <%= render "project_user_fields", diff --git a/app/views/facilitators/_search_boxes.html.erb b/app/views/facilitators/_search_boxes.html.erb index 64c82fa14..43888cdfc 100644 --- a/app/views/facilitators/_search_boxes.html.erb +++ b/app/views/facilitators/_search_boxes.html.erb @@ -2,12 +2,12 @@
- <%= label_tag :contact_info, "Name, email, phone", class: "block text-sm font-medium text-gray-700 mb-1" %> + <%= label_tag :contact_info, "Name, email, or phone", class: "block text-sm font-medium text-gray-700 mb-1" %>
<%= text_field_tag :contact_info, params[:contact_info], class: "w-full rounded-lg border border-gray-300 px-3 py-2 text-gray-800 shadow-sm focus:border-blue-500 focus:ring focus:ring-blue-200 focus:outline-none", - placeholder: "Type and hit Enter", + placeholder: "", onkeypress: "if(event.key === 'Enter'){ this.form.submit(); }" %>