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.

467 lines
26 KiB
HTML

{% extends "main.html" %}
{%load static%}
{% 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>
<div class="flex justify-start items-center gap-2">
<div class="w-[13px] h-[13px] bg-red-200 rounded-full"
style="background-color: {{ last_note_color }};">
</div>
<p class="text-slate-700">{{recent_note.text}}</p>
</div>
</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 addNoteButton"
data-modal-url="{% url 'addnote' %}">
<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">
{% for note in notes %}
<div class="w-[16.33%] h-[150px] shadow-sm p-5" style="background-color: {{note.color}}">
<p class="text-base text-slate-800">{{note.text}}</p>
</div>
{% endfor %}
</div>
</div>
</div>
<!-- TASKS AND USERS ACTIVITY SECTION -->
<div class="w-full flex justify-between gap-[2.5%] px-10 pb-5">
<!-- LEFT SIDE / TASKS SECTION -->
<div class="w-[74.5%]">
<!-- TASK FILTERING BAR -->
<div class="w-full h-fit bg-white shadow-md rounded-md flex justify-center items-center gap-10 py-5 px-3">
<a class="text-xl text-gray-500">Tasks</a>
<select name="" id=""
class="border border-gray-300 p-2 rounded-md outline-none w-[160px] text-gray-500 h-[40px]">
<option value="" disabled selected>Assigned To</option>
<option value="">Nataly</option>
<option value="">Salim</option>
<option value="">Emile</option>
<option value="">Arze</option>
</select>
<select name="" id=""
class="border border-gray-300 p-2 rounded-md outline-none w-[160px] text-gray-500 h-[40px]">
<option value="" disabled selected>Status</option>
<option value="">Open</option>
<option value="">Working On</option>
<option value="">Closed</option>
</select>
<div class="relative h-fit w-fit flex items-center">
<input type="text" placeholder="Project"
class="py-2 px-3 border border-gray-300 rounded-md outline-none w-[270px] h-[40px] relative">
<button class="text-gray-500 text-xl outline-none border-none cursor-pointer absolute right-2 bg-white">
<i class="fa fa-search"></i>
</button>
</div>
</div>
<!-- TASKS TABLE -->
{% for task in tasks %}
<div class="w-full h-fit bg-white p-3 rounded-md shadow-md mt-5">
<div class="w-full bg-white h-fit rounded-md border border-gray-300">
<!-- TABLE HEADER -->
<div class="w-full flex h-[70px] rounded-t-md">
{% if task.status == 'Open' %}
<div
class="w-[55%] flex justify-center items-center border-r border-b border-gray-300 bg-green-700 rounded-tl-md">
<p class="text-xl text-white">{{task.name}}</p>
</div>
{% endif %}
{% if task.status == 'Working On' %}
<div
class="w-[55%] flex justify-center items-center border-r border-b border-gray-300 bg-yellow-400 rounded-tl-md">
<p class="text-xl text-white">{{task.name}}</p>
</div>
{% endif %}
<div class="w-[15%] flex justify-center items-center border-r border-b border-gray-300">
<p class="text-slate-700">{{task.status}}</p>
</div>
<div class="w-[15%] flex justify-center items-center border-r border-b border-gray-300">
<p class="text-slate-700">{{task.formatted_start_date}}</p>
</div>
<div class="w-[15%] flex justify-center items-center border-b border-gray-300">
<p class="text-slate-700">{{task.formatted_end_date}}</p>
</div>
</div>
<!-- TABLE BODY -->
<div class="w-full h-fit flex">
<!-- LEFT SIDE OF TABLE BODY -->
<div class="w-[55%] h-fit bg-white p-3 rounded-bl-md">
<!-- 1st row -->
<div class="w-full flex flex-col gap-2">
<div class="flex justify-start items-center gap-2">
<p class="text-gray-400 text-base">Project:</p>
<p class="text-slate-700 text-base">{{task.project.name}}</p>
</div>
<div class="flex justify-start items-center gap-2">
<p class="text-gray-400 text-base">Epic:</p>
<p class="text-slate-700 text-base">{{task.epic.title}}</p>
</div>
<div class="flex justify-start items-center gap-2">
<p class="text-gray-400 text-base">Assigned To:</p>
<p class="text-slate-700 text-base">{{task.assigned_to.first_name}}
{{task.assigned_to.last_name}}</p>
</div>
<div class="flex justify-start items-center gap-2">
<p class="text-gray-400 text-base">Files:</p>
<p class="text-slate-700 text-base"></p>
</div>
<div class="flex justify-start items-center gap-2">
<p class="text-gray-400 text-base">Tags:</p>
<p class="text-slate-700 text-base"></p>
</div>
<div class="flex justify-start items-center gap-2">
<p class="text-gray-400 text-base">Extra:</p>
<p class="text-slate-700 text-base">{{task.extra}}</p>
</div>
</div>
</div>
<!-- RIGHT SIDE OF TABLE BODY -->
<div class="w-[45%] h-fit bg-white flex flex-wrap justify-start rounded-br-md">
<button
class="w-[33.33%] p-2 border border-gray-200 text-base h-[70px] bg-gray-300 text-gray-500">Close</button>
<button
class="w-[33.33%] p-2 border border-gray-200 text-base h-[70px] bg-gray-300 text-gray-500 updateStatusButton"
data-modal-url="{% url 'updatestatus' task.task_id %}">Update
Status</button>
<button
class="w-[33.33%] p-2 border border-gray-200 text-base h-[70px] bg-gray-300 text-gray-500 addTimeButton"
data-modal-url="{% url 'addtime' %}">Add
Time</button>
<button
class="w-[33.33%] p-2 border border-gray-200 text-base h-[70px] bg-red-500 text-white deleteTaskButton"
data-modal-url="{% url 'deletetask' %}">Delete</button>
<a href="{% url 'edittask' %}" class="w-[33.33%]">
<button
class="w-full p-2 border border-gray-200 text-base h-[70px] bg-blue-500 text-white">Edit</button>
</a>
<button
class="w-[33.33%] p-2 border border-gray-200 text-base h-[70px] bg-gray-300 text-gray-500 showPointsButton"
data-modal-url="{% url 'showpoints' task.task_id %}">Show
Points</button>
<button
class="w-[33.33%] p-2 border border-gray-200 text-base h-[70px] bg-gray-300 text-gray-500 addPointButton"
data-modal-url="{% url 'addpoint' task.task_id %}">Add
Point</button>
<a href="{% url 'detailed-task' task.task_id %}" class="w-[33.33%]">
<button
class="w-full p-2 border border-gray-200 text-base h-[70px] bg-gray-300 text-gray-500">Details</button>
</a>
<button
class="w-[33.33%] p-2 border border-gray-200 text-base h-[70px] bg-gray-300 text-gray-500 rounded-br-md timelineButton"
data-modal-url="{% url 'timeline' %}">Timeline</button>
</div>
</div>
</div>
</div>
{% endfor %}
</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 userActivityContainer">
{% for latest in latest_statuses_time_ago %}
<!-- 1ST ROW -->
<div class="w-full flex flex-col py-3">
<div class="w-full flex flex-col justify-center items-start gap-2">
<div class="w-full flex justify-between items-center gap-2">
<div class="flex justify-start gap-2">
<div class="w-[45px] h-[45px] rounded-full">
<img src='{{latest.status.staff.image.url}}' alt="user profile"
class="w-full h-full object-cover rounded-full">
</div>
<div class="flex flex-col">
<h1 class="text-sm text-slate-700 font-semibold">{{latest.status.staff.first_name}}
{{latest.status.staff.last_name}}</h1>
{% if latest.time_ago == '0min ago' %}
<p class="text-sm text-gray-500">Just Now</p>
{%else %}
<p class="text-sm text-gray-500">{{ latest.time_ago}}</p>
{%endif%}
</div>
</div>
<div class="cursor-pointer">
<i class="fa fa-thumbs-up" style="color: rgb(184, 184, 184); font-size: 15px;"></i>
</div>
</div>
<!-- Status -->
<div class="w-full">
<p class="text-sm text-gray-500">{{latest.status.text}}</p>
</div>
<!-- Add comment section -->
<div class="w-full h-fit flex justify-between items-center border border-gray-200 mt-2 rounded-md">
<input type="text" placeholder="Add Comment..."
class="outline-none text-gray-500 p-2 w-[100%] text-sm h-[40px] rounded-tl-md rounded-bl-md">
<button class="w-fit px-3 py-2 bg-slate-800 rounded-tr-md rounded-br-md">
<i class="fa fa-send" style="color: white; font-size: 15px;"></i>
</button>
</div>
</div>
</div>
{% endfor %}
</div>
</div>
</div>
<!-- TICKETS SECTION -->
<div class="w-full h-fit px-10 py-5">
<!-- TICKETS FILTERING BAR -->
<div class="w-full h-fit bg-white shadow-md rounded-md flex justify-center items-center gap-10 py-5 px-3">
<a class="text-xl text-gray-500">Tickets</a>
<select name="" id=""
class="border border-gray-300 p-2 rounded-md outline-none w-[160px] text-gray-500 h-[40px]">
<option value="" disabled selected>Assigned To</option>
<option value="">Nataly</option>
<option value="">Salim</option>
<option value="">Emile</option>
<option value="">Arze</option>
</select>
<select name="" id=""
class="border border-gray-300 p-2 rounded-md outline-none w-[160px] text-gray-500 h-[40px]">
<option value="" disabled selected>Status</option>
<option value="">Open</option>
<option value="">Working On</option>
<option value="">Closed</option>
<option value="">Waiting for client reply</option>
</select>
<input type="text" placeholder="Project"
class="py-2 px-3 border border-gray-300 rounded-md outline-none w-[220px] h-[40px]">
</div>
<div class="w-full h-fit bg-white rounded-md shadow-md mt-5">
<!-- TABLE HEADER -->
<div class="w-full flex h-[70px] rounded-t-md border border-gray-300">
<div class="w-[3%] h-full flex justify-center items-center border-r border-gray-300">
<h1 class="text-slate-700 text-base">#</h1>
</div>
<div class="w-[14%] h-full flex justify-center items-center border-r border-gray-300">
<h1 class="text-slate-700 text-base">Client</h1>
</div>
<div class="w-[14%] h-full flex justify-center items-center border-r border-gray-300">
<h1 class="text-slate-700 text-base">Last Update</h1>
</div>
<div class="w-[14%] h-full flex justify-center items-center border-r border-gray-300">
<h1 class="text-slate-700 text-base">Last Reply</h1>
</div>
<div class="w-[30%] h-full flex justify-center items-center border-r border-gray-300">
<h1 class="text-slate-700 text-base">Subject</h1>
</div>
<div class="w-[10%] h-full flex justify-center items-center border-r border-gray-300">
<h1 class="text-slate-700 text-base">Department</h1>
</div>
<div class="w-[10%] h-full flex justify-center items-center border-r border-gray-300">
<h1 class="text-slate-700 text-base">Status</h1>
</div>
<div class="w-[5%] h-full flex justify-center items-center">
<h1 class="text-slate-700 text-base">Action</h1>
</div>
</div>
<!-- TABLE BODY -->
<div class="w-full h-fit">
<!-- 1ST ROW -->
<div class="w-full h-[60px] flex border-b border-x border-gray-300">
<div class="w-[3%] h-full flex justify-center items-center border-r border-gray-300 p-2">
<p class="text-sm text-gray-500">1</p>
</div>
<div class="w-[14%] h-full flex justify-center items-center border-r border-gray-300 p-2">
<p class="text-sm text-gray-500 text-center">Emilio</p>
</div>
<div class="w-[14%] h-full flex justify-center items-center border-r border-gray-300 p-2">
<p class="text-sm text-gray-500 text-center">Mon 18/2/2023 - 12:30PM</p>
</div>
<div class="w-[14%] h-full flex justify-center items-center border-r border-gray-300 p-2">
<p class="text-sm text-gray-500 text-center">Nataly</p>
</div>
<div class="w-[30%] h-full flex justify-start items-center border-r border-gray-300 p-2">
<p class="text-sm text-gray-500">Add a "Subsidiary of MetreKarre Koncept" under the
footer logo</p>
</div>
<div class="w-[10%] h-full flex justify-center items-center border-r border-gray-300 p-2">
<p class="text-sm text-gray-500 text-center">Development</p>
</div>
<div class="w-[10%] h-full flex justify-center items-center border-r border-gray-300 p-2 bg-green-700">
<p class="text-sm text-white text-center">Open</p>
</div>
<div class="w-[5%] h-full flex justify-center items-center gap-3 p-2">
<i class="fa fa-edit" style="color: cornflowerblue; font-size: 15px; cursor: pointer;"></i>
<i class="fa fa-trash" style="color: red; font-size: 15px; cursor: pointer;"></i>
</div>
</div>
<!-- 2ND ROW -->
<div class="w-full h-[60px] flex border-b border-x border-gray-300">
<div class="w-[3%] h-full flex justify-center items-center border-r border-gray-300 p-2">
<p class="text-sm text-gray-500">4</p>
</div>
<div class="w-[14%] h-full flex justify-center items-center border-r border-gray-300 p-2">
<p class="text-sm text-gray-500 text-center">Emile</p>
</div>
<div class="w-[14%] h-full flex justify-center items-center border-r border-gray-300 p-2">
<p class="text-sm text-gray-500 text-center">Wed 18/2/2023 - 12:30PM</p>
</div>
<div class="w-[14%] h-full flex justify-center items-center border-r border-gray-300 p-2">
<p class="text-sm text-gray-500 text-center">Salim</p>
</div>
<div class="w-[30%] h-full flex justify-start items-center border-r border-gray-300 p-2">
<p class="text-sm text-gray-500">Fix the ad banners based on screen size</p>
</div>
<div class="w-[10%] h-full flex justify-center items-center border-r border-gray-300 p-2">
<p class="text-sm text-gray-500 text-center">Development</p>
</div>
<div class="w-[10%] h-full flex justify-center items-center border-r border-gray-300 p-2 bg-yellow-400">
<p class="text-sm text-white text-center">Working on</p>
</div>
<div class="w-[5%] h-full flex justify-center items-center gap-3 p-2">
<i class="fa fa-edit" style="color: cornflowerblue; font-size: 15px; cursor: pointer;"></i>
<i class="fa fa-trash" style="color: red; font-size: 15px; cursor: pointer;"></i>
</div>
</div>
<!-- 3RD ROW -->
<div class="w-full h-[60px] flex border-b border-x border-gray-300">
<div class="w-[3%] h-full flex justify-center items-center border-r border-gray-300 p-2">
<p class="text-sm text-gray-500">5</p>
</div>
<div class="w-[14%] h-full flex justify-center items-center border-r border-gray-300 p-2">
<p class="text-sm text-gray-500 text-center">Fouad</p>
</div>
<div class="w-[14%] h-full flex justify-center items-center border-r border-gray-300 p-2">
<p class="text-sm text-gray-500 text-center">Tue 18/2/2023 - 12:30PM</p>
</div>
<div class="w-[14%] h-full flex justify-center items-center border-r border-gray-300 p-2">
<p class="text-sm text-gray-500 text-center">Reine</p>
</div>
<div class="w-[30%] h-full flex justify-start items-center border-r border-gray-300 p-2">
<p class="text-sm text-gray-500">Fix the alignments of the categories in the inner
category page</p>
</div>
<div class="w-[10%] h-full flex justify-center items-center border-r border-gray-300 p-2">
<p class="text-sm text-gray-500 text-center">Development</p>
</div>
<div class="w-[10%] h-full flex justify-center items-center border-r border-gray-300 p-2 bg-blue-500">
<p class="text-sm text-white text-center">Waiting for client reply</p>
</div>
<div class="w-[5%] h-full flex justify-center items-center gap-3 p-2">
<i class="fa fa-edit" style="color: cornflowerblue; font-size: 15px; cursor: pointer;"></i>
<i class="fa fa-trash" style="color: red; font-size: 15px; cursor: pointer;"></i>
</div>
</div>
<!-- 4TH ROW -->
<div class="w-full h-[60px] flex border-b border-x border-gray-300">
<div class="w-[3%] h-full flex justify-center items-center border-r border-gray-300 p-2">
<p class="text-sm text-gray-500">10</p>
</div>
<div class="w-[14%] h-full flex justify-center items-center border-r border-gray-300 p-2">
<p class="text-sm text-gray-500 text-center">Emilio</p>
</div>
<div class="w-[14%] h-full flex justify-center items-center border-r border-gray-300 p-2">
<p class="text-sm text-gray-500 text-center">Wed 18/2/2023 - 02:30PM</p>
</div>
<div class="w-[14%] h-full flex justify-center items-center border-r border-gray-300 p-2">
<p class="text-sm text-gray-500 text-center">Nataly</p>
</div>
<div class="w-[30%] h-full flex justify-start items-center border-r border-gray-300 p-2">
<p class="text-sm text-gray-500">Add a "Subsidiary of MetreKarre Koncept" under the
footer logo</p>
</div>
<div class="w-[10%] h-full flex justify-center items-center border-r border-gray-300 p-2">
<p class="text-sm text-gray-500 text-center">Development</p>
</div>
<div class="w-[10%] h-full flex justify-center items-center border-r border-gray-300 p-2 bg-green-700">
<p class="text-sm text-white text-center">Open</p>
</div>
<div class="w-[5%] h-full flex justify-center items-center gap-3 p-2">
<i class="fa fa-edit" style="color: cornflowerblue; font-size: 15px; cursor: pointer;"></i>
<i class="fa fa-trash" style="color: red; font-size: 15px; cursor: pointer;"></i>
</div>
</div>
<!-- 5TH ROW -->
<div class="w-full h-[60px] flex border-b border-x border-gray-300">
<div class="w-[3%] h-full flex justify-center items-center border-r border-gray-300 p-2">
<p class="text-sm text-gray-500">6</p>
</div>
<div class="w-[14%] h-full flex justify-center items-center border-r border-gray-300 p-2">
<p class="text-sm text-gray-500 text-center">Emilio</p>
</div>
<div class="w-[14%] h-full flex justify-center items-center border-r border-gray-300 p-2">
<p class="text-sm text-gray-500 text-center">Fri 20/2/2023 - 12:30PM</p>
</div>
<div class="w-[14%] h-full flex justify-center items-center border-r border-gray-300 p-2">
<p class="text-sm text-gray-500 text-center">Nataly</p>
</div>
<div class="w-[30%] h-full flex justify-start items-center border-r border-gray-300 p-2">
<p class="text-sm text-gray-500">Add a "Subsidiary of MetreKarre Koncept" under the
footer logo</p>
</div>
<div class="w-[10%] h-full flex justify-center items-center border-r border-gray-300 p-2">
<p class="text-sm text-gray-500 text-center">Development</p>
</div>
<div class="w-[10%] h-full flex justify-center items-center border-r border-gray-300 p-2 bg-red-500">
<p class="text-sm text-white text-center">Closed</p>
</div>
<div class="w-[5%] h-full flex justify-center items-center gap-3 p-2">
<i class="fa fa-edit" style="color: cornflowerblue; font-size: 15px; cursor: pointer;"></i>
<i class="fa fa-trash" style="color: red; font-size: 14px; cursor: pointer;"></i>
</div>
</div>
</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>
{% endblock content %}