Conflcts resolved

This commit is contained in:
sanjay bhatt 2022-11-28 13:50:31 +05:30
commit 8d4bdce16d
33 changed files with 169 additions and 75 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,5 @@
/*!
* Pusher JavaScript Library v7.4.0
* Pusher JavaScript Library v7.5.0
* https://pusher.com/
*
* Copyright 2020, Pusher
@ -18,7 +18,7 @@
*/
/*!
* Vue.js v2.7.13
* Vue.js v2.7.14
* (c) 2014-2022 Evan You
* Released under the MIT License.
*/

View File

@ -1,4 +1,4 @@
{
"/js/admin.js": "/js/admin.js?id=7dc6328afc24d9a99959",
"/css/admin.css": "/css/admin.css?id=32df152ceb97eee31f8e"
"/js/admin.js": "/js/admin.js?id=c523ce7636e9eae3dd05",
"/css/admin.css": "/css/admin.css?id=295abc30d293848c6226"
}

View File

@ -498,7 +498,7 @@ body {
&.has-error {
&.date {
&::after {
top: 47px;
top: 47px !important;
}
}
}

View File

@ -64,13 +64,15 @@ return [
'status' => 'الحالة',
'open' => 'افتح',
'close' => 'غلق',
'time-error' => 'يجب أن يكون وقت إلى وقت أكبر من وقت من وقت.'
'time-error' => 'يجب أن يكون وقت إلى وقت أكبر من وقت من وقت.',
]
],
'sales' => [
'bookings' => [
'title' => 'معلومات الحجز',
'table-view' => "عرض جدول",
'calender-view' => "عرض التقويم",
]
],

View File

@ -71,6 +71,8 @@ return [
'sales' => [
'bookings' => [
'title' => 'বুকিং',
'table-view' => "টেবিল ভিউ",
'calender-view' => "ক্যালেন্ডার ভিউ",
]
],

View File

@ -64,13 +64,15 @@ return [
'status' => 'Status',
'open' => 'Open',
'close' => 'Close',
'time-error' => 'The to time must be greater than the from time.'
'time-error' => 'The to time must be greater than the from time.',
]
],
'sales' => [
'bookings' => [
'title' => 'Bookings',
'table-view' => "Table View",
'calender-view' => "Calender View",
]
],

View File

@ -64,13 +64,15 @@ return [
'status' => 'Status',
'open' => 'Open',
'close' => 'Close',
'time-error' => 'The to time must be greater than the from time.'
'time-error' => 'The to time must be greater than the from time.',
]
],
'sales' => [
'bookings' => [
'title' => 'Bookings',
'table-view' => "Table View",
'calender-view' => "Calender View",
]
],

View File

@ -64,13 +64,15 @@ return [
'status' => 'Estado',
'open' => 'Abierto',
'close' => 'Cerrado',
'time-error' => 'The to time must be greater than the from time.'
'time-error' => 'The to time must be greater than the from time.',
]
],
'sales' => [
'bookings' => [
'title' => 'Información sobre Reservas',
'table-view' => "Vista de tabla",
'calender-view' => "Vista de calendario",
]
],

View File

@ -64,13 +64,15 @@ return [
'status' => 'وضعیت',
'open' => 'باز کن',
'close' => 'بستن',
'time-error' => 'زمان به زمان باید بیشتر از زمان باشد.'
'time-error' => 'زمان به زمان باید بیشتر از زمان باشد.',
]
],
'sales' => [
'bookings' => [
'title' => 'اطلاعات رزرو',
'table-view' => "نمای جدول",
'calender-view' => "نمای تقویم",
]
],

View File

@ -64,13 +64,15 @@ return [
'status' => 'Status',
'open' => 'Open',
'close' => 'Close',
'time-error' => 'The to time must be greater than the from time.'
'time-error' => 'The to time must be greater than the from time.',
]
],
'sales' => [
'bookings' => [
'title' => 'Bookings',
'table-view' => "Vue de tableau",
'calender-view' => "Affichage du calendrier",
]
],

View File

@ -64,13 +64,15 @@ return [
'status' => 'Status',
'open' => 'Open',
'close' => 'Close',
'time-error' => 'The to time must be greater than the from time.'
'time-error' => 'The to time must be greater than the from time.',
]
],
'sales' => [
'bookings' => [
'title' => 'Bookings',
'table-view' => "Table View",
'calender-view' => "Calender View",
]
],

View File

@ -64,13 +64,15 @@ return [
'status' => 'स्थिति',
'open' => 'खुला हुआ',
'close' => 'बंद करना',
'time-error' => 'समय को समय से बड़ा होना चाहिए।'
'time-error' => 'समय को समय से बड़ा होना चाहिए।',
]
],
'sales' => [
'bookings' => [
'title' => 'बुकिंग के',
'table-view' => "तालिका दृश्य",
'calender-view' => "कैलेंडर दृश्य",
]
],

View File

@ -65,13 +65,15 @@ return [
'status' => 'Stato',
'open' => 'Aperto',
'close' => 'Chiuso',
'time-error' => 'The to time must be greater than the from time.'
'time-error' => 'The to time must be greater than the from time.',
]
],
'sales' => [
'bookings' => [
'title' => 'Informazioni Prenotazione',
'table-view' => "Vista tabella",
'calender-view' => "Vista Calendario",
]
],

View File

@ -64,13 +64,15 @@ return [
'status' => 'Status',
'open' => 'Open',
'close' => 'Close',
'time-error' => 'The to time must be greater than the from time.'
'time-error' => 'The to time must be greater than the from time.',
]
],
'sales' => [
'bookings' => [
'title' => 'Bookings',
'table-view' => "Table View",
'calender-view' => "Calender View",
]
],

View File

@ -64,13 +64,15 @@ return [
'status' => 'Toestand',
'open' => 'Open',
'close' => 'Dichtbij',
'time-error' => 'The to time must be greater than the from time.'
'time-error' => 'The to time must be greater than the from time.',
]
],
'sales' => [
'bookings' => [
'title' => 'Boekingsinformatie',
'table-view' => "Kalenderweergave",
'calender-view' => "Kalenderweergave",
]
],

View File

@ -64,13 +64,15 @@ return [
'status' => 'Status',
'open' => 'Open',
'close' => 'Close',
'time-error' => 'The to time must be greater than the from time.'
'time-error' => 'The to time must be greater than the from time.',
]
],
'sales' => [
'bookings' => [
'title' => 'Bookings',
'table-view' => "Table View",
'calender-view' => "Calender View",
]
],

View File

@ -64,13 +64,15 @@ return [
'status' => 'Status',
'open' => 'Aberto',
'close' => 'Fechar',
'time-error' => 'The to time must be greater than the from time.'
'time-error' => 'The to time must be greater than the from time.',
]
],
'sales' => [
'bookings' => [
'title' => 'Informações de reserva',
'table-view' => "Vista de mesa",
'calender-view' => "Visualização de calendário",
]
],

View File

@ -64,13 +64,15 @@ return [
'status' => 'Статус',
'open' => 'Открыть',
'close' => 'Закрыть',
'time-error' => 'Время окончания должно быть позже времени начала.'
'time-error' => 'Время окончания должно быть позже времени начала.',
]
],
'sales' => [
'bookings' => [
'title' => 'Брони',
'table-view' => "Табличный вид",
'calender-view' => "Просмотр календаря",
]
],

View File

@ -64,13 +64,15 @@ return [
'status' => 'Status',
'open' => 'Open',
'close' => 'Close',
'time-error' => 'The to time must be greater than the from time.'
'time-error' => 'The to time must be greater than the from time.',
]
],
'sales' => [
'bookings' => [
'title' => 'Bookings',
'table-view' => "Table View",
'calender-view' => "Calender View",
]
],

View File

@ -64,13 +64,15 @@ return [
'status' => 'Durum',
'open' => 'Açık',
'close' => 'Kapalı',
'time-error' => 'Gidiş zamanı, başlangıç zamanından daha büyük olmalıdır.'
'time-error' => 'Gidiş zamanı, başlangıç zamanından daha büyük olmalıdır.',
]
],
'sales' => [
'bookings' => [
'title' => 'Rezervasyonlar',
'table-view' => "Tablo görünümü",
'calender-view' => "Takvim Görünümü",
]
],

View File

@ -64,13 +64,15 @@ return [
'status' => 'Статус',
'open' => 'Відкрити',
'close' => 'Закрити',
'time-error' => 'Час закінчення повинен бути пізніше часу початку.'
'time-error' => 'Час закінчення повинен бути пізніше часу початку.',
]
],
'sales' => [
'bookings' => [
'title' => 'Бронювання',
'table-view' => "Перегляд таблиці",
'calender-view' => "Перегляд календаря",
]
],

View File

@ -64,13 +64,15 @@ return [
'status' => '状态',
'open' => '开门',
'close' => '关门',
'time-error' => '这个时间必须大于开始时间.'
'time-error' => '这个时间必须大于开始时间.',
]
],
'sales' => [
'bookings' => [
'title' => '预订信息',
'table-view' => "表視圖",
'calender-view' => "日曆視圖",
]
],

View File

@ -1,18 +1,18 @@
<div class="switch-view-container">
@if (request('view_type'))
<a href="{{ route('admin.sales.bookings.index') }}" class="icon-container">
<a href="{{ route('admin.sales.bookings.index') }}" class="icon-container" title="{{ __('bookingproduct::app.admin.sales.bookings.table-view') }}">
<i class="icon table-icon"></i>
</a>
<a class="icon-container active">
<a class="icon-container active" title="{{ __('bookingproduct::app.admin.sales.bookings.calender-view') }}">
<i class="icon calendar-white-icon"></i>
</a>
@else
<a class="icon-container active">
<a class="icon-container active" title="{{ __('bookingproduct::app.admin.sales.bookings.table-view') }}">
<i class="icon table-white-icon"></i>
</a>
<a href="{{ route('admin.sales.bookings.index', ['view_type' => 'calendar']) }}" class="icon-container">
<a href="{{ route('admin.sales.bookings.index', ['view_type' => 'calendar']) }}" class="icon-container" title="{{ __('bookingproduct::app.admin.sales.bookings.calender-view') }}">
<i class="icon calendar-icon"></i>
</a>
@endif

View File

@ -43,7 +43,9 @@
</quantity-changer>
</div>
<p>@{{ ticket.description }}</p>
<div class="ticket-item">
<p>@{{ ticket.description }}</p>
</div>
</div>
</div>
</div>

View File

@ -42,8 +42,10 @@
:min-quantity="defaultQty">
</quantity-changer>
</div>
<p>@{{ ticket.description }}</p>
<div class="ticket-item">
<p>@{{ ticket.description }}</p>
</div>
</div>
</div>
</div>

View File

@ -61,7 +61,9 @@ class Indexer extends Command
if ($mode == 'full') {
$indexer->reindexFull();
} else {
$indexer->reindexSelective();
if ($indexerId != 'inventory') {
$indexer->reindexSelective();
}
}
}

View File

@ -9,6 +9,17 @@ abstract class AbstractIndexer
*/
protected const BATCH_SIZE = 100;
/**
* Special price from attribute id
*/
protected const SPECIAL_PRICE_FROM_ATTRIBUTE_ID = 14;
/**
* Special price to attribute id
*/
protected const SPECIAL_PRICE_TO_ATTRIBUTE_ID = 15;
abstract public function reindexBatch(array $products);
/**

View File

@ -2,6 +2,7 @@
namespace Webkul\Product\Helpers\Indexers;
use Illuminate\Support\Carbon;
use Webkul\Customer\Repositories\CustomerGroupRepository;
use Webkul\Product\Repositories\ProductRepository;
use Webkul\Product\Repositories\ProductPriceIndexRepository;
@ -63,6 +64,53 @@ class Price extends AbstractIndexer
request()->query->remove('cursor');
}
/**
* Reindexed products with price which depends on date
*
* @return void
*/
public function reindexSelective()
{
while (true) {
$paginator = $this->productRepository
->select('products.*')
->with([
'variants',
'attribute_values',
'variants.attribute_values',
'price_indices',
'variants.price_indices',
'customer_group_prices',
'variants.customer_group_prices',
'catalog_rule_prices',
'variants.catalog_rule_prices',
])
->join('product_attribute_values as special_price_from_pav', function ($join) {
$join->on('products.id', '=', 'special_price_from_pav.product_id')
->where('special_price_from_pav.attribute_id', self::SPECIAL_PRICE_FROM_ATTRIBUTE_ID);
})
->join('product_attribute_values as special_price_to_pav', function ($join) {
$join->on('products.id', '=', 'special_price_to_pav.product_id')
->where('special_price_to_pav.attribute_id', self::SPECIAL_PRICE_TO_ATTRIBUTE_ID);
})
->where(function($query) {
return $query->orWhere('special_price_from_pav.date_value', Carbon::now()->format('Y-m-d'))
->orWhere('special_price_to_pav.date_value', Carbon::now()->subDays(1)->format('Y-m-d'));
})
->cursorPaginate($this->batchSize);
$this->reindexBatch($paginator->items());
if (! $cursor = $paginator->nextCursor()) {
break;
}
request()->query->add(['cursor' => $cursor->encode()]);
}
request()->query->remove('cursor');
}
/**
* Reindex products by batch size

View File

@ -94,58 +94,47 @@ abstract class AbstractType
$rulePrice = $this->getCatalogRulePrice();
$discountedPrice = $this->product->special_price;
if (
empty($discountedPrice)
&& ! $rulePrice
empty($this->product->special_price)
&& empty($rulePrice)
&& $customerGroupPrice == $this->product->price
) {
return $this->product->price;
}
$haveDiscount = false;
if (! (float) $discountedPrice) {
if (
$rulePrice
&& $rulePrice->price < $this->product->price
) {
$discountedPrice = $rulePrice->price;
$haveDiscount = true;
if (! (float) $this->product->special_price) {
if ($rulePrice) {
$discountedPrice = min($rulePrice->price, $this->product->price);
} else {
$discountedPrice = $this->product->price;
}
} else {
if (
$rulePrice
&& $rulePrice->price <= $discountedPrice
) {
$discountedPrice = $rulePrice->price;
$haveDiscount = true;
} else {
if (core()->isChannelDateInInterval(
$this->product->special_price_from,
$this->product->special_price_to
)) {
$haveDiscount = true;
} elseif ($rulePrice) {
if ($rulePrice) {
if (
core()->isChannelDateInInterval(
$this->product->special_price_from,
$this->product->special_price_to
)
) {
$discountedPrice = min($rulePrice->price, $this->product->special_price);
} else {
$discountedPrice = $rulePrice->price;
$haveDiscount = true;
}
} else {
if (
core()->isChannelDateInInterval(
$this->product->special_price_from,
$this->product->special_price_to
)
) {
$discountedPrice = $this->product->special_price;
} else {
$discountedPrice = $this->product->price;
}
}
}
if ($haveDiscount) {
$discountedPrice = min($discountedPrice, $customerGroupPrice);
} else {
if ($customerGroupPrice !== $this->product->price) {
$discountedPrice = $customerGroupPrice;
}
}
return $discountedPrice;
return min($discountedPrice, $customerGroupPrice);
}
/**

View File

@ -44,9 +44,11 @@ class ProductsCategoriesProxyController extends Controller
}
if ($product = $this->productRepository->findBySlug($slugOrPath)) {
$customer = auth()->guard('customer')->user();
if ($product->visible_individually && $product->url_key) {
$customer = auth()->guard('customer')->user();
return view($this->_config['product_view'], compact('product', 'customer'));
return view($this->_config['product_view'], compact('product', 'customer'));
}
}
abort(404);

View File

@ -18,7 +18,7 @@ return [
'common' => [
'error' => '发生错误。请稍后再试.',
'image-upload-limit' => '图片最大上传大小为2MB',
'no-result-found' => '我们找不到任何记录.'
'no-result-found' => '我们找不到任何记录.',
],
'home' => [