Skip to content

Commit 8dcc139

Browse files
committed
Update table with helper methods and sizing
1 parent 8258b69 commit 8dcc139

File tree

2 files changed

+23
-19
lines changed

2 files changed

+23
-19
lines changed

app/views/job_applications/_job_application.html.erb

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,39 @@
1-
<tr class="h-20" id="<%= dom_id(job_application) %>">
2-
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
1+
<tr class="h-20 border-b border-gray-200 bg-white text-sm" id="<%= dom_id(job_application) %>">
2+
<td class="px-5 py-5">
33
<%= job_application.date_applied.strftime('%m/%d/%Y') %>
44
</td>
5-
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
5+
<td class="px-5 py-5">
66
<%= job_application.company_name %>
77
</td>
8-
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
8+
<td class="px-5 py-5">
99
<%= job_application.position_title %>
1010
</td>
11-
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
12-
<%= display_position_type(job_application.position_type) %>
11+
<td class="px-2 py-3 w-24">
12+
<div class="<%= position_type_chip_classes(job_application.position_type) %>">
13+
<%= display_position_type(job_application.position_type) %>
14+
</div>
1315
</td>
14-
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
15-
<%= job_application.method_of_contact.humanize %>
16+
<td class="px-5 py-5 text-center">
17+
<%= method_of_contact_emoji_with_tooltip(job_application.method_of_contact) %>
1618
</td>
17-
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
19+
<td class="px-5 py-5">
1820
<%= job_application.point_of_contact.present? ? job_application.point_of_contact : '-' %>
1921
</td>
20-
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
22+
<td class="px-5 py-5">
2123
<%= job_application.email_address.present? ? job_application.email_address : '-' %>
2224
</td>
23-
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
25+
<td class="px-5 py-5 ">
2426
<%= job_application.claimed_for_unemployment ? '✔︎' : '-' %>
2527
</td>
26-
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
27-
<%= job_application.status.humanize %>
28+
<td class="px-2 py-3 w-24">
29+
<div class="<%= status_chip_classes(job_application.status) %>">
30+
<%= job_application.status.humanize %>
31+
</div>
2832
</td>
29-
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
30-
<%= job_application.location.humanize %>
33+
<td class="px-5 py-5 text-center">
34+
<%= location_emoji_with_tooltip(job_application.location) %>
3135
</td>
32-
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
36+
<td class="px-5 py-5 item">
3337
<% if job_application.website_link.present? %>
3438
<%= link_to 'Visit',
3539
safe_url(job_application.website_link),

app/views/job_applications/_job_applications_table.html.erb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
<table class="w-full">
55
<thead class="text-xs bg-gray-100 text-left font-semibold text-gray-600 w-8 border-b-2">
66
<tr>
7-
<th class="px-5 py-3 w-8">
8-
<%= sort_link_to 'Applied', 'date_applied' %>
7+
<th class="px-5 py-3 w-36">
8+
<%= sort_link_to 'Applied On', 'date_applied' %>
99
</th>
1010
<th class="px-5 py-3 w-48">
1111
<%= sort_link_to 'Company', 'company_name' %>
@@ -28,7 +28,7 @@
2828
<th class="px-5 py-3">
2929
<%= sort_link_to 'Claimed', 'claimed_for_unemployment' %>
3030
</th>
31-
<th class="px-5 py-3">
31+
<th class="px-2 py-3 w-32">
3232
<%= sort_link_to 'Status', 'status' %>
3333
</th>
3434
<th class="px-5 py-3">

0 commit comments

Comments
 (0)