Skip to content

DEICH-5850 Session timeout fiks

Tom Adam requested to merge DEICH-5850-sessiontimeout-after-new-login-fix into master

session timeout popup displays for 5 sec

Common error handling for remote and normal reservation

Since remote and normal reservation did the same state updates, removed remote related actions.

Kept different general error messages for remote and normal reservation, as requested by business.

Added status code independent error handling fall-through (checks CREATED, FORBIDDEN and UNAUTHORIZED, otherwise matches the response body to display error).

eslintrc rule update

Made it possible to write multi line argument list. Increases readability.

Cleanup

Functions were called with more arguments than expected - fixed.

Removed redundant case specs in reducer (sonarLint rulz 👍🏻).

fixed normal reservation (not remote)

Fixed error code returned by Koha (400 instead of 403). This way it is easy to distinguish between session timeout and a not allowed Koha operation (like reserving the same book 2 times).

Simplifed error mapping - using same camel case error names as returned by Koha. Switch eliminated, replaced by simple object key mapping.

Refactored reservation logic.

Code prepared to have common handler for returned Result object in case of normal and remote reservation (next step).

Introduced SESSION_TIMEOUT action, which resets the reservation component in correct state.Some prettier fixes.

Edited by Tom Adam

Merge request reports