Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #1326: Refact mobile view of staff dashboard #1332

Merged
merged 2 commits into from
Jan 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
<thead>
<tr>
<th scope="col"><%= t('name') %></th>
<th class="text-center" scope="col"><%= t('general.sex') %></th>
<th class="text-center" scope="col"><%= @column_name %></th>
</tr>
</thead>
Expand All @@ -21,11 +20,6 @@
</h4>
</div>
</div>
</td>
<td>
<div class="d-flex justify-content-center">
<%= link_to pet.sex, staff_pet_path(pet, active_tab: 'tasks'), class: 'text-inherit', data: { turbo: false } %>
</div>
</td>
<td>
<div class="d-flex justify-content-center">
Expand All @@ -38,6 +32,6 @@
</table>
</div>
<div class="d-flex justify-content-center align-items-center mt-2">
<%== pagy_bootstrap_nav(@pagy) if @pagy.pages > 1 %>
<%== pagy_bootstrap_nav(@pagy) if @pagy.pages > 1 %>
</div>
</turbo-frame>
56 changes: 20 additions & 36 deletions app/views/organizations/staff/dashboard/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,6 @@
<% c.with_header_title { t("dashboard.index.header_title") } %>
<% c.with_body do %>
<div class="row g-4">
<div class="col-xl-3 col-lg-6 col-md-12 col-12">
<div class="task-card">
<%= render DataCardComponent.new(title_size: :medium, icon_color: "text-primary") do |card| %>
<% card.with_title { "Tasks" } %>
<% card.with_icon_name { "list" } %>
<% card.with_value do %>
<div class="fs-4 ms-1">
<div>
<%= link_to pets_with_incomplete_tasks_staff_dashboard_index_path,
data: { turbo_frame: "tasks-frame" },
class: "text-decoration-none text-gray-500 fw-normal" do %>
<i class="fe fe-alert-circle text-primary me-1"></i>
<%= "#{@not_completed_not_overdue_tasks_count} Incomplete" %>
<% end %>
</div>
<div>
<%= link_to pets_with_overdue_tasks_staff_dashboard_index_path,
data: { turbo_frame: "tasks-frame" },
class: "text-decoration-none text-gray-500 fw-normal" do %>
<i class="fe fe-clock text-primary me-1"></i>
<%= "#{@not_completed_overdue_tasks_count} Overdue" %>
<% end %>
</div>
</div>
<% end %>
<% end %>
</div>
</div>

<div class="col-xl-3 col-lg-6 col-md-12 col-12">
<div class="application-card">
<%= render DataCardComponent.new(title_size: :medium, icon_color: "text-success") do |card| %>
Expand Down Expand Up @@ -86,14 +57,27 @@
</div>

<div class="col-xl-3 col-lg-6 col-md-12 col-12">
<div class="rescue-card">
<%= render DataCardComponent.new(title_size: :medium, icon_color: "text-gray-500") do |card| %>
<% card.with_title { t(:rescues) } %>
<% card.with_icon_name { "star" } %>
<div class="task-card">
<%= render DataCardComponent.new(title_size: :medium, icon_color: "text-primary") do |card| %>
<% card.with_title { "Tasks" } %>
<% card.with_icon_name { "list" } %>
<% card.with_value do %>
<div class="text-muted text-decoration-none text-gray-500 fw-normal">
<div class="fs-4 ms-1">
TBD
<div class="fs-4 ms-1">
<div>
<%= link_to pets_with_incomplete_tasks_staff_dashboard_index_path,
data: { turbo_frame: "tasks-frame" },
class: "text-decoration-none text-gray-500 fw-normal" do %>
<i class="fe fe-alert-circle text-primary me-1"></i>
<%= "#{@not_completed_not_overdue_tasks_count} Incomplete" %>
<% end %>
</div>
<div>
<%= link_to pets_with_overdue_tasks_staff_dashboard_index_path,
data: { turbo_frame: "tasks-frame" },
class: "text-decoration-none text-gray-500 fw-normal" do %>
<i class="fe fe-clock text-primary me-1"></i>
<%= "#{@not_completed_overdue_tasks_count} Overdue" %>
<% end %>
</div>
</div>
<% end %>
Expand Down
Loading