Skip to content

Commit fe2d296

Browse files
authored
Merge pull request tgaeta#8 from tgaeta/update_ui
Update UI
2 parents a803233 + e27593d commit fe2d296

File tree

4 files changed

+100
-24
lines changed

4 files changed

+100
-24
lines changed

README.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@
2020

2121
Job Tracker is a simple, powerful, and user-friendly web application designed to help job seekers efficiently manage their job search process. Built with Ruby on Rails and enhanced with modern web technologies, this tool streamlines the often overwhelming task of tracking multiple job applications.
2222

23-
<img alt="UI Screenshot" src="https://github.com/user-attachments/assets/8153c979-2bc9-437b-965d-c838506d5036"/>
23+
<img alt="UI Screenshot" src="https://github.com/user-attachments/assets/09f11ccf-e266-457f-bac6-f2b4183f1377"/>
2424

2525
## Key Features
2626

2727
- **Intuitive Interface**: Easy-to-use dashboard for quick overview of all job applications.
2828
- **Detailed Tracking**: Record essential information for each application, including:
29-
- Applied
30-
- Company
31-
- Position
29+
- Applied On Date
30+
- Company Name
31+
- Position Title
3232
- Postion Type (Full-time, Part-time, Internship)
3333
- Contact Method
3434
- Point of Contact (P.o.C.)
@@ -63,7 +63,13 @@ Refer [here](./docs/installing_prerequisites.md) to install these dependencies
6363

6464
### Running the application
6565

66-
Start your application
66+
Run `bin/setup` to set up the application. It prepares the database and installs the required ruby gems and javascript packages. The script is idempotent, so you can run it multiple times.
67+
68+
```bash
69+
./bin/setup
70+
```
71+
72+
Start Job Tracker
6773

6874
```bash
6975
./bin/dev

app/helpers/job_applications_helper.rb

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,70 @@ def display_position_type(position_type)
88
position_type
99
end
1010
end
11+
12+
def status_chip_classes(status)
13+
base_classes = "rounded-full px-2 py-1 text-xs font-medium text-center whitespace-nowrap overflow-hidden text-ellipsis max-w-full"
14+
15+
status_classes = case status.to_sym
16+
when :hired
17+
"bg-green-100 text-green-800"
18+
when :interviewing
19+
"bg-blue-100 text-blue-800"
20+
when :job_offer
21+
"bg-purple-100 text-purple-800"
22+
when :no_response
23+
"bg-yellow-100 text-yellow-800"
24+
when :not_hired
25+
"bg-red-100 text-red-800"
26+
else
27+
"bg-gray-100 text-gray-800"
28+
end
29+
30+
"#{base_classes} #{status_classes}"
31+
end
32+
33+
def position_type_chip_classes(position_type)
34+
base_classes = "rounded-full px-2 py-1 text-xs font-medium text-center whitespace-nowrap overflow-hidden text-ellipsis max-w-full"
35+
36+
type_classes = case position_type.to_sym
37+
when :full_time
38+
"bg-indigo-100 text-indigo-800"
39+
when :part_time
40+
"bg-amber-100 text-amber-800"
41+
when :internship
42+
"bg-teal-100 text-teal-800"
43+
else
44+
"bg-gray-100 text-gray-800"
45+
end
46+
47+
"#{base_classes} #{type_classes}"
48+
end
49+
50+
def location_emoji_with_tooltip(location)
51+
emoji_map = {
52+
in_office: "🏢",
53+
remote: "💻",
54+
hybrid: "🔄"
55+
}
56+
57+
emoji = emoji_map[location.to_sym] || "❓"
58+
full_text = location.to_s.humanize
59+
60+
content_tag(:span, emoji, title: full_text, class: "cursor-default text-2xl")
61+
end
62+
63+
def method_of_contact_emoji_with_tooltip(method)
64+
emoji_map = {
65+
email: "📧",
66+
internet_job_application: "🌐",
67+
other: "🗂️",
68+
phone: "📱",
69+
recruiter: "🤝"
70+
}
71+
72+
emoji = emoji_map[method.to_sym] || "❓"
73+
full_text = method.to_s.humanize
74+
75+
content_tag(:span, emoji, title: full_text, class: "cursor-default text-2xl")
76+
end
1177
end

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">
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)