Skip to content

Commit

Permalink
Fix Add Collection button in the collections tab
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Dolski committed Jan 11, 2024
1 parent aa4125b commit 4e35e22
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions app/assets/javascripts/units.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,14 @@ const UnitView = {
const url = ROOT_URL + "/units/" + unitID + "/collections";
$.get(url, function(data) {
$("#collections-tab-content").html(data);
$('.add-collection').on("click", function() {
const url = ROOT_URL + "/collections/new" +
"?collection%5Binstitution_id%5D=" + institutionID +
"&primary_unit_id=" + unitID;
$.get(url, function(data) {
$("#add-collection-modal .modal-body").html(data);
});
});
});
});

Expand Down

0 comments on commit 4e35e22

Please sign in to comment.