Refactoring, change menu, add many features

This commit is contained in:
Ludovic CANDELLIER
2021-10-30 02:22:51 +02:00
parent fae7b7897f
commit e356b3fcda
158 changed files with 1114 additions and 412 deletions

View File

@@ -3,10 +3,10 @@
<div class="row">
<div class="col-md-8">
{{ Form::label('name', 'Nom') }}
@include('components.input', ['name' => 'name', 'value' => $article_nature['name'] ?? null, 'required' => true])
@include('components.form.input', ['name' => 'name', 'value' => $article_nature['name'] ?? null, 'required' => true])
{{ Form::label('description', 'Description') }}
@include('components.textarea', ['name' => 'description', 'value' => $article_nature['description'] ?? null, 'class' => 'editor', 'required' => false])
@include('components.form.textarea', ['name' => 'description', 'value' => $article_nature['description'] ?? null, 'class' => 'editor', 'required' => false])
</div>
</div>

View File

@@ -5,5 +5,7 @@
])
@section('content')
@include('components.datatable', ['route' => route('Admin.Shop.ArticleNatures.index'), 'model' => 'article_natures'])
@component('components.card')
@include('components.datatable', ['route' => route('Admin.Shop.ArticleNatures.index'), 'model' => 'article_natures'])
@endcomponent
@endsection

View File

@@ -7,11 +7,11 @@
@include('load.form.select2')
@section('content')
@include('components.datatable', ['route' => route('Admin.Shop.Articles.index'), 'model' => 'articles', 'with_filters' => true])
@component('components.layout.modal', ['title' => 'Filtres', 'id' => 'modal-articles-filters'])
@include('Admin.Shop.Articles.partials.filters')
@component('components.card')
@include('components.datatable', ['route' => route('Admin.Shop.Articles.index'), 'model' => 'articles', 'with_filters' => true])
@component('components.layout.modal', ['title' => 'Filtres', 'id' => 'modal-articles-filters'])
@include('Admin.Shop.Articles.partials.filters')
@endcomponent
@endcomponent
@endsection

View File

@@ -4,40 +4,40 @@
<div class="row mb-3">
<div class="col-3">
{{ Form::label('model', 'Familles de produit') }}<br>
@include('components.select', ['name' => 'product_type', 'id_name' => 'product_type', 'list' => $models_options, 'value' => $article['product_type'] ?? null, 'class' => 'select2', 'with_empty' => ''])
@include('components.form.select', ['name' => 'product_type', 'id_name' => 'product_type', 'list' => $models_options, 'value' => $article['product_type'] ?? null, 'class' => 'select2', 'with_empty' => ''])
</div>
<div class="col-6">
{{ Form::label('model_id', 'Produit') }}<br>
@include('components.select', ['name' => 'product_id', 'id_name' => 'product_id', 'list' => $products ?? [], 'value' => $article['product_id'] ?? null, 'class' => 'select2', 'with_empty' => ''])
@include('components.form.select', ['name' => 'product_id', 'id_name' => 'product_id', 'list' => $products ?? [], 'value' => $article['product_id'] ?? null, 'class' => 'select2', 'with_empty' => ''])
</div>
<div class="col-3">
{{ Form::label('ref', 'Référence') }}<br>
@include('components.input', ['name' => 'ref', 'value' => $article['ref'] ?? null])
@include('components.form.input', ['name' => 'ref', 'value' => $article['ref'] ?? null])
</div>
</div>
<div class="row mb-3">
<div class="col-8">
{{ Form::label('name', 'Nom') }}<br>
@include('components.input', ['name' => 'name', 'value' => $article['name'] ?? null, 'required' => true])
@include('components.form.input', ['name' => 'name', 'value' => $article['name'] ?? null, 'required' => true])
</div>
<div class="col-4">
{{ Form::label('article_nature_id', __('shop.article_natures.name')) }}<br>
@include('components.select', ['name' => 'article_nature_id', 'list' => $natures_options, 'value' => $article['article_nature_id'] ?? null, 'class' => 'select2', 'with_empty' => '', 'required' => true])
@include('components.form.select', ['name' => 'article_nature_id', 'list' => $natures_options, 'value' => $article['article_nature_id'] ?? null, 'class' => 'select2', 'with_empty' => '', 'required' => true])
</div>
</div>
<div class="row mb-3">
<div class="col-12">
{{ Form::label('categories', __('shop.shelves.title')) }}<br>
@include('components.select', ['name' => 'categories[]', 'list' => $categories_options, 'values' => $article['categories'] ?? null, 'class' => 'select2', 'multiple' => true])
@include('components.form.select', ['name' => 'categories[]', 'list' => $categories_options, 'values' => $article['categories'] ?? null, 'class' => 'select2', 'multiple' => true])
</div>
</div>
<div class="row mb-3">
<div class="col-12">
{{ Form::label('tags', 'Tags') }}<br>
@include('components.select-tree', ['name' => 'tags[]', 'list' => $tags_list, 'values' => $article['tags'] ?? null, 'class' => 'select2', 'multiple' => true])
@include('components.form.selects.select-tree', ['name' => 'tags[]', 'list' => $tags_list, 'values' => $article['tags'] ?? null, 'class' => 'select2', 'multiple' => true])
</div>
</div>
@@ -50,7 +50,7 @@
<div class="row mb-3">
<div class="col-12">
{{ Form::label('description', 'Description') }}
@include('components.textarea', ['name' => 'description', 'value' => $article['description'] ?? null, 'class' => 'editor', 'required' => true])
@include('components.form.textarea', ['name' => 'description', 'value' => $article['description'] ?? null, 'class' => 'editor', 'required' => true])
</div>
</div>

View File

@@ -2,7 +2,7 @@
<div class="row">
<label class="col-4">{{ __('article_natures.title') }}</label>
<div class="col-8">
@include('components.select', ['name' => 'article_nature_id', 'list' => $article_natures ?? [], 'value' => $filters['article_nature_id'] ?? null, 'class' => 'form-control-sm select2', 'with_empty' => ' '])
@include('components.form.select', ['name' => 'article_nature_id', 'list' => $article_natures ?? [], 'value' => $filters['article_nature_id'] ?? null, 'class' => 'form-control-sm select2', 'with_empty' => ' '])
</div>
</div>
</form>

View File

@@ -5,7 +5,7 @@
<div class="col-12 col-lg-7">
{{ Form::label('attribute_family_id', 'Attributs') }}<br/>
@include('components.select', [
@include('components.form.select', [
'name' => "prices[$key][attribute][attribute_family_id]",
'value' => $attribute['attribute_value']['article_attribute_family_id'] ?? null,
'list' => $attribute_families_options,
@@ -16,7 +16,7 @@
<div class="col-12 col-lg-5">
{{ Form::label('attribute_value_id', 'Valeur') }}<br/>
@include('components.select', [
@include('components.form.select', [
'name' => "prices[$key][attribute][attribute_value_id]",
'value' => $attribute['article_attribute_value_id'] ?? null,
'list' => $attribute_values ?? null,

View File

@@ -2,7 +2,7 @@
<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', [
@include('components.form.select', [
'name' => 'prices[][attribute][attribute_family_id]',
'value' => $attribute_value['article_attribute_family_id'] ?? null,
'list' => $attribute_families_options,
@@ -13,7 +13,7 @@
<div class="col-12 col-lg-6 2">
{{ Form::label('attribute_value_id', 'Valeur') }}<br/>
@include('components.select', [
@include('components.form.select', [
'name' => 'prices[][attribute][attribute_value_id]',
'value' => $attribute_value['id'] ?? null,
'list' => $attribute_values ?? null,

View File

@@ -4,7 +4,7 @@
<div class="row mt-3">
<div class="col-6">
@include('components.select-tree', ['name' => "article_price_generic_id", 'id_name' => "article_price_generic_id", 'value' => $price['article_price_generic_id'] ?? null, 'list' => $price_generics ?? null, 'required' => false, 'class' => 'form-control-sm w-100'])
@include('components.form.selects.select-tree', ['name' => "article_price_generic_id", 'id_name' => "article_price_generic_id", 'value' => $price['article_price_generic_id'] ?? null, 'list' => $price_generics ?? null, 'required' => false, 'class' => 'form-control-sm w-100'])
</div>
<div class="col-6">
<button type="button" class="btn btn-sm btn-primary" id="add-new-generic_price">Associer un tarif générique <i class="fa fa-plus"></i></button>

View File

@@ -8,12 +8,12 @@
<div class="row">
<div class="col-lg-1">
{{ Form::label('quantity', 'Qté.') }}<br/>
@include('components.number', ['name' => "prices[$key][quantity]", 'value' => $price['quantity'] ?? 1, 'required' => true, 'class' => 'form-control-sm'])
@include('components.form.inputs.number', ['name' => "prices[$key][quantity]", 'value' => $price['quantity'] ?? 1, 'required' => true, 'class' => 'form-control-sm'])
</div>
<div class="col-lg-3">
{{ Form::label('package_id', 'Type Package') }}<br/>
@include('components.select', [
@include('components.form.select', [
'name' => "prices[$key][package_id]",
'value' => $price['package_id'] ?? null,
'list' => $packages ?? null,
@@ -24,7 +24,7 @@
<div class="col-lg-1">
{{ Form::label('package_qty', 'Pack Qté') }}<br/>
@include('components.number', [
@include('components.form.inputs.number', [
'name' => "prices[$key][package_quantity]",
'value' => $price['package_quantity'] ?? null,
'required' => true,
@@ -34,7 +34,7 @@
<div class="col-lg-3">
{{ Form::label('unity_id', 'Unité') }}<br/>
@include('components.select', [
@include('components.form.select', [
'name' => "prices[$key][unity_id]",
'value' => $price['unity_id'] ?? null,
'list' => $unities ?? null,
@@ -48,17 +48,17 @@
<div class="row">
<div class="col-4">
{{ Form::label('tax_id', 'TVA') }}<br/>
@include('components.select', ['name' => "prices[$key][tax_id]", 'value' => $price['tax_id'] ?? null, 'list' => $taxes_options ?? null, 'required' => true, 'class' => 'form-control form-control-sm'])
@include('components.form.select', ['name' => "prices[$key][tax_id]", 'value' => $price['tax_id'] ?? null, 'list' => $taxes_options ?? null, 'required' => true, 'class' => 'form-control form-control-sm'])
</div>
<div class="col-4">
{{ Form::label('price', 'Prix HT') }}
@include('components.money', ['name' => "prices[$key][price]", 'value' => $price['price'] ?? 0, 'required' => true, 'class' => 'form-control-sm price-item'])
@include('components.form.inputs.money', ['name' => "prices[$key][price]", 'value' => $price['price'] ?? 0, 'required' => true, 'class' => 'form-control-sm price-item'])
</div>
<div class="col-4">
{{ 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'])
@include('components.form.inputs.money', ['name' => "prices[$key][price_taxed]", 'value' => $price['price_taxed'] ?? 0, 'required' => true, 'class' => 'form-control-sm price-taxed-item'])
</div>
</div>
</div>

View File

@@ -9,12 +9,12 @@
<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'])
@include('components.form.inputs.number', ['name' => 'prices[0][quantity]', 'value' => $quantity ?? 1, 'required' => true, 'class' => 'form-control-sm'])
</div>
<div class="col-lg-3">
{{ Form::label('package_id', 'Type Package') }}<br/>
@include('components.select', [
@include('components.form.select', [
'name' => "prices[0][package_id]",
'value' => $price['package_id'] ?? null,
'list' => $packages ?? null,
@@ -25,7 +25,7 @@
<div class="col-lg-1">
{{ Form::label('package_qty', 'Pack Qté') }}<br/>
@include('components.number', [
@include('components.form.inputs.number', [
'name' => "prices[0][package_quantity]",
'value' => $price['package_quantity'] ?? null,
'required' => true,
@@ -35,7 +35,7 @@
<div class="col-lg-3">
{{ Form::label('unity_id', 'Unité') }}<br/>
@include('components.select', [
@include('components.form.select', [
'name' => "prices[0][unity_id]",
'value' => $price['unity_id'] ?? null,
'list' => $unities ?? null,
@@ -50,17 +50,17 @@
<div class="row">
<div class="col-4">
{{ 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'])
@include('components.form.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-4">
{{ Form::label('price', 'Prix HT') }}
@include('components.money', ['name' => 'prices[0][price]', 'value' => $price ?? 0, 'required' => true, 'class' => 'form-control-sm price-item'])
@include('components.form.inputs.money', ['name' => 'prices[0][price]', 'value' => $price ?? 0, 'required' => true, 'class' => 'form-control-sm price-item'])
</div>
<div class="col-4">
{{ 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'])
@include('components.form.inputs.money', ['name' => 'prices[0][price_taxed]', 'value' => $price_taxed ?? 0, 'required' => true, 'class' => 'form-control-sm price-taxed-item'])
</div>
</div>
</div>

View File

@@ -3,27 +3,27 @@
<div class="row mb-3">
<div class="col-6">
{{ Form::label('name', 'Nom') }}
@include('components.input', ['name' => 'name', 'value' => $category['name'] ?? null, 'required' => true])
@include('components.form.input', ['name' => 'name', 'value' => $category['name'] ?? null, 'required' => true])
</div>
<div class="col-5">
{{ Form::label('parent', 'Rubrique parente') }}
@include('components.select', ['name' => 'parent_id', 'list' => $categories ?? [], 'value' => $category['category_tree']['parent_id'] ?? null, 'required' => true, 'with_empty' => ''])
@include('components.form.select', ['name' => 'parent_id', 'list' => $categories ?? [], 'value' => $category['category_tree']['parent_id'] ?? null, 'required' => true, 'with_empty' => ''])
</div>
<div class="col-1 text-right">
{{ Form::label('visible', 'Visible') }}<br/>
@include('components.toggle', ['name' => 'visible', 'value' => $category['visible'] ?? null])
@include('components.form.toggle', ['name' => 'visible', 'value' => $category['visible'] ?? null])
</div>
</div>
<div class="row mb-3">
<div class="col-12">
{{ Form::label('tags', 'Tags') }}
@include('components.select-tree', ['name' => 'tags[]', 'list' => $tags_list, 'values' => $category['tags'] ?? null, 'class' => 'select2', 'multiple' => true])
@include('components.form.selects.select-tree', ['name' => 'tags[]', 'list' => $tags_list, 'values' => $category['tags'] ?? null, 'class' => 'select2', 'multiple' => true])
</div>
</div>
<div class="row mb-3">
<div class="col-12">
{{ Form::label('description', 'Description') }}
@include('components.textarea', ['name' => 'description', 'value' => $category['description'] ?? null, 'class' => 'editor', 'required' => true])
@include('components.form.textarea', ['name' => 'description', 'value' => $category['description'] ?? null, 'class' => 'editor', 'required' => true])
</div>
</div>
</div>

View File

@@ -1,28 +1,11 @@
@extends('layout.index', [
'title' => __('customers.title'),
'subtitle' => __('customers.create.title'),
'breadcrumb' => [__('customers.title'), __('customers.create.title')]
'title' => __('shop.customers.title'),
'subtitle' => __('shop.customers.add'),
'breadcrumb' => [__('shop.customers.title')]
])
@include('boilerplate::load.fileinput')
@section('content')
{{ Form::open(['route' => 'Admin.Shop.Customers.store', 'id' => 'customer-form', 'autocomplete' => 'off']) }}
<div class="row">
<div class="col-sm-12 mbl">
<a href="{{ route("Admin.Shop.Customers.index") }}" class="btn btn-default">
{{ __('customers.list.title') }}
</a>
<span class="btn-group pull-right">
@include('components.button-save')
</span>
</div>
</div>
@include('Admin.Shop.Customers.form')
</form>
@endsection

View File

@@ -1,7 +1,7 @@
@extends('layout.index', [
'title' => 'Clients',
'subtitle' => 'Edition d\'un client',
'breadcrumb' => ['Articles']
'title' => __('shop.customers.title'),
'subtitle' => __('shop.customers.edit'),
'breadcrumb' => [__('shop.customers.title')]
])
@include('boilerplate::load.fileinput')

View File

@@ -1,23 +1,39 @@
@include('boilerplate::load.tinymce')
<div class="row">
<div class="col-md-8">
{{ Form::label('name', 'Nom') }}
@include('components.input', ['name' => 'name', 'value' => (isset($family['name'])) ? $family['name'] : null, 'required' => true])
{{ Form::label('description', 'Description') }}
@include('components.textarea', ['name' => 'description', 'value' => isset($description) ? $description : null, 'class' => 'editor', 'required' => false])
<div class="row mb-3">
<div class="col-6">
{{ Form::label('last_name', 'Nom') }}
@include('components.form.input', ['name' => 'last_name', 'value' => $customer['last_name'] ?? null, 'required' => true])
</div>
<div class="col-6">
{{ Form::label('first_name', 'Prénom') }}
@include('components.form.input', ['name' => 'first_name', 'value' => $customer['first_name'] ?? null, 'required' => true])
</div>
</div>
<div class="row mb-3">
<div class="col-6">
{{ Form::label('email', 'Email') }}
@include('components.form.inputs.email', ['name' => 'email', 'value' => $customer['email'] ?? null, 'required' => true])
</div>
<div class="col-6">
{{ Form::label('sale_channel_id', __('shop.sale_channels.name')) }}
@include('components.form.select', ['name' => 'sale_channel_id', 'list' => $sale_channels ?? [], 'value' => $customer['sale_channel_id'] ?? null, 'with_empty' => '', 'class' => 'select2'])
</div>
</div>
@include('components.address', ['with_country' => false])
</div>
</div>
@include('components.save')
@include('load.form.save')
@include('load.form.select2')
@push('js')
<script>
$(function() {
$('.editor').tinymce({});
initSelect2();
initSaveForm('#customer-form');
});
</script>
@endpush

View File

@@ -0,0 +1,11 @@
@extends('layout.index', [
'title' => __('shop.deliveries.title'),
'subtitle' => __('shop.deliveries.add'),
'breadcrumb' => [__('shop.deliveries.title'), __('shop.deliveries.add')]
])
@section('content')
{{ Form::open(['route' => 'Admin.Shop.Deliveries.store', 'id' => 'delivery-form', 'autocomplete' => 'off']) }}
@include('Admin.Shop.Deliveries.form')
</form>
@endsection

View File

@@ -0,0 +1,12 @@
@extends('layout.index', [
'title' => __('shop.deliveries.title'),
'subtitle' => __('shop.deliveries.edit'),
'breadcrumb' => [__('shop.deliveries.title')]
])
@section('content')
{{ Form::open(['route' => 'Admin.Shop.Deliveries.store', 'id' => 'delivery-form', 'autocomplete' => 'off']) }}
<input type="hidden" name="id" value="{{ $delivery['id'] }}">
@include('Admin.Shop.Deliveries.form')
</form>
@endsection

View File

@@ -0,0 +1,57 @@
<div class="row">
<div class="col-xs-12 col-xl-8">
<div class="row mb-3">
<div class="col-6">
{{ Form::label('sale_channel_id', __('shop.sale_channels.name')) }}
@include('components.form.select', ['name' => 'sale_channel_id', 'list' => $sale_channels ?? [], 'value' => $delivery['sale_channel_id'] ?? null, 'with_empty' => '', 'class' => 'select2'])
</div>
<div class="col-6">
<div class="row">
<div class="col-5">
{{ Form::label('active', __('active')) }}<br/>
@include("components.form.toggle", ['value' => $delivery['active'] ?? false, 'on' => __('active'), 'off' => __('inactive')])
</div>
<div class="col-3">
{{ Form::label('is_public', __('public')) }}
@include('components.form.checkboxes.icheck', ['name' => 'is_public', 'value' => $delivery['is_public'] ?? null])
</div>
<div class="col-4">
{{ Form::label('is_public', __('A domicile')) }}
@include('components.form.checkboxes.icheck', ['name' => 'at_house', 'value' => $delivery['at_house'] ?? null])
</div>
</div>
</div>
</div>
<div class="row mb-3">
<div class="col-12">
{{ Form::label('name', __('name')) }}
@include('components.form.input', ['name' => 'name', 'value' => $delivery['name'] ?? null, 'required' => true])
</div>
</div>
@include('components.address', ['with_country' => false])
<div class="row mb-3">
<div class="col-6">
{{ Form::label('event_date', __('date')) }}
@include('components.form.datepicker', ['name' => 'event_date', 'value' => $delivery['event_date'] ?? null])
</div>
</div>
</div>
</div>
@include('components.save')
@include('load.form.select2')
@include('load.form.save')
@push('js')
<script>
$(function() {
initSelect2();
initDatepicker();
initSaveForm('#delivery-form');
});
</script>
@endpush

View File

@@ -0,0 +1,26 @@
@extends('layout.index', [
'title' => __('shop.deliveries.title'),
'subtitle' => __('shop.deliveries.list'),
'breadcrumb' => [__('shop.deliveries.title')]
])
@section('content')
@component('components.card')
@include('components.datatable', ['route' => route('Admin.Shop.Deliveries.index'), 'model' => 'deliveries', 'callback' => 'handleDelivery();'])
@endcomponent
@endsection
@include('load.form.select2')
@include('load.form.toggle')
@push('js')
<script>
function handleDelivery() {
initToggle("{{ route('Admin.Shop.Deliveries.toggleActive') }}");
}
$(document).ready(function () {
initSelect2();
});
</script>
@endpush

View File

@@ -0,0 +1,36 @@
@extends('layout.index', [
'title' => __('products.title'),
'subtitle' => __('products.title'),
'breadcrumb' => [__('products.title')]
])
@section('content')
<form action="{{ route('Shop.Products') }}" method="GET">
<div class="row">
<div class="col-md-offset-2 col-md-8">
<div class="box box-info">
<div class="box-body">
<div class="col-md-6">
<h3>{{ name }}</h3>
<h4>
{{ $product.section.name }}<br>
</h4>
</div>
<div class="col-md-6 text-right">
<h2>{{ $prix_total }} </h2>
<h4>{{ $residence['type_produit']['name'] }}</h4>
</div>
<div class="col-md-12">
@include('Hestimmo.modules.Lot.partials.carousel')
</div>
</div>
</div>
</div>
</div>
</form>
@endsection

View File

@@ -11,7 +11,7 @@
{{ Form::open(['route' => 'Admin.Shop.Invoices.update', 'id' => 'invoice-form', 'autocomplete' => 'off']) }}
<input type="hidden" name="id" value="{{ $invoice['id'] }}">
@include('Admin.Shop.Invoices.form')
@include('components.button-save')
@include('components.form.buttons.button-save')
</form>

View File

@@ -4,10 +4,10 @@
<div class="row">
<div class="col-md-8">
{{ Form::label('name', 'Nom') }}
@include('components.input', ['name' => 'name', 'value' => (isset($family['name'])) ? $family['name'] : null, 'required' => true])
@include('components.form.input', ['name' => 'name', 'value' => (isset($family['name'])) ? $family['name'] : null, 'required' => true])
{{ Form::label('description', 'Description') }}
@include('components.textarea', ['name' => 'description', 'value' => isset($description) ? $description : null, 'class' => 'editor', 'required' => false])
@include('components.form.textarea', ['name' => 'description', 'value' => isset($description) ? $description : null, 'class' => 'editor', 'required' => false])
</div>
</div>
@@ -15,7 +15,7 @@
<div class="row">
<div class="col-md-8">
<div class="float-right mt-3">
@include('components.button-save')
@include('components.form.buttons.button-save')
</div>
</div>
</div>

View File

@@ -3,21 +3,21 @@
<div class="row mb-3">
<div class="col-12">
{{ Form::label('article_id', 'Article') }}
@include('components.select', ['name' => 'article_id', 'id_name' => 'article_id', 'list' => $articles ?? null, 'value' => $offer['article_id'] ?? null, 'with_empty' => '', 'class' => 'select2 select_article'])
@include('components.form.select', ['name' => 'article_id', 'id_name' => 'article_id', 'list' => $articles ?? null, 'value' => $offer['article_id'] ?? null, 'with_empty' => '', 'class' => 'select2 select_article'])
</div>
</div>
<div class="row mb-3">
<div class="col-12">
{{ Form::label('variation_id', 'Déclinaison') }}
@include('components.select', ['name' => 'variation_id', 'id_name' => 'variation_id', 'list' => $variations ?? null, 'value' => $offer['variation_id'] ?? null, 'with_empty' => '', 'class' => 'select2 select_variation'])
@include('components.form.select', ['name' => 'variation_id', 'id_name' => 'variation_id', 'list' => $variations ?? null, 'value' => $offer['variation_id'] ?? null, 'with_empty' => '', 'class' => 'select2 select_variation'])
</div>
</div>
<div class="row mb-3">
<div class="col-12">
{{ Form::label('tariff_id', 'Tarif') }}
@include('components.select', ['name' => 'tariff_id', 'id_name' => 'tariff_id', 'list' => $tariffs ?? null, 'value' => $offer['tariff_id'] ?? null, 'with_empty' => '', 'class' => 'select2 select_tariffs'])
@include('components.form.select', ['name' => 'tariff_id', 'id_name' => 'tariff_id', 'list' => $tariffs ?? null, 'value' => $offer['tariff_id'] ?? null, 'with_empty' => '', 'class' => 'select2 select_tariffs'])
</div>
</div>
@@ -25,27 +25,27 @@
<div class="row mb-3">
<div class="col-12 col-xl-6">
{{ Form::label('stock_current', 'Appro immédiate') }}
@include('components.money', ['name' => 'stock_current', 'value' => $offer['stock_current'] ?? 0])
@include('components.form.inputs.money', ['name' => 'stock_current', 'value' => $offer['stock_current'] ?? 0])
</div>
</div>
<div class="row mb-3">
<div class="col-6">
{{ Form::label('stock_delayed', 'Appro sur delai') }}
@include('components.money', ['name' => 'stock_delayed', 'value' => $offer['stock_delayed'] ?? 0])
@include('components.form.inputs.money', ['name' => 'stock_delayed', 'value' => $offer['stock_delayed'] ?? 0])
</div>
<div class="col-6">
{{ Form::label('delay_type', 'Délai type') }}
@include('components.input', ['name' => 'delay_type', 'value' => $offer['delay_type'] ?? null])
@include('components.form.input', ['name' => 'delay_type', 'value' => $offer['delay_type'] ?? null])
</div>
</div>
<div class="row mb-3">
<div class="col-6">
{{ Form::label('stock_ondemand', 'Appro sur demande') }}
@include('components.toggle', ['name' => 'stock_ondemand', 'value' => $offer['stock_ondemand'] ?? 0])
@include('components.form.toggle', ['name' => 'stock_ondemand', 'value' => $offer['stock_ondemand'] ?? 0])
</div>
<div class="col-6">
{{ Form::label('minimum_ondemand', 'Minimum de quantité') }}
@include('components.money', ['name' => 'minimum_ondemand', 'value' => $offer['minimum_ondemand'] ?? 0])
@include('components.form.inputs.money', ['name' => 'minimum_ondemand', 'value' => $offer['minimum_ondemand'] ?? 0])
</div>
</div>
@endcomponent

View File

@@ -5,5 +5,7 @@
])
@section('content')
@include('components.datatable', ['route' => route('Admin.Shop.Offers.index'), 'model' => 'offers'])
@component('components.card')
@include('components.datatable', ['route' => route('Admin.Shop.Offers.index'), 'model' => 'offers'])
@endcomponent
@endsection

View File

@@ -17,7 +17,7 @@
</a>
<span class="btn-group pull-right">
@include('components.button-save')
@include('components.form.buttons.button-save')
</span>
</div>
</div>

View File

@@ -17,7 +17,7 @@
</a>
<span class="btn-group pull-right">
@include('components.button-save')
@include('components.form.buttons.button-save')
</span>
</div>
</div>

View File

@@ -4,10 +4,10 @@
<div class="row">
<div class="col-md-8">
{{ Form::label('name', 'Nom') }}
@include('components.input', ['name' => 'name', 'value' => (isset($family['name'])) ? $family['name'] : null, 'required' => true])
@include('components.form.input', ['name' => 'name', 'value' => (isset($family['name'])) ? $family['name'] : null, 'required' => true])
{{ Form::label('description', 'Description') }}
@include('components.textarea', ['name' => 'description', 'value' => isset($description) ? $description : null, 'class' => 'editor', 'required' => false])
@include('components.form.textarea', ['name' => 'description', 'value' => isset($description) ? $description : null, 'class' => 'editor', 'required' => false])
</div>
</div>
@@ -15,7 +15,7 @@
<div class="row">
<div class="col-md-8">
<div class="float-right mt-3">
@include('components.button-save')
@include('components.form.buttons.button-save')
</div>
</div>
</div>

View File

@@ -1,7 +1,7 @@
<div class="row">
<div class="col-md-8">
{{ Form::label('name', 'Valeur') }}
@include('components.input', ['name' => 'value', 'value' => $package['value'] ?? null, 'required' => true])
@include('components.form.input', ['name' => 'value', 'value' => $package['value'] ?? null, 'required' => true])
</div>
</div>

View File

@@ -2,7 +2,7 @@
<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' => ' '])
@include('components.form.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>

View File

@@ -1,14 +1,14 @@
<div class="row">
<div class="col-md-6">
{{ Form::label('name', 'Catégorie') }}
@include('components.select', ['name' => 'category_id', 'list' => $categories, 'value' => $generic['category_id'] ?? null, 'required' => true])
@include('components.form.select', ['name' => 'category_id', 'list' => $categories, 'value' => $generic['category_id'] ?? null, 'required' => true])
</div>
</div>
<div class="row mb-3">
<div class="col-md-6">
{{ Form::label('name', 'Nom') }}
@include('components.input', ['name' => 'name', 'value' => $generic['name'] ?? null, 'required' => true])
@include('components.form.input', ['name' => 'name', 'value' => $generic['name'] ?? null, 'required' => true])
</div>
</div>

View File

@@ -9,12 +9,12 @@
<div class="col-1">
{{ Form::label('quantity', 'Qté.') }}<br/>
@include('components.number', ['name' => "prices[$key][quantity]", 'value' => $price['quantity'] ?? 1, 'required' => true, 'class' => 'form-control-sm'])
@include('components.form.inputs.number', ['name' => "prices[$key][quantity]", 'value' => $price['quantity'] ?? 1, 'required' => true, 'class' => 'form-control-sm'])
</div>
<div class="col-lg-3">
{{ Form::label('package_id', 'Type Package') }}<br/>
@include('components.select', [
@include('components.form.select', [
'name' => "prices[$key][package_id]",
'value' => $price['package_id'] ?? null,
'list' => $packages ?? null,
@@ -25,7 +25,7 @@
<div class="col-lg-1">
{{ Form::label('package_qty', 'Pack Qté') }}<br/>
@include('components.number', [
@include('components.form.inputs.number', [
'name' => "prices[$key][package_quantity]",
'value' => $price['package_quantity'] ?? null,
'required' => true,
@@ -35,7 +35,7 @@
<div class="col-lg-3">
{{ Form::label('unity_id', 'Unité') }}<br/>
@include('components.select', [
@include('components.form.select', [
'name' => "prices[$key][unity_id]",
'value' => $price['unity_id'] ?? null,
'list' => $unities ?? null,
@@ -49,17 +49,17 @@
<div class="row">
<div class="col-4">
{{ Form::label('tax_id', 'TVA') }}<br/>
@include('components.select', ['name' => "prices[$key][tax_id]", 'value' => $price['tax_id'] ?? null, 'list' => $taxes_options ?? null, 'required' => true, 'class' => 'form-control form-control-sm'])
@include('components.form.select', ['name' => "prices[$key][tax_id]", 'value' => $price['tax_id'] ?? null, 'list' => $taxes_options ?? null, 'required' => true, 'class' => 'form-control form-control-sm'])
</div>
<div class="col-4">
{{ Form::label('price', 'Prix HT') }}
@include('components.money', ['name' => "prices[$key][price]", 'value' => $price['price'] ?? 0, 'required' => true, 'class' => 'form-control-sm price-item'])
@include('components.form.inputs.money', ['name' => "prices[$key][price]", 'value' => $price['price'] ?? 0, 'required' => true, 'class' => 'form-control-sm price-item'])
</div>
<div class="col-4">
{{ 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'])
@include('components.form.inputs.money', ['name' => "prices[$key][price_taxed]", 'value' => $price['price_taxed'] ?? 0, 'required' => true, 'class' => 'form-control-sm price-taxed-item'])
</div>
</div>
</div>

View File

@@ -9,17 +9,17 @@
<div class="col-1">
{{ Form::label('quantity', 'Quantité') }}<br/>
@include('components.number', ['name' => 'prices[0][quantity]', 'value' => $quantity ?? 1, 'required' => true, 'class' => 'form-control-sm'])
@include('components.form.inputs.number', ['name' => 'prices[0][quantity]', 'value' => $quantity ?? 1, 'required' => true, 'class' => 'form-control-sm'])
</div>
<div class="col-3">
{{ Form::label('package_id', 'Unité') }}<br/>
@include('components.select', ['name' => 'prices[0][package_id]', 'value' => $package_id ?? null, 'list' => $packages ?? null, 'required' => true, 'class' => 'select2 form-control-sm w-100'])
@include('components.form.select', ['name' => 'prices[0][package_id]', 'value' => $package_id ?? null, 'list' => $packages ?? null, 'required' => true, 'class' => 'select2 form-control-sm w-100'])
</div>
<div class="col-lg-1">
{{ Form::label('package_qty', 'Pack Qté') }}<br/>
@include('components.number', [
@include('components.form.inputs.number', [
'name' => "prices[0][package_quantity]",
'value' => $price['package_quantity'] ?? null,
'required' => true,
@@ -29,7 +29,7 @@
<div class="col-lg-3">
{{ Form::label('unity_id', 'Unité') }}<br/>
@include('components.select', [
@include('components.form.select', [
'name' => "prices[0][unity_id]",
'value' => $price['unity_id'] ?? null,
'list' => $unities ?? null,
@@ -43,17 +43,17 @@
<div class="row">
<div class="col-4">
{{ Form::label('tax_id', 'TVA') }}<br/>
@include('components.select', ['name' => "prices[0][tax_id]", 'value' => $price['tax_id'] ?? null, 'list' => $taxes_options ?? null, 'required' => true, 'class' => 'form-control form-control-sm'])
@include('components.form.select', ['name' => "prices[0][tax_id]", 'value' => $price['tax_id'] ?? null, 'list' => $taxes_options ?? null, 'required' => true, 'class' => 'form-control form-control-sm'])
</div>
<div class="col-4">
{{ Form::label('price', 'Prix HT') }}
@include('components.money', ['name' => "prices[0][price]", 'value' => $price['price'] ?? 0, 'required' => true, 'class' => 'form-control-sm price-item'])
@include('components.form.inputs.money', ['name' => "prices[0][price]", 'value' => $price['price'] ?? 0, 'required' => true, 'class' => 'form-control-sm price-item'])
</div>
<div class="col-4">
{{ Form::label('price_taxed', 'Prix TTC') }}
@include('components.money', ['name' => "prices[0][price_taxed]", 'value' => $price['price_taxed'] ?? 0, 'required' => true, 'class' => 'form-control-sm price-taxed-item'])
@include('components.form.inputs.money', ['name' => "prices[0][price_taxed]", 'value' => $price['price_taxed'] ?? 0, 'required' => true, 'class' => 'form-control-sm price-taxed-item'])
</div>
</div>
</div>

View File

@@ -2,7 +2,7 @@
<div class="row">
<label class="col-4">Catégories</label>
<div class="col-8">
@include('components.select', ['name' => 'category_id', 'list' => (isset($categories)) ? $categories : [], 'value' => (isset($filters['category_id'])) ? $filters['category_id'] : null, 'class' => 'form-control-sm select2', 'with_empty' => ' '])
@include('components.form.select', ['name' => 'category_id', 'list' => (isset($categories)) ? $categories : [], 'value' => (isset($filters['category_id'])) ? $filters['category_id'] : null, 'class' => 'form-control-sm select2', 'with_empty' => ' '])
</div>
</div>
</form>

View File

@@ -1,18 +1,18 @@
<tr>
<input type="hidden" name="price_list_values[{{ $index }}][id]" value="{{ $price_list_value['id'] ?? null }}">
<td>
@include('components.input', ['name' => 'price_list_values[' . $index . '][code]', 'value' => $price_list_value['code'] ?? null, 'required' => true])
@include('components.form.input', ['name' => 'price_list_values[' . $index . '][code]', 'value' => $price_list_value['code'] ?? null, 'required' => true])
</td>
<td>
@include('components.number', ['name' => 'price_list_values[' . $index . '][quantity]', 'value' => $price_list_value['quantity'] ?? null, 'required' => true, 'meta' => "step = '.01'"])
@include('components.form.inputs.number', ['name' => 'price_list_values[' . $index . '][quantity]', 'value' => $price_list_value['quantity'] ?? null, 'required' => true, 'meta' => "step = '.01'"])
</td>
<td>
@include('components.money', ['name' => 'price_list_values[' . $index . '][price]', 'value' => $price_list_value['price'] ?? null, 'required' => true, 'class' => 'price'])
@include('components.form.inputs.money', ['name' => 'price_list_values[' . $index . '][price]', 'value' => $price_list_value['price'] ?? null, 'required' => true, 'class' => 'price'])
</td>
<td>
@include('components.select', ['name' => 'price_list_values[' . $index . '][tax_id]', 'list' => $taxes ?? [], 'value' => $price_list_value['tax_id'] ?? null, 'required' => true, 'class' => 'tax'])
@include('components.form.select', ['name' => 'price_list_values[' . $index . '][tax_id]', 'list' => $taxes ?? [], 'value' => $price_list_value['tax_id'] ?? null, 'required' => true, 'class' => 'tax'])
</td>
<td>
@include('components.money', ['name' => 'price_list_values[' . $index . '][price_taxed]', 'value' => $price_list_value['price_taxed'] ?? null, 'required' => true, 'class' => 'price_taxed'])
@include('components.form.inputs.money', ['name' => 'price_list_values[' . $index . '][price_taxed]', 'value' => $price_list_value['price_taxed'] ?? null, 'required' => true, 'class' => 'price_taxed'])
</td>
</tr>

View File

@@ -1,14 +1,14 @@
<div class="row">
<div class="col-md-6">
{{ Form::label('name', 'Catégorie') }}
@include('components.select', ['name' => 'category_id', 'list' => $categories ?? [], 'value' => $generic['category_id'] ?? null, 'required' => true])
@include('components.form.select', ['name' => 'category_id', 'list' => $categories ?? [], 'value' => $generic['category_id'] ?? null, 'required' => true])
</div>
</div>
<div class="row mb-3">
<div class="col-md-6">
{{ Form::label('name', 'Nom') }}
@include('components.input', ['name' => 'name', 'value' => $price_list['name'] ?? null, 'required' => true])
@include('components.form.input', ['name' => 'name', 'value' => $price_list['name'] ?? null, 'required' => true])
</div>
</div>

View File

@@ -6,18 +6,18 @@
<div class="row mb-3">
<div class="col-8">
{{ Form::label('name', 'Nom') }}
@include('components.input', ['name' => 'name', 'value' => $price_list['name'] ?? null, 'required' => true])
@include('components.form.input', ['name' => 'name', 'value' => $price_list['name'] ?? null, 'required' => true])
</div>
<div class="col-4">
{{ Form::label('status_id', 'Etat') }}
@include('components.select', ['name' => 'status_id', 'list' => $statuses ?? [], 'value' => $price_list['status_id'] ?? null, 'required' => true])
@include('components.form.select', ['name' => 'status_id', 'list' => $statuses ?? [], 'value' => $price_list['status_id'] ?? null, 'required' => true])
</div>
</div>
<div class="row mb-3">
<div class="col-6">
{{ Form::label('sale_channel_id', 'Canal de vente') }}
@include('components.select', ['name' => 'sale_channel_id', 'list' => $sale_channels ?? [], 'value' => $price_list['sale_channel_id'] ?? null, 'required' => true, 'with_empty' => ''])
@include('components.form.select', ['name' => 'sale_channel_id', 'list' => $sale_channels ?? [], 'value' => $price_list['sale_channel_id'] ?? null, 'required' => true, 'with_empty' => ''])
</div>
</div>

View File

@@ -9,12 +9,12 @@
<div class="col-1">
{{ Form::label('quantity', 'Qté.') }}<br/>
@include('components.number', ['name' => "prices[$key][quantity]", 'value' => $price['quantity'] ?? 1, 'required' => true, 'class' => 'form-control-sm'])
@include('components.form.inputs.number', ['name' => "prices[$key][quantity]", 'value' => $price['quantity'] ?? 1, 'required' => true, 'class' => 'form-control-sm'])
</div>
<div class="col-lg-3">
{{ Form::label('package_id', 'Type Package') }}<br/>
@include('components.select', [
@include('components.form.select', [
'name' => "prices[$key][package_id]",
'value' => $price['package_id'] ?? null,
'list' => $packages ?? null,
@@ -25,7 +25,7 @@
<div class="col-lg-1">
{{ Form::label('package_qty', 'Pack Qté') }}<br/>
@include('components.number', [
@include('components.form.inputs.number', [
'name' => "prices[$key][package_quantity]",
'value' => $price['package_quantity'] ?? null,
'required' => true,
@@ -35,7 +35,7 @@
<div class="col-lg-3">
{{ Form::label('unity_id', 'Unité') }}<br/>
@include('components.select', [
@include('components.form.select', [
'name' => "prices[$key][unity_id]",
'value' => $price['unity_id'] ?? null,
'list' => $unities ?? null,
@@ -49,17 +49,17 @@
<div class="row">
<div class="col-4">
{{ Form::label('tax_id', 'TVA') }}<br/>
@include('components.select', ['name' => "prices[$key][tax_id]", 'value' => $price['tax_id'] ?? null, 'list' => $taxes_options ?? null, 'required' => true, 'class' => 'form-control form-control-sm'])
@include('components.form.select', ['name' => "prices[$key][tax_id]", 'value' => $price['tax_id'] ?? null, 'list' => $taxes_options ?? null, 'required' => true, 'class' => 'form-control form-control-sm'])
</div>
<div class="col-4">
{{ Form::label('price', 'Prix HT') }}
@include('components.money', ['name' => "prices[$key][price]", 'value' => $price['price'] ?? 0, 'required' => true, 'class' => 'form-control-sm price-item'])
@include('components.form.inputs.money', ['name' => "prices[$key][price]", 'value' => $price['price'] ?? 0, 'required' => true, 'class' => 'form-control-sm price-item'])
</div>
<div class="col-4">
{{ 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'])
@include('components.form.inputs.money', ['name' => "prices[$key][price_taxed]", 'value' => $price['price_taxed'] ?? 0, 'required' => true, 'class' => 'form-control-sm price-taxed-item'])
</div>
</div>
</div>

View File

@@ -9,29 +9,29 @@
<div class="col-2">
{{ Form::label('code', 'Code') }}<br/>
@include('components.input', ['name' => 'prices[0][code]', 'value' => $code ?? '', 'required' => true, 'class' => 'form-control-sm'])
@include('components.form.input', ['name' => 'prices[0][code]', 'value' => $code ?? '', 'required' => true, 'class' => 'form-control-sm'])
</div>
<div class="col-1">
{{ Form::label('quantity', 'Seuil') }}<br/>
@include('components.number', ['name' => 'prices[0][quantity]', 'value' => $quantity ?? 1, 'required' => true, 'class' => 'form-control-sm'])
@include('components.form.inputs.number', ['name' => 'prices[0][quantity]', 'value' => $quantity ?? 1, 'required' => true, 'class' => 'form-control-sm'])
</div>
<div class="col-3">
<div class="row">
<div class="col-4">
{{ Form::label('tax_id', 'TVA') }}<br/>
@include('components.select', ['name' => "prices[0][tax_id]", 'value' => $price['tax_id'] ?? null, 'list' => $taxes_options ?? null, 'required' => true, 'class' => 'form-control form-control-sm'])
@include('components.form.select', ['name' => "prices[0][tax_id]", 'value' => $price['tax_id'] ?? null, 'list' => $taxes_options ?? null, 'required' => true, 'class' => 'form-control form-control-sm'])
</div>
<div class="col-4">
{{ Form::label('price', 'Prix HT') }}
@include('components.money', ['name' => "prices[0][price]", 'value' => $price['price'] ?? 0, 'required' => true, 'class' => 'form-control-sm price-item'])
@include('components.form.inputs.money', ['name' => "prices[0][price]", 'value' => $price['price'] ?? 0, 'required' => true, 'class' => 'form-control-sm price-item'])
</div>
<div class="col-4">
{{ Form::label('price_taxed', 'Prix TTC') }}
@include('components.money', ['name' => "prices[0][price_taxed]", 'value' => $price['price_taxed'] ?? 0, 'required' => true, 'class' => 'form-control-sm price-taxed-item'])
@include('components.form.inputs.money', ['name' => "prices[0][price_taxed]", 'value' => $price['price_taxed'] ?? 0, 'required' => true, 'class' => 'form-control-sm price-taxed-item'])
</div>
</div>
</div>

View File

@@ -1,7 +1,7 @@
@extends('layout.index', [
'title' => __('sale_channels.title'),
'subtitle' => __('sale_channels.create.title'),
'breadcrumb' => [__('sale_channels.title'), __('sale_channels.create.title')]
'title' => __('shop.sale_channels.title'),
'subtitle' => __('shop.sale_channels.add'),
'breadcrumb' => [__('shop.sale_channels.title'), __('shop.sale_channels.add')]
])
@section('content')

View File

@@ -1,15 +1,12 @@
@extends('layout.index', [
'title' => __('sale_channels.title'),
'subtitle' => __('sale_channels.edit'),
'breadcrumb' => ['SaleChannel']
'title' => __('shop.sale_channels.title'),
'subtitle' => __('shop.sale_channels.edit'),
'breadcrumb' => [__('shop.sale_channels.title')]
])
@section('content')
{{ Form::open(['route' => 'Admin.Shop.SaleChannels.store', 'id' => 'sale_channels-form', 'autocomplete' => 'off']) }}
<input type="hidden" name="id" value="{{ $sale_channel['id'] }}">
@include('Admin.Shop.SaleChannels.form')
</form>
@endsection

View File

@@ -1,22 +1,34 @@
<div class="row">
<div class="col-md-8">
{{ Form::label('name', 'Nom') }}
@include('components.input', ['name' => 'name', 'value' => $sale_channel['name'] ?? null, 'required' => true])
{{ Form::label('description', 'Description') }}
@include('components.textarea', ['name' => 'description', 'value' => $sale_channel['description'] ?? null, 'class' => 'editor', 'required' => false])
<div class="row mb-3">
<div class="col-8">
{{ Form::label('name', 'Nom') }}
@include('components.form.input', ['name' => 'name', 'value' => $sale_channel['name'] ?? null, 'required' => true])
</div>
<div class="col-4">
{{ Form::label('name', 'Code abrégé') }}
@include('components.form.input', ['name' => 'code', 'value' => $sale_channel['code'] ?? null, 'required' => true])
</div>
</div>
<div class="row mb-3">
<div class="col-12">
{{ Form::label('description', 'Description') }}
@include('components.form.textarea', ['name' => 'description', 'value' => $sale_channel['description'] ?? null, 'class' => 'editor', 'required' => false])
</div>
</div>
</div>
</div>
@include('components.save')
@include('load.form.editor')
@include('load.form.save')
@push('js')
<script>
$(function() {
initEditor();
initSaveForm('#sale_channels-form');
});
</script>
@endpush

View File

@@ -5,5 +5,7 @@
])
@section('content')
@include('components.datatable', ['route' => route('Admin.Shop.SaleChannels.index'), 'model' => 'sale_channels'])
@component('components.card')
@include('components.datatable', ['route' => route('Admin.Shop.SaleChannels.index'), 'model' => 'sale_channels'])
@endcomponent
@endsection

View File

@@ -1,14 +1,14 @@
<div class="row">
<div class="col-md-6">
{{ Form::label('name', 'Famille d\'articles') }}
@include('components.select', ['name' => 'article_family_id', 'value' => $article_family_id ?? null, 'list' => $article_families ?? [], 'required' => true, 'with_empty' => ''])
@include('components.form.select', ['name' => 'article_family_id', 'value' => $article_family_id ?? null, 'list' => $article_families ?? [], 'required' => true, 'with_empty' => ''])
</div>
</div>
<div class="row mt-3">
<div class="col-md-6">
{{ Form::label('name', 'Nom') }}
@include('components.input', ['name' => 'name', 'value' => isset($name) ? $name : null, 'required' => true])
@include('components.form.input', ['name' => 'name', 'value' => isset($name) ? $name : null, 'required' => true])
</div>
</div>

View File

@@ -4,12 +4,12 @@
<div class="row">
<div class="col-md-6">
{{ Form::label('name', 'Groupe') }}
@include('components.select', ['name' => 'tag_group_id', 'list' => $tag_groups, 'value' => isset($tag_group_id) ? $tag_group_id : null, 'required' => true, 'with_empty' => ''])
@include('components.form.select', ['name' => 'tag_group_id', 'list' => $tag_groups, 'value' => isset($tag_group_id) ? $tag_group_id : null, 'required' => true, 'with_empty' => ''])
</div>
<div class="col-md-6">
{{ Form::label('name', 'Nom') }}
@include('components.input', ['name' => 'name', 'value' => isset($name) ? $name : null, 'required' => true])
@include('components.form.input', ['name' => 'name', 'value' => isset($name) ? $name : null, 'required' => true])
</div>
</div>
@@ -19,7 +19,7 @@
<div class="row">
<div class="col-md-8">
<div class="float-right mt-3">
@include('components.button-save')
@include('components.form.buttons.button-save')
</div>
</div>
</div>

View File

@@ -5,5 +5,7 @@
])
@section('content')
@include('components.datatable', ['route' => route('Admin.Shop.Tags.index'), 'model' => 'tags'])
@component('components.card')
@include('components.datatable', ['route' => route('Admin.Shop.Tags.index'), 'model' => 'tags'])
@endcomponent
@endsection

View File

@@ -7,33 +7,33 @@
<div class="row mb-3">
<div class="col-8">
{{ Form::label('name', 'Nom') }}
@include('components.input', ['name' => 'name', 'value' => $tariff['name'] ?? null, 'required' => true])
@include('components.form.input', ['name' => 'name', 'value' => $tariff['name'] ?? null, 'required' => true])
</div>
<div class="col-4">
{{ Form::label('name', 'Etat') }}
@include('components.select', ['name' => 'status_id', 'list' => $statuses ?? [], 'value' => $tariff['status_id'] ?? null, 'required' => true, 'with_empty' => ''])
@include('components.form.select', ['name' => 'status_id', 'list' => $statuses ?? [], 'value' => $tariff['status_id'] ?? null, 'required' => true, 'with_empty' => ''])
</div>
</div>
<div class="row mb-3">
<div class="col-6">
{{ Form::label('name', 'Code') }}
@include('components.input', ['name' => 'code', 'value' => $tariff['code'] ?? null, 'required' => true])
@include('components.form.input', ['name' => 'code', 'value' => $tariff['code'] ?? null, 'required' => true])
</div>
<div class="col-6">
{{ Form::label('name', 'Ref') }}
@include('components.input', ['name' => 'ref', 'value' => $tariff['ref'] ?? null, 'required' => true])
@include('components.form.input', ['name' => 'ref', 'value' => $tariff['ref'] ?? null, 'required' => true])
</div>
</div>
<div class="row mb-3">
<div class="col-8">
{{ Form::label('name', 'Canal de vente par défaut') }}
@include('components.select', ['name' => 'sale_channel_id', 'list' => $sale_channels ?? [], 'value' => $tariff['sale_channel_id'] ?? null, 'required' => true, 'with_empty' => ''])
@include('components.form.select', ['name' => 'sale_channel_id', 'list' => $sale_channels ?? [], 'value' => $tariff['sale_channel_id'] ?? null, 'required' => true, 'with_empty' => ''])
</div>
<div class="col-4">
{{ Form::label('name', 'Unité du tarif') }}
@include('components.select', ['name' => 'tariff_unity_id', 'list' => $tariff_unities ?? [], 'value' => $tariff['tariff_unity_id'] ?? null, 'required' => true, 'with_empty' => ''])
@include('components.form.select', ['name' => 'tariff_unity_id', 'list' => $tariff_unities ?? [], 'value' => $tariff['tariff_unity_id'] ?? null, 'required' => true, 'with_empty' => ''])
</div>
</div>
@@ -41,7 +41,7 @@
<div class="row mb-3">
<div class="col-12">
{{ Form::label('description', 'Description') }}
@include('components.textarea', ['name' => 'description', 'value' => $tariff['description'] ?? null, 'class' => 'editor', 'required' => false])
@include('components.form.textarea', ['name' => 'description', 'value' => $tariff['description'] ?? null, 'class' => 'editor', 'required' => false])
</div>
</div>

View File

@@ -5,7 +5,9 @@
])
@section('content')
@include('components.datatable', ['route' => route('Admin.Shop.Tariffs.index'), 'model' => 'tariffs'])
@component('components.card')
@include('components.datatable', ['route' => route('Admin.Shop.Tariffs.index'), 'model' => 'tariffs'])
@endcomponent
@endsection
@include('load.layout.modal')

View File

@@ -1,14 +1,14 @@
<div class="row">
<div class="col-md-8">
{{ Form::label('name', 'Nom') }}
@include('components.input', ['name' => 'value', 'value' => $unity['value'] ?? null, 'required' => true])
@include('components.form.input', ['name' => 'value', 'value' => $unity['value'] ?? null, 'required' => true])
</div>
</div>
<div class="row">
<div class="col-md-8">
<div class="float-right mt-3">
@include('components.button-save')
@include('components.form.buttons.button-save')
</div>
</div>
</div>

View File

@@ -2,13 +2,13 @@
<div class="row">
<label class="col-4">Familles d'articles</label>
<div class="col-8">
@include('components.select', ['name' => 'family_id', 'list' => (isset($families)) ? $families : [], 'value' => (isset($filters['family_id'])) ? $filters['family_id'] : null, 'class' => 'form-control-sm select2', 'with_empty' => ' '])
@include('components.form.select', ['name' => 'family_id', 'list' => (isset($families)) ? $families : [], 'value' => (isset($filters['family_id'])) ? $filters['family_id'] : null, 'class' => 'form-control-sm select2', 'with_empty' => ' '])
</div>
</div>
<div class="row mt-3">
<label class="col-4">Packages</label>
<div class="col-8">
@include('components.select', ['name' => 'package_id', 'list' => (isset($packages)) ? $packages : [], 'value' => (isset($filters['package_id'])) ? $filters['package_id'] : null, 'class' => 'form-control-sm select2', 'with_empty' => ' '])
@include('components.form.select', ['name' => 'package_id', 'list' => (isset($packages)) ? $packages : [], 'value' => (isset($filters['package_id'])) ? $filters['package_id'] : null, 'class' => 'form-control-sm select2', 'with_empty' => ' '])
</div>
</div>
</form>

View File

@@ -3,15 +3,15 @@
<div class="row">
<div class="col-6">
{{ Form::label('package_id', 'Package') }}
@include('components.select', ['name' => 'package_id', 'list' => $packages ?? [], 'value' => $variation['package_id'] ?? false, 'required' => true, 'with_empty' => ''])
@include('components.form.select', ['name' => 'package_id', 'list' => $packages ?? [], 'value' => $variation['package_id'] ?? false, 'required' => true, 'with_empty' => ''])
</div>
<div class="col-2">
{{ Form::label('quantity', 'Quantité') }}
@include('components.input', ['name' => 'quantity', 'value' => $variation['quantity'] ?? false, 'required' => true])
@include('components.form.input', ['name' => 'quantity', 'value' => $variation['quantity'] ?? false, 'required' => true])
</div>
<div class="col-4">
{{ Form::label('unity_id', 'Unité') }}
@include('components.select', ['name' => 'unity_id', 'list' => $unities ?? [], 'value' => $variation['unity_id'] ?? false, 'required' => false, 'with_empty' => ''])
@include('components.form.select', ['name' => 'unity_id', 'list' => $unities ?? [], 'value' => $variation['unity_id'] ?? false, 'required' => false, 'with_empty' => ''])
</div>
</div>
</div>
@@ -20,7 +20,7 @@
<div class="row mb-3">
<div class="col-12">
{{ Form::label('description', 'Description') }}
@include('components.textarea', ['name' => 'description', 'value' => isset($variation['description']) ? $variation['description'] : null, 'class' => 'editor', 'required' => false])
@include('components.form.textarea', ['name' => 'description', 'value' => isset($variation['description']) ? $variation['description'] : null, 'class' => 'editor', 'required' => false])
</div>
</div>

View File

@@ -5,5 +5,7 @@
])
@section('content')
@include('components.datatable', ['route' => route('Admin.Shop.Variations.index'), 'model' => 'variations'])
@component('components.card')
@include('components.datatable', ['route' => route('Admin.Shop.Variations.index'), 'model' => 'variations'])
@endcomponent
@endsection