Multiple Issue Fixed
This commit is contained in:
parent
0af35cae62
commit
0e5829cb6a
|
|
@ -25,16 +25,20 @@
|
|||
<div class="control-group" :class="[errors.has('inventories[{{ $inventorySource->id }}]') ? 'has-error' : '']">
|
||||
<label>{{ $inventorySource->name }}</label>
|
||||
|
||||
<input type="text" v-validate="'numeric|min:0'" name="inventories[{{ $inventorySource->id }}]" class="control" value="{{ $qty }}" data-vv-as=""{{ $inventorySource->name }}""/>
|
||||
<input
|
||||
type="text"
|
||||
name="inventories[{{ $inventorySource->id }}]"
|
||||
class="control" value="{{ $qty }}"
|
||||
onkeyup="document.getElementById('inventoryErrors{{ $product->id }}').innerHTML = ''" />
|
||||
</div>
|
||||
@endforeach
|
||||
|
||||
<div class="control-group has-error">
|
||||
<span class="control-error" id="inventoryErrors"></span>
|
||||
<span class="control-error" id="inventoryErrors{{ $product->id }}"></span>
|
||||
</div>
|
||||
|
||||
<button class="btn btn-primary" onclick="saveEditQuantityForm('{{ route('admin.catalog.products.update-inventories', $product->id) }}', '{{ $product->id }}')">{{ __('admin::app.catalog.products.save') }}</button>
|
||||
|
||||
<button class="btn btn-danger" onclick="cancelEditQuantityForm('{{ $product->id }}')">{{ __('admin::app.catalog.products.cancel') }}</button>
|
||||
</form>
|
||||
</span>
|
||||
</span>
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@
|
|||
.then(function (response) {
|
||||
let data = response.data;
|
||||
|
||||
$('#inventoryErrors').text('');
|
||||
$(`#inventoryErrors${productId}`).text('');
|
||||
|
||||
$(`#edit-product-${productId}-quantity-form-block`).hide();
|
||||
|
||||
|
|
@ -87,7 +87,7 @@
|
|||
.catch(function ({ response }) {
|
||||
let { data } = response;
|
||||
|
||||
$('#inventoryErrors').text(data.message);
|
||||
$(`#inventoryErrors${productId}`).text(data.message);
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Reference in New Issue