Skip to content

Commit

Permalink
UIREQ-1050: Add support for missing request error code
Browse files Browse the repository at this point in the history
  • Loading branch information
artem-blazhko committed Dec 4, 2023
1 parent 60deda4 commit e9301af
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
8 changes: 7 additions & 1 deletion src/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,9 @@ export const REQUEST_ERROR_MESSAGE_CODE = {
USER_CANNOT_BE_PROXY_FOR_THEMSELVES: 'USER_CANNOT_BE_PROXY_FOR_THEMSELVES',
ITEM_ALREADY_REQUESTED: 'ITEM_ALREADY_REQUESTED',
HOLD_SHELF_REQUESTS_REQUIRE_PICKUP_SERVICE_POINT: 'HOLD_SHELF_REQUESTS_REQUIRE_PICKUP_SERVICE_POINT',
MOVING_REQUEST_TO_THE_SAME_ITEM: 'MOVING_REQUEST_TO_THE_SAME_ITEM',
INSTANCE_ALREADY_REQUESTED: 'INSTANCE_ALREADY_REQUESTED',
ITEM_OF_THIS_INSTANCE_ALREADY_REQUESTED: 'ITEM_OF_THIS_INSTANCE_ALREADY_REQUESTED',
};

export const REQUEST_ERROR_MESSAGE_TRANSLATION_KEYS = {
Expand All @@ -372,6 +375,9 @@ export const REQUEST_ERROR_MESSAGE_TRANSLATION_KEYS = {
[REQUEST_ERROR_MESSAGE_CODE.CANNOT_CREATE_PAGE_TLR_WITHOUT_ITEM_ID]: 'ui-requests.errors.cannotCreatePageTlrWithoutItemId',
[REQUEST_ERROR_MESSAGE_CODE.HOLD_AND_RECALL_TLR_NOT_ALLOWED_PAGEABLE_AVAILABLE_ITEM_FOUND]: 'ui-requests.errors.holdAndRecallTlrNotAllowedPageableAvailableItemFound',
[REQUEST_ERROR_MESSAGE_CODE.USER_CANNOT_BE_PROXY_FOR_THEMSELVES]: 'ui-requests.errors.userCannotBeProxyForThemselves',
[REQUEST_ERROR_MESSAGE_CODE.ITEM_ALREADY_REQUESTED]: 'ui-requests.errors.itemAlreadyRequested',
[REQUEST_ERROR_MESSAGE_CODE.ITEM_ALREADY_REQUESTED]: 'ui-requests.errors.itemHasAlreadyBeenRequested',
[REQUEST_ERROR_MESSAGE_CODE.INSTANCE_ALREADY_REQUESTED]: 'ui-requests.errors.instanceHasAlreadyBeenRequested',
[REQUEST_ERROR_MESSAGE_CODE.HOLD_SHELF_REQUESTS_REQUIRE_PICKUP_SERVICE_POINT]: 'ui-requests.errors.holdShelfRequestsRequirePickupServicePoint',
[REQUEST_ERROR_MESSAGE_CODE.MOVING_REQUEST_TO_THE_SAME_ITEM]: 'ui-requests.errors.movingRequestToTheSameItem',
[REQUEST_ERROR_MESSAGE_CODE.ITEM_OF_THIS_INSTANCE_ALREADY_REQUESTED]: 'ui-requests.errors.itemOfThisInstanceAlreadyRequested',
};
7 changes: 5 additions & 2 deletions translations/ui-requests/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,10 @@
"errors.sync.requestQueueBody": "This request queue has been updated by another person or process and may be out of synch.",
"errors.unknown.requestQueueLabel": "Request queue error",
"errors.unknown.requestQueueBody": "Request queue reorder failed",
"errors.requestAlreadyClosed": "Error: The Request has already been closed.",
"errors.requestType.titleLevelRequest": "None available for this title and patron combination",
"errors.requestType.itemLevelRequest": "None available for this item and patron combination",
"errors.requestType.selectItem": "Please select a request type",
"errors.requestAlreadyClosed": "Error: The Request has already been closed.",
"errors.requestNotAllowedForPatronTitleCombination": "Hold requests are not allowed for this patron and title combination",
"errors.servicePointIsNotPickupLocation": "Service point is not a Pickup location",
"errors.requestPickupServicePointIsNotAllowed": "One or more Pickup locations are no longer available",
Expand All @@ -95,8 +95,11 @@
"errors.cannotCreatePageTlrWithoutItemId": "Cannot create a title level page request for this instance ID with no item ID",
"errors.holdAndRecallTlrNotAllowedPageableAvailableItemFound": "Hold/Recall title level request not allowed: pageable available item found for instance",
"errors.userCannotBeProxyForThemselves": "User cannot be proxy for themselves",
"errors.itemAlreadyRequested": "Not allowed to move title level page request to the same item",
"errors.itemHasAlreadyBeenRequested": "This requester already has an open request for this item",
"errors.instanceHasAlreadyBeenRequested": "This requester already has an open request for this instance",
"errors.holdShelfRequestsRequirePickupServicePoint": "Hold shelf fulfillment requests require a Pickup service point",
"errors.movingRequestToTheSameItem": "Not allowed to move title level page request to the same item",
"errors.itemOfThisInstanceAlreadyRequested": "This requester already has an open request for one of the instance's items",

"actions.label": "Actions",
"actions.edit": "Edit",
Expand Down

0 comments on commit e9301af

Please sign in to comment.