-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Look up items by number instead of database ID (#1807)
# What it does This replaces how we look up reservable items in the group lending code to use the human-friendly item number instead of the database ID. This fixes #1777. # Why it is important We're going to import items from an external system, and we want to be able to change the number without messing with data integrity.
- Loading branch information
Showing
6 changed files
with
19 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<%= turbo_frame_tag "reservation-loan-form" do %> | ||
<%= form_with(model: reservation_loan_lookup_form, url: admin_reservation_check_ins_path(reservation.id), builder: SpectreFormBuilder) do |form| %> | ||
<%= form.text_field :reservable_item_id, label: "Item ID", autocomplete: "off", autofocus: true %> | ||
<%= form.text_field :reservable_item_number, label: "Item Number", autocomplete: "off", autofocus: true %> | ||
<%= form.submit "Return Item" %> | ||
<% end %> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<%= turbo_frame_tag "reservation-loan-form" do %> | ||
<%= form_with(model: reservation_loan, url: admin_reservation_loans_path(reservation.id), builder: SpectreFormBuilder) do |form| %> | ||
<%= form.text_field :reservable_item_id, label: "Item ID", autocomplete: "off", autofocus: true %> | ||
<%= form.text_field :reservable_item_number, label: "Item Number", autocomplete: "off", autofocus: true %> | ||
<%= form.submit "Add Item" %> | ||
<% end %> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters