New changes.
parent
3a9e201250
commit
902e5db0e3
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,19 @@
|
||||
# Generated by Django 4.2.5 on 2024-01-15 10:49
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.utils.timezone
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('osinacore', '0046_task_requirement'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='task',
|
||||
name='status_date',
|
||||
field=models.DateTimeField(default=django.utils.timezone.now),
|
||||
),
|
||||
]
|
Binary file not shown.
Binary file not shown.
@ -1,41 +1,14 @@
|
||||
const epicSelect = document.getElementById('epicSelect');
|
||||
const epicDetails = document.getElementById('epicDetails');
|
||||
const epicRelatedTasks = document.getElementById('epicRelatedTasks');
|
||||
const editEpicButton = document.getElementById('editEpicButton');
|
||||
const createTaskButton = document.getElementById('createTaskButton');
|
||||
const createStoryButton = document.getElementById('createStoryButton');
|
||||
const latestEpicDetails = document.getElementById('latestEpicDetails');
|
||||
|
||||
epicSelect.addEventListener('change', function () {
|
||||
if (this.value !== 'EPICS') {
|
||||
epicDetails.classList.remove('hidden');
|
||||
epicDetails.classList.add('flex');
|
||||
|
||||
epicRelatedTasks.classList.remove('hidden');
|
||||
|
||||
editEpicButton.classList.remove('cursor-not-allowed', 'opacity-30');
|
||||
editEpicButton.classList.add('cursor-pointer');
|
||||
editEpicButton.removeAttribute('disabled');
|
||||
|
||||
createTaskButton.classList.remove('cursor-not-allowed', 'opacity-30');
|
||||
createTaskButton.classList.add('cursor-pointer');
|
||||
createTaskButton.removeAttribute('disabled');
|
||||
|
||||
createStoryButton.classList.remove('cursor-not-allowed', 'opacity-30');
|
||||
createStoryButton.classList.add('cursor-pointer');
|
||||
createStoryButton.removeAttribute('disabled');
|
||||
|
||||
|
||||
latestEpicDetails.classList.add('hidden');
|
||||
} else {
|
||||
epicDetails.classList.add('hidden');
|
||||
|
||||
epicRelatedTasks.classList.add('hidden');
|
||||
|
||||
editEpicButton.classList.add('cursor-not-allowed', 'opacity-30');
|
||||
editEpicButton.setAttribute('disabled', true);
|
||||
|
||||
createTaskButton.classList.add('cursor-not-allowed', 'opacity-30');
|
||||
createTaskButton.setAttribute('disabled', true);
|
||||
|
||||
createStoryButton.classList.add('cursor-not-allowed', 'opacity-30');
|
||||
createStoryButton.setAttribute('disabled', true);
|
||||
}
|
||||
});
|
@ -0,0 +1,18 @@
|
||||
// TO OPEN ACTION BUTTONS CONTAINER IN TASKS CONTAINER ON MOBILE
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
var actionsButtons = document.querySelectorAll('.actionsButton');
|
||||
|
||||
actionsButtons.forEach(function (button) {
|
||||
button.addEventListener('click', function () {
|
||||
var arrowDown = button.querySelector('.fa-angle-down');
|
||||
var arrowUp = button.querySelector('.fa-angle-up');
|
||||
|
||||
arrowDown.style.display = arrowDown.style.display === 'none' ? 'inline-block' : 'none';
|
||||
arrowUp.style.display = arrowUp.style.display === 'none' ? 'inline-block' : 'none';
|
||||
|
||||
var actionsContainer = button.nextElementSibling;
|
||||
actionsContainer.classList.toggle('hidden');
|
||||
actionsContainer.classList.toggle('grid');
|
||||
});
|
||||
});
|
||||
});
|
@ -1,156 +1,286 @@
|
||||
{% load static %}
|
||||
|
||||
|
||||
{% 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">
|
||||
<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">
|
||||
<p>{{task.name}}</p>
|
||||
<!-- TASKS ON DESKTOP -->
|
||||
<div class="hidden md:block">
|
||||
<!-- 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">
|
||||
<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">
|
||||
<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-red-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">
|
||||
<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">
|
||||
<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">
|
||||
<p>{{task.formatted_start_date}}</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if task.status == 'Open' %}
|
||||
<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>
|
||||
|
||||
</div>
|
||||
|
||||
<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>
|
||||
<!-- 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>
|
||||
{% endif %}
|
||||
|
||||
<!-- 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 'deletetask' %}">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="flex justify-center items-center border-r border-b border-gray-200 text-white bg-red-500">
|
||||
<p>{{task.status}}</p>
|
||||
<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="flex justify-center items-center border-r border-b border-gray-200 text-white bg-orange-500">
|
||||
<p>{{task.status}}</p>
|
||||
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>
|
||||
|
||||
{% 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>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="grid grid-cols-3 border-t border-gray-200">
|
||||
{% if task.status == 'Open' %}
|
||||
<div class="flex justify-center items-center border-r border-b border-gray-200 text-white bg-red-500">
|
||||
<p>{{task.formatted_start_date}}</p>
|
||||
<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="flex justify-center items-center border-r border-b border-gray-200 text-white bg-orange-500">
|
||||
<p>{{task.formatted_start_date}}</p>
|
||||
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 == 'Closed' %}
|
||||
<div class="flex justify-center items-center border-r border-b border-gray-200 text-white bg-green-700 rounded-tr-md">
|
||||
<p>{{task.formatted_end_date}}</p>
|
||||
{% 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' %}
|
||||
{% if task.status == 'Working On' %}
|
||||
<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>
|
||||
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="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 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>
|
||||
|
||||
<!-- 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="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">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">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">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">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 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>
|
||||
|
||||
<!-- 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"
|
||||
<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-base h-[70px] bg-gray-100 text-gray-500 addTimeButton"
|
||||
<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"
|
||||
<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>
|
||||
|
||||
<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>
|
||||
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-base h-[70px] bg-gray-100 text-gray-500 showPointsButton"
|
||||
<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-base h-[70px] bg-gray-100 text-gray-500 addPointButton"
|
||||
<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-base h-[70px] bg-gray-100 text-gray-500">Details</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-base h-[70px] bg-gray-100 text-gray-500 rounded-br-md timelineButton"
|
||||
<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>
|
||||
{% endfor %}
|
Loading…
Reference in New Issue