From c9d9dca7a524e4ea29753b136d597cf233165f54 Mon Sep 17 00:00:00 2001 From: Olivier Legat Date: Mon, 22 Mar 2021 16:11:49 +0100 Subject: [PATCH] saisie produit --- .../2021_03_16_111337_add_fields_to_products.php | 6 +++--- resources/views/bo/products/create.blade.php | 12 +++++++++++- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/database/migrations/2021_03_16_111337_add_fields_to_products.php b/database/migrations/2021_03_16_111337_add_fields_to_products.php index 077116ae..ca1f6551 100644 --- a/database/migrations/2021_03_16_111337_add_fields_to_products.php +++ b/database/migrations/2021_03_16_111337_add_fields_to_products.php @@ -15,12 +15,12 @@ class AddFieldsToProducts extends Migration { Schema::table('products', function (Blueprint $table) { $table->string('picture_large')->nullable()->after('picture'); - $table->string('sell_unit')->after('stock'); //lier à une liste de valeurs + $table->string('sell_unit')->nullable()->after('stock'); //lier à une liste de valeurs $table->unsignedFloat('weight')->nullable()->after('sell_unit'); - $table->string('weight_unit')->after('weight'); //lier à une liste de valeurs + $table->string('weight_unit')->nullable()->after('weight'); //lier à une liste de valeurs $table->string('product_type')->default('foodProduct')->after('id'); //lier à une liste de valeurs //mise en avant - $table->boolean('star')->after('slug'); //produit star + $table->boolean('star')->default(0)->after('slug'); //produit star }); } diff --git a/resources/views/bo/products/create.blade.php b/resources/views/bo/products/create.blade.php index 20154cb1..223d4953 100644 --- a/resources/views/bo/products/create.blade.php +++ b/resources/views/bo/products/create.blade.php @@ -24,7 +24,7 @@
- +

@@ -119,5 +119,15 @@ .catch( error => { console.error( error ); } ); + ClassicEditor + .create( document.querySelector( '#ingredients' ), editorConfig) + .catch( error => { + console.error( error ); + } ); + ClassicEditor + .create( document.querySelector( '#preparation' ), editorConfig) + .catch( error => { + console.error( error ); + } ); @endsection