]> Softwares of Agnibho - librevax.git/blob - templates/inventory-view.html
Generic name
[librevax.git] / templates / inventory-view.html
1 <!--
2 LibreVax
3 Copyright (C) 2024 Dr. Agnibho Mondal
4 This file is part of LibreVax.
5 LibreVax is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
6 LibreVax is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
7 You should have received a copy of the GNU General Public License along with LibreVax. If not, see <https://www.gnu.org/licenses/>.
8 -->
9
10 {% set title="Inventory" %}
11 {% extends "base.html" %}
12
13 {% block content %}
14
15 <div class="content">
16 {% if action=="list" %}
17
18 <!-- LIST -->
19
20 <table class="table">
21 <tr><th>Vaccine</th><th>Batch</th><th>Date of Expiry</th></tr>
22 {% for rec in data %}
23 <tr><td><a href="/inventory/view/{{rec["iid"]}}">{{rec["vaccine"]}}</a></td><td><a href="/inventory/view/{{rec["iid"]}}">{{rec["batch"]}}</a></td><td><a href="/inventory/view/{{rec["iid"]}}">{{rec["doe"]}}</a></td></tr>
24 {% endfor %}
25 </table>
26 <a href="/inventory/new/{{g.mid}}" class="btn btn-outline-primary">Add Inventory</a>
27
28 {% endif %}
29
30 {% if action=="view" %}
31
32 <!-- VIEW -->
33 <table class="table">
34 <tr><th>Vaccine</th><td>{{data["vaccine"]}}</td></tr>
35 <tr><th>Generic</th><td>{{data["altname"]}}</td></tr>
36 <tr><th>Dose</th><td>{{data["dose"]}}</td></tr>
37 <tr><th>Dose per Vial</th><td>{{data["dpv"]}}</td></tr>
38 <tr><th>Route of Administration</th><td>{{data["route"]}}</td></tr>
39 <tr><th>Batch Number</th><td>{{data["batch"]}}</td></tr>
40 <tr><th>Date of Expiry</th><td>{{data["doe"]}}</td></tr>
41 </table>
42 <a href="/inventory/edit/{{data["iid"]}}" class="btn btn-primary">Edit</a>
43 <a href="/delete/inventory/{{data["iid"]}}" class="btn btn-danger delete-link">Delete</a>
44
45 {% endif %}
46 </div>
47
48 {% endblock %}