Stack Enhanced
This commit is contained in:
parent
814eeafa6a
commit
ffc1cc47fe
|
|
@ -13,15 +13,13 @@
|
|||
</accordian>
|
||||
|
||||
@push('scripts')
|
||||
@parent
|
||||
|
||||
<script type="text/x-template" id="bundle-option-list-template">
|
||||
<div class="">
|
||||
<button type="button" class="btn btn-md btn-primary" @click="addOption" style="margin-bottom: 20px;">
|
||||
{{ __('admin::app.catalog.products.add-option-btn-title') }}
|
||||
</button>
|
||||
|
||||
<bundle-option-item
|
||||
<bundle-option-item
|
||||
v-for='(option, index) in options'
|
||||
:option="option"
|
||||
:key="index"
|
||||
|
|
@ -45,7 +43,7 @@
|
|||
<label class="required">{{ __('admin::app.catalog.products.option-title') }}</label>
|
||||
|
||||
<input type="text" v-validate="'required'" :name="titleInputName + '[label]'" v-model="option.label" class="control" data-vv-as=""{{ __('admin::app.catalog.products.option-title') }}""/>
|
||||
|
||||
|
||||
<span class="control-error" v-if="errors.has(titleInputName + '[label]')">@{{ errors.first(titleInputName + '[label]') }}</span>
|
||||
</div>
|
||||
|
||||
|
|
@ -58,7 +56,7 @@
|
|||
<option value="checkbox">{{ __('admin::app.catalog.products.checkbox') }}</option>
|
||||
<option value="multiselect">{{ __('admin::app.catalog.products.multiselect') }}</option>
|
||||
</select>
|
||||
|
||||
|
||||
<span class="control-error" v-if="errors.has(inputName + '[type]')">@{{ errors.first(inputName + '[type]') }}</span>
|
||||
</div>
|
||||
|
||||
|
|
@ -69,7 +67,7 @@
|
|||
<option value="1">{{ __('admin::app.catalog.products.yes') }}</option>
|
||||
<option value="0">{{ __('admin::app.catalog.products.no') }}</option>
|
||||
</select>
|
||||
|
||||
|
||||
<span class="control-error" v-if="errors.has(inputName + '[is_required]')">@{{ errors.first(inputName + '[is_required]') }}</span>
|
||||
</div>
|
||||
|
||||
|
|
@ -77,7 +75,7 @@
|
|||
<label class="required">{{ __('admin::app.catalog.products.sort-order') }}</label>
|
||||
|
||||
<input type="text" v-validate="'required|numeric|min_value:0'" :name="inputName + '[sort_order]'" v-model="option.sort_order" class="control" data-vv-as=""{{ __('admin::app.catalog.products.sort-order') }}""/>
|
||||
|
||||
|
||||
<span class="control-error" v-if="errors.has(inputName + '[sort_order]')">@{{ errors.first(inputName + '[sort_order]') }}</span>
|
||||
</div>
|
||||
|
||||
|
|
@ -85,7 +83,7 @@
|
|||
<div class="secton-title">
|
||||
<span>Products</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="section-content">
|
||||
<bundle-product-list
|
||||
:bundle-option-products="option.bundle_option_products"
|
||||
|
|
@ -121,10 +119,9 @@
|
|||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="table" style="margin-top: 20px; overflow-x: unset;">
|
||||
<table>
|
||||
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="name">{{ __('admin::app.catalog.products.is-default') }}</th>
|
||||
|
|
@ -150,7 +147,6 @@
|
|||
</bundle-product-item>
|
||||
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -203,7 +199,6 @@
|
|||
|
||||
<script>
|
||||
Vue.component('bundle-option-list', {
|
||||
|
||||
template: '#bundle-option-list-template',
|
||||
|
||||
inject: ['$validator'],
|
||||
|
|
@ -224,7 +219,7 @@
|
|||
bundle_option_products: []
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
removeOption: function(option) {
|
||||
let index = this.options.indexOf(option)
|
||||
|
||||
|
|
@ -234,7 +229,6 @@
|
|||
});
|
||||
|
||||
Vue.component('bundle-option-item', {
|
||||
|
||||
template: '#bundle-option-item-template',
|
||||
|
||||
props: ['index', 'option'],
|
||||
|
|
@ -265,7 +259,6 @@
|
|||
});
|
||||
|
||||
Vue.component('bundle-product-list', {
|
||||
|
||||
template: '#bundle-product-list-template',
|
||||
|
||||
inject: ['$validator'],
|
||||
|
|
@ -292,8 +285,8 @@
|
|||
|
||||
methods: {
|
||||
addProduct: function(item, key) {
|
||||
var alreadyAdded = false;
|
||||
|
||||
let alreadyAdded = false;
|
||||
|
||||
this.bundle_option_products.forEach(function(optionProduct) {
|
||||
if (item.id == optionProduct.product.id) {
|
||||
alreadyAdded = true;
|
||||
|
|
@ -331,24 +324,24 @@
|
|||
return;
|
||||
}
|
||||
|
||||
var this_this = this;
|
||||
|
||||
let self = this;
|
||||
|
||||
this.$http.get ("{{ route('admin.catalog.products.search_simple_product') }}", {params: {query: this.search_term}})
|
||||
.then (function(response) {
|
||||
this_this.searched_results = response.data;
|
||||
self.searched_results = response.data;
|
||||
|
||||
this_this.is_searching = false;
|
||||
self.is_searching = false;
|
||||
})
|
||||
.catch (function (error) {
|
||||
this_this.is_searching = false;
|
||||
self.is_searching = false;
|
||||
})
|
||||
},
|
||||
|
||||
checkProduct: function(productId) {
|
||||
var this_this = this;
|
||||
let self = this;
|
||||
|
||||
this.bundle_option_products.forEach(function(product) {
|
||||
if (this_this.bundleOption.type == 'radio' || this_this.bundleOption.type == 'select') {
|
||||
if (self.bundleOption.type == 'radio' || self.bundleOption.type == 'select') {
|
||||
product.is_default = product.product.id == productId ? 1 : 0;
|
||||
} else {
|
||||
if (product.product.id == productId)
|
||||
|
|
@ -360,7 +353,6 @@
|
|||
});
|
||||
|
||||
Vue.component('bundle-product-item', {
|
||||
|
||||
template: '#bundle-product-item-template',
|
||||
|
||||
props: ['controlName', 'index', 'bundleOption', 'product'],
|
||||
|
|
@ -387,5 +379,4 @@
|
|||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
@endpush
|
||||
|
|
@ -1,5 +1,4 @@
|
|||
@section('css')
|
||||
@parent
|
||||
@push('css')
|
||||
<style>
|
||||
.table th.price, .table th.weight {
|
||||
width: 100px;
|
||||
|
|
@ -14,7 +13,7 @@
|
|||
margin-right: 10px;
|
||||
}
|
||||
</style>
|
||||
@stop
|
||||
@endpush
|
||||
|
||||
{!! view_render_event('bagisto.admin.catalog.product.edit_form_accordian.customer_group_prices.before', ['product' => $product]) !!}
|
||||
|
||||
|
|
@ -23,13 +22,10 @@
|
|||
{!! view_render_event('bagisto.admin.catalog.product.edit_form_accordian.customer_group_prices.after', ['product' => $product]) !!}
|
||||
|
||||
@push('scripts')
|
||||
@parent
|
||||
|
||||
<script type="text/x-template" id="customer-group-price-list-template">
|
||||
<div>
|
||||
<div class="table" style="margin-top: 20px; overflow-x: unset;">
|
||||
<table>
|
||||
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ __('admin::app.catalog.products.customer-group') }}</th>
|
||||
|
|
@ -40,11 +36,8 @@
|
|||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
<customer-group-price-item v-for='(customerGroupPrice, index) in customer_group_prices' :customer-group-price="customerGroupPrice" :key="index" :index="index" @onRemoveCustomerGroupPrice="removeCustomerGroupPrice($event)"></customer-group-price-item>
|
||||
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
|
||||
<button type="button" class="btn btn-lg btn-primary" style="margin-top: 20px" @click="addCustomerGroupPrice()">
|
||||
|
|
@ -99,7 +92,6 @@
|
|||
|
||||
<script>
|
||||
Vue.component('customer-group-price-list', {
|
||||
|
||||
template: '#customer-group-price-list-template',
|
||||
|
||||
inject: ['$validator'],
|
||||
|
|
@ -129,7 +121,6 @@
|
|||
});
|
||||
|
||||
Vue.component('customer-group-price-item', {
|
||||
|
||||
template: '#customer-group-price-item-template',
|
||||
|
||||
props: ['index', 'customerGroupPrice'],
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
<accordian :title="'{{ __('admin::app.catalog.products.downloadable') }}'" :active="true">
|
||||
<div slot="body">
|
||||
|
||||
{!! view_render_event('bagisto.admin.catalog.product.edit_form_accordian.downloadable.links.controls.before', ['product' => $product]) !!}
|
||||
|
||||
<div id="downloadable-link-list-section" class="section">
|
||||
|
|
@ -30,15 +29,12 @@
|
|||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.admin.catalog.product.edit_form_accordian.downloadable.samples.controls.after', ['product' => $product]) !!}
|
||||
|
||||
</div>
|
||||
</accordian>
|
||||
|
||||
{!! view_render_event('bagisto.admin.catalog.product.edit_form_accordian.downloadable.after', ['product' => $product]) !!}
|
||||
|
||||
@push('scripts')
|
||||
@parent
|
||||
|
||||
<script type="text/x-template" id="downloadable-link-list-template">
|
||||
<div class="table" style="overflow-x: unset;">
|
||||
<table style="margin-bottom: 20px;">
|
||||
|
|
@ -55,7 +51,6 @@
|
|||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
<downloadable-link-item
|
||||
v-for='(link, index) in links'
|
||||
:link="link"
|
||||
|
|
@ -63,7 +58,6 @@
|
|||
:index="index"
|
||||
@onRemoveLink="removeLink($event)"
|
||||
></downloadable-link-item>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
|
@ -193,7 +187,6 @@
|
|||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
<downloadable-sample-item
|
||||
v-for='(sample, index) in samples'
|
||||
:sample="sample"
|
||||
|
|
@ -201,7 +194,6 @@
|
|||
:index="index"
|
||||
@onRemoveSample="removeSample($event)"
|
||||
></downloadable-sample-item>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
|
@ -273,11 +265,10 @@
|
|||
</script>
|
||||
|
||||
<script>
|
||||
var downloadableLinks = @json($product->downloadable_links);
|
||||
var downloadableSamples = @json($product->downloadable_samples);
|
||||
let downloadableLinks = @json($product->downloadable_links);
|
||||
let downloadableSamples = @json($product->downloadable_samples);
|
||||
|
||||
Vue.component('downloadable-link-list', {
|
||||
|
||||
template: '#downloadable-link-list-template',
|
||||
|
||||
inject: ['$validator'],
|
||||
|
|
@ -291,17 +282,17 @@
|
|||
},
|
||||
|
||||
created: function() {
|
||||
var index = 0;
|
||||
let index = 0;
|
||||
|
||||
for (var key in this.old_links) {
|
||||
var link = this.old_links[key];
|
||||
for (let key in this.old_links) {
|
||||
let link = this.old_links[key];
|
||||
|
||||
if (key.indexOf('link_') !== -1) {
|
||||
link['title'] = link["{{$locale}}"]['title'];
|
||||
|
||||
downloadableLinks.push(link);
|
||||
} else {
|
||||
for (var code in link) {
|
||||
for (let code in link) {
|
||||
if (code === "{{$locale}}") {
|
||||
downloadableLinks[index]['title'] = link[code]['title'];
|
||||
} else {
|
||||
|
|
@ -341,7 +332,6 @@
|
|||
});
|
||||
|
||||
Vue.component('downloadable-link-item', {
|
||||
|
||||
template: '#downloadable-link-item-template',
|
||||
|
||||
props: ['index', 'link'],
|
||||
|
|
@ -356,17 +346,17 @@
|
|||
},
|
||||
|
||||
created: function() {
|
||||
var index = 0;
|
||||
let index = 0;
|
||||
|
||||
for (var key in this.old_links) {
|
||||
var link = this.old_links[key];
|
||||
for (let key in this.old_links) {
|
||||
let link = this.old_links[key];
|
||||
|
||||
if (key.indexOf('link_') !== -1) {
|
||||
link['title'] = link["{{$locale}}"]['title'];
|
||||
|
||||
downloadableLinks.push(link);
|
||||
} else {
|
||||
for (var code in link) {
|
||||
for (let code in link) {
|
||||
if (code === "{{$locale}}") {
|
||||
downloadableLinks[index]['title'] = link[code]['title'];
|
||||
} else {
|
||||
|
|
@ -401,7 +391,7 @@
|
|||
},
|
||||
|
||||
uploadFile: function(type) {
|
||||
var this_this = this;
|
||||
let self = this;
|
||||
|
||||
this[type] = this.$refs[type].files[0];
|
||||
|
||||
|
|
@ -411,7 +401,7 @@
|
|||
|
||||
this.$http.post("{{ route('admin.catalog.products.upload_link', $product->id) }}", formData, { headers: { 'Content-Type': 'multipart/form-data' } })
|
||||
.then(function(response) {
|
||||
Object.assign(this_this.link, response.data);
|
||||
Object.assign(self.link, response.data);
|
||||
})
|
||||
.catch(function() {});
|
||||
}
|
||||
|
|
@ -420,7 +410,6 @@
|
|||
});
|
||||
|
||||
Vue.component('downloadable-sample-list', {
|
||||
|
||||
template: '#downloadable-sample-list-template',
|
||||
|
||||
inject: ['$validator'],
|
||||
|
|
@ -434,17 +423,17 @@
|
|||
},
|
||||
|
||||
created: function() {
|
||||
var index = 0;
|
||||
let index = 0;
|
||||
|
||||
for (var key in this.old_samples) {
|
||||
var sample = this.old_samples[key];
|
||||
for (let key in this.old_samples) {
|
||||
let sample = this.old_samples[key];
|
||||
|
||||
if (key.indexOf('sample_') !== -1) {
|
||||
sample['title'] = sample["{{$locale}}"]['title'];
|
||||
|
||||
downloadableSamples.push(sample);
|
||||
} else {
|
||||
for (var code in sample) {
|
||||
for (let code in sample) {
|
||||
if (code === "{{$locale}}") {
|
||||
downloadableSamples[index]['title'] = sample[code]['title'];
|
||||
} else {
|
||||
|
|
@ -479,7 +468,6 @@
|
|||
});
|
||||
|
||||
Vue.component('downloadable-sample-item', {
|
||||
|
||||
template: '#downloadable-sample-item-template',
|
||||
|
||||
props: ['index', 'sample'],
|
||||
|
|
@ -514,7 +502,7 @@
|
|||
},
|
||||
|
||||
uploadFile: function(type) {
|
||||
var this_this = this;
|
||||
let self = this;
|
||||
|
||||
this.file = this.$refs.file.files[0];
|
||||
|
||||
|
|
@ -524,7 +512,7 @@
|
|||
|
||||
this.$http.post("{{ route('admin.catalog.products.upload_sample', $product->id) }}", formData, { headers: { 'Content-Type': 'multipart/form-data' } })
|
||||
.then(function(response) {
|
||||
Object.assign(this_this.sample, response.data);
|
||||
Object.assign(self.sample, response.data);
|
||||
})
|
||||
.catch(function() {});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
@section('css')
|
||||
@parent
|
||||
@push('css')
|
||||
<style>
|
||||
.table th.price, .table th.weight {
|
||||
width: 100px;
|
||||
|
|
@ -14,7 +13,7 @@
|
|||
margin-right: 10px;
|
||||
}
|
||||
</style>
|
||||
@stop
|
||||
@endpush
|
||||
|
||||
{!! view_render_event('bagisto.admin.catalog.product.edit_form_accordian.grouped_products.before', ['product' => $product]) !!}
|
||||
|
||||
|
|
@ -33,8 +32,6 @@
|
|||
{!! view_render_event('bagisto.admin.catalog.product.edit_form_accordian.grouped_products.after', ['product' => $product]) !!}
|
||||
|
||||
@push('scripts')
|
||||
@parent
|
||||
|
||||
<script type="text/x-template" id="grouped-product-list-template">
|
||||
<div>
|
||||
<div class="control-group">
|
||||
|
|
@ -58,10 +55,9 @@
|
|||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="table" style="margin-top: 20px; overflow-x: unset;">
|
||||
<table>
|
||||
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="name">{{ __('admin::app.catalog.products.name') }}</th>
|
||||
|
|
@ -77,7 +73,6 @@
|
|||
<grouped-product-item v-for='(groupedProduct, index) in grouped_products' :grouped-product="groupedProduct" :key="index" :index="index" @onRemoveGroupedProduct="removeGroupedProduct($event)"></grouped-product-item>
|
||||
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -114,7 +109,6 @@
|
|||
|
||||
<script>
|
||||
Vue.component('grouped-product-list', {
|
||||
|
||||
template: '#grouped-product-list-template',
|
||||
|
||||
inject: ['$validator'],
|
||||
|
|
@ -139,8 +133,8 @@
|
|||
|
||||
methods: {
|
||||
addGroupedProduct: function(item, key) {
|
||||
var alreadyAdded = false;
|
||||
|
||||
let alreadyAdded = false;
|
||||
|
||||
this.grouped_products.forEach(function(groupProduct) {
|
||||
if (item.id == groupProduct.associated_product.id) {
|
||||
alreadyAdded = true;
|
||||
|
|
@ -177,23 +171,22 @@
|
|||
return;
|
||||
}
|
||||
|
||||
var this_this = this;
|
||||
|
||||
let self = this;
|
||||
|
||||
this.$http.get ("{{ route('admin.catalog.products.search_simple_product') }}", {params: {query: this.search_term}})
|
||||
.then (function(response) {
|
||||
this_this.searched_results = response.data;
|
||||
self.searched_results = response.data;
|
||||
|
||||
this_this.is_searching = false;
|
||||
self.is_searching = false;
|
||||
})
|
||||
.catch (function (error) {
|
||||
this_this.is_searching = false;
|
||||
self.is_searching = false;
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Vue.component('grouped-product-item', {
|
||||
|
||||
template: '#grouped-product-item-template',
|
||||
|
||||
props: ['index', 'groupedProduct'],
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
<accordian :title="'{{ __('admin::app.catalog.products.images') }}'" :active="false">
|
||||
<div slot="body">
|
||||
|
||||
{!! view_render_event('bagisto.admin.catalog.product.edit_form_accordian.images.controls.before', ['product' => $product]) !!}
|
||||
|
||||
<div class="control-group {!! $errors->has('images.*') ? 'has-error' : '' !!}">
|
||||
|
|
@ -11,23 +10,25 @@
|
|||
<product-image></product-image>
|
||||
|
||||
<span class="control-error" v-if="{!! $errors->has('images.*') !!}">
|
||||
@php $count=1 @endphp
|
||||
@php $count = 1; @endphp
|
||||
|
||||
@foreach ($errors->get('images.*') as $key => $message)
|
||||
@php echo str_replace($key, 'Image'.$count, $message[0]); $count++ @endphp
|
||||
@php
|
||||
echo str_replace($key, 'Image'.$count, $message[0]);
|
||||
|
||||
$count++;
|
||||
@endphp
|
||||
@endforeach
|
||||
</span>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.admin.catalog.product.edit_form_accordian.images.controls.after', ['product' => $product]) !!}
|
||||
|
||||
</div>
|
||||
</accordian>
|
||||
|
||||
{!! view_render_event('bagisto.admin.catalog.product.edit_form_accordian.images.after', ['product' => $product]) !!}
|
||||
|
||||
@push('scripts')
|
||||
@parent
|
||||
|
||||
<script type="text/x-template" id="product-image-template">
|
||||
<div>
|
||||
<div class="image-wrapper">
|
||||
|
|
@ -62,9 +63,8 @@
|
|||
|
||||
<script>
|
||||
Vue.component('product-image', {
|
||||
|
||||
template: '#product-image-template',
|
||||
|
||||
|
||||
data: function() {
|
||||
return {
|
||||
images: @json($product->images),
|
||||
|
|
@ -82,18 +82,18 @@
|
|||
},
|
||||
|
||||
created: function() {
|
||||
var this_this = this;
|
||||
let self = this;
|
||||
|
||||
this.images.forEach(function(image) {
|
||||
this_this.items.push(image)
|
||||
self.items.push(image)
|
||||
|
||||
this_this.imageCount++;
|
||||
self.imageCount++;
|
||||
});
|
||||
},
|
||||
|
||||
methods: {
|
||||
createFileType: function() {
|
||||
var this_this = this;
|
||||
let self = this;
|
||||
|
||||
this.imageCount++;
|
||||
|
||||
|
|
@ -107,13 +107,13 @@
|
|||
},
|
||||
|
||||
imageSelected: function(event) {
|
||||
var this_this = this;
|
||||
let self = this;
|
||||
|
||||
Array.from(event.files).forEach(function(image, index) {
|
||||
if (index) {
|
||||
this_this.imageCount++;
|
||||
self.imageCount++;
|
||||
|
||||
this_this.items.push({'id': 'image_' + this_this.imageCount, file: image});
|
||||
self.items.push({'id': 'image_' + self.imageCount, file: image});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -121,7 +121,6 @@
|
|||
});
|
||||
|
||||
Vue.component('product-image-item', {
|
||||
|
||||
template: '#product-image-item-template',
|
||||
|
||||
props: {
|
||||
|
|
@ -156,7 +155,7 @@
|
|||
|
||||
methods: {
|
||||
addImageView: function() {
|
||||
var imageInput = this.$refs.imageInput;
|
||||
let imageInput = this.$refs.imageInput;
|
||||
|
||||
if (imageInput.files && imageInput.files[0]) {
|
||||
if (imageInput.files[0].type.includes('image/')) {
|
||||
|
|
@ -174,7 +173,7 @@
|
|||
},
|
||||
|
||||
readFile: function(image) {
|
||||
var reader = new FileReader();
|
||||
let reader = new FileReader();
|
||||
|
||||
reader.onload = (e) => {
|
||||
this.imageData = e.target.result;
|
||||
|
|
@ -191,5 +190,4 @@
|
|||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
@endpush
|
||||
|
|
@ -1,6 +1,4 @@
|
|||
@section('css')
|
||||
@parent
|
||||
|
||||
@push('css')
|
||||
<style>
|
||||
.table th.price, .table th.weight {
|
||||
width: 100px;
|
||||
|
|
@ -18,7 +16,7 @@
|
|||
margin-right: 10px;
|
||||
}
|
||||
</style>
|
||||
@stop
|
||||
@endpush
|
||||
|
||||
@php
|
||||
$variantImages = [];
|
||||
|
|
@ -59,8 +57,6 @@
|
|||
</modal>
|
||||
|
||||
@push('scripts')
|
||||
@parent
|
||||
|
||||
<script type="text/x-template" id="variant-form-template">
|
||||
<form method="POST" action="{{ route('admin.catalog.products.store') }}"
|
||||
data-vv-scope="add-variant-form" @submit.prevent="addVariant('add-variant-form')">
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
<accordian :title="'{{ __('admin::app.catalog.products.videos') }}'" :active="false">
|
||||
<div slot="body">
|
||||
|
||||
{!! view_render_event('bagisto.admin.catalog.product.edit_form_accordian.videos.controls.before', ['product' => $product]) !!}
|
||||
|
||||
<div class="control-group {!! $errors->has('videos.*') ? 'has-error' : '' !!}">
|
||||
|
|
@ -11,23 +10,25 @@
|
|||
<product-video></product-video>
|
||||
|
||||
<span class="control-error" v-if="{!! $errors->has('videos.*') !!}">
|
||||
@php $count=1 @endphp
|
||||
@php $count = 1; @endphp
|
||||
|
||||
@foreach ($errors->get('videos.*') as $key => $message)
|
||||
@php echo str_replace($key, 'Video'.$count, $message[0]); $count++ @endphp
|
||||
@php
|
||||
echo str_replace($key, 'Video'.$count, $message[0]);
|
||||
|
||||
$count++;
|
||||
@endphp
|
||||
@endforeach
|
||||
</span>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.admin.catalog.product.edit_form_accordian.videos.controls.after', ['product' => $product]) !!}
|
||||
|
||||
</div>
|
||||
</accordian>
|
||||
|
||||
{!! view_render_event('bagisto.admin.catalog.product.edit_form_accordian.videos.after', ['product' => $product]) !!}
|
||||
|
||||
@push('scripts')
|
||||
@parent
|
||||
|
||||
<script type="text/x-template" id="product-video-template">
|
||||
<div>
|
||||
<div class="image-wrapper">
|
||||
|
|
@ -65,9 +66,8 @@
|
|||
|
||||
<script>
|
||||
Vue.component('product-video', {
|
||||
|
||||
template: '#product-video-template',
|
||||
|
||||
|
||||
data: function() {
|
||||
return {
|
||||
videos: @json($product->videos),
|
||||
|
|
@ -85,18 +85,18 @@
|
|||
},
|
||||
|
||||
created: function() {
|
||||
var this_this = this;
|
||||
let self = this;
|
||||
|
||||
this.videos.forEach(function(video) {
|
||||
this_this.items.push(video)
|
||||
self.items.push(video)
|
||||
|
||||
this_this.videoCount++;
|
||||
self.videoCount++;
|
||||
});
|
||||
},
|
||||
|
||||
methods: {
|
||||
createFileType: function() {
|
||||
var this_this = this;
|
||||
let self = this;
|
||||
|
||||
this.videoCount++;
|
||||
|
||||
|
|
@ -110,13 +110,13 @@
|
|||
},
|
||||
|
||||
videoSelected: function(event) {
|
||||
var this_this = this;
|
||||
let self = this;
|
||||
|
||||
Array.from(event.files).forEach(function(video, index) {
|
||||
if (index) {
|
||||
this_this.videoCount++;
|
||||
self.videoCount++;
|
||||
|
||||
this_this.items.push({'id': 'video_' + this_this.videoCount, file: video});
|
||||
self.items.push({'id': 'video_' + self.videoCount, file: video});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -124,7 +124,6 @@
|
|||
});
|
||||
|
||||
Vue.component('product-video-item', {
|
||||
|
||||
template: '#product-video-item-template',
|
||||
|
||||
props: {
|
||||
|
|
@ -159,7 +158,7 @@
|
|||
|
||||
methods: {
|
||||
addVideoView: function() {
|
||||
var videoInput = this.$refs.videoInput;
|
||||
let videoInput = this.$refs.videoInput;
|
||||
|
||||
if (videoInput.files && videoInput.files[0]) {
|
||||
if (videoInput.files[0].type.includes('video/')) {
|
||||
|
|
@ -177,7 +176,7 @@
|
|||
},
|
||||
|
||||
readFile: function(video) {
|
||||
var reader = new FileReader();
|
||||
let reader = new FileReader();
|
||||
|
||||
reader.onload = (e) => {
|
||||
this.videoData = e.target.result;
|
||||
|
|
@ -194,5 +193,4 @@
|
|||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
@endpush
|
||||
|
|
@ -4,7 +4,7 @@
|
|||
{{ __('admin::app.catalog.products.add-title') }}
|
||||
@stop
|
||||
|
||||
@section('css')
|
||||
@push('css')
|
||||
<style>
|
||||
.table td .label {
|
||||
margin-right: 10px;
|
||||
|
|
@ -17,7 +17,7 @@
|
|||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
@stop
|
||||
@endpush
|
||||
|
||||
@section('content')
|
||||
<div class="content">
|
||||
|
|
@ -42,7 +42,9 @@
|
|||
<div class="page-content">
|
||||
@csrf()
|
||||
|
||||
<?php $familyId = request()->input('family') ?>
|
||||
@php
|
||||
$familyId = request()->input('family');
|
||||
@endphp
|
||||
|
||||
{!! view_render_event('bagisto.admin.catalog.product.create_form_accordian.general.before') !!}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
<html lang="{{ config('app.locale') }}">
|
||||
<head>
|
||||
<title>@yield('page_title')</title>
|
||||
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
|
@ -18,17 +19,16 @@
|
|||
|
||||
@yield('head')
|
||||
|
||||
@yield('css')
|
||||
@stack('css')
|
||||
|
||||
{!! view_render_event('bagisto.admin.layout.head') !!}
|
||||
|
||||
</head>
|
||||
|
||||
<body @if (core()->getCurrentLocale() && core()->getCurrentLocale()->direction == 'rtl') class="rtl" @endif style="scroll-behavior: smooth;">
|
||||
|
||||
{!! view_render_event('bagisto.admin.layout.body.before') !!}
|
||||
|
||||
<div id="app">
|
||||
|
||||
<flash-wrapper ref='flashes'></flash-wrapper>
|
||||
|
||||
{!! view_render_event('bagisto.admin.layout.nav-top.before') !!}
|
||||
|
|
@ -54,7 +54,6 @@
|
|||
{!! view_render_event('bagisto.admin.layout.content.after') !!}
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
|
@ -75,7 +74,9 @@
|
|||
</script>
|
||||
|
||||
<script type="text/javascript" src="{{ asset('vendor/webkul/admin/assets/js/admin.js') }}"></script>
|
||||
|
||||
<script type="text/javascript" src="{{ asset('vendor/webkul/ui/assets/js/ui.js') }}"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
window.addEventListener('DOMContentLoaded', function() {
|
||||
moveDown = 60;
|
||||
|
|
@ -147,10 +148,12 @@
|
|||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
@stack('scripts')
|
||||
|
||||
{!! view_render_event('bagisto.admin.layout.body.after') !!}
|
||||
|
||||
<div class="modal-overlay"></div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -6,15 +6,11 @@
|
|||
|
||||
@section('content')
|
||||
<div class="content">
|
||||
|
||||
<cart-rule></cart-rule>
|
||||
|
||||
</div>
|
||||
@stop
|
||||
|
||||
@push('scripts')
|
||||
@parent
|
||||
|
||||
<script type="text/x-template" id="cart-rule-template">
|
||||
<div>
|
||||
<form method="POST" action="{{ route('admin.cart-rules.store') }}" @submit.prevent="onSubmit">
|
||||
|
|
@ -368,7 +364,6 @@
|
|||
|
||||
<script>
|
||||
Vue.component('cart-rule', {
|
||||
|
||||
template: '#cart-rule-template',
|
||||
|
||||
inject: ['$validator'],
|
||||
|
|
@ -417,7 +412,6 @@
|
|||
});
|
||||
|
||||
Vue.component('cart-rule-condition-item', {
|
||||
|
||||
template: '#cart-rule-condition-item-template',
|
||||
|
||||
props: ['index', 'condition'],
|
||||
|
|
@ -587,12 +581,12 @@
|
|||
if (this.condition.attribute == '')
|
||||
return;
|
||||
|
||||
var this_this = this;
|
||||
let self = this;
|
||||
|
||||
var attributeIndex = this.attribute_type_indexes[this.condition.attribute.split("|")[0]];
|
||||
let attributeIndex = this.attribute_type_indexes[this.condition.attribute.split("|")[0]];
|
||||
|
||||
matchedAttribute = this.condition_attributes[attributeIndex]['children'].filter(function (attribute) {
|
||||
return attribute.key == this_this.condition.attribute;
|
||||
return attribute.key == self.condition.attribute;
|
||||
});
|
||||
|
||||
if (matchedAttribute[0]['type'] == 'multiselect' || matchedAttribute[0]['type'] == 'checkbox') {
|
||||
|
|
|
|||
|
|
@ -1,8 +1,3 @@
|
|||
<?php
|
||||
/** @var array $selectedOptionIds */
|
||||
/** @var \Webkul\CartRule\Models\CartRule $cartRule */
|
||||
?>
|
||||
|
||||
@extends('admin::layouts.content')
|
||||
|
||||
@section('page_title')
|
||||
|
|
@ -11,15 +6,11 @@
|
|||
|
||||
@section('content')
|
||||
<div class="content">
|
||||
|
||||
<cart-rule></cart-rule>
|
||||
|
||||
</div>
|
||||
@stop
|
||||
|
||||
@push('scripts')
|
||||
@parent
|
||||
|
||||
<script type="text/x-template" id="cart-rule-template">
|
||||
<div>
|
||||
<form method="POST" action="{{ route('admin.cart-rules.update', $cartRule->id) }}" @submit.prevent="onSubmit">
|
||||
|
|
@ -51,12 +42,15 @@
|
|||
|
||||
<div class="control-group" :class="[errors.has('name') ? 'has-error' : '']">
|
||||
<label for="name" class="required">{{ __('admin::app.promotions.cart-rules.name') }}</label>
|
||||
|
||||
<input v-validate="'required'" class="control" id="name" name="name" data-vv-as=""{{ __('admin::app.promotions.cart-rules.name') }}"" value="{{ old('name') ?: $cartRule->name }}"/>
|
||||
|
||||
<span class="control-error" v-if="errors.has('name')">@{{ errors.first('name') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label for="description">{{ __('admin::app.promotions.cart-rules.description') }}</label>
|
||||
|
||||
<textarea class="control" id="description" name="description">{{ old('description') ?: $cartRule->description }}</textarea>
|
||||
</div>
|
||||
|
||||
|
|
@ -72,7 +66,9 @@
|
|||
<div class="control-group" :class="[errors.has('channels[]') ? 'has-error' : '']">
|
||||
<label for="channels" class="required">{{ __('admin::app.promotions.cart-rules.channels') }}</label>
|
||||
|
||||
<?php $selectedOptionIds = old('channels') ?: $cartRule->channels->pluck('id')->toArray() ?>
|
||||
@php
|
||||
$selectedOptionIds = old('channels') ?: $cartRule->channels->pluck('id')->toArray();
|
||||
@endphp
|
||||
|
||||
<select class="control" id="channels" name="channels[]" v-validate="'required'" data-vv-as=""{{ __('admin::app.promotions.cart-rules.channels') }}"" multiple="multiple">
|
||||
|
||||
|
|
@ -90,7 +86,9 @@
|
|||
<div class="control-group" :class="[errors.has('customer_groups[]') ? 'has-error' : '']">
|
||||
<label for="customer_groups" class="required">{{ __('admin::app.promotions.cart-rules.customer-groups') }}</label>
|
||||
|
||||
<?php $selectedOptionIds = old('customer_groups') ?: $cartRule->customer_groups->pluck('id')->toArray() ?>
|
||||
@php
|
||||
$selectedOptionIds = old('customer_groups') ?: $cartRule->customer_groups->pluck('id')->toArray();
|
||||
@endphp
|
||||
|
||||
<select class="control" id="customer_groups" name="customer_groups[]" v-validate="'required'" data-vv-as=""{{ __('admin::app.promotions.cart-rules.customer-groups') }}"" multiple="multiple">
|
||||
|
||||
|
|
@ -131,25 +129,31 @@
|
|||
<div v-if="! parseInt(use_auto_generation)">
|
||||
<div class="control-group" :class="[errors.has('coupon_code') ? 'has-error' : '']">
|
||||
<label for="coupon_code" class="required">{{ __('admin::app.promotions.cart-rules.coupon-code') }}</label>
|
||||
|
||||
<input v-validate="'required'" class="control" id="coupon_code" name="coupon_code" data-vv-as=""{{ __('admin::app.promotions.cart-rules.coupon-code') }}"" value="{{ old('coupon_code') ?: $cartRule->coupon_code }}"/>
|
||||
|
||||
<span class="control-error" v-if="errors.has('coupon_code')">@{{ errors.first('coupon_code') }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label for="uses_per_coupon">{{ __('admin::app.promotions.cart-rules.uses-per-coupon') }}</label>
|
||||
|
||||
<input class="control" id="uses_per_coupon" name="uses_per_coupon" value="{{ old('uses_per_coupon') ?: $cartRule->uses_per_coupon }}"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label for="usage_per_customer">{{ __('admin::app.promotions.cart-rules.uses-per-customer') }}</label>
|
||||
|
||||
<input class="control" id="usage_per_customer" name="usage_per_customer" value="{{ old('usage_per_customer') ?: $cartRule->usage_per_customer }}"/>
|
||||
|
||||
<span class="control-info">{{ __('admin::app.promotions.cart-rules.uses-per-customer-control-info') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="control-group date">
|
||||
<label for="starts_from">{{ __('admin::app.promotions.cart-rules.from') }}</label>
|
||||
|
||||
<datetime>
|
||||
<input type="text" name="starts_from" class="control" value="{{ old('starts_from') ?: $cartRule->starts_from }}"/>
|
||||
</datetime>
|
||||
|
|
@ -157,6 +161,7 @@
|
|||
|
||||
<div class="control-group date">
|
||||
<label for="ends_till">{{ __('admin::app.promotions.cart-rules.to') }}</label>
|
||||
|
||||
<datetime>
|
||||
<input type="text" name="ends_till" class="control" value="{{ old('ends_till') ?: $cartRule->ends_till }}"/>
|
||||
</datetime>
|
||||
|
|
@ -164,6 +169,7 @@
|
|||
|
||||
<div class="control-group">
|
||||
<label for="sort_order">{{ __('admin::app.promotions.cart-rules.priority') }}</label>
|
||||
|
||||
<input type="text" class="control" id="sort_order" name="sort_order" value="{{ $cartRule->sort_order }}" {{ $cartRule->sort_order ? 'checked' : '' }}/>
|
||||
</div>
|
||||
|
||||
|
|
@ -209,18 +215,23 @@
|
|||
<div class="control-group" :class="[errors.has('action_type') ? 'has-error' : '']">
|
||||
<label for="action_type" class="required">{{ __('admin::app.promotions.cart-rules.action-type') }}</label>
|
||||
|
||||
<?php $selectedOption = old('action_type') ?: $cartRule->action_type ?>
|
||||
@php
|
||||
$selectedOption = old('action_type') ?: $cartRule->action_type;
|
||||
@endphp
|
||||
|
||||
<select class="control" id="action_type" name="action_type" v-validate="'required'" v-model="action_type" data-vv-as=""{{ __('admin::app.promotions.cart-rules.action-type') }}"">
|
||||
<option value="by_percent" {{ $selectedOption == 'by_percent' ? 'selected' : '' }}>
|
||||
{{ __('admin::app.promotions.cart-rules.percentage-product-price') }}
|
||||
</option>
|
||||
|
||||
<option value="by_fixed" {{ $selectedOption == 'by_fixed' ? 'selected' : '' }}>
|
||||
{{ __('admin::app.promotions.cart-rules.fixed-amount') }}
|
||||
</option>
|
||||
|
||||
<option value="cart_fixed" {{ $selectedOption == 'cart_fixed' ? 'selected' : '' }}>
|
||||
{{ __('admin::app.promotions.cart-rules.fixed-amount-whole-cart') }}
|
||||
</option>
|
||||
|
||||
<option value="buy_x_get_y" {{ $selectedOption == 'buy_x_get_y' ? 'selected' : '' }}>
|
||||
{{ __('admin::app.promotions.cart-rules.buy-x-get-y-free') }}
|
||||
</option>
|
||||
|
|
@ -239,18 +250,22 @@
|
|||
|
||||
<div class="control-group">
|
||||
<label for="discount_quantity">{{ __('admin::app.promotions.cart-rules.discount-quantity') }}</label>
|
||||
|
||||
<input class="control" id="discount_quantity" name="discount_quantity" value="{{ old('discount_quantity') ?: $cartRule->discount_quantity }}"/>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label for="discount_step">{{ __('admin::app.promotions.cart-rules.discount-step') }}</label>
|
||||
|
||||
<input class="control" id="discount_step" name="discount_step" value="{{ old('discount_step') ?: $cartRule->discount_step }}"/>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label for="apply_to_shipping">{{ __('admin::app.promotions.cart-rules.apply-to-shipping') }}</label>
|
||||
|
||||
<?php $selectedOption = old('apply_to_shipping') ?: $cartRule->apply_to_shipping ?>
|
||||
@php
|
||||
$selectedOption = old('apply_to_shipping') ?: $cartRule->apply_to_shipping;
|
||||
@endphp
|
||||
|
||||
<select class="control" id="apply_to_shipping" name="apply_to_shipping" :disabled="action_type == 'cart_fixed'">
|
||||
<option value="0" {{ ! $selectedOption ? 'selected' : '' }}>
|
||||
|
|
@ -266,7 +281,9 @@
|
|||
<div class="control-group">
|
||||
<label for="free_shipping">{{ __('admin::app.promotions.cart-rules.free-shipping') }}</label>
|
||||
|
||||
<?php $selectedOption = old('free_shipping') ?: $cartRule->free_shipping ?>
|
||||
@php
|
||||
$selectedOption = old('free_shipping') ?: $cartRule->free_shipping;
|
||||
@endphp
|
||||
|
||||
<select class="control" id="free_shipping" name="free_shipping">
|
||||
<option value="0" {{ ! $selectedOption ? 'selected' : '' }}>
|
||||
|
|
@ -282,7 +299,9 @@
|
|||
<div class="control-group">
|
||||
<label for="end_other_rules">{{ __('admin::app.promotions.cart-rules.end-other-rules') }}</label>
|
||||
|
||||
<?php $selectedOption = old('end_other_rules') ?: $cartRule->end_other_rules ?>
|
||||
@php
|
||||
$selectedOption = old('end_other_rules') ?: $cartRule->end_other_rules;
|
||||
@endphp
|
||||
|
||||
<select class="control" id="end_other_rules" name="end_other_rules">
|
||||
<option value="0" {{ ! $selectedOption ? 'selected' : '' }}>
|
||||
|
|
@ -305,9 +324,7 @@
|
|||
|
||||
<accordian :title="'{{ __('admin::app.promotions.cart-rules.coupon-codes') }}'" :active="false" v-if="coupon_type && use_auto_generation">
|
||||
<div slot="body">
|
||||
|
||||
<create-coupon-form></create-coupon-form>
|
||||
|
||||
</div>
|
||||
</accordian>
|
||||
</div>
|
||||
|
|
@ -457,7 +474,6 @@
|
|||
|
||||
</form>
|
||||
|
||||
|
||||
<div class="content">
|
||||
<div class="page-header">
|
||||
<div class="page-action">
|
||||
|
|
@ -471,7 +487,6 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<modal id="downloadDataGrid" :is-open="this.$root.modalIds.downloadDataGrid">
|
||||
<h3 slot="header">{{ __('admin::app.export.download') }}</h3>
|
||||
<div slot="body">
|
||||
|
|
@ -486,12 +501,11 @@
|
|||
</script>
|
||||
|
||||
@push('scripts')
|
||||
@include('admin::export.export', ['gridName' => $cartRuleCouponGrid])
|
||||
@endpush
|
||||
@include('admin::export.export', ['gridName' => $cartRuleCouponGrid])
|
||||
@endpush
|
||||
|
||||
<script>
|
||||
Vue.component('cart-rule', {
|
||||
|
||||
template: '#cart-rule-template',
|
||||
|
||||
inject: ['$validator'],
|
||||
|
|
@ -536,7 +550,6 @@
|
|||
});
|
||||
|
||||
Vue.component('cart-rule-condition-item', {
|
||||
|
||||
template: '#cart-rule-condition-item-template',
|
||||
|
||||
props: ['index', 'condition'],
|
||||
|
|
@ -706,12 +719,12 @@
|
|||
if (this.condition.attribute == '')
|
||||
return;
|
||||
|
||||
var this_this = this;
|
||||
let self = this;
|
||||
|
||||
var attributeIndex = this.attribute_type_indexes[this.condition.attribute.split("|")[0]];
|
||||
let attributeIndex = this.attribute_type_indexes[this.condition.attribute.split("|")[0]];
|
||||
|
||||
matchedAttribute = this.condition_attributes[attributeIndex]['children'].filter(function (attribute) {
|
||||
return attribute.key == this_this.condition.attribute;
|
||||
return attribute.key == self.condition.attribute;
|
||||
});
|
||||
|
||||
if (matchedAttribute[0]['type'] == 'multiselect' || matchedAttribute[0]['type'] == 'checkbox') {
|
||||
|
|
@ -734,7 +747,6 @@
|
|||
});
|
||||
|
||||
Vue.component('create-coupon-form', {
|
||||
|
||||
template: '#create-coupon-form-template',
|
||||
|
||||
inject: ['$validator'],
|
||||
|
|
@ -757,18 +769,18 @@
|
|||
|
||||
methods: {
|
||||
generateCopuns: function(formScope) {
|
||||
var this_this = this;
|
||||
let self = this;
|
||||
|
||||
this.$validator.validateAll(formScope).then(function (result) {
|
||||
if (result) {
|
||||
this_this.$http.post("{{ route('admin.cart-rules.generate-coupons', $cartRule->id) }}", this_this.coupon_format)
|
||||
self.$http.post("{{ route('admin.cart-rules.generate-coupons', $cartRule->id) }}", self.coupon_format)
|
||||
.then(function(response) {
|
||||
window.flashMessages = [{
|
||||
'type': 'alert-success',
|
||||
'message': response.data.message
|
||||
}];
|
||||
|
||||
this_this.$root.addFlashMessages()
|
||||
self.$root.addFlashMessages()
|
||||
})
|
||||
.catch(function (error) {
|
||||
window.flashMessages = [{
|
||||
|
|
@ -776,7 +788,7 @@
|
|||
'message': error.response.data.message
|
||||
}];
|
||||
|
||||
this_this.$root.addFlashMessages()
|
||||
self.$root.addFlashMessages()
|
||||
})
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -6,15 +6,11 @@
|
|||
|
||||
@section('content')
|
||||
<div class="content">
|
||||
|
||||
<catalog-rule></catalog-rule>
|
||||
|
||||
</div>
|
||||
@stop
|
||||
|
||||
@push('scripts')
|
||||
@parent
|
||||
|
||||
<script type="text/x-template" id="catalog-rule-template">
|
||||
<div>
|
||||
<form method="POST" action="{{ route('admin.catalog-rules.store') }}" @submit.prevent="onSubmit">
|
||||
|
|
@ -43,7 +39,6 @@
|
|||
|
||||
<accordian :title="'{{ __('admin::app.promotions.catalog-rules.rule-information') }}'" :active="true">
|
||||
<div slot="body">
|
||||
|
||||
<div class="control-group" :class="[errors.has('name') ? 'has-error' : '']">
|
||||
<label for="name" class="required">{{ __('admin::app.promotions.catalog-rules.name') }}</label>
|
||||
<input v-validate="'required'" class="control" id="name" name="name" data-vv-as=""{{ __('admin::app.promotions.catalog-rules.name') }}"" value="{{ old('name') }}"/>
|
||||
|
|
@ -115,13 +110,11 @@
|
|||
<label for="sort_order">{{ __('admin::app.promotions.catalog-rules.priority') }}</label>
|
||||
<input type="text" class="control" id="sort_order" name="sort_order" value="{{ old('sort_order') ?? 0 }}"/>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</accordian>
|
||||
|
||||
<accordian :title="'{{ __('admin::app.promotions.catalog-rules.conditions') }}'" :active="false">
|
||||
<div slot="body">
|
||||
|
||||
<div class="control-group">
|
||||
<label for="condition_type">{{ __('admin::app.promotions.catalog-rules.condition-type') }}</label>
|
||||
|
||||
|
|
@ -148,13 +141,11 @@
|
|||
<button type="button" class="btn btn-lg btn-primary" style="margin-top: 20px;" @click="addCondition">
|
||||
{{ __('admin::app.promotions.catalog-rules.add-condition') }}
|
||||
</button>
|
||||
|
||||
</div>
|
||||
</accordian>
|
||||
|
||||
<accordian :title="'{{ __('admin::app.promotions.catalog-rules.actions') }}'" :active="false">
|
||||
<div slot="body">
|
||||
|
||||
<div class="control-group" :class="[errors.has('action_type') ? 'has-error' : '']">
|
||||
<label for="action_type" class="required">{{ __('admin::app.promotions.catalog-rules.action-type') }}</label>
|
||||
|
||||
|
|
@ -189,7 +180,6 @@
|
|||
</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</accordian>
|
||||
|
||||
|
|
@ -292,7 +282,6 @@
|
|||
|
||||
<script>
|
||||
Vue.component('catalog-rule', {
|
||||
|
||||
template: '#catalog-rule-template',
|
||||
|
||||
inject: ['$validator'],
|
||||
|
|
@ -335,7 +324,6 @@
|
|||
});
|
||||
|
||||
Vue.component('catalog-rule-condition-item', {
|
||||
|
||||
template: '#catalog-rule-condition-item-template',
|
||||
|
||||
props: ['index', 'condition'],
|
||||
|
|
@ -501,12 +489,12 @@
|
|||
if (this.condition.attribute == '')
|
||||
return;
|
||||
|
||||
var this_this = this;
|
||||
let self = this;
|
||||
|
||||
var attributeIndex = this.attribute_type_indexes[this.condition.attribute.split("|")[0]];
|
||||
let attributeIndex = this.attribute_type_indexes[this.condition.attribute.split("|")[0]];
|
||||
|
||||
matchedAttribute = this.condition_attributes[attributeIndex]['children'].filter(function (attribute) {
|
||||
return attribute.key == this_this.condition.attribute;
|
||||
return attribute.key == self.condition.attribute;
|
||||
});
|
||||
|
||||
if (matchedAttribute[0]['type'] == 'multiselect' || matchedAttribute[0]['type'] == 'checkbox') {
|
||||
|
|
|
|||
|
|
@ -6,15 +6,11 @@
|
|||
|
||||
@section('content')
|
||||
<div class="content">
|
||||
|
||||
<catalog-rule></catalog-rule>
|
||||
|
||||
</div>
|
||||
@stop
|
||||
|
||||
@push('scripts')
|
||||
@parent
|
||||
|
||||
<script type="text/x-template" id="catalog-rule-template">
|
||||
<div>
|
||||
<form method="POST" action="{{ route('admin.catalog-rules.update', $catalogRule->id) }}" @submit.prevent="onSubmit">
|
||||
|
|
@ -43,7 +39,6 @@
|
|||
|
||||
<accordian :title="'{{ __('admin::app.promotions.catalog-rules.rule-information') }}'" :active="true">
|
||||
<div slot="body">
|
||||
|
||||
<div class="control-group" :class="[errors.has('name') ? 'has-error' : '']">
|
||||
<label for="name" class="required">{{ __('admin::app.promotions.catalog-rules.name') }}</label>
|
||||
<input v-validate="'required'" class="control" id="name" name="name" data-vv-as=""{{ __('admin::app.promotions.catalog-rules.name') }}"" value="{{ old('name') ?: $catalogRule->name }}"/>
|
||||
|
|
@ -67,7 +62,9 @@
|
|||
<div class="control-group" :class="[errors.has('channels[]') ? 'has-error' : '']">
|
||||
<label for="channels" class="required">{{ __('admin::app.promotions.catalog-rules.channels') }}</label>
|
||||
|
||||
<?php $selectedOptionIds = old('channels') ?: $catalogRule->channels->pluck('id')->toArray() ?>
|
||||
@php
|
||||
$selectedOptionIds = old('channels') ?: $catalogRule->channels->pluck('id')->toArray();
|
||||
@endphp
|
||||
|
||||
<select class="control" id="channels" name="channels[]" v-validate="'required'" data-vv-as=""{{ __('admin::app.promotions.catalog-rules.channels') }}"" multiple="multiple">
|
||||
|
||||
|
|
@ -85,7 +82,9 @@
|
|||
<div class="control-group" :class="[errors.has('customer_groups[]') ? 'has-error' : '']">
|
||||
<label for="customer_groups" class="required">{{ __('admin::app.promotions.catalog-rules.customer-groups') }}</label>
|
||||
|
||||
<?php $selectedOptionIds = old('customer_groups') ?: $catalogRule->customer_groups->pluck('id')->toArray() ?>
|
||||
@php
|
||||
$selectedOptionIds = old('customer_groups') ?: $catalogRule->customer_groups->pluck('id')->toArray();
|
||||
@endphp
|
||||
|
||||
<select class="control" id="customer_groups" name="customer_groups[]" v-validate="'required'" data-vv-as=""{{ __('admin::app.promotions.catalog-rules.customer-groups') }}"" multiple="multiple">
|
||||
|
||||
|
|
@ -118,13 +117,11 @@
|
|||
<label for="sort_order">{{ __('admin::app.promotions.catalog-rules.priority') }}</label>
|
||||
<input type="text" class="control" id="sort_order" name="sort_order" value="{{ $catalogRule->sort_order }}" {{ $catalogRule->status ? 'checked' : '' }}/>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</accordian>
|
||||
|
||||
<accordian :title="'{{ __('admin::app.promotions.catalog-rules.conditions') }}'" :active="false">
|
||||
<div slot="body">
|
||||
|
||||
<div class="control-group">
|
||||
<label for="condition_type">{{ __('admin::app.promotions.catalog-rules.condition-type') }}</label>
|
||||
|
||||
|
|
@ -151,17 +148,17 @@
|
|||
<button type="button" class="btn btn-lg btn-primary" style="margin-top: 20px;" @click="addCondition">
|
||||
{{ __('admin::app.promotions.catalog-rules.add-condition') }}
|
||||
</button>
|
||||
|
||||
</div>
|
||||
</accordian>
|
||||
|
||||
<accordian :title="'{{ __('admin::app.promotions.catalog-rules.actions') }}'" :active="false">
|
||||
<div slot="body">
|
||||
|
||||
<div class="control-group" :class="[errors.has('action_type') ? 'has-error' : '']">
|
||||
<label for="action_type" class="required">{{ __('admin::app.promotions.catalog-rules.action-type') }}</label>
|
||||
|
||||
<?php $selectedOption = old('action_type') ?: $catalogRule->action_type ?>
|
||||
@php
|
||||
$selectedOption = old('action_type') ?: $catalogRule->action_type;
|
||||
@endphp
|
||||
|
||||
<select class="control" id="action_type" name="action_type" v-validate="'required'" data-vv-as=""{{ __('admin::app.promotions.catalog-rules.action-type') }}"">
|
||||
<option value="by_percent" {{ $selectedOption == 'by_percent' ? 'selected' : '' }}>
|
||||
|
|
@ -186,7 +183,9 @@
|
|||
<div class="control-group">
|
||||
<label for="end_other_rules">{{ __('admin::app.promotions.catalog-rules.end-other-rules') }}</label>
|
||||
|
||||
<?php $selectedOption = old('end_other_rules') ?: $catalogRule->end_other_rules ?>
|
||||
@php
|
||||
$selectedOption = old('end_other_rules') ?: $catalogRule->end_other_rules;
|
||||
@endphp
|
||||
|
||||
<select class="control" id="end_other_rules" name="end_other_rules">
|
||||
<option value="0" {{ ! $selectedOption ? 'selected' : '' }}>
|
||||
|
|
@ -198,7 +197,6 @@
|
|||
</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</accordian>
|
||||
|
||||
|
|
@ -301,7 +299,6 @@
|
|||
|
||||
<script>
|
||||
Vue.component('catalog-rule', {
|
||||
|
||||
template: '#catalog-rule-template',
|
||||
|
||||
inject: ['$validator'],
|
||||
|
|
@ -340,7 +337,6 @@
|
|||
});
|
||||
|
||||
Vue.component('catalog-rule-condition-item', {
|
||||
|
||||
template: '#catalog-rule-condition-item-template',
|
||||
|
||||
props: ['index', 'condition'],
|
||||
|
|
@ -506,12 +502,12 @@
|
|||
if (this.condition.attribute == '')
|
||||
return;
|
||||
|
||||
var this_this = this;
|
||||
let self = this;
|
||||
|
||||
var attributeIndex = this.attribute_type_indexes[this.condition.attribute.split("|")[0]];
|
||||
let attributeIndex = this.attribute_type_indexes[this.condition.attribute.split("|")[0]];
|
||||
|
||||
matchedAttribute = this.condition_attributes[attributeIndex]['children'].filter(function (attribute) {
|
||||
return attribute.key == this_this.condition.attribute;
|
||||
return attribute.key == self.condition.attribute;
|
||||
});
|
||||
|
||||
if (matchedAttribute[0]['type'] == 'multiselect' || matchedAttribute[0]['type'] == 'checkbox') {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
{{ __('admin::app.users.forget-password.title') }}
|
||||
@stop
|
||||
|
||||
@section('css')
|
||||
@push('css')
|
||||
<style>
|
||||
.button-group {
|
||||
margin-bottom: 25px;
|
||||
|
|
@ -13,16 +13,12 @@
|
|||
vertical-align: middle;
|
||||
}
|
||||
</style>
|
||||
@stop
|
||||
@endpush
|
||||
|
||||
@section('content')
|
||||
|
||||
<div class="panel">
|
||||
|
||||
<div class="panel-content">
|
||||
|
||||
<div class="form-container" style="text-align: left">
|
||||
|
||||
<h1>{{ __('admin::app.users.forget-password.header-title') }}</h1>
|
||||
|
||||
<form method="POST" action="{{ route('admin.forget-password.store') }}" @submit.prevent="onSubmit">
|
||||
|
|
@ -33,7 +29,7 @@
|
|||
<input type="text" v-validate="'required'" class="control" id="email" name="email" data-vv-as=""{{ __('admin::app.users.forget-password.email') }}"" value="{{ old('email') }}"/>
|
||||
<span class="control-error" v-if="errors.has('email')">@{{ errors.first('email') }}</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="button-group">
|
||||
<button class="btn btn-xl btn-primary">{{ __('admin::app.users.forget-password.submit-btn-title') }}</button>
|
||||
</div>
|
||||
|
|
@ -45,11 +41,7 @@
|
|||
</a>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@stop
|
||||
|
|
@ -4,7 +4,7 @@
|
|||
{{ __('admin::app.users.reset-password.title') }}
|
||||
@stop
|
||||
|
||||
@section('css')
|
||||
@push('css')
|
||||
<style>
|
||||
.button-group {
|
||||
margin-bottom: 25px;
|
||||
|
|
@ -13,16 +13,12 @@
|
|||
vertical-align: middle;
|
||||
}
|
||||
</style>
|
||||
@stop
|
||||
@endpush
|
||||
|
||||
@section('content')
|
||||
|
||||
<div class="panel">
|
||||
|
||||
<div class="panel-content">
|
||||
|
||||
<div class="form-container" style="text-align: left">
|
||||
|
||||
<h1>{{ __('admin::app.users.reset-password.title') }}</h1>
|
||||
|
||||
<form method="POST" action="{{ route('admin.reset-password.store') }}" @submit.prevent="onSubmit">
|
||||
|
|
@ -47,7 +43,7 @@
|
|||
<input type="password" v-validate="'required|min:6|confirmed:password'" class="control" id="password_confirmation" name="password_confirmation" data-vv-as=""{{ __('admin::app.users.reset-password.confirm-password') }}"" data-vv-as="password"/>
|
||||
<span class="control-error" v-if="errors.has('password_confirmation')">@{{ errors.first('password_confirmation') }}</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="button-group">
|
||||
<button type="submit" class="btn btn-xl btn-primary">{{ __('admin::app.users.reset-password.submit-btn-title') }}</button>
|
||||
</div>
|
||||
|
|
@ -59,11 +55,7 @@
|
|||
</a>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@stop
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
@section('css')
|
||||
@push('css')
|
||||
<style>
|
||||
.has-control-group .control-group {
|
||||
width: 50%;
|
||||
|
|
@ -13,28 +13,25 @@
|
|||
padding-left: 10px;
|
||||
}
|
||||
</style>
|
||||
@stop
|
||||
@endpush
|
||||
|
||||
{!! view_render_event('bagisto.admin.catalog.product.edit_form_accordian.booking.before', ['product' => $product]) !!}
|
||||
|
||||
<accordian :title="'{{ __('bookingproduct::app.admin.catalog.products.booking') }}'" :active="true">
|
||||
<div slot="body">
|
||||
|
||||
<booking-information></booking-information>
|
||||
|
||||
</div>
|
||||
</accordian>
|
||||
|
||||
{!! view_render_event('bagisto.admin.catalog.product.edit_form_accordian.booking.after', ['product' => $product]) !!}
|
||||
|
||||
@push('scripts')
|
||||
<?php $bookingProduct = app('\Webkul\BookingProduct\Repositories\BookingProductRepository')->findOneByField('product_id', $product->id) ?>
|
||||
|
||||
@parent
|
||||
@php
|
||||
$bookingProduct = app('\Webkul\BookingProduct\Repositories\BookingProductRepository')->findOneByField('product_id', $product->id)
|
||||
@endphp
|
||||
|
||||
<script type="text/x-template" id="booking-information-template">
|
||||
<div>
|
||||
|
||||
<div class="control-group" :class="[errors.has('booking[type]') ? 'has-error' : '']">
|
||||
<label class="required">{{ __('bookingproduct::app.admin.catalog.products.booking-type') }}</label>
|
||||
|
||||
|
|
@ -47,20 +44,20 @@
|
|||
<option value="rental">{{ __('bookingproduct::app.admin.catalog.products.rental-booking') }}</option>
|
||||
<option value="table">{{ __('bookingproduct::app.admin.catalog.products.table-booking') }}</option>
|
||||
</select>
|
||||
|
||||
|
||||
<span class="control-error" v-if="errors.has('booking[type]')">@{{ errors.first('booking[type]') }}</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="control-group">
|
||||
<label>{{ __('bookingproduct::app.admin.catalog.products.location') }}</label>
|
||||
<input type="text" name="booking[location]" v-model="booking.location" class="control"/>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="control-group" :class="[errors.has('booking[qty]') ? 'has-error' : '']" v-if="booking.type == 'default' || booking.type == 'appointment' || booking.type == 'rental'">
|
||||
<label class="required">{{ __('bookingproduct::app.admin.catalog.products.qty') }}</label>
|
||||
|
||||
<input type="text" v-validate="'required|numeric|min:0'" name="booking[qty]" v-model="booking.qty" class="control" data-vv-as=""{{ __('bookingproduct::app.admin.catalog.products.qty') }}""/>
|
||||
|
||||
|
||||
<span class="control-error" v-if="errors.has('booking[qty]')">@{{ errors.first('booking[qty]') }}</span>
|
||||
</div>
|
||||
|
||||
|
|
@ -71,7 +68,7 @@
|
|||
<option value="1">{{ __('bookingproduct::app.admin.catalog.products.yes') }}</option>
|
||||
<option value="0">{{ __('bookingproduct::app.admin.catalog.products.no') }}</option>
|
||||
</select>
|
||||
|
||||
|
||||
<span class="control-error" v-if="errors.has('booking[available_every_week]')">@{{ errors.first('booking[available_every_week]') }}</span>
|
||||
</div>
|
||||
|
||||
|
|
@ -82,7 +79,7 @@
|
|||
<datetime>
|
||||
<input type="text" v-validate="'required|date_format:yyyy-MM-dd HH:mm:ss|after:{{\Carbon\Carbon::yesterday()->format('Y-m-d 23:59:59')}}'" name="booking[available_from]" v-model="booking.available_from" class="control" data-vv-as=""{{ __('bookingproduct::app.admin.catalog.products.available-from') }}"" ref="available_from"/>
|
||||
</datetime>
|
||||
|
||||
|
||||
<span class="control-error" v-if="errors.has('booking[available_from]')">@{{ errors.first('booking[available_from]') }}</span>
|
||||
</div>
|
||||
|
||||
|
|
@ -92,7 +89,7 @@
|
|||
<datetime>
|
||||
<input type="text" v-validate="'required|date_format:yyyy-MM-dd HH:mm:ss|after:available_from'" name="booking[available_to]" v-model="booking.available_to" class="control" data-vv-as=""{{ __('bookingproduct::app.admin.catalog.products.available-to') }}"" ref="available_to"/>
|
||||
</datetime>
|
||||
|
||||
|
||||
<span class="control-error" v-if="errors.has('booking[available_to]')">@{{ errors.first('booking[available_to]') }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -116,15 +113,13 @@
|
|||
<div class="table-booking-section" v-if="booking.type == 'table'">
|
||||
@include ('bookingproduct::admin.catalog.products.accordians.booking.table', ['bookingProduct' => $bookingProduct])
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</script>
|
||||
|
||||
<script>
|
||||
var bookingProduct = @json($bookingProduct);
|
||||
let bookingProduct = @json($bookingProduct);
|
||||
|
||||
Vue.component('booking-information', {
|
||||
|
||||
template: '#booking-information-template',
|
||||
|
||||
inject: ['$validator'],
|
||||
|
|
@ -153,12 +148,10 @@
|
|||
created: function() {
|
||||
this.booking.available_from = "{{ $bookingProduct && $bookingProduct->available_from ? $bookingProduct->available_from->format('Y-m-d H:i:s') : '' }}";
|
||||
|
||||
|
||||
this.booking.available_to = "{{ $bookingProduct && $bookingProduct->available_to ? $bookingProduct->available_to->format('Y-m-d H:i:s') : '' }}";
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
@include ('bookingproduct::admin.catalog.products.accordians.booking.slots')
|
||||
|
||||
@endpush
|
||||
|
|
@ -5,15 +5,13 @@
|
|||
{!! view_render_event('bagisto.admin.catalog.product.edit_form_accordian.booking.appointment.after', ['product' => $product]) !!}
|
||||
|
||||
@push('scripts')
|
||||
@parent
|
||||
|
||||
<script type="text/x-template" id="appointment-booking-template">
|
||||
<div>
|
||||
<div class="control-group" :class="[errors.has('booking[duration]') ? 'has-error' : '']">
|
||||
<label class="required">{{ __('bookingproduct::app.admin.catalog.products.slot-duration') }}</label>
|
||||
|
||||
<input type="text" v-validate="'required|min_value:1'" name="booking[duration]" v-model="appointment_booking.duration" class="control" data-vv-as=""{{ __('bookingproduct::app.admin.catalog.products.slot-duration') }}""/>
|
||||
|
||||
|
||||
<span class="control-error" v-if="errors.has('booking[duration]')">@{{ errors.first('booking[duration]') }}</span>
|
||||
</div>
|
||||
|
||||
|
|
@ -21,7 +19,7 @@
|
|||
<label class="required">{{ __('bookingproduct::app.admin.catalog.products.break-time') }}</label>
|
||||
|
||||
<input type="text" v-validate="'required|min_value:1'" name="booking[break_time]" v-model="appointment_booking.break_time" class="control" data-vv-as=""{{ __('bookingproduct::app.admin.catalog.products.break-time') }}""/>
|
||||
|
||||
|
||||
<span class="control-error" v-if="errors.has('booking[break_time]')">@{{ errors.first('booking[break_time]') }}</span>
|
||||
</div>
|
||||
|
||||
|
|
@ -32,7 +30,7 @@
|
|||
<option value="1">{{ __('bookingproduct::app.admin.catalog.products.yes') }}</option>
|
||||
<option value="0">{{ __('bookingproduct::app.admin.catalog.products.no') }}</option>
|
||||
</select>
|
||||
|
||||
|
||||
<span class="control-error" v-if="errors.has('booking[same_slot_all_days]')">@{{ errors.first('booking[same_slot_all_days]') }}</span>
|
||||
</div>
|
||||
|
||||
|
|
@ -42,12 +40,10 @@
|
|||
</div>
|
||||
|
||||
<div class="section-content">
|
||||
|
||||
<slot-list
|
||||
booking-type="appointment_slot"
|
||||
:same-slot-all-days="appointment_booking.same_slot_all_days">
|
||||
</slot-list>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -55,7 +51,6 @@
|
|||
|
||||
<script>
|
||||
Vue.component('appointment-booking', {
|
||||
|
||||
template: '#appointment-booking-template',
|
||||
|
||||
inject: ['$validator'],
|
||||
|
|
|
|||
|
|
@ -4,8 +4,7 @@
|
|||
|
||||
{!! view_render_event('bagisto.admin.catalog.product.edit_form_accordian.booking.table.after', ['product' => $product]) !!}
|
||||
|
||||
|
||||
@section('css')
|
||||
@push('css')
|
||||
<style>
|
||||
.has-control-group .control-group {
|
||||
width: 50%;
|
||||
|
|
@ -20,11 +19,9 @@
|
|||
padding-left: 10px;
|
||||
}
|
||||
</style>
|
||||
@stop
|
||||
@endpush
|
||||
|
||||
@push('scripts')
|
||||
@parent
|
||||
|
||||
<script type="text/x-template" id="default-booking-template">
|
||||
<div>
|
||||
<div class="control-group" :class="[errors.has('booking[booking_type]') ? 'has-error' : '']">
|
||||
|
|
@ -34,16 +31,16 @@
|
|||
<option value="many">{{ __('bookingproduct::app.admin.catalog.products.many-bookings-for-one-day') }}</option>
|
||||
<option value="one">{{ __('bookingproduct::app.admin.catalog.products.one-booking-for-many-days') }}</option>
|
||||
</select>
|
||||
|
||||
|
||||
<span class="control-error" v-if="errors.has('booking[booking_type]')">@{{ errors.first('booking[booking_type]') }}</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div v-if="default_booking.booking_type == 'many'">
|
||||
<div class="control-group" :class="[errors.has('booking[duration]') ? 'has-error' : '']">
|
||||
<label class="required">{{ __('bookingproduct::app.admin.catalog.products.slot-duration') }}</label>
|
||||
|
||||
<input type="text" v-validate="'required|min_value:1'" name="booking[duration]" v-model="default_booking.duration" class="control" data-vv-as=""{{ __('bookingproduct::app.admin.catalog.products.slot-duration') }}""/>
|
||||
|
||||
|
||||
<span class="control-error" v-if="errors.has('booking[duration]')">@{{ errors.first('booking[duration]') }}</span>
|
||||
</div>
|
||||
|
||||
|
|
@ -51,7 +48,7 @@
|
|||
<label class="required">{{ __('bookingproduct::app.admin.catalog.products.break-time') }}</label>
|
||||
|
||||
<input type="text" v-validate="'required|min_value:1'" name="booking[break_time]" v-model="default_booking.break_time" class="control" data-vv-as=""{{ __('bookingproduct::app.admin.catalog.products.break-time') }}""/>
|
||||
|
||||
|
||||
<span class="control-error" v-if="errors.has('booking[break_time]')">@{{ errors.first('booking[break_time]') }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -62,7 +59,6 @@
|
|||
</div>
|
||||
|
||||
<div class="section-content">
|
||||
|
||||
<div class="slot-list table" v-if="default_booking.booking_type == 'many'">
|
||||
<table>
|
||||
<thead>
|
||||
|
|
@ -75,7 +71,6 @@
|
|||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
<tr v-for="(day, index) in days">
|
||||
<td>@{{ day }}</td>
|
||||
|
||||
|
|
@ -109,18 +104,16 @@
|
|||
<option value="1">{{ __('bookingproduct::app.admin.catalog.products.open') }}</option>
|
||||
<option value="0">{{ __('bookingproduct::app.admin.catalog.products.close') }}</option>
|
||||
</select>
|
||||
|
||||
|
||||
<span class="control-error" v-if="errors.has('booking[slots][' + index + '][status]')">@{{ errors.first('booking[slots][' + index + '][status]') }}</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="slot-list table" v-if="default_booking.booking_type == 'one'">
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
|
|
@ -146,9 +139,7 @@
|
|||
<button type="button" class="btn btn-lg btn-primary" style="margin-top: 20px" @click="addSlot()">
|
||||
{{ __('bookingproduct::app.admin.catalog.products.add-slot') }}
|
||||
</button>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -161,7 +152,7 @@
|
|||
<select v-validate="'required'" :name="controlName + '[from_day]'" v-model="slotItem.from_day" class="control" data-vv-as=""{{ __('bookingproduct::app.admin.catalog.products.day') }}"">
|
||||
<option v-for="(day, index) in $parent.days" :value="index">@{{ day }}</option>
|
||||
</select>
|
||||
|
||||
|
||||
<span class="control-error" v-if="errors.has(controlName + '[from_day]')">@{{ errors.first(controlName + '[from_day]') }}</span>
|
||||
</div>
|
||||
|
||||
|
|
@ -181,7 +172,7 @@
|
|||
<select v-validate="'required'" :name="controlName + '[to_day]'" v-model="slotItem.to_day" class="control" data-vv-as=""{{ __('bookingproduct::app.admin.catalog.products.day') }}"">
|
||||
<option v-for="(day, index) in $parent.days" :value="index">@{{ day }}</option>
|
||||
</select>
|
||||
|
||||
|
||||
<span class="control-error" v-if="errors.has(controlName + '[to_day]')">@{{ errors.first(controlName + '[to_day]') }}</span>
|
||||
</div>
|
||||
|
||||
|
|
@ -204,7 +195,6 @@
|
|||
|
||||
<script>
|
||||
Vue.component('default-booking', {
|
||||
|
||||
template: '#default-booking-template',
|
||||
|
||||
inject: ['$validator'],
|
||||
|
|
@ -270,7 +260,6 @@
|
|||
});
|
||||
|
||||
Vue.component('default-slot-item', {
|
||||
|
||||
template: '#default-slot-item-template',
|
||||
|
||||
props: ['slotItem', 'controlName'],
|
||||
|
|
|
|||
|
|
@ -5,8 +5,6 @@
|
|||
{!! view_render_event('bagisto.admin.catalog.product.edit_form_accordian.booking.event.after', ['product' => $product]) !!}
|
||||
|
||||
@push('scripts')
|
||||
@parent
|
||||
|
||||
<script type="text/x-template" id="event-booking-template">
|
||||
<div>
|
||||
<div class="section">
|
||||
|
|
@ -15,9 +13,7 @@
|
|||
</div>
|
||||
|
||||
<div class="section-content">
|
||||
|
||||
<ticket-list :tickets="tickets"></ticket-list>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -126,7 +122,6 @@
|
|||
|
||||
<script>
|
||||
Vue.component('event-booking', {
|
||||
|
||||
template: '#event-booking-template',
|
||||
|
||||
inject: ['$validator'],
|
||||
|
|
@ -139,7 +134,6 @@
|
|||
});
|
||||
|
||||
Vue.component('ticket-list', {
|
||||
|
||||
template: '#ticket-list-template',
|
||||
|
||||
props: ['tickets'],
|
||||
|
|
@ -168,7 +162,6 @@
|
|||
});
|
||||
|
||||
Vue.component('ticket-item', {
|
||||
|
||||
template: '#ticket-item-template',
|
||||
|
||||
props: ['index', 'ticketItem'],
|
||||
|
|
|
|||
|
|
@ -5,8 +5,6 @@
|
|||
{!! view_render_event('bagisto.admin.catalog.product.edit_form_accordian.booking.rental.after', ['product' => $product]) !!}
|
||||
|
||||
@push('scripts')
|
||||
@parent
|
||||
|
||||
<script type="text/x-template" id="rental-booking-template">
|
||||
<div>
|
||||
<div class="control-group" :class="[errors.has('booking[renting_type]') ? 'has-error' : '']">
|
||||
|
|
@ -17,26 +15,26 @@
|
|||
<option value="hourly">{{ __('bookingproduct::app.admin.catalog.products.hourly') }}</option>
|
||||
<option value="daily_hourly">{{ __('bookingproduct::app.admin.catalog.products.daily-hourly') }}</option>
|
||||
</select>
|
||||
|
||||
|
||||
<span class="control-error" v-if="errors.has('booking[renting_type]')">@{{ errors.first('booking[renting_type]') }}</span>
|
||||
</div>
|
||||
|
||||
<div v-if="rental_booking.renting_type == 'daily' || rental_booking.renting_type == 'daily_hourly'">
|
||||
<div v-if="rental_booking.renting_type == 'daily' || rental_booking.renting_type == 'daily_hourly'">
|
||||
<div class="control-group" :class="[errors.has('booking[daily_price]') ? 'has-error' : '']">
|
||||
<label class="required">{{ __('bookingproduct::app.admin.catalog.products.daily-price') }}</label>
|
||||
|
||||
<input type="text" v-validate="'required'" name="booking[daily_price]" v-model="rental_booking.daily_price" class="control" data-vv-as=""{{ __('bookingproduct::app.admin.catalog.products.daily-price') }}""/>
|
||||
|
||||
|
||||
<span class="control-error" v-if="errors.has('booking[daily_price]')">@{{ errors.first('booking[daily_price]') }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="rental_booking.renting_type == 'hourly' || rental_booking.renting_type == 'daily_hourly'">
|
||||
<div v-if="rental_booking.renting_type == 'hourly' || rental_booking.renting_type == 'daily_hourly'">
|
||||
<div class="control-group" :class="[errors.has('booking[hourly_price]') ? 'has-error' : '']">
|
||||
<label class="required">{{ __('bookingproduct::app.admin.catalog.products.hourly-price') }}</label>
|
||||
|
||||
<input type="text" v-validate="'required'" name="booking[hourly_price]" v-model="rental_booking.hourly_price" class="control" data-vv-as=""{{ __('bookingproduct::app.admin.catalog.products.hourly-price') }}""/>
|
||||
|
||||
|
||||
<span class="control-error" v-if="errors.has('booking[hourly_price]')">@{{ errors.first('booking[hourly_price]') }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -49,7 +47,7 @@
|
|||
<option value="1">{{ __('bookingproduct::app.admin.catalog.products.yes') }}</option>
|
||||
<option value="0">{{ __('bookingproduct::app.admin.catalog.products.no') }}</option>
|
||||
</select>
|
||||
|
||||
|
||||
<span class="control-error" v-if="errors.has('booking[same_slot_all_days]')">@{{ errors.first('booking[same_slot_all_days]') }}</span>
|
||||
</div>
|
||||
|
||||
|
|
@ -59,12 +57,10 @@
|
|||
</div>
|
||||
|
||||
<div class="section-content">
|
||||
|
||||
<slot-list
|
||||
booking-type="rental_slot"
|
||||
:same-slot-all-days="rental_booking.same_slot_all_days">
|
||||
</slot-list>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -73,7 +69,6 @@
|
|||
|
||||
<script>
|
||||
Vue.component('rental-booking', {
|
||||
|
||||
template: '#rental-booking-template',
|
||||
|
||||
inject: ['$validator'],
|
||||
|
|
|
|||
|
|
@ -5,8 +5,6 @@
|
|||
{!! view_render_event('bagisto.admin.catalog.product.edit_form_accordian.booking.table.after', ['product' => $product]) !!}
|
||||
|
||||
@push('scripts')
|
||||
@parent
|
||||
|
||||
<script type="text/x-template" id="table-booking-template">
|
||||
<div>
|
||||
<div class="control-group" :class="[errors.has('booking[price_type]') ? 'has-error' : '']">
|
||||
|
|
@ -16,7 +14,7 @@
|
|||
<option value="guest">{{ __('bookingproduct::app.admin.catalog.products.guest') }}</option>
|
||||
<option value="table">{{ __('bookingproduct::app.admin.catalog.products.table') }}</option>
|
||||
</select>
|
||||
|
||||
|
||||
<span class="control-error" v-if="errors.has('booking[price_type]')">@{{ errors.first('booking[price_type]') }}</span>
|
||||
</div>
|
||||
|
||||
|
|
@ -24,7 +22,7 @@
|
|||
<label class="required">{{ __('bookingproduct::app.admin.catalog.products.guest-limit') }}</label>
|
||||
|
||||
<input type="text" v-validate="'required|min_value:1'" name="booking[guest_limit]" v-model="table_booking.guest_limit" class="control" data-vv-as=""{{ __('bookingproduct::app.admin.catalog.products.guest-limit') }}""/>
|
||||
|
||||
|
||||
<span class="control-error" v-if="errors.has('booking[guest_limit]')">@{{ errors.first('booking[guest_limit]') }}</span>
|
||||
</div>
|
||||
|
||||
|
|
@ -32,7 +30,7 @@
|
|||
<label class="required">{{ __('bookingproduct::app.admin.catalog.products.guest-capacity') }}</label>
|
||||
|
||||
<input type="text" v-validate="'required|min_value:1'" name="booking[qty]" value="{{ $bookingProduct ? $bookingProduct->qty : 0 }}" class="control" data-vv-as=""{{ __('bookingproduct::app.admin.catalog.products.guest-limit') }}""/>
|
||||
|
||||
|
||||
<span class="control-error" v-if="errors.has('booking[qty]')">@{{ errors.first('booking[qty]') }}</span>
|
||||
</div>
|
||||
|
||||
|
|
@ -40,7 +38,7 @@
|
|||
<label class="required">{{ __('bookingproduct::app.admin.catalog.products.slot-duration') }}</label>
|
||||
|
||||
<input type="text" v-validate="'required|min_value:1'" name="booking[duration]" v-model="table_booking.duration" class="control" data-vv-as=""{{ __('bookingproduct::app.admin.catalog.products.slot-duration') }}""/>
|
||||
|
||||
|
||||
<span class="control-error" v-if="errors.has('booking[duration]')">@{{ errors.first('booking[duration]') }}</span>
|
||||
</div>
|
||||
|
||||
|
|
@ -48,7 +46,7 @@
|
|||
<label class="required">{{ __('bookingproduct::app.admin.catalog.products.break-time') }}</label>
|
||||
|
||||
<input type="text" v-validate="'required|min_value:1'" name="booking[break_time]" v-model="table_booking.break_time" class="control" data-vv-as=""{{ __('bookingproduct::app.admin.catalog.products.break-time') }}""/>
|
||||
|
||||
|
||||
<span class="control-error" v-if="errors.has('booking[break_time]')">@{{ errors.first('booking[break_time]') }}</span>
|
||||
</div>
|
||||
|
||||
|
|
@ -56,7 +54,7 @@
|
|||
<label class="required">{{ __('bookingproduct::app.admin.catalog.products.prevent-scheduling-before') }}</label>
|
||||
|
||||
<input type="text" v-validate="'required|min_value:1'" name="booking[prevent_scheduling_before]" v-model="table_booking.prevent_scheduling_before" class="control" data-vv-as=""{{ __('bookingproduct::app.admin.catalog.products.prevent-scheduling-before') }}""/>
|
||||
|
||||
|
||||
<span class="control-error" v-if="errors.has('booking[prevent_scheduling_before]')">@{{ errors.first('booking[prevent_scheduling_before]') }}</span>
|
||||
</div>
|
||||
|
||||
|
|
@ -67,7 +65,7 @@
|
|||
<option value="1">{{ __('bookingproduct::app.admin.catalog.products.yes') }}</option>
|
||||
<option value="0">{{ __('bookingproduct::app.admin.catalog.products.no') }}</option>
|
||||
</select>
|
||||
|
||||
|
||||
<span class="control-error" v-if="errors.has('booking[same_slot_all_days]')">@{{ errors.first('booking[same_slot_all_days]') }}</span>
|
||||
</div>
|
||||
|
||||
|
|
@ -77,12 +75,10 @@
|
|||
</div>
|
||||
|
||||
<div class="section-content">
|
||||
|
||||
<slot-list
|
||||
booking-type="table_slot"
|
||||
:same-slot-all-days="table_booking.same_slot_all_days">
|
||||
</slot-list>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -90,7 +86,6 @@
|
|||
|
||||
<script>
|
||||
Vue.component('table-booking', {
|
||||
|
||||
template: '#table-booking-template',
|
||||
|
||||
inject: ['$validator'],
|
||||
|
|
|
|||
Loading…
Reference in New Issue