little refactoring
This commit is contained in:
@@ -44,9 +44,9 @@ class ProducersDataTable extends DataTable
|
|||||||
Column::make('thumb')->title('')->searchable(false)->orderable(false)->width(40)->class('text-center'),
|
Column::make('thumb')->title('')->searchable(false)->orderable(false)->width(40)->class('text-center'),
|
||||||
Column::make('name')->title('Nom'),
|
Column::make('name')->title('Nom'),
|
||||||
Column::make('tags2')->title('Tags')->searchable(false)->orderable(false),
|
Column::make('tags2')->title('Tags')->searchable(false)->orderable(false),
|
||||||
Column::make('merchandises_count')->title('#Mar')->class('text-right')->searchable(false),
|
Column::make('merchandises_count')->title('#Marchandises')->class('text-right')->searchable(false),
|
||||||
Column::make('tags_count')->title('#Tag')->class('text-right')->searchable(false),
|
// Column::make('tags_count')->title('#Tag')->class('text-right')->searchable(false),
|
||||||
Column::make('images_count')->title('#Pho')->class('text-right')->searchable(false),
|
// Column::make('images_count')->title('#Pho')->class('text-right')->searchable(false),
|
||||||
$this->makeColumnButtons(),
|
$this->makeColumnButtons(),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,9 +3,8 @@
|
|||||||
namespace App\Http\Controllers\Admin\Shop;
|
namespace App\Http\Controllers\Admin\Shop;
|
||||||
|
|
||||||
use App\Datatables\Admin\Shop\MerchandisesDataTable;
|
use App\Datatables\Admin\Shop\MerchandisesDataTable;
|
||||||
|
use App\Http\Requests\Admin\Shop\StoreMerchandisePost;
|
||||||
use App\Repositories\Shop\Merchandises;
|
use App\Repositories\Shop\Merchandises;
|
||||||
use App\Repositories\Shop\Producers;
|
|
||||||
use App\Repositories\Shop\TagGroups;
|
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
|
|
||||||
class MerchandiseController extends Controller
|
class MerchandiseController extends Controller
|
||||||
@@ -17,13 +16,12 @@ class MerchandiseController extends Controller
|
|||||||
|
|
||||||
public function create()
|
public function create()
|
||||||
{
|
{
|
||||||
$data['producers_list'] = Producers::getOptions();
|
$data = Merchandises::init();
|
||||||
$data['tags_list'] = TagGroups::getTreeTags();
|
|
||||||
|
|
||||||
return view('Admin.Shop.Merchandises.create', $data);
|
return view('Admin.Shop.Merchandises.create', $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function store(Request $request)
|
public function store(StoreMerchandisePost $request)
|
||||||
{
|
{
|
||||||
$data = $request->all();
|
$data = $request->all();
|
||||||
Merchandises::storeFull($data);
|
Merchandises::storeFull($data);
|
||||||
@@ -33,14 +31,15 @@ class MerchandiseController extends Controller
|
|||||||
|
|
||||||
public function show($id)
|
public function show($id)
|
||||||
{
|
{
|
||||||
return view('Admin.Shop.Merchandises.view', Merchandises::get($id));
|
$data = Merchandises::get($id);
|
||||||
|
|
||||||
|
return view('Admin.Shop.Merchandises.view', $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function edit($id)
|
public function edit($id)
|
||||||
{
|
{
|
||||||
$data['merchandise'] = Merchandises::getFull($id);
|
$data = Merchandises::init();
|
||||||
$data['producers_list'] = Producers::getOptions();
|
$data['merchandise'] = Merchandises::getArray($id);
|
||||||
$data['tags_list'] = TagGroups::getTreeTags();
|
|
||||||
|
|
||||||
return view('Admin.Shop.Merchandises.edit', $data);
|
return view('Admin.Shop.Merchandises.edit', $data);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ class OfferController extends Controller
|
|||||||
|
|
||||||
public function previewVariation($id)
|
public function previewVariation($id)
|
||||||
{
|
{
|
||||||
$data['variation'] = Variations::get($id)->toArray();
|
$data['variation'] = Variations::getArray($id);
|
||||||
|
|
||||||
return view('Admin.Shop.Offers.partials.variation', $data);
|
return view('Admin.Shop.Offers.partials.variation', $data);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ class ProducerController extends Controller
|
|||||||
|
|
||||||
public function create()
|
public function create()
|
||||||
{
|
{
|
||||||
$data['tags_list'] = TagGroups::getTreeTags();
|
$data = Producers::init();
|
||||||
|
|
||||||
return view('Admin.Shop.Producers.create', $data);
|
return view('Admin.Shop.Producers.create', $data);
|
||||||
}
|
}
|
||||||
@@ -31,13 +31,15 @@ class ProducerController extends Controller
|
|||||||
|
|
||||||
public function show($id)
|
public function show($id)
|
||||||
{
|
{
|
||||||
return view('Admin.Shop.Producers.view', Producers::get($id));
|
$data = Producers::get($id);
|
||||||
|
|
||||||
|
return view('Admin.Shop.Producers.view', $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function edit($id)
|
public function edit($id)
|
||||||
{
|
{
|
||||||
|
$data = Producers::init();
|
||||||
$data['producer'] = Producers::getFull($id);
|
$data['producer'] = Producers::getFull($id);
|
||||||
$data['tags_list'] = TagGroups::getTreeTags();
|
|
||||||
|
|
||||||
return view('Admin.Shop.Producers.edit', $data);
|
return view('Admin.Shop.Producers.edit', $data);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
namespace App\Http\Controllers\Admin\Shop;
|
namespace App\Http\Controllers\Admin\Shop;
|
||||||
|
|
||||||
use App\Datatables\Admin\Shop\VariationsDataTable;
|
use App\Datatables\Admin\Shop\VariationsDataTable;
|
||||||
|
use App\Http\Requests\Admin\Shop\StoreVariationPost;
|
||||||
use App\Repositories\Shop\Packages;
|
use App\Repositories\Shop\Packages;
|
||||||
use App\Repositories\Shop\Unities;
|
use App\Repositories\Shop\Unities;
|
||||||
use App\Repositories\Shop\Variations;
|
use App\Repositories\Shop\Variations;
|
||||||
@@ -24,22 +25,20 @@ class VariationController extends Controller
|
|||||||
|
|
||||||
public function create()
|
public function create()
|
||||||
{
|
{
|
||||||
$data['packages'] = Packages::getOptions();
|
$data = Variations::init();
|
||||||
$data['unities'] = Unities::getOptions();
|
|
||||||
|
|
||||||
return view('Admin.Shop.Variations.create', $data);
|
return view('Admin.Shop.Variations.create', $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function edit($id)
|
public function edit($id)
|
||||||
{
|
{
|
||||||
|
$data = Variations::init();
|
||||||
$data['variation'] = Variations::get($id);
|
$data['variation'] = Variations::get($id);
|
||||||
$data['packages'] = Packages::getOptions();
|
|
||||||
$data['unities'] = Unities::getOptions();
|
|
||||||
|
|
||||||
return view('Admin.Shop.Variations.edit', $data);
|
return view('Admin.Shop.Variations.edit', $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function store(Request $request)
|
public function store(StoreVariationPost $request)
|
||||||
{
|
{
|
||||||
$ret = Variations::store($request->all());
|
$ret = Variations::store($request->all());
|
||||||
|
|
||||||
|
|||||||
21
app/Http/Requests/Admin/Shop/StoreArticleNaturePost.php
Normal file
21
app/Http/Requests/Admin/Shop/StoreArticleNaturePost.php
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Requests\Admin\Shop;
|
||||||
|
|
||||||
|
use Illuminate\Foundation\Http\FormRequest;
|
||||||
|
|
||||||
|
class StoreArticleNaturePost extends FormRequest
|
||||||
|
{
|
||||||
|
public function authorize()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function rules()
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'product_type' => 'required',
|
||||||
|
'name' => 'required',
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
21
app/Http/Requests/Admin/Shop/StoreMerchandisesPost.php
Normal file
21
app/Http/Requests/Admin/Shop/StoreMerchandisesPost.php
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Requests\Admin\Shop;
|
||||||
|
|
||||||
|
use Illuminate\Foundation\Http\FormRequest;
|
||||||
|
|
||||||
|
class StoreMerchandisePost extends FormRequest
|
||||||
|
{
|
||||||
|
public function authorize()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function rules()
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'name' => 'required',
|
||||||
|
'producer_id' => 'required',
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
21
app/Http/Requests/Admin/Shop/StoreProducerPost.php
Normal file
21
app/Http/Requests/Admin/Shop/StoreProducerPost.php
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Requests\Admin\Shop;
|
||||||
|
|
||||||
|
use Illuminate\Foundation\Http\FormRequest;
|
||||||
|
|
||||||
|
class StoreProducerPost extends FormRequest
|
||||||
|
{
|
||||||
|
public function authorize()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function rules()
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'name' => 'required',
|
||||||
|
'alias' => 'required',
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
23
app/Http/Requests/Admin/Shop/StoreVariationPost.php
Normal file
23
app/Http/Requests/Admin/Shop/StoreVariationPost.php
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Requests\Admin\Shop;
|
||||||
|
|
||||||
|
use Illuminate\Foundation\Http\FormRequest;
|
||||||
|
|
||||||
|
class StoreVariationPost extends FormRequest
|
||||||
|
{
|
||||||
|
public function authorize()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function rules()
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'package_id' => 'required',
|
||||||
|
'quantity' => 'required',
|
||||||
|
'unity_id' => 'required',
|
||||||
|
'weight' => 'required',
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -3,12 +3,21 @@
|
|||||||
namespace App\Repositories\Shop;
|
namespace App\Repositories\Shop;
|
||||||
|
|
||||||
use App\Models\Shop\Merchandise;
|
use App\Models\Shop\Merchandise;
|
||||||
|
use App\Traits\Model\Basic;
|
||||||
use App\Repositories\Core\Tag;
|
use App\Repositories\Core\Tag;
|
||||||
use App\Traits\Repository\Imageable;
|
use App\Traits\Repository\Imageable;
|
||||||
|
|
||||||
class Merchandises
|
class Merchandises
|
||||||
{
|
{
|
||||||
use Imageable;
|
use Basic, Imageable;
|
||||||
|
|
||||||
|
public static function init()
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'producers_list' => Producers::getOptions(),
|
||||||
|
'tags_list' => TagGroups::getTreeTags(),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
public static function autocomplete($str)
|
public static function autocomplete($str)
|
||||||
{
|
{
|
||||||
@@ -26,11 +35,6 @@ class Merchandises
|
|||||||
return Merchandise::with(['price_lists.price_list_values', 'price_lists.sale_channel'])->find($id);
|
return Merchandise::with(['price_lists.price_list_values', 'price_lists.sale_channel'])->find($id);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getOptions()
|
|
||||||
{
|
|
||||||
return Merchandise::orderBy('name', 'asc')->get()->pluck('name', 'id')->toArray();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static function getStatus($status_id)
|
public static function getStatus($status_id)
|
||||||
{
|
{
|
||||||
return self::getStatuses()[$status_id];
|
return self::getStatuses()[$status_id];
|
||||||
@@ -41,36 +45,11 @@ class Merchandises
|
|||||||
return ['Actif', 'Suspendu', 'Invisible', 'Obsolete'];
|
return ['Actif', 'Suspendu', 'Invisible', 'Obsolete'];
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getAll()
|
|
||||||
{
|
|
||||||
return Merchandise::orderBy('name', 'asc')->get();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static function get($id)
|
|
||||||
{
|
|
||||||
return Merchandise::find($id);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static function getFull($id)
|
|
||||||
{
|
|
||||||
$data = self::get($id)->toArray();
|
|
||||||
|
|
||||||
return $data;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static function getTags($id)
|
public static function getTags($id)
|
||||||
{
|
{
|
||||||
return self::get($id)->tags;
|
return self::get($id)->tags;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function store($data)
|
|
||||||
{
|
|
||||||
$id = isset($data['id']) ? $data['id'] : false;
|
|
||||||
$item = $id ? self::update($data, $id) : self::create($data);
|
|
||||||
|
|
||||||
return $item;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static function storeFull($data)
|
public static function storeFull($data)
|
||||||
{
|
{
|
||||||
$images = $data['images'] ?? false;
|
$images = $data['images'] ?? false;
|
||||||
@@ -89,22 +68,9 @@ class Merchandises
|
|||||||
return Tag::storeTags($merchandise, $tags);
|
return Tag::storeTags($merchandise, $tags);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function create($data)
|
|
||||||
{
|
|
||||||
return Merchandise::create($data);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static function update($data, $id = false)
|
public static function getModel()
|
||||||
{
|
{
|
||||||
$id = $id ? $id : $data['id'];
|
return Merchandise::query();
|
||||||
$item = self::get($id);
|
|
||||||
$item->update($data);
|
|
||||||
|
|
||||||
return $item;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static function destroy($id)
|
|
||||||
{
|
|
||||||
return Merchandise::destroy($id);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,11 +4,19 @@ namespace App\Repositories\Shop;
|
|||||||
|
|
||||||
use App\Models\Shop\Producer;
|
use App\Models\Shop\Producer;
|
||||||
use App\Repositories\Core\Tag;
|
use App\Repositories\Core\Tag;
|
||||||
|
use App\Traits\Model\Basic;
|
||||||
use App\Traits\Repository\Imageable;
|
use App\Traits\Repository\Imageable;
|
||||||
|
|
||||||
class Producers
|
class Producers
|
||||||
{
|
{
|
||||||
use Imageable;
|
use Basic, Imageable;
|
||||||
|
|
||||||
|
public static function init()
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'tags_list' => TagGroups::getTreeTags(),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
public static function autocomplete($str)
|
public static function autocomplete($str)
|
||||||
{
|
{
|
||||||
@@ -31,21 +39,6 @@ class Producers
|
|||||||
return Tag::storeTags($variety, $tags);
|
return Tag::storeTags($variety, $tags);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getOptions()
|
|
||||||
{
|
|
||||||
return Producer::orderBy('name', 'asc')->get()->pluck('name', 'id')->toArray();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static function getAll()
|
|
||||||
{
|
|
||||||
return Producer::orderBy('name', 'asc')->get();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static function get($id)
|
|
||||||
{
|
|
||||||
return Producer::find($id);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static function getFull($id)
|
public static function getFull($id)
|
||||||
{
|
{
|
||||||
$producer = self::get($id);
|
$producer = self::get($id);
|
||||||
@@ -73,27 +66,8 @@ class Producers
|
|||||||
return $producer;
|
return $producer;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function store($data)
|
public static function getModel()
|
||||||
{
|
{
|
||||||
return ($data['id'] ?? false) ? self::update($data) : self::create($data);
|
return Producer::query();
|
||||||
}
|
|
||||||
|
|
||||||
public static function create($data)
|
|
||||||
{
|
|
||||||
return Producer::create($data);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static function update($data, $id = false)
|
|
||||||
{
|
|
||||||
$id = $id ? $id : $data['id'];
|
|
||||||
$item = self::get($id);
|
|
||||||
$item->update($data);
|
|
||||||
|
|
||||||
return $item;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static function destroy($id)
|
|
||||||
{
|
|
||||||
return Producer::destroy($id);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,10 +3,20 @@
|
|||||||
namespace App\Repositories\Shop;
|
namespace App\Repositories\Shop;
|
||||||
|
|
||||||
use App\Models\Shop\Variation;
|
use App\Models\Shop\Variation;
|
||||||
|
use App\Traits\Model\Basic;
|
||||||
use Illuminate\Support\Str;
|
use Illuminate\Support\Str;
|
||||||
|
|
||||||
class Variations
|
class Variations
|
||||||
{
|
{
|
||||||
|
use Basic;
|
||||||
|
|
||||||
|
public static function init()
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'packages' => Packages::getOptions(),
|
||||||
|
'unities' => Unities::getOptions(),
|
||||||
|
];
|
||||||
|
}
|
||||||
public static function autocomplete($str)
|
public static function autocomplete($str)
|
||||||
{
|
{
|
||||||
$data = Variation::where('name', 'LIKE', "%${str}%")->orderBy('name')->limit(30)->get()->pluck('name', 'id');
|
$data = Variation::where('name', 'LIKE', "%${str}%")->orderBy('name')->limit(30)->get()->pluck('name', 'id');
|
||||||
@@ -36,7 +46,10 @@ class Variations
|
|||||||
|
|
||||||
public static function getName($variation)
|
public static function getName($variation)
|
||||||
{
|
{
|
||||||
return $variation->package->value.' '.$variation->quantity.' '.($variation->unity->value ?? null).' '.Str::limit(strip_tags($variation->description), 15, ' (...)');
|
return $variation->package->value.' '.
|
||||||
|
$variation->quantity.' '.
|
||||||
|
($variation->unity->value ?? null).' '.
|
||||||
|
Str::limit(strip_tags($variation->description), 15, ' (...)');
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function buildName($data)
|
public static function buildName($data)
|
||||||
@@ -44,29 +57,12 @@ class Variations
|
|||||||
return Packages::getName($data['package_id']).' '.$data['quantity'].' '.Unities::getName($data['unity_id']);
|
return Packages::getName($data['package_id']).' '.$data['quantity'].' '.Unities::getName($data['unity_id']);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getAll()
|
|
||||||
{
|
|
||||||
return Variation::orderBy('value', 'asc')->get();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static function getFull($id)
|
public static function getFull($id)
|
||||||
{
|
{
|
||||||
return Variation::with(['package', 'unity'])->findOrFail($id);
|
return Variation::with(['package', 'unity'])->findOrFail($id);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function get($id)
|
|
||||||
{
|
|
||||||
return Variation::findOrFail($id);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static function store($data)
|
|
||||||
{
|
|
||||||
$id = isset($data['id']) ? $data['id'] : false;
|
|
||||||
$item = $id ? self::update($data) : self::create($data);
|
|
||||||
|
|
||||||
return $item->id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static function create($data)
|
public static function create($data)
|
||||||
{
|
{
|
||||||
$data['name'] = self::buildName($data);
|
$data['name'] = self::buildName($data);
|
||||||
@@ -76,7 +72,7 @@ class Variations
|
|||||||
|
|
||||||
public static function update($data, $id = false)
|
public static function update($data, $id = false)
|
||||||
{
|
{
|
||||||
$id = isset($data['id']) ? $data['id'] : false;
|
$id = $id ? $id : $data['id'];
|
||||||
$variation = self::get($id);
|
$variation = self::get($id);
|
||||||
$data['name'] = self::buildName($data);
|
$data['name'] = self::buildName($data);
|
||||||
$variation->update($data);
|
$variation->update($data);
|
||||||
@@ -84,8 +80,8 @@ class Variations
|
|||||||
return $variation;
|
return $variation;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function destroy($id)
|
public static function getModel()
|
||||||
{
|
{
|
||||||
return Variation::destroy($id);
|
return Variation::query();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ return [
|
|||||||
'article_attribute_families' => [
|
'article_attribute_families' => [
|
||||||
'title' => 'Familles d\'attributs',
|
'title' => 'Familles d\'attributs',
|
||||||
'description' => 'Gérer les familles d\'attributs',
|
'description' => 'Gérer les familles d\'attributs',
|
||||||
|
'name' => 'Famille d\'attributs',
|
||||||
'add' => 'Ajouter une famille d\'attributs',
|
'add' => 'Ajouter une famille d\'attributs',
|
||||||
'edit' => 'Editer une famille d\'attributs',
|
'edit' => 'Editer une famille d\'attributs',
|
||||||
'del' => 'Effacer une famille d\'attributs',
|
'del' => 'Effacer une famille d\'attributs',
|
||||||
@@ -145,6 +146,19 @@ return [
|
|||||||
'successdel' => 'Le colis a été correctement effacé',
|
'successdel' => 'Le colis a été correctement effacé',
|
||||||
'confirmdelete' => 'Confirmez-vous la suppression du colis ?',
|
'confirmdelete' => 'Confirmez-vous la suppression du colis ?',
|
||||||
],
|
],
|
||||||
|
'merchandises' => [
|
||||||
|
'title' => 'Marchandises',
|
||||||
|
'name' => 'Marchandise',
|
||||||
|
'description' => 'Gérer les marchandises',
|
||||||
|
'add' => 'Ajouter une marchandise',
|
||||||
|
'edit' => 'Editer une marchandise',
|
||||||
|
'del' => 'Effacer une marchandise',
|
||||||
|
'list' => 'Liste des marchandises',
|
||||||
|
'successadd' => 'La marchandise a été correctement ajoutée',
|
||||||
|
'successmod' => 'La marchandise a été correctement modifiée',
|
||||||
|
'successdel' => 'La marchandise a été correctement effacée',
|
||||||
|
'confirmdelete' => 'Confirmez-vous la suppression de la marchandise ?',
|
||||||
|
],
|
||||||
'offers' => [
|
'offers' => [
|
||||||
'title' => 'Offres',
|
'title' => 'Offres',
|
||||||
'name' => 'Offre',
|
'name' => 'Offre',
|
||||||
@@ -171,9 +185,23 @@ return [
|
|||||||
'successdel' => 'La déclinaison a été correctement effacée',
|
'successdel' => 'La déclinaison a été correctement effacée',
|
||||||
'confirmdelete' => 'Confirmez-vous la suppression de la déclinaison ?',
|
'confirmdelete' => 'Confirmez-vous la suppression de la déclinaison ?',
|
||||||
],
|
],
|
||||||
|
'producers' => [
|
||||||
|
'title' => 'Producteurs',
|
||||||
|
'description' => 'Gérer les producteurs',
|
||||||
|
'name' => 'Producteur',
|
||||||
|
'add' => 'Ajouter un producteur',
|
||||||
|
'edit' => 'Editer un producteur',
|
||||||
|
'del' => 'Effacer un producteur',
|
||||||
|
'list' => 'Liste des producteurs',
|
||||||
|
'successadd' => 'Le producteur été correctement ajouté',
|
||||||
|
'successmod' => 'Le producteur a été correctement modifié',
|
||||||
|
'successdel' => 'Le producteur a été correctement effacé',
|
||||||
|
'confirmdelete' => 'Confirmez-vous la suppression du producteur ?',
|
||||||
|
],
|
||||||
'prices' => [
|
'prices' => [
|
||||||
'title' => 'Prix',
|
'title' => 'Prix',
|
||||||
'description' => 'Gérer les prix',
|
'description' => 'Gérer les prix',
|
||||||
|
'name' => 'Prix',
|
||||||
'add' => 'Ajouter un prix',
|
'add' => 'Ajouter un prix',
|
||||||
'edit' => 'Editer un prix',
|
'edit' => 'Editer un prix',
|
||||||
'del' => 'Effacer un prix',
|
'del' => 'Effacer un prix',
|
||||||
|
|||||||
@@ -1,11 +1,9 @@
|
|||||||
@extends('layout.index', [
|
@extends('layout.index', [
|
||||||
'title' => __('shop.merchandises.title'),
|
'title' => __('shop.merchandises.title'),
|
||||||
'subtitle' => __('shop.merchandises.add'),
|
'subtitle' => __('shop.merchandises.add'),
|
||||||
'breadcrumb' => [__('shop.merchandises.title'), __('shop.merchandises.add')]
|
'breadcrumb' => [__('shop.merchandises.title'), __('shop.merchandises.add')],
|
||||||
])
|
])
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
{{ Form::open(['route' => 'Admin.Shop.Merchandises.store', 'id' => 'form', 'autocomplete' => 'off', 'files' => true]) }}
|
@include('Admin.Shop.Merchandises.form')
|
||||||
@include('Admin.Shop.Merchandises.form')
|
|
||||||
</form>
|
|
||||||
@endsection
|
@endsection
|
||||||
|
|||||||
@@ -1,12 +1,9 @@
|
|||||||
@extends('layout.index', [
|
@extends('layout.index', [
|
||||||
'title' => __('Shop.merchandises.title'),
|
'title' => __('Shop.merchandises.title'),
|
||||||
'subtitle' => __('Shop.merchandises.edit'),
|
'subtitle' => __('Shop.merchandises.edit'),
|
||||||
'breadcrumb' => [__('Shop.merchandises.title'), __('Shop.merchandises.edit')]
|
'breadcrumb' => [__('Shop.merchandises.title'), __('Shop.merchandises.edit')],
|
||||||
])
|
])
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
{{ Form::open(['route' => 'Admin.Shop.Merchandises.store', 'id' => 'form', 'autocomplete' => 'off', 'files' => true]) }}
|
@include('Admin.Shop.Merchandises.form')
|
||||||
<input type="hidden" name="id" id="id" value="{{ $merchandise['id'] }}">
|
|
||||||
@include('Admin.Shop.Merchandises.form')
|
|
||||||
</form>
|
|
||||||
@endsection
|
@endsection
|
||||||
|
|||||||
@@ -1,75 +1,88 @@
|
|||||||
|
{{ Form::open([
|
||||||
|
'route' => 'Admin.Shop.Merchandises.store',
|
||||||
|
'id' => 'merchandise-form',
|
||||||
|
'autocomplete' => 'off',
|
||||||
|
'files' => true,
|
||||||
|
]) }}
|
||||||
|
<input type="hidden" name="id" id="id" value="{{ $merchandise['id'] ?? false }}">
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
<div class="row mb-3">
|
<div class="row mb-3">
|
||||||
<div class="col-6">
|
<div class="col-6">
|
||||||
{{ Form::label('name', 'Nom') }}
|
@include('components.form.input', [
|
||||||
@include('components.form.input', ['name' => 'name', 'value' => $merchandise['name'] ?? null, 'required' => true])
|
'name' => 'name',
|
||||||
</div>
|
'value' => $merchandise['name'] ?? null,
|
||||||
<div class="col-6">
|
'required' => true,
|
||||||
{{ Form::label('producers', 'Producteur') }}
|
'label' => 'Nom',
|
||||||
@include('components.form.select', [
|
])
|
||||||
'name' => 'producer_id',
|
</div>
|
||||||
'list' => $producers_list ?? [],
|
<div class="col-6">
|
||||||
'value' => $merchandise['provider_id'] ?? null,
|
@include('components.form.select', [
|
||||||
'class' => 'select2 form-control',
|
'name' => 'producer_id',
|
||||||
'with_empty' => '',
|
'list' => $producers_list ?? [],
|
||||||
])
|
'value' => $merchandise['provider_id'] ?? null,
|
||||||
</div>
|
'class' => 'select2 form-control',
|
||||||
</div>
|
'with_empty' => '',
|
||||||
|
'required' => true,
|
||||||
|
'label' => __('Shop.producers.name'),
|
||||||
|
])
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="row mb-3">
|
<div class="row mb-3">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
{{ Form::label('tags', 'Tags') }}
|
@include('components.form.selects.select-tree', [
|
||||||
@include('components.form.selects.select-tree', [
|
'name' => 'tags[]',
|
||||||
'name' => 'tags[]',
|
'list' => $tags_list,
|
||||||
'list' => $tags_list,
|
'values' => $merchandise['tags'] ?? null,
|
||||||
'values' => $merchandise['tags'] ?? null,
|
'class' => 'select2 form-control',
|
||||||
'class' => 'select2 form-control',
|
'multiple' => true,
|
||||||
'multiple' => true
|
'label' => 'Tags',
|
||||||
])
|
])
|
||||||
</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') }}
|
@include('components.form.textarea', [
|
||||||
@include('components.form.textarea', [
|
'name' => 'description',
|
||||||
'name' => 'description',
|
'value' => $merchandise['description'] ?? null,
|
||||||
'value' => $merchandise['description'] ?? null,
|
'class' => 'editor',
|
||||||
'class' => 'editor',
|
'rows' => 5,
|
||||||
'rows' => 5,
|
'required' => false,
|
||||||
'required' => false,
|
'description' => 'Description',
|
||||||
])
|
])
|
||||||
</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', 'Son +') }}
|
@include('components.form.textarea', [
|
||||||
@include('components.form.textarea', [
|
'name' => 'plus',
|
||||||
'name' => 'plus',
|
'value' => $merchandise['plus'] ?? null,
|
||||||
'value' => $merchandise['plus'] ?? null,
|
'class' => 'editor',
|
||||||
'class' => 'editor',
|
'rows' => 5,
|
||||||
'rows' => 5,
|
'required' => false,
|
||||||
'required' => false,
|
'label' => 'Son +',
|
||||||
])
|
])
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
@include('components.uploader.widget', [
|
@include('components.uploader.widget', [
|
||||||
'load_url' => route('Admin.Shop.Merchandises.getImages', ['id' => $merchandise['id'] ?? false]),
|
'load_url' => route('Admin.Shop.Merchandises.getImages', ['id' => $merchandise['id'] ?? false]),
|
||||||
'delete_url' => route('Admin.Botanic.Varieties.deleteImage'),
|
'delete_url' => route('Admin.Botanic.Varieties.deleteImage'),
|
||||||
'name' => 'images',
|
'name' => 'images',
|
||||||
])
|
])
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
{{ Form::close() }}
|
||||||
|
|
||||||
@include('components.save')
|
<x-save />
|
||||||
|
|
||||||
@include('load.form.appender')
|
@include('load.form.appender')
|
||||||
@include('load.form.editor')
|
@include('load.form.editor')
|
||||||
@include('load.form.save')
|
@include('load.form.save')
|
||||||
@@ -79,12 +92,12 @@
|
|||||||
@include('boilerplate::load.tinymce')
|
@include('boilerplate::load.tinymce')
|
||||||
|
|
||||||
@push('js')
|
@push('js')
|
||||||
<script>
|
<script>
|
||||||
$(function() {
|
$(function() {
|
||||||
initSelect2();
|
initSelect2();
|
||||||
initChevron();
|
initChevron();
|
||||||
initEditor();
|
initEditor();
|
||||||
initSaveForm();
|
initSaveForm('merchandise-form');
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
@endpush
|
@endpush
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{{ Form::open(['route' => 'Admin.Shop.Offers.store', 'id' => 'offer-form', 'autocomplete' => 'off']) }}
|
{{ Form::open(['route' => 'Admin.Shop.Offers.store', 'id' => 'offer-form', 'autocomplete' => 'off']) }}
|
||||||
<input type="hidden" name="id" value="{{ $offer['id'] }}">
|
<input type="hidden" name="id" value="{{ $offer['id'] ?? false }}">
|
||||||
|
|
||||||
<div class="row mb-3">
|
<div class="row mb-3">
|
||||||
<div class="col-8">
|
<div class="col-8">
|
||||||
|
|||||||
@@ -1,11 +1,9 @@
|
|||||||
@extends('layout.index', [
|
@extends('layout.index', [
|
||||||
'title' => __('shop.producers.title'),
|
'title' => __('shop.producers.title'),
|
||||||
'subtitle' => __('shop.producers.add'),
|
'subtitle' => __('shop.producers.add'),
|
||||||
'breadcrumb' => [__('shop.producers.title'), __('shop.producers.add')]
|
'breadcrumb' => [__('shop.producers.title'), __('shop.producers.add')],
|
||||||
])
|
])
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
{{ Form::open(['route' => 'Admin.Shop.Producers.store', 'id' => 'form', 'autocomplete' => 'off', 'files' => true]) }}
|
@include('Admin.Shop.Producers.form')
|
||||||
@include('Admin.Shop.Producers.form')
|
|
||||||
</form>
|
|
||||||
@endsection
|
@endsection
|
||||||
|
|||||||
@@ -1,12 +1,9 @@
|
|||||||
@extends('layout.index', [
|
@extends('layout.index', [
|
||||||
'title' => __('Shop.producers.title'),
|
'title' => __('Shop.producers.title'),
|
||||||
'subtitle' => __('Shop.producers.edit'),
|
'subtitle' => __('Shop.producers.edit'),
|
||||||
'breadcrumb' => [__('Shop.producers.title'), __('Shop.producers.edit')]
|
'breadcrumb' => [__('Shop.producers.title'), __('Shop.producers.edit')],
|
||||||
])
|
])
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
{{ Form::open(['route' => 'Admin.Shop.Producers.store', 'id' => 'form', 'autocomplete' => 'off', 'files' => true]) }}
|
@include('Admin.Shop.Producers.form')
|
||||||
<input type="hidden" name="id" id="id" value="{{ $producer['id'] }}">
|
|
||||||
@include('Admin.Shop.Producers.form')
|
|
||||||
</form>
|
|
||||||
@endsection
|
@endsection
|
||||||
|
|||||||
@@ -1,55 +1,67 @@
|
|||||||
|
{{ Form::open(['route' => 'Admin.Shop.Producers.store', 'id' => 'form', 'autocomplete' => 'off', 'files' => true]) }}
|
||||||
|
<input type="hidden" name="id" id="id" value="{{ $producer['id'] ?? false }}">
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
<div class="row mb-3">
|
<div class="row mb-3">
|
||||||
<div class="col-6">
|
<div class="col-6">
|
||||||
{{ Form::label('name', 'Nom') }}
|
@include('components.form.input', [
|
||||||
@include('components.form.input', ['name' => 'name', 'value' => $producer['name'] ?? null, 'required' => true])
|
'name' => 'name',
|
||||||
</div>
|
'value' => $producer['name'] ?? null,
|
||||||
<div class="col-6">
|
'required' => true,
|
||||||
{{ Form::label('name', 'Alias') }}
|
'label' => 'Nom',
|
||||||
@include('components.form.input', ['name' => 'alias', 'value' => $producer['alias'] ?? null, 'required' => true])
|
])
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="col-6">
|
||||||
|
@include('components.form.input', [
|
||||||
|
'name' => 'alias',
|
||||||
|
'value' => $producer['alias'] ?? null,
|
||||||
|
'required' => true,
|
||||||
|
'label' => 'Alias',
|
||||||
|
])
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="row mb-3">
|
<div class="row mb-3">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
{{ Form::label('tags', 'Tags') }}
|
@include('components.form.selects.select-tree', [
|
||||||
@include('components.form.selects.select-tree', [
|
'name' => 'tags[]',
|
||||||
'name' => 'tags[]',
|
'list' => $tags_list,
|
||||||
'list' => $tags_list,
|
'values' => $producer['tags'] ?? null,
|
||||||
'values' => $producer['tags'] ?? null,
|
'class' => 'select2 form-control',
|
||||||
'class' => 'select2 form-control',
|
'multiple' => true,
|
||||||
'multiple' => true
|
'label' => 'Tags',
|
||||||
])
|
])
|
||||||
</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') }}
|
@include('components.form.textarea', [
|
||||||
@include('components.form.textarea', [
|
'name' => 'description',
|
||||||
'name' => 'description',
|
'value' => $producer['description'] ?? null,
|
||||||
'value' => $producer['description'] ?? null,
|
'class' => 'editor',
|
||||||
'class' => 'editor',
|
'rows' => 5,
|
||||||
'rows' => 5,
|
'required' => false,
|
||||||
'required' => false,
|
'label' => 'Description',
|
||||||
])
|
])
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
@include('components.uploader.widget', [
|
@include('components.uploader.widget', [
|
||||||
'load_url' => route('Admin.Shop.Merchandises.getImages', ['id' => $producer['id'] ?? false]),
|
'load_url' => route('Admin.Shop.Merchandises.getImages', ['id' => $producer['id'] ?? false]),
|
||||||
'delete_url' => route('Admin.Botanic.Varieties.deleteImage'),
|
'delete_url' => route('Admin.Botanic.Varieties.deleteImage'),
|
||||||
'name' => 'images',
|
'name' => 'images',
|
||||||
])
|
])
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
{{ form::close() }}
|
||||||
|
|
||||||
@include('components.save')
|
<x-save />
|
||||||
|
|
||||||
@include('load.form.appender')
|
@include('load.form.appender')
|
||||||
@include('load.form.editor')
|
@include('load.form.editor')
|
||||||
@@ -60,12 +72,12 @@
|
|||||||
@include('boilerplate::load.tinymce')
|
@include('boilerplate::load.tinymce')
|
||||||
|
|
||||||
@push('js')
|
@push('js')
|
||||||
<script>
|
<script>
|
||||||
$(function() {
|
$(function() {
|
||||||
initSelect2();
|
initSelect2();
|
||||||
initChevron();
|
initChevron();
|
||||||
initEditor();
|
initEditor();
|
||||||
initSaveForm();
|
initSaveForm();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
@endpush
|
@endpush
|
||||||
|
|||||||
@@ -1,12 +1,14 @@
|
|||||||
@extends('layout.index', [
|
@extends('layout.index', [
|
||||||
'title' => __('shop.producers.title'),
|
'title' => __('shop.producers.title'),
|
||||||
'subtitle' => __('shop.producers.list'),
|
'subtitle' => __('shop.producers.list'),
|
||||||
'breadcrumb' => [__('Shop.producers.title')]
|
'breadcrumb' => [__('Shop.producers.title')],
|
||||||
])
|
])
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
@component('components.card')
|
@component('components.card')
|
||||||
@include('components.datatable', ['route' => route('Admin.Shop.Producers.index'), 'model' => 'producers'])
|
@include('components.datatable', [
|
||||||
@endcomponent
|
'route' => route('Admin.Shop.Producers.index'),
|
||||||
|
'model' => 'producers',
|
||||||
|
])
|
||||||
|
@endcomponent
|
||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
|
|||||||
@@ -1,15 +1,9 @@
|
|||||||
@extends('layout.index', [
|
@extends('layout.index', [
|
||||||
'title' => __('shop.variations.title'),
|
'title' => __('shop.variations.title'),
|
||||||
'subtitle' => __('shop.variations.add'),
|
'subtitle' => __('shop.variations.add'),
|
||||||
'breadcrumb' => [__('shop.variations.title'), __('shop.variations.index')]
|
'breadcrumb' => [__('shop.variations.title'), __('shop.variations.index')],
|
||||||
])
|
])
|
||||||
|
|
||||||
@include('boilerplate::load.fileinput')
|
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
|
@include('Admin.Shop.Variations.form')
|
||||||
{{ Form::open(['route' => 'Admin.Shop.Variations.store', 'id' => 'variation-form', 'autocomplete' => 'off']) }}
|
|
||||||
@include('Admin.Shop.Variations.form')
|
|
||||||
</form>
|
|
||||||
|
|
||||||
@endsection
|
@endsection
|
||||||
|
|||||||
@@ -1,12 +1,9 @@
|
|||||||
@extends('layout.index', [
|
@extends('layout.index', [
|
||||||
'title' => __('shop.variations.title'),
|
'title' => __('shop.variations.title'),
|
||||||
'subtitle' => __('shop.variations.edit'),
|
'subtitle' => __('shop.variations.edit'),
|
||||||
'breadcrumb' => [__('shop.variations.title'), __('shop.variations.index')]
|
'breadcrumb' => [__('shop.variations.title'), __('shop.variations.index')],
|
||||||
])
|
])
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
{{ Form::open(['route' => 'Admin.Shop.Variations.store', 'id' => 'variation-form', 'autocomplete' => 'off']) }}
|
@include('Admin.Shop.Variations.form')
|
||||||
<input type="hidden" name="id" value="{{ $variation['id'] }}">
|
|
||||||
@include('Admin.Shop.Variations.form')
|
|
||||||
</form>
|
|
||||||
@endsection
|
@endsection
|
||||||
|
|||||||
@@ -1,43 +1,73 @@
|
|||||||
|
{{ Form::open(['route' => 'Admin.Shop.Variations.store', 'id' => 'variation-form', 'autocomplete' => 'off']) }}
|
||||||
|
<input type="hidden" name="id" value="{{ $variation['id'] ?? false }}">
|
||||||
|
|
||||||
<div class="row mb-3">
|
<div class="row mb-3">
|
||||||
<div class="col-6">
|
<div class="col-6">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-6">
|
<div class="col-6">
|
||||||
{{ Form::label('package_id', 'Package') }}
|
@include('components.form.select', [
|
||||||
@include('components.form.select', ['name' => 'package_id', 'list' => $packages ?? [], 'value' => $variation['package_id'] ?? false, 'required' => true, 'with_empty' => ''])
|
'name' => 'package_id',
|
||||||
</div>
|
'list' => $packages ?? [],
|
||||||
<div class="col-2">
|
'value' => $variation['package_id'] ?? false,
|
||||||
{{ Form::label('quantity', 'Quantité') }}
|
'required' => true,
|
||||||
@include('components.form.input', ['name' => 'quantity', 'value' => $variation['quantity'] ?? false, 'required' => true])
|
'with_empty' => '',
|
||||||
</div>
|
'label' => 'Package',
|
||||||
<div class="col-4">
|
])
|
||||||
{{ Form::label('unity_id', 'Unité') }}
|
</div>
|
||||||
@include('components.form.select', ['name' => 'unity_id', 'list' => $unities ?? [], 'value' => $variation['unity_id'] ?? false, 'required' => false, 'with_empty' => ''])
|
<div class="col-2">
|
||||||
</div>
|
@include('components.form.input', [
|
||||||
</div>
|
'name' => 'quantity',
|
||||||
</div>
|
'value' => $variation['quantity'] ?? false,
|
||||||
<div class="col-1">
|
'required' => true,
|
||||||
{{ Form::label('weight', 'Poids') }}
|
'label' => 'Quantité',
|
||||||
@include('components.form.input', ['name' => 'weight', 'value' => $variation['weight'] ?? false, 'required' => true])
|
])
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-4">
|
||||||
|
@include('components.form.select', [
|
||||||
|
'name' => 'unity_id',
|
||||||
|
'list' => $unities ?? [],
|
||||||
|
'value' => $variation['unity_id'] ?? false,
|
||||||
|
'required' => true,
|
||||||
|
'with_empty' => '',
|
||||||
|
'label' => 'Unité',
|
||||||
|
])
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-1">
|
||||||
|
@include('components.form.input', [
|
||||||
|
'name' => 'weight',
|
||||||
|
'value' => $variation['weight'] ?? false,
|
||||||
|
'required' => true,
|
||||||
|
'label' => 'Poids',
|
||||||
|
])
|
||||||
|
</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') }}
|
@include('components.form.textarea', [
|
||||||
@include('components.form.textarea', ['name' => 'description', 'value' => isset($variation['description']) ? $variation['description'] : null, 'class' => 'editor', 'required' => false])
|
'name' => 'description',
|
||||||
</div>
|
'value' => $variation['description'] ?? null,
|
||||||
|
'class' => 'editor',
|
||||||
|
'required' => false,
|
||||||
|
'label' => 'Description',
|
||||||
|
])
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{{ form::close() }}
|
||||||
|
|
||||||
@include('components.save')
|
<x-save />>
|
||||||
|
|
||||||
@include('load.form.editor')
|
@include('load.form.editor')
|
||||||
@include('load.form.save')
|
@include('load.form.save')
|
||||||
|
|
||||||
@push('js')
|
@push('js')
|
||||||
<script>
|
{!! JsValidator::formRequest('App\Http\Requests\Admin\Shop\StoreVariationPost', '#variation-form') !!}
|
||||||
$(function() {
|
<script>
|
||||||
initEditor();
|
$(function() {
|
||||||
initSaveForm('#variation-form')
|
initEditor();
|
||||||
});
|
initSaveForm('#variation-form')
|
||||||
</script>
|
});
|
||||||
@endpush
|
</script>
|
||||||
|
@endpush
|
||||||
|
|||||||
Reference in New Issue
Block a user