mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-11 12:29:24 +00:00
Apply all biomejs fixes
This commit is contained in:
@ -56,11 +56,11 @@
|
||||
{# Total price #}
|
||||
<li style="margin-top: 20px">
|
||||
<span class="item-name"><strong>{% trans %}Basket amount: {% endtrans %}</strong></span>
|
||||
<span x-text="get_total().toFixed(2) + ' €'" class="item-price"></span>
|
||||
<span x-text="getTotal().toFixed(2) + ' €'" class="item-price"></span>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="catalog-buttons">
|
||||
<button @click="clear_basket()" class="btn btn-grey">
|
||||
<button @click="clearBasket()" class="btn btn-grey">
|
||||
<i class="fa fa-trash"></i>
|
||||
{% trans %}Clear{% endtrans %}
|
||||
</button>
|
||||
@ -106,7 +106,7 @@
|
||||
id="{{ p.id }}"
|
||||
class="product-button"
|
||||
:class="{selected: items.some((i) => i.id === {{ p.id }})}"
|
||||
@click='add_from_catalog({{ p.id }}, {{ p.name|tojson }}, {{ p.selling_price }})'
|
||||
@click='addFromCatalog({{ p.id }}, {{ p.name|tojson }}, {{ p.selling_price }})'
|
||||
>
|
||||
{% if p.icon %}
|
||||
<img class="product-image" src="{{ p.icon.url }}"
|
||||
|
@ -56,7 +56,7 @@
|
||||
<div
|
||||
class="collapse"
|
||||
:class="{'shadow': collapsed}"
|
||||
x-data="{collapsed: !billing_info_exist}"
|
||||
x-data="{collapsed: !billingInfoExist}"
|
||||
x-cloak
|
||||
>
|
||||
<div class="collapse-header clickable" @click="collapsed = !collapsed">
|
||||
@ -73,27 +73,27 @@
|
||||
x-data="billing_infos"
|
||||
x-show="collapsed"
|
||||
x-transition.scale.origin.top
|
||||
@submit.prevent="await send_form()"
|
||||
@submit.prevent="await sendForm()"
|
||||
>
|
||||
{% csrf_token %}
|
||||
{{ billing_form }}
|
||||
<br>
|
||||
<br>
|
||||
<div
|
||||
x-show="[BillingInfoReqState.SUCCESS, BillingInfoReqState.FAILURE].includes(req_state)"
|
||||
x-show="[BillingInfoReqState.SUCCESS, BillingInfoReqState.FAILURE].includes(reqState)"
|
||||
class="alert"
|
||||
:class="'alert-' + get_alert_color()"
|
||||
:class="'alert-' + getAlertColor()"
|
||||
x-transition
|
||||
>
|
||||
<div class="alert-main" x-text="get_alert_message()"></div>
|
||||
<div class="clickable" @click="req_state = null">
|
||||
<div class="alert-main" x-text="getAlertMessage()"></div>
|
||||
<div class="clickable" @click="reqState = null">
|
||||
<i class="fa fa-close"></i>
|
||||
</div>
|
||||
</div>
|
||||
<input
|
||||
type="submit" class="btn btn-blue clickable"
|
||||
value="{% trans %}Validate{% endtrans %}"
|
||||
:disabled="req_state === BillingInfoReqState.SENDING"
|
||||
:disabled="reqState === BillingInfoReqState.SENDING"
|
||||
>
|
||||
</form>
|
||||
</div>
|
||||
@ -141,16 +141,16 @@
|
||||
|
||||
{% block script %}
|
||||
<script>
|
||||
const billing_info_url = '{{ url("api:put_billing_info", user_id=request.user.id) }}';
|
||||
const et_data_url = '{{ url("api:etransaction_data") }}';
|
||||
const billing_info_exist = {{ "true" if billing_infos else "false" }};
|
||||
const billing_info_success_message = "{% trans %}Billing info registration success{% endtrans %}";
|
||||
const billing_info_failure_message = "{% trans %}Billing info registration failure{% endtrans %}";
|
||||
const billingInfoUrl = '{{ url("api:put_billing_info", user_id=request.user.id) }}';
|
||||
const etDataUrl = '{{ url("api:etransaction_data") }}';
|
||||
const billingInfoExist = {{ "true" if billing_infos else "false" }};
|
||||
const billingInfoSuccessMessage = "{% trans %}Billing info registration success{% endtrans %}";
|
||||
const billingInfoFailureMessage = "{% trans %}Billing info registration failure{% endtrans %}";
|
||||
|
||||
{% if billing_infos %}
|
||||
const et_data = {{ billing_infos|safe }}
|
||||
const etData = {{ billing_infos|safe }}
|
||||
{% else %}
|
||||
const et_data = {}
|
||||
const etData = {}
|
||||
{% endif %}
|
||||
</script>
|
||||
{{ super() }}
|
||||
|
Reference in New Issue
Block a user