Skip to content

[Reimbursements] Small visual improvements to report page #10689

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

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
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
8 changes: 4 additions & 4 deletions app/views/reimbursement/reports/_actions.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<% elsif current_user == report.user && !admin_signed_in? %>
<div class="btn bg-success disabled" class="tooltipped tooltipped--n" aria-label="Expenses can't be added to locked reports">
<%= inline_icon "plus" %>
Add <%= report.expenses.count > 0 ? "Another" : "An" %> Expense
Add <%= report.expenses.count > 0 ? "another" : "an" %> expense
</div>
<% elsif !report.closed? %>
<%= link_to reimbursement_report_reject_path(report_id: report.id), class: "btn bg-error", data: { turbo: true, turbo_method: :post } do %>
Expand All @@ -51,15 +51,15 @@
<% if report.reimbursement_requested? && !admin_signed_in? %>
<%= link_to reimbursement_report_draft_path(report_id: report.id), class: "btn bg-muted", method: :post do %>
<%= inline_icon "reply" %>
Mark As Draft
Mark as draft
<% button_hint = capture do %>
<span class="bold">Status:</span> the HCB team is reviewing this report. To make further changes, mark it as a draft.
<% end %>
<% end %>
<% elsif current_user == report.user && report.submitted? %>
<%= link_to reimbursement_report_draft_path(report_id: report.id), class: "btn bg-muted", method: :post do %>
<%= inline_icon "reply" %>
Mark As Draft
Mark as draft
<% button_hint = capture do %>
<span class="bold">Status:</span> your report is currently under review by the <%= report.event.name %> team. To make further changes, mark it as a draft.
<% end %>
Expand Down Expand Up @@ -196,7 +196,7 @@
<% admin_tool("overflow-visible") do %>
<%= link_to reimbursement_report_admin_approve_path(report_id: report.id), class: "btn bg-info", method: :post do %>
<%= inline_icon "thumbsup" %>
Approve <%= report.user.payout_method.title_kind %> Reimbursement
Approve <%= report.user.payout_method.title_kind.downcase %> reimbursement
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you attach screenshots of this? Want to sanity check that "ACH" is still capitalised

<% end %>
<% unless ::Shared::AmpleBalance.ample_balance?(report.amount_to_reimburse_cents, report.event) %>
<% button_hint = capture do %>
Expand Down
14 changes: 10 additions & 4 deletions app/views/reimbursement/reports/_edit_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,15 @@
<%= form.collection_select :reviewer_id, @report.event.users, :id, :name, include_blank: "Anyone" %>
</div>
<% end %>
<%= form.submit "Update report", class: "left mt2" %>
<% end %>
<div class="flex items-center w-full justify-between">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

<%= form.submit "Update report", class: "left mt2" %>

<% admin_tool_if [email protected]? do %>
<%= button_to "Delete report", reimbursement_report_path(@report), class: "right mt2 bg-error btn", method: :delete, type: "button" %>
<% if current_user.admin? && [email protected]? %>
<% admin_tool("right mt2") do %>
<%= button_to "Delete report", reimbursement_report_path(@report), class: "bg-error btn", method: :delete, type: "button" %>
<% end %>
<% else %>
<%= button_to "Delete report", reimbursement_report_path(@report), class: "right mt2 bg-error btn", method: :delete, type: "button" %>
<% end %>
</div>
<% end %>
6 changes: 3 additions & 3 deletions app/views/reimbursement/reports/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
</section>

<section data-behavior="modal" role="dialog" id="request_changes" class="modal modal--scroll bg-snow">
<%= modal_header "Return Report" %>
<%= modal_header "Return report" %>
<p>
Returning the report to <%= @report.user.first_name %> will allow them (as well as you and other team members) to make changes
to the report. <span class="bold">If you have specific changes you'd like to see made, list them below:</span>
Expand All @@ -85,7 +85,7 @@
</section>

<section data-behavior="modal" role="dialog" id="submit" class="modal modal--scroll bg-snow">
<%= modal_header "Submit Report" %>
<%= modal_header "Submit report" %>
<%= form_with url: reimbursement_report_submit_path(report_id: @report.id), model: [@report, Comment.new] do |form| %>
<%= form.hidden_field :commentable_type, value: @commentable.class %>
<%= form.hidden_field :commentable_id, value: @report.id %>
Expand Down Expand Up @@ -172,7 +172,7 @@
<% end %>

<section data-behavior="modal" role="dialog" id="edit_payout" class="modal modal--scroll bg-snow">
<%= modal_header "Add Payout Information" %>
<%= modal_header "Add payout information" %>
<%= render "/users/payout_form", user: @report.user, report: @report %>
</section>

Expand Down