diff --git a/packages/Webkul/BookingProduct/src/Resources/lang/ar/app.php b/packages/Webkul/BookingProduct/src/Resources/lang/ar/app.php index 7a841de75..cfe6f62d6 100644 --- a/packages/Webkul/BookingProduct/src/Resources/lang/ar/app.php +++ b/packages/Webkul/BookingProduct/src/Resources/lang/ar/app.php @@ -63,7 +63,8 @@ return [ 'day' => 'يوم', 'status' => 'الحالة', 'open' => 'افتح', - 'close' => 'غلق' + 'close' => 'غلق', + 'time-error' => 'The to time must be greater than the from time.' ] ] ], diff --git a/packages/Webkul/BookingProduct/src/Resources/lang/en/app.php b/packages/Webkul/BookingProduct/src/Resources/lang/en/app.php index 034010f55..7fdee5ec7 100644 --- a/packages/Webkul/BookingProduct/src/Resources/lang/en/app.php +++ b/packages/Webkul/BookingProduct/src/Resources/lang/en/app.php @@ -63,7 +63,8 @@ return [ 'day' => 'Day', 'status' => 'Status', 'open' => 'Open', - 'close' => 'Close' + 'close' => 'Close', + 'time-error' => 'The to time must be greater than the from time.' ] ] ], diff --git a/packages/Webkul/BookingProduct/src/Resources/lang/es/app.php b/packages/Webkul/BookingProduct/src/Resources/lang/es/app.php index 244242480..1ff2ca2d2 100644 --- a/packages/Webkul/BookingProduct/src/Resources/lang/es/app.php +++ b/packages/Webkul/BookingProduct/src/Resources/lang/es/app.php @@ -63,7 +63,8 @@ return [ 'day' => 'Día', 'status' => 'Estado', 'open' => 'Abierto', - 'close' => 'Cerrado' + 'close' => 'Cerrado', + 'time-error' => 'The to time must be greater than the from time.' ] ] ], diff --git a/packages/Webkul/BookingProduct/src/Resources/lang/fa/app.php b/packages/Webkul/BookingProduct/src/Resources/lang/fa/app.php index 629a375ee..527616ad9 100644 --- a/packages/Webkul/BookingProduct/src/Resources/lang/fa/app.php +++ b/packages/Webkul/BookingProduct/src/Resources/lang/fa/app.php @@ -63,7 +63,8 @@ return [ 'day' => 'روز', 'status' => 'وضعیت', 'open' => 'باز کن', - 'close' => 'بستن' + 'close' => 'بستن', + 'time-error' => 'The to time must be greater than the from time.' ] ] ], diff --git a/packages/Webkul/BookingProduct/src/Resources/lang/it/app.php b/packages/Webkul/BookingProduct/src/Resources/lang/it/app.php index 657b49db9..c6ff75f93 100644 --- a/packages/Webkul/BookingProduct/src/Resources/lang/it/app.php +++ b/packages/Webkul/BookingProduct/src/Resources/lang/it/app.php @@ -63,7 +63,8 @@ return [ 'day' => 'Giorno', 'status' => 'Stato', 'open' => 'Aperto', - 'close' => 'Chiuso' + 'close' => 'Chiuso', + 'time-error' => 'The to time must be greater than the from time.' ] ] ], diff --git a/packages/Webkul/BookingProduct/src/Resources/lang/nl/app.php b/packages/Webkul/BookingProduct/src/Resources/lang/nl/app.php index a557dc9bf..21bf8f20c 100644 --- a/packages/Webkul/BookingProduct/src/Resources/lang/nl/app.php +++ b/packages/Webkul/BookingProduct/src/Resources/lang/nl/app.php @@ -63,7 +63,8 @@ return [ 'day' => 'Dag', 'status' => 'Toestand', 'open' => 'Open', - 'close' => 'Dichtbij' + 'close' => 'Dichtbij', + 'time-error' => 'The to time must be greater than the from time.' ] ] ], diff --git a/packages/Webkul/BookingProduct/src/Resources/lang/pt_BR/app.php b/packages/Webkul/BookingProduct/src/Resources/lang/pt_BR/app.php index afdf84266..4ce1db96a 100755 --- a/packages/Webkul/BookingProduct/src/Resources/lang/pt_BR/app.php +++ b/packages/Webkul/BookingProduct/src/Resources/lang/pt_BR/app.php @@ -63,7 +63,8 @@ return [ 'day' => 'Dia', 'status' => 'Status', 'open' => 'Aberto', - 'close' => 'Fechar' + 'close' => 'Fechar', + 'time-error' => 'The to time must be greater than the from time.' ] ] ], diff --git a/packages/Webkul/BookingProduct/src/Resources/views/admin/catalog/products/accordians/booking/slots.blade.php b/packages/Webkul/BookingProduct/src/Resources/views/admin/catalog/products/accordians/booking/slots.blade.php index 8cd5a23a2..0e68c75a5 100644 --- a/packages/Webkul/BookingProduct/src/Resources/views/admin/catalog/products/accordians/booking/slots.blade.php +++ b/packages/Webkul/BookingProduct/src/Resources/views/admin/catalog/products/accordians/booking/slots.blade.php @@ -27,7 +27,7 @@
- - +
- + @@ -192,4 +192,20 @@ }, } }); + + const time_validator = { + getMessage: (field) => { + return "{{ __('bookingproduct::app.admin.catalog.products.time-error') }}" + }, + + validate: (value, min) => { + if (Array.isArray(value) || value === null || value === undefined || value === '') { + return false; + } + + return value > min; + } + }; + + VeeValidate.Validator.extend('time_min', time_validator); \ No newline at end of file