90 lines
4.3 KiB
HTML
90 lines
4.3 KiB
HTML
{% extends 'theme/base.html' %}
|
|
{% load i18n %}
|
|
{% block main %}
|
|
{% include 'components/generic/navbar.html' %}
|
|
<section class="bg-white py-8 antialiased dark:bg-gray-900 md:py-8">
|
|
<div class="mx-auto max-w-screen-lg px-4 2xl:px-0">
|
|
<h2
|
|
class="mb-4 text-xl font-semibold text-gray-900 dark:text-white sm:text-2xl md:mb-6"
|
|
>
|
|
{% translate 'Mi cuenta' %}
|
|
</h2>
|
|
<div
|
|
class="mt-4 p-6 border border-gray-100 rounded-md dark:border-gray-600"
|
|
hx-get="{% url 'web:user_info_component' %}" hx-trigger="load"
|
|
>
|
|
|
|
</div>
|
|
|
|
<div class="mt-4 p-6 border border-gray-100 rounded-md dark:border-gray-600">
|
|
<div class="flex space-x-4">
|
|
<div>
|
|
<h3 class="flex items-center text-xl font-bold leading-none text-gray-900 dark:text-white sm:text-2xl">
|
|
{% translate 'Mis direcciones' %}
|
|
</h3>
|
|
</div>
|
|
|
|
</div>
|
|
<hr class="h-px my-2 bg-gray-200 border-0 dark:bg-gray-700">
|
|
|
|
{% if customer_addresses.count == 0 %}
|
|
<span class="text-gray-500 dark:text-gray-400">{% translate 'No hay ninguna dirección' %}</span>
|
|
{% endif %}
|
|
|
|
{% for address in customer_addresses %}
|
|
<div class="py-2 md:py-4">
|
|
<div class="mb-4 grid gap-4 sm:grid-cols-2 sm:gap-8 lg:gap-16">
|
|
<div class="space-y-4">
|
|
<dl>
|
|
<dt class="font-semibold text-gray-900 dark:text-white">{% translate 'Nombre completo' %}</dt>
|
|
<dd class="flex items-center gap-1 text-gray-500 dark:text-gray-400">
|
|
{{ address.full_name }}
|
|
</dd>
|
|
</dl>
|
|
<dl>
|
|
<dt class="font-semibold text-gray-900 dark:text-white">{% translate 'Dirección' %}</dt>
|
|
<dd class="flex items-center gap-1 text-gray-500 dark:text-gray-400">
|
|
{{ address.address }}
|
|
</dd>
|
|
</dl>
|
|
<dl>
|
|
<dt class="font-semibold text-gray-900 dark:text-white">{% translate 'Código postal' %}</dt>
|
|
<dd class="text-gray-500 dark:text-gray-400">{{ address.address_zip }}</dd>
|
|
</dl>
|
|
<dl>
|
|
<dt class="font-semibold text-gray-900 dark:text-white">{% translate 'Teléfono' %}</dt>
|
|
<dd class="text-gray-500 dark:text-gray-400">{{ address.address_phone }}</dd>
|
|
</dl>
|
|
</div>
|
|
<div class="space-y-4">
|
|
<dl>
|
|
<dt class="font-semibold text-gray-900 dark:text-white">{% translate 'Localidad' %}</dt>
|
|
<dd class="text-gray-500 dark:text-gray-400">{{ address.address_town }}</dd>
|
|
</dl>
|
|
<dl>
|
|
<dt class="font-semibold text-gray-900 dark:text-white">{% translate 'Provincia' %}</dt>
|
|
<dd class="text-gray-500 dark:text-gray-400">{{ address.address_state }}</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
</div>
|
|
<button hx-on:click="htmx.toggleClass(htmx.find('#accountInformationModal2'), 'hidden')" type="button"
|
|
data-modal-target="accountInformationModal2" data-modal-toggle="accountInformationModal2"
|
|
class="inline-flex w-full items-center justify-center rounded-lg bg-primary-700 px-5 py-2.5 text-sm font-medium text-white hover:bg-primary-800 focus:outline-none focus:ring-4 focus:ring-primary-300 dark:bg-primary-600 dark:hover:bg-primary-700 dark:focus:ring-primary-800 sm:w-auto">
|
|
<svg class="-ms-0.5 me-1.5 h-4 w-4" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="24"
|
|
height="24" fill="none" viewBox="0 0 24 24">
|
|
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
|
d="m14.304 4.844 2.852 2.852M7 7H4a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1h11a1 1 0 0 0 1-1v-4.5m2.409-9.91a2.017 2.017 0 0 1 0 2.853l-6.844 6.844L8 14l.713-3.565 6.844-6.844a2.015 2.015 0 0 1 2.852 0Z"></path>
|
|
</svg>
|
|
{% translate 'Editar datos' %}
|
|
</button>
|
|
</div>
|
|
{% if not forloop.last %}
|
|
<hr class="h-px my-2 bg-gray-200 border-0 dark:bg-gray-700">
|
|
{% endif %}
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
|
|
</section>
|
|
{% endblock %} |