View | Details | Raw Unified | Return to bug 33817
Collapse All | Expand All

(-)a/api/v1/swagger/paths/items.yaml (+4 lines)
Lines 310-315 Link Here
310
        description: Bad parameter
310
        description: Bad parameter
311
        schema:
311
        schema:
312
          $ref: "../swagger.yaml#/definitions/error"
312
          $ref: "../swagger.yaml#/definitions/error"
313
      "409":
314
        description: Conflict in creating resource
315
        schema:
316
          $ref: "../swagger.yaml#/definitions/error"
313
      "401":
317
      "401":
314
        description: Authentication required
318
        description: Authentication required
315
        schema:
319
        schema:
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt (-2 / +5 lines)
Lines 1974-1979 Link Here
1974
                          var response = data.responseJSON;
1974
                          var response = data.responseJSON;
1975
                          if ( response.error_code === 'already_bundled' ) {
1975
                          if ( response.error_code === 'already_bundled' ) {
1976
                              $('#addResult').replaceWith('<div id="addResult" class="alert alert-warning">'+_("Warning: Item '%s' already attached").format(barcode)+'</div>');
1976
                              $('#addResult').replaceWith('<div id="addResult" class="alert alert-warning">'+_("Warning: Item '%s' already attached").format(barcode)+'</div>');
1977
                          } else if (response.error_code === 'bundle_checkout_out') {
1978
                              $('#addResult').replaceWith('<div id="addResult" class="alert alert-danger">'+_("Failure: Bundle is currently checked out")+'</div>');
1977
                          } else if (response.error_code === 'checked_out') {
1979
                          } else if (response.error_code === 'checked_out') {
1978
                              const button = $('<button type="button">')
1980
                              const button = $('<button type="button">')
1979
                                .addClass('btn btn-xs')
1981
                                .addClass('btn btn-xs')
Lines 2087-2093 Link Here
2087
                            var barcode = $('#rm_external_id').val();
2089
                            var barcode = $('#rm_external_id').val();
2088
                            if ( data.status === 409 ) {
2090
                            if ( data.status === 409 ) {
2089
                                var response = data.responseJSON;
2091
                                var response = data.responseJSON;
2090
                                if ( response.key === "PRIMARY" ) {
2092
                                if (response.error_code === 'bundle_checkout_out') {
2093
                                    $('#removeResult').replaceWith('<div id="removeResult" class="alert alert-danger">'+_("Failure: Bundle is currently checked out")+'</div>');
2094
                                } else if ( response.key === "PRIMARY" ) {
2091
                                    $('#removeResult').replaceWith('<div id="removeResult" class="alert alert-warning">'+_("Warning: Item '%s' already attached").format(barcode)+'</div>');
2095
                                    $('#removeResult').replaceWith('<div id="removeResult" class="alert alert-warning">'+_("Warning: Item '%s' already attached").format(barcode)+'</div>');
2092
                                } else {
2096
                                } else {
2093
                                    $('#removeResult').replaceWith('<div id="removeResult" class="alert alert-danger">'+_("Failure: Item '%s' belongs to another bundle").format(barcode)+'</div>');
2097
                                    $('#removeResult').replaceWith('<div id="removeResult" class="alert alert-danger">'+_("Failure: Item '%s' belongs to another bundle").format(barcode)+'</div>');
2094
- 

Return to bug 33817