You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

177 lines
7.9 KiB
HTML

{% extends "main.html" %}
{%load static%}
{% block content %}
<div class="w-full xxlg1:w-[75%]">
<div class="w-full h-fit bg-white rounded-md shadow-md p-5">
<div
class="w-full bg-secondosiblue shadow-md rounded-md px-3 s:px-5 py-3 s:py-5 flex flex-col s:flex-row justify-between items-center gap-5 text-fifthosiblue">
<div class="flex items-center gap-8">
<p class="selectedItemType cursor-pointer" id="products">Products</p>
<p class="cursor-pointer" id="services">Services</p>
</div>
<div class="w-full s:w-fit">
<a href="{% url 'addproduct' %}" class="w-full s:w-fit">
<button
class="w-full s:w-fit px-5 py-2 bg-white text-secondosiblue border border-white rounded-md cursor-pointer hover:bg-secondosiblue hover:text-white duration-300"
id="addProductButton">Add
Product</button>
</a>
<a href="{% url 'addservice' %}" class="w-full s:w-fit">
<button
class="w-full s:w-fit px-5 py-2 bg-white text-secondosiblue border border-white rounded-md cursor-pointer hover:bg-secondosiblue hover:text-white duration-300 hidden"
id="addServiceButton">Add
Service</button>
</a>
</div>
</div>
<!-- PRODUCTS -->
<div class="overflow-x-auto border border-gray-300 rounded-md mt-5" id="productsContainer">
<table class="min-w-full divide-y">
<!-- TABLE HEADER -->
<thead class="bg-gray-50">
<tr>
<th scope="col"
class="px-6 py-3 text-sm font-medium text-gray-500 uppercase border-r border-gray-300 whitespace-nowrap">
Title
</th>
<th scope="col"
class="px-6 py-3 text-sm font-medium text-gray-500 uppercase border-r border-gray-300 whitespace-nowrap">
Type
</th>
<th scope="col"
class="px-6 py-3 text-sm font-medium text-gray-500 uppercase border-r border-gray-300 whitespace-nowrap">
Amount
</th>
<th scope="col" class="px-6 py-3 text-sm font-medium text-gray-500 uppercase whitespace-nowrap">
Actions
</th>
</tr>
</thead>
<!-- TABLE BODY -->
<tbody class="bg-white divide-y divide-gray-200">
{% for product in products %}
<tr>
<td class="px-6 py-4 text-center text-sm border-r border-gray-300">
<p class="text-slate-800">{{product.title}}</p>
</td>
<td class="px-6 py-4 text-center text-sm border-r border-gray-300">
<p class="text-slate-800">{{product.item_type}}</p>
</td>
<td class="px-6 py-4 text-center text-sm border-r border-gray-300">
<p class="text-slate-800">${{product.amount}}</p>
</td>
<td class="px-6 py-4">
<div class="flex justify-center items-center gap-3">
<a href="">
<div class="text-[15px] text-blue-500 cursor-pointer">
<i class="fa fa-eye"></i>
</div>
</a>
<a href="">
<div class="text-[15px] text-blue-500 cursor-pointer">
<i class="fa fa-edit"></i>
</div>
</a>
<div class="text-[15px] text-red-500 cursor-pointer" data-modal-url="">
<i class="fa fa-trash"></i>
</div>
</div>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<!-- SERVICES -->
<div class="overflow-x-auto border border-gray-300 rounded-md mt-5 hidden" id="servicesContainer">
<table class="min-w-full divide-y">
<!-- TABLE HEADER -->
<thead class="bg-gray-50">
<tr>
<th scope="col"
class="px-6 py-3 text-sm font-medium text-gray-500 uppercase border-r border-gray-300 whitespace-nowrap">
Title
</th>
<th scope="col"
class="px-6 py-3 text-sm font-medium text-gray-500 uppercase border-r border-gray-300 whitespace-nowrap">
Customer
</th>
<th scope="col"
class="px-6 py-3 text-sm font-medium text-gray-500 uppercase border-r border-gray-300 whitespace-nowrap">
Type
</th>
<th scope="col"
class="px-6 py-3 text-sm font-medium text-gray-500 uppercase border-r border-gray-300 whitespace-nowrap">
Amount
</th>
<th scope="col" class="px-6 py-3 text-sm font-medium text-gray-500 uppercase whitespace-nowrap">
Actions
</th>
</tr>
</thead>
<!-- TABLE BODY -->
<tbody class="bg-white divide-y divide-gray-200">
<tr>
<td class="px-6 py-4 text-center text-sm border-r border-gray-300">
<p class="text-slate-800">Item 2</p>
</td>
<td class="px-6 py-4 text-center text-sm border-r border-gray-300">
<p class="text-slate-800">Salim</p>
</td>
<td class="px-6 py-4 text-center text-sm border-r border-gray-300">
<p class="text-slate-800">Type</p>
</td>
<td class="px-6 py-4 text-center text-sm border-r border-gray-300">
<p class="text-slate-800">222</p>
</td>
<td class="px-6 py-4">
<div class="flex justify-center items-center gap-3">
<a href="">
<div class="text-[15px] text-blue-500 cursor-pointer">
<i class="fa fa-eye"></i>
</div>
</a>
<a href="">
<div class="text-[15px] text-blue-500 cursor-pointer">
<i class="fa fa-edit"></i>
</div>
</a>
<div class="text-[15px] text-red-500 cursor-pointer" data-modal-url="">
<i class="fa fa-trash"></i>
</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<!---------------------- JS SCRIPTS -------------------->
<script src="{% static 'js/billing/items.js' %}"></script>
{% endblock %}