This commit is contained in:
Ludovic CANDELLIER
2021-03-29 23:46:01 +02:00
parent 4855254a7f
commit 993154674e
28 changed files with 300 additions and 105 deletions

View File

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

View File

@@ -4,6 +4,4 @@
@include('Shop.Admin.PriceGenerics.partials.table-prices', ['generic' => $generic['generic'] ?? null ])
</div>
</div>

View File

@@ -5,10 +5,10 @@
@endif
@push('js')
<script>
$(function () {
handle_delete_generic_price();
});
</script>
<script>
$(function () {
handle_delete_generic_price();
});
</script>
@endpush

View File

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

View 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

View 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

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

View 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

View 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

View File

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

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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