Skip to content

Commit

Permalink
some more cleanup done
Browse files Browse the repository at this point in the history
  • Loading branch information
devansh-webkul committed Jun 22, 2023
1 parent 7babf65 commit a325357
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,10 @@ public function __construct(
*/
public function index(): JsonResource
{
$categories = $this->categoryRepository->scopeQuery(function ($query) {
return $query->whereNotNull('parent_id')->where('status', 1);
})->paginate();
$categories = $this->categoryRepository
->whereNotNull('parent_id')
->where('status', 1)
->paginate();

return CategoryResource::collection($categories);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
title="{{ $title }}"
navigation-link="{{ $navigationLink ?? '' }}"
>
<x-shop::shimmer.products.carousel :navigation-link="$navigationLink ?? false"></x-shop::shimmer.products.carousel>
<x-shop::shimmer.categories.carousel :navigation-link="$navigationLink ?? false"></x-shop::shimmer.categories.carousel>
</v-categories-carousel>

@pushOnce('scripts')
Expand Down Expand Up @@ -55,7 +55,11 @@ class="bs-carousal-prev flex border border-black items-center justify-center rou

<!-- category carousel shimmer -->
<template v-if="isLoading">
<x-shop::shimmer.categories.carousel :count="7" :navigation-link="$navigationLink ?? false"></x-shop::shimmer.categories.carousel>
<x-shop::shimmer.categories.carousel
:count="7"
:navigation-link="$navigationLink ?? false"
>
</x-shop::shimmer.categories.carousel>
</template>
</script>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

<div class="container mt-[60px] max-lg:px-[30px] max-sm:mt-[20px]">
<div class="bs-item-carousal-wrapper relative">
<div class="flex gap-10 overflow-auto scrollbar-hide justify-center">
<div class="flex gap-10 overflow-auto scrollbar-hide">
@for ($i = 0; $i < $count; $i++)
<div class="grid grid-cols-1 justify-items-center gap-[15px] min-w-[120px]">
<div class="relative overflow-hidden rounded-full w-[110px] h-[110px] bg-[#E9E9E9] shimmer">
<img
<img
class="rounded-sm bg-[#F5F5F5]"
src=""
src=""
alt=""
>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ class="min-w-[291px]"
<a class="block mx-auto w-[150.172px] h-[48px] rounded-[18px] mt-[60px] shimmer">
</a>
@endif
</div>
</div>
7 changes: 2 additions & 5 deletions packages/Webkul/Shop/src/Routes/api.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
Route::post('move-to-wishlist', 'moveToWishlist')->name('shop.api.compare.move_to_wishlist');
});

Route::group(['middleware' => ['customer']], function () {
Route::group(['middleware' => ['customer'], 'prefix' => 'customer'], function () {
Route::controller(WishlistController::class)->prefix('wishlist')->group(function () {
Route::get('', 'index')->name('shop.api.customers.account.wishlist.index');

Expand All @@ -70,9 +70,6 @@
Route::delete('{id}', 'destroy')->name('shop.api.customers.account.wishlist.destroy');
});

Route::get('compare-items/{product_id}', [CompareController::class, 'store'])
->name('shop.customers.account.compare.store');

Route::get('/customer/addresses', [AddressController::class, 'index'])->name('api.shop.customers.account.addresses.index');
Route::get('addresses', [AddressController::class, 'index'])->name('api.shop.customers.account.addresses.index');
});
});

0 comments on commit a325357

Please sign in to comment.