{% extends 'base_structure/layout/base_template.html' %}
{% load static %}
{% block stylesheet %}
<!-- include required css cdn link through html here -->

{% endblock %}

{% block content %}


<div class="row layout-top-spacing">
    <div class="col-lg-12">
        <div class="row mb-2">
            <div class="col">
                <a onclick="history.back()" style="height: fit-content;width: fit-content;display: inline-block;">
                <h3 class="card-title m-2 d-flex align-items-center gap-2" style="width: fit-content;">
                    <span class="fw-bold material-symbols-outlined">
                    arrow_back
                    </span><span>Medication Details</span></h3>
                </a>
            </div>
        </div>

        <div class="row layout-spacing">
            <div class="col-lg-12">
                <div class="statbox widget box box-shadow">
                    <div class="widget-content widget-content-area">
                        <div class="row Users-tab p-4">
                            <div class="col-md-12">
                                <!-- Medication Details Card -->
                                <div class="card mb-4">
                                    <div class="card-header">
                                        <h2 class="card-title">Medication Details</h2>
                                    </div>
                                    <div class="card-body">
                                        <p><strong>Date:</strong> {{ obj.date }}</p>
                                        <p><strong>Time:</strong> {{ obj.time }}</p>
                                    </div>
                                </div>
                            
                                <!-- Medicines Card -->
                                <div class="card mb-4">
                                    <div class="card-header">
                                        <h2 class="card-title">Medicines</h2>
                                    </div>
                                    <div class="card-body">
                                        <div class="row">
                                            {% for medicine in obj.medicines.all %}
                                            <div class="col-md-4">
                                                <div class="medicine-item">
                                                    <h3>{{ medicine.name }}</h3>
                                                    <p>Quantity: {{ medicine.quantity }}</p>
                                                    <p>Type: {{ medicine.type }}</p>
                                                </div>
                                            </div>
                                            {% endfor %}
                                        </div>
                                    </div>
                                </div>
                            
                            </div>
                            
                        </div>
                </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>


{% endblock content %}

{% block javascript %}
<!-- include required js cdn link through html here -->


<script>

</script>
{% endblock %}