{% extends "base.html" %}
{% load static %}
{% block title %}Garment Details{% endblock %}
{% block content %}
<div class="container mt-4">
    <h2>Garment Details</h2>
    <div class="card mb-3">
        <div class="card-body">
            <h4 class="card-title">{{ garment.name }}</h4>
            <p><strong>Type:</strong> {{ garment.get_garment_type_display }}</p>
            <p><strong>Status:</strong> 
                {% if garment.trash %}
                    <span class="badge bg-danger">Trashed</span>
                {% elif garment.status == 'active' %}
                    <span class="badge bg-success">Active</span>
                {% else %}
                    <span class="badge bg-secondary">Inactive</span>
                {% endif %}
            </p>
            <p><strong>Description:</strong> {{ garment.description|safe }}</p>
            <p><strong>Service/Price:</strong></p>
            <ul>
                {% for sp in service_price_display %}
                    <li>{{ sp.service_name }}: <b>{{ sp.price }}</b></li>
                {% empty %}
                    <li class="text-muted">No services</li>
                {% endfor %}
            </ul>
            <a href="{% url 'garment-edit' garment.id %}" class="btn btn-warning">Edit</a>
            <a href="{% url 'garment-management' %}" class="btn btn-secondary">Back</a>
        </div>
    </div>
</div>
{% endblock %}
