New changes.

main
Nataly-ab 1 year ago
parent c5cf92a9de
commit 3434dacbaf

Binary file not shown.

@ -28,6 +28,14 @@
}
/* GIVE THIS CLASS TO THE SELECTED EPIC IN PROJECT DETAILS PAGE */
.selectedEpic {
color: white !important;
font-weight: bold !important;
}
/* TO ANIMATE THE BURGER MENU IN THE FIXED HEADER */
/* Default state */
.burgerMenuLine {

@ -234,6 +234,30 @@ def staff_positions(request):
return render(request, 'listing_pages/staff-positions.html', context)
#FETCH EPIC RELATED TASKS
def get_tasks(request, epic_id):
epic = get_object_or_404(Epic, id=epic_id)
related_tasks = Task.objects.filter(epic=epic).order_by('-id')
context = {
'epic': epic,
'related_tasks': related_tasks,
}
return render(request, 'epic-fetched-tasks.html', context)
# TO DISPALY ALL THE OPEN TASKS OF THIS PROJECT
def open_tasks_for_project(request, project_id):
project = Project.objects.get(pk=project_id)
open_tasks = Task.objects.filter(project=project, status='Open').order_by('-id')
context = {
'project': project,
'open_tasks': open_tasks,
}
return render(request, 'project-open-tasks.html', context)
@ -244,29 +268,13 @@ def staff_positions(request):
@login_required
def detailed_project(request, project_id):
project = get_object_or_404(Project, project_id=project_id)
epics = Epic.objects.filter(project=project)
latest_epic = Epic.objects.filter(project=project).last()
epics = Epic.objects.filter(project=project).order_by('-id')
project_notes = Note.objects.filter(project=project).order_by('-id')
if latest_epic:
epics = epics.exclude(pk=latest_epic.pk)
selected_epic_id = request.GET.get('epic_id')
if selected_epic_id:
selected_epic = get_object_or_404(Epic, id=selected_epic_id)
related_tasks = Task.objects.filter(epic=selected_epic)
else:
selected_epic = None
related_tasks = []
context = {
'project': project,
'epics': epics,
'selected_epic': selected_epic,
'related_tasks': related_tasks,
'latest_epic': latest_epic,
'project_notes' : project_notes,
}
@ -656,48 +664,6 @@ def user_recent_activities_modal(request, user_id):
#FETCH EPIC RELATED TASKS
def get_tasks (request, epic_id):
epic = get_object_or_404(Epic, id=epic_id)
related_tasks = Task.objects.filter(epic_id=epic).order_by('-id')
context = {
'epic': epic,
'related_tasks': related_tasks,
}
return render(request, 'epic-fetched-tasks.html', context)
# TO FETCH THE LATEST EPIC AND ITS TASKS
def get_latest_epic(request, project_id):
try:
project = get_object_or_404(Project, id=project_id)
latest_epic = Epic.objects.filter(project=project).order_by('-id').first()
if latest_epic:
related_tasks = Task.objects.filter(epic=latest_epic)
else:
related_tasks = []
context = {
'latest_epic': latest_epic,
'related_tasks': related_tasks,
}
return render(request, 'epic-fetched-tasks.html', context)
except Http404:
# Handle case where the specified project does not exist
return HttpResponseServerError("Project not found")
except Exception as e:
# Log the error or return a specific error response
print(f"An error occurred: {str(e)}")
return HttpResponseServerError("Internal Server Error")
#Save Functions

@ -66,7 +66,7 @@ urlpatterns = [
#Fetch urls
path('get_tasks/<int:epic_id>/', views.get_tasks, name='get_tasks'),
path('get_latest_epic/<int:project_id>/', views.get_latest_epic, name='get_latest_epic'),
path('open_tasks_for_project/<int:project_id>/', views.open_tasks_for_project, name='open_tasks_for_project'),
#Modals urls

@ -1371,6 +1371,10 @@ video {
border-bottom-width: 1px;
}
.border-b-2 {
border-bottom-width: 2px;
}
.border-r {
border-right-width: 1px;
}
@ -1907,6 +1911,10 @@ video {
padding-bottom: 2.25rem;
}
.pb-1 {
padding-bottom: 0.25rem;
}
.pb-2 {
padding-bottom: 0.5rem;
}
@ -2010,6 +2018,10 @@ video {
font-weight: 700;
}
.font-extralight {
font-weight: 200;
}
.font-light {
font-weight: 300;
}
@ -2040,6 +2052,16 @@ video {
color: rgb(59 130 246 / var(--tw-text-opacity));
}
.text-blue-600 {
--tw-text-opacity: 1;
color: rgb(37 99 235 / var(--tw-text-opacity));
}
.text-gray-300 {
--tw-text-opacity: 1;
color: rgb(209 213 219 / var(--tw-text-opacity));
}
.text-gray-400 {
--tw-text-opacity: 1;
color: rgb(156 163 175 / var(--tw-text-opacity));
@ -2245,6 +2267,13 @@ video {
}
}
/* GIVE THIS CLASS TO THE SELECTED EPIC IN PROJECT DETAILS PAGE */
.selectedEpic {
color: white !important;
font-weight: bold !important;
}
/* TO ANIMATE THE BURGER MENU IN THE FIXED HEADER */
/* Default state */
@ -2390,10 +2419,6 @@ video {
background-color: rgb(239 68 68 / var(--tw-bg-opacity));
}
.hover\:bg-transparent:hover {
background-color: transparent;
}
.hover\:bg-white:hover {
--tw-bg-opacity: 1;
background-color: rgb(255 255 255 / var(--tw-bg-opacity));
@ -2580,10 +2605,6 @@ video {
width: 300px;
}
.l\:w-\[50\%\] {
width: 50%;
}
.l\:w-fit {
width: -moz-fit-content;
width: fit-content;
@ -2659,22 +2680,9 @@ video {
}
@media (min-width: 1536px) {
.xl\:w-\[250px\] {
width: 250px;
}
.xl\:w-fit {
width: -moz-fit-content;
width: fit-content;
}
.xl\:grid-cols-4 {
grid-template-columns: repeat(4, minmax(0, 1fr));
}
.xl\:flex-row {
flex-direction: row;
}
}
@media (min-width: 1600px) {

@ -1,14 +0,0 @@
const epicSelect = document.getElementById('epicSelect');
const epicDetails = document.getElementById('epicDetails');
const latestEpicDetails = document.getElementById('latestEpicDetails');
epicSelect.addEventListener('change', function () {
if (this.value !== 'EPICS') {
epicDetails.classList.remove('hidden');
epicDetails.classList.add('flex');
latestEpicDetails.classList.add('hidden');
} else {
epicDetails.classList.add('hidden');
}
});

@ -1,79 +1,57 @@
$(document).ready(function () {
// Function to fetch related tasks based on epic ID
function fetchRelatedTasks(epicId) {
$.ajax({
type: "GET",
url: "/get_tasks/" + epicId + "/",
success: function (data) {
// console.log("Ajax call success. Data received:", data);
$("#epicRelatedTasksContainer").html(data);
},
error: function (xhr, status, error) {
console.log("Ajax call failed. Error details:");
console.log("XHR Object:", xhr);
console.log("Status:", status);
console.log("Error:", error);
}
});
}
$("select#epicSelect").change(function () {
// Get the selected option's value
var selectedEpicId = $(this).val();
if (selectedEpicId) {
// Fetch related tasks based on the selected epic
fetchRelatedTasks(selectedEpicId);
function fetchOpenTasks() {
var projectId = $('#projectId').text().trim();
$.ajax({
url: '/open_tasks_for_project/' + projectId + '/',
method: 'GET',
success: function (data) {
console.log('Success:', data);
$('#epicRelatedTasksContainer').html(data);
console.log('Updated Container:', $('#epicRelatedTasksContainer').html());
},
error: function (error) {
console.error('Error fetching open tasks:', error);
}
});
}
// TO FETCH THE LATEST EPIC BY DEFAULT
var projectId = $("#projectId").text().trim();
function fetchLatestEpicTasks(projectId) {
$.ajax({
type: "GET",
url: "/get_latest_epic/" + projectId + "/",
success: function (data) {
var latestEpicId = data.latest_epic ? data.latest_epic.id : null;
if (latestEpicId) {
// Fetch related tasks based on the latest epic
fetchRelatedTasks(latestEpicId);
} else {
// console.log("No latest epic found.");
}
$("#epicRelatedTasksContainer").html(data);
},
error: function (xhr, status, error) {
console.log("Ajax call failed. Error details:");
console.log("XHR Object:", xhr);
console.log("Status:", status);
console.log("Error:", error);
}
});
}
fetchLatestEpicTasks(projectId);
$('#epicSelect').change(function () {
var selectedEpic = $(this).find(':selected');
var startDate = selectedEpic.data('start-date');
var endDate = selectedEpic.data('end-date');
if (startDate && endDate) {
$('#epicDetails').removeClass('hidden');
$('#epicDetails span#startDate').text(startDate);
$('#epicDetails span#endDate').text(endDate);
} else {
$('#epicDetails').addClass('hidden');
// To load to display open tasks by default
$(document).ready(function () {
fetchOpenTasks();
});
// Click event handler for the "All Open Tasks" link
$('.openTasks').on('click', function () {
// Remove the selectedEpic class from all epic titles
$('.epicTitle').removeClass('selectedEpic');
$('.openTasks').removeClass('selectedEpic');
// Add the selectedEpic class to the "All Open Tasks" link
$(this).addClass('selectedEpic');
fetchOpenTasks();
});
// Click event handler for the epic titles
$('.epicTitle').on('click', function () {
// Remove the selectedEpic class from all epic titles
$('.epicTitle').removeClass('selectedEpic');
$('.openTasks').removeClass('selectedEpic');
var epicId = $(this).data('epic-id');
$(this).addClass('selectedEpic');
$.ajax({
url: '/get_tasks/' + epicId + '/',
method: 'GET',
success: function (data) {
console.log('Success:', data);
$('#epicRelatedTasksContainer').html(data);
console.log('Updated Container:', $('#epicRelatedTasksContainer').html());
},
error: function (error) {
console.error('Error fetching tasks:', error);
}
});
});
});

@ -2,6 +2,9 @@
{%load static%}
{% block content %}
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<!-- USERS ACTIVITIES ON MOBILE -->
<div class="w-[55px] h-[55px] bg-slate-700 rounded-full fixed xxlg1:hidden bottom-3 right-3 p-2 flex justify-center items-center cursor-pointer usersActivityIcon z-20"
data-modal-url="{% url 'getupdatedactivities' %}">
@ -541,9 +544,17 @@
</td>
<td class="px-6 py-4 text-center text-sm">
<button
class="w-full py-2 px-3 bg-transparent border border-gray-500 text-gray-500 cursor-pointer rounded-md deleteProjectNoteButton"
data-modal-url="{% url 'deleteprojectnotemodal' note.id %}">Delete</button>
<div class="w-full flex justify-center items-center gap-2">
<button
class="rounded-md bg-white border border-white p-1 h-[30px] w-[30px] deleteProjectNoteButton"
data-modal-url="{% url 'deleteprojectnotemodal' note.id %}" style="color: {{note.color}}">
<i class="fa fa-trash"></i>
</button>
<button
class="rounded-md bg-white border border-white p-1 h-[30px] w-[30px]" style="color: {{note.color}}">
<i class="fa fa-edit"></i>
</button>
</div>
</td>
</tr>
{% endfor %}
@ -579,51 +590,25 @@
</div>
</div>
<!-- RELATED TASK CONTAINER BASED ON THE CHOSEN EPIC -->
<div class="w-full mt-5">
<div
class="w-full bg-slate-300 rounded-md shadow-md h-fit p-5 flex flex-col l:flex-row justify-between items-center gap-3">
<div class="w-full l:w-[50%] xl:w-fit">
<select id="epicSelect" name="epic_id"
class="w-full xl:w-[250px] rounded-md border border-gray-300 p-3 outline-none text-gray-500 cursor-pointer">
<option selected value="{{latest_epic.id}}" data-start-date="{{ latest_epic.start_date }}"
data-end-date="{{ latest_epic.end_date }}">{{latest_epic.title}}</option>
{% for epic in epics %}
<option class="epic-link" value="{{ epic.id }}" data-start-date="{{ epic.start_date }}"
data-end-date="{{ epic.end_date }}">{{epic.title}}</option>
{% endfor %}
</select>
</div>
<div class="w-full l:w-[50%] xl:w-fit flex flex-col xl:flex-row justify-end items-center gap-2">
<div class="w-fit justify-start items-center gap-2" id="epicDetails">
<span id="startDate" class="text-gray-500 font-light"></span>
<span id="endDate" class="text-gray-500 font-light"></span>
</div>
<div class="w-fit justify-start items-center gap-2" id="latestEpicDetails">
<span class="text-gray-500 font-light">{{latest_epic.start_date}}</span>
<span class="text-gray-500 font-light">{{latest_epic.end_date}}</span>
</div>
<div class="w-full xl:w-fit flex flex-col xl:flex-row justify-end items-center gap-2">
<!-- <a href="{% url 'createepic' project.project_id %}">
<button
class="w-fit bg-blue-500 border border-blue-500 text-white text-base py-2 px-3 rounded-md hover:bg-transparent hover:text-blue-500 duration-300">Create
Epic</button>
</a> -->
<a href="{% url 'editepic' %}" class="w-full xl:w-fit">
<button id="editEpicButton"
class="w-full xl:w-fit bg-blue-500 border border-blue-500 text-white cursor-pointer hover:bg-white hover:text-blue-500 text-base py-2 px-3 rounded-md"
disabled>View
Epic</button>
</a>
<a href="{% url 'createtaskepic' %}" class="w-full xl:w-fit">
<button id="createTaskButton"
class="w-full xl:w-fit bg-blue-500 border border-blue-500 text-white cursor-pointer hover:bg-white hover:text-blue-500 text-base py-2 px-3 rounded-md duration-300"
disabled>Create
Task</button>
</a>
</div>
<div class="w-full bg-slate-700 rounded-md shadow-md h-fit p-5 flex flex-col gap-3">
<p class="text-white uppercase text-xl font-semibold">Filter Tasks by Epics</p>
<div class="w-full flex flex-wrap gap-3">
<div>
<a class="selectedEpic text-gray-400 font-semibold cursor-pointer openTasks"
data-project-id="{{project.id}}">All Open Tasks</a>
</div>
<p class="text-white opacity-30 font-extralight">|</p>
{% for epic in epics %}
<div>
<a class="epicTitle text-gray-400 font-semibold cursor-pointer"
data-epic-id="{{ epic.id }}">{{epic.title}}</a>
</div>
<p class="text-white opacity-30 font-extralight">|</p>
{% endfor %}
</div>
</div>
</div>
@ -836,8 +821,6 @@
<!-- 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>
<!-- TO FETCH THE RELATED TASKS -->
<script type="text/javascript" src='{% static "js/fetch-epic-tasks.js" %}'></script>

@ -1,174 +1,206 @@
{% load static %}
<div class="flex justify-between items-center gap-3 bg-slate-700 border border-slate-700 text-white py-2 px-3 rounded-md shadow-md">
<div>
<p>{{epic.start_date}} - {{epic.end_date}}<p>
</div>
<div class="flex justify-end items-center gap-3">
<button class="bg-transparent border border-white text-white rounded-md py-2 px-3 cursor-pointer hover:bg-white hover:text-slate-700">Edit Epic</button>
<button class="bg-transparent border border-white text-white rounded-md py-2 px-3 cursor-pointer hover:bg-white hover:text-slate-700">Delete Epic</button>
<button class="bg-transparent border border-white text-white rounded-md py-2 px-3 cursor-pointer hover:bg-white hover:text-slate-700">View Epic</button>
</div>
</div>
<!-- TASKS ON DESKTOP -->
<div class="hidden md:block">
<div class="hidden md:block mt-5">
<!-- TASKS TABLE -->
{% for task in related_tasks %}
<div class="w-full h-fit bg-white p-3 rounded-md shadow-md mb-5">
<div class="w-full bg-white h-fit rounded-md border border-gray-200">
<!-- TABLE HEADER -->
<div class="w-full h-[70px] rounded-t-md grid grid-cols-2">
{% if task.status == 'Open' %}
<div
class="flex justify-center items-center border-r border-b border-gray-200 bg-slate-600 rounded-tl-md text-xl text-white font-semibold">
class="flex justify-center items-center border-r border-b border-gray-200 bg-blue-500 rounded-tl-md text-xl text-white font-semibold">
<p>{{task.name}}</p>
</div>
{% endif %}
<div class="grid grid-cols-3">
{% if task.status == 'Closed' %}
<div
class="flex justify-center items-center border-r border-b border-gray-200 text-white bg-green-700">
<p>{{task.status}}</p>
</div>
{% endif %}
{% if task.status == 'Working On' %}
<div
class="flex justify-center items-center border-r border-b border-gray-200 bg-yellow-500 rounded-tl-md text-xl text-white font-semibold">
<p>{{task.name}}</p>
</div>
{% endif %}
{% if task.status == 'Closed' %}
<div
class="flex justify-center items-center border-r border-b border-gray-200 bg-green-700 rounded-tl-md text-xl text-white font-semibold">
<p>{{task.name}}</p>
</div>
{% endif %}
<div class="grid grid-cols-3">
{% if task.status == 'Open' %}
<div
class="flex justify-center items-center border-r border-b border-gray-200 text-white bg-red-500">
class="flex justify-center items-center border-r border-b border-gray-200 text-white bg-blue-500">
<p>{{task.status}}</p>
</div>
{% endif %}
{% if task.status == 'Working On' %}
<div
class="flex justify-center items-center border-r border-b border-gray-200 text-white bg-orange-500">
class="flex justify-center items-center border-r border-b border-gray-200 text-white bg-yellow-500">
<p>{{task.status}}</p>
</div>
{% endif %}
{% if task.status == 'Closed' %}
<div
class="flex justify-center items-center border-r border-b border-gray-200 text-white bg-green-700">
<p>{{task.formatted_start_date}}</p>
<p>{{task.status}}</p>
</div>
{% endif %}
{% if task.status == 'Open' %}
<div
class="flex justify-center items-center border-r border-b border-gray-200 text-white bg-red-500">
class="flex justify-center items-center border-r border-b border-gray-200 text-white bg-blue-500">
<p>{{task.formatted_start_date}}</p>
</div>
{% endif %}
{% if task.status == 'Working On' %}
<div
class="flex justify-center items-center border-r border-b border-gray-200 text-white bg-orange-500">
class="flex justify-center items-center border-r border-b border-gray-200 text-white bg-yellow-500">
<p>{{task.formatted_start_date}}</p>
</div>
{% endif %}
{% if task.status == 'Closed' %}
<div
class="flex justify-center items-center border-b border-gray-200 text-white bg-green-700 rounded-tr-md">
<p>{{task.formatted_end_date}}</p>
class="flex justify-center items-center border-r border-b border-gray-200 text-white bg-green-700">
<p>{{task.formatted_start_date}}</p>
</div>
{% endif %}
{% if task.status == 'Open' %}
<div
{% if task.end_date < current_date %} <div
class="flex justify-center items-center border-b border-gray-200 text-white bg-red-500 rounded-tr-md">
<p>{{task.formatted_end_date}}</p>
</div>
{% endif %}
{% if task.status == 'Working On' %}
<div
class="flex justify-center items-center border-b border-gray-200 text-white bg-orange-500 rounded-tr-md">
<p>{{task.formatted_end_date}}</p>
</div>
{% endif %}
</div>
{% else %}
<div
class="flex justify-center items-center border-b border-gray-200 text-white bg-blue-500 rounded-tr-md">
<p>{{task.formatted_end_date}}</p>
</div>
{% endif %}
{% endif %}
{% if task.status == 'Working On' %}
{% if task.end_date < current_date %} <div
class="flex justify-center items-center border-b border-gray-200 text-white bg-red-500 rounded-tr-md">
<p>{{task.formatted_end_date}}</p>
</div>
{% else %}
<div
class="flex justify-center items-center border-b border-gray-200 text-white bg-yellow-500 rounded-tr-md">
<p>{{task.formatted_end_date}}</p>
</div>
{% endif %}
{% endif %}
<!-- TABLE BODY -->
<div class="w-full h-fit grid grid-cols-2">
<!-- LEFT SIDE OF TABLE BODY -->
<div class="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.user.first_name}}
{{task.assigned_to.user.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>
{% if task.status == 'Closed' %}
{% if task.end_date < current_date %} <div
class="flex justify-center items-center border-b border-gray-200 text-white bg-red-500 rounded-tr-md">
<p>{{task.formatted_end_date}}</p>
</div>
{% else %}
<div class="flex justify-center items-center border-b border-gray-200 text-white bg-green-700 rounded-tr-md">
<p>{{task.formatted_end_date}}</p>
</div>
{% endif %}
{% endif %}
</div>
</div>
<!-- RIGHT SIDE OF TABLE BODY -->
<div class="h-fit bg-white grid grid-cols-3 rounded-br-md">
<button
class="p-2 border border-gray-200 text-base h-[70px] bg-gray-100 text-gray-500">Close</button>
<!-- TABLE BODY -->
<div class="w-full h-fit grid grid-cols-2 mt-5">
<!-- LEFT SIDE OF TABLE BODY -->
<div class="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>
<button
class="p-2 border border-gray-200 text-base h-[70px] bg-gray-100 text-gray-500 updateStatusButton"
data-modal-url="{% url 'updatestatus' task.task_id %}">Update
Status</button>
<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>
<button
class="p-2 border border-gray-200 text-base h-[70px] bg-gray-100 text-gray-500 addTimeButton"
data-modal-url="{% url 'addtime' %}">Add
Time</button>
<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.user.first_name}}
{{task.assigned_to.user.last_name}}</p>
</div>
<button
class="p-2 border border-gray-200 text-base h-[70px] bg-gray-100 text-gray-500 deleteTaskButton"
data-modal-url="{% url 'deletetask' %}">Delete</button>
<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>
<a href="{% url 'edittask' task.task_id %}">
<button
class="w-full p-2 border border-gray-200 text-base h-[70px] bg-gray-100 text-gray-500">Edit</button>
</a>
<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>
<button
class="p-2 border border-gray-200 text-base h-[70px] bg-gray-100 text-gray-500 showPointsButton"
data-modal-url="{% url 'showpoints' task.task_id %}">Show
Points</button>
<!-- RIGHT SIDE OF TABLE BODY -->
<div class="h-fit bg-white grid grid-cols-3 rounded-br-md">
<button class="p-2 border border-gray-200 text-base h-[70px] bg-gray-100 text-gray-500">Close</button>
<button
class="p-2 border border-gray-200 text-base h-[70px] bg-gray-100 text-gray-500 addPointButton"
data-modal-url="{% url 'addpoint' task.task_id %}">Add
Point</button>
<button class="p-2 border border-gray-200 text-base h-[70px] bg-gray-100 text-gray-500 updateStatusButton"
data-modal-url="{% url 'updatestatus' task.task_id %}">Update
Status</button>
<a href="{% url 'detailed-task' task.task_id %}">
<button
class="w-full p-2 border border-gray-200 text-base h-[70px] bg-gray-100 text-gray-500">Details</button>
</a>
<button class="p-2 border border-gray-200 text-base h-[70px] bg-gray-100 text-gray-500 addTimeButton"
data-modal-url="{% url 'addtime' %}">Add
Time</button>
<button
class="p-2 border border-gray-200 text-base h-[70px] bg-gray-100 text-gray-500 rounded-br-md timelineButton"
data-modal-url="{% url 'timeline' %}">Timeline</button>
</div>
</div>
</div>
<button
class="p-2 border border-gray-200 text-base h-[70px] bg-gray-100 text-gray-500 deleteTaskButton">Delete</button>
<a href="{% url 'edittask' task.task_id %}">
<button class="w-full p-2 border border-gray-200 text-base h-[70px] bg-gray-100 text-gray-500">Edit</button>
</a>
<button class="p-2 border border-gray-200 text-base h-[70px] bg-gray-100 text-gray-500 showPointsButton"
data-modal-url="{% url 'showpoints' task.task_id %}">Show
Points</button>
<button class="p-2 border border-gray-200 text-base h-[70px] bg-gray-100 text-gray-500 addPointButton"
data-modal-url="{% url 'addpoint' task.task_id %}">Add
Point</button>
<a href="{% url 'detailed-task' task.task_id %}">
<button
class="w-full p-2 border border-gray-200 text-base h-[70px] bg-gray-100 text-gray-500">Details</button>
</a>
<button
class="p-2 border border-gray-200 text-base h-[70px] bg-gray-100 text-gray-500 rounded-br-md timelineButton"
data-modal-url="{% url 'timeline' %}">Timeline</button>
</div>
{% endfor %}
</div>
</div>
</div>
{% endfor %}
</div>
<!-- TASKS ON MOBILE -->
@ -280,8 +312,8 @@
data-modal-url="{% url 'addtime' %}">Add
Time</button>
<button class="p-2 border border-gray-200 text-sm h-[70px] bg-gray-100 text-gray-500 deleteTaskButton"
data-modal-url="{% url 'deletetask' %}">Delete</button>
<button
class="p-2 border border-gray-200 text-sm h-[70px] bg-gray-100 text-gray-500 deleteTaskButton">Delete</button>
<a href="{% url 'edittask' task.task_id %}">
<button
@ -307,4 +339,4 @@
</div>
</div>
{% endfor %}
</div>
</div>

@ -165,7 +165,7 @@
<p>{{task.name}}</p>
</div>
{% endif %}
{% if task.status == 'Working On' %}
<div
class="flex justify-center items-center border-r border-b border-gray-200 bg-yellow-500 rounded-tl-md text-xl text-white font-semibold">
@ -224,492 +224,475 @@
{% endif %}
{% if task.status == 'Open' %}
{% if task.end_date < current_date %}
<div
class="flex justify-center items-center border-b border-gray-200 text-white bg-red-500 rounded-tr-md">
<p>{{task.formatted_end_date}}</p>
</div>
{% else %}
<div
class="flex justify-center items-center border-b border-gray-200 text-white bg-blue-500 rounded-tr-md">
<p>{{task.formatted_end_date}}</p>
</div>
{% endif %}
{% endif %}
{% if task.end_date < current_date %} <div
class="flex justify-center items-center border-b border-gray-200 text-white bg-red-500 rounded-tr-md">
<p>{{task.formatted_end_date}}</p>
</div>
{% else %}
<div
class="flex justify-center items-center border-b border-gray-200 text-white bg-blue-500 rounded-tr-md">
<p>{{task.formatted_end_date}}</p>
</div>
{% endif %}
{% endif %}
{% if task.status == 'Working On' %}
{% if task.end_date < current_date %}
<div
class="flex justify-center items-center border-b border-gray-200 text-white bg-red-500 rounded-tr-md">
<p>{{task.formatted_end_date}}</p>
</div>
{% else %}
<div
class="flex justify-center items-center border-b border-gray-200 text-white bg-yellow-500 rounded-tr-md">
<p>{{task.formatted_end_date}}</p>
</div>
{% endif %}
{% endif %}
{% if task.status == 'Working On' %}
{% if task.end_date < current_date %} <div
class="flex justify-center items-center border-b border-gray-200 text-white bg-red-500 rounded-tr-md">
<p>{{task.formatted_end_date}}</p>
</div>
{% else %}
<div
class="flex justify-center items-center border-b border-gray-200 text-white bg-yellow-500 rounded-tr-md">
<p>{{task.formatted_end_date}}</p>
</div>
{% endif %}
{% endif %}
{% if task.status == 'Closed' %}
{% if task.end_date < current_date %}
<div
class="flex justify-center items-center border-b border-gray-200 text-white bg-red-500 rounded-tr-md">
<p>{{task.formatted_end_date}}</p>
</div>
{% else %}
<div
class="flex justify-center items-center border-b border-gray-200 text-white bg-green-700 rounded-tr-md">
<p>{{task.formatted_end_date}}</p>
</div>
{% endif %}
{% endif %}
</div>
{% if task.status == 'Closed' %}
{% if task.end_date < current_date %} <div
class="flex justify-center items-center border-b border-gray-200 text-white bg-red-500 rounded-tr-md">
<p>{{task.formatted_end_date}}</p>
</div>
{% else %}
<div
class="flex justify-center items-center border-b border-gray-200 text-white bg-green-700 rounded-tr-md">
<p>{{task.formatted_end_date}}</p>
</div>
{% endif %}
{% endif %}
</div>
</div>
<!-- TABLE BODY -->
<div class="w-full h-fit grid grid-cols-2">
<!-- LEFT SIDE OF TABLE BODY -->
<div class="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>
<!-- TABLE BODY -->
<div class="w-full h-fit grid grid-cols-2">
<!-- LEFT SIDE OF TABLE BODY -->
<div class="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.user.first_name}}
{{task.assigned_to.user.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>
<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>
<!-- RIGHT SIDE OF TABLE BODY -->
<div class="h-fit bg-white grid grid-cols-3 rounded-br-md">
<button
class="p-2 border border-gray-200 text-base h-[70px] bg-gray-100 text-gray-500">Close</button>
<button
class="p-2 border border-gray-200 text-base h-[70px] bg-gray-100 text-gray-500 updateStatusButton"
data-modal-url="{% url 'updatestatus' task.task_id %}">Update
Status</button>
<button
class="p-2 border border-gray-200 text-base h-[70px] bg-gray-100 text-gray-500 addTimeButton"
data-modal-url="{% url 'addtime' %}">Add
Time</button>
<button
class="p-2 border border-gray-200 text-base h-[70px] bg-gray-100 text-gray-500 deleteTaskButton"
data-modal-url="{% url 'deletetaskmodal' task.id %}">Delete</button>
<a href="{% url 'edittask' task.task_id %}">
<button
class="w-full p-2 border border-gray-200 text-base h-[70px] bg-gray-100 text-gray-500">Edit</button>
</a>
<button
class="p-2 border border-gray-200 text-base h-[70px] bg-gray-100 text-gray-500 showPointsButton"
data-modal-url="{% url 'showpoints' task.task_id %}">Show
Points</button>
<button
class="p-2 border border-gray-200 text-base h-[70px] bg-gray-100 text-gray-500 addPointButton"
data-modal-url="{% url 'addpoint' task.task_id %}">Add
Point</button>
<a href="{% url 'detailed-task' task.task_id %}">
<button
class="w-full p-2 border border-gray-200 text-base h-[70px] bg-gray-100 text-gray-500">Details</button>
</a>
<button
class="p-2 border border-gray-200 text-base h-[70px] bg-gray-100 text-gray-500 rounded-br-md timelineButton"
data-modal-url="{% url 'timeline' %}">Timeline</button>
</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.user.first_name}}
{{task.assigned_to.user.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>
{% endfor %}
<!-- RIGHT SIDE OF TABLE BODY -->
<div class="h-fit bg-white grid grid-cols-3 rounded-br-md">
<button
class="p-2 border border-gray-200 text-base h-[70px] bg-gray-100 text-gray-500">Close</button>
<button
class="p-2 border border-gray-200 text-base h-[70px] bg-gray-100 text-gray-500 updateStatusButton"
data-modal-url="{% url 'updatestatus' task.task_id %}">Update
Status</button>
<button
class="p-2 border border-gray-200 text-base h-[70px] bg-gray-100 text-gray-500 addTimeButton"
data-modal-url="{% url 'addtime' %}">Add
Time</button>
<button
class="p-2 border border-gray-200 text-base h-[70px] bg-gray-100 text-gray-500 deleteTaskButton"
data-modal-url="{% url 'deletetaskmodal' task.id %}">Delete</button>
<a href="{% url 'edittask' task.task_id %}">
<button
class="w-full p-2 border border-gray-200 text-base h-[70px] bg-gray-100 text-gray-500">Edit</button>
</a>
<button
class="p-2 border border-gray-200 text-base h-[70px] bg-gray-100 text-gray-500 showPointsButton"
data-modal-url="{% url 'showpoints' task.task_id %}">Show
Points</button>
<button
class="p-2 border border-gray-200 text-base h-[70px] bg-gray-100 text-gray-500 addPointButton"
data-modal-url="{% url 'addpoint' task.task_id %}">Add
Point</button>
<a href="{% url 'detailed-task' task.task_id %}">
<button
class="w-full p-2 border border-gray-200 text-base h-[70px] bg-gray-100 text-gray-500">Details</button>
</a>
<button
class="p-2 border border-gray-200 text-base h-[70px] bg-gray-100 text-gray-500 rounded-br-md timelineButton"
data-modal-url="{% url 'timeline' %}">Timeline</button>
</div>
</div>
</div>
</div>
{% endfor %}
</div>
<!-- TASKS ON MOBILE -->
<div class="block md:hidden mt-5">
{% for task in my_tasks %}
<div class="w-full h-fit bg-white p-3 rounded-md shadow-md mb-5">
<div class="border border-gray-200 rounded-t-md">
<div class="w-full rounded-t-md">
{% if task.status == 'Open' %}
<div
class="w-full flex justify-center items-center text-white text-center bg-red-500 rounded-t-md py-5 px-3">
<p>{{task.name}}</p>
</div>
{% endif %}
<!-- TASKS ON MOBILE -->
<div class="block md:hidden mt-5">
{% for task in my_tasks %}
<div class="w-full h-fit bg-white p-3 rounded-md shadow-md mb-5">
<div class="border border-gray-200 rounded-t-md">
<div class="w-full rounded-t-md">
{% if task.status == 'Open' %}
<div
class="w-full flex justify-center items-center text-white text-center bg-red-500 rounded-t-md py-5 px-3">
<p>{{task.name}}</p>
</div>
{% endif %}
{% if task.status == 'Working On' %}
<div
class="w-full flex justify-center items-center text-white text-center bg-yellow-500 rounded-t-md py-5 px-3">
<p>{{task.name}}</p>
</div>
{% endif %}
{% if task.status == 'Working On' %}
<div
class="w-full flex justify-center items-center text-white text-center bg-yellow-500 rounded-t-md py-5 px-3">
<p>{{task.name}}</p>
</div>
{% endif %}
{% if task.status == 'Closed' %}
<div
class="w-full flex justify-center items-center text-white text-center bg-green-700 rounded-t-md py-5 px-3">
<p>{{task.name}}</p>
</div>
{% endif %}
</div>
{% if task.status == 'Closed' %}
<div
class="w-full flex justify-center items-center text-white text-center bg-green-700 rounded-t-md py-5 px-3">
<p>{{task.name}}</p>
</div>
{% endif %}
</div>
<div class="grid grid-cols-3 border-t border-gray-200">
{% if task.status == 'Closed' %}
<div
class="text-white bg-green-700 border-r border-gray-200 flex justify-center items-center text-center py-3 text-sm">
<p>{{task.status}}</p>
</div>
{% endif %}
<div class="grid grid-cols-3 border-t border-gray-200">
{% if task.status == 'Closed' %}
<div
class="text-white bg-green-700 border-r border-gray-200 flex justify-center items-center text-center py-3 text-sm">
<p>{{task.status}}</p>
</div>
{% endif %}
{% if task.status == 'Open' %}
<div
class="text-white bg-red-500 border-r border-gray-200 flex justify-center items-center text-center py-3 text-sm">
<p>{{task.status}}</p>
</div>
{% endif %}
{% if task.status == 'Open' %}
<div
class="text-white bg-red-500 border-r border-gray-200 flex justify-center items-center text-center py-3 text-sm">
<p>{{task.status}}</p>
</div>
{% endif %}
{% if task.status == 'Working On' %}
<div
class="text-white bg-yellow-500 border-r border-gray-200 flex justify-center items-center text-center py-3 text-sm">
<p>{{task.status}}</p>
</div>
{% endif %}
{% if task.status == 'Working On' %}
<div
class="text-white bg-yellow-500 border-r border-gray-200 flex justify-center items-center text-center py-3 text-sm">
<p>{{task.status}}</p>
</div>
{% endif %}
{% if task.status == 'Open' %}
<div
class="text-white bg-red-500 border-r border-gray-200 flex justify-center items-center text-center py-3 text-sm">
<p>{{task.start_date}}</p>
</div>
{% endif %}
{% if task.status == 'Open' %}
<div
class="text-white bg-red-500 border-r border-gray-200 flex justify-center items-center text-center py-3 text-sm">
<p>{{task.start_date}}</p>
</div>
{% endif %}
{% if task.status == 'Working On' %}
<div
class="text-white bg-yellow-500 border-r border-gray-200 flex justify-center items-center text-center py-3 text-sm">
<p>{{task.start_date}}</p>
</div>
{% endif %}
{% if task.status == 'Working On' %}
<div
class="text-white bg-yellow-500 border-r border-gray-200 flex justify-center items-center text-center py-3 text-sm">
<p>{{task.start_date}}</p>
</div>
{% endif %}
{% if task.status == 'Closed' %}
<div
class="text-white bg-green-700 border-r border-gray-200 flex justify-center items-center text-center py-3 text-sm">
<p>{{task.start_date}}</p>
</div>
{% endif %}
{% if task.status == 'Closed' %}
<div
class="text-white bg-green-700 border-r border-gray-200 flex justify-center items-center text-center py-3 text-sm">
<p>{{task.start_date}}</p>
</div>
{% endif %}
{% if task.status == 'Open' %}
<div
class="text-white bg-red-500 flex justify-center items-center text-center py-3 text-sm">
<p>{{task.end_date}}</p>
</div>
{% endif %}
{% if task.status == 'Open' %}
<div class="text-white bg-red-500 flex justify-center items-center text-center py-3 text-sm">
<p>{{task.end_date}}</p>
</div>
{% endif %}
{% if task.status == 'Working On' %}
<div
class="text-white bg-yellow-500 flex justify-center items-center text-center py-3 text-sm">
<p>{{task.end_date}}</p>
</div>
{% endif %}
{% if task.status == 'Working On' %}
<div class="text-white bg-yellow-500 flex justify-center items-center text-center py-3 text-sm">
<p>{{task.end_date}}</p>
</div>
{% endif %}
{% if task.status == 'Closed' %}
<div
class="text-white bg-green-700 flex justify-center items-center text-center py-3 text-sm">
<p>{{task.end_date}}</p>
</div>
{% endif %}
</div>
{% if task.status == 'Closed' %}
<div class="text-white bg-green-700 flex justify-center items-center text-center py-3 text-sm">
<p>{{task.end_date}}</p>
</div>
{% endif %}
</div>
<div class="w-full flex flex-col gap-2 p-3">
<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="w-full flex flex-col gap-2 p-3">
<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">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.user.first_name}}
{{task.assigned_to.user.last_name}}</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.user.first_name}}
{{task.assigned_to.user.last_name}}</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 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
class="w-full bg-gray-100 flex justify-between items-center py-3 px-3 text-slate-700 actionsButton">
<p>Actions</p>
<i class="fa fa-angle-down" style="font-size: 20px;"></i>
<i class="fa fa-angle-up" style="font-size: 20px; display: none;"></i>
</div>
<div class="w-full bg-gray-100 flex justify-between items-center py-3 px-3 text-slate-700 actionsButton">
<p>Actions</p>
<i class="fa fa-angle-down" style="font-size: 20px;"></i>
<i class="fa fa-angle-up" style="font-size: 20px; display: none;"></i>
</div>
<div class="grid-cols-3 actionsContainer hidden">
<button
class="p-2 border border-gray-200 text-sm h-[70px] bg-gray-100 text-gray-500">Close</button>
<div class="grid-cols-3 actionsContainer hidden">
<button class="p-2 border border-gray-200 text-sm h-[70px] bg-gray-100 text-gray-500">Close</button>
<button
class="p-2 border border-gray-200 text-sm h-[70px] bg-gray-100 text-gray-500 updateStatusButton"
data-modal-url="{% url 'updatestatus' task.task_id %}">Update
Status</button>
<button class="p-2 border border-gray-200 text-sm h-[70px] bg-gray-100 text-gray-500 updateStatusButton"
data-modal-url="{% url 'updatestatus' task.task_id %}">Update
Status</button>
<button
class="p-2 border border-gray-200 text-sm h-[70px] bg-gray-100 text-gray-500 addTimeButton"
data-modal-url="{% url 'addtime' %}">Add
Time</button>
<button class="p-2 border border-gray-200 text-sm h-[70px] bg-gray-100 text-gray-500 addTimeButton"
data-modal-url="{% url 'addtime' %}">Add
Time</button>
<button
class="p-2 border border-gray-200 text-base h-[70px] bg-gray-100 text-gray-500 deleteTaskButton"
data-modal-url="{% url 'deletetaskmodal' task.id %}">Delete</button>
<button class="p-2 border border-gray-200 text-base h-[70px] bg-gray-100 text-gray-500 deleteTaskButton"
data-modal-url="{% url 'deletetaskmodal' task.id %}">Delete</button>
<a href="{% url 'edittask' task.task_id %}">
<button
class="w-full p-2 border border-gray-200 text-sm h-[70px] bg-gray-100 text-gray-500">Edit</button>
</a>
<a href="{% url 'edittask' task.task_id %}">
<button
class="w-full p-2 border border-gray-200 text-sm h-[70px] bg-gray-100 text-gray-500">Edit</button>
</a>
<button
class="p-2 border border-gray-200 text-sm h-[70px] bg-gray-100 text-gray-500 showPointsButton"
data-modal-url="{% url 'showpoints' task.task_id %}">Show
Points</button>
<button class="p-2 border border-gray-200 text-sm h-[70px] bg-gray-100 text-gray-500 showPointsButton"
data-modal-url="{% url 'showpoints' task.task_id %}">Show
Points</button>
<button
class="p-2 border border-gray-200 text-sm h-[70px] bg-gray-100 text-gray-500 addPointButton"
data-modal-url="{% url 'addpoint' task.task_id %}">Add
Point</button>
<button class="p-2 border border-gray-200 text-sm h-[70px] bg-gray-100 text-gray-500 addPointButton"
data-modal-url="{% url 'addpoint' task.task_id %}">Add
Point</button>
<a href="{% url 'detailed-task' task.task_id %}">
<button
class="w-full p-2 border border-gray-200 text-sm h-[70px] bg-gray-100 text-gray-500">Details</button>
</a>
<a href="{% url 'detailed-task' task.task_id %}">
<button
class="w-full p-2 border border-gray-200 text-sm h-[70px] bg-gray-100 text-gray-500">Details</button>
</a>
<button
class="p-2 border border-gray-200 text-sm h-[70px] bg-gray-100 text-gray-500 timelineButton"
data-modal-url="{% url 'timeline' %}">Timeline</button>
</div>
</div>
</div>
{% endfor %}
<button class="p-2 border border-gray-200 text-sm h-[70px] bg-gray-100 text-gray-500 timelineButton"
data-modal-url="{% url 'timeline' %}">Timeline</button>
</div>
</div>
</div>
{% endfor %}
</div>
</div>
</div>
<!-- RIGHT SIDE / USERS ACTIVITY -->
<div class="w-[25%] hidden xxlg1:flex flex-col gap-3">
<div class="w-full hidden xxlg1:block bg-white shadow-md rounded-md p-5 cursor-pointer">
<div class="w-full h-full flex flex-col gap-3 items-center">
<div class="w-full flex justify-center items-center">
<p class="text-[22px] text-slate-700 font-bold uppercase text-center"><span
class="text-green-700">14</span>
Connected User</p>
</div>
<!-- RIGHT SIDE / USERS ACTIVITY -->
<div class="w-[25%] hidden xxlg1:flex flex-col gap-3">
<div class="w-full hidden xxlg1:block bg-white shadow-md rounded-md p-5 cursor-pointer">
<div class="w-full h-full flex flex-col gap-3 items-center">
<div class="w-full flex justify-center items-center">
<p class="text-[22px] text-slate-700 font-bold uppercase text-center"><span
class="text-green-700">14</span>
Connected User</p>
</div>
<div class="w-full flex flex-wrap gap-2">
<div class="relative userProfileContainer">
<div
class="w-fit py-2 px-3 bg-gray-700 bg-opacity-60 text-white absolute bottom-10 whitespace-nowrap hidden userName">
<p>Salim Elliye</p>
</div>
<div class="w-[30px] h-[30px] rounded-full userImage">
<img src="{% static 'images/1669023415919.jpeg' %}" alt="User Image"
class="w-full h-full rounded-full object-cover">
</div>
<div class="w-full flex flex-wrap gap-2">
<div class="relative userProfileContainer">
<div
class="w-fit py-2 px-3 bg-gray-700 bg-opacity-60 text-white absolute bottom-10 whitespace-nowrap hidden userName">
<p>Salim Elliye</p>
</div>
<div class="relative userProfileContainer">
<div
class="w-fit py-2 px-3 bg-gray-700 bg-opacity-60 text-white absolute bottom-10 whitespace-nowrap hidden userName">
<p>Salim Elliye</p>
</div>
<div class="w-[30px] h-[30px] rounded-full userImage">
<img src="{% static 'images/1686063290067.jpeg' %}" alt="User Image"
class="w-full h-full rounded-full object-cover">
</div>
<div class="w-[30px] h-[30px] rounded-full userImage">
<img src="{% static 'images/1669023415919.jpeg' %}" alt="User Image"
class="w-full h-full rounded-full object-cover">
</div>
<div class="relative userProfileContainer">
<div
class="w-fit py-2 px-3 bg-gray-700 bg-opacity-60 text-white absolute bottom-10 whitespace-nowrap hidden userName">
<p>Salim Elliye</p>
</div>
<div class="w-[30px] h-[30px] rounded-full userImage">
<img src="{% static 'images/avatar3.png' %}" alt="User Image"
class="w-full h-full rounded-full object-cover">
</div>
</div>
<div class="relative userProfileContainer">
<div
class="w-fit py-2 px-3 bg-gray-700 bg-opacity-60 text-white absolute bottom-10 whitespace-nowrap hidden userName">
<p>Salim Elliye</p>
</div>
<div class="relative userProfileContainer">
<div
class="w-fit py-2 px-3 bg-gray-700 bg-opacity-60 text-white absolute bottom-10 whitespace-nowrap hidden userName">
<p>Salim Elliye</p>
</div>
<div class="w-[30px] h-[30px] rounded-full userImage">
<img src="{% static 'images/1669023415919.jpeg' %}" alt="User Image"
class="w-full h-full rounded-full object-cover">
</div>
<div class="w-[30px] h-[30px] rounded-full userImage">
<img src="{% static 'images/1686063290067.jpeg' %}" alt="User Image"
class="w-full h-full rounded-full object-cover">
</div>
<div class="relative userProfileContainer">
<div
class="w-fit py-2 px-3 bg-gray-700 bg-opacity-60 text-white absolute bottom-10 whitespace-nowrap hidden userName">
<p>Salim Elliye</p>
</div>
<div class="w-[30px] h-[30px] rounded-full userImage">
<img src="{% static 'images/1686063290067.jpeg' %}" alt="User Image"
class="w-full h-full rounded-full object-cover">
</div>
</div>
<div class="relative userProfileContainer">
<div
class="w-fit py-2 px-3 bg-gray-700 bg-opacity-60 text-white absolute bottom-10 whitespace-nowrap hidden userName">
<p>Salim Elliye</p>
</div>
<div class="relative userProfileContainer">
<div
class="w-fit py-2 px-3 bg-gray-700 bg-opacity-60 text-white absolute bottom-10 whitespace-nowrap hidden userName">
<p>Salim Elliye</p>
</div>
<div class="w-[30px] h-[30px] rounded-full userImage">
<img src="{% static 'images/avatar3.png' %}" alt="User Image"
class="w-full h-full rounded-full object-cover">
</div>
<div class="w-[30px] h-[30px] rounded-full userImage">
<img src="{% static 'images/avatar3.png' %}" alt="User Image"
class="w-full h-full rounded-full object-cover">
</div>
<div class="relative userProfileContainer">
<div
class="w-fit py-2 px-3 bg-gray-700 bg-opacity-60 text-white absolute bottom-10 whitespace-nowrap hidden userName">
<p>Salim Elliye</p>
</div>
<div class="w-[30px] h-[30px] rounded-full userImage">
<img src="{% static 'images/1669023415919.jpeg' %}" alt="User Image"
class="w-full h-full rounded-full object-cover">
</div>
</div>
<div class="relative userProfileContainer">
<div
class="w-fit py-2 px-3 bg-gray-700 bg-opacity-60 text-white absolute bottom-10 whitespace-nowrap hidden userName">
<p>Salim Elliye</p>
</div>
<div class="relative userProfileContainer">
<div
class="w-fit py-2 px-3 bg-gray-700 bg-opacity-60 text-white absolute bottom-10 whitespace-nowrap hidden userName">
<p>Salim Elliye</p>
</div>
<div class="w-[30px] h-[30px] rounded-full userImage">
<img src="{% static 'images/1686063290067.jpeg' %}" alt="User Image"
class="w-full h-full rounded-full object-cover">
</div>
<div class="w-[30px] h-[30px] rounded-full userImage">
<img src="{% static 'images/1669023415919.jpeg' %}" alt="User Image"
class="w-full h-full rounded-full object-cover">
</div>
<div class="relative userProfileContainer">
<div
class="w-fit py-2 px-3 bg-gray-700 bg-opacity-60 text-white absolute bottom-10 whitespace-nowrap hidden userName">
<p>Salim Elliye</p>
</div>
<div class="w-[30px] h-[30px] rounded-full userImage">
<img src="{% static 'images/avatar3.png' %}" alt="User Image"
class="w-full h-full rounded-full object-cover">
</div>
</div>
<div class="relative userProfileContainer">
<div
class="w-fit py-2 px-3 bg-gray-700 bg-opacity-60 text-white absolute bottom-10 whitespace-nowrap hidden userName">
<p>Salim Elliye</p>
</div>
<div class="relative userProfileContainer">
<div
class="w-fit py-2 px-3 bg-gray-700 bg-opacity-60 text-white absolute bottom-10 whitespace-nowrap hidden userName">
<p>Salim Elliye</p>
</div>
<div class="w-[30px] h-[30px] rounded-full userImage">
<img src="{% static 'images/1669023415919.jpeg' %}" alt="User Image"
class="w-full h-full rounded-full object-cover">
</div>
<div class="w-[30px] h-[30px] rounded-full userImage">
<img src="{% static 'images/1686063290067.jpeg' %}" alt="User Image"
class="w-full h-full rounded-full object-cover">
</div>
<div class="relative userProfileContainer">
<div
class="w-fit py-2 px-3 bg-gray-700 bg-opacity-60 text-white absolute bottom-10 whitespace-nowrap hidden userName">
<p>Salim Elliye</p>
</div>
<div class="w-[30px] h-[30px] rounded-full userImage">
<img src="{% static 'images/1686063290067.jpeg' %}" alt="User Image"
class="w-full h-full rounded-full object-cover">
</div>
</div>
<div class="relative userProfileContainer">
<div
class="w-fit py-2 px-3 bg-gray-700 bg-opacity-60 text-white absolute bottom-10 whitespace-nowrap hidden userName">
<p>Salim Elliye</p>
</div>
<div class="relative userProfileContainer">
<div
class="w-fit py-2 px-3 bg-gray-700 bg-opacity-60 text-white absolute bottom-10 whitespace-nowrap hidden userName">
<p>Salim Elliye</p>
</div>
<div class="w-[30px] h-[30px] rounded-full userImage">
<img src="{% static 'images/avatar3.png' %}" alt="User Image"
class="w-full h-full rounded-full object-cover">
</div>
<div class="w-[30px] h-[30px] rounded-full userImage">
<img src="{% static 'images/avatar3.png' %}" alt="User Image"
class="w-full h-full rounded-full object-cover">
</div>
<div class="relative userProfileContainer">
<div
class="w-fit py-2 px-3 bg-gray-700 bg-opacity-60 text-white absolute bottom-10 whitespace-nowrap hidden userName">
<p>Salim Elliye</p>
</div>
<div class="w-[30px] h-[30px] rounded-full userImage">
<img src="{% static 'images/1669023415919.jpeg' %}" alt="User Image"
class="w-full h-full rounded-full object-cover">
</div>
</div>
<div class="relative userProfileContainer">
<div
class="w-fit py-2 px-3 bg-gray-700 bg-opacity-60 text-white absolute bottom-10 whitespace-nowrap hidden userName">
<p>Salim Elliye</p>
</div>
<div class="relative userProfileContainer">
<div
class="w-fit py-2 px-3 bg-gray-700 bg-opacity-60 text-white absolute bottom-10 whitespace-nowrap hidden userName">
<p>Salim Elliye</p>
</div>
<div class="w-[30px] h-[30px] rounded-full userImage">
<img src="{% static 'images/1686063290067.jpeg' %}" alt="User Image"
class="w-full h-full rounded-full object-cover">
</div>
<div class="w-[30px] h-[30px] rounded-full userImage">
<img src="{% static 'images/1669023415919.jpeg' %}" alt="User Image"
class="w-full h-full rounded-full object-cover">
</div>
</div>
<div class="relative userProfileContainer">
<div
class="w-fit py-2 px-3 bg-gray-700 bg-opacity-60 text-white absolute bottom-10 whitespace-nowrap hidden userName">
<p>Salim Elliye</p>
</div>
<div class="w-[30px] h-[30px] rounded-full userImage">
<img src="{% static 'images/1686063290067.jpeg' %}" alt="User Image"
class="w-full h-full rounded-full object-cover">
</div>
</div>
<div class="relative userProfileContainer">
<div
class="w-fit py-2 px-3 bg-gray-700 bg-opacity-60 text-white absolute bottom-10 whitespace-nowrap hidden userName">
<p>Salim Elliye</p>
</div>
<div class="w-[30px] h-[30px] rounded-full userImage">
<img src="{% static 'images/avatar3.png' %}" alt="User Image"
class="w-full h-full rounded-full object-cover">
</div>
</div>
<div class="relative userProfileContainer">
<div
class="w-fit py-2 px-3 bg-gray-700 bg-opacity-60 text-white absolute bottom-10 whitespace-nowrap hidden userName">
<p>Salim Elliye</p>
</div>
<div class="w-[30px] h-[30px] rounded-full userImage">
<img src="{% static 'images/1669023415919.jpeg' %}" alt="User Image"
class="w-full h-full rounded-full object-cover">
</div>
</div>
<div class="relative userProfileContainer">
<div
class="w-fit py-2 px-3 bg-gray-700 bg-opacity-60 text-white absolute bottom-10 whitespace-nowrap hidden userName">
<p>Salim Elliye</p>
</div>
<div class="w-[30px] h-[30px] rounded-full userImage">
<img src="{% static 'images/1686063290067.jpeg' %}" alt="User Image"
class="w-full h-full rounded-full object-cover">
</div>
</div>
<div class="relative userProfileContainer">
<div
class="w-fit py-2 px-3 bg-gray-700 bg-opacity-60 text-white absolute bottom-10 whitespace-nowrap hidden userName">
<p>Salim Elliye</p>
</div>
<div class="w-[30px] h-[30px] rounded-full userImage">
<img src="{% static 'images/avatar3.png' %}" alt="User Image"
class="w-full h-full rounded-full object-cover">
</div>
</div>
<div class="relative userProfileContainer">
<div
class="w-fit py-2 px-3 bg-gray-700 bg-opacity-60 text-white absolute bottom-10 whitespace-nowrap hidden userName">
<p>Salim Elliye</p>
</div>
<div class="w-[30px] h-[30px] rounded-full userImage">
<img src="{% static 'images/1669023415919.jpeg' %}" alt="User Image"
class="w-full h-full rounded-full object-cover">
</div>
</div>
<div class="relative userProfileContainer">
<div
class="w-fit py-2 px-3 bg-gray-700 bg-opacity-60 text-white absolute bottom-10 whitespace-nowrap hidden userName">
<p>Salim Elliye</p>
</div>
<div class="w-[30px] h-[30px] rounded-full userImage">
<img src="{% static 'images/1686063290067.jpeg' %}" alt="User Image"
class="w-full h-full rounded-full object-cover">
</div>
</div>
</div>
</div>
</div>
{% if latest_statuses_time_ago %}
<div
class="hidden xxlg1:block w-full bg-white h-[1283px] overflow-y-auto overflow-hidden 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">
{% if latest_statuses_time_ago %}
<div class="hidden xxlg1:block w-full bg-white h-[1283px] overflow-y-auto overflow-hidden 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' %}
{% include 'recent-activities.html' %}
</div>
</div>
{% else %}
<div
class="hidden xxlg1:block w-full bg-white h-[305px] overflow-y-auto overflow-hidden 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">
</div>
{% else %}
<div class="hidden xxlg1:block w-full bg-white h-[305px] overflow-y-auto overflow-hidden 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' %}
{% include 'recent-activities.html' %}
</div>
</div>
{% endif %}
</div>
{% endif %}
</div>
</div>
</div>

@ -0,0 +1,272 @@
{% load static %}
<!-- TASKS ON DESKTOP -->
<div class="hidden md:block">
<!-- TASKS TABLE -->
{% for task in open_tasks %}
<div class="w-full h-fit bg-white p-3 rounded-md shadow-md mb-5">
<div class="w-full bg-white h-fit rounded-md border border-gray-200">
<!-- TABLE HEADER -->
<div class="w-full h-[70px] rounded-t-md grid grid-cols-2">
<div
class="flex justify-center items-center border-r border-b border-gray-200 bg-blue-500 rounded-tl-md text-xl text-white font-semibold">
<p>{{task.name}}</p>
</div>
<div class="grid grid-cols-3">
{% if task.status == 'Open' %}
<div
class="flex justify-center items-center border-r border-b border-gray-200 text-white bg-blue-500">
<p>{{task.status}}</p>
</div>
{% endif %}
{% if task.status == 'Open' %}
<div
class="flex justify-center items-center border-r border-b border-gray-200 text-white bg-blue-500">
<p>{{task.formatted_start_date}}</p>
</div>
{% endif %}
{% if task.status == 'Open' %}
{% if task.end_date < current_date %}
<div
class="flex justify-center items-center border-b border-gray-200 text-white bg-red-500 rounded-tr-md">
<p>{{task.formatted_end_date}}</p>
</div>
{% else %}
<div
class="flex justify-center items-center border-b border-gray-200 text-white bg-blue-500 rounded-tr-md">
<p>{{task.formatted_end_date}}</p>
</div>
{% endif %}
{% endif %}
</div>
</div>
<!-- TABLE BODY -->
<div class="w-full h-fit grid grid-cols-2">
<!-- LEFT SIDE OF TABLE BODY -->
<div class="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.user.first_name}}
{{task.assigned_to.user.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="h-fit bg-white grid grid-cols-3 rounded-br-md">
<button
class="p-2 border border-gray-200 text-base h-[70px] bg-gray-100 text-gray-500">Close</button>
<button
class="p-2 border border-gray-200 text-base h-[70px] bg-gray-100 text-gray-500 updateStatusButton"
data-modal-url="{% url 'updatestatus' task.task_id %}">Update
Status</button>
<button
class="p-2 border border-gray-200 text-base h-[70px] bg-gray-100 text-gray-500 addTimeButton"
data-modal-url="{% url 'addtime' %}">Add
Time</button>
<button
class="p-2 border border-gray-200 text-base h-[70px] bg-gray-100 text-gray-500 deleteTaskButton"
>Delete</button>
<a href="{% url 'edittask' task.task_id %}">
<button
class="w-full p-2 border border-gray-200 text-base h-[70px] bg-gray-100 text-gray-500">Edit</button>
</a>
<button
class="p-2 border border-gray-200 text-base h-[70px] bg-gray-100 text-gray-500 showPointsButton"
data-modal-url="{% url 'showpoints' task.task_id %}">Show
Points</button>
<button
class="p-2 border border-gray-200 text-base h-[70px] bg-gray-100 text-gray-500 addPointButton"
data-modal-url="{% url 'addpoint' task.task_id %}">Add
Point</button>
<a href="{% url 'detailed-task' task.task_id %}">
<button
class="w-full p-2 border border-gray-200 text-base h-[70px] bg-gray-100 text-gray-500">Details</button>
</a>
<button
class="p-2 border border-gray-200 text-base h-[70px] bg-gray-100 text-gray-500 rounded-br-md timelineButton"
data-modal-url="{% url 'timeline' %}">Timeline</button>
</div>
</div>
</div>
</div>
{% endfor %}
</div>
<!-- TASKS ON MOBILE -->
<div class="block md:hidden">
{% for task in related_tasks %}
<div class="w-full h-fit bg-white p-3 rounded-md shadow-md mb-5">
<div class="border border-gray-200 rounded-t-md">
<div class="w-full rounded-t-md">
{% if task.status == 'Open' %}
<div
class="w-full flex justify-center items-center text-white text-center bg-red-500 rounded-t-md py-5 px-3">
<p>{{task.name}}</p>
</div>
{% endif %}
{% if task.status == 'Working On' %}
<div
class="w-full flex justify-center items-center text-white text-center bg-orange-500 rounded-t-md py-5 px-3">
<p>{{task.name}}</p>
</div>
{% endif %}
</div>
<div class="grid grid-cols-3 border-t border-gray-200">
{% if task.status == 'Open' %}
<div
class="text-white bg-red-500 border-r border-gray-200 flex justify-center items-center text-center py-3 text-sm">
<p>{{task.status}}</p>
</div>
{% endif %}
{% if task.status == 'Working On' %}
<div
class="text-white bg-orange-500 border-r border-gray-200 flex justify-center items-center text-center py-3 text-sm">
<p>{{task.status}}</p>
</div>
{% endif %}
{% if task.status == 'Open' %}
<div
class="text-white bg-red-500 border-r border-gray-200 flex justify-center items-center text-center py-3 text-sm">
<p>{{task.start_date}}</p>
</div>
{% endif %}
{% if task.status == 'Working On' %}
<div
class="text-white bg-orange-500 border-r border-gray-200 flex justify-center items-center text-center py-3 text-sm">
<p>{{task.start_date}}</p>
</div>
{% endif %}
{% if task.status == 'Open' %}
<div class="text-white bg-red-500 flex justify-center items-center text-center py-3 text-sm">
<p>{{task.end_date}}</p>
</div>
{% endif %}
{% if task.status == 'Working On' %}
<div class="text-white bg-orange-500 flex justify-center items-center text-center py-3 text-sm">
<p>{{task.end_date}}</p>
</div>
{% endif %}
</div>
<div class="w-full flex flex-col gap-2 p-3">
<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.user.first_name}}
{{task.assigned_to.user.last_name}}</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 class="w-full bg-gray-100 flex justify-between items-center py-3 px-3 text-slate-700 actionsButton">
<p>Actions</p>
<i class="fa fa-angle-down" style="font-size: 20px;"></i>
<i class="fa fa-angle-up" style="font-size: 20px; display: none;"></i>
</div>
<div class="grid-cols-3 actionsContainer hidden">
<button class="p-2 border border-gray-200 text-sm h-[70px] bg-gray-100 text-gray-500">Close</button>
<button class="p-2 border border-gray-200 text-sm h-[70px] bg-gray-100 text-gray-500 updateStatusButton"
data-modal-url="{% url 'updatestatus' task.task_id %}">Update
Status</button>
<button class="p-2 border border-gray-200 text-sm h-[70px] bg-gray-100 text-gray-500 addTimeButton"
data-modal-url="{% url 'addtime' %}">Add
Time</button>
<button class="p-2 border border-gray-200 text-sm h-[70px] bg-gray-100 text-gray-500 deleteTaskButton"
>Delete</button>
<a href="{% url 'edittask' task.task_id %}">
<button
class="w-full p-2 border border-gray-200 text-sm h-[70px] bg-gray-100 text-gray-500">Edit</button>
</a>
<button class="p-2 border border-gray-200 text-sm h-[70px] bg-gray-100 text-gray-500 showPointsButton"
data-modal-url="{% url 'showpoints' task.task_id %}">Show
Points</button>
<button class="p-2 border border-gray-200 text-sm h-[70px] bg-gray-100 text-gray-500 addPointButton"
data-modal-url="{% url 'addpoint' task.task_id %}">Add
Point</button>
<a href="{% url 'detailed-task' task.task_id %}">
<button
class="w-full p-2 border border-gray-200 text-sm h-[70px] bg-gray-100 text-gray-500">Details</button>
</a>
<button class="p-2 border border-gray-200 text-sm h-[70px] bg-gray-100 text-gray-500 timelineButton"
data-modal-url="{% url 'timeline' %}">Timeline</button>
</div>
</div>
</div>
{% endfor %}
</div>
Loading…
Cancel
Save