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.

239 lines
11 KiB
HTML

{% extends "main.html" %}
{%load static%}
{% block title %}My Projects{% endblock %}
{% block content %}
<!-- NOTES SECTION -->
<div class="w-full h-fit flex justify-between items-center px-10 pb-5">
<div class="relative w-full h-fit bg-white shadow-md rounded-md p-5">
<div class="w-full flex justify-between items-center">
<div>
<p class="text-base text-gray-500">Recent Note:</p>
<p class="text-slate-700">Send an Email to Salim.</p>
</div>
<div class="flex justify-end items-center gap-4">
<button
class="w-fit rounded-md py-1 px-3 bg-slate-800 border border-slate-800 text-white hover:bg-white hover:text-slate-800"
id="showNotesButton">Show
Notes</button>
<button
class="w-[35px] h-[35px] rounded-full p-2 bg-gray-300 text-white text-[20px] outline-none border-none cursor-pointer flex justify-center items-center shadow-md"
id="addNoteButton">
<i class="fa fa-plus"></i>
</button>
</div>
</div>
<!-- ALL NOTES CONTAINER (it appears when clicking on the "Show notes" button) -->
<div class="w-full h-fit relative hidden justify-start gap-3 items-center mt-5 overflow-hidden overflow-x-auto"
id="notesContainer">
<div class="w-[16.33%] h-[150px] shadow-xl bg-yellow-200 p-5">
<p class="text-base text-slate-800">Send an Email to Salim.</p>
</div>
<div class="w-[16.33%] h-[150px] shadow-xl bg-pink-200 top-90 right-10 p-5">
<p class="text-base text-slate-80">Contact the client.</p>
</div>
<div class="w-[16.33%] h-[150px] shadow-xl bg-green-200 top-90 right-10 p-5">
<p class="text-base text-slate-80">Add daily report at the end of the day.</p>
</div>
<div class="w-[16.33%] h-[150px] shadow-xl bg-blue-200 top-90 right-10 p-5">
<p class="text-base text-slate-80">Add daily report at the end of the day.</p>
</div>
<div class="w-[16.33%] h-[150px] shadow-xl bg-purple-200 top-90 right-10 p-5">
<p class="text-base text-slate-80">Add daily report at the end of the day.</p>
</div>
<div class="w-[16.33%] h-[150px] shadow-xl bg-yellow-200 top-90 right-10 p-5">
<p class="text-base text-slate-80">Add daily report at the end of the day.</p>
</div>
</div>
</div>
</div>
<!-- CUSTOMER DETAIL AND USERS ACTIVITY SECTION -->
<div class="w-full flex justify-between gap-[2.5%] px-10 pb-5">
<!-- LEFT SIDE / CUSTOMER DETAIL SECTION -->
<div class="w-[74.5%] 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-2">
<h1 class="text-3xl text-white font-semibold">{{customer.first_name}} {{customer.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-2">
<h1 class="text-3xl text-white font-semibold">{{customer.first_name}} {{customer.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-2">
<h1 class="text-3xl text-white font-semibold">{{customer.first_name}} {{customer.last_name}}</h1>
<p class="text-white text-base">{{customer.customer_id}}</p>
</div>
{% endif %}
<div class="w-full h-[70px] flex justify-end items-center bg-gray-100 shadow-md rounded-md px-3 py-1 mt-4">
<div class="flex justify-end items-center gap-3">
<button
class="w-fit 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">Delete
Customer</button>
<a href="{% url 'editcustomer' %}">
<button
class="w-fit text-base px-3 py-2 bg-blue-500 text-white outline-none border border-blue-500 rounded-md cursor-pointer hover:bg-white hover:text-blue-500">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.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.last_name}}</span></p>
</div>
<div>
<p class="text-gray-500 text-xl">Email: <span
class="text-slate-800 text-xl font-semibold">{{customer.email}}</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-4">
<p class="text-gray-500 text-xl">Business:</p>
<div class="w-full px-4">
<div class="w-full border-t border-x border-gray-300 rounded-t-md mt-3">
<!-- HEADER -->
<div class="w-full h-[60px] flex items-center justify-between">
<div class="w-[35%] h-full border-r border-gray-300 flex justify-center items-center">
<p class="text-sm">Name</p>
</div>
<div class="w-[30%] h-full border-r border-gray-300 flex justify-center items-center">
<p class="text-sm">Business Type</p>
</div>
<div class="w-[20%] h-full border-r border-gray-300 flex justify-center items-center">
<p class="text-sm">Financial number</p>
</div>
<div class="w-[15%] h-full flex justify-center items-center">
<p class="text-sm">Actions</p>
</div>
</div>
<!-- BODY -->
<div class="w-full border-t border-gray-300">
{% if customer.business %}
<!-- ROW -->
<div class="w-full h-[50px] flex justify-between items-center border-b border-gray-300">
<div class="w-[35%] h-full border-r border-gray-300 flex justify-center items-center">
<p class="text-sm">{{customer.business.name}}</p>
</div>
<div class="w-[30%] h-full border-r border-gray-300 flex justify-center items-center">
<p class="text-sm">{{customer.business.business_type}}</p>
</div>
<div class="w-[20%] h-full border-r border-gray-300 flex justify-center items-center">
<p class="text-sm">{{customer.business.financial_number}}</p>
</div>
<div class="w-[15%] h-full flex justify-center items-center gap-3">
<a href="{% url 'businessdetails' customer.business.business_id %}">
<div class="text-[18px] text-blue-500 cursor-pointer">
<i class="fa fa-eye"></i>
</div>
</a>
<a href="{% url 'editbusiness' %}">
<div class="text-[18px] text-blue-500 cursor-pointer">
<i class="fa fa-edit"></i>
</div>
</a>
<div class="text-[18px] text-red-500 cursor-pointer">
<i class="fa fa-trash"></i>
</div>
</div>
</div>
{% endif %}
</div>
<div class="w-full">
<a href="{% url 'addbusiness' %}">
<button class="w-full border-b border-gray-300 text-gray-500 py-3 bg-gray-100">ADD BUSINESS</button>
</a>
</div>
</div>
</div>
</div>
</div>
<!-- RIGHT SIDE / USERS ACTIVITY -->
<div class="w-[23%] bg-white h-fit rounded-md shadow-md p-5">
<h1 class="text-2xl text-slate-700 text-center font-semibold">USERS ACTIVITY</h1>
<div class="w-full h-fit mt-2" id="activitiesContainer">
{% include 'recent-activities.html' %}
</div>
</div>
</div>
</div>
<!-- POPUP MODAL -->
<div class="w-full h-full bg-black bg-opacity-40 z-20 fixed justify-center items-center hidden" id="popUpModal">
<div class="w-[95%] md:w-fit h-fit bg-white rounded-md p-9 relative">
<button class="absolute top-3 right-5 text-slate-800 text-xl cursor-pointer outline-none border-none"
id="closeModalButton">
<i class="fa fa-close"></i>
</button>
<iframe id="popupModalFrame" frameborder="0"></iframe>
</div>
</div>
<script type="text/javascript" src='{% static "js/pop-modals.js" %}'></script>
</div>
<!---------------------- JS SCRIPTS -------------------->
<!-- TO SHOW ALL THE ADDED NOTES BY THE USER WHEN CLICKING ON THE SHOW NOTES BUTTON -->
<script type="text/javascript" src='{% static "js/show-notes.js" %}'></script>
<!-- THE SCRIPT FOR THE EPICS BAR -->
<script type="text/javascript" src='{% static "js/epics.js" %}'></script>
{% endblock content %}