add datatables
This commit is contained in:
26
app/DataTables/Shop/PriceGenericCategoriesDataTable.php
Normal file
26
app/DataTables/Shop/PriceGenericCategoriesDataTable.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace App\Datatables\Shop;
|
||||
|
||||
use Yajra\DataTables\Html\Column;
|
||||
use App\Datatables\ParentDataTable as DataTable;
|
||||
use App\Models\Shop\PriceGenericCategory;
|
||||
|
||||
class PriceGenericCategoriesDataTable extends DataTable
|
||||
{
|
||||
public $model_name = 'price-generics';
|
||||
|
||||
public function query(PriceGeneric $model)
|
||||
{
|
||||
return self::buildQuery($model);
|
||||
}
|
||||
|
||||
protected function getColumns()
|
||||
{
|
||||
return [
|
||||
Column::make('name')->title('Nom'),
|
||||
self::makeColumnButtons(),
|
||||
];
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
@extends('layout.index', [
|
||||
'title' => __('price_generic_categories.title'),
|
||||
'subtitle' => __('price_generic_categories.create.title'),
|
||||
'breadcrumb' => [__('price_generic_categories.title'), __('price_generic_categories.create.title')]
|
||||
])
|
||||
|
||||
@section('content')
|
||||
|
||||
{{ Form::open(['route' => 'Shop.Admin.PriceGenericCategories.store', 'id' => 'price-generic-category-form', 'autocomplete' => 'off']) }}
|
||||
@include('Shop.Admin.PriceGenericCategories.form')
|
||||
</form>
|
||||
|
||||
@endsection
|
||||
@@ -0,0 +1,14 @@
|
||||
@extends('layout.index', [
|
||||
'title' => __('price_generic_categories.title'),
|
||||
'subtitle' => __('price_generic_categories.edit.title'),
|
||||
'breadcrumb' => [__('price_generic_categories.title'), __('price_generic_categories.edit.title')]
|
||||
])
|
||||
|
||||
@section('content')
|
||||
|
||||
{{ Form::open(['route' => 'Shop.Admin.PriceGenericCategories.store', 'id' => 'price-generic-category-form', 'autocomplete' => 'off']) }}
|
||||
<input type="hidden" name="id" value="{{ $generic['id'] }}">
|
||||
@include('Shop.Admin.PriceGenericCategories.form')
|
||||
</form>
|
||||
|
||||
@endsection
|
||||
@@ -0,0 +1,14 @@
|
||||
<div class="row mb-3">
|
||||
<div class="col-md-6">
|
||||
{{ Form::label('name', 'Nom') }}
|
||||
@include('components.input', ['name' => 'name', 'value' => $generic_category['name'] ?? 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>
|
||||
@@ -0,0 +1,13 @@
|
||||
@extends('layout.index', [
|
||||
'title' => __('price_generic_categories.title'),
|
||||
'subtitle' => __('price_generic_categories.list.title'),
|
||||
'breadcrumb' => [__('price_generic_categories.title')]
|
||||
])
|
||||
@section('content')
|
||||
@include('components.datatable', ['route' => route('Shop.Admin.PriceGenericCategories.index'), 'model' => 'price-generic-categories', 'with_filters' => true])
|
||||
|
||||
@component('components.layout.modal', ['title' => 'Filtres', 'id' => 'modal-price-generic-categories-filters'])
|
||||
@include('Shop.Admin.PriceGenericCategories.partials.filters')
|
||||
@endcomponent
|
||||
|
||||
@endsection
|
||||
@@ -0,0 +1,8 @@
|
||||
<form id="price_generics-filters">
|
||||
<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' => ' '])
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user