feat: created component to edit addresses
This commit is contained in:
@@ -31,58 +31,7 @@
|
||||
<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 %}
|
||||
{% include 'components/users/retrieve_update_address.html' %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user