Add tariff unities management

This commit is contained in:
Ludovic CANDELLIER
2022-01-22 19:26:35 +01:00
parent 6f04a8e7b7
commit f35650b234
15 changed files with 261 additions and 27 deletions

View File

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

View File

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

View File

@@ -0,0 +1,18 @@
<div class="row">
<div class="col-md-8">
{{ Form::label('name', 'Nom') }}
@include('components.form.input', ['name' => 'value', 'value' => $tariff_unity['value'] ?? null, 'required' => true])
</div>
</div>
@include('components.save')
@include('load.form.save')
@push('js')
<script>
$(function() {
initSaveForm('#tariff_unity-form');
});
</script>
@endpush

View File

@@ -0,0 +1,48 @@
@extends('layout.index', [
'title' => __('shop.tariff_unities.title'),
'subtitle' => __('shop.tariff_unities.list'),
'breadcrumb' => [__('shop.tariff_unities.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.tariff_unities.title') }}
</a>
<a href="#values" data-toggle="tab" class="nav-item nav-link active" role="tab" aria-controls="values" aria-selected="false">
{{ __('shop.tariff_unities.title') }}
</a>
</div>
</nav>
<div class="tab-content mb-0">
<div class="tab-pane fade" id="families">
@section('content')
@include('components.datatable', ['route' => route('Admin.Shop.TariffUnities.index'), 'model' => 'ArticleAttributefamilies'])
@endsection
</div>
<div class="tab-pane fade show active" id="values">
@section('content')
@component('components.card')
@include('components.datatable', ['route' => route('Admin.Shop.ArticleAttributeValues.index'), 'model' => 'TariffUnities', 'with_filters' => true])
@endcomponent
@component('components.layout.modal', ['title' => 'Filtres', 'id' => 'modal-filters'])
@include('Admin.Shop.TariffUnities.partials.filters')
@endcomponent
@endsection
</div>
</div>
@endsection
@push('scripts')
@include('components.js.datatable', ['route' => route('Admin.Shop.TariffUnities.index'), 'model' => 'TariffUnities'])
@endpush

View File

@@ -0,0 +1,16 @@
@extends('layout.index', [
'title' => __('shop.tariff_unities.title'),
'subtitle' => __('shop.tariff_unities.list'),
'breadcrumb' => [__('shop.tariff_unities.title')]
])
@section('content')
@component('components.card')
@include('components.datatable', ['route' => route('Admin.Shop.TariffUnities.index'), 'model' => 'tariff_unities','with_filters' => true])
@endcomponent
@component('components.layout.modal', ['title' => 'Filtres', 'id' => 'modal-tariff_unities-filters'])
@include('Admin.Shop.TariffUnities.partials.filters')
@endcomponent
@endsection

View File

@@ -0,0 +1,14 @@
<form id="tariff_unities-filters">
<div class="row">
<label class="col-4">Familles d'articles</label>
<div class="col-8">
@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.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

@@ -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