|
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 |
- |
|
|