From d761fc2d7ee1ddd987b2bde5b42e0a6ee026589e Mon Sep 17 00:00:00 2001 From: Pranshu Tomar Date: Tue, 16 Jun 2020 20:55:29 +0530 Subject: [PATCH] Issue #3219 fixed --- packages/Webkul/BookingProduct/src/Models/Booking.php | 4 ++-- .../catalog/products/accordians/booking.blade.php | 11 +++++++++++ .../src/Resources/views/shop/home/slider.blade.php | 2 +- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/packages/Webkul/BookingProduct/src/Models/Booking.php b/packages/Webkul/BookingProduct/src/Models/Booking.php index 182974986..eb140e7db 100644 --- a/packages/Webkul/BookingProduct/src/Models/Booking.php +++ b/packages/Webkul/BookingProduct/src/Models/Booking.php @@ -13,8 +13,8 @@ class Booking extends Model implements BookingContract protected $fillable = [ 'qty', - 'from', - 'to', + 'available_from', + 'available_to', 'order_item_id', 'booking_product_event_ticket_id', 'product_id', diff --git a/packages/Webkul/BookingProduct/src/Resources/views/admin/catalog/products/accordians/booking.blade.php b/packages/Webkul/BookingProduct/src/Resources/views/admin/catalog/products/accordians/booking.blade.php index 0c3df70bb..3c89c6852 100644 --- a/packages/Webkul/BookingProduct/src/Resources/views/admin/catalog/products/accordians/booking.blade.php +++ b/packages/Webkul/BookingProduct/src/Resources/views/admin/catalog/products/accordians/booking.blade.php @@ -154,6 +154,17 @@ available_to: '' } } + }, + + created: function() { + if (this.booking.available_from) { + this.booking.available_from = "{{ $bookingProduct->available_from->format('Y-m-d H:i:s') }}"; + } + + + if (this.booking.available_to) { + this.booking.available_to = "{{ $bookingProduct->available_to->format('Y-m-d H:i:s') }}"; + } } }); diff --git a/packages/Webkul/Velocity/src/Resources/views/shop/home/slider.blade.php b/packages/Webkul/Velocity/src/Resources/views/shop/home/slider.blade.php index cee9a1cb6..6d21e9035 100644 --- a/packages/Webkul/Velocity/src/Resources/views/shop/home/slider.blade.php +++ b/packages/Webkul/Velocity/src/Resources/views/shop/home/slider.blade.php @@ -2,7 +2,7 @@ $direction = core()->getCurrentLocale()->direction; @endphp -@if ($velocityMetaData->slider) +@if ($velocityMetaData && $velocityMetaData->slider) @endif