change homepages to contents, add new methods to deliveries and sale_channels by customer

This commit is contained in:
ludo
2023-12-09 23:55:50 +01:00
parent 2a429e4163
commit 25b78f3380
28 changed files with 185 additions and 153 deletions

View File

@@ -0,0 +1,14 @@
@extends('layout.index', [
'title' => __('Contenus'),
'subtitle' => __('Ajouter un contenu'),
])
@section('content')
{{ Form::open([
'route' => 'Admin.Shop.Contents.store',
'id' => 'homepage-form',
'autocomplete' => 'off',
]) }}
@include('Admin.Shop.Contents.form')
</form>
@endsection

View File

@@ -0,0 +1,11 @@
@extends('layout.index', [
'title' => __('Contenus'),
'subtitle' => __('Editer un contenu'),
])
@section('content')
{{ Form::open(['route' => 'Admin.Shop.Contents.store', 'id' => 'content-form', 'autocomplete' => 'off']) }}
<input type="hidden" name="id" value="{{ $content['id'] }}">
@include('Admin.Shop.Contents.form')
</form>
@endsection

View File

@@ -0,0 +1,23 @@
<div class="row">
<div class="col-12">
@include('components.form.editor', [
'name' => 'text',
'value' => $content['text'] ?? '',
'rows' => 10,
])
</div>
</div>
<x-save />
@include('load.form.save')
@include('load.form.editor')
@push('js')
<script>
$(function() {
initEditor();
initSaveForm('#homepage-form');
});
</script>
@endpush

View File

@@ -0,0 +1,13 @@
@extends('layout.index', [
'title' => __('Contenus'),
'subtitle' => __('Liste des contenus'),
])
@section('content')
<x-card>
@include('components.datatable', [
'route' => route('Admin.Shop.Contents.index'),
'model' => 'contents',
])
</x-card>
@endsection

View File

@@ -1,10 +0,0 @@
@extends('layout.index', [
'title' => __('Contenus'),
'subtitle' => __('Ajouter un contenu'),
])
@section('content')
{{ Form::open(['route' => 'Admin.Shop.Homepages.store', 'id' => 'homepage-form', 'autocomplete' => 'off']) }}
@include('Admin.Shop.Homepages.form')
</form>
@endsection

View File

@@ -1,13 +0,0 @@
@extends('layout.index', [
'title' => __('Contenus'),
'subtitle' => __('Editer un contenu'),
])
@section('content')
{{ Form::open(['route' => 'Admin.Shop.Homepages.store', 'id' => 'homepage-form', 'autocomplete' => 'off']) }}
<input type="hidden" name="id" value="{{ $homepage['id'] }}">
@include('Admin.Shop.Homepages.form')
</form>
@endsection

View File

@@ -1,23 +0,0 @@
<div class="row">
<div class="col-12">
@include('components.form.editor', [
'name' => 'text',
'value' => $homepage['text'] ?? '',
'rows' => 10,
])
</div>
</div>
@include('components.save')
@include('load.form.save')
@include('load.form.editor')
@push('js')
<script>
$(function() {
initEditor();
initSaveForm('#homepage-form');
});
</script>
@endpush

View File

@@ -1,10 +0,0 @@
@extends('layout.index', [
'title' => __('Contenus'),
'subtitle' => __('Liste des contenus'),
])
@section('content')
@component('components.card')
@include('components.datatable', ['route' => route('Admin.Shop.Homepages.index'), 'model' => 'homepages'])
@endcomponent
@endsection

View File

@@ -11,10 +11,7 @@
<h1>Panier</h1>
</div>
<div class="col-8">
Livraison à domicile ...<br>
Commande en ligne et livraison par voie postale. Attention certains produits ne sont pas disponibles
en livraison.
Les sachets disponibles en lignes sont disponibles à la livraison et uniquement quelques plants.
{!! $header ?? '' !!}
</div>
</div>
@foreach ($basket as $nature => $items)

View File

@@ -4,7 +4,7 @@
</div>
<div class="col-6 text-right font-weight-bold">
<span id="basket_sale_channel">
{{ $basket['sale_channel']['name'] ?? null }}
{{ $sale_channel['name'] ?? null }}
</span>
</div>
</div>