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.
322 lines
16 KiB
HTML
322 lines
16 KiB
HTML
{% extends "main.html" %}
|
|
{%load static%}
|
|
{% block title %}My Projects{% endblock %}
|
|
{% block content %}
|
|
|
|
|
|
<div class="w-full xxlg1:w-[75%] bg-white h-fit rounded-md shadow-md p-5">
|
|
{% if customer.status == 'Active' %}
|
|
<div class="w-full bg-green-700 rounded-t-md flex flex-col justify-center items-center py-3">
|
|
<h1 class="text-2xl text-white font-semibold">{{customer.user.first_name}} {{customer.user.last_name}}</h1>
|
|
<p class="text-white text-base">{{customer.customer_id}}</p>
|
|
</div>
|
|
{% endif %}
|
|
{% if customer.status == 'Suspended' %}
|
|
<div class="w-full bg-red-500 rounded-t-md flex flex-col justify-center items-center py-3">
|
|
<h1 class="text-2xl text-white font-semibold">{{customer.user.first_name}} {{customer.user.last_name}}</h1>
|
|
<p class="text-white text-base">{{customer.customer_id}}</p>
|
|
</div>
|
|
{% endif %}
|
|
{% if customer.status == 'Terminated' %}
|
|
<div class="w-full bg-gray-500 rounded-t-md flex flex-col justify-center items-center py-3">
|
|
<h1 class="text-2xl text-white font-semibold">{{customer.user.first_name}} {{customer.user.last_name}}</h1>
|
|
<p class="text-white text-base">{{customer.customer_id}}</p>
|
|
</div>
|
|
{% endif %}
|
|
|
|
<div class="w-full h-fit flex justify-end items-center bg-gray-100 shadow-md rounded-md px-3 py-3 mt-3">
|
|
<div class="w-full md:w-fit flex flex-col md:flex-row justify-end items-center gap-3">
|
|
<button
|
|
class="w-full md:w-fit text-base px-3 py-2 bg-osiblue text-white outline-none border border-osiblue rounded-md cursor-pointer hover:bg-white hover:text-osiblue duration-300 editCustomerStatusButton" data-modal-url="{% url 'editcustomerstatusmodal' %}">Update
|
|
Status</button>
|
|
|
|
<a href="{% url 'addproject' %}" class="w-full md:w-fit">
|
|
<button
|
|
class="w-full md:w-fit text-base px-3 py-2 bg-osiblue text-white outline-none border border-osiblue rounded-md cursor-pointer hover:bg-white hover:text-osiblue duration-300">Add
|
|
Project</button>
|
|
</a>
|
|
|
|
<a href="{% url 'addticket' customer.id %}" class="w-full md:w-fit">
|
|
<button
|
|
class="w-full md:w-fit text-base px-3 py-2 bg-osiblue text-white outline-none border border-osiblue rounded-md cursor-pointer hover:bg-white hover:text-osiblue duration-300">Add
|
|
Ticket</button>
|
|
</a>
|
|
|
|
<a href="{% url 'addorder' customer.id %}" class="w-full md:w-fit">
|
|
<button
|
|
class="w-full md:w-fit text-base px-3 py-2 bg-osiblue text-white outline-none border border-osiblue rounded-md cursor-pointer hover:bg-white hover:text-osiblue duration-300">Add
|
|
Order</button>
|
|
</a>
|
|
|
|
<a href="{% url 'editcustomer' customer.customer_id %}" class="w-full md:w-fit">
|
|
<button
|
|
class="w-full md:w-fit text-base px-3 py-2 bg-fifthosiblue text-white outline-none border border-fifthosiblue rounded-md cursor-pointer hover:bg-white hover:text-fifthosiblue duration-300">Edit
|
|
Customer</button>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="w-full flex flex-col gap-4 mt-5">
|
|
<div>
|
|
<p class="text-gray-500 text-xl">First Name: <span
|
|
class="text-slate-800 text-xl font-semibold">{{customer.user.first_name}}</span></p>
|
|
</div>
|
|
|
|
<div>
|
|
<p class="text-gray-500 text-xl">Last Name: <span
|
|
class="text-slate-800 text-xl font-semibold">{{customer.user.last_name}}</span></p>
|
|
</div>
|
|
|
|
<div>
|
|
<p class="text-gray-500 text-xl">Email: <span
|
|
class="text-slate-800 text-xl font-semibold">{{customer.user.email}}</span></p>
|
|
</div>
|
|
|
|
<div>
|
|
<p class="text-gray-500 text-xl">Mobile Number: <span
|
|
class="text-slate-800 text-xl font-semibold">{{customer.mobile_number}}</span></p>
|
|
</div>
|
|
|
|
|
|
{% if customer.personal_website %}
|
|
<div>
|
|
<p class="text-gray-500 text-xl">Personal Website: <span
|
|
class="text-slate-800 text-xl font-semibold">{{customer.personal_website}}</span></p>
|
|
</div>
|
|
{% endif %}
|
|
|
|
|
|
{% if customer.status == 'Active' %}
|
|
<div>
|
|
<p class="text-gray-500 text-xl">Status: <span
|
|
class="text-green-700 text-xl font-semibold">{{customer.status}}</span></p>
|
|
</div>
|
|
{% endif %}
|
|
|
|
|
|
{% if customer.status == 'Suspended' %}
|
|
<div>
|
|
<p class="text-gray-500 text-xl">Status: <span
|
|
class="text-red-500 text-xl font-semibold">{{customer.status}}</span></p>
|
|
</div>
|
|
{% endif %}
|
|
|
|
|
|
{% if customer.status == 'Terminated' %}
|
|
<div>
|
|
<p class="text-red-500 text-xl">Status: <span
|
|
class="text-gray-500 text-xl font-semibold">{{customer.status}}</span></p>
|
|
</div>
|
|
{% endif %}
|
|
|
|
<div>
|
|
<p class="text-gray-500 text-xl">Reference: <span
|
|
class="text-slate-800 text-xl font-semibold">{{customer.reference}}</span></p>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<!-- BUSINESS -->
|
|
<div class="mt-5 relative">
|
|
<div class=" bg-gray-200 rounded-t-md flex justify-between items-center text-white text-xl font-bold h-[50px]">
|
|
<div class="px-3">
|
|
<p class="text-secondosiblue uppercase font-bold">Businesses</p>
|
|
</div>
|
|
|
|
<a href="{% url 'addbusiness' %}" class="h-full">
|
|
<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">
|
|
<i class="fa fa-plus"></i>
|
|
</button>
|
|
</a>
|
|
</div>
|
|
|
|
<div class="overflow-x-auto border border-gray-300 rounded-b-md">
|
|
<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">
|
|
Name
|
|
</th>
|
|
<th scope="col"
|
|
class="px-6 py-3 text-sm font-medium text-gray-500 uppercase border-r border-gray-300 whitespace-nowrap">
|
|
Business 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">
|
|
Financial Number
|
|
</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">
|
|
<!-- 1st row -->
|
|
{% for business in customer.business_set.all %}
|
|
<tr>
|
|
<td class="px-6 py-4 text-center text-sm border-r border-gray-300">
|
|
<p class="text-slate-800">{{ business.name }}</p>
|
|
</td>
|
|
|
|
<td class="px-6 py-4 text-center text-sm border-r border-gray-300">
|
|
<p class="text-slate-800">{{ business.business_type }}</p>
|
|
</td>
|
|
|
|
<td class="px-6 py-4 text-center text-sm border-r border-gray-300">
|
|
<p class="text-slate-800">{{ business.financial_number }}</p>
|
|
</td>
|
|
|
|
<td class="px-6 py-4 text-center text-sm">
|
|
<div class="flex justify-center items-center gap-3">
|
|
<a href="{% url 'businessdetails' business.business_id %}">
|
|
<div class="text-[15px] text-blue-500 cursor-pointer">
|
|
<i class="fa fa-eye"></i>
|
|
</div>
|
|
</a>
|
|
|
|
<a href="{% url 'editbusiness' business.business_id %}">
|
|
<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">
|
|
<i class="fa fa-trash"></i>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- PAYMENTS -->
|
|
<div class="mt-10 relative">
|
|
<div class=" bg-gray-200 rounded-t-md flex justify-between items-center text-white text-xl font-bold h-[50px]">
|
|
<div class="px-3">
|
|
<p class="text-secondosiblue uppercase font-bold">Payment</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 class="overflow-x-auto border border-gray-300 rounded-b-md">
|
|
<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">
|
|
Order
|
|
</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 border-r border-gray-300 whitespace-nowrap">
|
|
Date Paid
|
|
</th>
|
|
<th scope="col"
|
|
class="px-6 py-3 text-sm font-medium text-gray-500 uppercase border-r border-gray-300 whitespace-nowrap ">
|
|
Date Due
|
|
</th>
|
|
<th scope="col"
|
|
class="px-6 py-3 text-sm font-medium text-gray-500 uppercase border-r border-gray-300 whitespace-nowrap">
|
|
Payment Method
|
|
</th>
|
|
<th scope="col"
|
|
class="px-6 py-3 text-sm font-medium text-gray-500 uppercase border-r border-gray-300 whitespace-nowrap">
|
|
Comment
|
|
</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">
|
|
<td class="px-6 py-4 text-center text-sm border-r border-gray-300">
|
|
<p class="text-secondosiblue">order 1</p>
|
|
</td>
|
|
|
|
<td class="px-6 py-4 text-center text-sm border-r border-gray-300">
|
|
<p class="text-secondosiblue">$20.0</p>
|
|
</td>
|
|
|
|
<td class="px-6 py-4 text-center text-sm border-r border-gray-300">
|
|
<p class="text-secondosiblue">02-12-2024</p>
|
|
</td>
|
|
|
|
<td class="px-6 py-4 text-center text-sm border-r border-gray-300">
|
|
<p class="text-secondosiblue">02-12-2024</p>
|
|
</td>
|
|
|
|
<td class="px-6 py-4 text-center text-sm border-r border-gray-300">
|
|
<p class="text-secondosiblue">Cash</p>
|
|
</td>
|
|
|
|
<td class="px-6 py-4 text-center text-sm border-r border-gray-300">
|
|
<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>
|
|
<!-- <p class="text-secondosiblue">Comment</p> -->
|
|
</td>
|
|
|
|
<td class="px-6 py-4 text-center text-sm">
|
|
<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>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<button
|
|
class="w-full text-base px-3 py-2 bg-red-500 text-white outline-none border border-red-500 rounded-md cursor-pointer hover:bg-white hover:text-red-500 duration-300 mt-5 deleteCustomerButton"
|
|
data-modal-url="{% url 'deletecustomermodal' customer.id %}">Delete
|
|
Customer</button>
|
|
</div>
|
|
|
|
|
|
<!---------------------- JS SCRIPTS -------------------->
|
|
|
|
<!-- THE SCRIPT FOR THE EPICS BAR -->
|
|
<script type="text/javascript" src='{% static "js/epics.js" %}'></script>
|
|
|
|
{% endblock content %} |