From 4a8f592802455c519881a68d6367f5bb1ac8c34b 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 (cherry picked from commit 34b704fb0b9da3d279c4169920d39b286d17fb39) Signed-off-by: Martin Renvoize (cherry picked from commit ba57a9aa58c4588c603d6ffb7613271b3f662a6c) Signed-off-by: Matt Blenkinsop --- 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 9e20b7eb8a..b426b670f6 100644 --- a/api/v1/swagger/paths/items.yaml +++ b/api/v1/swagger/paths/items.yaml @@ -258,6 +258,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 24c26aefd7..eb46447a86 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -1806,6 +1806,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 = $('