emile 10 months ago
parent a356aab63d
commit 51fdda3b58

@ -292,161 +292,165 @@
</div> </div>
<!-- SUBSCRIPTIONS --> <!-- SUBSCRIPTIONS -->
<div class="mt-10 relative"> {% if customer_active_subscriptions %}
<div class=" bg-gray-200 rounded-t-md flex justify-between items-center text-white text-xl font-bold h-[50px]"> <div class="mt-10 relative">
<div class="px-3"> <div class=" bg-gray-200 rounded-t-md flex justify-between items-center text-white text-xl font-bold h-[50px]">
<p class="text-secondosiblue uppercase font-bold">Subscriptions</p> <div class="px-3">
</div> <p class="text-secondosiblue uppercase font-bold">Subscriptions</p>
</div>
</div> </div>
<div class="grid grid-cols-1 s:grid-cols-2 l:grid-cols-3 gap-3 mt-3"> <div class="grid grid-cols-1 s:grid-cols-2 l:grid-cols-3 gap-3 mt-3">
{% for subscription in customer_active_subscriptions %} {% for subscription in customer_active_subscriptions %}
<div
class="flex flex-col justify-center items-center shadow-md rounded-md cursor-pointer hover:scale-105 transition-transform duration-300 relative">
<div <div
class="w-full py-8 px-3 bg-gray-50 flex justify-center items-center rounded-t-md relative h-[130px]"> class="flex flex-col justify-center items-center shadow-md rounded-md cursor-pointer hover:scale-105 transition-transform duration-300 relative">
{% if subscription.item.item_type.name == 'OSIMENU' %} <div
<img src="{% static 'images/ositcom_logos/osimenublue.png' %}" class="w-[80%] h-auto"> class="w-full py-8 px-3 bg-gray-50 flex justify-center items-center rounded-t-md relative h-[130px]">
{% elif subscription.item.item_type.name == 'OSICARD' %} {% if subscription.item.item_type.name == 'OSIMENU' %}
<img src="{% static 'images/ositcom_logos/osicardblue.png' %}" class="w-[80%] h-auto"> <img src="{% static 'images/ositcom_logos/osimenublue.png' %}" class="w-[80%] h-auto">
{% endif %} {% elif subscription.item.item_type.name == 'OSICARD' %}
<img src="{% static 'images/ositcom_logos/osicardblue.png' %}" class="w-[80%] h-auto">
{% endif %}
</div>
<div class="w-full bg-white border border-gray-100 shadow-md flex justify-start items-center p-3">
<p class="text-secondosiblue text-base">Expires:{% if subscription.end_at %} <span
class="font-semibold">{{subscription.end_at}} {% else %} <span class="font-semibold">No
Expiry {% endif %}</span>
</p>
</div>
</div> </div>
<div class="w-full bg-white border border-gray-100 shadow-md flex justify-start items-center p-3"> {% endfor %}
<p class="text-secondosiblue text-base">Expires:{% if subscription.end_at %} <span </div>
class="font-semibold">{{subscription.end_at}} {% else %} <span class="font-semibold">No
Expiry {% endif %}</span> {{subscription.id}}
</p>
</div>
</div>
{% endfor %}
</div> </div>
</div> {% endif %}
<!-- PAYMENTS --> <!-- PAYMENTS -->
<div class="mt-10 relative"> {% if customer_payments %}
<div class=" bg-gray-200 rounded-t-md flex justify-between items-center text-white text-xl font-bold h-[50px]"> <div class="mt-10 relative">
<div class="px-3"> <div class=" bg-gray-200 rounded-t-md flex justify-between items-center text-white text-xl font-bold h-[50px]">
<p class="text-secondosiblue uppercase font-bold">Payments</p> <div class="px-3">
<p class="text-secondosiblue uppercase font-bold">Payments</p>
</div>
<!-- <button
class="h-full rounded-tr-md px-4 bg-secondosiblue text-gray-200 text-[18px] outline-none border-none cursor-pointer flex justify-center items-center addPaymentButton">
<i class="fa fa-plus"></i>
</button> -->
</div> </div>
<!-- <button <div class="overflow-x-auto border border-gray-300 rounded-b-md tableContainer">
class="h-full rounded-tr-md px-4 bg-secondosiblue text-gray-200 text-[18px] outline-none border-none cursor-pointer flex justify-center items-center addPaymentButton"> <table class="min-w-full divide-y">
<i class="fa fa-plus"></i> <!-- TABLE HEADER -->
</button> --> <thead class="bg-gray-50">
</div> <tr>
<th scope="col"
<div class="overflow-x-auto border border-gray-300 rounded-b-md tableContainer"> class="px-6 py-3 text-sm font-medium text-gray-500 uppercase border-r border-gray-300 whitespace-nowrap">
<table class="min-w-full divide-y"> Order
<!-- TABLE HEADER --> </th>
<thead class="bg-gray-50"> <th scope="col"
<tr> class="px-6 py-3 text-sm font-medium text-gray-500 uppercase border-r border-gray-300 whitespace-nowrap">
<th scope="col" Amount
class="px-6 py-3 text-sm font-medium text-gray-500 uppercase border-r border-gray-300 whitespace-nowrap"> </th>
Order <th scope="col"
</th> class="px-6 py-3 text-sm font-medium text-gray-500 uppercase border-r border-gray-300 whitespace-nowrap ">
<th scope="col" Date Due
class="px-6 py-3 text-sm font-medium text-gray-500 uppercase border-r border-gray-300 whitespace-nowrap"> </th>
Amount <th scope="col"
</th> class="px-6 py-3 text-sm font-medium text-gray-500 uppercase border-r border-gray-300 whitespace-nowrap">
<th scope="col" Date Paid
class="px-6 py-3 text-sm font-medium text-gray-500 uppercase border-r border-gray-300 whitespace-nowrap "> </th>
Date Due <th scope="col"
</th> class="px-6 py-3 text-sm font-medium text-gray-500 uppercase border-r border-gray-300 whitespace-nowrap">
<th scope="col" Payment Method
class="px-6 py-3 text-sm font-medium text-gray-500 uppercase border-r border-gray-300 whitespace-nowrap"> </th>
Date Paid <th scope="col"
</th> class="px-6 py-3 text-sm font-medium text-gray-500 uppercase border-r border-gray-300 whitespace-nowrap">
<th scope="col" Comment
class="px-6 py-3 text-sm font-medium text-gray-500 uppercase border-r border-gray-300 whitespace-nowrap"> </th>
Payment Method <th scope="col" class="px-6 py-3 text-sm font-medium text-gray-500 uppercase whitespace-nowrap">
</th> Actions
<th scope="col" </th>
class="px-6 py-3 text-sm font-medium text-gray-500 uppercase border-r border-gray-300 whitespace-nowrap"> </tr>
Comment </thead>
</th>
<th scope="col" class="px-6 py-3 text-sm font-medium text-gray-500 uppercase whitespace-nowrap"> <!-- TABLE BODY -->
Actions {% for payment in customer_payments %}
</th> <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">
</thead> <p class="text-secondosiblue">{{payment.order.order_id}}</p>
</td>
<!-- TABLE BODY -->
{% for payment in customer_payments %} <td class="px-6 py-4 text-center text-sm border-r border-gray-300">
<tbody class="bg-white divide-y divide-gray-200"> <p class="text-secondosiblue">${{payment.amount}}</p>
<td class="px-6 py-4 text-center text-sm border-r border-gray-300"> </td>
<p class="text-secondosiblue">{{payment.order.order_id}}</p>
</td>
<td class="px-6 py-4 text-center text-sm border-r border-gray-300">
<td class="px-6 py-4 text-center text-sm border-r border-gray-300"> <p class="text-secondosiblue">{{payment.date_due}}</p>
<p class="text-secondosiblue">${{payment.amount}}</p> </td>
</td>
<td class="px-6 py-4 text-center text-sm border-r border-gray-300">
{% if payment.date_paid %}
<td class="px-6 py-4 text-center text-sm border-r border-gray-300"> <p class="text-secondosiblue">{{payment.date_paid}}</p>
<p class="text-secondosiblue">{{payment.date_due}}</p> {% else %}
</td> <p class="text-red-500">UNPAID</p>
{% endif %}
<td class="px-6 py-4 text-center text-sm border-r border-gray-300"> </td>
{% if payment.date_paid %}
<p class="text-secondosiblue">{{payment.date_paid}}</p> <td class="px-6 py-4 text-center text-sm border-r border-gray-300">
{% else %} {% for type in payment.type.all %}
<p class="text-red-500">UNPAID</p> <div
{% endif %} class="flex items-center gap-2 justify-center cursor-pointer text-secondosiblue hover:text-gray-400 duration-300">
</td> <img src="{{type.image.url}}" class="w-[30px] rounded-md shadow-sm">
<p class="underline">{{type.name}}</p>
<td class="px-6 py-4 text-center text-sm border-r border-gray-300"> </div>
{% for type in payment.type.all %} {% endfor %}
<div </td>
class="flex items-center gap-2 justify-center cursor-pointer text-secondosiblue hover:text-gray-400 duration-300">
<img src="{{type.image.url}}" class="w-[30px] rounded-md shadow-sm"> <td class="px-6 py-4 text-center text-sm border-r border-gray-300">
<p class="underline">{{type.name}}</p> <div class="w-full flex justify-center items-center">
<div class="w-[30px] h-[30px] bg-gray-100 rounded-full flex justify-center items-center p-1 text-secondosiblue cursor-pointer hover:bg-secondosiblue hover:text-gray-100 duration-300 addPaymentCommentButton"
title="Add Comment" data-modal-url="{% url 'add_payment_comment_modal' %}">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"
stroke-width="1.5" stroke="currentColor" class="w-5 h-5">
<path stroke-linecap="round" stroke-linejoin="round" d="M12 4.5v15m7.5-7.5h-15" />
</svg>
</div>
</div> </div>
{% endfor %} <!-- <p class="text-secondosiblue">Comment</p> -->
</td> </td>
<td class="px-6 py-4 text-center text-sm border-r border-gray-300"> <td class="px-6 py-4 text-center text-sm">
<div class="w-full flex justify-center items-center"> <div class="flex justify-center items-center gap-3">
<div class="w-[30px] h-[30px] bg-gray-100 rounded-full flex justify-center items-center p-1 text-secondosiblue cursor-pointer hover:bg-secondosiblue hover:text-gray-100 duration-300 addPaymentCommentButton" <div data-modal-url="{% url 'edit_payment_modal' %}" class="editPaymentButton">
title="Add Comment" data-modal-url="{% url 'add_payment_comment_modal' %}"> <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"
stroke-width="1.5" stroke="currentColor" class="w-5 h-5"> class="w-[18px] text-fifthosiblue hover:scale-110 duration-500 transition-transform cursor-pointer">
<path stroke-linecap="round" stroke-linejoin="round" d="M12 4.5v15m7.5-7.5h-15" /> <path stroke-linecap="round" stroke-linejoin="round"
</svg> d="m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L10.582 16.07a4.5 4.5 0 0 1-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 0 1 1.13-1.897l8.932-8.931Zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0 1 15.75 21H5.25A2.25 2.25 0 0 1 3 18.75V8.25A2.25 2.25 0 0 1 5.25 6H10" />
</svg>
</div>
<div data-modal-url="{% url 'deletepaymentmodal' %}" class="deletePaymentButton">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"
stroke-width="1.5" stroke="currentColor"
class="w-[18px] text-red-500 hover:scale-110 duration-500 transition-transform cursor-pointer">
<path stroke-linecap="round" stroke-linejoin="round"
d="m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0" />
</svg>
</div>
</div> </div>
</div> </td>
<!-- <p class="text-secondosiblue">Comment</p> --> </tbody>
</td> {% endfor %}
</table>
<td class="px-6 py-4 text-center text-sm"> </div>
<div class="flex justify-center items-center gap-3">
<div data-modal-url="{% url 'edit_payment_modal' %}" class="editPaymentButton">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"
stroke-width="1.5" stroke="currentColor"
class="w-[18px] text-fifthosiblue hover:scale-110 duration-500 transition-transform cursor-pointer">
<path stroke-linecap="round" stroke-linejoin="round"
d="m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L10.582 16.07a4.5 4.5 0 0 1-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 0 1 1.13-1.897l8.932-8.931Zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0 1 15.75 21H5.25A2.25 2.25 0 0 1 3 18.75V8.25A2.25 2.25 0 0 1 5.25 6H10" />
</svg>
</div>
<div data-modal-url="{% url 'deletepaymentmodal' %}" class="deletePaymentButton">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"
stroke-width="1.5" stroke="currentColor"
class="w-[18px] text-red-500 hover:scale-110 duration-500 transition-transform cursor-pointer">
<path stroke-linecap="round" stroke-linejoin="round"
d="m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0" />
</svg>
</div>
</div>
</td>
</tbody>
{% endfor %}
</table>
</div> </div>
</div> {% endif %}
<button <button

Loading…
Cancel
Save