Skip to content

Commit

Permalink
When freezing holds, make sure that success and error messages show a…
Browse files Browse the repository at this point in the history
…ppropriately
  • Loading branch information
mdnoble73 committed Jun 11, 2024
1 parent 0268cb2 commit 26d1b75
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
4 changes: 2 additions & 2 deletions code/web/Drivers/Sierra.php
Original file line number Diff line number Diff line change
Expand Up @@ -835,9 +835,9 @@ function freezeHold($patron, $recordId, $itemToFreezeId, $dateToReactivate): arr
];
} else {
$return = [
'success' => true,
'success' => false,
'message' => translate([
'text' => "Unable to freeze your hold.",
'text' => 'Unable to freeze your hold.',
'isPublicFacing' => true,
]),
'api' => [
Expand Down
1 change: 1 addition & 0 deletions code/web/release_notes/24.06.00.MD
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@
- When using the "Pickup at" setting within the Format Map, properly load available locations when the location code is not the entire location code of the item. (Tickets 128864, 130706) (*MDN*)
- Add additional handling for looking up titles for holds and checkouts if the item id cannot be found in Aspen. (Ticket 130159) (*MDN*)
- When freezing selected or all holds, do not show a prompt for reactivation date. (Tickets 133197, 131688) (*MDN*)
- When freezing holds, make sure that success and error messages show appropriately. (Ticket 127582) (*MDN*)
- Create a new Under Consideration status that can be used for order items that the library has not committed to purchase. (Ticket 128096) (*MDN*)
- Libraries can select which status code is used to generate the new status.
- Titles with a status of Under Consideration will be displayed after all titles that are On Order or that have been previously purchased when sorting by Date Purchased.
Expand Down
7 changes: 7 additions & 0 deletions code/web/services/MyAccount/AJAX.php
Original file line number Diff line number Diff line change
Expand Up @@ -969,6 +969,13 @@ function freezeHold(): array {
'text' => 'Success',
'isPublicFacing' => true,
]);
}else{
$message = '<div class="alert alert-danger">' . $result['message'] . '</div>';
$result['message'] = $message;
$result['title'] = translate([
'text' => 'Error',
'isPublicFacing' => true,
]);
}

if (!$result['success'] && is_array($result['message'])) {
Expand Down

0 comments on commit 26d1b75

Please sign in to comment.