edition/partials/shop-top.hbs

49 lines
1.9 KiB
Handlebars

<!--<div id="total-rose-ash-shop-ws">wss</div>
<div hx-ext="ws" ws-connect="shop-ws/ws-total"></div> -->
<div
hx-get="shop/totals/"
hx-trigger="load delay:1ms"
hx-on::config-request = "
event.detail.path = !(
new URLSearchParams(window.location.search
).get('order'))
? 'shop/totals/'
: 'shop/totals/?orderId=' + new URLSearchParams(window.location.search).get('order');
";
hx-swap="outerHTML"
></div>
<div
id="order-form-rose-ash-shop"
hx-get="shop/order"
hx-swap="outerHTML"
hx-trigger="load delay:1ms"
hx-target="#order-form-rose-ash-shop"
hx-on::config-request="event.detail.path += window.location.search;"
hx-on::confirm="
console.log(window.location.search)
console.log('checking...')
if (false && new URLSearchParams(window.location.search).get('show') !== 'buy') {
event.preventDefault();
}
"
>
<div class="spinner-border" role="status">
<span class="sr-only">Loading...</span>
</div>
</div>
<div
id="order-detail-rose-ash-shop"
hx-get="order"
hx-trigger="load delay:1ms"
hx-on::config-request="event.detail.path = new URLSearchParams(window.location.search).get('order') ? 'shop/order/' + new URLSearchParams(window.location.search).get('order')+ '/' : null; //6a919002-94eb-467d-a226-5dd05b7f44a3 '"
hx-on::confirm = " if (!new URLSearchParams(window.location.search).get('order')) { event.preventDefault(); }"
hx-swap="innerHTML"
>
</div>