Rename Admin views directory, add some functions on models

This commit is contained in:
Ludovic CANDELLIER
2021-07-27 22:12:58 +02:00
parent daeece59c9
commit 9a0601d473
229 changed files with 81 additions and 349 deletions

View File

@@ -0,0 +1,13 @@
@extends('layout.index', [
'title' => __('offers.title'),
'subtitle' => __('offers.create.title'),
'breadcrumb' => [__('offers.title'), __('offers.create.title')]
])
@section('content')
{{ Form::open(['route' => 'Admin.Shop.Offers.store', 'id' => 'offer-form', 'autocomplete' => 'off']) }}
@include('Admin.Shop.Offers.form')
</form>
@endsection

View File

@@ -0,0 +1,14 @@
@extends('layout.index', [
'title' => 'Offre',
'subtitle' => 'Edition d\'une offre',
'breadcrumb' => ['Offres']
])
@section('content')
{{ Form::open(['route' => 'Admin.Shop.Offers.update', 'id' => 'offer-form', 'autocomplete' => 'off']) }}
<input type="hidden" name="id" value="{{ $id }}">
@include('Admin.Shop.Offers.form')
</form>
@endsection

View File

@@ -0,0 +1,65 @@
<div class="row">
<div class="col-8">
<div class="row mb-3">
<div class="col-8">
{{ Form::label('article_id', 'Article') }}
@include('components.form.autocomplete', ['name' => 'article', 'data' => $offer ?? null, 'url' => route('Admin.Shop.Articles.autocomplete')])
</div>
</div>
<div class="row mb-3">
<div class="col-8">
{{ Form::label('variation_id', 'Déclinaison') }}
@include('components.form.autocomplete', ['name' => 'variation', 'data' => $offer ?? null, 'url' => route('Admin.Shop.Variations.autocomplete')])
</div>
</div>
<div class="row mb-3">
<div class="col-8">
{{ Form::label('tariff_id', 'Tarif') }}
@include('components.form.autocomplete', ['name' => 'tariff', 'data' => $offer ?? null, 'url' => route('Admin.Shop.Tariffs.autocomplete')])
</div>
</div>
</div>
<div class="col-4">
@component('components.card', ['title' => 'Disponibilité'])
<div class="row mb-3">
<div class="col-6">
{{ Form::label('stock_current', 'Appro immédiate') }}
@include('components.money', ['name' => 'stock_current', 'value' => $offer['stock_current'] ?? 0])
</div>
</div>
<div class="row mb-3">
<div class="col-6">
{{ Form::label('stock_delayed', 'Appro sur delai') }}
@include('components.money', ['name' => 'stock_delayed', 'value' => $offer['stock_delayed'] ?? 0])
</div>
<div class="col-6">
{{ Form::label('delay_type', 'Délai type') }}
@include('components.input', ['name' => 'delay_type', 'value' => $offer['delay_type'] ?? null])
</div>
</div>
<div class="row mb-3">
<div class="col-6">
{{ Form::label('stock_ondemand', 'Appro sur demande') }}
@include('components.toggle', ['name' => 'stock_ondemand', 'value' => $offer['stock_ondemand'] ?? 0])
</div>
<div class="col-6">
{{ Form::label('minimum_ondemand', 'Minimum de quantité') }}
@include('components.money', ['name' => 'minimum_ondemand', 'value' => $offer['minimum_ondemand'] ?? 0])
</div>
</div>
@endcomponent
</div>
</div>
@include('components.save')
@include('load.form.autocomplete')
@push('js')
<script>
initAutocomplete();
initSaveForm();
</script>
@endpush

View File

@@ -0,0 +1,9 @@
@extends('layout.index', [
'title' => __('Shop.offers.title'),
'subtitle' => __('Shop.offers.list'),
'breadcrumb' => [__('Shop.offers.title')]
])
@section('content')
@include('components.datatable', ['route' => route('Admin.Shop.Offers.index'), 'model' => 'offers'])
@endsection

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