diff --git a/osinaweb/billing/add/__pycache__/urls.cpython-312.pyc b/osinaweb/billing/add/__pycache__/urls.cpython-312.pyc index b201b650..10f944ef 100644 Binary files a/osinaweb/billing/add/__pycache__/urls.cpython-312.pyc and b/osinaweb/billing/add/__pycache__/urls.cpython-312.pyc differ diff --git a/osinaweb/billing/add/__pycache__/views.cpython-312.pyc b/osinaweb/billing/add/__pycache__/views.cpython-312.pyc index 4f79a25a..9b995f1a 100644 Binary files a/osinaweb/billing/add/__pycache__/views.cpython-312.pyc and b/osinaweb/billing/add/__pycache__/views.cpython-312.pyc differ diff --git a/osinaweb/billing/edit/__pycache__/urls.cpython-312.pyc b/osinaweb/billing/edit/__pycache__/urls.cpython-312.pyc index 2d183e29..3ece1b8c 100644 Binary files a/osinaweb/billing/edit/__pycache__/urls.cpython-312.pyc and b/osinaweb/billing/edit/__pycache__/urls.cpython-312.pyc differ diff --git a/osinaweb/billing/edit/__pycache__/views.cpython-312.pyc b/osinaweb/billing/edit/__pycache__/views.cpython-312.pyc index bc95c6e5..6899e048 100644 Binary files a/osinaweb/billing/edit/__pycache__/views.cpython-312.pyc and b/osinaweb/billing/edit/__pycache__/views.cpython-312.pyc differ diff --git a/osinaweb/customercore/__pycache__/custom_context.cpython-312.pyc b/osinaweb/customercore/__pycache__/custom_context.cpython-312.pyc index 58c91063..2eebe0c1 100644 Binary files a/osinaweb/customercore/__pycache__/custom_context.cpython-312.pyc and b/osinaweb/customercore/__pycache__/custom_context.cpython-312.pyc differ diff --git a/osinaweb/customercore/__pycache__/views.cpython-312.pyc b/osinaweb/customercore/__pycache__/views.cpython-312.pyc index 49bcc847..1eb53e29 100644 Binary files a/osinaweb/customercore/__pycache__/views.cpython-312.pyc and b/osinaweb/customercore/__pycache__/views.cpython-312.pyc differ diff --git a/osinaweb/customercore/templates/details_templates/inner-customer-ticket.html b/osinaweb/customercore/templates/details_templates/inner-customer-ticket.html index 1fc596fe..f86806f5 100644 --- a/osinaweb/customercore/templates/details_templates/inner-customer-ticket.html +++ b/osinaweb/customercore/templates/details_templates/inner-customer-ticket.html @@ -12,8 +12,16 @@
-

Ticket #{{ticket.ticket_number}}

+
+

Ticket #{{ticket.ticket_number}}

+ + +
+ {% if last_ticket_status.status == 'Open' %} @@ -51,7 +59,8 @@ - {{ file.file_path | cut:"static/images/uploaded_ticket_files/" }}{% if not forloop.last %}, {% endif %} + + {{ file.file_path | cut:"static/images/uploaded_ticket_files/" }}{% if not forloop.last %}, {% endif %}
{% endfor %}
@@ -118,15 +127,17 @@ {% if update.ticketattachment_set.all %}
{% for file in update.ticketattachment_set.all %} - + {% endfor %}
{% endif %} @@ -316,7 +327,7 @@ class="opacity-0 absolute top-1/2 left-1/2 w-[25px] -translate-x-1/2 -translate-y-1/2 z-10">
- + + +
+ + + +
diff --git a/osinaweb/osinacore/templates/edit_templates/edit-ticket-status-modal.html b/osinaweb/osinacore/templates/edit_templates/edit-ticket-status-modal.html new file mode 100644 index 00000000..fb929c27 --- /dev/null +++ b/osinaweb/osinacore/templates/edit_templates/edit-ticket-status-modal.html @@ -0,0 +1,41 @@ +{% load static %} + + + + + + + + Osina + + + + + + + +
+ {% csrf_token %} +

Update Ticket Status

+ + + + +
+ +
+ + +
+ +
+
+ + + \ No newline at end of file diff --git a/osinaweb/osinacore/templates/index.html b/osinaweb/osinacore/templates/index.html index 2cd68d6d..20f37577 100644 --- a/osinaweb/osinacore/templates/index.html +++ b/osinaweb/osinacore/templates/index.html @@ -7,7 +7,6 @@ {% if pinned_projects_with_time %}
- {% for pinned in pinned_projects_with_time %}
@@ -22,27 +21,27 @@
-

{{ pinned.project.start_date|date:'d-m-Y' }}

-

{{ pinned.project.end_date|date:'d-m-Y' }}

+

{{ pinned.project.start_date|date:'Y-m-d' }}

+

{{ pinned.project.end_date|date:'Y-m-d' }}

-
- - - - - - -
+
+ + + + + + +
@@ -103,8 +102,6 @@
{% endfor %} - - {% endif %} @@ -451,8 +448,8 @@ - - + + {% endblock content %} \ No newline at end of file diff --git a/osinaweb/static/dist/output.css b/osinaweb/static/dist/output.css index b8488deb..8bd8abc6 100644 --- a/osinaweb/static/dist/output.css +++ b/osinaweb/static/dist/output.css @@ -3605,11 +3605,6 @@ video { background-color: rgb(243 244 246 / var(--tw-bg-opacity)); } -.hover\:bg-gray-200:hover { - --tw-bg-opacity: 1; - background-color: rgb(229 231 235 / var(--tw-bg-opacity)); -} - .hover\:bg-gray-50:hover { --tw-bg-opacity: 1; background-color: rgb(249 250 251 / var(--tw-bg-opacity)); @@ -3728,6 +3723,10 @@ video { } @media (min-width: 650px) { + .s\:mb-0 { + margin-bottom: 0px; + } + .s\:mt-10 { margin-top: 2.5rem; } @@ -3837,6 +3836,10 @@ video { flex-direction: row; } + .s\:items-center { + align-items: center; + } + .s\:justify-end { justify-content: flex-end; } @@ -3909,6 +3912,10 @@ video { } @media (min-width: 798px) { + .md\:mb-0 { + margin-bottom: 0px; + } + .md\:block { display: block; } @@ -3946,6 +3953,10 @@ video { flex-direction: row; } + .md\:items-center { + align-items: center; + } + .md\:text-3xl { font-size: 1.875rem; line-height: 2.25rem; diff --git a/osinaweb/static/images/uploaded_ticket_files/app-debug .apk b/osinaweb/static/images/uploaded_ticket_files/app-debug .apk new file mode 100644 index 00000000..446791ed Binary files /dev/null and b/osinaweb/static/images/uploaded_ticket_files/app-debug .apk differ diff --git a/osinaweb/static/images/uploaded_ticket_files/vcard-banner.png b/osinaweb/static/images/uploaded_ticket_files/vcard-banner.png new file mode 100644 index 00000000..5446c938 Binary files /dev/null and b/osinaweb/static/images/uploaded_ticket_files/vcard-banner.png differ diff --git a/osinaweb/static/js/pop-modals.js b/osinaweb/static/js/pop-modals.js index 04c348b8..718cc71c 100644 --- a/osinaweb/static/js/pop-modals.js +++ b/osinaweb/static/js/pop-modals.js @@ -83,6 +83,9 @@ function initializeModalButtons() { addButtonClickListener("editCustomerStatusButton", "400px", "160px"); addButtonClickListener("addProjectMemberModal", "400px", "280px"); + addButtonClickListener("updateTicketStatusButton", "400px", "220px"); + + // DELETE BUTTONS addButtonClickListener("deleteCustomerButton", "400px", "140px"); addButtonClickListener("deleteBusinessButton", "400px", "140px"); diff --git a/osinaweb/static/js/projects/calculate-all-pinned-projects-time.js b/osinaweb/static/js/projects/calculate-all-pinned-projects-time.js new file mode 100644 index 00000000..303df4ba --- /dev/null +++ b/osinaweb/static/js/projects/calculate-all-pinned-projects-time.js @@ -0,0 +1,44 @@ +document.addEventListener("DOMContentLoaded", function() { + + // Function to calculate progress and update progress bar + function calculateProgress(startDate, endDate, progressBar) { + const currentDate = new Date(); + if (endDate <= currentDate) { + progressBar.style.width = "100%"; + progressBar.classList.add('bg-red-500'); + } else if (startDate > currentDate) { + progressBar.style.width = "0%"; + } else { + const passedTime = currentDate - startDate; + const totalDuration = endDate - startDate; + const percentage = (passedTime / totalDuration) * 100; + progressBar.style.width = percentage + "%"; + + if (percentage <= 50) { + progressBar.classList.add('bg-green-700'); + } else if (percentage <= 80) { + progressBar.classList.add('bg-yellow-400'); + } else if (percentage <= 100) { + progressBar.classList.add('bg-red-500'); + } + } + } + + function updateAllProjectProgress() { + const projectContainers = document.querySelectorAll(".projectContainer"); + + projectContainers.forEach(projectContainer => { + const startDateElement = projectContainer.querySelector(".startDate"); + const endDateElement = projectContainer.querySelector(".endDate"); + + const progressBar = projectContainer.querySelector(".progressBar"); + + const startDate = new Date(startDateElement.textContent); + const endDate = new Date(endDateElement.textContent); + + calculateProgress(startDate, endDate, progressBar); + }); + } + + updateAllProjectProgress(); +}); \ No newline at end of file diff --git a/osinaweb/static/js/projects/projects-filtering.js b/osinaweb/static/js/projects/projects-filtering.js index 3c023cf5..6bf1488b 100644 --- a/osinaweb/static/js/projects/projects-filtering.js +++ b/osinaweb/static/js/projects/projects-filtering.js @@ -24,10 +24,10 @@ document.addEventListener('DOMContentLoaded', function () { initializeModalButtons(); updateAllProjectProgress(); }) - .catch(error => console.error('Error:', error)); - - projectLoader.classList.add('hidden'); - + .catch(error => { + console.error('Error:', error); + projectLoader.classList.add('hidden'); + }); } else { fetch('/projects/status/' + selectedStatus + '/') .then(response => response.text()) @@ -38,7 +38,10 @@ document.addEventListener('DOMContentLoaded', function () { initializeModalButtons(); updateAllProjectProgress(); }) - .catch(error => console.error('Error:', error)); + .catch(error => { + console.error('Error:', error); + projectLoader.classList.add('hidden'); + }); } }); });