Fixes on unities, remove old code
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace App\DataTables;
|
||||
namespace App\Datatables;
|
||||
|
||||
use Yajra\DataTables\Html\Button;
|
||||
use Yajra\DataTables\Html\Column;
|
||||
@@ -10,9 +10,15 @@ use Yajra\DataTables\Services\DataTable;
|
||||
|
||||
class ParentDataTable extends DataTable
|
||||
{
|
||||
public $rowReorder; // ['selector' => 'tr']
|
||||
public $colReorder = true;
|
||||
public $rowReorder = true;
|
||||
public $rowReorderSelector; // ['selector' => 'tr']
|
||||
public $colReorder = false;
|
||||
public $fixedColumns = false;
|
||||
public $scrollX = false;
|
||||
public $scrollCollapse = true;
|
||||
public $sortedColumn = 0;
|
||||
public $sortedOrder = 'asc';
|
||||
public $stateSave = false;
|
||||
|
||||
/**
|
||||
* Build DataTable class.
|
||||
@@ -60,9 +66,15 @@ class ParentDataTable extends DataTable
|
||||
->exportable(false)
|
||||
->printable(false)
|
||||
->searchable(false)
|
||||
->width("74")
|
||||
->addClass('text-center text-nowrap');
|
||||
}
|
||||
|
||||
public static function isFilteredByField($field)
|
||||
{
|
||||
return (request()->has('filters.' . $field)) ? request()->input('filters.'. $field) : (request()->has($field) ? request()->input($field) : false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get query source of dataTable.
|
||||
*
|
||||
@@ -89,15 +101,20 @@ class ParentDataTable extends DataTable
|
||||
*
|
||||
* @return \Yajra\DataTables\Html\Builder
|
||||
*/
|
||||
public function buildHtml($id)
|
||||
public function buildHtml($table_id = false, $selector = false)
|
||||
{
|
||||
$table_id = $table_id ? $table_id : strtolower($this->model_name) . '-table';
|
||||
$selector = $selector ? $selector : '#' . $this->model_name . '-filters';
|
||||
return $this->builder()
|
||||
->setTableId($id)
|
||||
->setTableId($table_id)
|
||||
->parameters($this->getParameters())
|
||||
->columns($this->getColumns())
|
||||
->ajax(['data' => "function(d) { d.filters = $('#filters').serializeJSON(); }"])
|
||||
->ajax([
|
||||
'data' => 'function(d) { d.filters = $("' . $selector . '").serializeJSON(); }',
|
||||
'url' => isset($this->url) ? $this->url : ''
|
||||
])
|
||||
->dom($this->getDom())
|
||||
->orderBy(0,'asc')
|
||||
->orderBy($this->sortedColumn,$this->sortedOrder)
|
||||
->buttons($this->getButtons());
|
||||
}
|
||||
|
||||
@@ -112,14 +129,20 @@ class ParentDataTable extends DataTable
|
||||
|
||||
public function getParameters()
|
||||
{
|
||||
return [
|
||||
$data = [
|
||||
'pageLength' => 5,
|
||||
'scrollX' => true,
|
||||
'scrollCollapse' => true,
|
||||
'scrollX' => $this->scrollX,
|
||||
'scrollCollapse' => $this->scrollCollapse,
|
||||
'searchDelay' => 500,
|
||||
'colReorder' => $this->colReorder,
|
||||
'rowReorder' => $this->rowReorder,
|
||||
'fixedColumns' => $this->fixedColumns,
|
||||
// 'autoWidth' => false,
|
||||
'stateSave' => $this->stateSave
|
||||
];
|
||||
if ($this->rowReorder) {
|
||||
$data['rowReorder'] = ['selector' => $this->rowReorderSelector];
|
||||
}
|
||||
return $data;
|
||||
}
|
||||
|
||||
public function getDom()
|
||||
|
||||
@@ -13,9 +13,16 @@ class UnitiesDataTable extends DataTable
|
||||
public function query(Unity $model)
|
||||
{
|
||||
$model = $model::with(['package.article_family'])->select('shop_unities.*');
|
||||
$model = self::filterByFamily($model);
|
||||
return self::buildQuery($model);
|
||||
}
|
||||
|
||||
public static function filterByFamily($model, $family_id = false)
|
||||
{
|
||||
$family_id = $family_id ? $family_id : self::isFilteredByField('family_id');
|
||||
return $family_id ? $model->byArticleFamily($family_id) : $model;
|
||||
}
|
||||
|
||||
protected function getColumns()
|
||||
{
|
||||
return [
|
||||
|
||||
@@ -5,6 +5,7 @@ namespace App\Http\Controllers\Shop\Admin;
|
||||
use Illuminate\Http\Request;
|
||||
use App\Http\Controllers\Controller;
|
||||
|
||||
use App\Repositories\Shop\ArticleFamilies;
|
||||
use App\Repositories\Shop\Packages;
|
||||
use App\Repositories\Shop\Unities;
|
||||
use App\DataTables\Shop\UnitiesDataTable;
|
||||
@@ -13,6 +14,7 @@ class UnityController extends Controller
|
||||
{
|
||||
public function index(UnitiesDataTable $dataTable)
|
||||
{
|
||||
$data['families'] = ArticleFamilies::getOptions();
|
||||
$data['packages'] = Packages::getOptions();
|
||||
return $dataTable->render('Shop.Admin.Unities.list', $data);
|
||||
}
|
||||
@@ -25,7 +27,7 @@ class UnityController extends Controller
|
||||
public function getOptionsByPackage(Request $request)
|
||||
{
|
||||
$id = $request->input('package_id');
|
||||
return response()->json(Unities::getSelectByPackage($id));
|
||||
return response()->json(Unities::getOptionsByPackage($id));
|
||||
}
|
||||
|
||||
public function create()
|
||||
|
||||
@@ -19,7 +19,7 @@ class Package extends Model
|
||||
return $this->hasMany('App\Models\Shop\Unity');
|
||||
}
|
||||
|
||||
public function scopeByFamily($query, $id)
|
||||
public function scopeByArticleFamily($query, $id)
|
||||
{
|
||||
return $query->where('article_family_id', $id);
|
||||
}
|
||||
|
||||
@@ -28,4 +28,19 @@ class Unity extends Model
|
||||
{
|
||||
return $query->where('package_id', $id);
|
||||
}
|
||||
|
||||
public function scopeByArticleFamily($query, $id)
|
||||
{
|
||||
return $query->whereHas('package', function ($query) use ($id) {
|
||||
$query->byArticleFamily($id);
|
||||
});
|
||||
}
|
||||
|
||||
public function scopeActive($query, $active = 1)
|
||||
{
|
||||
return $query->whereHas('third_party', function ($query) use ($active) {
|
||||
$query->active($active);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ class Packages
|
||||
|
||||
public static function getSelectByFamily($family_id)
|
||||
{
|
||||
return Package::orderBy('value','asc')->byFamily($family_id)->pluck('value','id')->toArray();
|
||||
return Package::orderBy('value','asc')->byArticleFamily($family_id)->pluck('value','id')->toArray();
|
||||
}
|
||||
|
||||
public static function getAll()
|
||||
|
||||
@@ -2,36 +2,19 @@
|
||||
|
||||
namespace App\Repositories\Shop;
|
||||
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
use Yajra\DataTables\DataTables;
|
||||
|
||||
use App\Models\Shop\Unity;
|
||||
|
||||
class Unities
|
||||
{
|
||||
|
||||
public static function getDatatable()
|
||||
{
|
||||
return Datatables::of($model)->make(true);
|
||||
}
|
||||
|
||||
public static function getOptions()
|
||||
{
|
||||
return Unity::orderBy('value','asc')->get()->pluck('value','id')->toArray();
|
||||
}
|
||||
|
||||
public static function getSelectByPackage($package_id)
|
||||
public static function getOptionsByPackage($package_id)
|
||||
{
|
||||
$values = Unity::byPackage($package_id)->get();
|
||||
$data = [];
|
||||
foreach ($values as $value)
|
||||
{
|
||||
$data[] = ['id' => $value->id, 'text' => $value->value];
|
||||
}
|
||||
return collect($data)->sortBy('text')->values()->all();
|
||||
return Unity::byPackage($package_id)->orderBy('value','asc')->get()->pluck('value','id')->toArray();
|
||||
}
|
||||
|
||||
public static function getAll()
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
{{ Form::label('categories', 'Catégories') }}<br>
|
||||
{{ Form::label('categories', 'Rayons') }}<br>
|
||||
@include('components.select', ['name' => 'categories[]', 'list' => $categories_options, 'values' => isset($categories) ? $categories : null, 'class' => 'select2 form-control', 'multiple' => true])
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -10,10 +10,9 @@
|
||||
<script>
|
||||
|
||||
function append_price() {
|
||||
// handle_append_attribute();
|
||||
$('.select2').select2();
|
||||
handle_change_package();
|
||||
load_unities($('.unities'), $('.package').val());
|
||||
load_unities($('.unities'), $('.packages').val());
|
||||
}
|
||||
|
||||
$("#append_price").appender({
|
||||
@@ -30,7 +29,7 @@
|
||||
});
|
||||
|
||||
function handle_change_package() {
|
||||
$('.package').change( function() {
|
||||
$('.packages').change( function() {
|
||||
var package_id = $(this).val();
|
||||
var $package = $(this);
|
||||
var $parent = $package.parent().parent();
|
||||
@@ -40,7 +39,7 @@
|
||||
}
|
||||
|
||||
function init_unities() {
|
||||
$('.package').each( function() {
|
||||
$('.packages').each( function() {
|
||||
var package_id = $(this).val();
|
||||
var $package = $(this);
|
||||
var $parent = $package.parent().parent();
|
||||
@@ -91,7 +90,9 @@
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
$(function() {
|
||||
handle_change_package();
|
||||
});
|
||||
|
||||
</script>
|
||||
@endpush
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
@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
|
||||
@@ -1,29 +0,0 @@
|
||||
@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
|
||||
@@ -1,29 +0,0 @@
|
||||
@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>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<div class="float-right mt-3">
|
||||
@include('components.button-save')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@push('js')
|
||||
<script>
|
||||
$(function() {
|
||||
$('.editor').tinymce({});
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
@@ -1,49 +0,0 @@
|
||||
@extends('layout.index', [
|
||||
'title' => __('Shop.article_attribute_families.title'),
|
||||
'subtitle' => __('Shop.article_attribute_families.list'),
|
||||
'breadcrumb' => [__('Shop.article_attribute_families.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">
|
||||
@section('content')
|
||||
@include('components.datatable', ['route' => route('Shop.Admin.ArticleAttributeFamilies.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' => 'articleattributevalues'])
|
||||
@endcomponent
|
||||
|
||||
@component('components.layout.modal', ['title' => 'Filtres', 'id' => 'modal-filters'])
|
||||
@include('Shop.Admin.ArticleAttributeValues.partials.filters')
|
||||
@endcomponent
|
||||
@endsection
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
@include('components.js.datatable', ['route' => route('Shop.Admin.ArticleAttributeFamilies.index'), 'model' => 'ArticleAttributeFamilies'])
|
||||
@include('components.js.datatable', ['route' => route('Shop.Admin.ArticleAttributeValues.index'), 'model' => 'ArticleAttributeValues'])
|
||||
@endpush
|
||||
@@ -1,16 +0,0 @@
|
||||
@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
|
||||
@@ -1,9 +0,0 @@
|
||||
<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>
|
||||
@@ -1,36 +0,0 @@
|
||||
@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
|
||||
@@ -1,28 +0,0 @@
|
||||
@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
|
||||
@@ -1,29 +0,0 @@
|
||||
@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
|
||||
@@ -1,29 +0,0 @@
|
||||
@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>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<div class="float-right mt-3">
|
||||
@include('components.button-save')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@push('js')
|
||||
<script>
|
||||
$(function() {
|
||||
$('.editor').tinymce({});
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
@@ -1,49 +0,0 @@
|
||||
@extends('layout.index', [
|
||||
'title' => __('Shop.article_attribute_families.title'),
|
||||
'subtitle' => __('Shop.article_attribute_families.list'),
|
||||
'breadcrumb' => [__('Shop.article_attribute_families.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">
|
||||
@section('content')
|
||||
@include('components.datatable', ['route' => route('Shop.Admin.ArticleAttributeFamilies.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' => 'articleattributevalues'])
|
||||
@endcomponent
|
||||
|
||||
@component('components.layout.modal', ['title' => 'Filtres', 'id' => 'modal-filters'])
|
||||
@include('Shop.Admin.ArticleAttributeValues.partials.filters')
|
||||
@endcomponent
|
||||
@endsection
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
@include('components.js.datatable', ['route' => route('Shop.Admin.ArticleAttributeFamilies.index'), 'model' => 'ArticleAttributeFamilies'])
|
||||
@include('components.js.datatable', ['route' => route('Shop.Admin.ArticleAttributeValues.index'), 'model' => 'ArticleAttributeValues'])
|
||||
@endpush
|
||||
@@ -1,16 +0,0 @@
|
||||
@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
|
||||
@@ -1,9 +0,0 @@
|
||||
<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>
|
||||
@@ -1,36 +0,0 @@
|
||||
@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
|
||||
@@ -30,7 +30,7 @@
|
||||
<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'])
|
||||
@include('components.datatable', ['route' => route('Shop.Admin.ArticleAttributeValues.index'), 'model' => 'Unities', 'with_filters' => true])
|
||||
@endcomponent
|
||||
|
||||
@component('components.layout.modal', ['title' => 'Filtres', 'id' => 'modal-filters'])
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
@section('content')
|
||||
@component('components.card')
|
||||
@include('components.datatable', ['route' => route('Shop.Admin.Unities.index'), 'model' => 'unities'])
|
||||
@include('components.datatable', ['route' => route('Shop.Admin.Unities.index'), 'model' => 'unities','with_filters' => true])
|
||||
@endcomponent
|
||||
|
||||
@component('components.layout.modal', ['title' => 'Filtres', 'id' => 'modal-unities-filters'])
|
||||
|
||||
@@ -1,9 +1,14 @@
|
||||
<form id="filters">
|
||||
<form id="unities-filters">
|
||||
<div class="row">
|
||||
<label class="col-4">Familles d'attributs</label>
|
||||
<label class="col-4">Familles d'articles</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.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' => ' '])
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
Reference in New Issue
Block a user