{% extends 'base.html' %}
{% load i18n %}
{% block title %}{% trans "View Vendor" %}{% endblock title %}
{% block content %}
    
        <!-- Delete Modal -->
    <div class="modal fade" id="deleteModal"
         data-bs-backdrop="static"
         data-bs-keyboard="false"
         tabindex="-1"
         aria-labelledby="deleteModalLabel"
         aria-hidden="true">
        <div class="modal-dialog modal-sm ">
            <div class="modal-content rounded">
                <div class="modal-body d-flex justify-content-center">
                    <h1 class="text-danger me-2"><i class="bi bi-exclamation-diamond-fill"></i></h1>
                    <span class="text-danger">
                        {% trans "Are you sure you want to delete this vendor?" %}
                    </span>
                </div>
                <div class="btn-group">
                    <button type="button"
                            class="btn btn-secondary"
                            data-bs-dismiss="modal">
                        {% trans 'No' %}
                    </button>
                    <a type="button"
                       class="btn btn-danger"
                       href="{% url 'vendor_delete' vendor.id %}">
                        {% trans 'Yes' %}
                    </a>
                </div>
            </div>
        </div>
    </div>
<div class="container">
    <h1>{% trans "Vendor Details" %}</h1>
    <ul>
        <li><strong>{% trans "Name" %}:</strong>
      
               {{ vendor.get_local_name }}
        </li>
        <li><strong>{% trans "Contact Person" %}:</strong> {{ vendor.contact_person }}</li>
        <li><strong>{% trans "Phone Number" %}:</strong> {{ vendor.phone_number }}</li>
        <li><strong>{% trans "Email" %}:</strong> {{ vendor.email }}</li>
        <li><strong>{% trans "Address" %}:</strong> {{ vendor.address }}</li>
    </ul>
    <a class="btn btn-sm btn-primary" href="{% url 'vendor_update' vendor.id %}">{% trans "Edit" %}</a>
    <a class="btn btn-sm btn-danger me-1"
               data-bs-toggle="modal"
               data-bs-target="#deleteModal">
                <!--<i class="bi bi-trash-fill"></i>-->
                {{ _("Delete") }}
            </a>
</div>
{% endblock %}
