diff --git a/app/DataTables/ParentDataTable.php b/app/DataTables/ParentDataTable.php index d0e8b167..399293f1 100644 --- a/app/DataTables/ParentDataTable.php +++ b/app/DataTables/ParentDataTable.php @@ -1,6 +1,6 @@ 'tr'] - public $colReorder = true; - public $fixedColumns = false; + 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. - * - * @param mixed $query Results from query() method. - * @return \Yajra\DataTables\DataTableAbstract - */ - public function dataTable($query) - { - return $this->modifier(datatables()->eloquent($query)); - } + /** + * Build DataTable class. + * + * @param mixed $query Results from query() method. + * @return \Yajra\DataTables\DataTableAbstract + */ + public function dataTable($query) + { + return $this->modifier(datatables()->eloquent($query)); + } - public function modifier($datatables) - { - return $this->addButtons($datatables->setRowId('{{$id}}')); - } + public function modifier($datatables) + { + return $this->addButtons($datatables->setRowId('{{$id}}')); + } - /** - * Add buttons DataTable class. - * - * @param mixed $query Results from query() method. - * @return \Yajra\DataTables\DataTableAbstract - */ - public function addButtons($datatables) - { - return $datatables->addColumn('action', $this->getHtmlButtons()); - } + /** + * Add buttons DataTable class. + * + * @param mixed $query Results from query() method. + * @return \Yajra\DataTables\DataTableAbstract + */ + public function addButtons($datatables) + { + return $datatables->addColumn('action', $this->getHtmlButtons()); + } - public function getHtmlButtons() - { - $buttons = ''; + public function getHtmlButtons() + { + $buttons = ''; - // $buttons .= ''; - // $buttons .= ''; - $buttons .= ''; - $buttons .= ''; - return $buttons; - // return view('components.datatables.buttons.row_action'); - } + // $buttons .= ''; + // $buttons .= ''; + $buttons .= ''; + $buttons .= ''; + return $buttons; + // return view('components.datatables.buttons.row_action'); + } - public function makeColumnButtons() - { - return Column::computed('action') - ->title('') - ->exportable(false) - ->printable(false) - ->searchable(false) - ->addClass('text-center text-nowrap'); - } + public function makeColumnButtons() + { + return Column::computed('action') + ->title('') + ->exportable(false) + ->printable(false) + ->searchable(false) + ->width("74") + ->addClass('text-center text-nowrap'); + } - /** - * Get query source of dataTable. - * - * @param \App\Family $model - * @return \Illuminate\Database\Eloquent\Builder - */ - public function buildQuery($model) - { - return $model->newQuery(); - } - - /** - * Optional method if you want to use html builder. - * - * @return \Yajra\DataTables\Html\Builder - */ - public function html() - { - return $this->buildHtml(strtolower($this->model_name) . '-table'); - } + public static function isFilteredByField($field) + { + return (request()->has('filters.' . $field)) ? request()->input('filters.'. $field) : (request()->has($field) ? request()->input($field) : false); + } - /** - * Optional method if you want to use html builder. - * - * @return \Yajra\DataTables\Html\Builder - */ - public function buildHtml($id) - { - return $this->builder() - ->setTableId($id) - ->parameters($this->getParameters()) - ->columns($this->getColumns()) - ->ajax(['data' => "function(d) { d.filters = $('#filters').serializeJSON(); }"]) - ->dom($this->getDom()) - ->orderBy(0,'asc') - ->buttons($this->getButtons()); - } + /** + * Get query source of dataTable. + * + * @param \App\Family $model + * @return \Illuminate\Database\Eloquent\Builder + */ + public function buildQuery($model) + { + return $model->newQuery(); + } + + /** + * Optional method if you want to use html builder. + * + * @return \Yajra\DataTables\Html\Builder + */ + public function html() + { + return $this->buildHtml(strtolower($this->model_name) . '-table'); + } - public function getButtons() { - return [ - Button::make('export'), - Button::make('print'), - Button::make('colvis'), - Button::make('columnsToggle') - ]; - } + /** + * Optional method if you want to use html builder. + * + * @return \Yajra\DataTables\Html\Builder + */ + 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($table_id) + ->parameters($this->getParameters()) + ->columns($this->getColumns()) + ->ajax([ + 'data' => 'function(d) { d.filters = $("' . $selector . '").serializeJSON(); }', + 'url' => isset($this->url) ? $this->url : '' + ]) + ->dom($this->getDom()) + ->orderBy($this->sortedColumn,$this->sortedOrder) + ->buttons($this->getButtons()); + } - public function getParameters() - { - return [ - 'pageLength' => 5, - 'scrollX' => true, - 'scrollCollapse' => true, - 'colReorder' => $this->colReorder, - 'rowReorder' => $this->rowReorder, - 'fixedColumns' => $this->fixedColumns, - ]; - } + public function getButtons() { + return [ + Button::make('export'), + Button::make('print'), + Button::make('colvis'), + Button::make('columnsToggle') + ]; + } - public function getDom() - { - $dom = ''; - // $dom .= $this->getDatatablesHeaderDefault(); - $dom .= "rt"; - $dom .= $this->getDatatablesFooterDefault(); - return $dom; - } + public function getParameters() + { + $data = [ + 'pageLength' => 5, + 'scrollX' => $this->scrollX, + 'scrollCollapse' => $this->scrollCollapse, + 'searchDelay' => 500, + 'colReorder' => $this->colReorder, + 'fixedColumns' => $this->fixedColumns, + // 'autoWidth' => false, + 'stateSave' => $this->stateSave + ]; + if ($this->rowReorder) { + $data['rowReorder'] = ['selector' => $this->rowReorderSelector]; + } + return $data; + } - public function getDatatablesHeader() { - return view('components.datatables.header'); - } + public function getDom() + { + $dom = ''; + // $dom .= $this->getDatatablesHeaderDefault(); + $dom .= "rt"; + $dom .= $this->getDatatablesFooterDefault(); + return $dom; + } - public function getDatatablesHeaderDefault() { - // return "
"; - /* - - $dom = 't<"row datatable-pager light"<"col-md-12"' - . '<"datatable-more-export-buttons filter-buttons pull-left">' - . '<"datatable-more-export-favorites-buttons filter-buttons pull-left">' - . '<"datatable-more-export-basket-buttons filter-buttons pull-left">' - . '<"datatable-download-buttons filter-buttons pull-left">' - . '>>' - . '<"dt-toolbar-footer"<"col"i><"col pull-right datatable-pager light nopadding-right"p>>'; + public function getDatatablesHeader() { + return view('components.datatables.header'); + } - */ - - $dom = "<'row dt-toolbar-header'<'col-lg-4'l><'col-lg-4'B><'col-lg-4 text-right add'f>>"; - return $dom; - // return 't<"row datatable-pager light"<"col-md-12"<"datatable-more-export-buttons filter-buttons pull-left"><"datatable-more-export-favorites-buttons filter-buttons pull-left"><"datatable-more-export-basket-buttons filter-buttons pull-left"><"datatable-download-buttons filter-buttons pull-left">>><"dt-toolbar-footer"<"col-md-6"i><"col-md-6 pull-right datatable-pager light nopadding-right"p>>'; + public function getDatatablesHeaderDefault() { + // return "
"; + /* + + $dom = 't<"row datatable-pager light"<"col-md-12"' + . '<"datatable-more-export-buttons filter-buttons pull-left">' + . '<"datatable-more-export-favorites-buttons filter-buttons pull-left">' + . '<"datatable-more-export-basket-buttons filter-buttons pull-left">' + . '<"datatable-download-buttons filter-buttons pull-left">' + . '>>' + . '<"dt-toolbar-footer"<"col"i><"col pull-right datatable-pager light nopadding-right"p>>'; - } + */ + + $dom = "<'row dt-toolbar-header'<'col-lg-4'l><'col-lg-4'B><'col-lg-4 text-right add'f>>"; + return $dom; + // return 't<"row datatable-pager light"<"col-md-12"<"datatable-more-export-buttons filter-buttons pull-left"><"datatable-more-export-favorites-buttons filter-buttons pull-left"><"datatable-more-export-basket-buttons filter-buttons pull-left"><"datatable-download-buttons filter-buttons pull-left">>><"dt-toolbar-footer"<"col-md-6"i><"col-md-6 pull-right datatable-pager light nopadding-right"p>>'; - public function getDatatablesFooterDefault() { - return "<'row pt-3 dt-toolbar-footer'<'col-md-6'i><'col-md-6'p>>"; - } + } - /** - * Get filename for export. - * - * @return string - */ - protected function filename() - { - return self::buildFilename($this->model_name); - } + public function getDatatablesFooterDefault() { + return "<'row pt-3 dt-toolbar-footer'<'col-md-6'i><'col-md-6'p>>"; + } - /** - * Get filename for export. - * - * @return string - */ - protected function buildFilename($name) - { - return $name . '_' . date('YmdHis'); - } + /** + * Get filename for export. + * + * @return string + */ + protected function filename() + { + return self::buildFilename($this->model_name); + } + + /** + * Get filename for export. + * + * @return string + */ + protected function buildFilename($name) + { + return $name . '_' . date('YmdHis'); + } } \ No newline at end of file diff --git a/app/DataTables/Shop/UnitiesDataTable.php b/app/DataTables/Shop/UnitiesDataTable.php index cfa3bded..4acf3b9a 100644 --- a/app/DataTables/Shop/UnitiesDataTable.php +++ b/app/DataTables/Shop/UnitiesDataTable.php @@ -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 [ diff --git a/app/Http/Controllers/Shop/Admin/UnityController.php b/app/Http/Controllers/Shop/Admin/UnityController.php index 364cf028..56877952 100644 --- a/app/Http/Controllers/Shop/Admin/UnityController.php +++ b/app/Http/Controllers/Shop/Admin/UnityController.php @@ -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() diff --git a/app/Models/Shop/Package.php b/app/Models/Shop/Package.php index c021a586..83055df8 100644 --- a/app/Models/Shop/Package.php +++ b/app/Models/Shop/Package.php @@ -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); } diff --git a/app/Models/Shop/Unity.php b/app/Models/Shop/Unity.php index ad59d77a..f11a7493 100644 --- a/app/Models/Shop/Unity.php +++ b/app/Models/Shop/Unity.php @@ -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); + }); + } + } diff --git a/app/Repositories/Shop/Packages.php b/app/Repositories/Shop/Packages.php index 164d579e..5d773b98 100644 --- a/app/Repositories/Shop/Packages.php +++ b/app/Repositories/Shop/Packages.php @@ -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() diff --git a/app/Repositories/Shop/Unities.php b/app/Repositories/Shop/Unities.php index 1ee76f3a..3423da30 100644 --- a/app/Repositories/Shop/Unities.php +++ b/app/Repositories/Shop/Unities.php @@ -2,68 +2,51 @@ 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 getOptions() - { - return Unity::orderBy('value','asc')->get()->pluck('value','id')->toArray(); - } + public static function getOptionsByPackage($package_id) + { + return Unity::byPackage($package_id)->orderBy('value','asc')->get()->pluck('value','id')->toArray(); + } - public static function getSelectByPackage($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(); - } + public static function getAll() + { + return Unity::orderBy('value','asc')->get(); + } - public static function getAll() - { - return Unity::orderBy('value','asc')->get(); - } + public static function get($id) + { + return Unity::find($id); + } - public static function get($id) - { - return Unity::find($id); - } + public static function store($data) + { + $id = isset($data['id']) ? $data['id'] : false; + $item = $id ? self::update($data) : self::create($data); + return $item->id; + } - public static function store($data) - { - $id = isset($data['id']) ? $data['id'] : false; - $item = $id ? self::update($data) : self::create($data); - return $item->id; - } + public static function create($data) + { + return Unity::create($data); + } - public static function create($data) - { - return Unity::create($data); - } + public static function update($data) + { + return Unity::find($id)->update($data); + } - public static function update($data) - { - return Unity::find($id)->update($data); - } - - public static function destroy($id) - { - return Unity::destroy($id); - } + public static function destroy($id) + { + return Unity::destroy($id); + } } diff --git a/resources/views/Shop/Admin/Articles/partials/characteristics.blade.php b/resources/views/Shop/Admin/Articles/partials/characteristics.blade.php index fa94363a..b4ba84e3 100644 --- a/resources/views/Shop/Admin/Articles/partials/characteristics.blade.php +++ b/resources/views/Shop/Admin/Articles/partials/characteristics.blade.php @@ -29,7 +29,7 @@
- {{ Form::label('categories', 'Catégories') }}
+ {{ Form::label('categories', 'Rayons') }}
@include('components.select', ['name' => 'categories[]', 'list' => $categories_options, 'values' => isset($categories) ? $categories : null, 'class' => 'select2 form-control', 'multiple' => true])
diff --git a/resources/views/Shop/Admin/Articles/partials/prices/prices.blade.php b/resources/views/Shop/Admin/Articles/partials/prices/prices.blade.php index ac43044c..04294aaf 100644 --- a/resources/views/Shop/Admin/Articles/partials/prices/prices.blade.php +++ b/resources/views/Shop/Admin/Articles/partials/prices/prices.blade.php @@ -10,10 +10,9 @@ @endpush diff --git a/resources/views/Shop/Admin/PriceFamilies/create.blade.php b/resources/views/Shop/Admin/PriceFamilies/create.blade.php deleted file mode 100644 index c6df45b6..00000000 --- a/resources/views/Shop/Admin/PriceFamilies/create.blade.php +++ /dev/null @@ -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]) }} - -
-
- - {{ __('article_attributes.list.title') }} - - - - @include('components.button-save') - -
-
- - @include('Shop.Admin.ArticleAttributeValues.form') - - -@endsection diff --git a/resources/views/Shop/Admin/PriceFamilies/edit.blade.php b/resources/views/Shop/Admin/PriceFamilies/edit.blade.php deleted file mode 100644 index ac7a4833..00000000 --- a/resources/views/Shop/Admin/PriceFamilies/edit.blade.php +++ /dev/null @@ -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]) }} - -
-
- - {{ __('article_attributes.list.title') }} - - - - @include('components.button-save') - -
-
- - - @include('Shop.Admin.ArticleAttributeValues.form') - - -@endsection diff --git a/resources/views/Shop/Admin/PriceFamilies/form.blade.php b/resources/views/Shop/Admin/PriceFamilies/form.blade.php deleted file mode 100644 index d6a4b4c7..00000000 --- a/resources/views/Shop/Admin/PriceFamilies/form.blade.php +++ /dev/null @@ -1,29 +0,0 @@ -@include('boilerplate::load.tinymce') - - -
-
- {{ 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]) - -
-
- -
-
-
- @include('components.button-save') -
-
-
- -@push('js') - -@endpush \ No newline at end of file diff --git a/resources/views/Shop/Admin/PriceFamilies/index.blade.php b/resources/views/Shop/Admin/PriceFamilies/index.blade.php deleted file mode 100644 index feb97f13..00000000 --- a/resources/views/Shop/Admin/PriceFamilies/index.blade.php +++ /dev/null @@ -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') - - - -
- -
- @section('content') - @include('components.datatable', ['route' => route('Shop.Admin.ArticleAttributeFamilies.index'), 'model' => 'ArticleAttributefamilies']) - @endsection -
- -
- @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 -
- -
- -@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 \ No newline at end of file diff --git a/resources/views/Shop/Admin/PriceFamilies/list.blade.php b/resources/views/Shop/Admin/PriceFamilies/list.blade.php deleted file mode 100644 index 75982115..00000000 --- a/resources/views/Shop/Admin/PriceFamilies/list.blade.php +++ /dev/null @@ -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 diff --git a/resources/views/Shop/Admin/PriceFamilies/partials/filters.blade.php b/resources/views/Shop/Admin/PriceFamilies/partials/filters.blade.php deleted file mode 100644 index 16ce4981..00000000 --- a/resources/views/Shop/Admin/PriceFamilies/partials/filters.blade.php +++ /dev/null @@ -1,9 +0,0 @@ -
-
- -
- @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' => ' ']) -
-
- -
diff --git a/resources/views/Shop/Admin/PriceFamilies/show.blade.php b/resources/views/Shop/Admin/PriceFamilies/show.blade.php deleted file mode 100644 index 1e1cd729..00000000 --- a/resources/views/Shop/Admin/PriceFamilies/show.blade.php +++ /dev/null @@ -1,36 +0,0 @@ -@extends('layout.index', [ - 'title' => __('products.title'), - 'subtitle' => __('products.title'), - 'breadcrumb' => [__('products.title')] -]) - -@section('content') -
- -
- -
- -
-
-
-

{{ name }}

-

- {{ $product.section.name }}
-

-
-
-

{{ $prix_total }} €

-

{{ $residence['type_produit']['name'] }}

-
- -
- @include('Hestimmo.modules.Lot.partials.carousel') -
-
-
-
-
-
- -@endsection diff --git a/resources/views/Shop/Admin/PriceFamilyValues/create.blade.php b/resources/views/Shop/Admin/PriceFamilyValues/create.blade.php deleted file mode 100644 index c6df45b6..00000000 --- a/resources/views/Shop/Admin/PriceFamilyValues/create.blade.php +++ /dev/null @@ -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]) }} - -
-
- - {{ __('article_attributes.list.title') }} - - - - @include('components.button-save') - -
-
- - @include('Shop.Admin.ArticleAttributeValues.form') - - -@endsection diff --git a/resources/views/Shop/Admin/PriceFamilyValues/edit.blade.php b/resources/views/Shop/Admin/PriceFamilyValues/edit.blade.php deleted file mode 100644 index ac7a4833..00000000 --- a/resources/views/Shop/Admin/PriceFamilyValues/edit.blade.php +++ /dev/null @@ -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]) }} - -
-
- - {{ __('article_attributes.list.title') }} - - - - @include('components.button-save') - -
-
- - - @include('Shop.Admin.ArticleAttributeValues.form') - - -@endsection diff --git a/resources/views/Shop/Admin/PriceFamilyValues/form.blade.php b/resources/views/Shop/Admin/PriceFamilyValues/form.blade.php deleted file mode 100644 index d6a4b4c7..00000000 --- a/resources/views/Shop/Admin/PriceFamilyValues/form.blade.php +++ /dev/null @@ -1,29 +0,0 @@ -@include('boilerplate::load.tinymce') - - -
-
- {{ 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]) - -
-
- -
-
-
- @include('components.button-save') -
-
-
- -@push('js') - -@endpush \ No newline at end of file diff --git a/resources/views/Shop/Admin/PriceFamilyValues/index.blade.php b/resources/views/Shop/Admin/PriceFamilyValues/index.blade.php deleted file mode 100644 index feb97f13..00000000 --- a/resources/views/Shop/Admin/PriceFamilyValues/index.blade.php +++ /dev/null @@ -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') - - - -
- -
- @section('content') - @include('components.datatable', ['route' => route('Shop.Admin.ArticleAttributeFamilies.index'), 'model' => 'ArticleAttributefamilies']) - @endsection -
- -
- @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 -
- -
- -@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 \ No newline at end of file diff --git a/resources/views/Shop/Admin/PriceFamilyValues/list.blade.php b/resources/views/Shop/Admin/PriceFamilyValues/list.blade.php deleted file mode 100644 index 75982115..00000000 --- a/resources/views/Shop/Admin/PriceFamilyValues/list.blade.php +++ /dev/null @@ -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 diff --git a/resources/views/Shop/Admin/PriceFamilyValues/partials/filters.blade.php b/resources/views/Shop/Admin/PriceFamilyValues/partials/filters.blade.php deleted file mode 100644 index 16ce4981..00000000 --- a/resources/views/Shop/Admin/PriceFamilyValues/partials/filters.blade.php +++ /dev/null @@ -1,9 +0,0 @@ -
-
- -
- @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' => ' ']) -
-
- -
diff --git a/resources/views/Shop/Admin/PriceFamilyValues/show.blade.php b/resources/views/Shop/Admin/PriceFamilyValues/show.blade.php deleted file mode 100644 index 1e1cd729..00000000 --- a/resources/views/Shop/Admin/PriceFamilyValues/show.blade.php +++ /dev/null @@ -1,36 +0,0 @@ -@extends('layout.index', [ - 'title' => __('products.title'), - 'subtitle' => __('products.title'), - 'breadcrumb' => [__('products.title')] -]) - -@section('content') -
- -
- -
- -
-
-
-

{{ name }}

-

- {{ $product.section.name }}
-

-
-
-

{{ $prix_total }} €

-

{{ $residence['type_produit']['name'] }}

-
- -
- @include('Hestimmo.modules.Lot.partials.carousel') -
-
-
-
-
-
- -@endsection diff --git a/resources/views/Shop/Admin/Unities/index.blade.php b/resources/views/Shop/Admin/Unities/index.blade.php index 6fd47eb0..0e28e02b 100644 --- a/resources/views/Shop/Admin/Unities/index.blade.php +++ b/resources/views/Shop/Admin/Unities/index.blade.php @@ -30,7 +30,7 @@
@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']) diff --git a/resources/views/Shop/Admin/Unities/list.blade.php b/resources/views/Shop/Admin/Unities/list.blade.php index 0684b35d..5c77ccec 100644 --- a/resources/views/Shop/Admin/Unities/list.blade.php +++ b/resources/views/Shop/Admin/Unities/list.blade.php @@ -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']) diff --git a/resources/views/Shop/Admin/Unities/partials/filters.blade.php b/resources/views/Shop/Admin/Unities/partials/filters.blade.php index 16ce4981..206a847e 100644 --- a/resources/views/Shop/Admin/Unities/partials/filters.blade.php +++ b/resources/views/Shop/Admin/Unities/partials/filters.blade.php @@ -1,9 +1,14 @@ -
+
- +
- @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' => ' ']) +
+
+
+ +
+ @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' => ' '])
-