Mise à jour
This commit is contained in:
@@ -1,28 +0,0 @@
|
||||
@extends('layout.index', [
|
||||
'title' => __('article_attribute_families.title'),
|
||||
'subtitle' => __('article_attribute_families.create.title'),
|
||||
'breadcrumb' => [__('article_attribute_families.title'), __('article_attribute_families.create.title')]
|
||||
])
|
||||
|
||||
@include('boilerplate::load.fileinput')
|
||||
|
||||
@section('content')
|
||||
|
||||
{{ Form::open(['route' => 'Shop.Admin.ArticleAttributeFamilies.store', 'id' => 'article-attribute-family-form', 'autocomplete' => 'off']) }}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12 mbl">
|
||||
<a href="{{ route("Shop.Admin.ArticleAttributeFamilies.index") }}" class="btn btn-default">
|
||||
{{ __('article_attribute_families.title') }}
|
||||
</a>
|
||||
|
||||
<span class="btn-group pull-right">
|
||||
@include('components.button-save')
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('Shop.Admin.ArticleAttributeFamilies.form')
|
||||
</form>
|
||||
|
||||
@endsection
|
||||
@@ -1,29 +0,0 @@
|
||||
@extends('layout.index', [
|
||||
'title' => 'Famille d\'articles',
|
||||
'subtitle' => 'Edition d\'une famille d\'article',
|
||||
'breadcrumb' => ['Articles']
|
||||
])
|
||||
|
||||
@include('boilerplate::load.fileinput')
|
||||
|
||||
@section('content')
|
||||
|
||||
{{ Form::open(['route' => 'Shop.Admin.ArticleFamilies.update', 'id' => 'article-family-form', 'autocomplete' => 'off', 'files' => true]) }}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12 mbl">
|
||||
<a href="{{ route("Shop.Admin.ArticleFamilies.index") }}" class="btn btn-default">
|
||||
{{ __('article_families.list.title') }}
|
||||
</a>
|
||||
|
||||
<span class="btn-group pull-right">
|
||||
@include('components.button-save')
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input type="hidden" name="id" value="{{ $id }}">
|
||||
@include('Shop.Admin.ArticleFamilies.form')
|
||||
</form>
|
||||
|
||||
@endsection
|
||||
@@ -1,39 +0,0 @@
|
||||
@extends('layout.index', [
|
||||
'title' => __('Shop.article_attributes.title'),
|
||||
'subtitle' => __('Shop.article_attributes.list'),
|
||||
'breadcrumb' => [__('Shop.article_attributes.title')]
|
||||
])
|
||||
|
||||
@include('boilerplate::load.select2')
|
||||
|
||||
@section('content')
|
||||
|
||||
<nav>
|
||||
<div class="nav nav-tabs">
|
||||
<a href="#families" data-toggle="tab" class="nav-item nav-link" role="tab" aria-controls="families" aria-selected="true">
|
||||
{{ __('Shop.article_attribute_families.title') }}
|
||||
</a>
|
||||
<a href="#values" data-toggle="tab" class="nav-item nav-link active" role="tab" aria-controls="values" aria-selected="false">
|
||||
{{ __('Shop.article_attribute_values.title') }}
|
||||
</a>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="tab-content mb-0">
|
||||
|
||||
<div class="tab-pane fade" id="families">
|
||||
@component('components.card')
|
||||
@include('components.datatable', ['route' => route('Shop.Admin.ArticleAttributeFamilies.index'), 'model' => 'ArticleAttributeFamilies'])
|
||||
@endcomponent
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade show active" id="values">
|
||||
@component('components.card')
|
||||
@include('components.datatable', ['route' => route('Shop.Admin.ArticleAttributeValues.index'), 'model' => 'ArticleAttributeValues'])
|
||||
@endcomponent
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
@@ -1,9 +0,0 @@
|
||||
@extends('layout.index', [
|
||||
'title' => __('Shop.article_attribute_families.title'),
|
||||
'subtitle' => __('Shop.article_attribute_families.list'),
|
||||
'breadcrumb' => [__('Shop.article_attribute_families.title')]
|
||||
])
|
||||
|
||||
@section('content')
|
||||
@include('components.datatable', ['route' => route('Shop.Admin.ArticleAttributeFamilies.index'), 'model' => 'ArticleAttributefamilies'])
|
||||
@endsection
|
||||
@@ -52,7 +52,8 @@
|
||||
</div>
|
||||
|
||||
<div class="tab-pane" id="prices">
|
||||
@include('Shop.Admin.Articles.partials.prices')
|
||||
@include('Shop.Admin.Articles.partials.prices', ['prices' => $prices['prices'] ?? null])
|
||||
@include('Shop.Admin.Articles.partials.generic_prices', ['generics' => $prices['generics'] ?? null])
|
||||
</div>
|
||||
|
||||
<div class="tab-pane" id="shipping">
|
||||
|
||||
@@ -0,0 +1,119 @@
|
||||
@include('Shop.Admin.Articles.partials.generic_prices.block_generic_price_new')
|
||||
|
||||
<div id="append_generic_price" class="row">
|
||||
@include('Shop.Admin.Articles.partials.generic_prices.list-generic_prices')
|
||||
</div>
|
||||
|
||||
<button type="button" class="btn btn-sm btn-primary add-new-generic_price">Associer un tarif générique<i class="fa fa-plus"></i></button>
|
||||
|
||||
|
||||
@include('components.select-tree', ['name' => "article_price_generic_id", 'value' => $price['article_price_generic_id'] ?? null, 'list' => $price_generics ?? null, 'required' => false, 'class' => 'form-control-sm w-100'])
|
||||
|
||||
|
||||
@push('js')
|
||||
<script>
|
||||
|
||||
function append_generic_price() {
|
||||
// handle_append_attribute();
|
||||
$('.select2').select2();
|
||||
handle_change_attribute();
|
||||
load_attribute_values($('.attributes-value'), $('.attributes-family').val());
|
||||
}
|
||||
|
||||
$("#append_generic_price").appender({
|
||||
rowSection: '.row-new-generic_price',
|
||||
type: '.row-generic_price',
|
||||
addBtn: '.add-new-generic_price',
|
||||
appendEffect: 'slide',
|
||||
addClass: 'animated bounceInLeft',
|
||||
rowNumber: '.row-generic_price-number',
|
||||
deleteBtn: '.delete-new-generic_price-btn',
|
||||
callback: append_generic_price,
|
||||
rowNumberStart: 2,
|
||||
hideSection: true
|
||||
});
|
||||
|
||||
function append_attribute() {
|
||||
}
|
||||
|
||||
function handle_append_attribute(selector) {
|
||||
console.log('handle_append_attribute');
|
||||
$(".append_attribute").appender({
|
||||
rowSection: '.row-new-attribute',
|
||||
type: '.row-attribute',
|
||||
addBtn: '.add-new-attribute',
|
||||
appendEffect: 'slide',
|
||||
addClass: 'animated bounceInLeft',
|
||||
rowNumber: '.row-attribute-number',
|
||||
deleteBtn: '.delete-new-attribute-btn',
|
||||
callback: append_attribute,
|
||||
rowNumberStart: 2,
|
||||
hideSection: true
|
||||
});
|
||||
}
|
||||
|
||||
function handle_change_attribute() {
|
||||
$('.attributes-family').change( function() {
|
||||
var family_id = $(this).val();
|
||||
var $family = $(this);
|
||||
var $parent = $family.parent().parent();
|
||||
var $selector = $parent.find('.attributes-value');
|
||||
load_attribute_values($selector, family_id);
|
||||
});
|
||||
}
|
||||
|
||||
function init_attribute_values() {
|
||||
$('.attributes-family').each( function() {
|
||||
var family_id = $(this).val();
|
||||
var $family = $(this);
|
||||
var $parent = $family.parent().parent();
|
||||
var $selector = $parent.find('.attributes-value');
|
||||
load_attribute_values($selector, family_id);
|
||||
value_id = $selector.data('id');
|
||||
$selector.val(value_id).trigger('change');
|
||||
});
|
||||
}
|
||||
|
||||
function load_attribute_values($selector, family_id) {
|
||||
$.ajax({
|
||||
url : "{{ route('Shop.Admin.PriceFamilyValues.getOptionsByFamily') }}",
|
||||
method : 'POST',
|
||||
data: { family_id: family_id },
|
||||
success : function(data) {
|
||||
$selector.empty().select2({data: data});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function handle_delete_generic_price() {
|
||||
$('.delete-generic_price-btn').click(function() {
|
||||
var $selector = $(this).parents('.row-generic_price');
|
||||
var id = $selector.find('.generic_price_id').val();
|
||||
|
||||
confirm_delete(id, laroute.route('Shop.Admin.ArticlePrices.destroy', {id : id}), function() {
|
||||
$selector.remove();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function handle_generic_prices() {
|
||||
$('.generic_price-item').change(function() {
|
||||
tax_selected = $(this).parent().prev().find('select option:selected').text();
|
||||
generic_price_taxed = $(this).val() * (1 + (tax_selected / 100));
|
||||
$(this).parent().parent().find('.generic_price-taxed-item').val(generic_price_taxed);
|
||||
})
|
||||
}
|
||||
|
||||
function handle_generic_prices_taxed() {
|
||||
$('.generic_price-taxed-item').change(function() {
|
||||
tax_selected = $(this).parent().prev().find('select option:selected').text();
|
||||
console.log($(this).parent().prev());
|
||||
generic_price = $(this).val() / (1 + (tax_selected / 100));
|
||||
$(this).parent().parent().find('.generic_price-item').val(generic_price);
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
@endpush
|
||||
@@ -0,0 +1,4 @@
|
||||
<div id="attributes" class="appender" data-id="">
|
||||
@include('Shop.Admin.Articles.partials.prices.block_attribute_new')
|
||||
<div class="append_attribute"></div>
|
||||
</div>
|
||||
@@ -0,0 +1,28 @@
|
||||
<div class="row row-attribute">
|
||||
|
||||
<input type="hidden" name="prices[{{ $key }}][article_attribute][quantity]" value="1">
|
||||
<input type="hidden" name="prices[{{ $key }}][article_attribute][id]" value="{{ (isset($attribute['id'])) ? $attribute['id'] : null }}">
|
||||
|
||||
<div class="col-12 col-lg-7">
|
||||
{{ Form::label('attribute_family_id', 'Attributs') }}<br/>
|
||||
@include('components.select', [
|
||||
'name' => "prices[$key][attribute][attribute_family_id]",
|
||||
'value' => $attribute['attribute_value']['article_attribute_family_id'] ?? null,
|
||||
'list' => $attribute_families_options,
|
||||
'required' => true,
|
||||
'class' => 'select2 form-control-sm attributes-family'
|
||||
])
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-lg-5">
|
||||
{{ Form::label('attribute_value_id', 'Valeur') }}<br/>
|
||||
@include('components.select', [
|
||||
'name' => "prices[$key][attribute][attribute_value_id]",
|
||||
'value' => $attribute['article_attribute_value_id'] ?? null,
|
||||
'list' => $attribute_values ?? null,
|
||||
'required' => true,
|
||||
'class' => 'select2 form-control-sm attributes-value w-100',
|
||||
'meta' => (isset($attribute['article_attribute_value_id'])) ? 'data-id="' . $attribute['article_attribute_value_id'] . '"' : ''
|
||||
])
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,24 @@
|
||||
<div class="row row-new-attribute row-attribute">
|
||||
<input type="hidden" name="prices[][attribute][quantity]" value="1">
|
||||
<div class="col-12 col-lg-6 1">
|
||||
{{ Form::label('attribute_family_id', 'Attributs') }}<br/>
|
||||
@include('components.select', [
|
||||
'name' => 'prices[][attribute][attribute_family_id]',
|
||||
'value' => $attribute_value['article_attribute_family_id'] ?? null,
|
||||
'list' => $attribute_families_options,
|
||||
'required' => true,
|
||||
'class' => 'select2 form-control-sm attributes-family'
|
||||
])
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-lg-6 2">
|
||||
{{ Form::label('attribute_value_id', 'Valeur') }}<br/>
|
||||
@include('components.select', [
|
||||
'name' => 'prices[][attribute][attribute_value_id]',
|
||||
'value' => $attribute_value['id'] ?? null,
|
||||
'list' => $attribute_values ?? null,
|
||||
'required' => true,
|
||||
'class' => 'select2 form-control-sm attributes-value'
|
||||
])
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,12 @@
|
||||
<div class="col-12 row-generic">
|
||||
|
||||
<input type="hidden" name="generics[id][]" value="{{ $generic['id'] ?? null }}">
|
||||
<input type="hidden" name="generics[price_generic_id][]" value="{{ $generic['price_generic_id'] ?? null }}">
|
||||
|
||||
<button type="button" class="btn btn-xs btn-danger delete-price-btn mt-2" data-card-widget="collapse" data-toggle="tooltip" title="supprimer">
|
||||
<i class="fas fa-trash"></i>
|
||||
</button>
|
||||
|
||||
@include('Shop.Admin.PriceGenerics.partials.table-prices', ['generic' => $generic['generic'] ?? null ])
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
<div class="col-12 row-new-price row-price">
|
||||
|
||||
<input type="hidden" name="prices[][id]" value="">
|
||||
|
||||
<div class="card card-light">
|
||||
<div class="card-body pt-2">
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-lg-3">
|
||||
{{ Form::label('price_generic_id', 'Générique') }}<br/>
|
||||
@include('components.select-tree', ['name' => "prices[0][article_price_generic_id]", 'value' => $price['article_price_generic_id'] ?? null, 'list' => $price_generics ?? null, 'required' => false, 'class' => 'form-control-sm'])
|
||||
</div>
|
||||
|
||||
<div class="col-lg-1">
|
||||
{{ Form::label('quantity', 'Quantité') }}<br/>
|
||||
@include('components.number', ['name' => 'prices[0][quantity]', 'value' => $quantity ?? 1, 'required' => true, 'class' => 'form-control-sm'])
|
||||
</div>
|
||||
|
||||
<div class="col-lg-4">
|
||||
@include('Shop.Admin.Articles.partials.prices.block_attribute_new')
|
||||
</div>
|
||||
|
||||
<div class="col-lg-6">
|
||||
|
||||
<div class="col-2">
|
||||
{{ Form::label('tax_id', 'TVA') }}<br/>
|
||||
@include('components.select', ['name' => 'prices[0][tax_id]', 'value' => $tax_id ?? null, 'list' => $taxes_options ?? null, 'required' => true, 'class' => 'form-control form-control-sm'])
|
||||
</div>
|
||||
|
||||
<div class="col-3">
|
||||
{{ Form::label('price', 'Prix HT') }}
|
||||
@include('components.money', ['name' => 'prices[0][price]', 'value' => $price ?? 0, 'required' => true, 'class' => 'form-control-sm price-item'])
|
||||
</div>
|
||||
|
||||
<div class="col-3">
|
||||
{{ Form::label('price_taxed', 'Prix TTC') }}
|
||||
@include('components.money', ['name' => 'prices[0][price_taxed]', 'value' => $price_taxed ?? 0, 'required' => true, 'class' => 'form-control-sm price-taxed-item'])
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-1 text-right">
|
||||
<br/>
|
||||
<button type="button" class="btn btn-xs btn-danger delete-new-price-btn mt-2" data-card-widget="collapse" data-toggle="tooltip" title="supprimer">
|
||||
<i class="fas fa-trash"></i>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,14 @@
|
||||
@if (isset($generics) && (count($generics)))
|
||||
@foreach ($generics as $generic)
|
||||
@include('Shop.Admin.Articles.partials.generic_prices.block_generic_price')
|
||||
@endforeach
|
||||
@endif
|
||||
|
||||
@push('js')
|
||||
<script>
|
||||
$(function () {
|
||||
handle_delete_generic_price();
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
|
||||
@@ -1,13 +1,10 @@
|
||||
<div class="row row-attribute">
|
||||
|
||||
<input type="hidden" name="prices[{{ $key }}][article_attribute][quantity]" value="1">
|
||||
<input type="hidden" name="prices[{{ $key }}][article_attribute][id]" value="{{ (isset($attribute['id'])) ? $attribute['id'] : null }}">
|
||||
|
||||
<div class="col-12 col-lg-7">
|
||||
{{ Form::label('attribute_family_id', 'Attributs') }}<br/>
|
||||
{{ Form::label('attribute_family_id', 'Type') }}<br/>
|
||||
@include('components.select', [
|
||||
'name' => "prices[$key][attribute][attribute_family_id]",
|
||||
'value' => $attribute['attribute_value']['article_attribute_family_id'] ?? null,
|
||||
'name' => "prices[$key][price_family_id]",
|
||||
'value' => $price['price_family_id'] ?? null,
|
||||
'list' => $attribute_families_options,
|
||||
'required' => true,
|
||||
'class' => 'select2 form-control-sm attributes-family'
|
||||
@@ -15,14 +12,13 @@
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-lg-5">
|
||||
{{ Form::label('attribute_value_id', 'Valeur') }}<br/>
|
||||
{{ Form::label('attribute_value_id', 'Unité') }}<br/>
|
||||
@include('components.select', [
|
||||
'name' => "prices[$key][attribute][attribute_value_id]",
|
||||
'value' => $attribute['article_attribute_value_id'] ?? null,
|
||||
'list' => $attribute_values ?? null,
|
||||
'name' => "prices[$key][unity_id]",
|
||||
'value' => $price['unity_id'] ?? null,
|
||||
'list' => $unities ?? null,
|
||||
'required' => true,
|
||||
'class' => 'select2 form-control-sm attributes-value',
|
||||
'meta' => (isset($attribute['article_attribute_value_id'])) ? 'data-id="' . $attribute['article_attribute_value_id'] . '"' : ''
|
||||
'class' => 'select2 form-control-sm attributes-value w-100',
|
||||
])
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -7,12 +7,7 @@
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-lg-3">
|
||||
{{ Form::label('price_generic_id', 'Générique') }}<br/>
|
||||
@include('components.select-tree', ['name' => "prices[$key][article_price_generic_id]", 'value' => $price['article_price_generic_id'] ?? null, 'list' => $price_generics ?? null, 'required' => false, 'class' => 'form-control-sm'])
|
||||
</div>
|
||||
|
||||
<div class="col-lg-8">
|
||||
<div class="col-lg-11">
|
||||
<div class="row">
|
||||
<div class="col-lg-1">
|
||||
{{ Form::label('quantity', 'Qté.') }}<br/>
|
||||
@@ -20,7 +15,7 @@
|
||||
</div>
|
||||
|
||||
<div class="col-lg-6">
|
||||
@include('Shop.Admin.Articles.partials.prices.block_attribute', ['attribute' => $price['article_attribute'] ?? null])
|
||||
@include('Shop.Admin.Articles.partials.prices.block_attribute')
|
||||
</div>
|
||||
|
||||
<div class="col-lg-5">
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<div class="col-6 row-price">
|
||||
<div class="col-12 row-price">
|
||||
|
||||
<input type="hidden" name="prices[{{ $key }}][id]" value="@if (isset($price['id'])){{ $price['id'] }}@endif" class="price_id">
|
||||
|
||||
@@ -13,16 +13,21 @@
|
||||
</div>
|
||||
|
||||
<div class="col-3">
|
||||
{{ Form::label('unity_id', 'Unité') }}<br/>
|
||||
@include('components.select', ['name' => 'prices[0][unity_id]', 'value' => $unity_id ?? null, 'list' => $unities ?? null, 'required' => true, 'class' => 'form-control-sm'])
|
||||
</div>
|
||||
|
||||
<div class="col-2">
|
||||
{{ Form::label('tax_id', 'TVA') }}<br/>
|
||||
@include('components.select', ['name' => "prices[$key][tax_id]", 'value' => $price['tax_id'] ?? null, 'list' => $taxes ?? null, 'required' => true, 'class' => 'form-control-sm'])
|
||||
</div>
|
||||
|
||||
<div class="col-3">
|
||||
<div class="col-2">
|
||||
{{ Form::label('price', 'Prix HT') }}
|
||||
@include('components.money', ['name' => "prices[$key][price]", 'value' => $price['price'] ?? 0, 'required' => true, 'class' => 'form-control-sm price-item'])
|
||||
</div>
|
||||
|
||||
<div class="col-3">
|
||||
<div class="col-2">
|
||||
{{ Form::label('price_taxed', 'Prix TTC') }}
|
||||
@include('components.money', ['name' => "prices[$key][price_taxed]", 'value' => $price['price_taxed'] ?? 0, 'required' => true, 'class' => 'form-control-sm price-taxed-item'])
|
||||
</div>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<div class="col-6 row-new-price row-price">
|
||||
<div class="col-12 row-new-price row-price">
|
||||
|
||||
<input type="hidden" name="prices[][id]" value="">
|
||||
|
||||
@@ -12,18 +12,22 @@
|
||||
@include('components.number', ['name' => 'prices[0][quantity]', 'value' => $quantity ?? 1, 'required' => true, 'class' => 'form-control-sm'])
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-3">
|
||||
{{ Form::label('unity_id', 'Unité') }}<br/>
|
||||
@include('components.select', ['name' => 'prices[0][unity_id]', 'value' => $unity_id ?? null, 'list' => $unities ?? null, 'required' => true, 'class' => 'form-control-sm'])
|
||||
</div>
|
||||
|
||||
<div class="col-2">
|
||||
{{ Form::label('tax_id', 'TVA') }}<br/>
|
||||
@include('components.select', ['name' => 'prices[0][tax_id]', 'value' => $tax_id ?? null, 'list' => $taxes ?? null, 'required' => true, 'class' => 'form-control-sm'])
|
||||
</div>
|
||||
|
||||
<div class="col-3">
|
||||
<div class="col-2">
|
||||
{{ Form::label('price', 'Prix HT') }}
|
||||
@include('components.money', ['name' => 'prices[0][price]', 'value' => $price ?? 0, 'required' => true, 'class' => 'form-control-sm price-item'])
|
||||
</div>
|
||||
|
||||
<div class="col-3">
|
||||
<div class="col-2">
|
||||
{{ Form::label('price_taxed', 'Prix TTC') }}
|
||||
@include('components.money', ['name' => 'prices[0][price_taxed]', 'value' => $price_taxed ?? 0, 'required' => true, 'class' => 'form-control-sm price-taxed-item'])
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
<table class="table table-bordered table-hover table-striped w-100 mb-0 dataTable">
|
||||
|
||||
<thead>
|
||||
<th>
|
||||
{{ $generic['category']['name'] ?? null }}
|
||||
</th>
|
||||
@foreach ($generic['prices'] as $price)
|
||||
<th>
|
||||
{{ $price['quantity'] ?? null }} {{ $price['unity_id'] ?? null }}
|
||||
</th>
|
||||
@endforeach
|
||||
</thead>
|
||||
<tr>
|
||||
<td>
|
||||
{{ $generic['name'] ?? null }}
|
||||
</td>
|
||||
@foreach ($generic['prices'] as $price)
|
||||
<td>
|
||||
{{ $price['price_taxed'] ?? null }}
|
||||
</td>
|
||||
@endforeach
|
||||
</tr>
|
||||
</table>
|
||||
28
resources/views/Shop/Admin/Unities/create.blade.php
Normal file
28
resources/views/Shop/Admin/Unities/create.blade.php
Normal file
@@ -0,0 +1,28 @@
|
||||
@extends('layout.index', [
|
||||
'title' => __('article_attributes.title'),
|
||||
'subtitle' => __('article_attributes.create.title'),
|
||||
'breadcrumb' => [__('article_attributes.title'), __('article_attributes.create.title')]
|
||||
])
|
||||
|
||||
@include('boilerplate::load.fileinput')
|
||||
|
||||
@section('content')
|
||||
|
||||
{{ Form::open(['route' => 'Shop.Admin.ArticleAttributes.store', 'id' => 'article-attribute-form', 'autocomplete' => 'off', 'files' => true]) }}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12 mbl">
|
||||
<a href="{{ route("Shop.Admin.ArticleAttributes.index") }}" class="btn btn-default">
|
||||
{{ __('article_attributes.list.title') }}
|
||||
</a>
|
||||
|
||||
<span class="btn-group pull-right">
|
||||
@include('components.button-save')
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('Shop.Admin.ArticleAttributeValues.form')
|
||||
</form>
|
||||
|
||||
@endsection
|
||||
29
resources/views/Shop/Admin/Unities/edit.blade.php
Normal file
29
resources/views/Shop/Admin/Unities/edit.blade.php
Normal file
@@ -0,0 +1,29 @@
|
||||
@extends('layout.index', [
|
||||
'title' => 'Attributs d\'articles',
|
||||
'subtitle' => 'Edition d\'un attribut d\'article',
|
||||
'breadcrumb' => ['Articles']
|
||||
])
|
||||
|
||||
@include('boilerplate::load.fileinput')
|
||||
|
||||
@section('content')
|
||||
|
||||
{{ Form::open(['route' => 'Shop.Admin.ArticleAttributeValues.update', 'id' => 'article-attribute-form', 'autocomplete' => 'off', 'files' => true]) }}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12 mbl">
|
||||
<a href="{{ route("Shop.Admin.ArticleAttributeValues.index") }}" class="btn btn-default">
|
||||
{{ __('article_attributes.list.title') }}
|
||||
</a>
|
||||
|
||||
<span class="btn-group pull-right">
|
||||
@include('components.button-save')
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input type="hidden" name="id" value="{{ $id }}">
|
||||
@include('Shop.Admin.ArticleAttributeValues.form')
|
||||
</form>
|
||||
|
||||
@endsection
|
||||
48
resources/views/Shop/Admin/Unities/index.blade.php
Normal file
48
resources/views/Shop/Admin/Unities/index.blade.php
Normal file
@@ -0,0 +1,48 @@
|
||||
@extends('layout.index', [
|
||||
'title' => __('Shop.unities.title'),
|
||||
'subtitle' => __('Shop.unities.list'),
|
||||
'breadcrumb' => [__('Shop.unities.title')]
|
||||
])
|
||||
|
||||
@include('boilerplate::load.select2')
|
||||
|
||||
@section('content')
|
||||
|
||||
<nav>
|
||||
<div class="nav nav-tabs">
|
||||
<a href="#families" data-toggle="tab" class="nav-item nav-link" role="tab" aria-controls="families" aria-selected="true">
|
||||
{{ __('Shop.unities.title') }}
|
||||
</a>
|
||||
<a href="#values" data-toggle="tab" class="nav-item nav-link active" role="tab" aria-controls="values" aria-selected="false">
|
||||
{{ __('Shop.unities.title') }}
|
||||
</a>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="tab-content mb-0">
|
||||
|
||||
<div class="tab-pane fade" id="families">
|
||||
@section('content')
|
||||
@include('components.datatable', ['route' => route('Shop.Admin.Unities.index'), 'model' => 'ArticleAttributefamilies'])
|
||||
@endsection
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade show active" id="values">
|
||||
@section('content')
|
||||
@component('components.card')
|
||||
@include('components.datatable', ['route' => route('Shop.Admin.ArticleAttributeValues.index'), 'model' => 'Unities'])
|
||||
@endcomponent
|
||||
|
||||
@component('components.layout.modal', ['title' => 'Filtres', 'id' => 'modal-filters'])
|
||||
@include('Shop.Admin.Unities.partials.filters')
|
||||
@endcomponent
|
||||
@endsection
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
@include('components.js.datatable', ['route' => route('Shop.Admin.Unities.index'), 'model' => 'Unities'])
|
||||
@endpush
|
||||
16
resources/views/Shop/Admin/Unities/list.blade.php
Normal file
16
resources/views/Shop/Admin/Unities/list.blade.php
Normal file
@@ -0,0 +1,16 @@
|
||||
@extends('layout.index', [
|
||||
'title' => __('Shop.article_attribute_values.title'),
|
||||
'subtitle' => __('Shop.article_attribute_values.list'),
|
||||
'breadcrumb' => [__('Shop.article_attribute_values.title')]
|
||||
])
|
||||
|
||||
@section('content')
|
||||
@component('components.card')
|
||||
@include('components.datatable', ['route' => route('Shop.Admin.ArticleAttributeValues.index'), 'model' => 'ArticleAttributeValues'])
|
||||
@endcomponent
|
||||
|
||||
@component('components.layout.modal', ['title' => 'Filtres', 'id' => 'modal-filters'])
|
||||
@include('Shop.Admin.ArticleAttributeValues.partials.filters')
|
||||
@endcomponent
|
||||
|
||||
@endsection
|
||||
@@ -0,0 +1,9 @@
|
||||
<form id="filters">
|
||||
<div class="row">
|
||||
<label class="col-4">Familles d'attributs</label>
|
||||
<div class="col-8">
|
||||
@include('components.select', ['name' => 'article_attribute_family_id', 'list' => (isset($families)) ? $families : [], 'value' => (isset($filters['article_attribute_family_id'])) ? $filters['article_attribute_family_id'] : null, 'class' => 'form-control-sm select2', 'with_empty' => ' '])
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
@@ -4,7 +4,6 @@
|
||||
])
|
||||
|
||||
@section('content')
|
||||
@component('auth.loginbox')
|
||||
{!! Form::open(['route' => 'boilerplate.login', 'method' => 'post', 'autocomplete'=> 'off']) !!}
|
||||
<div class="form-group has-feedback">
|
||||
<div class="form-group {{ $errors->has('email') ? 'has-error' : '' }}">
|
||||
@@ -38,5 +37,4 @@
|
||||
@if(config('boilerplate.auth.register'))
|
||||
<a href="{{ route('boilerplate.register') }}" class="text-center">{{ __('boilerplate::auth.login.register') }}</a>
|
||||
@endif
|
||||
@endcomponent
|
||||
@endsection
|
||||
|
||||
4
resources/views/components/button.blade.php
Normal file
4
resources/views/components/button.blade.php
Normal file
@@ -0,0 +1,4 @@
|
||||
<button type="{{ $type ?? 'button' }}" class="btn {{ $class ?? ''}}" @if (isset($id)) id="{{ $id }}"@endif>
|
||||
<i class="fa fa-fw {{ $icon ?? '' }}"></i>
|
||||
{{ $txt ?? '' }}
|
||||
</button>
|
||||
@@ -1,4 +1,4 @@
|
||||
<div class="card mb-0 {{ isset($tabs) ? ($outline ?? config('boilerplate.theme.card.outline', false)) ? 'card-outline-tabs' : 'card-tabs' : ''}} {{ ($outline ?? config('boilerplate.theme.card.outline', false)) ? 'card-outline' : '' }} card-{{ $color ?? config('boilerplate.theme.card.default_color', 'info') }}">
|
||||
<div class="card {{ $class ?? 'mb-0' }} {{ isset($tabs) ? ($outline ?? config('boilerplate.theme.card.outline', false)) ? 'card-outline-tabs' : 'card-tabs' : ''}} {{ ($outline ?? config('boilerplate.theme.card.outline', false)) ? 'card-outline' : '' }} card-{{ $color ?? config('boilerplate.theme.card.default_color', 'info') }}">
|
||||
@if($title ?? $header ?? false)
|
||||
<div class="card-header {{ isset($tabs) ? ($outline ?? config('boilerplate.theme.card.outline', false)) ? 'p-0' : 'p-0 pt-1' : '' }} border-bottom-0">
|
||||
@isset($header)
|
||||
@@ -13,7 +13,7 @@
|
||||
@endisset
|
||||
</div>
|
||||
@endif
|
||||
<div class="card-body {{ $title ?? false ? ($outline ?? config('boilerplate.theme.card.outline', false)) ? 'pt-0' : '' : '' }}">
|
||||
<div class="card-body {{ $title ?? false ? ($outline ?? config('boilerplate.theme.card.outline', false)) ? 'pt-0' : '' : '' }} {{ $class_body ?? '' }}">
|
||||
{{ $slot }}
|
||||
</div>
|
||||
@isset($footer)
|
||||
|
||||
4
resources/views/components/form/autocomplete.blade.php
Normal file
4
resources/views/components/form/autocomplete.blade.php
Normal file
@@ -0,0 +1,4 @@
|
||||
@include('load.autocomplete')
|
||||
|
||||
<input type="hidden" name="{{ $name }}_id" id="{{ $name }}_id" value="{{ $data['id'] ?? null }}">
|
||||
<input type="text" name="{{ $name }}_name" class="form-control autocomplete" value="{{ $data['name'] ?? ''}}" data-url="{{ $url ?? ''}}" data-field="{{ $name }}_id" autocomplete="off">
|
||||
3
resources/views/components/form/checkbox.blade.php
Normal file
3
resources/views/components/form/checkbox.blade.php
Normal file
@@ -0,0 +1,3 @@
|
||||
<input type="checkbox" name="{{ $name }}" id="{{ $id_name ?? $name }}" class="{{ $class ?? ''}}" value="{{ $val ?? ''}}"
|
||||
@if (isset($value) && isset($val) && ($value == $val)) checked @endif
|
||||
>
|
||||
4
resources/views/components/form/color.blade.php
Normal file
4
resources/views/components/form/color.blade.php
Normal file
@@ -0,0 +1,4 @@
|
||||
@include('load.form.color')
|
||||
|
||||
@include('components.input', ['class' => 'color'])
|
||||
|
||||
8
resources/views/components/form/datepicker.blade.php
Normal file
8
resources/views/components/form/datepicker.blade.php
Normal file
@@ -0,0 +1,8 @@
|
||||
@include('load.datepicker')
|
||||
|
||||
<div class="input-group date" data-target-input="nearest">
|
||||
@include('components.input', ['class' => 'datepicker', 'meta' => 'data-target="#'.str_slug($name).'"', 'placeholder' => App\Repositories\Core\DateTime::getLocaleFormatDate() ])
|
||||
<div class="input-group-append" data-target="#{{ str_slug($name) }}" data-toggle="datetimepicker">
|
||||
<div class="input-group-text"><i class="fa fa-calendar"></i></div>
|
||||
</div>
|
||||
</div>
|
||||
13
resources/views/components/form/datetimepicker.blade.php
Normal file
13
resources/views/components/form/datetimepicker.blade.php
Normal file
@@ -0,0 +1,13 @@
|
||||
@include('components.input', ['class' => 'datetimepicker'])
|
||||
|
||||
@if(!defined('LOAD_DATETIMEPICKER'))
|
||||
@include('boilerplate::load.datetimepicker')
|
||||
@push('js')
|
||||
<script>
|
||||
$(function() {
|
||||
$('.datetimepicker').datetimepicker({});
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
@endif
|
||||
|
||||
19
resources/views/components/form/editor.blade.php
Normal file
19
resources/views/components/form/editor.blade.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<textarea
|
||||
name="{{ $name }}"
|
||||
@if (isset($id_name))id="{{ $id_name }}"@endif
|
||||
class="editor form-control @if (isset($class)){{ $class }}@endif"
|
||||
@if (isset($rows)) rows="{{ $rows }}"@endif
|
||||
>@if (isset($value)){{ $value }}@endif</textarea>
|
||||
|
||||
|
||||
@if(!defined('LOAD_EDITOR'))
|
||||
@include('load.editor')
|
||||
@push('js')
|
||||
<script>
|
||||
$(function() {
|
||||
initEditor();
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
@endif
|
||||
|
||||
13
resources/views/components/form/password.blade.php
Normal file
13
resources/views/components/form/password.blade.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<div class="input-group">
|
||||
|
||||
@include('components.input')
|
||||
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-outline-secondary">
|
||||
<i class="fa fa-unlock"></i>
|
||||
</button>
|
||||
<button class="btn btn-outline-secondary">
|
||||
<i class="fa fa-sync-alt"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
10
resources/views/components/form/percent.blade.php
Normal file
10
resources/views/components/form/percent.blade.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<div class="input-group">
|
||||
|
||||
@include('components.input', ['type' => 'number', 'meta' => "step = '.01'"])
|
||||
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-outline-secondary" type="button" aria-haspopup="true" aria-expanded="false">
|
||||
%
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
12
resources/views/components/form/radios.blade.php
Normal file
12
resources/views/components/form/radios.blade.php
Normal file
@@ -0,0 +1,12 @@
|
||||
<div class="form-group clearfix pt-2">
|
||||
@foreach ($list as $key => $item)
|
||||
<div class="{{ $item['class'] ?? '' }} d-inline">
|
||||
<input type="radio" id="{{ $name }}{{ $key }}" name="{{ $name }}" value="{{ $key }}" @if (isset($value) && ($key == $value)) checked @endif>
|
||||
@if ($with_label ?? true)
|
||||
<label for="{{ $name }}{{ $key}}" class="pr-2">{{ $item['txt'] ?? $item }}</label>
|
||||
@else
|
||||
<label for="{{ $name }}{{ $key}}"></label>
|
||||
@endif
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
@@ -0,0 +1 @@
|
||||
@include('components.select', ['class' => 'duallist', 'multiple' => true])
|
||||
19
resources/views/components/form/tags.blade.php
Normal file
19
resources/views/components/form/tags.blade.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<select
|
||||
name="{{ $name }}"
|
||||
@if (isset($id_name))id="{{ $id_name }}"@endif
|
||||
class="form-control @if (isset($class)){{ $class }} @endif"
|
||||
@if (isset($style))style="{{ $style }}" @endif
|
||||
@if (isset($required))required="required"@endif
|
||||
@if (isset($multiple))multiple="multiple"@endif
|
||||
>
|
||||
@if (isset($with_empty))
|
||||
<option value=''>{{ $with_empty }}</option>
|
||||
@endif
|
||||
|
||||
@include('components.options')
|
||||
|
||||
</select>
|
||||
|
||||
@if(!defined('LOAD_SELECT2'))
|
||||
@include('load.select2')
|
||||
@endif
|
||||
3
resources/views/components/form/toggle.blade.php
Normal file
3
resources/views/components/form/toggle.blade.php
Normal file
@@ -0,0 +1,3 @@
|
||||
<input type="checkbox" name="{{ $name ?? ''}}" id="{{ $id_name ?? $name ?? '' }}" class="{{ $class ?? 'toggle'}}" value="{{ $val ?? 1}}" data-toggle="toggle" data-on="{{ $on ?? __('yes') }}" data-off="{{ $off ?? __('no') }}" data-onstyle="{{ $onstyle ?? 'outline-success'}}" data-offstyle="{{ $offstyle ?? 'outline-danger'}}" data-size="{{ $size ?? 'sm' }}" @if ( (isset($value) && isset($val) && ($value == $val)) || (!isset($val) && isset($value) && $value)) checked @endif {{ $disabled ?? ''}} {{ $meta ?? ''}} >
|
||||
|
||||
@include('load.toggle')
|
||||
1
resources/views/components/form/toggle_yesno.blade.php
Normal file
1
resources/views/components/form/toggle_yesno.blade.php
Normal file
@@ -0,0 +1 @@
|
||||
@include('components.form.toggle')
|
||||
11
resources/views/components/form/url.blade.php
Normal file
11
resources/views/components/form/url.blade.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<div class="input-group">
|
||||
@include('components.input', ['class' => 'url'])
|
||||
<div class="input-group-append">
|
||||
@if (isset($with_download) && $with_download)
|
||||
<div class="input-group-text btn btn-web" role="button"><i class="fa {{ (isset($status) && $status) ? 'fa-check green' : 'fa-download' }}"></i></div>
|
||||
@endif
|
||||
@if (isset($with_web) && $with_web)
|
||||
<div class="input-group-text btn btn-web" role="button"><i class="fa fa-search"></i></div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,12 +1,25 @@
|
||||
<div class="card">
|
||||
<div class="card {{ $class ?? '' }}">
|
||||
<div class="card-header p-0">
|
||||
<button class="btn btn-link pull-right collapsed" type="button" data-toggle="collapse" data-target="#{{ $id }}" aria-expanded="true" aria-controls="collapseOne">
|
||||
<i class="fa fa-plus"></i>
|
||||
</button>
|
||||
{{ $title }} @if(isset($required) && $required)<sup>*</sup>@endif
|
||||
<span class="check ml-5 error"></span>
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<button class="btn btn-link collapsed" type="button" data-toggle="collapse" data-target="#{{ $id }}" aria-expanded="false" aria-controls="{{ $id }}">
|
||||
<i class="fa fa-chevron-right"></i>
|
||||
</button>
|
||||
{!! $title !!}
|
||||
@if (isset($required) && $required)
|
||||
<sup>*</sup>
|
||||
@endif
|
||||
|
||||
{!! $collapse_left ?? '' !!}
|
||||
|
||||
<span class="check ml-5 error"></span>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
{!! $collapse_right ?? '' !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="{{ $id }}" class="card-body collapse">
|
||||
<div id="{{ $id }}" class="card-body collapse {{ $class_body ?? '' }}">
|
||||
{{ $slot }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
20
resources/views/components/layout/modal-filters.blade.php
Normal file
20
resources/views/components/layout/modal-filters.blade.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<div class="modal fade" id="{{ $id }}" tabindex="-1" role="dialog" aria-labelledby="{{ $id }}" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">{{ $title }}</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
{{ $slot }}
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn bg-yellow reset">{{ __('reset') }}</button>
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">{{ __('close') }}</button>
|
||||
<button type="button" class="btn bg-primary apply">{{ __('apply') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -11,6 +11,9 @@
|
||||
{{ $slot }}
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
@if (isset($buttons))
|
||||
{{ $buttons }}
|
||||
@endif
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-info apply">Apply</button>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user