Refactoring, change menu, add many features

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

View File

@@ -30,7 +30,7 @@ class ArticlesDataTable extends DataTable
{ {
$datatables $datatables
->editColumn('thumb', function (Article $article) { ->editColumn('thumb', function (Article $article) {
return Articles::getThumbSrc($article->image); return '<img src="' . Articles::getThumbSrc($article->image) . '">';
}) })
->rawColumns(['thumb','action']); ->rawColumns(['thumb','action']);
return parent::modifier($datatables); return parent::modifier($datatables);
@@ -41,7 +41,7 @@ class ArticlesDataTable extends DataTable
{ {
return [ return [
Column::make('article_nature.name')->title('Nature'), Column::make('article_nature.name')->title('Nature'),
Column::make('thumb')->searchable(false), Column::make('thumb')->searchable(false)->width(40)->class('text-center'),
Column::make('name')->title('Nom'), Column::make('name')->title('Nom'),
Column::make('tags_count')->title('Tags')->class('text-right')->searchable(false), Column::make('tags_count')->title('Tags')->class('text-right')->searchable(false),
Column::make('categories_count')->title('Rayons')->class('text-right')->searchable(false), Column::make('categories_count')->title('Rayons')->class('text-right')->searchable(false),

View File

@@ -0,0 +1,41 @@
<?php
namespace App\Datatables\Shop;
use Yajra\DataTables\Html\Column;
use App\Datatables\ParentDataTable as DataTable;
use App\Models\Shop\Delivery;
class DeliveriesDataTable extends DataTable
{
public $model_name = 'deliveries';
public function query(Delivery $model)
{
$model = $model->with('SaleChannel');
return self::buildQuery($model);
}
public function modifier($datatables)
{
$datatables
->editColumn('active', function (Delivery $delivery) {
return view("components.form.toggle", ['value' => $delivery->active, 'on' => __('active'), 'off' => __('inactive'), 'meta' => 'data-id='.$delivery->id, 'size' => 'sm']);
})
->rawColumns(['active', 'action']);
return parent::modifier($datatables);
}
protected function getColumns()
{
return [
Column::make('active')->title(__('active'))->width(60)->class('text-center'),
Column::make('name')->title('Nom'),
Column::make('sale_channel.name')->title(__('shop.sale_channels.name')),
Column::make('address')->title('Adresse'),
Column::make('zipcode')->title('Code postal'),
Column::make('city')->title('Ville'),
self::makeColumnButtons(),
];
}
}

View File

@@ -12,6 +12,7 @@ class PackagesDataTable extends DataTable
public function query(Package $model) public function query(Package $model)
{ {
$model = $model->withCount(['variations','offers']);
return self::buildQuery($model); return self::buildQuery($model);
} }
@@ -19,6 +20,8 @@ class PackagesDataTable extends DataTable
{ {
return [ return [
Column::make('value')->title('Valeur'), Column::make('value')->title('Valeur'),
Column::make('variations_count')->title('nb variations')->searchable(false)->class('text-right'),
Column::make('offers_count')->title('nb offres')->searchable(false)->class('text-right'),
self::makeColumnButtons(), self::makeColumnButtons(),
]; ];
} }

View File

@@ -12,13 +12,16 @@ class SaleChannelsDataTable extends DataTable
public function query(SaleChannel $model) public function query(SaleChannel $model)
{ {
$model = $model->withCount('deliveries');
return self::buildQuery($model); return self::buildQuery($model);
} }
protected function getColumns() protected function getColumns()
{ {
return [ return [
Column::make('code')->title('Code abrégé')->width(100),
Column::make('name')->title('Nom'), Column::make('name')->title('Nom'),
Column::make('deliveries_count')->title(__('shop.deliveries.list'))->searchable(false),
self::makeColumnButtons(), self::makeColumnButtons(),
]; ];
} }

View File

@@ -5,6 +5,7 @@ namespace App\Http\Controllers\Admin\Shop;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use App\Repositories\Shop\Customers; use App\Repositories\Shop\Customers;
use App\Repositories\Shop\SaleChannels;
use App\Datatables\Shop\CustomersDataTable; use App\Datatables\Shop\CustomersDataTable;
class CustomerController extends Controller class CustomerController extends Controller
@@ -17,7 +18,8 @@ class CustomerController extends Controller
public function create() public function create()
{ {
return view('Admin.Shop.Customers.create'); $data['sale_channels'] = SaleChannels::getOptions();
return view('Admin.Shop.Customers.create', $data);
} }
public function store(Request $request) public function store(Request $request)
@@ -35,6 +37,7 @@ class CustomerController extends Controller
public function edit($id) public function edit($id)
{ {
$data['customer'] = Customers::get($id)->toArray(); $data['customer'] = Customers::get($id)->toArray();
$data['sale_channels'] = SaleChannels::getOptions();
return view('Admin.Shop.Customers.edit', $data); return view('Admin.Shop.Customers.edit', $data);
} }

View File

@@ -0,0 +1,55 @@
<?php
namespace App\Http\Controllers\Admin\Shop;
use Illuminate\Http\Request;
use App\Repositories\Shop\Deliveries;
use App\Repositories\Shop\SaleChannels;
use App\Datatables\Shop\DeliveriesDataTable;
class DeliveryController extends Controller
{
public function index(DeliveriesDataTable $dataTable)
{
$data = [];
return $dataTable->render('Admin.Shop.Deliveries.list', $data);
}
public function create()
{
$data['sale_channels'] = SaleChannels::getOptions();
return view('Admin.Shop.Deliveries.create', $data);
}
public function store(Request $request)
{
$ret = Deliveries::store($request->all());
return redirect()->route('Admin.Shop.Deliveries.index');
}
public function show($id)
{
$data['delivery'] = Deliveries::get($id);
return view('Admin.Shop.Deliveries.view', $data);
}
public function edit($id)
{
$data['delivery'] = Deliveries::get($id)->toArray();
$data['sale_channels'] = SaleChannels::getOptions();
return view('Admin.Shop.Deliveries.edit', $data);
}
public function destroy($id)
{
return Deliveries::destroy($id);
}
public function toggleActive(Request $request)
{
$data = Deliveries::toggle_active($request->input('id'), ($request->input('active') == 'true') ? 1 : 0);
return response()->json(['error' => 0]);
}
}

View File

@@ -1,6 +1,6 @@
<?php <?php
namespace App\Http\Controllers\Shop\Admin; namespace App\Http\Controllers\Admin\Shop;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use App\Http\Controllers\Controller; use App\Http\Controllers\Controller;

View File

@@ -12,7 +12,7 @@ class Botanic
$menu->add('Botanique', [ 'permission' => 'backend_access', 'icon' => 'leaf' ]) $menu->add('Botanique', [ 'permission' => 'backend_access', 'icon' => 'leaf' ])
->id('botanic') ->id('botanic')
->activeIfRoute('botanic') ->activeIfRoute('botanic')
->order(4); ->order(5);
$menu->addTo('botanic', 'Familles', [ 'route' => 'Admin.Botanic.Families.index', 'permission' => 'backend_access' ]) $menu->addTo('botanic', 'Familles', [ 'route' => 'Admin.Botanic.Families.index', 'permission' => 'backend_access' ])
->activeIfRoute(['Admin.Botanic.Families.*'])->order(1); ->activeIfRoute(['Admin.Botanic.Families.*'])->order(1);

View File

@@ -8,15 +8,13 @@ class Customers
{ {
public function make(Builder $menu) public function make(Builder $menu)
{ {
$menu->add('Clients', [ 'permission' => 'backend_access', 'icon' => 'address-card' ]) $menu->add('Clients finaux', [ 'permission' => 'backend_access', 'icon' => 'address-card' ])
->id('customers') ->id('customers')
->activeIfRoute('customers') ->activeIfRoute('customers')
->order(3); ->order(4);
$menu->addTo('customers', __('customer.customers.name'), [ 'route' => 'Admin.Shop.Customers.index', 'permission' => 'backend_access' ]) $menu->addTo('customers', __('customer.customers.name'), [ 'route' => 'Admin.Shop.Customers.index', 'permission' => 'backend_access' ])
->activeIfRoute(['Admin.Shop.Customers.*'])->order(1); ->activeIfRoute(['Admin.Shop.Customers.*'])->order(1);
$menu->addTo('customers', __('customer.sale_channels.name'), [ 'route' => 'Admin.Shop.SaleChannels.index', 'permission' => 'backend_access' ]) }
->activeIfRoute(['Admin.Shop.SaleChannels.*'])->order(1);
}
} }

22
app/Menu/Deliveries.php Normal file
View File

@@ -0,0 +1,22 @@
<?php
namespace App\Menu;
use Sebastienheyd\Boilerplate\Menu\Builder;
class Deliveries
{
public function make(Builder $menu)
{
$menu->add('Modes de vente', [ 'permission' => 'backend_access', 'icon' => 'address-card' ])
->id('sales_mode')
->activeIfRoute('sales_mode')
->order(3);
$menu->addTo('sales_mode', __('shop.sale_channels.name'), [ 'route' => 'Admin.Shop.SaleChannels.index', 'permission' => 'backend_access' ])
->activeIfRoute(['Admin.Shop.SaleChannels.*'])->order(1);
$menu->addTo('sales_mode', __('shop.deliveries.title'), [ 'route' => 'Admin.Shop.Deliveries.index', 'permission' => 'backend_access' ])
->activeIfRoute(['Admin.Shop.Deliveries.*'])->order(1);
}
}

View File

@@ -3,22 +3,15 @@
namespace App\Models\Shop; namespace App\Models\Shop;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
use Spatie\MediaLibrary\HasMedia\HasMedia;
use Spatie\MediaLibrary\HasMedia\HasMediaTrait;
// use Rinvex\Categories\Traits\Categorizable;
use Rinvex\Tags\Traits\Taggable;
// use Conner\Tagging\Taggable;
use Fico7489\Laravel\EloquentJoin\Traits\EloquentJoin;
class Category extends Model class Basket extends Model
{ {
use Taggable, HasMediaTrait;
protected $guarded = ['id']; protected $guarded = ['id'];
protected $table = 'shop_categories'; protected $table = 'shop_baskets';
public function Articles() public function Offer()
{ {
return $this->morphedByMany('App\Models\Shop\Article', 'categorizable'); return $this->belongsTo('App\Models\Shop\Offer');
} }
} }

View File

@@ -14,6 +14,11 @@ class Customer extends Model
return $this->hasMany(Invoice::class); return $this->hasMany(Invoice::class);
} }
public function Deliveries()
{
return $this->hasMany(Delivery::class);
}
public function Orders() public function Orders()
{ {
return $this->hasMany(Order::class); return $this->hasMany(Order::class);

View File

@@ -0,0 +1,57 @@
<?php
namespace App\Models\Shop;
use Illuminate\Database\Eloquent\Model;
class Delivery extends Model
{
protected $guarded = ['id'];
protected $table = 'shop_deliveries';
public function Customers()
{
return $this->hasMany(Customer::class);
}
public function SaleChannel()
{
return $this->belongsTo(SaleChannel::class);
}
public function scopeActive($query)
{
return $this->byActive(1);
}
public function scopeByActive($query, $active)
{
return $query->where($this->table . '.active', $active);
}
public function scopeByPublic($query, $is_public)
{
return $query->where($this->table . '.is_public', $is_public);
}
public function scopeAtHouse($query)
{
return $query->where($this->table . '.at_house', 1);
}
public function scopeInactive($query)
{
return $this->byActive(0);
}
public function scopeManaged($query)
{
return $this->byPublic(0);
}
public function scopePublic($query)
{
return $this->byPublic(1);
}
}

View File

@@ -8,17 +8,11 @@ class Invoice extends Model
{ {
protected $guarded = ['id']; protected $guarded = ['id'];
/**
* @return \Illuminate\Database\Eloquent\Relations\HasMany
*/
public function InvoiceItems() public function InvoiceItems()
{ {
return $this->hasMany(InvoiceItem::class); return $this->hasMany(InvoiceItem::class);
} }
/**
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
*/
public function Customer() public function Customer()
{ {
return $this->belongsTo(Customer::class); return $this->belongsTo(Customer::class);

View File

@@ -19,6 +19,16 @@ class Package extends Model
return $this->hasMany(Unity::class); return $this->hasMany(Unity::class);
} }
public function variations()
{
return $this->hasMany(Variation::class);
}
public function offers()
{
return $this->hasManyThrough(Offer::class, Variation::class);
}
public function scopeByArticleNature($query, $id) public function scopeByArticleNature($query, $id)
{ {
return $query->where($this->table . '.article_family_id', $id); return $query->where($this->table . '.article_family_id', $id);

View File

@@ -8,4 +8,10 @@ class SaleChannel extends Model
{ {
protected $guarded = ['id']; protected $guarded = ['id'];
protected $table = 'shop_sale_channels'; protected $table = 'shop_sale_channels';
public function deliveries()
{
return $this->hasMany(Delivery::class);
}
} }

View File

@@ -21,4 +21,9 @@ class Variation extends Model
{ {
return $this->belongsTo(Unity::class); return $this->belongsTo(Unity::class);
} }
public function offers()
{
return $this->hasMany(Offer::class);
}
} }

View File

@@ -5,28 +5,28 @@ namespace App\Repositories;
use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\DB;
use App\Http\Controllers\Controller; use App\Http\Controllers\Controller;
use App\Models\Ville; use App\Models\City;
class Villes class Cities
{ {
public static function getVillesByName($query) public static function getCitiesByName($query)
{ {
return Ville::select('id', DB::raw("concat(nom,' (',code_postal,')') as text"))->where('nom', 'LIKE', "$query%")->orderBy('nom', 'ASC')->take(30)->get(); return City::select('id', DB::raw("concat(nom,' (',code_postal,')') as text"))->where('nom', 'LIKE', "$query%")->orderBy('nom', 'ASC')->take(30)->get();
} }
public static function getVillesByCP($query) public static function getCitiesByCP($query)
{ {
return Ville::select('id', DB::raw("concat(nom,' (',code_postal,')') as text"))->where('code_postal', 'LIKE', "%q$guery%")->orderBy('nom', 'ASC')->take(30)->get(); return City::select('id', DB::raw("concat(nom,' (',code_postal,')') as text"))->where('code_postal', 'LIKE', "%q$guery%")->orderBy('nom', 'ASC')->take(30)->get();
} }
public static function getCPByVille($id) public static function getCPByCity($id)
{ {
$ville = self::get($id); $ville = self::get($id);
$codes = explode("-", $ville->code_postal); $codes = explode("-", $ville->code_postal);
return $codes; return $codes;
} }
public static function getNomByVille($id) public static function getNomByCity($id)
{ {
$ville = self::get($id); $ville = self::get($id);
return $ville->nom; return $ville->nom;
@@ -34,7 +34,7 @@ class Villes
public static function get($id) public static function get($id)
{ {
return Ville::find($id); return City::find($id);
} }
public static function getCoords($adresse) public static function getCoords($adresse)
@@ -58,9 +58,9 @@ class Villes
} }
} }
public static function getCoordsByVille($id) public static function getCoordsByCity($id)
{ {
$ville = Ville::find($id); $ville = City::find($id);
return ['latitude' => $ville->latitude, 'longitude' => $ville->longitude]; return ['latitude' => $ville->latitude, 'longitude' => $ville->longitude];
} }
} }

View File

@@ -0,0 +1,54 @@
<?php
namespace App\Repositories\Shop;
use App\Models\Shop\Delivery;
class Deliveries
{
public static function getOptions()
{
return Delivery::orderBy('name', 'asc')->get()->pluck('name', 'id')->toArray();
}
public static function getAll()
{
return Delivery::orderBy('name', 'asc')->get();
}
public static function get($id)
{
return Delivery::find($id);
}
public static function store($data)
{
$id = $data['id'] ?? false;
$item = $id ? self::update($data, $id) : self::create($data);
return $item->id;
}
public static function create($data)
{
return Delivery::create($data);
}
public static function update($data, $id = false)
{
$id = $id ? $id : $data['id'];
$delivery = self::get($id);
$delivery->update($data);
return $delivery;
}
public static function destroy($id)
{
return Delivery::destroy($id);
}
public static function toggle_active($id, $active)
{
return self::update(['active' => $active], $id);
}
}

View File

@@ -69,7 +69,6 @@
"rutorika/sortable": "^8.0", "rutorika/sortable": "^8.0",
"santigarcor/laratrust": "^6.0", "santigarcor/laratrust": "^6.0",
"sebastienheyd/boilerplate": "^7.5", "sebastienheyd/boilerplate": "^7.5",
"sensiolabs/security-checker": "^6.0",
"smajohusic/laravel-mail-logger": "^1.0", "smajohusic/laravel-mail-logger": "^1.0",
"spatie/eloquent-sortable": "^3.11", "spatie/eloquent-sortable": "^3.11",
"spatie/image-optimizer": "^1.4", "spatie/image-optimizer": "^1.4",
@@ -95,7 +94,6 @@
"enlightn/enlightn": "^1.16", "enlightn/enlightn": "^1.16",
"facade/ignition": "^2.9", "facade/ignition": "^2.9",
"fakerphp/faker": "^1.13", "fakerphp/faker": "^1.13",
"geekality/timer": "^1.2",
"imanghafoori/laravel-microscope": "^1.0", "imanghafoori/laravel-microscope": "^1.0",
"mockery/mockery": "^1.4.2", "mockery/mockery": "^1.4.2",
"nunomaduro/collision": "^5.4", "nunomaduro/collision": "^5.4",

View File

@@ -93,6 +93,19 @@ return [
'successdel' => 'Le client a été correctement effacé', 'successdel' => 'Le client a été correctement effacé',
'confirmdelete' => 'Confirmez-vous la suppression du client ?', 'confirmdelete' => 'Confirmez-vous la suppression du client ?',
], ],
'deliveries' => [
'title' => 'Points de distribution',
'name' => 'Point de distribution',
'description' => 'Gérer les points de distribution',
'add' => 'Ajouter un point de distribution',
'edit' => 'Editer un point de distribution',
'del' => 'Effacer un point de distribution',
'list' => 'Liste des points de distribution',
'successadd' => 'Le point de distribution a été correctement ajouté',
'successmod' => 'Le point de distribution a été correctement modifié',
'successdel' => 'Le point de distribution a été correctement effacé',
'confirmdelete' => 'Confirmez-vous la suppression du point de distribution ?',
],
'offers' => [ 'offers' => [
'title' => 'Offres', 'title' => 'Offres',
'name' => 'Offre', 'name' => 'Offre',
@@ -130,6 +143,19 @@ return [
'successdel' => 'Le prix a été correctement effacé', 'successdel' => 'Le prix a été correctement effacé',
'confirmdelete' => 'Confirmez-vous la suppression du prix ?', 'confirmdelete' => 'Confirmez-vous la suppression du prix ?',
], ],
'sale_channels' => [
'title' => 'Canaux de vente',
'name' => 'Canal de vente',
'description' => 'Gérer les canaux de ventes',
'add' => 'Ajouter un canal de vente',
'edit' => 'Editer un canal de vente',
'del' => 'Effacer un canal de vente',
'list' => 'Liste des canaux de vente',
'successadd' => 'Le canal de vente a été correctement ajouté',
'successmod' => 'Le canal de vente a été correctement modifié',
'successdel' => 'Le canal de vente a été correctement effacé',
'confirmdelete' => 'Confirmez-vous la suppression du canal de vente ?',
],
'shelves' => [ 'shelves' => [
'title' => 'Rayons', 'title' => 'Rayons',
'name' => 'Rayon', 'name' => 'Rayon',

View File

@@ -3,25 +3,25 @@
<div class="row mb-3"> <div class="row mb-3">
<div class="col-6"> <div class="col-6">
{{ Form::label('name', 'Nom') }} {{ Form::label('name', 'Nom') }}
@include('components.input', ['name' => 'name', 'value' => (isset($family['name'])) ? $family['name'] : null, 'required' => true]) @include('components.form.input', ['name' => 'name', 'value' => (isset($family['name'])) ? $family['name'] : null, 'required' => true])
</div> </div>
<div class="col-6"> <div class="col-6">
{{ Form::label('alias', 'Alias') }} {{ Form::label('alias', 'Alias') }}
@include('components.input', ['name' => 'alias', 'value' => (isset($family['alias'])) ? $family['alias'] : null]) @include('components.form.input', ['name' => 'alias', 'value' => (isset($family['alias'])) ? $family['alias'] : null])
</div> </div>
</div> </div>
<div class="row mb-3"> <div class="row mb-3">
<div class="col-12"> <div class="col-12">
{{ Form::label('latin', 'Nom latin') }} {{ Form::label('latin', 'Nom latin') }}
@include('components.input', ['name' => 'latin', 'value' => (isset($family['latin'])) ? $family['latin'] : null, 'required' => true]) @include('components.form.input', ['name' => 'latin', 'value' => (isset($family['latin'])) ? $family['latin'] : null, 'required' => true])
</div> </div>
</div> </div>
<div class="row mb-3"> <div class="row mb-3">
<div class="col-12"> <div class="col-12">
{{ Form::label('description', 'Description') }} {{ Form::label('description', 'Description') }}
@include('components.textarea', ['name' => 'description', 'value' => isset($family['description']) ? $family['description'] : null, 'class' => 'editor', 'required' => true]) @include('components.form.textarea', ['name' => 'description', 'value' => isset($family['description']) ? $family['description'] : null, 'class' => 'editor', 'required' => true])
</div> </div>
</div> </div>

View File

@@ -4,14 +4,14 @@
<div class="row mb-3"> <div class="row mb-3">
<div class="col-12"> <div class="col-12">
{{ Form::label('name', 'Nom') }} {{ Form::label('name', 'Nom') }}
@include('components.input', ['name' => 'name', 'value' => $genre['name'] ?? null, 'required' => true]) @include('components.form.input', ['name' => 'name', 'value' => $genre['name'] ?? null, 'required' => true])
</div> </div>
</div> </div>
<div class="row mb-3"> <div class="row mb-3">
<div class="col-12"> <div class="col-12">
{{ Form::label('family', 'Famille') }} {{ Form::label('family', 'Famille') }}
@include('components.select', ['name' => 'family_id', 'list' => $families, 'value' => $genre['family_id'] ?? null, 'required' => false, 'with_empty' => '']) @include('components.form.select', ['name' => 'family_id', 'list' => $families, 'value' => $genre['family_id'] ?? null, 'required' => false, 'with_empty' => ''])
</div> </div>
</div> </div>
@@ -19,21 +19,21 @@
<div class="row mb-3"> <div class="row mb-3">
<div class="col-12"> <div class="col-12">
{{ Form::label('alias', 'Alias') }} {{ Form::label('alias', 'Alias') }}
@include('components.input', ['name' => 'alias', 'value' => $genre['alias'] ?? null]) @include('components.form.input', ['name' => 'alias', 'value' => $genre['alias'] ?? null])
</div> </div>
</div> </div>
<div class="row mb-3"> <div class="row mb-3">
<div class="col-12"> <div class="col-12">
{{ Form::label('latin', 'Nom latin') }} {{ Form::label('latin', 'Nom latin') }}
@include('components.input', ['name' => 'latin', 'value' => $genre['latin'] ?? null, 'required' => false]) @include('components.form.input', ['name' => 'latin', 'value' => $genre['latin'] ?? null, 'required' => false])
</div> </div>
</div> </div>
<div class="row mb-3"> <div class="row mb-3">
<div class="col-12"> <div class="col-12">
{{ Form::label('description', 'Description') }} {{ Form::label('description', 'Description') }}
@include('components.textarea', ['name' => 'description', 'value' => $genre['description'] ?? null, 'class' => 'editor', 'required' => false]) @include('components.form.textarea', ['name' => 'description', 'value' => $genre['description'] ?? null, 'class' => 'editor', 'required' => false])
</div> </div>
</div> </div>

View File

@@ -7,36 +7,36 @@
<div class="row mb-3"> <div class="row mb-3">
<div class="col-6"> <div class="col-6">
{{ Form::label('name', 'Nom') }} {{ Form::label('name', 'Nom') }}
@include('components.input', ['name' => 'name', 'value' => $specie['name'] ?? null, 'required' => true]) @include('components.form.input', ['name' => 'name', 'value' => $specie['name'] ?? null, 'required' => true])
</div> </div>
<div class="col-6"> <div class="col-6">
{{ Form::label('latin', 'Nom latin') }} {{ Form::label('latin', 'Nom latin') }}
@include('components.input', ['name' => 'latin', 'value' => $specie['latin'] ?? null, 'required' => false]) @include('components.form.input', ['name' => 'latin', 'value' => $specie['latin'] ?? null, 'required' => false])
</div> </div>
</div> </div>
<div class="row mb-3"> <div class="row mb-3">
<div class="col-6"> <div class="col-6">
{{ Form::label('genre', 'Genre') }} {{ Form::label('genre', 'Genre') }}
@include('components.select', ['name' => 'genre_id', 'list' => $genres, 'value' => $specie['genre_id'] ?? null, 'class' => 'select2', 'with_empty' => '', 'required' => false]) @include('components.form.select', ['name' => 'genre_id', 'list' => $genres, 'value' => $specie['genre_id'] ?? null, 'class' => 'select2', 'with_empty' => '', 'required' => false])
</div> </div>
<div class="col-6"> <div class="col-6">
{{ Form::label('alias', 'Alias') }} {{ Form::label('alias', 'Alias') }}
@include('components.input', ['name' => 'alias', 'value' => $specie['alias'] ?? null]) @include('components.form.input', ['name' => 'alias', 'value' => $specie['alias'] ?? null])
</div> </div>
</div> </div>
<div class="row mb-3"> <div class="row mb-3">
<div class="col-12"> <div class="col-12">
{{ Form::label('tags', 'Tags') }} {{ Form::label('tags', 'Tags') }}
@include('components.select-tree', ['name' => 'tags[]', 'list' => $tags_list, 'values' => $specie['tags'] ?? null, 'class' => 'select2 form-control', 'multiple' => true]) @include('components.form.selects.select-tree', ['name' => 'tags[]', 'list' => $tags_list, 'values' => $specie['tags'] ?? null, 'class' => 'select2 form-control', 'multiple' => true])
</div> </div>
</div> </div>
<div class="row mb-3"> <div class="row mb-3">
<div class="col-12"> <div class="col-12">
{{ Form::label('description', 'Description') }} {{ Form::label('description', 'Description') }}
@include('components.textarea', ['name' => 'description', 'value' => $specie['description'] ?? null, 'class' => 'editor', 'required' => false]) @include('components.form.textarea', ['name' => 'description', 'value' => $specie['description'] ?? null, 'class' => 'editor', 'required' => false])
</div> </div>
</div> </div>

View File

@@ -3,25 +3,25 @@
<div class="row mb-3"> <div class="row mb-3">
<div class="col-6"> <div class="col-6">
{{ Form::label('name', 'Nom') }} {{ Form::label('name', 'Nom') }}
@include('components.input', ['name' => 'name', 'value' => $variety['name'] ?? null, 'required' => true]) @include('components.form.input', ['name' => 'name', 'value' => $variety['name'] ?? null, 'required' => true])
</div> </div>
<div class="col-6"> <div class="col-6">
{{ Form::label('genre', 'Espèce') }} {{ Form::label('genre', 'Espèce') }}
@include('components.select', ['name' => 'specie_id', 'list' => $species, 'value' => $variety['specie_id'] ?? null, 'class' => 'select2 form-control', 'with_empty' => '', 'required' => false]) @include('components.form.select', ['name' => 'specie_id', 'list' => $species, 'value' => $variety['specie_id'] ?? null, 'class' => 'select2 form-control', 'with_empty' => '', 'required' => false])
</div> </div>
</div> </div>
<div class="row mb-3"> <div class="row mb-3">
<div class="col-12"> <div class="col-12">
{{ Form::label('tags', 'Tags') }} {{ Form::label('tags', 'Tags') }}
@include('components.select-tree', ['name' => 'tags[]', 'list' => $tags_list, 'values' => $variety['tags'] ?? null, 'class' => 'select2 form-control', 'multiple' => true]) @include('components.form.selects.select-tree', ['name' => 'tags[]', 'list' => $tags_list, 'values' => $variety['tags'] ?? null, 'class' => 'select2 form-control', 'multiple' => true])
</div> </div>
</div> </div>
<div class="row mb-3"> <div class="row mb-3">
<div class="col-12"> <div class="col-12">
{{ Form::label('description', 'Description') }} {{ Form::label('description', 'Description') }}
@include('components.textarea', ['name' => 'description', 'value' => $variety['description'] ?? null, 'class' => 'editor', 'rows' => 5, 'required' => false]) @include('components.form.textarea', ['name' => 'description', 'value' => $variety['description'] ?? null, 'class' => 'editor', 'rows' => 5, 'required' => false])
</div> </div>
</div> </div>

View File

@@ -3,22 +3,22 @@
<div class="row mb-3"> <div class="row mb-3">
<div class="col-6"> <div class="col-6">
{{ Form::label('name', __('name')) }} {{ Form::label('name', __('name')) }}
@include('components.input-translate', ['name' => 'name', 'value' => $country['name'] ?? null, 'translations' => $country->translations['name'] ?? null, 'required' => true]) @include('components.form.input-translate', ['name' => 'name', 'value' => $country['name'] ?? null, 'translations' => $country->translations['name'] ?? null, 'required' => true])
</div> </div>
<div class="col-6"> <div class="col-6">
{{ Form::label('zone', __('zone')) }} {{ Form::label('zone', __('zone')) }}
@include('components.select', ['name' => 'zone', 'value' => $country['zone_id'] ?? null, 'list' => $zones ?? null, 'required' => true]) @include('components.form.select', ['name' => 'zone', 'value' => $country['zone_id'] ?? null, 'list' => $zones ?? null, 'required' => true])
</div> </div>
</div> </div>
<div class="row mb-3"> <div class="row mb-3">
<div class="col-6"> <div class="col-6">
{{ Form::label('name', __('region')) }} {{ Form::label('name', __('region')) }}
@include('components.select', ['name' => 'region', 'value' => $country['region'] ?? null, 'list' => $regions ?? null, 'required' => true]) @include('components.form.select', ['name' => 'region', 'value' => $country['region'] ?? null, 'list' => $regions ?? null, 'required' => true])
</div> </div>
<div class="col-6"> <div class="col-6">
{{ Form::label('nale', __('subregion')) }} {{ Form::label('nale', __('subregion')) }}
@include('components.select', ['name' => 'zone', 'value' => $country['subregion'] ?? null, 'list' => $subregions ?? null, 'required' => true]) @include('components.form.select', ['name' => 'zone', 'value' => $country['subregion'] ?? null, 'list' => $subregions ?? null, 'required' => true])
</div> </div>
</div> </div>

View File

@@ -13,15 +13,15 @@
</div> </div>
<div class="col-md-2"> <div class="col-md-2">
{{ Form::label('name', __('ope_rrai')) }}<br/> {{ Form::label('name', __('ope_rrai')) }}<br/>
@include('components.input', ['name' => 'rrai', 'value' => $country_param['rrai'] ?? null]) @include('components.form.input', ['name' => 'rrai', 'value' => $country_param['rrai'] ?? null])
</div> </div>
<div class="col-md-3"> <div class="col-md-3">
{{ Form::label('name', __('color')) }}<br/> {{ Form::label('name', __('color')) }}<br/>
@include('components.select', ['name' => 'index', 'list' => App\Repositories\DueDiligence\CountryParams::getRiskColors(), 'value' => $country_param['index'] ?? null, 'with_empty' => '']) @include('components.form.select', ['name' => 'index', 'list' => App\Repositories\DueDiligence\CountryParams::getRiskColors(), 'value' => $country_param['index'] ?? null, 'with_empty' => ''])
</div> </div>
<div class="col-md-3"> <div class="col-md-3">
{{ Form::label('name', __('broken_arrows')) }}<br/> {{ Form::label('name', __('broken_arrows')) }}<br/>
@include('components.input', ['name' => 'broken', 'value' => $country_param['broken'] ?? null]) @include('components.form.input', ['name' => 'broken', 'value' => $country_param['broken'] ?? null])
</div> </div>
</div> </div>

View File

@@ -1,14 +1,14 @@
<div class="row mb-3"> <div class="row mb-3">
<div class="col-6"> <div class="col-6">
{{ Form::label('name', __('application')) }} {{ Form::label('name', __('application')) }}
@include('components.select', ['name' => 'application_id', 'value' => $application_module['application_id'] ?? null, 'list' => $applications, 'required' => true, 'with_empty' => '']) @include('components.form.select', ['name' => 'application_id', 'value' => $application_module['application_id'] ?? null, 'list' => $applications, 'required' => true, 'with_empty' => ''])
</div> </div>
</div> </div>
<div class="row mb-3"> <div class="row mb-3">
<div class="col-6"> <div class="col-6">
{{ Form::label('name', __('name')) }} {{ Form::label('name', __('name')) }}
@include('components.input-translate', ['name' => 'name', 'value' => $application_module['name'] ?? null, 'translations' => $application_module->translations['name'] ?? null, 'required' => true]) @include('components.form.input-translate', ['name' => 'name', 'value' => $application_module['name'] ?? null, 'translations' => $application_module->translations['name'] ?? null, 'required' => true])
</div> </div>
</div> </div>

View File

@@ -13,15 +13,15 @@
</div> </div>
<div class="col-md-2"> <div class="col-md-2">
{{ Form::label('name', __('ope_rrai')) }}<br/> {{ Form::label('name', __('ope_rrai')) }}<br/>
@include('components.input', ['name' => 'rrai', 'value' => $country_param['rrai'] ?? null]) @include('components.form.input', ['name' => 'rrai', 'value' => $country_param['rrai'] ?? null])
</div> </div>
<div class="col-md-3"> <div class="col-md-3">
{{ Form::label('name', __('color')) }}<br/> {{ Form::label('name', __('color')) }}<br/>
@include('components.select', ['name' => 'index', 'list' => App\Repositories\DueDiligence\CountryParams::getRiskColors(), 'value' => $country_param['index'] ?? null, 'with_empty' => '']) @include('components.form.select', ['name' => 'index', 'list' => App\Repositories\DueDiligence\CountryParams::getRiskColors(), 'value' => $country_param['index'] ?? null, 'with_empty' => ''])
</div> </div>
<div class="col-md-3"> <div class="col-md-3">
{{ Form::label('name', __('broken_arrows')) }}<br/> {{ Form::label('name', __('broken_arrows')) }}<br/>
@include('components.input', ['name' => 'broken', 'value' => $country_param['broken'] ?? null]) @include('components.form.input', ['name' => 'broken', 'value' => $country_param['broken'] ?? null])
</div> </div>
</div> </div>

View File

@@ -1,14 +1,14 @@
<div class="row mb-3"> <div class="row mb-3">
<div class="col-6"> <div class="col-6">
<label for="name">{{ __('module') }}</label> <label for="name">{{ __('module') }}</label>
@include('components.select', ['name' => 'application_module_id', 'value' => $permission['application_module_id'] ?? null, 'list' => $application_modules ?? null]) @include('components.form.select', ['name' => 'application_module_id', 'value' => $permission['application_module_id'] ?? null, 'list' => $application_modules ?? null])
</div> </div>
</div> </div>
<div class="row mb-3"> <div class="row mb-3">
<div class="col-6"> <div class="col-6">
<label for="name">{{ __('name') }}</label> <label for="name">{{ __('name') }}</label>
@include('components.input', ['name' => 'name', 'value' => $permission['name'] ?? null]) @include('components.form.input', ['name' => 'name', 'value' => $permission['name'] ?? null])
</div> </div>
</div> </div>

View File

@@ -4,19 +4,19 @@
<div class="row mb-3"> <div class="row mb-3">
<div class="col-12 col-md-6"> <div class="col-12 col-md-6">
<label for="last_name">{{ __('name') }} <sup>*</sup></label> <label for="last_name">{{ __('name') }} <sup>*</sup></label>
@include('components.input', ['name' => 'last_name', 'value' => $user['last_name'] ?? '']) @include('components.form.input', ['name' => 'last_name', 'value' => $user['last_name'] ?? ''])
</div> </div>
<div class="col-12 col-md-6"> <div class="col-12 col-md-6">
<label for="first_name">{{ __('firstname') }} <sup>*</sup></label> <label for="first_name">{{ __('firstname') }} <sup>*</sup></label>
@include('components.input', ['name' => 'first_name', 'value' => $user['first_name'] ?? '']) @include('components.form.input', ['name' => 'first_name', 'value' => $user['first_name'] ?? ''])
</div> </div>
</div> </div>
<div class="row mb-3"> <div class="row mb-3">
<div class="col-12 col-md-6"> <div class="col-12 col-md-6">
<label for="username">{{ __('login') }} <sup>*</sup></label> <label for="username">{{ __('login') }} <sup>*</sup></label>
@include('components.input', ['name' => 'username', 'value' => $user['username'] ?? '']) @include('components.form.input', ['name' => 'username', 'value' => $user['username'] ?? ''])
</div> </div>
<div class="col-12 col-md-6"> <div class="col-12 col-md-6">
<label for="password">{{ __('password') }} <sup>*</sup></label> <label for="password">{{ __('password') }} <sup>*</sup></label>
@@ -27,27 +27,27 @@
<div class="row mb-3"> <div class="row mb-3">
<div class="col-12 col-md-6 col-lg-4"> <div class="col-12 col-md-6 col-lg-4">
<label for="email">{{ __('email') }} <sup>*</sup></label> <label for="email">{{ __('email') }} <sup>*</sup></label>
@include('components.input', ['name' => 'email', 'value' => $user['email'] ?? null]) @include('components.form.input', ['name' => 'email', 'value' => $user['email'] ?? null])
</div> </div>
<div class="col-12 col-md-6 col-lg-4"> <div class="col-12 col-md-6 col-lg-4">
<label for="phone">{{ __('phone') }}</label> <label for="phone">{{ __('phone') }}</label>
@include('components.input', ['name' => 'phone', 'value' => $user['phone'] ?? null]) @include('components.form.input', ['name' => 'phone', 'value' => $user['phone'] ?? null])
</div> </div>
</div> </div>
<div class="row mb-3"> <div class="row mb-3">
<div class="col-12 col-md-6 col-lg-4"> <div class="col-12 col-md-6 col-lg-4">
<label for="third_party_id">{{ __('entity') }} <sup>*</sup></label> <label for="third_party_id">{{ __('entity') }} <sup>*</sup></label>
@include('components.select', ['name' => 'third_party_id', 'list' => $third_parties ?? null, 'value' => $third_party_id ?? null, 'with_empty' => true ]) @include('components.form.select', ['name' => 'third_party_id', 'list' => $third_parties ?? null, 'value' => $third_party_id ?? null, 'with_empty' => true ])
</div> </div>
<div class="col-12 col-md-6 col-lg-4"> <div class="col-12 col-md-6 col-lg-4">
<label for="team">{{ __('team') }} <sup>*</sup></label> <label for="team">{{ __('team') }} <sup>*</sup></label>
@include('components.select', ['name' => 'team_id', 'list' => $teams ?? null, 'value' => $team_id ?? null, 'with_empty' => true ]) @include('components.form.select', ['name' => 'team_id', 'list' => $teams ?? null, 'value' => $team_id ?? null, 'with_empty' => true ])
</div> </div>
<div class="col-12 col-md-6 col-lg-4"> <div class="col-12 col-md-6 col-lg-4">
<label for="status">{{ __('status') }} <sup>*</sup></label> <label for="status">{{ __('status') }} <sup>*</sup></label>
@include('components.select', ['name' => 'status_id', 'list' => $statuses ?? null, 'value' => $status_id ?? null, 'with_empty' => true ]) @include('components.form.select', ['name' => 'status_id', 'list' => $statuses ?? null, 'value' => $status_id ?? null, 'with_empty' => true ])
</div> </div>
</div> </div>

View File

@@ -4,19 +4,19 @@
<div class="row mb-3"> <div class="row mb-3">
<div class="col-12 col-md-6"> <div class="col-12 col-md-6">
<label for="last_name">{{ __('name') }} <sup>*</sup></label> <label for="last_name">{{ __('name') }} <sup>*</sup></label>
@include('components.input', ['name' => 'last_name', 'value' => $user['last_name'] ?? '']) @include('components.form.input', ['name' => 'last_name', 'value' => $user['last_name'] ?? ''])
</div> </div>
<div class="col-12 col-md-6"> <div class="col-12 col-md-6">
<label for="first_name">{{ __('firstname') }} <sup>*</sup></label> <label for="first_name">{{ __('firstname') }} <sup>*</sup></label>
@include('components.input', ['name' => 'first_name', 'value' => $user['first_name'] ?? '']) @include('components.form.input', ['name' => 'first_name', 'value' => $user['first_name'] ?? ''])
</div> </div>
</div> </div>
<div class="row mb-3"> <div class="row mb-3">
<div class="col-12 col-md-6"> <div class="col-12 col-md-6">
<label for="username">{{ __('login') }} <sup>*</sup></label> <label for="username">{{ __('login') }} <sup>*</sup></label>
@include('components.input', ['name' => 'username', 'value' => $user['username'] ?? '']) @include('components.form.input', ['name' => 'username', 'value' => $user['username'] ?? ''])
</div> </div>
<div class="col-12 col-md-6"> <div class="col-12 col-md-6">
<label for="password">{{ __('password') }} <sup>*</sup></label> <label for="password">{{ __('password') }} <sup>*</sup></label>
@@ -27,27 +27,27 @@
<div class="row mb-3"> <div class="row mb-3">
<div class="col-12 col-md-6 col-lg-4"> <div class="col-12 col-md-6 col-lg-4">
<label for="email">{{ __('email') }} <sup>*</sup></label> <label for="email">{{ __('email') }} <sup>*</sup></label>
@include('components.input', ['name' => 'email', 'value' => $user['email'] ?? null]) @include('components.form.input', ['name' => 'email', 'value' => $user['email'] ?? null])
</div> </div>
<div class="col-12 col-md-6 col-lg-4"> <div class="col-12 col-md-6 col-lg-4">
<label for="phone">{{ __('phone') }}</label> <label for="phone">{{ __('phone') }}</label>
@include('components.input', ['name' => 'phone', 'value' => $user['phone'] ?? null]) @include('components.form.input', ['name' => 'phone', 'value' => $user['phone'] ?? null])
</div> </div>
</div> </div>
<div class="row mb-3"> <div class="row mb-3">
<div class="col-12 col-md-6 col-lg-4"> <div class="col-12 col-md-6 col-lg-4">
<label for="third_party_id">{{ __('entity') }} <sup>*</sup></label> <label for="third_party_id">{{ __('entity') }} <sup>*</sup></label>
@include('components.select', ['name' => 'third_party_id', 'list' => $third_parties ?? null, 'value' => $third_party_id ?? null, 'with_empty' => true ]) @include('components.form.select', ['name' => 'third_party_id', 'list' => $third_parties ?? null, 'value' => $third_party_id ?? null, 'with_empty' => true ])
</div> </div>
<div class="col-12 col-md-6 col-lg-4"> <div class="col-12 col-md-6 col-lg-4">
<label for="team">{{ __('team') }} <sup>*</sup></label> <label for="team">{{ __('team') }} <sup>*</sup></label>
@include('components.select', ['name' => 'team_id', 'list' => $teams ?? null, 'value' => $team_id ?? null, 'with_empty' => true ]) @include('components.form.select', ['name' => 'team_id', 'list' => $teams ?? null, 'value' => $team_id ?? null, 'with_empty' => true ])
</div> </div>
<div class="col-12 col-md-6 col-lg-4"> <div class="col-12 col-md-6 col-lg-4">
<label for="status">{{ __('status') }} <sup>*</sup></label> <label for="status">{{ __('status') }} <sup>*</sup></label>
@include('components.select', ['name' => 'status_id', 'list' => $statuses ?? null, 'value' => $status_id ?? null, 'with_empty' => true ]) @include('components.form.select', ['name' => 'status_id', 'list' => $statuses ?? null, 'value' => $status_id ?? null, 'with_empty' => true ])
</div> </div>
</div> </div>

View File

@@ -8,19 +8,19 @@
<div class="row mb-3"> <div class="row mb-3">
<div class="col-12 col-md-6"> <div class="col-12 col-md-6">
<label for="last_name">{{ __('name') }} <sup>*</sup></label> <label for="last_name">{{ __('name') }} <sup>*</sup></label>
@include('components.input', ['name' => 'last_name', 'value' => $user['last_name'] ?? '']) @include('components.form.input', ['name' => 'last_name', 'value' => $user['last_name'] ?? ''])
</div> </div>
<div class="col-12 col-md-6"> <div class="col-12 col-md-6">
<label for="first_name">{{ __('firstname') }} <sup>*</sup></label> <label for="first_name">{{ __('firstname') }} <sup>*</sup></label>
@include('components.input', ['name' => 'first_name', 'value' => $user['first_name'] ?? '']) @include('components.form.input', ['name' => 'first_name', 'value' => $user['first_name'] ?? ''])
</div> </div>
</div> </div>
<div class="row mb-3"> <div class="row mb-3">
<div class="col-12 col-md-6"> <div class="col-12 col-md-6">
<label for="username">{{ __('login') }} <sup>*</sup></label> <label for="username">{{ __('login') }} <sup>*</sup></label>
@include('components.input', ['name' => 'username', 'value' => $user['username'] ?? '']) @include('components.form.input', ['name' => 'username', 'value' => $user['username'] ?? ''])
</div> </div>
<div class="col-12 col-md-6"> <div class="col-12 col-md-6">
<label for="password">{{ __('password') }} <sup>*</sup></label> <label for="password">{{ __('password') }} <sup>*</sup></label>
@@ -31,12 +31,12 @@
<div class="row mb-3"> <div class="row mb-3">
<div class="col-12 col-md-6"> <div class="col-12 col-md-6">
<label for="email">{{ __('email') }} <sup>*</sup></label> <label for="email">{{ __('email') }} <sup>*</sup></label>
@include('components.input', ['name' => 'email', 'value' => $user['email'] ?? null]) @include('components.form.input', ['name' => 'email', 'value' => $user['email'] ?? null])
</div> </div>
<div class="col-12 col-md-6"> <div class="col-12 col-md-6">
<label for="phone">{{ __('phone') }}</label> <label for="phone">{{ __('phone') }}</label>
@include('components.input', ['name' => 'phone', 'value' => $user['phone'] ?? null]) @include('components.form.input', ['name' => 'phone', 'value' => $user['phone'] ?? null])
</div> </div>
</div> </div>

View File

@@ -8,19 +8,19 @@
<div class="row mb-3"> <div class="row mb-3">
<div class="col-12 col-md-6"> <div class="col-12 col-md-6">
<label for="last_name">{{ __('name') }} <sup>*</sup></label> <label for="last_name">{{ __('name') }} <sup>*</sup></label>
@include('components.input', ['name' => 'last_name', 'value' => $user['last_name'] ?? '']) @include('components.form.input', ['name' => 'last_name', 'value' => $user['last_name'] ?? ''])
</div> </div>
<div class="col-12 col-md-6"> <div class="col-12 col-md-6">
<label for="first_name">{{ __('firstname') }} <sup>*</sup></label> <label for="first_name">{{ __('firstname') }} <sup>*</sup></label>
@include('components.input', ['name' => 'first_name', 'value' => $user['first_name'] ?? '']) @include('components.form.input', ['name' => 'first_name', 'value' => $user['first_name'] ?? ''])
</div> </div>
</div> </div>
<div class="row mb-3"> <div class="row mb-3">
<div class="col-12 col-md-6"> <div class="col-12 col-md-6">
<label for="username">{{ __('login') }} <sup>*</sup></label> <label for="username">{{ __('login') }} <sup>*</sup></label>
@include('components.input', ['name' => 'username', 'value' => $user['username'] ?? '']) @include('components.form.input', ['name' => 'username', 'value' => $user['username'] ?? ''])
</div> </div>
<div class="col-12 col-md-6"> <div class="col-12 col-md-6">
<label for="password">{{ __('password') }} <sup>*</sup></label> <label for="password">{{ __('password') }} <sup>*</sup></label>
@@ -31,12 +31,12 @@
<div class="row mb-3"> <div class="row mb-3">
<div class="col-12 col-md-6"> <div class="col-12 col-md-6">
<label for="email">{{ __('email') }} <sup>*</sup></label> <label for="email">{{ __('email') }} <sup>*</sup></label>
@include('components.input', ['name' => 'email', 'value' => $user['email'] ?? null]) @include('components.form.input', ['name' => 'email', 'value' => $user['email'] ?? null])
</div> </div>
<div class="col-12 col-md-6"> <div class="col-12 col-md-6">
<label for="phone">{{ __('phone') }}</label> <label for="phone">{{ __('phone') }}</label>
@include('components.input', ['name' => 'phone', 'value' => $user['phone'] ?? null]) @include('components.form.input', ['name' => 'phone', 'value' => $user['phone'] ?? null])
</div> </div>
</div> </div>

View File

@@ -3,10 +3,10 @@
<div class="row"> <div class="row">
<div class="col-md-8"> <div class="col-md-8">
{{ Form::label('name', 'Nom') }} {{ Form::label('name', 'Nom') }}
@include('components.input', ['name' => 'name', 'value' => $article_nature['name'] ?? null, 'required' => true]) @include('components.form.input', ['name' => 'name', 'value' => $article_nature['name'] ?? null, 'required' => true])
{{ Form::label('description', 'Description') }} {{ Form::label('description', 'Description') }}
@include('components.textarea', ['name' => 'description', 'value' => $article_nature['description'] ?? null, 'class' => 'editor', 'required' => false]) @include('components.form.textarea', ['name' => 'description', 'value' => $article_nature['description'] ?? null, 'class' => 'editor', 'required' => false])
</div> </div>
</div> </div>

View File

@@ -5,5 +5,7 @@
]) ])
@section('content') @section('content')
@include('components.datatable', ['route' => route('Admin.Shop.ArticleNatures.index'), 'model' => 'article_natures']) @component('components.card')
@include('components.datatable', ['route' => route('Admin.Shop.ArticleNatures.index'), 'model' => 'article_natures'])
@endcomponent
@endsection @endsection

View File

@@ -7,11 +7,11 @@
@include('load.form.select2') @include('load.form.select2')
@section('content') @section('content')
@include('components.datatable', ['route' => route('Admin.Shop.Articles.index'), 'model' => 'articles', 'with_filters' => true]) @component('components.card')
@include('components.datatable', ['route' => route('Admin.Shop.Articles.index'), 'model' => 'articles', 'with_filters' => true])
@component('components.layout.modal', ['title' => 'Filtres', 'id' => 'modal-articles-filters']) @component('components.layout.modal', ['title' => 'Filtres', 'id' => 'modal-articles-filters'])
@include('Admin.Shop.Articles.partials.filters') @include('Admin.Shop.Articles.partials.filters')
@endcomponent
@endcomponent @endcomponent
@endsection @endsection

View File

@@ -4,40 +4,40 @@
<div class="row mb-3"> <div class="row mb-3">
<div class="col-3"> <div class="col-3">
{{ Form::label('model', 'Familles de produit') }}<br> {{ Form::label('model', 'Familles de produit') }}<br>
@include('components.select', ['name' => 'product_type', 'id_name' => 'product_type', 'list' => $models_options, 'value' => $article['product_type'] ?? null, 'class' => 'select2', 'with_empty' => '']) @include('components.form.select', ['name' => 'product_type', 'id_name' => 'product_type', 'list' => $models_options, 'value' => $article['product_type'] ?? null, 'class' => 'select2', 'with_empty' => ''])
</div> </div>
<div class="col-6"> <div class="col-6">
{{ Form::label('model_id', 'Produit') }}<br> {{ Form::label('model_id', 'Produit') }}<br>
@include('components.select', ['name' => 'product_id', 'id_name' => 'product_id', 'list' => $products ?? [], 'value' => $article['product_id'] ?? null, 'class' => 'select2', 'with_empty' => '']) @include('components.form.select', ['name' => 'product_id', 'id_name' => 'product_id', 'list' => $products ?? [], 'value' => $article['product_id'] ?? null, 'class' => 'select2', 'with_empty' => ''])
</div> </div>
<div class="col-3"> <div class="col-3">
{{ Form::label('ref', 'Référence') }}<br> {{ Form::label('ref', 'Référence') }}<br>
@include('components.input', ['name' => 'ref', 'value' => $article['ref'] ?? null]) @include('components.form.input', ['name' => 'ref', 'value' => $article['ref'] ?? null])
</div> </div>
</div> </div>
<div class="row mb-3"> <div class="row mb-3">
<div class="col-8"> <div class="col-8">
{{ Form::label('name', 'Nom') }}<br> {{ Form::label('name', 'Nom') }}<br>
@include('components.input', ['name' => 'name', 'value' => $article['name'] ?? null, 'required' => true]) @include('components.form.input', ['name' => 'name', 'value' => $article['name'] ?? null, 'required' => true])
</div> </div>
<div class="col-4"> <div class="col-4">
{{ Form::label('article_nature_id', __('shop.article_natures.name')) }}<br> {{ Form::label('article_nature_id', __('shop.article_natures.name')) }}<br>
@include('components.select', ['name' => 'article_nature_id', 'list' => $natures_options, 'value' => $article['article_nature_id'] ?? null, 'class' => 'select2', 'with_empty' => '', 'required' => true]) @include('components.form.select', ['name' => 'article_nature_id', 'list' => $natures_options, 'value' => $article['article_nature_id'] ?? null, 'class' => 'select2', 'with_empty' => '', 'required' => true])
</div> </div>
</div> </div>
<div class="row mb-3"> <div class="row mb-3">
<div class="col-12"> <div class="col-12">
{{ Form::label('categories', __('shop.shelves.title')) }}<br> {{ Form::label('categories', __('shop.shelves.title')) }}<br>
@include('components.select', ['name' => 'categories[]', 'list' => $categories_options, 'values' => $article['categories'] ?? null, 'class' => 'select2', 'multiple' => true]) @include('components.form.select', ['name' => 'categories[]', 'list' => $categories_options, 'values' => $article['categories'] ?? null, 'class' => 'select2', 'multiple' => true])
</div> </div>
</div> </div>
<div class="row mb-3"> <div class="row mb-3">
<div class="col-12"> <div class="col-12">
{{ Form::label('tags', 'Tags') }}<br> {{ Form::label('tags', 'Tags') }}<br>
@include('components.select-tree', ['name' => 'tags[]', 'list' => $tags_list, 'values' => $article['tags'] ?? null, 'class' => 'select2', 'multiple' => true]) @include('components.form.selects.select-tree', ['name' => 'tags[]', 'list' => $tags_list, 'values' => $article['tags'] ?? null, 'class' => 'select2', 'multiple' => true])
</div> </div>
</div> </div>
@@ -50,7 +50,7 @@
<div class="row mb-3"> <div class="row mb-3">
<div class="col-12"> <div class="col-12">
{{ Form::label('description', 'Description') }} {{ Form::label('description', 'Description') }}
@include('components.textarea', ['name' => 'description', 'value' => $article['description'] ?? null, 'class' => 'editor', 'required' => true]) @include('components.form.textarea', ['name' => 'description', 'value' => $article['description'] ?? null, 'class' => 'editor', 'required' => true])
</div> </div>
</div> </div>

View File

@@ -2,7 +2,7 @@
<div class="row"> <div class="row">
<label class="col-4">{{ __('article_natures.title') }}</label> <label class="col-4">{{ __('article_natures.title') }}</label>
<div class="col-8"> <div class="col-8">
@include('components.select', ['name' => 'article_nature_id', 'list' => $article_natures ?? [], 'value' => $filters['article_nature_id'] ?? null, 'class' => 'form-control-sm select2', 'with_empty' => ' ']) @include('components.form.select', ['name' => 'article_nature_id', 'list' => $article_natures ?? [], 'value' => $filters['article_nature_id'] ?? null, 'class' => 'form-control-sm select2', 'with_empty' => ' '])
</div> </div>
</div> </div>
</form> </form>

View File

@@ -5,7 +5,7 @@
<div class="col-12 col-lg-7"> <div class="col-12 col-lg-7">
{{ Form::label('attribute_family_id', 'Attributs') }}<br/> {{ Form::label('attribute_family_id', 'Attributs') }}<br/>
@include('components.select', [ @include('components.form.select', [
'name' => "prices[$key][attribute][attribute_family_id]", 'name' => "prices[$key][attribute][attribute_family_id]",
'value' => $attribute['attribute_value']['article_attribute_family_id'] ?? null, 'value' => $attribute['attribute_value']['article_attribute_family_id'] ?? null,
'list' => $attribute_families_options, 'list' => $attribute_families_options,
@@ -16,7 +16,7 @@
<div class="col-12 col-lg-5"> <div class="col-12 col-lg-5">
{{ Form::label('attribute_value_id', 'Valeur') }}<br/> {{ Form::label('attribute_value_id', 'Valeur') }}<br/>
@include('components.select', [ @include('components.form.select', [
'name' => "prices[$key][attribute][attribute_value_id]", 'name' => "prices[$key][attribute][attribute_value_id]",
'value' => $attribute['article_attribute_value_id'] ?? null, 'value' => $attribute['article_attribute_value_id'] ?? null,
'list' => $attribute_values ?? null, 'list' => $attribute_values ?? null,

View File

@@ -2,7 +2,7 @@
<input type="hidden" name="prices[][attribute][quantity]" value="1"> <input type="hidden" name="prices[][attribute][quantity]" value="1">
<div class="col-12 col-lg-6 1"> <div class="col-12 col-lg-6 1">
{{ Form::label('attribute_family_id', 'Attributs') }}<br/> {{ Form::label('attribute_family_id', 'Attributs') }}<br/>
@include('components.select', [ @include('components.form.select', [
'name' => 'prices[][attribute][attribute_family_id]', 'name' => 'prices[][attribute][attribute_family_id]',
'value' => $attribute_value['article_attribute_family_id'] ?? null, 'value' => $attribute_value['article_attribute_family_id'] ?? null,
'list' => $attribute_families_options, 'list' => $attribute_families_options,
@@ -13,7 +13,7 @@
<div class="col-12 col-lg-6 2"> <div class="col-12 col-lg-6 2">
{{ Form::label('attribute_value_id', 'Valeur') }}<br/> {{ Form::label('attribute_value_id', 'Valeur') }}<br/>
@include('components.select', [ @include('components.form.select', [
'name' => 'prices[][attribute][attribute_value_id]', 'name' => 'prices[][attribute][attribute_value_id]',
'value' => $attribute_value['id'] ?? null, 'value' => $attribute_value['id'] ?? null,
'list' => $attribute_values ?? null, 'list' => $attribute_values ?? null,

View File

@@ -4,7 +4,7 @@
<div class="row mt-3"> <div class="row mt-3">
<div class="col-6"> <div class="col-6">
@include('components.select-tree', ['name' => "article_price_generic_id", 'id_name' => "article_price_generic_id", 'value' => $price['article_price_generic_id'] ?? null, 'list' => $price_generics ?? null, 'required' => false, 'class' => 'form-control-sm w-100']) @include('components.form.selects.select-tree', ['name' => "article_price_generic_id", 'id_name' => "article_price_generic_id", 'value' => $price['article_price_generic_id'] ?? null, 'list' => $price_generics ?? null, 'required' => false, 'class' => 'form-control-sm w-100'])
</div> </div>
<div class="col-6"> <div class="col-6">
<button type="button" class="btn btn-sm btn-primary" id="add-new-generic_price">Associer un tarif générique <i class="fa fa-plus"></i></button> <button type="button" class="btn btn-sm btn-primary" id="add-new-generic_price">Associer un tarif générique <i class="fa fa-plus"></i></button>

View File

@@ -8,12 +8,12 @@
<div class="row"> <div class="row">
<div class="col-lg-1"> <div class="col-lg-1">
{{ Form::label('quantity', 'Qté.') }}<br/> {{ Form::label('quantity', 'Qté.') }}<br/>
@include('components.number', ['name' => "prices[$key][quantity]", 'value' => $price['quantity'] ?? 1, 'required' => true, 'class' => 'form-control-sm']) @include('components.form.inputs.number', ['name' => "prices[$key][quantity]", 'value' => $price['quantity'] ?? 1, 'required' => true, 'class' => 'form-control-sm'])
</div> </div>
<div class="col-lg-3"> <div class="col-lg-3">
{{ Form::label('package_id', 'Type Package') }}<br/> {{ Form::label('package_id', 'Type Package') }}<br/>
@include('components.select', [ @include('components.form.select', [
'name' => "prices[$key][package_id]", 'name' => "prices[$key][package_id]",
'value' => $price['package_id'] ?? null, 'value' => $price['package_id'] ?? null,
'list' => $packages ?? null, 'list' => $packages ?? null,
@@ -24,7 +24,7 @@
<div class="col-lg-1"> <div class="col-lg-1">
{{ Form::label('package_qty', 'Pack Qté') }}<br/> {{ Form::label('package_qty', 'Pack Qté') }}<br/>
@include('components.number', [ @include('components.form.inputs.number', [
'name' => "prices[$key][package_quantity]", 'name' => "prices[$key][package_quantity]",
'value' => $price['package_quantity'] ?? null, 'value' => $price['package_quantity'] ?? null,
'required' => true, 'required' => true,
@@ -34,7 +34,7 @@
<div class="col-lg-3"> <div class="col-lg-3">
{{ Form::label('unity_id', 'Unité') }}<br/> {{ Form::label('unity_id', 'Unité') }}<br/>
@include('components.select', [ @include('components.form.select', [
'name' => "prices[$key][unity_id]", 'name' => "prices[$key][unity_id]",
'value' => $price['unity_id'] ?? null, 'value' => $price['unity_id'] ?? null,
'list' => $unities ?? null, 'list' => $unities ?? null,
@@ -48,17 +48,17 @@
<div class="row"> <div class="row">
<div class="col-4"> <div class="col-4">
{{ Form::label('tax_id', 'TVA') }}<br/> {{ Form::label('tax_id', 'TVA') }}<br/>
@include('components.select', ['name' => "prices[$key][tax_id]", 'value' => $price['tax_id'] ?? null, 'list' => $taxes_options ?? null, 'required' => true, 'class' => 'form-control form-control-sm']) @include('components.form.select', ['name' => "prices[$key][tax_id]", 'value' => $price['tax_id'] ?? null, 'list' => $taxes_options ?? null, 'required' => true, 'class' => 'form-control form-control-sm'])
</div> </div>
<div class="col-4"> <div class="col-4">
{{ Form::label('price', 'Prix HT') }} {{ Form::label('price', 'Prix HT') }}
@include('components.money', ['name' => "prices[$key][price]", 'value' => $price['price'] ?? 0, 'required' => true, 'class' => 'form-control-sm price-item']) @include('components.form.inputs.money', ['name' => "prices[$key][price]", 'value' => $price['price'] ?? 0, 'required' => true, 'class' => 'form-control-sm price-item'])
</div> </div>
<div class="col-4"> <div class="col-4">
{{ Form::label('price_taxed', 'Prix TTC') }} {{ Form::label('price_taxed', 'Prix TTC') }}
@include('components.money', ['name' => "prices[$key][price_taxed]", 'value' => $price['price_taxed'] ?? 0, 'required' => true, 'class' => 'form-control-sm price-taxed-item']) @include('components.form.inputs.money', ['name' => "prices[$key][price_taxed]", 'value' => $price['price_taxed'] ?? 0, 'required' => true, 'class' => 'form-control-sm price-taxed-item'])
</div> </div>
</div> </div>
</div> </div>

View File

@@ -9,12 +9,12 @@
<div class="col-lg-1"> <div class="col-lg-1">
{{ Form::label('quantity', 'Quantité') }}<br/> {{ Form::label('quantity', 'Quantité') }}<br/>
@include('components.number', ['name' => 'prices[0][quantity]', 'value' => $quantity ?? 1, 'required' => true, 'class' => 'form-control-sm']) @include('components.form.inputs.number', ['name' => 'prices[0][quantity]', 'value' => $quantity ?? 1, 'required' => true, 'class' => 'form-control-sm'])
</div> </div>
<div class="col-lg-3"> <div class="col-lg-3">
{{ Form::label('package_id', 'Type Package') }}<br/> {{ Form::label('package_id', 'Type Package') }}<br/>
@include('components.select', [ @include('components.form.select', [
'name' => "prices[0][package_id]", 'name' => "prices[0][package_id]",
'value' => $price['package_id'] ?? null, 'value' => $price['package_id'] ?? null,
'list' => $packages ?? null, 'list' => $packages ?? null,
@@ -25,7 +25,7 @@
<div class="col-lg-1"> <div class="col-lg-1">
{{ Form::label('package_qty', 'Pack Qté') }}<br/> {{ Form::label('package_qty', 'Pack Qté') }}<br/>
@include('components.number', [ @include('components.form.inputs.number', [
'name' => "prices[0][package_quantity]", 'name' => "prices[0][package_quantity]",
'value' => $price['package_quantity'] ?? null, 'value' => $price['package_quantity'] ?? null,
'required' => true, 'required' => true,
@@ -35,7 +35,7 @@
<div class="col-lg-3"> <div class="col-lg-3">
{{ Form::label('unity_id', 'Unité') }}<br/> {{ Form::label('unity_id', 'Unité') }}<br/>
@include('components.select', [ @include('components.form.select', [
'name' => "prices[0][unity_id]", 'name' => "prices[0][unity_id]",
'value' => $price['unity_id'] ?? null, 'value' => $price['unity_id'] ?? null,
'list' => $unities ?? null, 'list' => $unities ?? null,
@@ -50,17 +50,17 @@
<div class="row"> <div class="row">
<div class="col-4"> <div class="col-4">
{{ Form::label('tax_id', 'TVA') }}<br/> {{ Form::label('tax_id', 'TVA') }}<br/>
@include('components.select', ['name' => 'prices[0][tax_id]', 'value' => $tax_id ?? null, 'list' => $taxes_options ?? null, 'required' => true, 'class' => 'form-control form-control-sm']) @include('components.form.select', ['name' => 'prices[0][tax_id]', 'value' => $tax_id ?? null, 'list' => $taxes_options ?? null, 'required' => true, 'class' => 'form-control form-control-sm'])
</div> </div>
<div class="col-4"> <div class="col-4">
{{ Form::label('price', 'Prix HT') }} {{ Form::label('price', 'Prix HT') }}
@include('components.money', ['name' => 'prices[0][price]', 'value' => $price ?? 0, 'required' => true, 'class' => 'form-control-sm price-item']) @include('components.form.inputs.money', ['name' => 'prices[0][price]', 'value' => $price ?? 0, 'required' => true, 'class' => 'form-control-sm price-item'])
</div> </div>
<div class="col-4"> <div class="col-4">
{{ Form::label('price_taxed', 'Prix TTC') }} {{ 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']) @include('components.form.inputs.money', ['name' => 'prices[0][price_taxed]', 'value' => $price_taxed ?? 0, 'required' => true, 'class' => 'form-control-sm price-taxed-item'])
</div> </div>
</div> </div>
</div> </div>

View File

@@ -3,27 +3,27 @@
<div class="row mb-3"> <div class="row mb-3">
<div class="col-6"> <div class="col-6">
{{ Form::label('name', 'Nom') }} {{ Form::label('name', 'Nom') }}
@include('components.input', ['name' => 'name', 'value' => $category['name'] ?? null, 'required' => true]) @include('components.form.input', ['name' => 'name', 'value' => $category['name'] ?? null, 'required' => true])
</div> </div>
<div class="col-5"> <div class="col-5">
{{ Form::label('parent', 'Rubrique parente') }} {{ Form::label('parent', 'Rubrique parente') }}
@include('components.select', ['name' => 'parent_id', 'list' => $categories ?? [], 'value' => $category['category_tree']['parent_id'] ?? null, 'required' => true, 'with_empty' => '']) @include('components.form.select', ['name' => 'parent_id', 'list' => $categories ?? [], 'value' => $category['category_tree']['parent_id'] ?? null, 'required' => true, 'with_empty' => ''])
</div> </div>
<div class="col-1 text-right"> <div class="col-1 text-right">
{{ Form::label('visible', 'Visible') }}<br/> {{ Form::label('visible', 'Visible') }}<br/>
@include('components.toggle', ['name' => 'visible', 'value' => $category['visible'] ?? null]) @include('components.form.toggle', ['name' => 'visible', 'value' => $category['visible'] ?? null])
</div> </div>
</div> </div>
<div class="row mb-3"> <div class="row mb-3">
<div class="col-12"> <div class="col-12">
{{ Form::label('tags', 'Tags') }} {{ Form::label('tags', 'Tags') }}
@include('components.select-tree', ['name' => 'tags[]', 'list' => $tags_list, 'values' => $category['tags'] ?? null, 'class' => 'select2', 'multiple' => true]) @include('components.form.selects.select-tree', ['name' => 'tags[]', 'list' => $tags_list, 'values' => $category['tags'] ?? null, 'class' => 'select2', 'multiple' => true])
</div> </div>
</div> </div>
<div class="row mb-3"> <div class="row mb-3">
<div class="col-12"> <div class="col-12">
{{ Form::label('description', 'Description') }} {{ Form::label('description', 'Description') }}
@include('components.textarea', ['name' => 'description', 'value' => $category['description'] ?? null, 'class' => 'editor', 'required' => true]) @include('components.form.textarea', ['name' => 'description', 'value' => $category['description'] ?? null, 'class' => 'editor', 'required' => true])
</div> </div>
</div> </div>
</div> </div>

View File

@@ -1,28 +1,11 @@
@extends('layout.index', [ @extends('layout.index', [
'title' => __('customers.title'), 'title' => __('shop.customers.title'),
'subtitle' => __('customers.create.title'), 'subtitle' => __('shop.customers.add'),
'breadcrumb' => [__('customers.title'), __('customers.create.title')] 'breadcrumb' => [__('shop.customers.title')]
]) ])
@include('boilerplate::load.fileinput')
@section('content') @section('content')
{{ Form::open(['route' => 'Admin.Shop.Customers.store', 'id' => 'customer-form', 'autocomplete' => 'off']) }} {{ 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') @include('Admin.Shop.Customers.form')
</form> </form>
@endsection @endsection

View File

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

View File

@@ -1,23 +1,39 @@
@include('boilerplate::load.tinymce')
<div class="row"> <div class="row">
<div class="col-md-8"> <div class="col-md-8">
{{ Form::label('name', 'Nom') }} <div class="row mb-3">
@include('components.input', ['name' => 'name', 'value' => (isset($family['name'])) ? $family['name'] : null, 'required' => true]) <div class="col-6">
{{ Form::label('last_name', 'Nom') }}
{{ Form::label('description', 'Description') }} @include('components.form.input', ['name' => 'last_name', 'value' => $customer['last_name'] ?? null, 'required' => true])
@include('components.textarea', ['name' => 'description', 'value' => isset($description) ? $description : null, 'class' => 'editor', 'required' => false]) </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>
</div> </div>
@include('components.save') @include('components.save')
@include('load.form.save')
@include('load.form.select2')
@push('js') @push('js')
<script> <script>
$(function() { $(function() {
$('.editor').tinymce({}); initSelect2();
initSaveForm('#customer-form');
}); });
</script> </script>
@endpush @endpush

View File

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

View File

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

View File

@@ -0,0 +1,57 @@
<div class="row">
<div class="col-xs-12 col-xl-8">
<div class="row mb-3">
<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' => $delivery['sale_channel_id'] ?? null, 'with_empty' => '', 'class' => 'select2'])
</div>
<div class="col-6">
<div class="row">
<div class="col-5">
{{ Form::label('active', __('active')) }}<br/>
@include("components.form.toggle", ['value' => $delivery['active'] ?? false, 'on' => __('active'), 'off' => __('inactive')])
</div>
<div class="col-3">
{{ Form::label('is_public', __('public')) }}
@include('components.form.checkboxes.icheck', ['name' => 'is_public', 'value' => $delivery['is_public'] ?? null])
</div>
<div class="col-4">
{{ Form::label('is_public', __('A domicile')) }}
@include('components.form.checkboxes.icheck', ['name' => 'at_house', 'value' => $delivery['at_house'] ?? null])
</div>
</div>
</div>
</div>
<div class="row mb-3">
<div class="col-12">
{{ Form::label('name', __('name')) }}
@include('components.form.input', ['name' => 'name', 'value' => $delivery['name'] ?? null, 'required' => true])
</div>
</div>
@include('components.address', ['with_country' => false])
<div class="row mb-3">
<div class="col-6">
{{ Form::label('event_date', __('date')) }}
@include('components.form.datepicker', ['name' => 'event_date', 'value' => $delivery['event_date'] ?? null])
</div>
</div>
</div>
</div>
@include('components.save')
@include('load.form.select2')
@include('load.form.save')
@push('js')
<script>
$(function() {
initSelect2();
initDatepicker();
initSaveForm('#delivery-form');
});
</script>
@endpush

View File

@@ -0,0 +1,26 @@
@extends('layout.index', [
'title' => __('shop.deliveries.title'),
'subtitle' => __('shop.deliveries.list'),
'breadcrumb' => [__('shop.deliveries.title')]
])
@section('content')
@component('components.card')
@include('components.datatable', ['route' => route('Admin.Shop.Deliveries.index'), 'model' => 'deliveries', 'callback' => 'handleDelivery();'])
@endcomponent
@endsection
@include('load.form.select2')
@include('load.form.toggle')
@push('js')
<script>
function handleDelivery() {
initToggle("{{ route('Admin.Shop.Deliveries.toggleActive') }}");
}
$(document).ready(function () {
initSelect2();
});
</script>
@endpush

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

@@ -11,7 +11,7 @@
{{ Form::open(['route' => 'Admin.Shop.Invoices.update', 'id' => 'invoice-form', 'autocomplete' => 'off']) }} {{ Form::open(['route' => 'Admin.Shop.Invoices.update', 'id' => 'invoice-form', 'autocomplete' => 'off']) }}
<input type="hidden" name="id" value="{{ $invoice['id'] }}"> <input type="hidden" name="id" value="{{ $invoice['id'] }}">
@include('Admin.Shop.Invoices.form') @include('Admin.Shop.Invoices.form')
@include('components.button-save') @include('components.form.buttons.button-save')
</form> </form>

View File

@@ -4,10 +4,10 @@
<div class="row"> <div class="row">
<div class="col-md-8"> <div class="col-md-8">
{{ Form::label('name', 'Nom') }} {{ Form::label('name', 'Nom') }}
@include('components.input', ['name' => 'name', 'value' => (isset($family['name'])) ? $family['name'] : null, 'required' => true]) @include('components.form.input', ['name' => 'name', 'value' => (isset($family['name'])) ? $family['name'] : null, 'required' => true])
{{ Form::label('description', 'Description') }} {{ Form::label('description', 'Description') }}
@include('components.textarea', ['name' => 'description', 'value' => isset($description) ? $description : null, 'class' => 'editor', 'required' => false]) @include('components.form.textarea', ['name' => 'description', 'value' => isset($description) ? $description : null, 'class' => 'editor', 'required' => false])
</div> </div>
</div> </div>
@@ -15,7 +15,7 @@
<div class="row"> <div class="row">
<div class="col-md-8"> <div class="col-md-8">
<div class="float-right mt-3"> <div class="float-right mt-3">
@include('components.button-save') @include('components.form.buttons.button-save')
</div> </div>
</div> </div>
</div> </div>

View File

@@ -3,21 +3,21 @@
<div class="row mb-3"> <div class="row mb-3">
<div class="col-12"> <div class="col-12">
{{ Form::label('article_id', 'Article') }} {{ Form::label('article_id', 'Article') }}
@include('components.select', ['name' => 'article_id', 'id_name' => 'article_id', 'list' => $articles ?? null, 'value' => $offer['article_id'] ?? null, 'with_empty' => '', 'class' => 'select2 select_article']) @include('components.form.select', ['name' => 'article_id', 'id_name' => 'article_id', 'list' => $articles ?? null, 'value' => $offer['article_id'] ?? null, 'with_empty' => '', 'class' => 'select2 select_article'])
</div> </div>
</div> </div>
<div class="row mb-3"> <div class="row mb-3">
<div class="col-12"> <div class="col-12">
{{ Form::label('variation_id', 'Déclinaison') }} {{ Form::label('variation_id', 'Déclinaison') }}
@include('components.select', ['name' => 'variation_id', 'id_name' => 'variation_id', 'list' => $variations ?? null, 'value' => $offer['variation_id'] ?? null, 'with_empty' => '', 'class' => 'select2 select_variation']) @include('components.form.select', ['name' => 'variation_id', 'id_name' => 'variation_id', 'list' => $variations ?? null, 'value' => $offer['variation_id'] ?? null, 'with_empty' => '', 'class' => 'select2 select_variation'])
</div> </div>
</div> </div>
<div class="row mb-3"> <div class="row mb-3">
<div class="col-12"> <div class="col-12">
{{ Form::label('tariff_id', 'Tarif') }} {{ Form::label('tariff_id', 'Tarif') }}
@include('components.select', ['name' => 'tariff_id', 'id_name' => 'tariff_id', 'list' => $tariffs ?? null, 'value' => $offer['tariff_id'] ?? null, 'with_empty' => '', 'class' => 'select2 select_tariffs']) @include('components.form.select', ['name' => 'tariff_id', 'id_name' => 'tariff_id', 'list' => $tariffs ?? null, 'value' => $offer['tariff_id'] ?? null, 'with_empty' => '', 'class' => 'select2 select_tariffs'])
</div> </div>
</div> </div>
@@ -25,27 +25,27 @@
<div class="row mb-3"> <div class="row mb-3">
<div class="col-12 col-xl-6"> <div class="col-12 col-xl-6">
{{ Form::label('stock_current', 'Appro immédiate') }} {{ Form::label('stock_current', 'Appro immédiate') }}
@include('components.money', ['name' => 'stock_current', 'value' => $offer['stock_current'] ?? 0]) @include('components.form.inputs.money', ['name' => 'stock_current', 'value' => $offer['stock_current'] ?? 0])
</div> </div>
</div> </div>
<div class="row mb-3"> <div class="row mb-3">
<div class="col-6"> <div class="col-6">
{{ Form::label('stock_delayed', 'Appro sur delai') }} {{ Form::label('stock_delayed', 'Appro sur delai') }}
@include('components.money', ['name' => 'stock_delayed', 'value' => $offer['stock_delayed'] ?? 0]) @include('components.form.inputs.money', ['name' => 'stock_delayed', 'value' => $offer['stock_delayed'] ?? 0])
</div> </div>
<div class="col-6"> <div class="col-6">
{{ Form::label('delay_type', 'Délai type') }} {{ Form::label('delay_type', 'Délai type') }}
@include('components.input', ['name' => 'delay_type', 'value' => $offer['delay_type'] ?? null]) @include('components.form.input', ['name' => 'delay_type', 'value' => $offer['delay_type'] ?? null])
</div> </div>
</div> </div>
<div class="row mb-3"> <div class="row mb-3">
<div class="col-6"> <div class="col-6">
{{ Form::label('stock_ondemand', 'Appro sur demande') }} {{ Form::label('stock_ondemand', 'Appro sur demande') }}
@include('components.toggle', ['name' => 'stock_ondemand', 'value' => $offer['stock_ondemand'] ?? 0]) @include('components.form.toggle', ['name' => 'stock_ondemand', 'value' => $offer['stock_ondemand'] ?? 0])
</div> </div>
<div class="col-6"> <div class="col-6">
{{ Form::label('minimum_ondemand', 'Minimum de quantité') }} {{ Form::label('minimum_ondemand', 'Minimum de quantité') }}
@include('components.money', ['name' => 'minimum_ondemand', 'value' => $offer['minimum_ondemand'] ?? 0]) @include('components.form.inputs.money', ['name' => 'minimum_ondemand', 'value' => $offer['minimum_ondemand'] ?? 0])
</div> </div>
</div> </div>
@endcomponent @endcomponent

View File

@@ -5,5 +5,7 @@
]) ])
@section('content') @section('content')
@include('components.datatable', ['route' => route('Admin.Shop.Offers.index'), 'model' => 'offers']) @component('components.card')
@include('components.datatable', ['route' => route('Admin.Shop.Offers.index'), 'model' => 'offers'])
@endcomponent
@endsection @endsection

View File

@@ -17,7 +17,7 @@
</a> </a>
<span class="btn-group pull-right"> <span class="btn-group pull-right">
@include('components.button-save') @include('components.form.buttons.button-save')
</span> </span>
</div> </div>
</div> </div>

View File

@@ -17,7 +17,7 @@
</a> </a>
<span class="btn-group pull-right"> <span class="btn-group pull-right">
@include('components.button-save') @include('components.form.buttons.button-save')
</span> </span>
</div> </div>
</div> </div>

View File

@@ -4,10 +4,10 @@
<div class="row"> <div class="row">
<div class="col-md-8"> <div class="col-md-8">
{{ Form::label('name', 'Nom') }} {{ Form::label('name', 'Nom') }}
@include('components.input', ['name' => 'name', 'value' => (isset($family['name'])) ? $family['name'] : null, 'required' => true]) @include('components.form.input', ['name' => 'name', 'value' => (isset($family['name'])) ? $family['name'] : null, 'required' => true])
{{ Form::label('description', 'Description') }} {{ Form::label('description', 'Description') }}
@include('components.textarea', ['name' => 'description', 'value' => isset($description) ? $description : null, 'class' => 'editor', 'required' => false]) @include('components.form.textarea', ['name' => 'description', 'value' => isset($description) ? $description : null, 'class' => 'editor', 'required' => false])
</div> </div>
</div> </div>
@@ -15,7 +15,7 @@
<div class="row"> <div class="row">
<div class="col-md-8"> <div class="col-md-8">
<div class="float-right mt-3"> <div class="float-right mt-3">
@include('components.button-save') @include('components.form.buttons.button-save')
</div> </div>
</div> </div>
</div> </div>

View File

@@ -1,7 +1,7 @@
<div class="row"> <div class="row">
<div class="col-md-8"> <div class="col-md-8">
{{ Form::label('name', 'Valeur') }} {{ Form::label('name', 'Valeur') }}
@include('components.input', ['name' => 'value', 'value' => $package['value'] ?? null, 'required' => true]) @include('components.form.input', ['name' => 'value', 'value' => $package['value'] ?? null, 'required' => true])
</div> </div>
</div> </div>

View File

@@ -2,7 +2,7 @@
<div class="row"> <div class="row">
<label class="col-4">Familles d'attributs</label> <label class="col-4">Familles d'attributs</label>
<div class="col-8"> <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' => ' ']) @include('components.form.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>
</div> </div>

View File

@@ -1,14 +1,14 @@
<div class="row"> <div class="row">
<div class="col-md-6"> <div class="col-md-6">
{{ Form::label('name', 'Catégorie') }} {{ Form::label('name', 'Catégorie') }}
@include('components.select', ['name' => 'category_id', 'list' => $categories, 'value' => $generic['category_id'] ?? null, 'required' => true]) @include('components.form.select', ['name' => 'category_id', 'list' => $categories, 'value' => $generic['category_id'] ?? null, 'required' => true])
</div> </div>
</div> </div>
<div class="row mb-3"> <div class="row mb-3">
<div class="col-md-6"> <div class="col-md-6">
{{ Form::label('name', 'Nom') }} {{ Form::label('name', 'Nom') }}
@include('components.input', ['name' => 'name', 'value' => $generic['name'] ?? null, 'required' => true]) @include('components.form.input', ['name' => 'name', 'value' => $generic['name'] ?? null, 'required' => true])
</div> </div>
</div> </div>

View File

@@ -9,12 +9,12 @@
<div class="col-1"> <div class="col-1">
{{ Form::label('quantity', 'Qté.') }}<br/> {{ Form::label('quantity', 'Qté.') }}<br/>
@include('components.number', ['name' => "prices[$key][quantity]", 'value' => $price['quantity'] ?? 1, 'required' => true, 'class' => 'form-control-sm']) @include('components.form.inputs.number', ['name' => "prices[$key][quantity]", 'value' => $price['quantity'] ?? 1, 'required' => true, 'class' => 'form-control-sm'])
</div> </div>
<div class="col-lg-3"> <div class="col-lg-3">
{{ Form::label('package_id', 'Type Package') }}<br/> {{ Form::label('package_id', 'Type Package') }}<br/>
@include('components.select', [ @include('components.form.select', [
'name' => "prices[$key][package_id]", 'name' => "prices[$key][package_id]",
'value' => $price['package_id'] ?? null, 'value' => $price['package_id'] ?? null,
'list' => $packages ?? null, 'list' => $packages ?? null,
@@ -25,7 +25,7 @@
<div class="col-lg-1"> <div class="col-lg-1">
{{ Form::label('package_qty', 'Pack Qté') }}<br/> {{ Form::label('package_qty', 'Pack Qté') }}<br/>
@include('components.number', [ @include('components.form.inputs.number', [
'name' => "prices[$key][package_quantity]", 'name' => "prices[$key][package_quantity]",
'value' => $price['package_quantity'] ?? null, 'value' => $price['package_quantity'] ?? null,
'required' => true, 'required' => true,
@@ -35,7 +35,7 @@
<div class="col-lg-3"> <div class="col-lg-3">
{{ Form::label('unity_id', 'Unité') }}<br/> {{ Form::label('unity_id', 'Unité') }}<br/>
@include('components.select', [ @include('components.form.select', [
'name' => "prices[$key][unity_id]", 'name' => "prices[$key][unity_id]",
'value' => $price['unity_id'] ?? null, 'value' => $price['unity_id'] ?? null,
'list' => $unities ?? null, 'list' => $unities ?? null,
@@ -49,17 +49,17 @@
<div class="row"> <div class="row">
<div class="col-4"> <div class="col-4">
{{ Form::label('tax_id', 'TVA') }}<br/> {{ Form::label('tax_id', 'TVA') }}<br/>
@include('components.select', ['name' => "prices[$key][tax_id]", 'value' => $price['tax_id'] ?? null, 'list' => $taxes_options ?? null, 'required' => true, 'class' => 'form-control form-control-sm']) @include('components.form.select', ['name' => "prices[$key][tax_id]", 'value' => $price['tax_id'] ?? null, 'list' => $taxes_options ?? null, 'required' => true, 'class' => 'form-control form-control-sm'])
</div> </div>
<div class="col-4"> <div class="col-4">
{{ Form::label('price', 'Prix HT') }} {{ Form::label('price', 'Prix HT') }}
@include('components.money', ['name' => "prices[$key][price]", 'value' => $price['price'] ?? 0, 'required' => true, 'class' => 'form-control-sm price-item']) @include('components.form.inputs.money', ['name' => "prices[$key][price]", 'value' => $price['price'] ?? 0, 'required' => true, 'class' => 'form-control-sm price-item'])
</div> </div>
<div class="col-4"> <div class="col-4">
{{ Form::label('price_taxed', 'Prix TTC') }} {{ Form::label('price_taxed', 'Prix TTC') }}
@include('components.money', ['name' => "prices[$key][price_taxed]", 'value' => $price['price_taxed'] ?? 0, 'required' => true, 'class' => 'form-control-sm price-taxed-item']) @include('components.form.inputs.money', ['name' => "prices[$key][price_taxed]", 'value' => $price['price_taxed'] ?? 0, 'required' => true, 'class' => 'form-control-sm price-taxed-item'])
</div> </div>
</div> </div>
</div> </div>

View File

@@ -9,17 +9,17 @@
<div class="col-1"> <div class="col-1">
{{ Form::label('quantity', 'Quantité') }}<br/> {{ Form::label('quantity', 'Quantité') }}<br/>
@include('components.number', ['name' => 'prices[0][quantity]', 'value' => $quantity ?? 1, 'required' => true, 'class' => 'form-control-sm']) @include('components.form.inputs.number', ['name' => 'prices[0][quantity]', 'value' => $quantity ?? 1, 'required' => true, 'class' => 'form-control-sm'])
</div> </div>
<div class="col-3"> <div class="col-3">
{{ Form::label('package_id', 'Unité') }}<br/> {{ 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']) @include('components.form.select', ['name' => 'prices[0][package_id]', 'value' => $package_id ?? null, 'list' => $packages ?? null, 'required' => true, 'class' => 'select2 form-control-sm w-100'])
</div> </div>
<div class="col-lg-1"> <div class="col-lg-1">
{{ Form::label('package_qty', 'Pack Qté') }}<br/> {{ Form::label('package_qty', 'Pack Qté') }}<br/>
@include('components.number', [ @include('components.form.inputs.number', [
'name' => "prices[0][package_quantity]", 'name' => "prices[0][package_quantity]",
'value' => $price['package_quantity'] ?? null, 'value' => $price['package_quantity'] ?? null,
'required' => true, 'required' => true,
@@ -29,7 +29,7 @@
<div class="col-lg-3"> <div class="col-lg-3">
{{ Form::label('unity_id', 'Unité') }}<br/> {{ Form::label('unity_id', 'Unité') }}<br/>
@include('components.select', [ @include('components.form.select', [
'name' => "prices[0][unity_id]", 'name' => "prices[0][unity_id]",
'value' => $price['unity_id'] ?? null, 'value' => $price['unity_id'] ?? null,
'list' => $unities ?? null, 'list' => $unities ?? null,
@@ -43,17 +43,17 @@
<div class="row"> <div class="row">
<div class="col-4"> <div class="col-4">
{{ Form::label('tax_id', 'TVA') }}<br/> {{ 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']) @include('components.form.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>
<div class="col-4"> <div class="col-4">
{{ Form::label('price', 'Prix HT') }} {{ Form::label('price', 'Prix HT') }}
@include('components.money', ['name' => "prices[0][price]", 'value' => $price['price'] ?? 0, 'required' => true, 'class' => 'form-control-sm price-item']) @include('components.form.inputs.money', ['name' => "prices[0][price]", 'value' => $price['price'] ?? 0, 'required' => true, 'class' => 'form-control-sm price-item'])
</div> </div>
<div class="col-4"> <div class="col-4">
{{ Form::label('price_taxed', 'Prix TTC') }} {{ 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']) @include('components.form.inputs.money', ['name' => "prices[0][price_taxed]", 'value' => $price['price_taxed'] ?? 0, 'required' => true, 'class' => 'form-control-sm price-taxed-item'])
</div> </div>
</div> </div>
</div> </div>

View File

@@ -2,7 +2,7 @@
<div class="row"> <div class="row">
<label class="col-4">Catégories</label> <label class="col-4">Catégories</label>
<div class="col-8"> <div class="col-8">
@include('components.select', ['name' => 'category_id', 'list' => (isset($categories)) ? $categories : [], 'value' => (isset($filters['category_id'])) ? $filters['category_id'] : null, 'class' => 'form-control-sm select2', 'with_empty' => ' ']) @include('components.form.select', ['name' => 'category_id', 'list' => (isset($categories)) ? $categories : [], 'value' => (isset($filters['category_id'])) ? $filters['category_id'] : null, 'class' => 'form-control-sm select2', 'with_empty' => ' '])
</div> </div>
</div> </div>
</form> </form>

View File

@@ -1,18 +1,18 @@
<tr> <tr>
<input type="hidden" name="price_list_values[{{ $index }}][id]" value="{{ $price_list_value['id'] ?? null }}"> <input type="hidden" name="price_list_values[{{ $index }}][id]" value="{{ $price_list_value['id'] ?? null }}">
<td> <td>
@include('components.input', ['name' => 'price_list_values[' . $index . '][code]', 'value' => $price_list_value['code'] ?? null, 'required' => true]) @include('components.form.input', ['name' => 'price_list_values[' . $index . '][code]', 'value' => $price_list_value['code'] ?? null, 'required' => true])
</td> </td>
<td> <td>
@include('components.number', ['name' => 'price_list_values[' . $index . '][quantity]', 'value' => $price_list_value['quantity'] ?? null, 'required' => true, 'meta' => "step = '.01'"]) @include('components.form.inputs.number', ['name' => 'price_list_values[' . $index . '][quantity]', 'value' => $price_list_value['quantity'] ?? null, 'required' => true, 'meta' => "step = '.01'"])
</td> </td>
<td> <td>
@include('components.money', ['name' => 'price_list_values[' . $index . '][price]', 'value' => $price_list_value['price'] ?? null, 'required' => true, 'class' => 'price']) @include('components.form.inputs.money', ['name' => 'price_list_values[' . $index . '][price]', 'value' => $price_list_value['price'] ?? null, 'required' => true, 'class' => 'price'])
</td> </td>
<td> <td>
@include('components.select', ['name' => 'price_list_values[' . $index . '][tax_id]', 'list' => $taxes ?? [], 'value' => $price_list_value['tax_id'] ?? null, 'required' => true, 'class' => 'tax']) @include('components.form.select', ['name' => 'price_list_values[' . $index . '][tax_id]', 'list' => $taxes ?? [], 'value' => $price_list_value['tax_id'] ?? null, 'required' => true, 'class' => 'tax'])
</td> </td>
<td> <td>
@include('components.money', ['name' => 'price_list_values[' . $index . '][price_taxed]', 'value' => $price_list_value['price_taxed'] ?? null, 'required' => true, 'class' => 'price_taxed']) @include('components.form.inputs.money', ['name' => 'price_list_values[' . $index . '][price_taxed]', 'value' => $price_list_value['price_taxed'] ?? null, 'required' => true, 'class' => 'price_taxed'])
</td> </td>
</tr> </tr>

View File

@@ -1,14 +1,14 @@
<div class="row"> <div class="row">
<div class="col-md-6"> <div class="col-md-6">
{{ Form::label('name', 'Catégorie') }} {{ Form::label('name', 'Catégorie') }}
@include('components.select', ['name' => 'category_id', 'list' => $categories ?? [], 'value' => $generic['category_id'] ?? null, 'required' => true]) @include('components.form.select', ['name' => 'category_id', 'list' => $categories ?? [], 'value' => $generic['category_id'] ?? null, 'required' => true])
</div> </div>
</div> </div>
<div class="row mb-3"> <div class="row mb-3">
<div class="col-md-6"> <div class="col-md-6">
{{ Form::label('name', 'Nom') }} {{ Form::label('name', 'Nom') }}
@include('components.input', ['name' => 'name', 'value' => $price_list['name'] ?? null, 'required' => true]) @include('components.form.input', ['name' => 'name', 'value' => $price_list['name'] ?? null, 'required' => true])
</div> </div>
</div> </div>

View File

@@ -6,18 +6,18 @@
<div class="row mb-3"> <div class="row mb-3">
<div class="col-8"> <div class="col-8">
{{ Form::label('name', 'Nom') }} {{ Form::label('name', 'Nom') }}
@include('components.input', ['name' => 'name', 'value' => $price_list['name'] ?? null, 'required' => true]) @include('components.form.input', ['name' => 'name', 'value' => $price_list['name'] ?? null, 'required' => true])
</div> </div>
<div class="col-4"> <div class="col-4">
{{ Form::label('status_id', 'Etat') }} {{ Form::label('status_id', 'Etat') }}
@include('components.select', ['name' => 'status_id', 'list' => $statuses ?? [], 'value' => $price_list['status_id'] ?? null, 'required' => true]) @include('components.form.select', ['name' => 'status_id', 'list' => $statuses ?? [], 'value' => $price_list['status_id'] ?? null, 'required' => true])
</div> </div>
</div> </div>
<div class="row mb-3"> <div class="row mb-3">
<div class="col-6"> <div class="col-6">
{{ Form::label('sale_channel_id', 'Canal de vente') }} {{ Form::label('sale_channel_id', 'Canal de vente') }}
@include('components.select', ['name' => 'sale_channel_id', 'list' => $sale_channels ?? [], 'value' => $price_list['sale_channel_id'] ?? null, 'required' => true, 'with_empty' => '']) @include('components.form.select', ['name' => 'sale_channel_id', 'list' => $sale_channels ?? [], 'value' => $price_list['sale_channel_id'] ?? null, 'required' => true, 'with_empty' => ''])
</div> </div>
</div> </div>

View File

@@ -9,12 +9,12 @@
<div class="col-1"> <div class="col-1">
{{ Form::label('quantity', 'Qté.') }}<br/> {{ Form::label('quantity', 'Qté.') }}<br/>
@include('components.number', ['name' => "prices[$key][quantity]", 'value' => $price['quantity'] ?? 1, 'required' => true, 'class' => 'form-control-sm']) @include('components.form.inputs.number', ['name' => "prices[$key][quantity]", 'value' => $price['quantity'] ?? 1, 'required' => true, 'class' => 'form-control-sm'])
</div> </div>
<div class="col-lg-3"> <div class="col-lg-3">
{{ Form::label('package_id', 'Type Package') }}<br/> {{ Form::label('package_id', 'Type Package') }}<br/>
@include('components.select', [ @include('components.form.select', [
'name' => "prices[$key][package_id]", 'name' => "prices[$key][package_id]",
'value' => $price['package_id'] ?? null, 'value' => $price['package_id'] ?? null,
'list' => $packages ?? null, 'list' => $packages ?? null,
@@ -25,7 +25,7 @@
<div class="col-lg-1"> <div class="col-lg-1">
{{ Form::label('package_qty', 'Pack Qté') }}<br/> {{ Form::label('package_qty', 'Pack Qté') }}<br/>
@include('components.number', [ @include('components.form.inputs.number', [
'name' => "prices[$key][package_quantity]", 'name' => "prices[$key][package_quantity]",
'value' => $price['package_quantity'] ?? null, 'value' => $price['package_quantity'] ?? null,
'required' => true, 'required' => true,
@@ -35,7 +35,7 @@
<div class="col-lg-3"> <div class="col-lg-3">
{{ Form::label('unity_id', 'Unité') }}<br/> {{ Form::label('unity_id', 'Unité') }}<br/>
@include('components.select', [ @include('components.form.select', [
'name' => "prices[$key][unity_id]", 'name' => "prices[$key][unity_id]",
'value' => $price['unity_id'] ?? null, 'value' => $price['unity_id'] ?? null,
'list' => $unities ?? null, 'list' => $unities ?? null,
@@ -49,17 +49,17 @@
<div class="row"> <div class="row">
<div class="col-4"> <div class="col-4">
{{ Form::label('tax_id', 'TVA') }}<br/> {{ Form::label('tax_id', 'TVA') }}<br/>
@include('components.select', ['name' => "prices[$key][tax_id]", 'value' => $price['tax_id'] ?? null, 'list' => $taxes_options ?? null, 'required' => true, 'class' => 'form-control form-control-sm']) @include('components.form.select', ['name' => "prices[$key][tax_id]", 'value' => $price['tax_id'] ?? null, 'list' => $taxes_options ?? null, 'required' => true, 'class' => 'form-control form-control-sm'])
</div> </div>
<div class="col-4"> <div class="col-4">
{{ Form::label('price', 'Prix HT') }} {{ Form::label('price', 'Prix HT') }}
@include('components.money', ['name' => "prices[$key][price]", 'value' => $price['price'] ?? 0, 'required' => true, 'class' => 'form-control-sm price-item']) @include('components.form.inputs.money', ['name' => "prices[$key][price]", 'value' => $price['price'] ?? 0, 'required' => true, 'class' => 'form-control-sm price-item'])
</div> </div>
<div class="col-4"> <div class="col-4">
{{ Form::label('price_taxed', 'Prix TTC') }} {{ Form::label('price_taxed', 'Prix TTC') }}
@include('components.money', ['name' => "prices[$key][price_taxed]", 'value' => $price['price_taxed'] ?? 0, 'required' => true, 'class' => 'form-control-sm price-taxed-item']) @include('components.form.inputs.money', ['name' => "prices[$key][price_taxed]", 'value' => $price['price_taxed'] ?? 0, 'required' => true, 'class' => 'form-control-sm price-taxed-item'])
</div> </div>
</div> </div>
</div> </div>

View File

@@ -9,29 +9,29 @@
<div class="col-2"> <div class="col-2">
{{ Form::label('code', 'Code') }}<br/> {{ Form::label('code', 'Code') }}<br/>
@include('components.input', ['name' => 'prices[0][code]', 'value' => $code ?? '', 'required' => true, 'class' => 'form-control-sm']) @include('components.form.input', ['name' => 'prices[0][code]', 'value' => $code ?? '', 'required' => true, 'class' => 'form-control-sm'])
</div> </div>
<div class="col-1"> <div class="col-1">
{{ Form::label('quantity', 'Seuil') }}<br/> {{ Form::label('quantity', 'Seuil') }}<br/>
@include('components.number', ['name' => 'prices[0][quantity]', 'value' => $quantity ?? 1, 'required' => true, 'class' => 'form-control-sm']) @include('components.form.inputs.number', ['name' => 'prices[0][quantity]', 'value' => $quantity ?? 1, 'required' => true, 'class' => 'form-control-sm'])
</div> </div>
<div class="col-3"> <div class="col-3">
<div class="row"> <div class="row">
<div class="col-4"> <div class="col-4">
{{ Form::label('tax_id', 'TVA') }}<br/> {{ 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']) @include('components.form.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>
<div class="col-4"> <div class="col-4">
{{ Form::label('price', 'Prix HT') }} {{ Form::label('price', 'Prix HT') }}
@include('components.money', ['name' => "prices[0][price]", 'value' => $price['price'] ?? 0, 'required' => true, 'class' => 'form-control-sm price-item']) @include('components.form.inputs.money', ['name' => "prices[0][price]", 'value' => $price['price'] ?? 0, 'required' => true, 'class' => 'form-control-sm price-item'])
</div> </div>
<div class="col-4"> <div class="col-4">
{{ Form::label('price_taxed', 'Prix TTC') }} {{ 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']) @include('components.form.inputs.money', ['name' => "prices[0][price_taxed]", 'value' => $price['price_taxed'] ?? 0, 'required' => true, 'class' => 'form-control-sm price-taxed-item'])
</div> </div>
</div> </div>
</div> </div>

View File

@@ -1,7 +1,7 @@
@extends('layout.index', [ @extends('layout.index', [
'title' => __('sale_channels.title'), 'title' => __('shop.sale_channels.title'),
'subtitle' => __('sale_channels.create.title'), 'subtitle' => __('shop.sale_channels.add'),
'breadcrumb' => [__('sale_channels.title'), __('sale_channels.create.title')] 'breadcrumb' => [__('shop.sale_channels.title'), __('shop.sale_channels.add')]
]) ])
@section('content') @section('content')

View File

@@ -1,15 +1,12 @@
@extends('layout.index', [ @extends('layout.index', [
'title' => __('sale_channels.title'), 'title' => __('shop.sale_channels.title'),
'subtitle' => __('sale_channels.edit'), 'subtitle' => __('shop.sale_channels.edit'),
'breadcrumb' => ['SaleChannel'] 'breadcrumb' => [__('shop.sale_channels.title')]
]) ])
@section('content') @section('content')
{{ Form::open(['route' => 'Admin.Shop.SaleChannels.store', 'id' => 'sale_channels-form', 'autocomplete' => 'off']) }} {{ Form::open(['route' => 'Admin.Shop.SaleChannels.store', 'id' => 'sale_channels-form', 'autocomplete' => 'off']) }}
<input type="hidden" name="id" value="{{ $sale_channel['id'] }}"> <input type="hidden" name="id" value="{{ $sale_channel['id'] }}">
@include('Admin.Shop.SaleChannels.form') @include('Admin.Shop.SaleChannels.form')
</form> </form>
@endsection @endsection

View File

@@ -1,22 +1,34 @@
<div class="row"> <div class="row">
<div class="col-md-8"> <div class="col-md-8">
{{ Form::label('name', 'Nom') }} <div class="row mb-3">
@include('components.input', ['name' => 'name', 'value' => $sale_channel['name'] ?? null, 'required' => true]) <div class="col-8">
{{ Form::label('name', 'Nom') }}
{{ Form::label('description', 'Description') }} @include('components.form.input', ['name' => 'name', 'value' => $sale_channel['name'] ?? null, 'required' => true])
@include('components.textarea', ['name' => 'description', 'value' => $sale_channel['description'] ?? null, 'class' => 'editor', 'required' => false]) </div>
<div class="col-4">
{{ Form::label('name', 'Code abrégé') }}
@include('components.form.input', ['name' => 'code', 'value' => $sale_channel['code'] ?? null, 'required' => true])
</div>
</div>
<div class="row mb-3">
<div class="col-12">
{{ Form::label('description', 'Description') }}
@include('components.form.textarea', ['name' => 'description', 'value' => $sale_channel['description'] ?? null, 'class' => 'editor', 'required' => false])
</div>
</div>
</div> </div>
</div> </div>
@include('components.save') @include('components.save')
@include('load.form.editor') @include('load.form.editor')
@include('load.form.save')
@push('js') @push('js')
<script> <script>
$(function() { $(function() {
initEditor(); initEditor();
initSaveForm('#sale_channels-form');
}); });
</script> </script>
@endpush @endpush

View File

@@ -5,5 +5,7 @@
]) ])
@section('content') @section('content')
@include('components.datatable', ['route' => route('Admin.Shop.SaleChannels.index'), 'model' => 'sale_channels']) @component('components.card')
@include('components.datatable', ['route' => route('Admin.Shop.SaleChannels.index'), 'model' => 'sale_channels'])
@endcomponent
@endsection @endsection

View File

@@ -1,14 +1,14 @@
<div class="row"> <div class="row">
<div class="col-md-6"> <div class="col-md-6">
{{ Form::label('name', 'Famille d\'articles') }} {{ Form::label('name', 'Famille d\'articles') }}
@include('components.select', ['name' => 'article_family_id', 'value' => $article_family_id ?? null, 'list' => $article_families ?? [], 'required' => true, 'with_empty' => '']) @include('components.form.select', ['name' => 'article_family_id', 'value' => $article_family_id ?? null, 'list' => $article_families ?? [], 'required' => true, 'with_empty' => ''])
</div> </div>
</div> </div>
<div class="row mt-3"> <div class="row mt-3">
<div class="col-md-6"> <div class="col-md-6">
{{ Form::label('name', 'Nom') }} {{ Form::label('name', 'Nom') }}
@include('components.input', ['name' => 'name', 'value' => isset($name) ? $name : null, 'required' => true]) @include('components.form.input', ['name' => 'name', 'value' => isset($name) ? $name : null, 'required' => true])
</div> </div>
</div> </div>

View File

@@ -4,12 +4,12 @@
<div class="row"> <div class="row">
<div class="col-md-6"> <div class="col-md-6">
{{ Form::label('name', 'Groupe') }} {{ Form::label('name', 'Groupe') }}
@include('components.select', ['name' => 'tag_group_id', 'list' => $tag_groups, 'value' => isset($tag_group_id) ? $tag_group_id : null, 'required' => true, 'with_empty' => '']) @include('components.form.select', ['name' => 'tag_group_id', 'list' => $tag_groups, 'value' => isset($tag_group_id) ? $tag_group_id : null, 'required' => true, 'with_empty' => ''])
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
{{ Form::label('name', 'Nom') }} {{ Form::label('name', 'Nom') }}
@include('components.input', ['name' => 'name', 'value' => isset($name) ? $name : null, 'required' => true]) @include('components.form.input', ['name' => 'name', 'value' => isset($name) ? $name : null, 'required' => true])
</div> </div>
</div> </div>
@@ -19,7 +19,7 @@
<div class="row"> <div class="row">
<div class="col-md-8"> <div class="col-md-8">
<div class="float-right mt-3"> <div class="float-right mt-3">
@include('components.button-save') @include('components.form.buttons.button-save')
</div> </div>
</div> </div>
</div> </div>

View File

@@ -5,5 +5,7 @@
]) ])
@section('content') @section('content')
@include('components.datatable', ['route' => route('Admin.Shop.Tags.index'), 'model' => 'tags']) @component('components.card')
@include('components.datatable', ['route' => route('Admin.Shop.Tags.index'), 'model' => 'tags'])
@endcomponent
@endsection @endsection

View File

@@ -7,33 +7,33 @@
<div class="row mb-3"> <div class="row mb-3">
<div class="col-8"> <div class="col-8">
{{ Form::label('name', 'Nom') }} {{ Form::label('name', 'Nom') }}
@include('components.input', ['name' => 'name', 'value' => $tariff['name'] ?? null, 'required' => true]) @include('components.form.input', ['name' => 'name', 'value' => $tariff['name'] ?? null, 'required' => true])
</div> </div>
<div class="col-4"> <div class="col-4">
{{ Form::label('name', 'Etat') }} {{ Form::label('name', 'Etat') }}
@include('components.select', ['name' => 'status_id', 'list' => $statuses ?? [], 'value' => $tariff['status_id'] ?? null, 'required' => true, 'with_empty' => '']) @include('components.form.select', ['name' => 'status_id', 'list' => $statuses ?? [], 'value' => $tariff['status_id'] ?? null, 'required' => true, 'with_empty' => ''])
</div> </div>
</div> </div>
<div class="row mb-3"> <div class="row mb-3">
<div class="col-6"> <div class="col-6">
{{ Form::label('name', 'Code') }} {{ Form::label('name', 'Code') }}
@include('components.input', ['name' => 'code', 'value' => $tariff['code'] ?? null, 'required' => true]) @include('components.form.input', ['name' => 'code', 'value' => $tariff['code'] ?? null, 'required' => true])
</div> </div>
<div class="col-6"> <div class="col-6">
{{ Form::label('name', 'Ref') }} {{ Form::label('name', 'Ref') }}
@include('components.input', ['name' => 'ref', 'value' => $tariff['ref'] ?? null, 'required' => true]) @include('components.form.input', ['name' => 'ref', 'value' => $tariff['ref'] ?? null, 'required' => true])
</div> </div>
</div> </div>
<div class="row mb-3"> <div class="row mb-3">
<div class="col-8"> <div class="col-8">
{{ Form::label('name', 'Canal de vente par défaut') }} {{ Form::label('name', 'Canal de vente par défaut') }}
@include('components.select', ['name' => 'sale_channel_id', 'list' => $sale_channels ?? [], 'value' => $tariff['sale_channel_id'] ?? null, 'required' => true, 'with_empty' => '']) @include('components.form.select', ['name' => 'sale_channel_id', 'list' => $sale_channels ?? [], 'value' => $tariff['sale_channel_id'] ?? null, 'required' => true, 'with_empty' => ''])
</div> </div>
<div class="col-4"> <div class="col-4">
{{ Form::label('name', 'Unité du tarif') }} {{ Form::label('name', 'Unité du tarif') }}
@include('components.select', ['name' => 'tariff_unity_id', 'list' => $tariff_unities ?? [], 'value' => $tariff['tariff_unity_id'] ?? null, 'required' => true, 'with_empty' => '']) @include('components.form.select', ['name' => 'tariff_unity_id', 'list' => $tariff_unities ?? [], 'value' => $tariff['tariff_unity_id'] ?? null, 'required' => true, 'with_empty' => ''])
</div> </div>
</div> </div>
@@ -41,7 +41,7 @@
<div class="row mb-3"> <div class="row mb-3">
<div class="col-12"> <div class="col-12">
{{ Form::label('description', 'Description') }} {{ Form::label('description', 'Description') }}
@include('components.textarea', ['name' => 'description', 'value' => $tariff['description'] ?? null, 'class' => 'editor', 'required' => false]) @include('components.form.textarea', ['name' => 'description', 'value' => $tariff['description'] ?? null, 'class' => 'editor', 'required' => false])
</div> </div>
</div> </div>

View File

@@ -5,7 +5,9 @@
]) ])
@section('content') @section('content')
@include('components.datatable', ['route' => route('Admin.Shop.Tariffs.index'), 'model' => 'tariffs']) @component('components.card')
@include('components.datatable', ['route' => route('Admin.Shop.Tariffs.index'), 'model' => 'tariffs'])
@endcomponent
@endsection @endsection
@include('load.layout.modal') @include('load.layout.modal')

View File

@@ -1,14 +1,14 @@
<div class="row"> <div class="row">
<div class="col-md-8"> <div class="col-md-8">
{{ Form::label('name', 'Nom') }} {{ Form::label('name', 'Nom') }}
@include('components.input', ['name' => 'value', 'value' => $unity['value'] ?? null, 'required' => true]) @include('components.form.input', ['name' => 'value', 'value' => $unity['value'] ?? null, 'required' => true])
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col-md-8"> <div class="col-md-8">
<div class="float-right mt-3"> <div class="float-right mt-3">
@include('components.button-save') @include('components.form.buttons.button-save')
</div> </div>
</div> </div>
</div> </div>

View File

@@ -2,13 +2,13 @@
<div class="row"> <div class="row">
<label class="col-4">Familles d'articles</label> <label class="col-4">Familles d'articles</label>
<div class="col-8"> <div class="col-8">
@include('components.select', ['name' => 'family_id', 'list' => (isset($families)) ? $families : [], 'value' => (isset($filters['family_id'])) ? $filters['family_id'] : null, 'class' => 'form-control-sm select2', 'with_empty' => ' ']) @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> </div>
<div class="row mt-3"> <div class="row mt-3">
<label class="col-4">Packages</label> <label class="col-4">Packages</label>
<div class="col-8"> <div class="col-8">
@include('components.select', ['name' => 'package_id', 'list' => (isset($packages)) ? $packages : [], 'value' => (isset($filters['package_id'])) ? $filters['package_id'] : null, 'class' => 'form-control-sm select2', 'with_empty' => ' ']) @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>
</div> </div>
</form> </form>

View File

@@ -3,15 +3,15 @@
<div class="row"> <div class="row">
<div class="col-6"> <div class="col-6">
{{ Form::label('package_id', 'Package') }} {{ Form::label('package_id', 'Package') }}
@include('components.select', ['name' => 'package_id', 'list' => $packages ?? [], 'value' => $variation['package_id'] ?? false, 'required' => true, 'with_empty' => '']) @include('components.form.select', ['name' => 'package_id', 'list' => $packages ?? [], 'value' => $variation['package_id'] ?? false, 'required' => true, 'with_empty' => ''])
</div> </div>
<div class="col-2"> <div class="col-2">
{{ Form::label('quantity', 'Quantité') }} {{ Form::label('quantity', 'Quantité') }}
@include('components.input', ['name' => 'quantity', 'value' => $variation['quantity'] ?? false, 'required' => true]) @include('components.form.input', ['name' => 'quantity', 'value' => $variation['quantity'] ?? false, 'required' => true])
</div> </div>
<div class="col-4"> <div class="col-4">
{{ Form::label('unity_id', 'Unité') }} {{ Form::label('unity_id', 'Unité') }}
@include('components.select', ['name' => 'unity_id', 'list' => $unities ?? [], 'value' => $variation['unity_id'] ?? false, 'required' => false, 'with_empty' => '']) @include('components.form.select', ['name' => 'unity_id', 'list' => $unities ?? [], 'value' => $variation['unity_id'] ?? false, 'required' => false, 'with_empty' => ''])
</div> </div>
</div> </div>
</div> </div>
@@ -20,7 +20,7 @@
<div class="row mb-3"> <div class="row mb-3">
<div class="col-12"> <div class="col-12">
{{ Form::label('description', 'Description') }} {{ Form::label('description', 'Description') }}
@include('components.textarea', ['name' => 'description', 'value' => isset($variation['description']) ? $variation['description'] : null, 'class' => 'editor', 'required' => false]) @include('components.form.textarea', ['name' => 'description', 'value' => isset($variation['description']) ? $variation['description'] : null, 'class' => 'editor', 'required' => false])
</div> </div>
</div> </div>

View File

@@ -5,5 +5,7 @@
]) ])
@section('content') @section('content')
@include('components.datatable', ['route' => route('Admin.Shop.Variations.index'), 'model' => 'variations']) @component('components.card')
@include('components.datatable', ['route' => route('Admin.Shop.Variations.index'), 'model' => 'variations'])
@endcomponent
@endsection @endsection

View File

@@ -17,7 +17,7 @@
Il y a {{ $nb ?? 0 }} article(s) dans la liste Il y a {{ $nb ?? 0 }} article(s) dans la liste
<form name="product_sorting"> <form name="product_sorting">
<label>Trier par</label> <label>Trier par</label>
@include('components.select', ['name' => 'sorting', 'list' => ['Pertinence']]) @include('components.form.select', ['name' => 'sorting', 'list' => ['Pertinence']])
</form> </form>
</div> </div>
</div> </div>

View File

@@ -2,7 +2,7 @@
<div class="input-group"> <div class="input-group">
<div class="input-group-prepend"> <div class="input-group-prepend">
@include('components.select', ['name' => 'type', 'list' => ['Semences & Plants'] ]) @include('components.form.select', ['name' => 'type', 'list' => ['Semences & Plants'] ])
</div> </div>
<input type="text" class="form-control search-btn" aria-label="Text input with dropdown button"> <input type="text" class="form-control search-btn" aria-label="Text input with dropdown button">
<div class="input-group-append"> <div class="input-group-append">

View File

@@ -1,32 +1,54 @@
<div class="form-group {{ $errors->has('addresse') ? 'has-error' : '' }}"> @if (($mode ?? false) == 'view')
<label class="light" for="{{ $prefix ?? null }}address">{{ __('address') }}</label><br/>
{{ Form::label('adresse', 'Adresse') }} @if ($item[($prefix ?? null) . 'address'])
<input name="adresse" id="adresse" class="form-control" value="@if (isset($adresse)) {{ $adresse }}@endif"> {{ $item[($prefix ?? null) . 'address'] ?? null }}<br/>
@endif
{{ Form::label('complement_adresse', 'Complément d\'adresse') }} @if ($item[($prefix ?? null) . 'address2'])
<input name="complement_adresse" id="complement_adresse" class="form-control" value="@if (isset($complement_adresse)){{ $complement_adresse }}@endif"> {{ $item[($prefix ?? null) . 'address2'] ?? null }}
@endif
<div class="row m-top-8"> @if ($item[($prefix ?? null) . 'zipcode'])
<div class="col-md-4"> {{ $item[($prefix ?? null) . 'zipcode'] ?? null }}
{{ Form::label('code_postal', 'Code postal') }} @endif
<input type="text" name="code_postal" id="code_postal" class="form-control" value="@if (isset($code_postal)){{ $code_postal }}@endif"> @if ($item[($prefix ?? null) . 'city'])
{{ $item[($prefix ?? null) . 'city'] ?? null }}
@endif
@if ($item[($prefix ?? null) . 'state'])
{{ $item[($prefix ?? null) . 'state'] ?? null }}
@endif
@if ($item[($prefix ?? null) . 'country_id'])
{{ $countries[$third_party['country_id']] ?? null }}<br/>
@endif
@else
<div class="row mb-3">
<div class="col-12 col-lg-6 form-group">
<label class="light" for="{{ $prefix ?? null }}address">{{ __('street') }}</label><br/>
@include('components.form.input', ['name' => ($prefix ?? null) . 'address', 'value' => $item[($prefix ?? null) . 'address'] ?? null, 'disabled' => $disabled ?? false ])
</div> </div>
<div class="col-12 col-lg-6 form-group">
<div class="col-md-8"> <label class="light" for="{{ $prefix ?? null }}address">{{ __('street_complement') }}</label><br/>
{{ Form::label('ville', 'Ville') }} @include('components.form.input', ['name' => ($prefix ?? null) . 'address2', 'value' => $item[($prefix ?? null) . 'address2'] ?? null, 'disabled' => $disabled ?? false ])
@include('components.city', ['name' => $ville])
</div> </div>
</div> </div>
<div class="row mb-3">
<input type="hidden" name="lattitude" id="lattitude" value=""> <div class="col-6 form-group">
<input type="hidden" name="longitude" id="longitude" value=""> <label class="light" for="{{ $prefix ?? null }}zipcode">{{ __('zipcode') }}</label><br/>
@include('components.form.input', ['name' => ($prefix ?? null) . 'zipcode', 'value' => $item[($prefix ?? null) . 'zipcode'] ?? null, 'disabled' => $disabled ?? false ])
</div> </div>
<div class="col-6 form-group">
@include('boilerplate::load.select2') <label class="light" for="{{ $prefix ?? null }}city">{{ __('city') }}</label><br/>
@include('components.form.input', ['name' => ($prefix ?? null) . 'city', 'value' => $item[($prefix ?? null) . 'city'] ?? null, 'disabled' => $disabled ?? false ])
@push('js') </div>
<!-- Include Google Maps JS API --> </div>
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?libraries=places&amp;key={{ env('GOOGLE_GEOLOCATION_API_KEY') }}"></script> @if ($with_country ?? true)
<script type="text/javascript" src="autocomplete.js"></script> <div class="row mb-3">
@endpush <div class="col-12 col-lg-6 form-group">
<label class="light" for="{{ $prefix ?? null }}country">{{ __('country') }}</label><br/>
@include('components.form.select', ['name' => ($prefix ?? null) . 'country_id', 'list' => $countries ?? null, 'value' => $item[($prefix ?? null) . 'country_id'] ?? null, 'with_empty' => '', 'required' => true, 'disabled' => $disabled ?? false ])
</div>
<div class="col-12 col-lg-6 form-group">
<label class="light" for="{{ $prefix ?? null }}state">{{ __('state') }}</label><br/>
@include('components.form.input', ['name' => ($prefix ?? null) . 'state', 'value' => $item[($prefix ?? null) . 'state'] ?? null, 'disabled' => $disabled ?? false ])
</div>
</div>
@endif
@endif

View File

@@ -1 +0,0 @@
@include('components.button', ['class' => 'btn-success ' . ($class ?? ''), 'icon' => 'fa-plus' ])

View File

@@ -1 +0,0 @@
@include('components.button', ['class' => 'btn-danger ' . ($class ?? ''), 'icon' => ($icon ?? 'fa-trash)'])

View File

@@ -1 +0,0 @@
@include('components.button', ['type' => 'submit', 'class' => 'btn-success save ' . ($class ?? ''), 'icon' => 'fa-save', 'txt' => __('system.save')])

View File

@@ -1,7 +0,0 @@
<input type="checkbox"
name="{{ $name }}"
id="@if (isset($id_name)){{ $id_name }}@else{{ $name }}@endif"
@if (isset($class)) class="{{ $class }}" @endif
@if (isset($val)) value="{{ $val }}" @endif
@if (isset($value) && isset($val) && ($value == $val)) checked @endif
>

View File

@@ -1,4 +1,4 @@
@include('components.select', ['name' => $name.'_id', 'id_name' => $name.'_id', 'class' => 'form-control', 'list' => (isset($list)) ? $list : null, 'value' => (isset($value)) ? $value : null, 'style' => 'width: 100%;']) @include('components.form.select', ['name' => $name.'_id', 'id_name' => $name.'_id', 'class' => 'form-control', 'list' => (isset($list)) ? $list : null, 'value' => (isset($value)) ? $value : null, 'style' => 'width: 100%;'])
<input type="hidden" name="{{ $name }}" id="{{ $name }}" @if (isset($value) && isset($list) && $value) value="{{ $list[$value] }}"@endif> <input type="hidden" name="{{ $name }}" id="{{ $name }}" @if (isset($value) && isset($list) && $value) value="{{ $list[$value] }}"@endif>

View File

@@ -20,7 +20,7 @@
@if (isset($left_buttons)) @if (isset($left_buttons))
@foreach ($left_buttons as $button) @foreach ($left_buttons as $button)
@include('components.button', ['class' => $button['class'] ?? null, 'icon' => $button['icon'] ?? null, 'txt' => $button['txt'] ?? null, 'id' => $button['id'] ?? null ]) @include('components.form.button', ['class' => $button['class'] ?? null, 'icon' => $button['icon'] ?? null, 'txt' => $button['txt'] ?? null, 'id' => $button['id'] ?? null ])
@endforeach @endforeach
@endif @endif

View File

@@ -1,7 +1,9 @@
<button id="btn-{{ $model ?? null }}-filters" type="button" class="btn bg-gradient-secondary btn-filter" data-toggle="modal" data-target="#modal-{{ $model ?? null }}-filters"> <button id="btn-{{ $model ?? null }}-filters" type="button" class="btn bg-gradient-secondary btn-filter" data-toggle="modal" data-target="#modal-{{ $model ?? null }}-filters">
<i class="fa fa-fw fa-filter"></i> <i class="fa fa-fw fa-filter"></i>
<div id="{{ $model ?? null }}-filters-badge" class="badge bg-orange text-light" style="top: -10px; position: absolute; display:none;"><i class="fa fa-exclamation-triangle"></i></div>
</button> </button>
@push('js') @push('js')
<script> <script>
var $filter = $('#{{ $model ?? null }}-table-header .btn-filter'); var $filter = $('#{{ $model ?? null }}-table-header .btn-filter');
@@ -14,6 +16,7 @@
$('#modal-{{ $model ?? null }}-filters').modal('hide'); $('#modal-{{ $model ?? null }}-filters').modal('hide');
var table = window.LaravelDataTables["{{ $model ?? null }}-table"]; var table = window.LaravelDataTables["{{ $model ?? null }}-table"];
table.draw(); table.draw();
setAlertWhenFiltered('{{ $model ?? null }}');
}) })
$('#modal-{{ $model ?? null }}-filters .reset').click(function() { $('#modal-{{ $model ?? null }}-filters .reset').click(function() {
@@ -22,6 +25,7 @@
$('#{{ $model ?? null }}-filters .select2').val(null).trigger("change"); $('#{{ $model ?? null }}-filters .select2').val(null).trigger("change");
}) })
setAlertWhenFiltered('{{ $model ?? null }}');
/* /*
$filter.on( 'click', function () { $filter.on( 'click', function () {

View File

@@ -4,7 +4,19 @@
</button> </button>
<ul class="dropdown-menu" x-placement="bottom-start"> <ul class="dropdown-menu" x-placement="bottom-start">
<li class="dropdown-item"><a href="{{ $route }}/mailSelection">{{ __('admin.mail_the_selection') }}</a></li> <li class="dropdown-item"><a href="{{ $route }}/mailSelection">{{ __('fg.mail_the_selection') }}</a></li>
<li class="dropdown-item"><a href="{{ $route }}/mailAll">{{ __('admin.mail_the_complete_list') }}</a></li> <li class="dropdown-item"><a href="#" class="{{ $model }}-mailall">{{ __('fg.mail_the_complete_list') }}</a></li>
</ul> </ul>
</span> </span>
@push('js')
<script>
$('.{{ $model }}-mailall').click(function() {
var data = $('#{{ $model }}-filters').serialize();
var url = "{{ $route }}/mailAll?" + data;
window.location = url;
});
</script>
@endpush

View File

@@ -1,4 +1,4 @@
@include('components.select', ['name' => 'pager', 'id_name'=> $model . '_pager', 'list' => [5 => '5', 10 => '10', 25 => '25', 50 => '50', 100 => '100']]) @include('components.form.select', ['name' => 'pager', 'id_name'=> $model . '_pager', 'value' => 10, 'list' => [5 => '5', 10 => '10', 25 => '25', 50 => '50', 100 => '100']])
&nbsp;&nbsp; &nbsp;&nbsp;
@push('js') @push('js')

View File

@@ -6,7 +6,12 @@
<script> <script>
$('.{{ $model }}-print').click(function() { $('.{{ $model }}-print').click(function() {
var data = $('#{{ $model }}-filters').serialize(); var data = $('#{{ $model }}-filters').serialize();
var url = "{{ $route }}/print?" + data; var order = getDatatableOrderJson('{{ $model }}');
console.log(order);
var order_txt = $.param(order);
console.log(order_txt);
var url = "{{ $route }}/print?" + data + '&' + order_txt;
console.log(url);
// window.location = url; // window.location = url;
var print = window.open(url, 'print'); var print = window.open(url, 'print');
}); });

View File

@@ -11,9 +11,14 @@
<div class="col-lg-2 col-md-1 col-6 text-right"> <div class="col-lg-2 col-md-1 col-6 text-right">
@if (isset($right_buttons)) @if (isset($right_buttons))
@foreach ($right_buttons as $button) @foreach ($right_buttons as $button)
@include('components.button', ['class' => $button['class'] ?? null, 'icon' => $button['icon'] ?? null, 'txt' => $button['txt'] ?? null, 'id' => $button['id'] ?? null ]) @include('components.form.button', ['class' => $button['class'] ?? null, 'icon' => $button['icon'] ?? null, 'txt' => $button['txt'] ?? null, 'id' => $button['id'] ?? null ])
@endforeach @endforeach
@endif @endif
@if (isset($right_content))
{!! $right_content !!}
@endif
@if (!(isset($with_add) && (!$with_add))) @if (!(isset($with_add) && (!$with_add)))
@include('components.datatables.buttons.add') @include('components.datatables.buttons.add')
@endif @endif

View File

@@ -20,8 +20,12 @@
e.preventDefault(); e.preventDefault();
// var id = table.row(this).id(); // var id = table.row(this).id();
var id = $(this).data('id'); var id = $(this).data('id');
url = '{{ $route }}' + '/show/' + id; @if (isset($show_callback))
openURL(url); {{ $show_callback }}
@else
url = '{{ $route }}' + '/show/' + id;
openURL(url);
@endif
}); });
$('#{{ $model }}-table .btn-del').off('click').click(function (e) { $('#{{ $model }}-table .btn-del').off('click').click(function (e) {
@@ -29,7 +33,7 @@
// var id = table.row(this).id(); // var id = table.row(this).id();
var id = $(this).data('id'); var id = $(this).data('id');
bootbox.confirm("{{ __('admin.confirmdelete') }}", function (result) { bootbox.confirm("{{ __('fg.confirmdelete') }}", function (result) {
if (result === false) return; if (result === false) return;
$.ajax({ $.ajax({
@@ -43,7 +47,7 @@
@else @else
table.draw(); table.draw();
@endif @endif
growl("{{ __('admin.deletesuccess') }}", 'success'); growl("{{ __('fg.deletesuccess') }}", 'success');
} }
}); });
}); });

View File

@@ -7,12 +7,12 @@
<input type="text" class="form-control search-btn" placeholder="{{ __('search') }}" value=""> <input type="text" class="form-control search-btn" placeholder="{{ __('search') }}" value="">
@if ((isset($with_filters) and $with_filters) || (isset($with_colvis) and $with_colvis)) @if (($with_filters ?? false) || ($with_colvis ?? false))
<div class="input-group-append"> <div class="input-group-append">
@if (isset($with_filters) && $with_filters) @if ($with_filters ?? false)
@include('components.datatables.buttons.filters') @include('components.datatables.buttons.filters')
@endif @endif
@if (isset($with_colvis) && $with_colvis) @if ($with_colvis ?? false)
@include('components.datatables.buttons.colvis') @include('components.datatables.buttons.colvis')
@endif @endif
</div> </div>

Some files were not shown because too many files have changed in this diff Show More