{% extends "base.html" %}
{% block title %}Product Details{% endblock %}
{% block content %}
<div class="container mt-4">
    <h2>Product Details</h2>
    <table class="table table-bordered">
        <tr><th>ID</th><td>{{ product.id }}</td></tr>
        <tr><th>Product Name</th><td>{{ product.product_name }}</td></tr>
        <tr><th>Category</th><td>{% if product.category %}{{ product.category.name }}{% endif %}</td></tr>
        <tr><th>Price</th><td>{{ product.price }}</td></tr>
        <tr><th>Unit</th><td>{{ product.unit }}</td></tr>
        <tr><th>Description</th><td>{{ product.description|safe }}</td></tr>
        <tr><th>Created</th><td>{{ product.created_at }}</td></tr>
    </table>
    <a href="{% url 'product-management' %}" class="btn btn-secondary">Back</a>
    <a href="{% url 'product-edit' product.id %}" class="btn btn-warning">Edit</a>
</div>
{% endblock %}
