|
6 | 6 | <div class="mb-8 flex justify-between items-center"> |
7 | 7 | <div class="flex items-center"> |
8 | 8 | <%= image_tag(asset_path('apple-touch-icon.png'), |
9 | | - height: '32', |
10 | | - width: '32', |
11 | | - class: "rounded-full object-cover shadow-sm border-2 border-gray-200 mr-2", |
12 | | - aria: { label: "Job Tracker logo" }, |
13 | | - title: "Job Tracker logo") %> |
| 9 | + height: '32', |
| 10 | + width: '32', |
| 11 | + class: "rounded-full object-cover shadow-sm border-2 border-gray-200 mr-2", |
| 12 | + aria: { label: "Job Tracker logo" }, |
| 13 | + title: "Job Tracker logo") %> |
14 | 14 | <h2 class="hidden md:block md:text-2xl font-semibold text-gray-700 shadow-2xl"> |
15 | 15 | Job Tracker |
16 | 16 | </h2> |
17 | 17 | </div> |
18 | | - <%= link_to 'New Job Application', new_job_application_path, class: 'text-sm bg-blue-600 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded cursor-pointer', data: { turbo_frame: "_top" } %> |
19 | 18 | </div> |
20 | | - <%= form_with url: job_applications_path, method: :get, data: { controller: "job-filter", turbo_frame: "job_applications_table" } do |form| %> |
21 | | - <div class="flex flex-wrap -mx-2 mb-4"> |
22 | | - <div class="w-full md:w-1/6 px-2 mb-4 md:mb-0"> |
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", data: { action: "input->job-filter#submit" } %> |
25 | | - </div> |
26 | | - <div class="w-full md:w-1/6 px-2 mb-4 md:mb-0"> |
27 | | - <%= form.label :method_of_contact, "Contact Method", class: "sr-only" %> |
28 | | - <%= form.select :method_of_contact, |
29 | | - options_for_select([["All Contact Methods", ""]] + JobApplication.method_of_contacts.map { |k, v| [k.humanize, v] }, params[:method_of_contact]), |
30 | | - {}, |
31 | | - class: "shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline", |
32 | | - data: { action: "change->job-filter#submit" } |
33 | | - %> |
34 | | - </div> |
35 | | - <div class="w-full md:w-1/6 px-2 mb-4 md:mb-0"> |
36 | | - <%= form.label :position_type, "Position Type", class: "sr-only" %> |
37 | | - <%= form.select :position_type, |
38 | | - options_for_select([["All Position Types", ""]] + JobApplication.position_types.map { |k, v| [display_position_type(k), v] }, params[:position_type]), |
39 | | - {}, |
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 | | - data: { action: "change->job-filter#submit" } |
42 | | - %> |
43 | | - </div> |
44 | | - <div class="w-full md:w-1/6 px-2 mb-4 md:mb-0"> |
45 | | - <%= form.label :claimed_for_unemployment, "Unemployment Claim", class: "sr-only" %> |
46 | | - <%= form.select :claimed_for_unemployment, |
47 | | - options_for_select([["All Claims", ""], ["Claimed", "true"], ["Not Claimed", "false"]], params[:claimed_for_unemployment]), |
48 | | - {}, |
49 | | - class: "shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline", |
50 | | - data: { action: "change->job-filter#submit" } |
51 | | - %> |
52 | | - </div> |
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"> |
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" } %> |
64 | | - </div> |
65 | | - </div> |
66 | | - <% end %> |
67 | | - <%= turbo_frame_tag "job_applications_table" do %> |
68 | | - <%= render partial: "job_applications_table", locals: { job_applications: @job_applications } %> |
69 | | - <div id="pagination" class="mt-4"> |
70 | | - <%= render partial: "pagination", locals: { job_applications: @job_applications, job_application_count: @job_application_count } %> |
71 | | - </div> |
72 | | - <% end %> |
73 | | - <%= turbo_frame_tag "new_job_application" %> |
| 19 | + <div id="job_applications_content"> |
| 20 | + <%= render 'empty_or_table' %> |
| 21 | + </div> |
74 | 22 | </div> |
75 | 23 | <% end %> |
0 commit comments