From 34b704fb0b9da3d279c4169920d39b286d17fb39 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Tue, 27 Jun 2023 12:03:58 +0100 Subject: [PATCH] Bug 33817: (follow-up) Fix spec and messages This patch should resolve the issues highlighted at signoff time by Victor. Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi --- api/v1/swagger/paths/items.yaml | 4 ++++ koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/api/v1/swagger/paths/items.yaml b/api/v1/swagger/paths/items.yaml index 01b8d795d5..f9aa9301d1 100644 --- a/api/v1/swagger/paths/items.yaml +++ b/api/v1/swagger/paths/items.yaml @@ -308,6 +308,10 @@ description: Bad parameter schema: $ref: "../swagger.yaml#/definitions/error" + "409": + description: Conflict in creating resource + schema: + $ref: "../swagger.yaml#/definitions/error" "401": description: Authentication required schema: diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt index 8ec3e12a0b..c88e5717b4 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -1978,6 +1978,8 @@ var response = data.responseJSON; if ( response.error_code === 'already_bundled' ) { $('#addResult').replaceWith('
'+_("Warning: Item '%s' already attached").format(barcode)+'
'); + } else if (response.error_code === 'bundle_checkout_out') { + $('#addResult').replaceWith('
'+_("Failure: Bundle is currently checked out")+'
'); } else if (response.error_code === 'checked_out') { const button = $('