Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<x-rapidez::button.outline href="{{ route('wishlist.listing') }}" class="mt-5">@lang('Back to wishlists')</x-rapidez::button.outline>
<x-rapidez::button.outline href="{{ route('wishlist.listing') }}" class="mt-5 w-fit">@lang('Back to wishlists')</x-rapidez::button.outline>
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<div v-if="wishlist.description" class="p-4 text-primary rounded bg mb-4 whitespace-pre-line">
<div v-if="wishlist.description" class="p-4 text rounded bg mb-4 whitespace-pre-line">
<p>@{{ wishlist.description }}</p>
</div>
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<td>
<span class="text-sm font-bold text-primary">@{{ product.price | price }}</span>
<span class="text-sm font-bold text">@{{ product.price | price }}</span>
</td>
10 changes: 5 additions & 5 deletions resources/views/account/partials/details/title.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,18 @@

@if ($editable)
<template v-else>
<form class="flex flex-col" v-on:submit.stop="save">
<form class="flex flex-col gap-2" v-on:submit.stop="save">
<div class="flex items-center">
<x-rapidez-ct::title href="/account/wishlists"></x-rapidez-ct::title>
<div class="relative border rounded">
<x-rapidez::input class="w-80 border-0 pr-12" name="Edit title" type="text" v-model="editing.title" />
<x-rapidez::button.secondary class="!absolute -translate-y-1/2 top-1/2 right-1 ml-4 flex items-center justify-center !p-0 size-9">
<x-heroicon-o-pencil-square class="size-5 text-white" />
<x-rapidez::button.secondary class="!absolute -translate-y-1/2 top-1/2 right-1 flex items-center justify-center !p-0 size-9 min-h-0">
<x-heroicon-o-pencil-square class="size-4 text-white" />
</x-rapidez::button.secondary>
</div>
</div>
<x-rapidez::input.textarea class="mt-2.5" label="" name="Description" v-model="editing.description"></x-rapidez::input.textarea>
<x-rapidez::input.checkbox class="mt-2.5" v-model="editing.shared">@lang('Share this wishlist')</x-rapidez::input.checkbox>
<x-rapidez::input.textarea label="" name="Description" v-model="editing.description"></x-rapidez::input.textarea>
<x-rapidez::input.checkbox v-model="editing.shared">@lang('Share this wishlist')</x-rapidez::input.checkbox>
</form>
</template>
@endif
Expand Down
114 changes: 51 additions & 63 deletions resources/views/account/partials/details/wishlist.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,69 +8,57 @@
</div>
</div>
@include('rapidez-mw::account.partials.details.description')
<listing v-cloak>
<div slot-scope="{ loaded }">
<reactive-base :app="config.es_prefix + '_products_' + config.store" :url="config.es_url" v-if="loaded">
<reactive-list id="products" component-id="products" data-field="entity_id" :default-query="function() { return { query: { terms: { 'entity_id': wishlist.items.map(e => e.product_id) } } } }">
<div slot="renderResultStats"></div>
<div slot="renderNoResults"></div>
<div slot="loader"></div>
<div slot="render" slot-scope="{ data, loading }" class="flex flex-col">
<template v-if="wishlist?.items?.length">
<template v-if="loading">
<x-heroicon-o-arrow-path class="animate-spin size-6"/>
</template>
<table v-if="data" class="font-sans">
<x-rapidez-mw::table.header>
<th class="max-md:text-start">
<p class="whitespace-nowrap">
@{{ wishlist.items.length }}
<template v-if="wishlist.items.length != 1">
@lang('articles')
</template>
<template v-else>
@lang('article')
</template>
</p>
</th>
<th class="!pl-0 max-md:hidden"></th>
@if($editable)
<th class="!pl-0 max-md:hidden"></th>
@endif
<th class="!text-center max-md:hidden">@lang('Amount')</th>
<th class="!pl-0 max-md:hidden"></th>
</x-rapidez-mw::table.header>
<tbody>
<template v-for="(item, index) in wishlist.items">
<wishlist-item :data="data" :item="item" :wishlist-id="wishlist.id">
<div
class="border-b flex flex-wrap items-center gap-y-5 py-5 *:px-2 last:border-none md:align-middle md:table-row md:*:py-5 md:*:px-1.5"
v-bind:class="{'opacity-70': product && !product.in_stock }"
slot-scope="{ _renderProxy: self, product, remove, category }"
v-bind:key="item.id"
>
<template v-if="product">
@include('rapidez-mw::account.partials.details.product.image')
@include('rapidez-mw::account.partials.details.product.name')
@include('rapidez-mw::account.partials.details.product.remove')
@include('rapidez-mw::account.partials.details.product.quantity')
@include('rapidez-mw::account.partials.details.product.price')
</template>
</div>
</wishlist-item>
<x-rapidez::productlist field="entity_id" value="wishlist.items.map(e => e.product_id)">
<x-slot:items>
<template v-if="wishlist?.items?.length">
<table v-if="items">
<x-rapidez-mw::table.header>
<th class="max-md:text-start">
<p class="whitespace-nowrap">
@{{ wishlist.items.length }}
<template v-if="wishlist.items.length != 1">
@lang('articles')
</template>
<template v-else>
@lang('article')
</template>
</p>
</th>
<th class="!pl-0 max-md:hidden"></th>
@if($editable)
<th class="!pl-0 max-md:hidden"></th>
@endif
<th class="!text-center max-md:hidden">@lang('Amount')</th>
<th class="!pl-0 max-md:hidden"></th>
</x-rapidez-mw::table.header>
<tbody>
<template v-for="(item, index) in wishlist.items">
<wishlist-item :data="items" :item="item" :wishlist-id="wishlist.id">
<div
class="border-b flex flex-wrap items-center gap-y-5 py-5 *:px-2 last:border-none md:align-middle md:table-row md:*:py-5 md:*:px-1.5"
v-bind:class="{'opacity-70': product && !product.in_stock }"
slot-scope="{ _renderProxy: self, product, remove, category }"
v-bind:key="item.id"
>
<template v-if="product">
@include('rapidez-mw::account.partials.details.product.image')
@include('rapidez-mw::account.partials.details.product.name')
@include('rapidez-mw::account.partials.details.product.remove')
@include('rapidez-mw::account.partials.details.product.quantity')
@include('rapidez-mw::account.partials.details.product.price')
</template>
</tbody>
</table>
<div class="flex rounded bg p-3 md:justify-end">
@include('rapidez-mw::account.partials.details.addtocart')
</div>
</div>
</wishlist-item>
</template>
<template v-else>
@lang('You have no items in your wishlist')
</template>
</div>
</reactive-list>
</reactive-base>
</div>
</listing>
</tbody>
</table>
<div class="flex rounded bg p-3 md:justify-end">
@include('rapidez-mw::account.partials.details.addtocart')
</div>
</template>
<template v-else>
@lang('You have no items in your wishlist')
</template>
</x-slot:items>
</x-rapidez::productlist>
</div>