From e32e5cd62322577b3f0a697d7bb31b4fc8ba5b41 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. --- 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 ac8c313a14..ed7e88dcaa 100644 --- a/api/v1/swagger/paths/items.yaml +++ b/api/v1/swagger/paths/items.yaml @@ -310,6 +310,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 0d09bec702..6e63a70dbe 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -1974,6 +1974,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 = $('