Refactoring, change menu, add many features

This commit is contained in:
Ludovic CANDELLIER
2021-10-30 02:22:51 +02:00
parent fae7b7897f
commit e356b3fcda
158 changed files with 1114 additions and 412 deletions

View File

@@ -1,28 +1,11 @@
@extends('layout.index', [
'title' => __('customers.title'),
'subtitle' => __('customers.create.title'),
'breadcrumb' => [__('customers.title'), __('customers.create.title')]
'title' => __('shop.customers.title'),
'subtitle' => __('shop.customers.add'),
'breadcrumb' => [__('shop.customers.title')]
])
@include('boilerplate::load.fileinput')
@section('content')
{{ Form::open(['route' => 'Admin.Shop.Customers.store', 'id' => 'customer-form', 'autocomplete' => 'off']) }}
<div class="row">
<div class="col-sm-12 mbl">
<a href="{{ route("Admin.Shop.Customers.index") }}" class="btn btn-default">
{{ __('customers.list.title') }}
</a>
<span class="btn-group pull-right">
@include('components.button-save')
</span>
</div>
</div>
@include('Admin.Shop.Customers.form')
</form>
@endsection

View File

@@ -1,7 +1,7 @@
@extends('layout.index', [
'title' => 'Clients',
'subtitle' => 'Edition d\'un client',
'breadcrumb' => ['Articles']
'title' => __('shop.customers.title'),
'subtitle' => __('shop.customers.edit'),
'breadcrumb' => [__('shop.customers.title')]
])
@include('boilerplate::load.fileinput')

View File

@@ -1,23 +1,39 @@
@include('boilerplate::load.tinymce')
<div class="row">
<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])
<div class="row mb-3">
<div class="col-6">
{{ Form::label('last_name', 'Nom') }}
@include('components.form.input', ['name' => 'last_name', 'value' => $customer['last_name'] ?? null, 'required' => true])
</div>
<div class="col-6">
{{ Form::label('first_name', 'Prénom') }}
@include('components.form.input', ['name' => 'first_name', 'value' => $customer['first_name'] ?? null, 'required' => true])
</div>
</div>
<div class="row mb-3">
<div class="col-6">
{{ Form::label('email', 'Email') }}
@include('components.form.inputs.email', ['name' => 'email', 'value' => $customer['email'] ?? null, 'required' => true])
</div>
<div class="col-6">
{{ Form::label('sale_channel_id', __('shop.sale_channels.name')) }}
@include('components.form.select', ['name' => 'sale_channel_id', 'list' => $sale_channels ?? [], 'value' => $customer['sale_channel_id'] ?? null, 'with_empty' => '', 'class' => 'select2'])
</div>
</div>
@include('components.address', ['with_country' => false])
</div>
</div>
@include('components.save')
@include('load.form.save')
@include('load.form.select2')
@push('js')
<script>
$(function() {
$('.editor').tinymce({});
initSelect2();
initSaveForm('#customer-form');
});
</script>
@endpush