|
19 | 19 | </div> |
20 | 20 | <%= form_with url: job_applications_path, method: :get, data: { controller: "job-filter", turbo_frame: "job_applications_table" } do |form| %> |
21 | 21 | <div class="flex flex-wrap -mx-2 mb-4"> |
22 | | - <div class="w-full md:w-1/5 px-2 mb-4 md:mb-0"> |
| 22 | + <div class="w-full md:w-1/6 px-2 mb-4 md:mb-0"> |
23 | 23 | <%= form.label :search, "Search", class: "sr-only" %> |
24 | | - <%= form.text_field :search, value: params[:search], class: "shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline", placeholder: "Search by company or position", data: { action: "input->job-filter#submit" } %> |
| 24 | + <%= form.text_field :search, value: params[:search], class: "shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline", placeholder: "Search", data: { action: "input->job-filter#submit" } %> |
25 | 25 | </div> |
26 | | - <div class="w-full md:w-1/5 px-2 mb-4 md:mb-0"> |
| 26 | + <div class="w-full md:w-1/6 px-2 mb-4 md:mb-0"> |
27 | 27 | <%= form.label :method_of_contact, "Contact Method", class: "sr-only" %> |
28 | 28 | <%= form.select :method_of_contact, |
29 | 29 | options_for_select([["All Contact Methods", ""]] + JobApplication.method_of_contacts.map { |k, v| [k.humanize, v] }, params[:method_of_contact]), |
|
32 | 32 | data: { action: "change->job-filter#submit" } |
33 | 33 | %> |
34 | 34 | </div> |
35 | | - <div class="w-full md:w-1/5 px-2 mb-4 md:mb-0"> |
| 35 | + <div class="w-full md:w-1/6 px-2 mb-4 md:mb-0"> |
36 | 36 | <%= form.label :position_type, "Position Type", class: "sr-only" %> |
37 | 37 | <%= form.select :position_type, |
38 | | - options_for_select([["All Position Types", ""]] + JobApplication.position_types.map { |k, v| [k.humanize, v] }, params[:position_type]), |
| 38 | + options_for_select([["All Position Types", ""]] + JobApplication.position_types.map { |k, v| [display_position_type(k), v] }, params[:position_type]), |
39 | 39 | {}, |
40 | 40 | class: "shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline", |
41 | 41 | data: { action: "change->job-filter#submit" } |
42 | 42 | %> |
43 | 43 | </div> |
44 | | - <div class="w-full md:w-1/5 px-2 mb-4 md:mb-0"> |
| 44 | + <div class="w-full md:w-1/6 px-2 mb-4 md:mb-0"> |
45 | 45 | <%= form.label :claimed_for_unemployment, "Unemployment Claim", class: "sr-only" %> |
46 | 46 | <%= form.select :claimed_for_unemployment, |
47 | 47 | options_for_select([["All Claims", ""], ["Claimed", "true"], ["Not Claimed", "false"]], params[:claimed_for_unemployment]), |
|
50 | 50 | data: { action: "change->job-filter#submit" } |
51 | 51 | %> |
52 | 52 | </div> |
53 | | - <div class="w-full md:w-1/5 px-2 mt-4 md:mt-0"> |
| 53 | + <div class="w-full md:w-1/6 px-2 mb-4 md:mb-0"> |
| 54 | + <%= form.label :status, "Application Status", class: "sr-only" %> |
| 55 | + <%= form.select :status, |
| 56 | + options_for_select([["All Statuses", ""]] + JobApplication.statuses.map { |k, v| [k.humanize, v] }, params[:status]), |
| 57 | + {}, |
| 58 | + class: "shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline", |
| 59 | + data: { action: "change->job-filter#submit" } |
| 60 | + %> |
| 61 | + </div> |
| 62 | + <div class="w-full md:w-1/6 px-2 mt-4 md:mt-0"> |
54 | 63 | <%= form.button "Reset Filters", type: "button", class: "w-full bg-gray-600 hover:bg-gray-700 text-white font-bold py-2 px-4 rounded cursor-pointer", data: { action: "click->job-filter#reset" } %> |
55 | 64 | </div> |
56 | 65 | </div> |
|
0 commit comments