fixes
This commit is contained in:
28
app/DataTables/Shop/PackagesDataTable.php
Normal file
28
app/DataTables/Shop/PackagesDataTable.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace App\DataTables\Shop;
|
||||
|
||||
use Yajra\DataTables\Html\Column;
|
||||
use App\DataTables\ParentDataTable as DataTable;
|
||||
use App\Models\Shop\Package;
|
||||
|
||||
class PackagesDataTable extends DataTable
|
||||
{
|
||||
public $model_name = 'packages';
|
||||
|
||||
public function query(Package $model)
|
||||
{
|
||||
$model = $model::with(['article_family'])->select('shop_packages.*');
|
||||
return self::buildQuery($model);
|
||||
}
|
||||
|
||||
protected function getColumns()
|
||||
{
|
||||
return [
|
||||
Column::make('article_family.name')->title('Famille d\'articles'),
|
||||
Column::make('value')->title('Valeur'),
|
||||
self::makeColumnButtons(),
|
||||
];
|
||||
}
|
||||
|
||||
}
|
||||
@@ -8,19 +8,19 @@ use App\Models\Shop\Unity;
|
||||
|
||||
class UnitiesDataTable extends DataTable
|
||||
{
|
||||
public $model_name = 'Unity';
|
||||
public $model_name = 'unities';
|
||||
|
||||
public function query(Unity $model)
|
||||
{
|
||||
$model = $model::with(['price_family']);
|
||||
$model = $model::with(['package'])->select('shop_unities.*');
|
||||
return self::buildQuery($model);
|
||||
}
|
||||
|
||||
protected function getColumns()
|
||||
{
|
||||
return [
|
||||
Column::make('value')->title('Attributs'),
|
||||
Column::make('price_family.name')->title('Famille')->orderable(false),
|
||||
Column::make('package.value')->title('Package'),
|
||||
Column::make('value')->title('Valeur'),
|
||||
self::makeColumnButtons(),
|
||||
];
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@ class PackageController extends Controller
|
||||
|
||||
public function create()
|
||||
{
|
||||
$data['families'] = ArticleFamilies::getOptions();
|
||||
return view('Shop.Admin.Packages.create');
|
||||
}
|
||||
|
||||
@@ -47,7 +48,8 @@ class PackageController extends Controller
|
||||
|
||||
public function edit($id)
|
||||
{
|
||||
$data = Packages::get($id);
|
||||
$data['package'] = Packages::get($id);
|
||||
$data['families'] = ArticleFamilies::getOptions();
|
||||
return view('Shop.Admin.Packages.edit', $data);
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +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,7 +13,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);
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@ class UnityController extends Controller
|
||||
|
||||
public function create()
|
||||
{
|
||||
$data['packages'] = Packages::getOptions();
|
||||
return view('Shop.Admin.Unities.create');
|
||||
}
|
||||
|
||||
@@ -47,7 +48,8 @@ class UnityController extends Controller
|
||||
|
||||
public function edit($id)
|
||||
{
|
||||
$data = Unities::get($id);
|
||||
$data['packages'] = Packages::getOptions();
|
||||
$data['unity'] = Unities::get($id)->toArray();
|
||||
return view('Shop.Admin.Unities.edit', $data);
|
||||
}
|
||||
|
||||
|
||||
@@ -36,6 +36,12 @@ class Shop
|
||||
*/
|
||||
$menu->addTo('shop', 'Prix génériques', [ 'route' => 'Shop.Admin.PriceGenerics.index', 'permission' => 'backend_access' ])
|
||||
->activeIfRoute(['Shop.Admin.PriceGenerics.*'])->order(10);
|
||||
|
||||
$menu->addTo('shop', 'Packages', [ 'route' => 'Shop.Admin.Packages.index', 'permission' => 'backend_access' ])
|
||||
->activeIfRoute(['Shop.Admin.Packages.*'])->order(12);
|
||||
|
||||
$menu->addTo('shop', 'Unités', [ 'route' => 'Shop.Admin.Unities.index', 'permission' => 'backend_access' ])
|
||||
->activeIfRoute(['Shop.Admin.Unities.*'])->order(14);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -14,6 +14,11 @@ class Package extends Model
|
||||
return $this->belongsTo('App\Models\Shop\ArticleFamily');
|
||||
}
|
||||
|
||||
public function unities()
|
||||
{
|
||||
return $this->hasMany('App\Models\Shop\Unity');
|
||||
}
|
||||
|
||||
public function scopeByFamily($query, $id)
|
||||
{
|
||||
return $query->where('article_family_id', $id);
|
||||
|
||||
@@ -3,10 +3,6 @@
|
||||
<input type="hidden" name="generics[id][]" value="{{ $generic['id'] ?? null }}">
|
||||
<input type="hidden" name="generics[price_generic_id][]" value="{{ $generic['price_generic_id'] ?? null }}">
|
||||
|
||||
<button type="button" class="btn btn-xs btn-danger delete-price-btn mt-2" data-card-widget="collapse" data-toggle="tooltip" title="supprimer">
|
||||
<i class="fas fa-trash"></i>
|
||||
</button>
|
||||
|
||||
@include('Shop.Admin.PriceGenerics.partials.table-prices', ['generic' => $generic['generic'] ?? null ])
|
||||
</div>
|
||||
|
||||
|
||||
@@ -4,6 +4,4 @@
|
||||
|
||||
@include('Shop.Admin.PriceGenerics.partials.table-prices', ['generic' => $generic['generic'] ?? null ])
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -5,10 +5,10 @@
|
||||
@endif
|
||||
|
||||
@push('js')
|
||||
<script>
|
||||
$(function () {
|
||||
handle_delete_generic_price();
|
||||
});
|
||||
</script>
|
||||
<script>
|
||||
$(function () {
|
||||
handle_delete_generic_price();
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
|
||||
|
||||
@@ -5,14 +5,14 @@
|
||||
@endif
|
||||
|
||||
@push('js')
|
||||
<script>
|
||||
$(function () {
|
||||
handle_delete_price();
|
||||
init_unities();
|
||||
handle_change_package();
|
||||
handle_prices();
|
||||
handle_prices_taxed();
|
||||
});
|
||||
</script>
|
||||
<script>
|
||||
$(function () {
|
||||
handle_delete_price();
|
||||
init_unities();
|
||||
handle_change_package();
|
||||
handle_prices();
|
||||
handle_prices_taxed();
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
|
||||
|
||||
15
resources/views/Shop/Admin/Packages/create.blade.php
Normal file
15
resources/views/Shop/Admin/Packages/create.blade.php
Normal file
@@ -0,0 +1,15 @@
|
||||
@extends('layout.index', [
|
||||
'title' => __('packages.title'),
|
||||
'subtitle' => __('packages.create.title'),
|
||||
'breadcrumb' => [__('packages.title')]
|
||||
])
|
||||
|
||||
@include('boilerplate::load.fileinput')
|
||||
|
||||
@section('content')
|
||||
|
||||
{{ Form::open(['route' => 'Shop.Admin.Packages.store', 'id' => 'package-form', 'autocomplete' => 'off']) }}
|
||||
@include('Shop.Admin.Packages.form')
|
||||
</form>
|
||||
|
||||
@endsection
|
||||
14
resources/views/Shop/Admin/Packages/edit.blade.php
Normal file
14
resources/views/Shop/Admin/Packages/edit.blade.php
Normal file
@@ -0,0 +1,14 @@
|
||||
@extends('layout.index', [
|
||||
'title' => 'Package',
|
||||
'subtitle' => 'Edition d\'un package',
|
||||
'breadcrumb' => ['Articles']
|
||||
])
|
||||
|
||||
@section('content')
|
||||
|
||||
{{ Form::open(['route' => 'Shop.Admin.Packages.store', 'id' => 'package-form', 'autocomplete' => 'off']) }}
|
||||
<input type="hidden" name="id" value="{{ $package['id'] }}">
|
||||
@include('Shop.Admin.Packages.form')
|
||||
</form>
|
||||
|
||||
@endsection
|
||||
19
resources/views/Shop/Admin/Packages/form.blade.php
Normal file
19
resources/views/Shop/Admin/Packages/form.blade.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
{{ Form::label('name', 'Famille') }}
|
||||
@include('components.select', ['name' => 'article_family_id', 'value' => $package['article_family_id'] ?? null, 'list' => $families, 'required' => false, 'with_empty' => ''])
|
||||
|
||||
{{ Form::label('name', 'Valeur') }}
|
||||
@include('components.input', ['name' => 'value', 'value' => $package['value'] ?? null, 'required' => true])
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<div class="float-right mt-3">
|
||||
@include('components.button-save')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
48
resources/views/Shop/Admin/Packages/index.blade.php
Normal file
48
resources/views/Shop/Admin/Packages/index.blade.php
Normal file
@@ -0,0 +1,48 @@
|
||||
@extends('layout.index', [
|
||||
'title' => __('Shop.packages.title'),
|
||||
'subtitle' => __('Shop.packages.list'),
|
||||
'breadcrumb' => [__('Shop.packages.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.packages.title') }}
|
||||
</a>
|
||||
<a href="#values" data-toggle="tab" class="nav-item nav-link active" role="tab" aria-controls="values" aria-selected="false">
|
||||
{{ __('Shop.packages.title') }}
|
||||
</a>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="tab-content mb-0">
|
||||
|
||||
<div class="tab-pane fade" id="families">
|
||||
@section('content')
|
||||
@include('components.datatable', ['route' => route('Shop.Admin.Unities.index'), 'model' => 'ArticleAttributefamilies'])
|
||||
@endsection
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade show active" id="values">
|
||||
@section('content')
|
||||
@component('components.card')
|
||||
@include('components.datatable', ['route' => route('Shop.Admin.ArticleAttributeValues.index'), 'model' => 'Unities'])
|
||||
@endcomponent
|
||||
|
||||
@component('components.layout.modal', ['title' => 'Filtres', 'id' => 'modal-filters'])
|
||||
@include('Shop.Admin.Unities.partials.filters')
|
||||
@endcomponent
|
||||
@endsection
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
@include('components.js.datatable', ['route' => route('Shop.Admin.Unities.index'), 'model' => 'Unities'])
|
||||
@endpush
|
||||
16
resources/views/Shop/Admin/Packages/list.blade.php
Normal file
16
resources/views/Shop/Admin/Packages/list.blade.php
Normal file
@@ -0,0 +1,16 @@
|
||||
@extends('layout.index', [
|
||||
'title' => __('Shop.packages.title'),
|
||||
'subtitle' => __('Shop.packages.list'),
|
||||
'breadcrumb' => [__('Shop.packages.title')]
|
||||
])
|
||||
|
||||
@section('content')
|
||||
@component('components.card')
|
||||
@include('components.datatable', ['route' => route('Shop.Admin.Packages.index'), 'model' => 'packages'])
|
||||
@endcomponent
|
||||
|
||||
@component('components.layout.modal', ['title' => 'Filtres', 'id' => 'modal-packages-filters'])
|
||||
@include('Shop.Admin.Packages.partials.filters')
|
||||
@endcomponent
|
||||
|
||||
@endsection
|
||||
@@ -0,0 +1,9 @@
|
||||
<form id="filters">
|
||||
<div class="row">
|
||||
<label class="col-4">Familles d'attributs</label>
|
||||
<div class="col-8">
|
||||
@include('components.select', ['name' => 'article_attribute_family_id', 'list' => (isset($families)) ? $families : [], 'value' => (isset($filters['article_attribute_family_id'])) ? $filters['article_attribute_family_id'] : null, 'class' => 'form-control-sm select2', 'with_empty' => ' '])
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
36
resources/views/Shop/Admin/Packages/show.blade.php
Normal file
36
resources/views/Shop/Admin/Packages/show.blade.php
Normal 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
|
||||
@@ -7,19 +7,6 @@
|
||||
@section('content')
|
||||
|
||||
{{ Form::open(['route' => 'Shop.Admin.PriceGenerics.store', 'id' => 'price-generic-form', 'autocomplete' => 'off']) }}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12 mbl">
|
||||
<a href="{{ route("Shop.Admin.PriceGenerics.index") }}" class="btn btn-default">
|
||||
{{ __('price_generics.list.title') }}
|
||||
</a>
|
||||
|
||||
<span class="btn-group pull-right">
|
||||
@include('components.button-save')
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('Shop.Admin.PriceGenerics.form')
|
||||
</form>
|
||||
|
||||
|
||||
@@ -7,29 +7,55 @@
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-2">
|
||||
<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'])
|
||||
</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'])
|
||||
</div>
|
||||
|
||||
<div class="col-lg-1">
|
||||
{{ Form::label('package_qty', 'Pack Qté') }}<br/>
|
||||
@include('components.number', [
|
||||
'name' => "prices[0][package_quantity]",
|
||||
'value' => $price['package_quantity'] ?? null,
|
||||
'required' => true,
|
||||
'class' => 'form-control-sm',
|
||||
])
|
||||
</div>
|
||||
|
||||
<div class="col-lg-3">
|
||||
{{ Form::label('unity_id', 'Unité') }}<br/>
|
||||
@include('components.select', ['name' => 'prices[0][unity_id]', 'value' => $unity_id ?? null, 'list' => $unities ?? null, 'required' => true, 'class' => 'form-control-sm'])
|
||||
@include('components.select', [
|
||||
'name' => "prices[0][unity_id]",
|
||||
'value' => $price['unity_id'] ?? null,
|
||||
'list' => $unities ?? null,
|
||||
'required' => true,
|
||||
'class' => 'select2 form-control-sm unities w-100',
|
||||
'with_empty' => ''
|
||||
])
|
||||
</div>
|
||||
|
||||
<div class="col-2">
|
||||
{{ Form::label('tax_id', 'TVA') }}<br/>
|
||||
@include('components.select', ['name' => 'prices[0][tax_id]', 'value' => $tax_id ?? null, 'list' => $taxes ?? null, 'required' => true, 'class' => 'form-control-sm'])
|
||||
</div>
|
||||
<div class="col-lg-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'])
|
||||
</div>
|
||||
|
||||
<div class="col-2">
|
||||
{{ Form::label('price', 'Prix HT') }}
|
||||
@include('components.money', ['name' => 'prices[0][price]', 'value' => $price ?? 0, 'required' => true, 'class' => 'form-control-sm price-item'])
|
||||
</div>
|
||||
<div class="col-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'])
|
||||
</div>
|
||||
|
||||
<div class="col-2">
|
||||
{{ Form::label('price_taxed', 'Prix TTC') }}
|
||||
@include('components.money', ['name' => 'prices[0][price_taxed]', 'value' => $price_taxed ?? 0, 'required' => true, 'class' => 'form-control-sm price-taxed-item'])
|
||||
<div 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'])
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-1 text-right">
|
||||
|
||||
@@ -3,6 +3,10 @@
|
||||
|
||||
<thead>
|
||||
<th>
|
||||
<button type="button" class="btn btn-xs btn-danger delete-price-btn mt-2" data-card-widget="collapse" data-toggle="tooltip" title="supprimer" data-id="{{ $generic['id'] }}">
|
||||
<i class="fas fa-trash"></i>
|
||||
</button>
|
||||
|
||||
{{ $generic['category']['name'] ?? null }}
|
||||
</th>
|
||||
@foreach ($generic['prices'] as $price)
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
@extends('layout.index', [
|
||||
'title' => __('article_attributes.title'),
|
||||
'subtitle' => __('article_attributes.create.title'),
|
||||
'breadcrumb' => [__('article_attributes.title'), __('article_attributes.create.title')]
|
||||
'title' => __('unities.title'),
|
||||
'subtitle' => __('unities.create.title'),
|
||||
'breadcrumb' => [__('unities.title')]
|
||||
])
|
||||
|
||||
@include('boilerplate::load.fileinput')
|
||||
|
||||
@section('content')
|
||||
|
||||
{{ Form::open(['route' => 'Shop.Admin.ArticleAttributes.store', 'id' => 'article-attribute-form', 'autocomplete' => 'off', 'files' => true]) }}
|
||||
{{ Form::open(['route' => 'Shop.Admin.Unities.store', 'id' => 'unity-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 href="{{ route("Shop.Admin.Unities.index") }}" class="btn btn-default">
|
||||
{{ __('unities.list.title') }}
|
||||
</a>
|
||||
|
||||
<span class="btn-group pull-right">
|
||||
@@ -22,7 +22,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('Shop.Admin.ArticleAttributeValues.form')
|
||||
@include('Shop.Admin.Unities.form')
|
||||
</form>
|
||||
|
||||
@endsection
|
||||
|
||||
@@ -1,29 +1,14 @@
|
||||
@extends('layout.index', [
|
||||
'title' => 'Attributs d\'articles',
|
||||
'subtitle' => 'Edition d\'un attribut d\'article',
|
||||
'breadcrumb' => ['Articles']
|
||||
'title' => 'Unités',
|
||||
'subtitle' => 'Edition d\'une unité',
|
||||
'breadcrumb' => ['Unités']
|
||||
])
|
||||
|
||||
@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::open(['route' => 'Shop.Admin.Unities.store', 'id' => 'unity-form', 'autocomplete' => 'off']) }}
|
||||
<input type="hidden" name="id" value="{{ $unity['id'] ?? null }}">
|
||||
@include('Shop.Admin.Unities.form')
|
||||
</form>
|
||||
|
||||
@endsection
|
||||
|
||||
@@ -1,14 +1,12 @@
|
||||
@include('boilerplate::load.tinymce')
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
{{ Form::label('name', 'Package') }}
|
||||
@include('components.select', ['name' => 'package_id', 'value' => $unity['package_id'] ?? null, 'list' => $packages ?? [], 'required' => false, 'with_empty' => ''])
|
||||
</div>
|
||||
|
||||
<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])
|
||||
|
||||
@include('components.input', ['name' => 'value', 'value' => $unity['value'] ?? null, 'required' => true])
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -19,11 +17,3 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@push('js')
|
||||
<script>
|
||||
$(function() {
|
||||
$('.editor').tinymce({});
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
@@ -1,16 +1,16 @@
|
||||
@extends('layout.index', [
|
||||
'title' => __('Shop.article_attribute_values.title'),
|
||||
'subtitle' => __('Shop.article_attribute_values.list'),
|
||||
'breadcrumb' => [__('Shop.article_attribute_values.title')]
|
||||
'title' => __('Shop.unities.title'),
|
||||
'subtitle' => __('Shop.unities.list'),
|
||||
'breadcrumb' => [__('Shop.unities.title')]
|
||||
])
|
||||
|
||||
@section('content')
|
||||
@component('components.card')
|
||||
@include('components.datatable', ['route' => route('Shop.Admin.ArticleAttributeValues.index'), 'model' => 'ArticleAttributeValues'])
|
||||
@include('components.datatable', ['route' => route('Shop.Admin.Unities.index'), 'model' => 'unities'])
|
||||
@endcomponent
|
||||
|
||||
@component('components.layout.modal', ['title' => 'Filtres', 'id' => 'modal-filters'])
|
||||
@include('Shop.Admin.ArticleAttributeValues.partials.filters')
|
||||
@component('components.layout.modal', ['title' => 'Filtres', 'id' => 'modal-unities-filters'])
|
||||
@include('Shop.Admin.Unities.partials.filters')
|
||||
@endcomponent
|
||||
|
||||
@endsection
|
||||
|
||||
@@ -47,7 +47,6 @@
|
||||
</script>
|
||||
@stack('js')
|
||||
<script src="{{ mix('js/app.js') }}"></script>
|
||||
<script src="{{ asset('vendor/datatables/buttons.server-side.js') }}"></script>
|
||||
@stack('scripts')
|
||||
</body>
|
||||
</html>
|
||||
|
||||
8
routes/Shop/Admin/Packages.php
Normal file
8
routes/Shop/Admin/Packages.php
Normal file
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
Route::prefix('Packages')->name('Packages.')->group(function () {
|
||||
Route::any('getOptionsByFamily', 'PackageController@getOptionsByFamily')->name('getOptionsByFamily');
|
||||
Route::get('edit/{id}', 'PackageController@edit')->name('edit');
|
||||
});
|
||||
|
||||
Route::resource('Packages', 'PackageController');
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
Route::prefix('Unities')->name('Unities.')->group(function () {
|
||||
Route::any('getOptionsByPackage', 'UnityController@getOptionsByPackage')->name('getOptionsByPackage');
|
||||
Route::get('edit/{id}', 'UnityController@edit')->name('edit');
|
||||
});
|
||||
|
||||
Route::resource('Unities', 'UnityController');
|
||||
|
||||
@@ -13,6 +13,7 @@ Route::middleware('auth')->prefix('Admin')->namespace('Admin')->name('Admin.')->
|
||||
include __DIR__ . '/Invoices.php';
|
||||
include __DIR__ . '/OrderPayments.php';
|
||||
include __DIR__ . '/Orders.php';
|
||||
include __DIR__ . '/Packages.php';
|
||||
include __DIR__ . '/PriceGenerics.php';
|
||||
include __DIR__ . '/Tags.php';
|
||||
include __DIR__ . '/TagGroups.php';
|
||||
|
||||
Reference in New Issue
Block a user