diff --git a/company/templates/company/company_analytics.html b/company/templates/company/company_analytics.html index 216320693..a681749f8 100644 --- a/company/templates/company/company_analytics.html +++ b/company/templates/company/company_analytics.html @@ -1,24 +1,21 @@ -{% extends 'company/company_dashboard_base.html' %} -{% load static %} -{% block title %} Company Analytics {% endblock title %} +{% extends 'company/company_dashboard_base.html' %} +{% load static %} +{% block title %} Company Analytics {% endblock title %} {% block body %} -
+

Dashboard

- -
+ +
+ class="flex justify-center items-center bg-white w-[340px] h-[172px] rounded-xl hover:scale-110 transition-all">
-
+
@@ -32,12 +29,9 @@
+ class="flex flex-wrap justify-center items-center bg-white w-[340px] h-[172px] rounded-xl hover:scale-110 transition-all">
-
+
@@ -51,12 +45,9 @@
+ class="flex flex-wrap justify-center items-center bg-white w-[340px] h-[172px] rounded-xl hover:scale-110 transition-all">
-
+
@@ -70,12 +61,9 @@
+ class="flex flex-wrap justify-center items-center bg-white w-[340px] h-[172px] rounded-xl hover:scale-110 transition-all">
-
+
@@ -89,10 +77,10 @@
-
-
-
-
+
+
+
+

Bug Reported Type

@@ -100,7 +88,7 @@

Bug Reported Type

-
+

Reported on Domains

@@ -110,238 +98,101 @@

Reported on Domains

-
-
-

Monthly Reports

-
- - - - - 2023 - - - - -
+
+

Monthly Reports

+
+ + + + + 2023 + + + +
-
-
+
+

Total Reported

{% if bug_rate_increase_descrease_weekly.is_increasing %} - + - - + + {% else %} - + - - + + {% endif %}

- {{bug_rate_increase_descrease_weekly.this_week_issue_count}}Bugs + {{bug_rate_increase_descrease_weekly.this_week_issue_count}}Bugs

- + {{bug_rate_increase_descrease_weekly.percent_increase}}% {% if bug_rate_increase_descrease_weekly.is_increasing %} Increasing {% else %} Decreasing {% endif %} compared to last week

-
+

Accepted Bugs

{% if accepted_bug_rate_increase_descrease_weekly.is_increasing %} - + - - + + {% else %} - + - - + + {% endif %}

- {{accepted_bug_rate_increase_descrease_weekly.this_week_issue_count}}Accepted Bugs + {{accepted_bug_rate_increase_descrease_weekly.this_week_issue_count}}Accepted + Bugs

- + {{accepted_bug_rate_increase_descrease_weekly.percent_increase}}% {% if accepted_bug_rate_increase_descrease_weekly.is_increasing %} @@ -471,359 +322,277 @@

Transaction History

-->
- -
-
-
-

Your balance

- - - - - -
-

- $120,435.00(USD) -

-

From Jan 01, 2022 to Jan 31, 2022

-
- -
+

+ $120,435.00(USD) +

+

From Jan 01, 2022 to Jan 31, 2022

+
+ + +
+
+
+
+

Spent On Bug Types

+ + d="M5 10.4166C3.9 10.4166 3 11.3541 3 12.5C3 13.6458 3.9 14.5833 5 14.5833C6.1 14.5833 7 13.6458 7 12.5C7 11.3541 6.1 10.4166 5 10.4166Z" + stroke="#1A202C" stroke-width="1.5" /> + d="M19 10.4166C17.9 10.4166 17 11.3541 17 12.5C17 13.6458 17.9 14.5833 19 14.5833C20.1 14.5833 21 13.6458 21 12.5C21 11.3541 20.1 10.4166 19 10.4166Z" + stroke="#1A202C" stroke-width="1.5" /> + d="M12 10.4166C10.9 10.4166 10 11.3541 10 12.5C10 13.6458 10.9 14.5833 12 14.5833C13.1 14.5833 14 13.6458 14 12.5C14 11.3541 13.1 10.4166 12 10.4166Z" + stroke="#1A202C" stroke-width="1.5" /> - Transfer - -
-
-
-
-

Spent On Bug Types

- - - - - -
-
- -
+
+
+ +
-
-

Total Spent

- ${{ total_info.total_money_distributed }} -
-
- {% for bugtype, money_spent in spent_on_bugtypes.zipped_data %} +
+

Total Spent

+ ${{ total_info.total_money_distributed }} +
+
+ {% for bugtype, money_spent in spent_on_bugtypes.zipped_data %}
-
+
{{ bugtype }} -
- ${{ money_spent }} +
+ ${{ money_spent }}
- {% endfor %} + {% endfor %} +
-
{% endblock body %} {% block js %} - + - - -{% endblock %} + }, + }, + }, + }); + } + + function populateSpentOnBugTypes() { + const ctx2 = document.getElementById("spentOnBugTypes"); + + new Chart(ctx2, { + type: "doughnut", + data: { + labels: JSON.parse('{{ spent_on_bugtypes.labels | safe }}'), + datasets: [ + { + data: JSON.parse('{{ spent_on_bugtypes.data | safe }}'), + borderRadius: 5, + cutout: 80, + backgroundColor: [ + "rgb(235, 124, 166)", + "rgb(255, 172, 200)", + "rgb(204, 111, 248)", + "rgb(124, 92, 252)", + "rgb(92, 175, 252)", + "rgb(161, 169, 254)", + "rgb(161, 169, 254)", + "rgb(161, 169, 254)", + ], + hoverOffset: 4, + spacing: 8, + }, + ], + }, + options: { + plugins: { + legend: { + display: false, + }, + }, + }, + }); + } + + populateSpentOnBugTypes(); + populateMonthlyReportBarChart(); + populateReportOnDomainsPie(); + populateBugTypePie(); + + +{% endblock %} \ No newline at end of file