Remove jquery-ui tabs from counter

This commit is contained in:
Antoine Bartuccio 2025-06-15 16:33:22 +02:00
parent c904e41ea3
commit 42434d10ca
Signed by: klmp200
GPG Key ID: E7245548C53F904B
2 changed files with 27 additions and 33 deletions

View File

@ -137,8 +137,3 @@ document.addEventListener("alpine:init", () => {
}, },
})); }));
}); });
$(() => {
// biome-ignore lint/suspicious/noExplicitAny: dealing with legacy jquery
($("#products") as any).tabs();
});

View File

@ -9,12 +9,14 @@
<link rel="stylesheet" type="text/css" href="{{ static('counter/css/counter-click.scss') }}" defer></link> <link rel="stylesheet" type="text/css" href="{{ static('counter/css/counter-click.scss') }}" defer></link>
<link rel="stylesheet" type="text/css" href="{{ static('bundled/core/components/ajax-select-index.css') }}" defer></link> <link rel="stylesheet" type="text/css" href="{{ static('bundled/core/components/ajax-select-index.css') }}" defer></link>
<link rel="stylesheet" type="text/css" href="{{ static('core/components/ajax-select.scss') }}" defer></link> <link rel="stylesheet" type="text/css" href="{{ static('core/components/ajax-select.scss') }}" defer></link>
<link rel="stylesheet" type="text/css" href="{{ static('core/components/tabs.scss') }}" defer></link>
<link rel="stylesheet" href="{{ static("core/components/card.scss") }}"> <link rel="stylesheet" href="{{ static("core/components/card.scss") }}">
{% endblock %} {% endblock %}
{% block additional_js %} {% block additional_js %}
<script type="module" src="{{ static('bundled/counter/counter-click-index.ts') }}"></script> <script type="module" src="{{ static('bundled/counter/counter-click-index.ts') }}"></script>
<script type="module" src="{{ static('bundled/counter/components/counter-product-select-index.ts') }}"></script> <script type="module" src="{{ static('bundled/counter/components/counter-product-select-index.ts') }}"></script>
<script type="module" src="{{ static('bundled/core/components/tabs-index.ts') }}"></script>
{% endblock %} {% endblock %}
{% block info_boxes %} {% block info_boxes %}
@ -205,35 +207,32 @@
{% trans %}No products available on this counter for this user{% endtrans %} {% trans %}No products available on this counter for this user{% endtrans %}
</div> </div>
{% else %} {% else %}
<ul> <ui-tab-group>
{% for category in categories.keys() -%} {% for category in categories.keys() -%}
<li><a href="#cat_{{ category|slugify }}">{{ category }}</a></li> <ui-tab title="{{ category }}" {% if loop.index == 1 -%}active{%- endif -%}>
{%- endfor %} <h5 class="margin-bottom">{{ category }}</h5>
</ul> <div class="row gap-2x">
{% for category in categories.keys() -%} {% for product in categories[category] -%}
<div id="cat_{{ category|slugify }}"> <button class="card shadow" @click="addToBasketWithMessage('{{ product.id }}', 1)">
<h5 class="margin-bottom">{{ category }}</h5> <img
<div class="row gap-2x"> class="card-image"
{% for product in categories[category] -%} alt="image de {{ product.name }}"
<button class="card shadow" @click="addToBasketWithMessage('{{ product.id }}', 1)"> {% if product.icon %}
<img src="{{ product.icon.url }}"
class="card-image" {% else %}
alt="image de {{ product.name }}" src="{{ static('core/img/na.gif') }}"
{% if product.icon %} {% endif %}
src="{{ product.icon.url }}" />
{% else %} <span class="card-content">
src="{{ static('core/img/na.gif') }}" <strong class="card-title">{{ product.name }}</strong>
{% endif %} <p>{{ product.price }} €<br>{{ product.code }}</p>
/> </span>
<span class="card-content"> </button>
<strong class="card-title">{{ product.name }}</strong> {%- endfor %}
<p>{{ product.price }} €<br>{{ product.code }}</p> </div>
</span> </ui-tab>
</button> {% endfor %}
{%- endfor %} </ui-tab-group>
</div>
</div>
{%- endfor %}
{% endif %} {% endif %}
</div> </div>
</div> </div>