new: remove the "previsualisation" side pane from the "offre" admin edit form
This commit is contained in:
@@ -11,7 +11,7 @@
|
|||||||
@endif
|
@endif
|
||||||
|
|
||||||
<div class="row mb-3">
|
<div class="row mb-3">
|
||||||
<div class="col-8">
|
<div class="col-12">
|
||||||
<div class="row mb-3">
|
<div class="row mb-3">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
@include('components.form.select', [
|
@include('components.form.select', [
|
||||||
@@ -105,13 +105,6 @@
|
|||||||
</div>
|
</div>
|
||||||
@endcomponent
|
@endcomponent
|
||||||
</div>
|
</div>
|
||||||
<div class="col-4">
|
|
||||||
@component('components.card', ['title' => 'Previsualisation'])
|
|
||||||
<div id="preview-article"></div>
|
|
||||||
<div id="preview-variation"></div>
|
|
||||||
<div id="preview-tariff"></div>
|
|
||||||
@endcomponent
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -126,59 +119,8 @@
|
|||||||
{!! JsValidator::formRequest('App\Http\Requests\Admin\Shop\StoreOfferPost', '#offer-form') !!}
|
{!! JsValidator::formRequest('App\Http\Requests\Admin\Shop\StoreOfferPost', '#offer-form') !!}
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
function handleArticle() {
|
|
||||||
$('.select_article').change(function() {
|
|
||||||
previewArticle($(this).val());
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
function previewArticle(id) {
|
|
||||||
var url = '{{ route('Admin.Shop.Offers.previewArticle') }}/' + id;
|
|
||||||
$('#preview-article').load(url, function() {
|
|
||||||
initChevron();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function handleVariation() {
|
|
||||||
$('.select_variation').change(function() {
|
|
||||||
previewVariation($(this).val());
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
function previewVariation(id) {
|
|
||||||
var url = '{{ route('Admin.Shop.Offers.previewVariation') }}/' + id;
|
|
||||||
$('#preview-variation').load(url, function() {
|
|
||||||
initChevron();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function handleTariff() {
|
|
||||||
$('.select_tariffs').change(function() {
|
|
||||||
previewTariff($(this).val());
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
function previewTariff(id) {
|
|
||||||
var url = '{{ route('Admin.Shop.Offers.previewTariff') }}/' + id;
|
|
||||||
$('#preview-tariff').load(url, function() {
|
|
||||||
initChevron();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function initPreview() {
|
|
||||||
previewArticle("{{ $offer['article_id'] ?? null }}");
|
|
||||||
previewVariation("{{ $offer['variation_id'] ?? null }}");
|
|
||||||
previewTariff("{{ $offer['tariff_id'] ?? null }}");
|
|
||||||
}
|
|
||||||
|
|
||||||
handleArticle();
|
|
||||||
handleVariation();
|
|
||||||
handleTariff();
|
|
||||||
initChevron();
|
initChevron();
|
||||||
initSaveForm('#offer-form');
|
initSaveForm('#offer-form');
|
||||||
initSelect2();
|
initSelect2();
|
||||||
@if ($offer['id'] ?? false)
|
|
||||||
initPreview();
|
|
||||||
@endif
|
|
||||||
</script>
|
</script>
|
||||||
@endpush
|
@endpush
|
||||||
|
|||||||
Reference in New Issue
Block a user