New changes.

main
nataly 1 year ago
parent 29d7a73520
commit 7994b1d8bd

Binary file not shown.

@ -317,6 +317,15 @@ def createtask_project(request, project_id):
return render(request, 'add_pages/createtask-project.html', context)
@login_required
def create_user_story_task(request):
context = {
}
return render(request, 'add_pages/create-user-story-task.html', context)
@login_required
def create_project(request):
staffs = StaffProfile.objects.all().order_by('-id')

@ -42,6 +42,7 @@ urlpatterns = [
path('createepic/<str:project_id>/', views.create_epic, name='createepic'),
path('createtask/', views.create_task, name='createtask'),
path('createtask/<str:project_id>/', views.createtask_project, name='createtaskproject'),
path('createuserstorytask/', views.create_user_story_task, name='createuserstorytask'),
path('createtaskepic/', views.createtask_epic, name='createtaskepic'),
path('projecttypes/', views.project_types, name='projecttypes'),
path('businesstypes/', views.business_types, name='businesstypes'),

@ -774,6 +774,10 @@ video {
margin-left: 0px;
}
.ml-4 {
margin-left: 1rem;
}
.ml-\[300px\] {
margin-left: 300px;
}
@ -866,6 +870,10 @@ video {
height: 3.5rem;
}
.h-5 {
height: 1.25rem;
}
.h-\[100px\] {
height: 100px;
}
@ -874,6 +882,10 @@ video {
height: 10px;
}
.h-\[1283px\] {
height: 1283px;
}
.h-\[13px\] {
height: 13px;
}
@ -930,18 +942,10 @@ video {
height: 60px;
}
.h-\[630px\] {
height: 630px;
}
.h-\[70px\] {
height: 70px;
}
.h-\[80px\] {
height: 80px;
}
.h-fit {
height: -moz-fit-content;
height: fit-content;
@ -963,6 +967,10 @@ video {
width: 12rem;
}
.w-5 {
width: 1.25rem;
}
.w-\[120px\] {
width: 120px;
}
@ -1051,10 +1059,6 @@ video {
width: 80%;
}
.w-\[80px\] {
width: 80px;
}
.w-\[90\%\] {
width: 90%;
}
@ -2317,6 +2321,11 @@ video {
color: rgb(59 130 246 / var(--tw-text-opacity));
}
.hover\:text-gray-700:hover {
--tw-text-opacity: 1;
color: rgb(55 65 81 / var(--tw-text-opacity));
}
.hover\:text-green-700:hover {
--tw-text-opacity: 1;
color: rgb(21 128 61 / var(--tw-text-opacity));

@ -0,0 +1,18 @@
const addReqButton = document.getElementById("addReqButton");
const addReqContainerTemplate = document.getElementById("addReqContainerTemplate");
const addReqContainer = document.getElementById("addReqContainer");
addReqButton.addEventListener("click", function () {
// Clone the template and remove the "hidden" class
const newContainer = addReqContainerTemplate.cloneNode(true);
newContainer.classList.remove("hidden");
// Add an event listener to the new container's remove button
const removeReqButton = newContainer.querySelector("#removeReqButton");
removeReqButton.addEventListener("click", function () {
// Remove the clicked container when the remove button is clicked
newContainer.remove();
});
addReqContainer.appendChild(newContainer);
});

@ -0,0 +1,33 @@
// WHEN THE USER CHOOSE A FILE THE NAME OF THE FILE WILL APPEAR IN THE SPAN AND THE UPLOADED IMAGE WILL APPEAR IN THE USER PROFILE IMAGE CONTAINER
const fileInput = document.getElementById('actual-btn');
const fileNameSpan = document.getElementById('file-name');
const imageContainer = document.getElementById('image-container');
fileInput.addEventListener('change', (event) => {
const selectedFiles = event.target.files;
if (selectedFiles.length > 0) {
const file = selectedFiles[0];
const fileReader = new FileReader();
fileReader.onload = function () {
const imgElement = document.createElement('img');
imgElement.src = fileReader.result;
imgElement.alt = 'Uploaded Image';
imgElement.classList.add('w-full', 'h-full', 'rounded-full', 'object-cover');
// Clear any previous images and append the new one
imageContainer.innerHTML = '';
imageContainer.appendChild(imgElement);
// Update the text in the file input
fileNameSpan.textContent = file.name;
};
// Read the selected file as a data URL
fileReader.readAsDataURL(file);
} else {
fileNameSpan.textContent = 'Upload Profile Picture';
imageContainer.innerHTML = ''; // Clear the container if no file is selected
}
});

@ -0,0 +1,26 @@
// WHEN THE USER CHOOSE A FILE THE NAME OF THE FILE WILL APPEAR IN THE SPAN
document.addEventListener('DOMContentLoaded', function() {
const fileInputs = document.querySelectorAll('.file-input');
fileInputs.forEach(fileInput => {
const fileNameSpan = fileInput.parentElement.querySelector('.file-name');
const fileLabel = fileInput.parentElement.querySelector('.file-label');
// Event listener to the label "file-label", which triggers a click on the hidden file input "file-input"
fileLabel.addEventListener('click', () => {
fileInput.click();
});
fileInput.addEventListener('change', (event) => {
const selectedFiles = event.target.files;
if (selectedFiles.length > 0) {
const fileNames = Array.from(selectedFiles).map(file => file.name).join(', ');
fileNameSpan.textContent = fileNames;
} else {
fileNameSpan.textContent = 'Upload Documents (PDF, docx)';
}
});
});
});

@ -12,79 +12,91 @@
<form method="POST" action="{% url 'save_business' %}" enctype="multipart/form-data">
{% csrf_token %}
<input name="name" type="text" placeholder="Name"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md mt-4" required>
<div class="inbox-box border border-gray-300 py-1 px-3 w-full rounded-md mt-4">
<div class="flex items-center justify-between">
<input name="logo" required type="file" id="actual-btn" accept="image/*" hidden />
<span id="file-name" class="text-gray-500 text-base focus:outline-none outline-none">Upload Business
Logo</span>
<label for="actual-btn"
class="bg-transparent text-gray-500 border border-white px-4 py-2 h-14 cursor-pointer flex items-center"><i
class="fa fa-upload"></i></label>
<div class="w-full flex flex-col gap-5">
<div class="w-full">
<label class="text-gray-500">Name:</label>
<input name="name" type="text"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md mt-1" required>
</div>
<div class="w-full">
<label class="text-gray-500">Business Logo:</label>
<div class="inbox-box border border-gray-300 w-full rounded-md px-3 mt-1">
<div class="flex items-center justify-between">
<input name="logo" required type="file" class="file-input" accept="image/*" hidden />
<span class="file-name text-gray-500 text-base focus:outline-none outline-none">Upload
Logo</span>
<label
class="file-label bg-transparent text-gray-500 border border-white h-14 cursor-pointer flex items-center">
<i class="fa fa-upload" style="font-size: 25px;"></i>
</label>
</div>
</div>
</div>
</div>
<!-- WHEN THE USER CHOOSE A FILE THE NAME OF THE FILE WILL APPEAR IN THE SPAN -->
<script>
const fileInput = document.getElementById('actual-btn');
const fileNameSpan = document.getElementById('file-name');
fileInput.addEventListener('change', (event) => {
const selectedFiles = event.target.files;
if (selectedFiles.length > 0) {
const fileNames = Array.from(selectedFiles).map(file => file.name).join(', ');
fileNameSpan.textContent = fileNames;
} else {
fileNameSpan.textContent = 'Upload Documents (PDF, docx)';
}
});
</script>
<input name="email" type="email" placeholder="Email"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md mt-4" required>
<div class="w-full">
<label class="text-gray-500">Email:</label>
<input name="email" type="email"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md mt-1" required>
</div>
<input name="financial_number" type="number" placeholder="Financial Number"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md mt-4" required>
<div class="w-full">
<label class="text-gray-500">Financial Number:</label>
<input name="financial_number" type="number"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md mt-1" required>
</div>
<div class="w-full flex justify-start items-center gap-2 mt-1">
<input name="vat" type="checkbox" id="vatCheckbox" onchange="updateVatValue(this.checked)">
<label class="text-slate-800">Vat</label>
</div>
<div class="w-full flex justify-start items-center gap-2 mt-4">
<input name="vat" type="checkbox" id="vatCheckbox" onchange="updateVatValue(this.checked)">
<label class="text-slate-800">Vat</label>
</div>
<script>
function updateVatValue(checked) {
const vatInput = document.querySelector('input[name="vat"]');
vatInput.value = checked ? "true" : "false";
}
</script>
<script>
function updateVatValue(checked) {
const vatInput = document.querySelector('input[name="vat"]');
vatInput.value = checked ? "true" : "false";
}
</script>
<div class="w-full">
<label class="text-gray-500">Commercial Registration:</label>
<input name="commercial_registration" type="commercial_registration"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md mt-1" required>
</div>
<input name="commercial_registration" type="commercial_registration" placeholder="Commercial registration"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md mt-4" required>
<input name="phone_number" type="number" placeholder="Mobile Number"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md mt-4" required>
<div class="w-full">
<label class="text-gray-500">Mobile Number:</label>
<input name="phone_number" type="number"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md mt-1" required>
</div>
<input name="website" type="text" placeholder="Website"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md mt-4">
<div class="w-full">
<label class="text-gray-500">Website:</label>
<input name="website" type="url"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md mt-1">
</div>
<select name="type" id="business_type"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500 mt-4">
<option value="" selected disabled>Business Type</option>
{% for business_type in business_types %}
<option value="{{ business_type.id }}">{{ business_type.name }}</option>
{% endfor %}
</select>
<div class="w-full">
<label class="text-gray-500">Business Type:</label>
<select name="type" id="business_type"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500 mt-1">
{% for business_type in business_types %}
<option value="{{ business_type.id }}">{{ business_type.name }}</option>
{% endfor %}
</select>
</div>
<div class="w-full flex justify-center items-center mt-3">
<button type="submit"
class="w-fit py-1 px-3 bg-blue-500 rounded-md outline-none text-white border border-blue-500 text-xl cursor-pointer hover:bg-white hover:text-blue-500">Add
Business</button>
<div class="w-full flex justify-center items-center mt-3">
<button type="submit"
class="w-fit py-1 px-3 bg-blue-500 rounded-md outline-none text-white border border-blue-500 text-xl cursor-pointer hover:bg-white hover:text-blue-500">Add
Business</button>
</div>
</div>
</form>
</div>
</div>
@ -100,7 +112,11 @@
</div>
</div>
<!-------------- JS SCRIPTS --------------->
<script type="text/javascript" src='{% static "js/upload-input-tag.js" %}'></script>
<script type="text/javascript" src='{% static "js/pop-modals.js" %}'></script>
</div>
{% endblock content %}

@ -9,46 +9,68 @@
</h1>
<form method="POST" action="{% url 'save_customer' %}">
{% csrf_token %}
<div class="w-full flex flex-col gap-3 justify-center items-center mt-5">
<div class="w-full flex flex-col gap-5 justify-center items-center mt-5">
<input name="first_name" type="text" placeholder="First Name"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md" required>
<div class="w-full">
<label class="text-gray-500">First Name:</label>
<input name="first_name" type="text"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md mt-1" required>
</div>
<input name="last_name" type="text" placeholder="Last Name"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md" required>
<div class="w-full">
<label class="text-gray-500">Last Name:</label>
<input name="last_name" type="text"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md mt-1" required>
</div>
<input name="email" type="email" placeholder="Email"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md" required>
<div class="w-full">
<label class="text-gray-500">Email:</label>
<input name="email" type="email"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md mt-1" required>
</div>
<input name="mobile_number" type="number" placeholder="Mobile Number"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md" required>
<div class="w-full">
<label class="text-gray-500">Mobile Number:</label>
<input name="mobile_number" type="number"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md mt-1" required>
</div>
<div class="w-full">
<label class="text-gray-500">Personal Website:</label>
<input name="personal_website" type="url"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md mt-1">
</div>
<input name="personal_website" type="url" placeholder="Personal Website"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md">
<select name="status"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500"
required>
<option value="" selected disabled>Status</option>
<option value="Active">Active</option>
<option value="Suspended">Suspended</option>
<option value="Terminated">Terminated</option>
</select>
<select name="referenceid"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500"
required>
<option value="" selected disabled>Reference</option>
{% for reference in references %}
<option value="{{reference.id}}">{{reference.name}}</option>
{% endfor %}
</select>
<select id="businessTypeSelect"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500">
<option value="" selected disabled>Type</option>
<option value="business">Business</option>
<option value="personal">Personal</option>
</select>
<div class="w-full">
<label class="text-gray-500">Status:</label>
<select name="status"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500 mt-1"
required>
<option value="Active">Active</option>
<option value="Suspended">Suspended</option>
<option value="Terminated">Terminated</option>
</select>
</div>
<div class="w-full">
<label class="text-gray-500">Reference:</label>
<select name="referenceid"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500 mt-1"
required>
{% for reference in references %}
<option value="{{reference.id}}">{{reference.name}}</option>
{% endfor %}
</select>
</div>
<div class="w-full">
<label class="text-gray-500">Type:</label>
<select id="businessTypeSelect"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500 mt-1">
<option value="personal">Personal</option>
<option value="business">Business</option>
</select>
</div>
<div class="w-[80%] mx-auto border border-gray-300 rounded-md py-5 px-3 bg-white hidden"
id="addBusinessContainer">
@ -64,10 +86,10 @@
</button>
</div>
<div class="w-full mt-2">
<div class="w-full">
<label class="text-gray-500">Business Name:</label>
<select name="business" id="businessSelect"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500">
<option value="" selected disabled>Business Name</option>
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500 mt-1">
{% for business in businesses %}
<option value="{{business.id}}">{{business.name}}</option>
{% endfor %}
@ -89,7 +111,6 @@
addBusinessContainer.style.display = 'none';
}
});
</script>
<input name="password1" type="password" placeholder="Password"
@ -112,83 +133,99 @@
<form method="POST" action="{% url 'save_business_modal' %}" id="addBusinessFormModal"
enctype="multipart/form-data">
{% csrf_token %}
<input name="name" type="text" placeholder="Name"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md mt-4" required>
<div class="inbox-box border border-gray-300 py-1 px-3 w-full rounded-md mt-4">
<div class="flex items-center justify-between">
<input name="logo" required type="file" id="actual-btn" accept="image/*" hidden />
<span id="file-name" class="text-gray-500 text-base focus:outline-none outline-none">Upload
Business
Logo</span>
<label for="actual-btn"
class="bg-transparent text-gray-500 border border-white px-4 py-2 h-14 cursor-pointer flex items-center"><i
class="fa fa-upload"></i></label>
<div class="w-full flex flex-col gap-5">
<div class="w-full">
<label class="text-gray-500">Name:</label>
<input name="name" type="text"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md mt-1"
required>
</div>
</div>
<!-- WHEN THE USER CHOOSE A FILE THE NAME OF THE FILE WILL APPEAR IN THE SPAN -->
<script>
const fileInput = document.getElementById('actual-btn');
const fileNameSpan = document.getElementById('file-name');
fileInput.addEventListener('change', (event) => {
const selectedFiles = event.target.files;
if (selectedFiles.length > 0) {
const fileNames = Array.from(selectedFiles).map(file => file.name).join(', ');
fileNameSpan.textContent = fileNames;
} else {
fileNameSpan.textContent = 'Upload Documents (PDF, docx)';
}
});
</script>
<input name="email" type="email" placeholder="Email"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md mt-4" required>
<div class="w-full">
<label class="text-gray-500">Business Logo:</label>
<div class="inbox-box border border-gray-300 w-full rounded-md px-3 mt-1">
<div class="flex items-center justify-between">
<input name="logo" required type="file" class="file-input" accept="image/*" hidden />
<span class="file-name text-gray-500 text-base focus:outline-none outline-none">Upload
Logo</span>
<label
class="file-label bg-transparent text-gray-500 border border-white h-14 cursor-pointer flex items-center">
<i class="fa fa-upload" style="font-size: 25px;"></i>
</label>
</div>
</div>
</div>
<input name="financial_number" type="number" placeholder="Financial Number"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md mt-4" required>
<div class="w-full flex justify-start items-center gap-2 mt-4">
<input name="vat" type="checkbox" id="vatCheckbox" onchange="updateVatValue(this.checked)">
<label class="text-slate-800">Vat</label>
</div>
<div class="w-full">
<label class="text-gray-500">Email:</label>
<input name="email" type="email"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md mt-1"
required>
</div>
<div class="w-full">
<label class="text-gray-500">Financial Number:</label>
<input name="financial_number" type="number"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md mt-1"
required>
</div>
<div class="w-full flex justify-start items-center gap-2 mt-1">
<input name="vat" type="checkbox" id="vatCheckbox" onchange="updateVatValue(this.checked)">
<label class="text-slate-800">Vat</label>
</div>
<script>
function updateVatValue(checked) {
const vatInput = document.querySelector('input[name="vat"]');
vatInput.value = checked ? "true" : "false";
}
</script>
<input name="commercial_registration" type="commercial_registration"
placeholder="Commercial registration"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md mt-4" required>
<script>
function updateVatValue(checked) {
const vatInput = document.querySelector('input[name="vat"]');
vatInput.value = checked ? "true" : "false";
}
</script>
<div class="w-full">
<label class="text-gray-500">Commercial Registration:</label>
<input name="commercial_registration" type="commercial_registration"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md mt-1"
required>
</div>
<input name="phone_number" type="number" placeholder="Mobile Number"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md mt-4" required>
<div class="w-full">
<label class="text-gray-500">Mobile Number:</label>
<input name="phone_number" type="number"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md mt-1"
required>
</div>
<input name="website" type="text" placeholder="Website"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md mt-4">
<div class="w-full">
<label class="text-gray-500">Website:</label>
<input name="website" type="url"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md mt-1">
</div>
<select name="type" id="business_type"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500 mt-4">
<option value="" selected disabled>Business Type</option>
{% for business_type in business_types %}
<option value="{{ business_type.id }}">{{ business_type.name }}</option>
{% endfor %}
</select>
<div class="w-full">
<label class="text-gray-500">Business Type:</label>
<select name="type" id="business_type"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500 mt-1">
{% for business_type in business_types %}
<option value="{{ business_type.id }}">{{ business_type.name }}</option>
{% endfor %}
</select>
</div>
<div class="w-full flex justify-center items-center mt-3">
<button type="submit"
class="w-fit py-1 px-3 bg-blue-500 rounded-md outline-none text-white border border-blue-500 text-xl cursor-pointer hover:bg-white hover:text-blue-500"
id="addBusinessFormButton">Add
Business</button>
<div class="w-full flex justify-center items-center mt-3">
<button type="submit"
class="w-fit py-1 px-3 bg-blue-500 rounded-md outline-none text-white border border-blue-500 text-xl cursor-pointer hover:bg-white hover:text-blue-500"
id="addBusinessFormButton">Add
Business</button>
</div>
</div>
</form>
</div>
@ -281,7 +318,11 @@
</div>
</div>
<!-------------- JS SCRIPTS --------------->
<script type="text/javascript" src='{% static "js/upload-input-tag.js" %}'></script>
<script type="text/javascript" src='{% static "js/pop-modals.js" %}'></script>
</div>
{% endblock content %}

@ -9,91 +9,66 @@
<h1 class="text-3xl text-slate-800 text-center font-semibold">
Add Staff
</h1>
<!-- <div class="w-[80px] h-[80px] rounded-full border border-gray-200" id="image-container">
<img src="{% static 'images/avatar.svg' %}" alt="" srcset="" id="" class="rounded-full w-full h-full">
</div> -->
</div>
<form method="POST" action="{% url 'save_staff' %}" enctype="multipart/form-data">
{% csrf_token %}
<div class="w-full flex flex-col gap-3 justify-center items-center mt-5">
<div class="w-[70px] s:w-[100px] h-[70px] s:h-[100px] rounded-full border border-gray-200" id="image-container">
<div class="w-full flex flex-col gap-5 justify-center items-center mt-5">
<div class="w-[70px] s:w-[100px] h-[70px] s:h-[100px] rounded-full border border-gray-200"
id="image-container">
<img src="{% static 'images/default-user.png' %}" alt="" srcset="" id=""
class="rounded-full w-full h-full">
</div>
<div class="inbox-box border border-gray-300 py-1 px-3 w-full rounded-md">
<div class="flex items-center justify-between">
<input name="image" type="file" id="actual-btn" accept="image/*" hidden />
<span id="file-name" class="text-gray-500 text-base focus:outline-none outline-none">Upload
Profile Picture</span>
<label for="actual-btn"
class="bg-transparent text-gray-500 border border-white px-4 py-2 h-14 cursor-pointer flex items-center"><i
class="fa fa-upload" style="font-size: 20px;"></i></label>
<div class="w-full">
<label class="text-gray-500">Profile Picture:</label>
<div class="inbox-box border border-gray-300 py-1 px-3 w-full rounded-md mt-1">
<div class="flex items-center justify-between">
<input name="image" type="file" id="actual-btn" accept="image/*" hidden />
<span id="file-name" class="text-gray-500 text-base focus:outline-none outline-none">Upload
Picture</span>
<label for="actual-btn"
class="bg-transparent text-gray-500 border border-white px-4 py-2 h-14 cursor-pointer flex items-center"><i
class="fa fa-upload" style="font-size: 20px;"></i></label>
</div>
</div>
</div>
<div class="w-full">
<label class="text-gray-500">First Name:</label>
<input name="first_name" type="text"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md mt-1" required>
</div>
<!-- WHEN THE USER CHOOSE A FILE THE NAME OF THE FILE WILL APPEAR IN THE SPAN AND THE UPLOADED IMAGE WILL APPEAR IN THE USER PROFILE IMAGE CONTAINER -->
<script>
const fileInput = document.getElementById('actual-btn');
const fileNameSpan = document.getElementById('file-name');
const imageContainer = document.getElementById('image-container');
fileInput.addEventListener('change', (event) => {
const selectedFiles = event.target.files;
if (selectedFiles.length > 0) {
const file = selectedFiles[0];
const fileReader = new FileReader();
fileReader.onload = function () {
const imgElement = document.createElement('img');
imgElement.src = fileReader.result;
imgElement.alt = 'Uploaded Image';
imgElement.classList.add('w-full', 'h-full', 'rounded-full', 'object-cover');
// Clear any previous images and append the new one
imageContainer.innerHTML = '';
imageContainer.appendChild(imgElement);
// Update the text in the file input
fileNameSpan.textContent = file.name;
};
// Read the selected file as a data URL
fileReader.readAsDataURL(file);
} else {
fileNameSpan.textContent = 'Upload Profile Picture';
imageContainer.innerHTML = ''; // Clear the container if no file is selected
}
});
</script>
<input name="first_name" type="text" placeholder="First Name"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md" required>
<input name="last_name" type="text" placeholder="Last Name"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md" required>
<div class="w-full">
<label class="text-gray-500">Last Name:</label>
<input name="last_name" type="text"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md mt-1" required>
</div>
<input name="email" type="email" placeholder="Email"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md" required>
<div class="w-full">
<label class="text-gray-500">Email:</label>
<input name="email" type="email"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md mt-1" required>
</div>
<input name="mobile_number" type="number" placeholder="Mobile Number"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md" required>
<div class="w-full">
<label class="text-gray-500">Mobile Number:</label>
<input name="mobile_number" type="number"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md mt-1" required>
</div>
<!-- <input name="position" type="text" placeholder="Position"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md" required> -->
<select name="staff_position" id=""
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500">
<option value="" selected disabled>Position</option>
{% for position in staffpositions %}
<option value="{{position.id}}">{{position.name}}</option>
{% endfor %}
</select>
<div class="w-full">
<label class="text-gray-500">Position:</label>
<select name="staff_position"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500 mt-1">
{% for position in staffpositions %}
<option value="{{position.id}}">{{position.name}}</option>
{% endfor %}
</select>
</div>
<div class="w-full flex justify-start items-center gap-2">
<input name="active" type="checkbox" id="activeCheckbox"
@ -119,12 +94,17 @@
}
</script>
<div class="w-full">
<label class="text-gray-500">Password:</label>
<input name="password1" type="password"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md mt-1" required>
</div>
<input name="password1" type="password" placeholder="Password"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md" required>
<input name="password2" type="password" placeholder="Password"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md" required>
<div class="w-full">
<label class="text-gray-500">Password Confirmation:</label>
<input name="password2" type="password"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md mt-1" required>
</div>
<div class="w-full flex justify-center items-center mt-3">
<button type="submit"
@ -149,7 +129,12 @@
</div>
</div>
<!-------------- JS SCRIPTS --------------->
<script type="text/javascript" src='{% static "js/upload-image-tag.js" %}'></script>
<script type="text/javascript" src='{% static "js/pop-modals.js" %}'></script>
</div>
{% endblock content %}

@ -7,26 +7,34 @@
<h1 class="text-3xl text-slate-800 text-center font-semibold">
Create Epic For {{project.name}}
</h1>
<form class="mx-auto w-full flex flex-col gap-3 justify-center items-center mt-5" method="POST" action="{% url 'save_epic' %}">
<form class="mx-auto w-full flex flex-col gap-5 justify-center items-center mt-5" method="POST"
action="{% url 'save_epic' %}">
{% csrf_token %}
<input required name="title" type="text" placeholder="Epic Name"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md">
<div class="w-full">
<label class="text-gray-500">Epic Name:</label>
<input required name="title" type="text"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md mt-1">
</div>
<select required name="project" id="project" class="hidden w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500">
<option value="{{ project.id }}" selected>{{ project.name }}</option>
<select required name="project" id="project"
class="hidden w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500">
<option value="{{ project.id }}" selected>{{ project.name }}</option>
</select>
<textarea required name="description" type="text" placeholder="Epic Description" rows="5" cols="5"
class="w-full py-3 px-3 border border-gray-300 outline-none rounded-md resize-none"></textarea>
<div class="w-full">
<label class="text-gray-500">Epic Description:</label>
<textarea required name="description" type="text" placeholder="Description..." rows="5" cols="5"
class="w-full py-3 px-3 border border-gray-300 outline-none rounded-md resize-none mt-1"></textarea>
</div>
<select required name="status" id=""
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500">
<option value="" selected disabled>Select Status</option>
<option value="Open">Open</option>
<option value="Closed">Closed</option>
</select>
<div class="w-full">
<label class="text-gray-500">Status:</label>
<select required name="status" id=""
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500 mt-1">
<option value="Open">Open</option>
<option value="Closed">Closed</option>
</select>
</div>
<div class="w-full">
<label class="text-gray-500">Start Date:</label>

@ -8,104 +8,104 @@
Create Project
</h1>
<form class="w-full flex flex-col gap-3 justify-center items-center mt-5" method="POST"
<form class="w-full flex flex-col gap-5 justify-center items-center mt-5" method="POST"
action="{% url 'save_project' %}">
{% csrf_token %}
<input required name="name" type="text" placeholder="Project Name"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md">
<select required name="customer" id=""
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500">
<option value="" selected disabled>Clients</option>
{% for customer in customers %}
<option value="{{customer.user.username}}">{{customer.user.first_name}} {{customer.user.last_name}}</option>
{% endfor %}
</select>
<select required name="manager" id=""
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500">
<option value="" selected disabled>Project Manager</option>
{% for staff in staffs %}
<option value="{{staff.user.username}}">{{staff.user.first_name}} {{staff.user.last_name}}</option>
{% endfor %}
</select>
<select required name="members" id=""
class="w-full h-[100px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500"
multiple>
<option value="" selected disabled>Member(s)</option>
{% for staff in staffs %}
<option value="{{staff.user.username}}">{{staff.user.first_name}} {{staff.user.last_name}}</option>
{% endfor %}
</select>
<select required name="status" id=""
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500">
<option value="" selected disabled>Status</option>
<option value="Pending">Pending</option>
<option value="Active">Active</option>
<option value="Completed">Completed</option>
<option value="Cancelled">Cancelled</option>
</select>
<select required name="project_type" id=""
class="w-full h-[100px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500"
multiple>
<option value="" selected disabled>Project Type</option>
{%for type in project_types %}
<option value="{{type.id}}">{{type.name}}</option>
{% endfor %}
</select>
<textarea required name="details" type="text" placeholder="Project Details" rows="5" cols="5"
class="w-full py-3 px-3 border border-gray-300 outline-none rounded-md resize-none"></textarea>
<div class="w-full p-3 border border-gray-300 mt-4 rounded-md">
<div class="w-full mt-2" id="addReqContainer">
<input name="requirements" type="text" placeholder="Requirement"
class="w-full p-3 border border-gray-300 rounded-md bg-transparent outline-none">
</div>
<!-- THE CLONED CONTAINER -->
<div class="mt-2 hidden" id="addReqContainerTemplate">
<div class="w-full flex flex-col gap-2">
<input name="requirements" type="text" placeholder="Requirement"
class="w-full p-3 border border-gray-300 rounded-md bg-transparent outline-none">
<button
class="w-full h-[40px] s:h-[55px] rounded-md bg-gray-300 border-none outline-none shadow-md text-white text-xl cursor-pointer py-2"
id="removeReqButton" type="button">
<i class="fa fa-minus"></i>
</button>
</div>
</div>
<div class="w-full">
<label class="text-gray-500">Project Name:</label>
<input required name="name" type="text"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md mt-1">
</div>
<div class="w-full">
<label class="text-gray-500">Clients:</label>
<select required name="customer"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500 mt-1">
{% for customer in customers %}
<option value="{{customer.user.username}}">{{customer.user.first_name}} {{customer.user.last_name}}
</option>
{% endfor %}
</select>
</div>
<div class="w-full">
<label class="text-gray-500">Project Manager:</label>
<select required name="manager" id=""
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500 mt-1">
{% for staff in staffs %}
<option value="{{staff.user.username}}">{{staff.user.first_name}} {{staff.user.last_name}}</option>
{% endfor %}
</select>
</div>
<div class="w-full">
<label class="text-gray-500">Member(s):</label>
<select required name="members" id=""
class="w-full h-[100px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500 mt-1"
multiple>
{% for staff in staffs %}
<option value="{{staff.user.username}}">{{staff.user.first_name}} {{staff.user.last_name}}</option>
{% endfor %}
</select>
</div>
<button
class="w-full h-[40px] s:h-[55px] rounded-md bg-gray-400 border-none outline-none shadow-md text-white text-xl cursor-pointer py-2 mt-2"
id="addReqButton" type="button">
<i class="fa fa-plus"></i>
</button>
<div class="w-full">
<label class="text-gray-500">Status:</label>
<select required name="status" id=""
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500 mt-1">
<option value="Pending">Pending</option>
<option value="Active">Active</option>
<option value="Completed">Completed</option>
<option value="Cancelled">Cancelled</option>
</select>
</div>
<script>
const addReqButton = document.getElementById("addReqButton");
const addReqContainerTemplate = document.getElementById("addReqContainerTemplate");
const addReqContainer = document.getElementById("addReqContainer");
<div class="w-full">
<label class="text-gray-500">Project Type:</label>
<select required name="project_type"
class="w-full h-[100px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500 mt-1"
multiple>
{%for type in project_types %}
<option value="{{type.id}}">{{type.name}}</option>
{% endfor %}
</select>
</div>
addReqButton.addEventListener("click", function () {
// Clone the template and remove the "hidden" class
const newContainer = addReqContainerTemplate.cloneNode(true);
newContainer.classList.remove("hidden");
<div class="w-full">
<label class="text-gray-500">Project Details:</label>
<textarea required name="details" type="text" rows="5" cols="5"
class="w-full py-3 px-3 border border-gray-300 outline-none rounded-md resize-none mt-1"></textarea>
</div>
// Add an event listener to the new container's remove button
const removeReqButton = newContainer.querySelector("#removeReqButton");
removeReqButton.addEventListener("click", function () {
// Remove the clicked container when the remove button is clicked
newContainer.remove();
});
<div class="w-full">
<label class="text-gray-500">Requirement(s):</label>
<div class="w-full p-3 border border-gray-300 mt-1 rounded-md">
<div class="w-full mt-2" id="addReqContainer">
<input name="requirements" type="text" placeholder="Requirement"
class="w-full p-3 border border-gray-300 rounded-md bg-transparent outline-none">
</div>
addReqContainer.appendChild(newContainer);
});
</script>
<!-- THE CLONED CONTAINER -->
<div class="mt-2 hidden" id="addReqContainerTemplate">
<div class="w-full flex flex-col gap-2">
<input name="requirements" type="text" placeholder="Requirement"
class="w-full p-3 border border-gray-300 rounded-md bg-transparent outline-none">
<button
class="w-full h-[40px] s:h-[55px] rounded-md bg-gray-300 border-none outline-none shadow-md text-white text-xl cursor-pointer py-2"
id="removeReqButton" type="button">
<i class="fa fa-minus"></i>
</button>
</div>
</div>
<button
class="w-full h-[40px] s:h-[55px] rounded-md bg-gray-400 border-none outline-none shadow-md text-white text-xl cursor-pointer py-2 mt-2"
id="addReqButton" type="button">
<i class="fa fa-plus"></i>
</button>
</div>
</div>
<div class="w-full">
<label class="text-gray-500">Start Date:</label>
@ -140,6 +140,9 @@
</div>
</div>
<!-------------- JS SCRIPTS --------------->
<script type="text/javascript" src='{% static "js/add-project.js" %}'></script>
<script type="text/javascript" src='{% static "js/pop-modals.js" %}'></script>
</div>

@ -10,43 +10,57 @@
Create Task
</h1>
<div class="w-full flex flex-col gap-3 justify-center items-center mt-5">
<input type="text" placeholder="Task Name"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md">
<select id=""
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500">
<option value="" selected disabled>Select Project</option>
<option value="">Cars & Classics</option>
<option value="">Osina</option>
</select>
<select id=""
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500">
<option value="" selected disabled>Select Epic</option>
<option value="">Epic 1</option>
<option value="">Epic 2</option>
<option value="">Epic 3</option>
</select>
<select id=""
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500">
<option value="" selected disabled>Status</option>
<option value="">Open</option>
<option value="">Working On</option>
<option value="">Closed</option>
</select>
<select required id=""
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500">
<option value="" selected disabled>Assigned To</option>
<option value="Pending">Nataly</option>
<option value="Active">Salim</option>
</select>
<textarea type="text" placeholder="Task Description" rows="5" cols="5"
class="w-full py-3 px-3 border border-gray-300 outline-none rounded-md resize-none"></textarea>
<div class="w-full flex flex-col gap-5 justify-center items-center mt-5">
<div class="w-full">
<label class="text-gray-500">Task Name:</label>
<input type="text"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md mt-1">
</div>
<div class="w-full">
<label class="text-gray-500">Project:</label>
<select
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500 mt-1">
<option value="">Cars & Classics</option>
<option value="">Osina</option>
</select>
</div>
<div class="w-full">
<label class="text-gray-500">Epic:</label>
<select
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500 mt-1">
<option value="" selected disabled>Select Epic</option>
<option value="">Epic 1</option>
<option value="">Epic 2</option>
<option value="">Epic 3</option>
</select>
</div>
<div class="w-full">
<label class="text-gray-500">Status:</label>
<select
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500 mt-1">
<option value="">Open</option>
<option value="">Working On</option>
<option value="">Closed</option>
</select>
</div>
<div class="w-full">
<label class="text-gray-500">Assigned To:</label>
<select required
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500">
<option value="Pending">Nataly</option>
<option value="Active">Salim</option>
</select>
</div>
<div class="w-full">
<label class="text-gray-500">Description:</label>
<textarea type="text" placeholder="Description.." rows="5" cols="5"
class="w-full py-3 px-3 border border-gray-300 outline-none rounded-md resize-none"></textarea>
</div>
<div class="w-full">
<label class="text-gray-500">Extra:</label>
@ -69,34 +83,21 @@
class="w-full p-3 border border-gray-300 rounded-md bg-transparent outline-none mt-1">
</div>
<div class="inbox-box border border-gray-300 py-1 px-3 w-full rounded-md">
<div class="flex items-center justify-between">
<input required name="cv" type="file" id="actual-btn" accept=".pdf,.docx" hidden multiple />
<span id="file-name" class="text-gray-500 text-base focus:outline-none outline-none">Upload
Document(s)</span>
<label for="actual-btn"
class="bg-transparent text-gray-500 border border-white px-4 py-2 h-14 cursor-pointer flex items-center"><i
class="fa fa-upload"></i></label>
<div class="w-full">
<label class="text-gray-500">Documents:</label>
<div class="inbox-box border border-gray-300 w-full rounded-md px-3 mt-1">
<div class="flex items-center justify-between">
<input name="" required type="file" class="file-input" accept=".pdf,.docx" hidden multiple />
<span class="file-name text-gray-500 text-base focus:outline-none outline-none">Upload
Document(s)</span>
<label
class="file-label bg-transparent text-gray-500 border border-white h-14 cursor-pointer flex items-center">
<i class="fa fa-upload" style="font-size: 25px;"></i>
</label>
</div>
</div>
</div>
<!-- WHEN THE USER CHOOSE A FILE THE NAME OF THE FILE WILL APPEAR IN THE SPAN -->
<script>
const fileInput = document.getElementById('actual-btn');
const fileNameSpan = document.getElementById('file-name');
fileInput.addEventListener('change', (event) => {
const selectedFiles = event.target.files;
if (selectedFiles.length > 0) {
const fileNames = Array.from(selectedFiles).map(file => file.name).join(', ');
fileNameSpan.textContent = fileNames;
} else {
fileNameSpan.textContent = 'Upload Documents (PDF, docx)';
}
});
</script>
<div class="w-full flex justify-center items-center mt-3">
<button
class="w-fit py-1 px-3 bg-blue-500 rounded-md outline-none text-white border border-blue-500 text-xl cursor-pointer hover:bg-white hover:text-blue-500">Add
@ -119,7 +120,11 @@
</div>
</div>
<!-------------- JS SCRIPTS --------------->
<script type="text/javascript" src='{% static "js/upload-input-tag.js" %}'></script>
<script type="text/javascript" src='{% static "js/pop-modals.js" %}'></script>
</div>
{% endblock content %}

@ -0,0 +1,135 @@
{% extends "main.html" %}
{%load static%}
{% block content %}
<!-- THIS TASK BELONGS TO A USER STORY ADDED FROM PROJECT DETAILS PAGE -->
<div class="w-full px-5 s:px-9 mb-4">
<div class="w-full h-full shadow-md rounded-md mt-5 py-5 px-3 bg-white">
<h1 class="text-3xl text-slate-800 text-center font-semibold">
Create Task
</h1>
<div class="w-full flex flex-col gap-5 justify-center items-center mt-5">
<div class="w-full">
<label class="text-gray-500 text-base">Name:</label>
<input type="text" placeholder="Name"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md mt-1">
</div>
<div class="w-full">
<label class="text-gray-500 text-base">User Story:</label>
<select id=""
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500 mt-1">
<option value="" selected>Predifined</option>
</select>
</div>
<div class="w-full">
<label class="text-gray-500 text-base">Epic:</label>
<select id=""
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500 mt-1">
<option value="" selected>Select Epic</option>
<option value="">Epic 1</option>
</select>
</div>
<div class="w-full">
<label class="text-gray-500 text-base">Project:</label>
<select id=""
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500 mt-1">
<option value="" selected>Predifined</option>
</select>
</div>
<div class="w-full">
<label class="text-gray-500 text-base">Status:</label>
<select id=""
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500 mt-1">
<option value="">Open</option>
<option value="">Working On</option>
<option value="">Closed</option>
</select>
</div>
<div class="w-full">
<label class="text-gray-500 text-base">Assigned To:</label>
<select required id=""
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500 mt-1">
<option value="">Nataly</option>
<option value="">Salim</option>
</select>
</div>
<div class="w-full">
<label class="text-gray-500 text-base">Task Description:</label>
<textarea type="text" placeholder="Description..." rows="5" cols="5"
class="w-full py-3 px-3 border border-gray-300 outline-none rounded-md resize-none mt-1"></textarea>
</div>
<div class="w-full">
<label class="text-gray-500">Extra:</label>
<select id=""
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500 mt-1">
<option value="" selected>No</option>
<option value="">Yes</option>
</select>
</div>
<div class="w-full">
<label class="text-gray-500">Start Date:</label>
<input type="date" id="date" name="date"
class="w-full p-3 border border-gray-300 rounded-md bg-transparent outline-none mt-1">
</div>
<div class="w-full">
<label class="text-gray-500">End Date:</label>
<input type="date" id="date" name="date"
class="w-full p-3 border border-gray-300 rounded-md bg-transparent outline-none mt-1">
</div>
<div class="w-full">
<label class="text-gray-500">Documents:</label>
<div class="inbox-box border border-gray-300 w-full rounded-md px-3 mt-1">
<div class="flex items-center justify-between">
<input name="" required type="file" class="file-input" accept=".pdf,.docx" hidden multiple />
<span class="file-name text-gray-500 text-base focus:outline-none outline-none">Upload
Document(s)</span>
<label
class="file-label bg-transparent text-gray-500 border border-white h-14 cursor-pointer flex items-center">
<i class="fa fa-upload" style="font-size: 25px;"></i>
</label>
</div>
</div>
</div>
</div>
<div class="w-full flex justify-center items-center mt-3">
<button
class="w-fit py-1 px-3 bg-blue-500 rounded-md outline-none text-white border border-blue-500 text-xl cursor-pointer hover:bg-white hover:text-blue-500">Add
Task</button>
</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>
<!-------------- JS SCRIPTS --------------->
<script type="text/javascript" src='{% static "js/upload-input-tag.js" %}'></script>
<script type="text/javascript" src='{% static "js/pop-modals.js" %}'></script>
</div>
{% endblock content %}

@ -10,39 +10,56 @@
Create Task
</h1>
<div class="w-full flex flex-col gap-3 justify-center items-center mt-5">
<input type="text" placeholder="Task Name"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md">
<select id=""
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500 cursor-not-allowed"
disabled>
<option value="">Test 1</option>
</select>
<select id=""
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500 cursor-not-allowed"
disabled>
<option value="">Epic</option>
</select>
<select id=""
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500">
<option value="" selected disabled>Status</option>
<option value="">Open</option>
<option value="">Working On</option>
<option value="">Closed</option>
</select>
<select required id=""
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500">
<option value="" selected disabled>Assigned To</option>
<option value="Pending">Nataly</option>
<option value="Active">Salim</option>
</select>
<textarea type="text" placeholder="Task Description" rows="5" cols="5"
class="w-full py-3 px-3 border border-gray-300 outline-none rounded-md resize-none"></textarea>
<div class="w-full flex flex-col gap-5 justify-center items-center mt-5">
<div class="w-full">
<label class="text-gray-500">Task Name:</label>
<input type="text"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md mt-1">
</div>
<div class="w-full">
<label class="text-gray-500">Project Name:</label>
<select id=""
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500 cursor-not-allowed mt-1"
disabled>
<option value="">Test 1</option>
</select>
</div>
<div class="w-full">
<label class="text-gray-500">Epic:</label>
<select id=""
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500 cursor-not-allowed mt-1"
disabled>
<option value="">Epic</option>
</select>
</div>
<div class="w-full">
<label class="text-gray-500">Status:</label>
<select id=""
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500 mt-1">
<option value="">Open</option>
<option value="">Working On</option>
<option value="">Closed</option>
</select>
</div>
<div class="w-full">
<label class="text-gray-500">Assigned To:</label>
<select required
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500 mt-1">
<option value="Pending">Nataly</option>
<option value="Active">Salim</option>
</select>
</div>
<div class="w-full">
<label class="text-gray-500">Task Description:</label>
<textarea type="text" placeholder="Description..." rows="5" cols="5"
class="w-full py-3 px-3 border border-gray-300 outline-none rounded-md resize-none mt-1"></textarea>
</div>
<div class="w-full">
<label class="text-gray-500">Extra:</label>
@ -65,34 +82,21 @@
class="w-full p-3 border border-gray-300 rounded-md bg-transparent outline-none mt-1">
</div>
<div class="inbox-box border border-gray-300 py-1 px-3 w-full rounded-md">
<div class="flex items-center justify-between">
<input required name="cv" type="file" id="actual-btn" accept=".pdf,.docx" hidden multiple />
<span id="file-name" class="text-gray-500 text-base focus:outline-none outline-none">Upload
Document(s)</span>
<label for="actual-btn"
class="bg-transparent text-gray-500 border border-white px-4 py-2 h-14 cursor-pointer flex items-center"><i
class="fa fa-upload"></i></label>
<div class="w-full">
<label class="text-gray-500">Documents:</label>
<div class="inbox-box border border-gray-300 w-full rounded-md px-3 mt-1">
<div class="flex items-center justify-between">
<input name="" required type="file" class="file-input" accept=".pdf,.docx" hidden multiple />
<span class="file-name text-gray-500 text-base focus:outline-none outline-none">Upload
Document(s)</span>
<label
class="file-label bg-transparent text-gray-500 border border-white h-14 cursor-pointer flex items-center">
<i class="fa fa-upload" style="font-size: 25px;"></i>
</label>
</div>
</div>
</div>
<!-- WHEN THE USER CHOOSE A FILE THE NAME OF THE FILE WILL APPEAR IN THE SPAN -->
<script>
const fileInput = document.getElementById('actual-btn');
const fileNameSpan = document.getElementById('file-name');
fileInput.addEventListener('change', (event) => {
const selectedFiles = event.target.files;
if (selectedFiles.length > 0) {
const fileNames = Array.from(selectedFiles).map(file => file.name).join(', ');
fileNameSpan.textContent = fileNames;
} else {
fileNameSpan.textContent = 'Upload Documents (PDF, docx)';
}
});
</script>
<div class="w-full flex justify-center items-center mt-3">
<button
class="w-fit py-1 px-3 bg-blue-500 rounded-md outline-none text-white border border-blue-500 text-xl cursor-pointer hover:bg-white hover:text-blue-500">Add
@ -102,6 +106,8 @@
</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">
@ -113,7 +119,11 @@
</div>
</div>
<!-------------- JS SCRIPTS --------------->
<script type="text/javascript" src='{% static "js/upload-input-tag.js" %}'></script>
<script type="text/javascript" src='{% static "js/pop-modals.js" %}'></script>
</div>
{% endblock content %}

@ -10,45 +10,55 @@
Create Task For {{project.name}}
</h1>
<form class="w-full flex flex-col gap-3 justify-center items-center mt-5" method="POST"
<form class="w-full flex flex-col gap-5 justify-center items-center mt-5" method="POST"
action="{% url 'save_task' %}">
{% csrf_token %}
<input required name="name" type="text" placeholder="Task Name"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md">
<div class="w-full">
<label class="text-gray-500">Task Name:</label>
<input required name="name" type="text"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md mt-1">
</div>
<select required name="project" id=""
class="hidden w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500">
<option value="{{project.id}}">{{project.name}}</option>
</select>
<select required name="epic" id=""
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500">
<option value="" selected disabled>Select Epic</option>
{% for epic in epics_of_my_project %}
<option value="{{epic.id}}">{{epic.title}}</option>
{% endfor %}
</select>
<div class="w-full">
<label class="text-gray-500">Epic:</label>
<select required name="epic"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500 mt-1">
{% for epic in epics_of_my_project %}
<option value="{{epic.id}}">{{epic.title}}</option>
{% endfor %}
</select>
</div>
<select required name="status" id=""
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500">
<option value="" selected disabled>Status</option>
<option value="Open">Open</option>
<option value="Working On">Working On</option>
<option value="Closed">Closed</option>
</select>
<div class="w-full">
<label class="text-gray-500">Status:</label>
<select required name="status"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500 mt-1">
<option value="Open">Open</option>
<option value="Working On">Working On</option>
<option value="Closed">Closed</option>
</select>
</div>
<select name="assigned_to" required id=""
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500">
<option value="" selected disabled>Assigned To</option>
{% for staff in staffs %}
<option value="{{staff.id}}">{{staff.user.first_name}} {{staff.user.last_name}}</option>
{% endfor %}
</select>
<div class="w-full">
<label class="text-gray-500">Assigned To:</label>
<select name="assigned_to" required
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500 mt-1">
{% for staff in staffs %}
<option value="{{staff.id}}">{{staff.user.first_name}} {{staff.user.last_name}}</option>
{% endfor %}
</select>
</div>
<textarea required name="description" type="text" placeholder="Task Description" rows="5" cols="5"
class="w-full py-3 px-3 border border-gray-300 outline-none rounded-md resize-none"></textarea>
<div class="w-full">
<label class="text-gray-500">Task Description:</label>
<textarea required name="description" type="text" placeholder="Description..." rows="5" cols="5"
class="w-full py-3 px-3 border border-gray-300 outline-none rounded-md resize-none mt-1"></textarea>
</div>
<div class="w-full">
<label class="text-gray-500">Extra:</label>
@ -71,34 +81,21 @@
class="w-full p-3 border border-gray-300 rounded-md bg-transparent outline-none mt-1">
</div>
<div class="inbox-box border border-gray-300 py-1 px-3 w-full rounded-md">
<div class="flex items-center justify-between">
<input name="cv" type="file" id="actual-btn" accept=".pdf,.docx" hidden multiple />
<span id="file-name" class="text-gray-500 text-base focus:outline-none outline-none">Upload
Document(s)</span>
<label for="actual-btn"
class="bg-transparent text-gray-500 border border-white py-2 h-14 cursor-pointer flex items-center"><i
class="fa fa-upload"></i></label>
<div class="w-full">
<label class="text-gray-500">Documents:</label>
<div class="inbox-box border border-gray-300 w-full rounded-md px-3 mt-1">
<div class="flex items-center justify-between">
<input name="" type="file" class="file-input" accept=".pdf,.docx" hidden multiple />
<span class="file-name text-gray-500 text-base focus:outline-none outline-none">Upload
Document(s)</span>
<label
class="file-label bg-transparent text-gray-500 border border-white h-14 cursor-pointer flex items-center">
<i class="fa fa-upload" style="font-size: 25px;"></i>
</label>
</div>
</div>
</div>
<!-- WHEN THE USER CHOOSE A FILE THE NAME OF THE FILE WILL APPEAR IN THE SPAN -->
<script>
const fileInput = document.getElementById('actual-btn');
const fileNameSpan = document.getElementById('file-name');
fileInput.addEventListener('change', (event) => {
const selectedFiles = event.target.files;
if (selectedFiles.length > 0) {
const fileNames = Array.from(selectedFiles).map(file => file.name).join(', ');
fileNameSpan.textContent = fileNames;
} else {
fileNameSpan.textContent = 'Upload Documents (PDF, docx)';
}
});
</script>
<div class="w-full flex justify-center items-center mt-3">
<button type="submit"
class="w-fit py-1 px-3 bg-blue-500 rounded-md outline-none text-white border border-blue-500 text-xl cursor-pointer hover:bg-white hover:text-blue-500">Add
@ -119,7 +116,11 @@
</div>
</div>
<!-------------- JS SCRIPTS --------------->
<script type="text/javascript" src='{% static "js/upload-input-tag.js" %}'></script>
<script type="text/javascript" src='{% static "js/pop-modals.js" %}'></script>
</div>
{% endblock content %}

@ -181,7 +181,7 @@
<!-- RIGHT SIDE / USERS ACTIVITY -->
{% if latest_statuses_time_ago %}
<div class="hidden xxlg1:block w-[25%] bg-white h-[630px] overflow-y-auto overflow-hidden rounded-md shadow-md p-5">
<div class="hidden xxlg1:block w-[25%] 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">

@ -276,7 +276,7 @@
<!-- RIGHT SIDE / USERS ACTIVITY -->
{% if latest_statuses_time_ago %}
<div class="hidden xxlg1:block w-[25%] bg-white h-[630px] overflow-y-auto overflow-hidden rounded-md shadow-md p-5">
<div class="hidden xxlg1:block w-[25%] 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">

@ -303,10 +303,12 @@
<td class="px-6 py-4 text-center text-sm">
<div class="w-full flex justify-center items-center gap-3">
<button
<a href="{% url 'createuserstorytask' %}">
<button
class="w-fit py-2 px-3 bg-green-700 border border-green-700 text-white rounded-md cursor-pointer hover:bg-white hover:text-green-700">Add
Task</button>
</a>
<a href="">
<div class="text-[15px] text-blue-500 cursor-pointer">
<i class="fa fa-edit"></i>
@ -616,7 +618,7 @@
<!-- RIGHT SIDE / USERS ACTIVITY -->
{% if latest_statuses_time_ago %}
<div class="hidden xxlg1:block w-[25%] bg-white h-[630px] overflow-y-auto overflow-hidden rounded-md shadow-md p-5">
<div class="hidden xxlg1:block w-[25%] 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">

@ -166,7 +166,7 @@
<!-- RIGHT SIDE / USERS ACTIVITY -->
{% if latest_statuses_time_ago %}
<div class="hidden xxlg1:block w-[25%] bg-white h-[630px] overflow-y-auto overflow-hidden rounded-md shadow-md p-5">
<div class="hidden xxlg1:block w-[25%] 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">

@ -104,17 +104,17 @@
<!-- LEFT SIDE / TASK DETAIL SECTION -->
<div class="w-full xxlg1:w-[75%] bg-white h-fit rounded-md shadow-md p-5">
{% if task.status == 'Open' %}
<div class="w-full bg-green-700 rounded-t-md flex flex-col justify-center items-center py-3">
<div class="w-full bg-red-500 rounded-t-md flex flex-col justify-center items-center py-3">
<h1 class="text-3xl text-white font-semibold">{{task.name}}</h1>
</div>
{% endif %}
{% if task.status == 'Working On' %}
<div class="w-full bg-yellow-400 rounded-t-md flex flex-col justify-center items-center py-3">
<div class="w-full bg-orange-500 rounded-t-md flex flex-col justify-center items-center py-3">
<h1 class="text-3xl text-white font-semibold">{{task.name}}</h1>
</div>
{% endif %}
{% if task.status == 'Closed' %}
<div class="w-full bg-red-500 rounded-t-md flex flex-col justify-center items-center py-3">
<div class="w-full bg-green-700 rounded-t-md flex flex-col justify-center items-center py-3">
<h1 class="text-3xl text-white font-semibold">{{task.name}}</h1>
</div>
{% endif %}
@ -385,7 +385,7 @@
<!-- RIGHT SIDE / USERS ACTIVITY -->
{% if latest_statuses_time_ago %}
<div class="hidden xxlg1:block w-[25%] bg-white h-[630px] overflow-y-auto overflow-hidden rounded-md shadow-md p-5">
<div class="hidden xxlg1:block w-[25%] 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">

@ -11,11 +11,14 @@
<form id="hiddenContent" method="POST" action="{% url 'editbusinesstype' businesstype.id %}">
{% csrf_token %}
<div class="w-full flex justify-center items-center">
<input name="name" type="text" placeholder="Business Type Name"
value="{{businesstype.name}}"
class="w-full p-3 border border-gray-300 rounded-md bg-transparent outline-none mt-4"
required>
<div class="w-full flex flex-col justify-center items-center mt-2">
<div class="w-full">
<label class="text-gray-500">Business Type:</label>
<input name="name" type="text"
value="{{businesstype.name}}"
class="w-full p-3 border border-gray-300 rounded-md bg-transparent outline-none mt-1"
required>
</div>
</div>
<div class="w-full flex justify-center items-center mt-4">

@ -11,161 +11,127 @@
<form method="POST" action="{% url 'editbusiness' business.business_id %}" enctype="multipart/form-data">
{% csrf_token %}
<div class="w-full flex flex-col gap-3 justify-center items-center mt-5">
<div class="w-[70px] s:w-[100px] h-[70px] s:h-[100px] rounded-full border border-gray-200 mt-2" id="image-container">
{% if business.logo %}
<div class="w-full flex flex-col gap-5 justify-center items-center mt-5">
<div class="w-[70px] s:w-[100px] h-[70px] s:h-[100px] rounded-full border border-gray-200 mt-2"
id="image-container">
{% if business.logo %}
<img src="{{business.logo.url}}" alt="" srcset="" id="" class="rounded-full w-full h-full">
{% else %}
<img src="{% static 'images/default-user.png' %}" alt="" srcset="" id="" class="rounded-full w-full h-full">
{% endif %}
</div>
</div>
<div class="inbox-box border border-gray-300 py-1 px-3 w-full rounded-md mt-2">
<div class="flex items-center justify-between">
<input name="logo" type="file" id="actual-btn" accept="image/*" hidden />
<span id="file-name" class="text-gray-500 text-base focus:outline-none outline-none">Upload
New Logo</span>
<label for="actual-btn"
class="bg-transparent text-gray-500 border border-white px-4 py-2 h-14 cursor-pointer flex items-center"><i
class="fa fa-upload" style="font-size: 20px;"></i></label>
</div>
</div>
<div class="w-full flex flex-col gap-3 justify-center items-center mt-5">
<div class="w-full mt-4">
<label class="text-gray-500 text-xl">Name:</label>
<input name="name" type="text" placeholder="Name"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md mt-2"
value="{{business.name}}"
required>
</div>
<img src="{% static 'images/default-user.png' %}" alt="" srcset="" id=""
class="rounded-full w-full h-full">
{% endif %}
</div>
<div class="w-full flex flex-col gap-3">
<div>
<label class="text-gray-500">Current Logo:
<a href="{{business.logo.url}}" class="text-gray-400 cursor-pointer hover:text-slate-800"
style="word-wrap: break-word;" target="_blank">{{business.logo.url}}</a>
</label>
</div>
<div class="inbox-box border border-gray-300 py-1 px-3 w-full rounded-md">
<div class="flex items-center justify-between">
<input name="logo" type="file" id="actual-btn" accept="image/*" hidden />
<span id="file-name" class="text-gray-500 text-base focus:outline-none outline-none">Upload
New Logo</span>
<label for="actual-btn"
class="bg-transparent text-gray-500 border border-white px-4 py-2 h-14 cursor-pointer flex items-center"><i
class="fa fa-upload" style="font-size: 20px;"></i></label>
</div>
</div>
</div>
<div class="w-full">
<label class="text-gray-500 text-xl">Name:</label>
<input name="name" type="text"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md mt-1"
value="{{business.name}}" required>
</div>
<div class="w-full">
<label class="text-gray-500">Email:</label>
<input name="email" type="email"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md mt-1"
value="{{business.email}}" required>
</div>
<div class="w-full">
<label class="text-gray-500 text-xl">Financial Number:</label>
<input name="financial_number" type="number"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md mt-1"
value="{{business.financial_number}}" required>
</div>
<div class="w-full">
<label class="text-gray-500">Commercial Registration:</label>
<input name="commercial_registration" type="commercial_registration"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md mt-1"
value="{{business.commercial_registration}}" required>
</div>
<div class="w-full">
<label class="text-gray-500">Phone Number:</label>
<input name="phone_number" type="number"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md mt-1"
value="{{business.phone_number}}" required>
</div>
<div class="w-full">
<label class="text-gray-500">Website:</label>
<input name="website" type="text" value="{{business.website}}"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md mt-1">
</div>
<div class="w-full">
<label class="text-gray-500">Type</label>
<select name="business_type" id="business_type_select"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500 mt-1">
{% if not business.type %}
<option value="" selected>Select Business Type</option>
{% endif %}
{% for type in business_types %}
<option value="{{ type.id }}"
{% if current_business_type and current_business_type.id == type.id %}selected{% endif %}>
{{ type.name }}
</option>
{% endfor %}
</select>
</div>
<!-- WHEN THE USER CHOOSE A FILE THE NAME OF THE FILE WILL APPEAR IN THE SPAN AND THE UPLOADED IMAGE WILL APPEAR IN THE USER PROFILE IMAGE CONTAINER -->
<script>
const fileInput = document.getElementById('actual-btn');
const fileNameSpan = document.getElementById('file-name');
const imageContainer = document.getElementById('image-container');
fileInput.addEventListener('change', (event) => {
const selectedFiles = event.target.files;
if (selectedFiles.length > 0) {
const file = selectedFiles[0];
const fileReader = new FileReader();
fileReader.onload = function () {
const imgElement = document.createElement('img');
imgElement.src = fileReader.result;
imgElement.alt = 'Uploaded Image';
imgElement.classList.add('w-full', 'h-full', 'rounded-full', 'object-cover');
// Clear any previous images and append the new one
imageContainer.innerHTML = '';
imageContainer.appendChild(imgElement);
// Update the text in the file input
fileNameSpan.textContent = file.name;
};
// Read the selected file as a data URL
fileReader.readAsDataURL(file);
} else {
fileNameSpan.textContent = 'Upload Profile Picture';
imageContainer.innerHTML = ''; // Clear the container if no file is selected
}
});
<div class="w-full flex justify-start items-center gap-2 mt-1">
<input {% if business.vat %} checked {% endif %} type="checkbox" id="vatCheckbox"
onchange="updateVatValue(this.checked)">
<label class="text-gray-500 text-xl" for="vatCheckbox">VAT</label>
<input type="hidden" name="vat" value="False">
</div>
<script>
function updateVatValue(checked) {
const vatInput = document.querySelector('input[name="vat"]');
vatInput.value = checked ? 'True' : 'False';
}
</script>
<div class="w-full mt-4">
<label class="text-gray-500 text-xl">Email:</label>
<input name="email" type="email" placeholder="Email"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md mt-2"
value="{{business.email}}"
required>
</div>
<div class="w-full mt-4">
<label class="text-gray-500 text-xl">Financial Number:</label>
<input name="financial_number" type="number" placeholder="Financial Number"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md mt-2"
value="{{business.financial_number}}"
required>
</div>
<div class="w-full mt-4">
<label class="text-gray-500 text-xl">Commercial Registration:</label>
<input name="commercial_registration" type="commercial_registration" placeholder="Commercial Registration"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md mt-2"
value="{{business.commercial_registration}}"
required>
</div>
<div class="w-full mt-4">
<label class="text-gray-500 text-xl">Phone Number:</label>
<input name="phone_number" type="number" placeholder="Phone Number"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md mt-2"
value="{{business.phone_number}}"
required>
<div class="w-full flex justify-center items-center mt-3">
<button type="submit"
class="w-fit py-1 px-3 bg-blue-500 rounded-md outline-none text-white border border-blue-500 text-xl cursor-pointer hover:bg-white hover:text-blue-500">Save</button>
</div>
</div>
<div class="w-full mt-4">
<label class="text-gray-500 text-xl">Website:</label>
<input name="website" type="text" placeholder="Website"
value="{{business.website}}"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md mt-2">
</div>
<div class="w-full mt-4">
<label class="text-gray-500 text-xl">Type</label>
<select name="business_type" id="business_type_select"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500 mt-2">
{% if not business.type %}
<option value="" selected>Select Business Type</option>
{% endif %}
{% for type in business_types %}
<option value="{{ type.id }}"
{% if current_business_type and current_business_type.id == type.id %}selected{% endif %}>
{{ type.name }}
</option>
{% endfor %}
</select>
</div>
<div class="w-full flex justify-start items-center gap-2 mt-4">
<input {% if business.vat %} checked {% endif %} type="checkbox" id="vatCheckbox" onchange="updateVatValue(this.checked)">
<label class="text-gray-500 text-xl" for="vatCheckbox">VAT</label>
<input type="hidden" name="vat" value="False">
</div>
<script>
function updateVatValue(checked) {
const vatInput = document.querySelector('input[name="vat"]');
vatInput.value = checked ? 'True' : 'False';
}
</script>
<div class="w-full flex justify-center items-center mt-3">
<button type="submit"
class="w-fit py-1 px-3 bg-blue-500 rounded-md outline-none text-white border border-blue-500 text-xl cursor-pointer hover:bg-white hover:text-blue-500">Save</button>
</div>
</div>
</form>
</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">
@ -177,6 +143,10 @@
</div>
</div>
<!-------------- JS SCRIPTS --------------->
<script type="text/javascript" src='{% static "js/upload-image-tag.js" %}'></script>
<script type="text/javascript" src='{% static "js/pop-modals.js" %}'></script>
</div>

@ -10,50 +10,50 @@
<form method="POST" action="{% url 'editcustomer' customer.customer_id %}">
{% csrf_token %}
<div class="w-full flex flex-col gap-3 justify-center items-center mt-5">
<div class="w-full flex flex-col gap-5 justify-center items-center mt-5">
<div class="w-full mt-4">
<label class="text-gray-500 text-xl">First Name:</label>
<input name="first_name" type="text" placeholder="First Name"
<div class="w-full">
<label class="text-gray-500">First Name:</label>
<input name="first_name" type="text"
value="{{customer.user.first_name}}"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md mt-2" required>
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md mt-1" required>
</div>
<div class="w-full mt-4">
<label class="text-gray-500 text-xl">Last Name:</label>
<input name="last_name" type="text" placeholder="Last Name"
<div class="w-full">
<label class="text-gray-500">Last Name:</label>
<input name="last_name" type="text"
value="{{customer.user.last_name}}"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md mt-2" required>
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md mt-1" required>
</div>
<div class="w-full mt-4">
<label class="text-gray-500 text-xl">Email:</label>
<input name="email" type="email" placeholder="Email"
<div class="w-full">
<label class="text-gray-500">Email:</label>
<input name="email" type="email"
value="{{customer.user.email}}"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md mt-2" required>
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md mt-1" required>
</div>
<div class="w-full mt-4">
<label class="text-gray-500 text-xl">Mobile Number:</label>
<input name="mobile_number" type="number" placeholder="Mobile Number"
<div class="w-full">
<label class="text-gray-500">Mobile Number:</label>
<input name="mobile_number" type="number"
value="{{customer.mobile_number}}"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md mt-2" required>
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md mt-1" required>
</div>
<div class="w-full mt-4">
<label class="text-gray-500 text-xl">Personal Website:</label>
<input name="personal_website" type="url" placeholder="Personal Website"
<div class="w-full">
<label class="text-gray-500">Personal Website:</label>
<input name="personal_website" type="url"
value="{{customer.personal_website}}"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md mt-2">
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md mt-1">
</div>
<div class="w-full mt-4">
<label class="text-gray-500 text-xl">Status:</label>
<div class="w-full">
<label class="text-gray-500">Status:</label>
<select name="status"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500 mt-2"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500 mt-1"
required>
<option value="" disabled>Status</option>
<option value="Active"{% if customer_status == 'Active' %} selected {% endif %}>Active</option>
@ -62,10 +62,10 @@
</select>
</div>
<div class="w-full mt-4">
<label class="text-gray-500 text-xl">Reference:</label>
<div class="w-full">
<label class="text-gray-500">Reference:</label>
<select name="reference"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500 mt-2"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500 mt-1"
required>
{% for reference in references %}
<option value="{{ reference.id }}" {% if reference.id == customer_reference.id %} selected {% endif %}>
@ -76,10 +76,10 @@
</div>
{% if not customer_business %}
<div class="w-full mt-4">
<label class="text-gray-500 text-xl">Type:</label>
<div class="w-full">
<label class="text-gray-500">Type:</label>
<select id="businessTypeSelect"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500 mt-2">
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500 mt-1">
<option value="" disabled>Type</option>
<option value="business" {% if customer.business %} selected {% endif %} >Business</option>
<option value="personal" {% if not customer.business %} selected {% endif %}>Personal</option>
@ -89,10 +89,10 @@
{% if customer_business %}
<div class="w-full mt-4">
<label class="text-gray-500 text-xl">Business:</label>
<div class="w-full">
<label class="text-gray-500">Business:</label>
<select name="business"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500 mt-2"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500 mt-1"
required>
{% for business in businesses %}
<option value="{{ business.id }}" {% if business.id == customer_business.id %} selected {% endif %}>
@ -148,6 +148,7 @@
</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">

@ -8,16 +8,17 @@
Edit Project Type
</h1>
<form id="hiddenContent" method="POST" action="{% url 'editprojecttype' projecttype.id %}">
<form id="hiddenContent" method="POST" action="{% url 'editprojecttype' projecttype.id %}">
{% csrf_token %}
<div class="w-full flex justify-center items-center">
<input name="name" type="text" placeholder="Project Type Name"
value="{{projecttype.name}}"
class="w-full p-3 border border-gray-300 rounded-md bg-transparent outline-none mt-4"
required>
<div class="w-full flex flex-col justify-center items-center mt-2">
<div class="w-full">
<label class="text-gray-500">Business Type:</label>
<input name="name" type="text" placeholder="Project Type Name" value="{{projecttype.name}}"
class="w-full p-3 border border-gray-300 rounded-md bg-transparent outline-none mt-1" required>
</div>
</div>
<div class="w-full flex justify-center items-center mt-4">
<button type="submit"
class="w-fit bg-blue-500 border border-blue-500 rounded-md text-white text-xl px-3 py-2 hover:bg-white hover:text-blue-500">Save</button>
@ -27,6 +28,8 @@
</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">

@ -8,21 +8,20 @@
Edit Project
</h1>
<form class="w-full flex flex-col gap-3 justify-center items-center" method="POST"
<form class="w-full flex flex-col gap-5 justify-center items-center" method="POST"
action="{% url 'editproject' project.project_id %}">
{% csrf_token %}
<div class="w-full flex flex-col gap-3 justify-center items-center mt-5">
<div class="w-full mt-4">
<label class="text-gray-500 text-xl">Name:</label>
<input required name="name" type="text" placeholder="Name"
<div class="w-full">
<label class="text-gray-500">Name:</label>
<input required name="name" type="text"
value="{{project.name}}"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md mt-2">
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md mt-1">
</div>
<div class="w-full mt-4">
<label class="text-gray-500 text-xl">Client:</label>
<select required name="customer" id=""
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500 mt-2">
<div class="w-full">
<label class="text-gray-500">Client:</label>
<select required name="customer"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500 mt-1">
<option value="" disabled>Clients</option>
{% for customer in customers %}
<option value="{{customer.id}}" {% if customer.id == current_client.id %} selected {%endif%}>{{customer.user.first_name}} {{customer.user.last_name}}</option>
@ -30,10 +29,10 @@
</select>
</div>
<div class="w-full mt-4">
<label class="text-gray-500 text-xl">Project Manager:</label>
<select required name="manager" id=""
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500 mt-2">
<div class="w-full">
<label class="text-gray-500">Project Manager:</label>
<select required name="manager"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500 mt-1">
<option value="" disabled>Project Manager</option>
{% for staff in staffs %}
<option value="{{staff.id}}" {% if staff.id == current_manager.id %} selected {%endif%}>{{staff.user.first_name}} {{staff.user.last_name}}</option>
@ -42,10 +41,10 @@
</div>
<div class="w-full mt-4">
<label class="text-gray-500 text-xl">Member(s):</label>
<div class="w-full">
<label class="text-gray-500">Member(s):</label>
<select required name="members" id=""
class="w-full h-[100px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500 mt-2"
class="w-full h-[100px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500 mt-1"
multiple>
{% for staff in staffs %}
{% if staff in project.members.all %}
@ -57,10 +56,10 @@
</select>
</div>
<div class="w-full mt-4">
<label class="text-gray-500 text-xl">Status:</label>
<select required name="status" id=""
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500 mt-2">
<div class="w-full">
<label class="text-gray-500">Status:</label>
<select required name="status"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500 mt-1">
<option value="" disabled>Select Status</option>
<option value="Pending" {% if project.status == 'Pending' %} selected {%endif%}>Pending</option>
<option value="Active" {% if project.status == 'Active' %} selected {%endif%}>Active</option>
@ -69,10 +68,10 @@
</select>
</div>
<div class="w-full mt-4">
<label class="text-gray-500 text-xl">Type(s):</label>
<div class="w-full">
<label class="text-gray-500">Type(s):</label>
<select required name="types" id=""
class="w-full h-[100px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500 mt-2"
class="w-full h-[100px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500 mt-1"
multiple>
{%for type in types %}
{% if type in project.project_type.all %}
@ -84,25 +83,23 @@
</select>
</div>
<div class="w-full mt-4">
<label class="text-gray-500 text-xl">Description:</label>
<textarea required name="details" type="text" placeholder="Project Details" rows="5" cols="5"
class="w-full py-3 px-3 border border-gray-300 outline-none rounded-md resize-none mt-2">Lorem ipsum dolor sit amet consectetur adipisicing elit. Illum magnam ea temporibus commodi aspernatur culpa totam similique voluptate veritatis? Odit, excepturi? Itaque suscipit libero iure corrupti consequatur soluta expedita quod?
<div class="w-full">
<label class="text-gray-500">Description:</label>
<textarea required name="details" type="text" rows="5" cols="5"
class="w-full py-3 px-3 border border-gray-300 outline-none rounded-md resize-none mt-1">Lorem ipsum dolor sit amet consectetur adipisicing elit. Illum magnam ea temporibus commodi aspernatur culpa totam similique voluptate veritatis? Odit, excepturi? Itaque suscipit libero iure corrupti consequatur soluta expedita quod?
</textarea>
</div>
</div>
<div class="w-full mt-4">
<label class="text-gray-500 text-xl">Start Date:</label>
<div class="w-full">
<label class="text-gray-500">Start Date:</label>
<input required name="start_date" type="date" id="date" name="date"
value="2023-09-22"
class="w-full p-3 border border-gray-300 rounded-md bg-transparent outline-none mt-2">
class="w-full p-3 border border-gray-300 rounded-md bg-transparent outline-none mt-1">
</div>
<div class="w-full mt-4">
<label class="text-gray-500 text-xl">End Date:</label>
<div class="w-full">
<label class="text-gray-500">End Date:</label>
<input required name="end_date" type="date" id="date" name="date"
value="2023-10-22"
class="w-full p-3 border border-gray-300 rounded-md bg-transparent outline-none mt-2">

@ -10,27 +10,31 @@
<form id="hiddenContent" method="POST" action="{% url 'editreference' reference.id %}">
{% csrf_token %}
<div class="w-full flex flex-col justify-center items-center">
<input name="name" type="text" placeholder="Reference Name"
value="{{reference.name}}"
class="w-full p-3 border border-gray-300 rounded-md bg-transparent outline-none mt-4"
required>
<input name="date" type="date" id="date"
value="2023-09-22"
class="w-full p-3 border border-gray-300 rounded-md bg-transparent outline-none mt-4">
</div>
<div class="w-full flex justify-center items-center mt-4">
<button type="submit"
class="w-fit bg-blue-500 border border-blue-500 rounded-md text-white text-xl px-3 py-2 hover:bg-white hover:text-blue-500">Save</button>
<div class="w-full flex flex-col gap-5 justify-center items-center">
<div class="w-full">
<label class="text-gray-500">Reference:</label>
<input name="name" type="text" value="{{reference.name}}"
class="w-full p-3 border border-gray-300 rounded-md bg-transparent outline-none mt-1" required>
</div>
<div class="w-full">
<label class="text-gray-500">Date:</label>
<input name="date" type="date" id="date" value="2023-09-22"
class="w-full p-3 border border-gray-300 rounded-md bg-transparent outline-none mt-1">
</div>
<div class="w-full flex justify-center items-center mt-4">
<button type="submit"
class="w-fit bg-blue-500 border border-blue-500 rounded-md text-white text-xl px-3 py-2 hover:bg-white hover:text-blue-500">Save</button>
</div>
</div>
</form>
</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">

@ -10,22 +10,23 @@
<form id="hiddenContent" method="POST">
{% csrf_token %}
<div class="w-full flex justify-center items-center">
<input name="name" type="text" placeholder="Staff Position Name"
value="one"
class="w-full p-3 border border-gray-300 rounded-md bg-transparent outline-none mt-4"
required>
</div>
<div class="w-full flex justify-center items-center mt-4">
<button type="submit"
class="w-fit bg-blue-500 border border-blue-500 rounded-md text-white text-xl px-3 py-2 hover:bg-white hover:text-blue-500">Save</button>
</div>
</form>
<div class="w-full flex flex-col gap-5 justify-center items-center">
<div class="w-full">
<label class="text-gray-500">Staff Position:</label>
<input name="name" type="text" value="one"
class="w-full p-3 border border-gray-300 rounded-md bg-transparent outline-none mt-1" required>
<div class="w-full flex justify-center items-center mt-4">
<button type="submit"
class="w-fit bg-blue-500 border border-blue-500 rounded-md text-white text-xl px-3 py-2 hover:bg-white hover:text-blue-500">Save</button>
</div>
</div>
</form>
</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">

@ -10,7 +10,7 @@
<form method="POST" action="{% url 'editstaff' staff.staff_id %}" enctype="multipart/form-data">
{% csrf_token %}
<div class="w-full flex flex-col gap-3 justify-center items-center mt-5">
<div class="w-full flex flex-col gap-5 justify-center items-center mt-5">
<div class="w-[70px] s:w-[100px] h-[70px] s:h-[100px] rounded-full border border-gray-200 mt-2" id="image-container">
{% if staff.image %}
<img src="{{staff.image.url}}" alt="" srcset="" id="" class="rounded-full w-full h-full">
@ -19,112 +19,83 @@
{% endif %}
</div>
<div class="inbox-box border border-gray-300 py-1 px-3 w-full rounded-md">
<div class="flex items-center justify-between">
<input name="image" type="file" id="actual-btn" accept="image/*" hidden />
<span id="file-name" class="text-gray-500 text-base focus:outline-none outline-none">Upload
New Profile Picture</span>
<label for="actual-btn"
class="bg-transparent text-gray-500 border border-white px-4 py-2 h-14 cursor-pointer flex items-center"><i
class="fa fa-upload" style="font-size: 20px;"></i></label>
<div class="w-full flex flex-col gap-3">
<div>
<label class="text-gray-500">Current Image:
<a href="{{staff.image.url}}" class="text-gray-400 cursor-pointer hover:text-slate-800" style="word-wrap: break-word;" target="_blank">{{staff.image.url}}</a>
</label>
</div>
<div class="inbox-box border border-gray-300 py-1 px-3 w-full rounded-md">
<div class="flex items-center justify-between">
<input name="image" type="file" id="actual-btn" accept="image/*" hidden />
<span id="file-name" class="text-gray-500 text-base focus:outline-none outline-none">Upload
New Picture</span>
<label for="actual-btn"
class="bg-transparent text-gray-500 border border-white px-4 py-2 h-14 cursor-pointer flex items-center"><i
class="fa fa-upload" style="font-size: 20px;"></i></label>
</div>
</div>
</div>
<!-- WHEN THE USER CHOOSE A FILE THE NAME OF THE FILE WILL APPEAR IN THE SPAN AND THE UPLOADED IMAGE WILL APPEAR IN THE USER PROFILE IMAGE CONTAINER -->
<script>
const fileInput = document.getElementById('actual-btn');
const fileNameSpan = document.getElementById('file-name');
const imageContainer = document.getElementById('image-container');
fileInput.addEventListener('change', (event) => {
const selectedFiles = event.target.files;
if (selectedFiles.length > 0) {
const file = selectedFiles[0];
const fileReader = new FileReader();
fileReader.onload = function () {
const imgElement = document.createElement('img');
imgElement.src = fileReader.result;
imgElement.alt = 'Uploaded Image';
imgElement.classList.add('w-full', 'h-full', 'rounded-full', 'object-cover');
// Clear any previous images and append the new one
imageContainer.innerHTML = '';
imageContainer.appendChild(imgElement);
// Update the text in the file input
fileNameSpan.textContent = file.name;
};
// Read the selected file as a data URL
fileReader.readAsDataURL(file);
} else {
fileNameSpan.textContent = 'Upload Profile Picture';
imageContainer.innerHTML = ''; // Clear the container if no file is selected
}
});
</script>
<div class="w-full mt-4">
<label class="text-gray-500 text-xl">First Name:</label>
<input name="first_name" type="text" placeholder="First Name"
<div class="w-full">
<label class="text-gray-500">First Name:</label>
<input name="first_name" type="text"
value="{{staff.user.first_name}}"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md mt-2" required>
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md mt-1" required>
</div>
<div class="w-full mt-4">
<label class="text-gray-500 text-xl">Last Name:</label>
<input name="last_name" type="text" placeholder="Last Name"
<div class="w-full">
<label class="text-gray-500">Last Name:</label>
<input name="last_name" type="text"
value="{{staff.user.last_name}}"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md mt-2" required>
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md mt-1" required>
</div>
<div class="w-full mt-4">
<label class="text-gray-500 text-xl">Email:</label>
<input name="email" type="email" placeholder="Email"
<div class="w-full">
<label class="text-gray-500">Email:</label>
<input name="email" type="email"
value="{{staff.user.email}}"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md mt-2" required>
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md mt-1" required>
</div>
<div class="w-full mt-4">
<label class="text-gray-500 text-xl">Mobile Number:</label>
<input name="mobile_number" type="number" placeholder="Mobile Number"
<div class="w-full">
<label class="text-gray-500">Mobile Number:</label>
<input name="mobile_number" type="number"
value="{{staff.mobile_number}}"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md mt-2" required>
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md mt-1" required>
</div>
<div class="w-full mt-4">
<label class="text-gray-500 text-xl">Position:</label>
<div class="w-full">
<label class="text-gray-500">Position:</label>
<select name="staff_position" id=""
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500 mt-2">
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500 mt-1">
{% for position in positions %}
<option {% if current_position and current_position.id == position.id %}selected{% endif %} value="{{position.id}}"> {{position.name}}</option>
{% endfor %}
</select>
</div>
{% if staff.active %}
<div class="w-full flex justify-start items-center gap-2 mt-2">
<div class="w-full flex justify-start items-center gap-2">
<input checked type="checkbox" name="active">
<p class="text-gray-500 text-xl">Active</p>
</div>
{% else %}
<div class="w-full flex justify-start items-center gap-2 mt-2">
<div class="w-full flex justify-start items-center gap-2">
<input type="checkbox" name="active">
<p class="text-gray-500 text-xl">Active</p>
</div>
{% endif %}
{% if staff.intern %}
<div class="w-full flex justify-start items-center gap-2 mt-2">
<div class="w-full flex justify-start items-center gap-2">
<input checked type="checkbox" name="intern">
<p class="text-gray-500 text-xl">Intern</p>
</div>
{% else %}
<div class="w-full flex justify-start items-center gap-2 mt-2">
<div class="w-full flex justify-start items-center gap-2">
<input type="checkbox" name="intern">
<p class="text-gray-500 text-xl">Intern</p>
</div>
@ -140,6 +111,7 @@
</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">
@ -151,7 +123,11 @@
</div>
</div>
<!-------------- JS SCRIPTS --------------->
<script type="text/javascript" src='{% static "js/upload-image-tag.js" %}'></script>
<script type="text/javascript" src='{% static "js/pop-modals.js" %}'></script>
</div>
{% endblock content %}

@ -10,23 +10,26 @@
<form id="hiddenContent" method="POST" action="{% url 'edittag' tag.id %}">
{% csrf_token %}
<div class="w-full flex justify-center items-center">
<input name="name" type="text" placeholder="Tag Name"
value="{{tag.name}}"
class="w-full p-3 border border-gray-300 rounded-md bg-transparent outline-none mt-4"
required>
</div>
<div class="w-full flex justify-center items-center mt-4">
<button type="submit"
class="w-fit bg-blue-500 border border-blue-500 rounded-md text-white text-xl px-3 py-2 hover:bg-white hover:text-blue-500">Save</button>
<div class="w-full flex flex-col gap-5 justify-center items-center">
<div class="w-full">
<label class="text-gray-500">Tag Name:</label>
<input name="name" type="text" value="{{tag.name}}"
class="w-full p-3 border border-gray-300 rounded-md bg-transparent outline-none mt-1" required>
</div>
<div class="w-full flex justify-center items-center mt-4">
<button type="submit"
class="w-fit bg-blue-500 border border-blue-500 rounded-md text-white text-xl px-3 py-2 hover:bg-white hover:text-blue-500">Save</button>
</div>
</div>
</form>
</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">

@ -8,53 +8,51 @@
Edit Task
</h1>
<form class="w-full flex flex-col gap-3 justify-center items-center mt-5" method="POST"
<form class="w-full flex flex-col gap-5 justify-center items-center mt-5" method="POST"
action="{% url 'edittask' task.task_id %}">
{% csrf_token %}
<div class="w-full mt-4">
<label class="text-gray-500 text-xl">Name:</label>
<input required name="name" type="text" placeholder="Task Name"
<div class="w-full">
<label class="text-gray-500">Name:</label>
<input required name="name" type="text"
value="{{task.name}}"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md mt-2">
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md mt-1">
</div>
<div class="w-full mt-4">
<label class="text-gray-500 text-xl">Project:</label>
<div class="w-full">
<label class="text-gray-500">Project:</label>
<select required name="project" id="projectDropdown"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500 mt-2">
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500 mt-1">
{% for project in projects %}
<option value="{{project.id}}" {% if project.id == task.project.id %} selected {% endif %}>{{project.name}}</option>
{% endfor %}
</select>
</div>
<div class="w-full mt-4">
<label class="text-gray-500 text-xl">Epic:</label>
<div class="w-full">
<label class="text-gray-500">Epic:</label>
<select required name="epic" id="epicDropdown"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500 mt-2">
<option value="" disabled>Select Epic</option>
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500 mt-1">
{% for epic in epics_of_my_project %}
<option value="{{epic.id}}" {% if epic.id == task.epic.id %} selected {% endif %}>{{epic.title}}</option>
{% endfor %}
</select>
</div>
<div class="w-full mt-4">
<label class="text-gray-500 text-xl">Status:</label>
<select required name="status" id=""
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500 mt-2">
<option value="" disabled>Select Status</option>
<div class="w-full">
<label class="text-gray-500">Status:</label>
<select required name="status"
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500 mt-1">
<option value="Open" selected>Open</option>
<option value="Working On">Working On</option>
<option value="Closed">Closed</option>
</select>
</div>
<div class="w-full mt-4">
<label class="text-gray-500 text-xl">Assigned To:</label>
<div class="w-full">
<label class="text-gray-500">Assigned To:</label>
<select name="assigned_to" required id=""
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500 mt-2">
<option value="" disabled>Assigned To</option>
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500 mt-1">
<option value="{{task.staff.id}}" selected>{{task.staff.user.first_name}} {{task.staff.user.last_name}}</option>
{% for staff in staffs %}
<option value="{{staff.id}}">{{staff.user.first_name}} {{staff.user.last_name}}</option>
@ -62,38 +60,36 @@
</select>
</div>
<div class="w-full mt-4">
<label class="text-gray-500 text-xl">Description:</label>
<textarea required name="description" type="text" placeholder="Task Description" rows="5" cols="5"
class="w-full py-3 px-3 border border-gray-300 outline-none rounded-md resize-none mt-2">Lorem ipsum dolor sit amet consectetur adipisicing elit. Ab laboriosam cum temporibus itaque vel atque, obcaecati voluptates porro dolorem, magnam quidem nemo corrupti ullam dicta excepturi pariatur inventore voluptatem beatae!
<div class="w-full">
<label class="text-gray-500">Description:</label>
<textarea required name="description" type="text" rows="5" cols="5"
class="w-full py-3 px-3 border border-gray-300 outline-none rounded-md resize-none mt-1">Lorem ipsum dolor sit amet consectetur adipisicing elit. Ab laboriosam cum temporibus itaque vel atque, obcaecati voluptates porro dolorem, magnam quidem nemo corrupti ullam dicta excepturi pariatur inventore voluptatem beatae!
</textarea>
</div>
<div class="w-full mt-4">
<label class="text-gray-500 text-xl">Extra:</label>
<div class="w-full">
<label class="text-gray-500">Extra:</label>
<select required name="extra" id=""
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500 mt-2">
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500 mt-1">
<option value="True">Yes</option>
<option value="False" selected>No</option>
</select>
</div>
<div class="w-full mt-4">
<label class="text-gray-500 text-xl">Start Date:</label>
<div class="w-full">
<label class="text-gray-500">Start Date:</label>
<input required name="start_date" type="date" id="date" name="date"
value="2023-09-22"
class="w-full p-3 border border-gray-300 rounded-md bg-transparent outline-none mt-2">
class="w-full p-3 border border-gray-300 rounded-md bg-transparent outline-none mt-1">
</div>
<div class="w-full mt-4">
<label class="text-gray-500 text-xl">End Date:</label>
<div class="w-full">
<label class="text-gray-500">End Date:</label>
<input required name="end_date" type="date" id="date" name="date"
value="2023-09-22"
class="w-full p-3 border border-gray-300 rounded-md bg-transparent outline-none mt-2">
class="w-full p-3 border border-gray-300 rounded-md bg-transparent outline-none mt-1">
</div>
<div class="w-full flex justify-center items-center mt-3">
<button type="submit"
class="w-fit py-1 px-3 bg-blue-500 rounded-md outline-none text-white border border-blue-500 text-xl cursor-pointer hover:bg-white hover:text-blue-500">Save</button>
@ -103,6 +99,7 @@
</div>
</div>
<!---------------------- JS SCRIPTS -------------------->
<script src="https://code.jquery.com/jquery-3.6.4.min.js"></script>

@ -3,7 +3,7 @@
{% block content %}
<style>
/* .bread{
/* .bread{
height:40px;
background:red;
color:#fff;
@ -24,7 +24,7 @@
border-left: 20px solid red;
} */
/* .nextbread {
/* .nextbread {
height:40px;
background:red;
color:#fff;
@ -43,7 +43,6 @@
border:20px solid transparent;
border-left: 20px solid red;
} */
</style>
@ -144,8 +143,8 @@
</div>
</div>
<!-- <div class="w-full px-5 s:px-9 pb-5">
<div class="w-full px-3 py-5 flex items-center bg-white shadow-md rounded-md text-gray-500 font-light">
<div class="w-full px-5 s:px-9 pb-5">
<!-- <div class="w-full px-3 py-5 flex items-center bg-white shadow-md rounded-md text-gray-500 font-light">
<div
class="bread ">
<p>Home</p>
@ -155,8 +154,23 @@
class="nextbread ">
<p>Home</p>
</div>
</div> -->
<div class="flex items-center px-6 py-3 bg-white border-b rounded-md shadow-md">
<a href="#" class="text-sm text-gray-500 hover:text-gray-700">Home</a>
<svg class="w-5 h-5 ml-4 text-gray-400" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"
stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7"></path>
</svg>
<span class="ml-4 text-sm text-gray-500">Previous Page</span>
<svg class="w-5 h-5 ml-4 text-gray-400" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"
stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7"></path>
</svg>
<span class="ml-4 text-sm text-gray-500">Current Page</span>
</div>
</div> -->
</div>
<!-- TASKS AND USERS ACTIVITY SECTION -->
<div class="w-full flex justify-between gap-5 px-5 s:px-9 pb-5">
@ -581,7 +595,8 @@
<!-- RIGHT SIDE / USERS ACTIVITY -->
{% if latest_statuses_time_ago %}
<div class="hidden xxlg1:block w-[25%] bg-white h-[630px] overflow-y-auto overflow-hidden rounded-md shadow-md p-5">
<div
class="hidden xxlg1:block w-[25%] 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">

@ -171,7 +171,7 @@
<!-- RIGHT SIDE / USERS ACTIVITY -->
{% if latest_statuses_time_ago %}
<div class="hidden xxlg1:block w-[25%] bg-white h-[630px] overflow-y-auto overflow-hidden rounded-md shadow-md p-5">
<div class="hidden xxlg1:block w-[25%] 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">

@ -201,7 +201,7 @@
<!-- RIGHT SIDE / USERS ACTIVITY -->
{% if latest_statuses_time_ago %}
<div class="hidden xxlg1:block w-[25%] bg-white h-[630px] overflow-y-auto overflow-hidden rounded-md shadow-md p-5">
<div class="hidden xxlg1:block w-[25%] 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">

@ -220,7 +220,7 @@
<!-- RIGHT SIDE / USERS ACTIVITY -->
{% if latest_statuses_time_ago %}
<div class="hidden xxlg1:block w-[25%] bg-white h-[630px] overflow-y-auto overflow-hidden rounded-md shadow-md p-5">
<div class="hidden xxlg1:block w-[25%] 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">

@ -170,7 +170,7 @@
<!-- RIGHT SIDE / USERS ACTIVITY -->
{% if latest_statuses_time_ago %}
<div class="hidden xxlg1:block w-[25%] bg-white h-[630px] overflow-y-auto overflow-hidden rounded-md shadow-md p-5">
<div class="hidden xxlg1:block w-[25%] 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">

@ -143,7 +143,7 @@
<!-- RIGHT SIDE / USERS ACTIVITY -->
{% if latest_statuses_time_ago %}
<div class="hidden xxlg1:block w-[25%] bg-white h-[630px] overflow-y-auto overflow-hidden rounded-md shadow-md p-5">
<div class="hidden xxlg1:block w-[25%] 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">

@ -171,7 +171,7 @@
<!-- RIGHT SIDE / USERS ACTIVITY -->
{% if latest_statuses_time_ago %}
<div class="hidden xxlg1:block w-[25%] bg-white h-[630px] overflow-y-auto overflow-hidden rounded-md shadow-md p-5">
<div class="hidden xxlg1:block w-[25%] 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">

@ -234,7 +234,7 @@
<!-- RIGHT SIDE / USERS ACTIVITY -->
{% if latest_statuses_time_ago %}
<div class="hidden xxlg1:block w-[25%] bg-white h-[630px] overflow-y-auto overflow-hidden rounded-md shadow-md p-5">
<div class="hidden xxlg1:block w-[25%] 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">

@ -180,7 +180,7 @@
<!-- RIGHT SIDE / USERS ACTIVITY -->
{% if latest_statuses_time_ago %}
<div class="hidden xxlg1:block w-[25%] bg-white h-[630px] overflow-y-auto overflow-hidden rounded-md shadow-md p-5">
<div class="hidden xxlg1:block w-[25%] 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">

@ -173,7 +173,7 @@
<!-- RIGHT SIDE / USERS ACTIVITY -->
{% if latest_statuses_time_ago %}
<div class="hidden xxlg1:block w-[25%] bg-white h-[630px] overflow-y-auto overflow-hidden rounded-md shadow-md p-5">
<div class="hidden xxlg1:block w-[25%] 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">

@ -194,7 +194,7 @@
<!-- RIGHT SIDE / USERS ACTIVITY -->
{% if latest_statuses_time_ago %}
<div class="hidden xxlg1:block w-[25%] bg-white h-[630px] overflow-y-auto overflow-hidden rounded-md shadow-md p-5">
<div class="hidden xxlg1:block w-[25%] 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">

@ -173,7 +173,7 @@
<!-- RIGHT SIDE / USERS ACTIVITY -->
{% if latest_statuses_time_ago %}
<div class="hidden xxlg1:block w-[25%] bg-white h-[630px] overflow-y-auto overflow-hidden rounded-md shadow-md p-5">
<div class="hidden xxlg1:block w-[25%] 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">

@ -490,7 +490,7 @@
<!-- RIGHT SIDE / USERS ACTIVITY -->
{% if latest_statuses_time_ago %}
<div class="hidden xxlg1:block w-[25%] bg-white h-[630px] overflow-y-auto overflow-hidden rounded-md shadow-md p-5">
<div class="hidden xxlg1:block w-[25%] 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">

Loading…
Cancel
Save