Kanchan Chauhan | b3fe6a4 | 2016-03-16 18:01:22 +0530 | [diff] [blame] | 1 | {% extends "templates/web.html" %} |
| 2 | |
Jannat Patel | 5a42511 | 2021-07-01 17:17:34 +0530 | [diff] [blame] | 3 | {% block title %} |
| 4 | {{ doc.project_name }} |
| 5 | {% endblock %} |
| 6 | |
| 7 | {% block head_include %} |
Suraj Shetty | f0e8a51 | 2022-07-06 15:10:39 +0530 | [diff] [blame] | 8 | <link rel="stylesheet" href="/assets/frappe/css/fonts/fontawesome/font-awesome.min.css"> |
Jannat Patel | 5a42511 | 2021-07-01 17:17:34 +0530 | [diff] [blame] | 9 | {% endblock %} |
Kanchan Chauhan | b3fe6a4 | 2016-03-16 18:01:22 +0530 | [diff] [blame] | 10 | |
Kanchan Chauhan | 239b351 | 2016-05-02 11:43:44 +0530 | [diff] [blame] | 11 | {% block header %} |
Saurabh | 80e4582 | 2022-11-21 17:42:53 +0530 | [diff] [blame] | 12 | <h3 class="my-account-header">{{ doc.project_name }}</h3> |
Kanchan Chauhan | 2ad801c | 2016-03-22 16:00:41 +0530 | [diff] [blame] | 13 | {% endblock %} |
| 14 | |
Kanchan Chauhan | b3fe6a4 | 2016-03-16 18:01:22 +0530 | [diff] [blame] | 15 | {% block style %} |
Jannat Patel | 5a42511 | 2021-07-01 17:17:34 +0530 | [diff] [blame] | 16 | <style> |
| 17 | { |
| 18 | % include "templates/includes/projects.css"% |
| 19 | } |
| 20 | </style> |
Rushabh Mehta | b2269dd | 2016-03-23 18:28:50 +0530 | [diff] [blame] | 21 | {% endblock %} |
Kanchan Chauhan | b3fe6a4 | 2016-03-16 18:01:22 +0530 | [diff] [blame] | 22 | |
Kanchan Chauhan | b3fe6a4 | 2016-03-16 18:01:22 +0530 | [diff] [blame] | 23 | {% block page_content %} |
Saurabh | 80e4582 | 2022-11-21 17:42:53 +0530 | [diff] [blame] | 24 | <div class="web-list-item transaction-list-item"> |
| 25 | <div class="row align-items-center"> |
| 26 | <div class="col-sm-4 "><b>Status: {{ doc.status }}</b></div> |
| 27 | <div class="col-sm-4 "><b>Progress: {{ doc.percent_complete }}%</b></div> |
| 28 | <div class="col-sm-4 "><b>Hours Spent: {{ doc.actual_time | round }}</b></div> |
| 29 | </div> |
Jannat Patel | 5a42511 | 2021-07-01 17:17:34 +0530 | [diff] [blame] | 30 | </div> |
Rushabh Mehta | c20c536 | 2016-03-25 17:19:28 +0530 | [diff] [blame] | 31 | |
Jannat Patel | 5a42511 | 2021-07-01 17:17:34 +0530 | [diff] [blame] | 32 | {{ progress_bar(doc.percent_complete) }} |
Kanchan Chauhan | b3fe6a4 | 2016-03-16 18:01:22 +0530 | [diff] [blame] | 33 | |
Saurabh | 80e4582 | 2022-11-21 17:42:53 +0530 | [diff] [blame] | 34 | <hr> |
| 35 | |
Saurabh | 80e4582 | 2022-11-21 17:42:53 +0530 | [diff] [blame] | 36 | <div class="row align-items-center"> |
| 37 | <div class="col-sm-6 my-account-header"> <h4>Tasks</h4></div> |
| 38 | <div class="col-sm-6 text-right"> |
| 39 | <a class="btn btn-secondary btn-light btn-sm" href='/tasks/new?project={{ doc.project_name }}'>{{ _("New task") }}</a> |
Jannat Patel | 5a42511 | 2021-07-01 17:17:34 +0530 | [diff] [blame] | 40 | </div> |
Saurabh | 80e4582 | 2022-11-21 17:42:53 +0530 | [diff] [blame] | 41 | </div> |
Saurabh | 5d9960a | 2022-11-21 19:37:57 +0530 | [diff] [blame] | 42 | {% if doc.tasks %} |
Saurabh | 80e4582 | 2022-11-21 17:42:53 +0530 | [diff] [blame] | 43 | <div class="website-list"> |
| 44 | <div class="result"> |
| 45 | <div class="web-list-item transaction-list-item"> |
| 46 | <div class="row align-items-center"> |
| 47 | <div class="col-sm-4"><b>Tasks</b></div> |
| 48 | <div class="col-sm-2"><b>Status</b></div> |
| 49 | <div class="col-sm-2"><b>End Date</b></div> |
| 50 | <div class="col-sm-2"><b>Assignment</b></div> |
| 51 | <div class="col-sm-2"><b>Modified On</b></div> |
| 52 | </div> |
| 53 | </div> |
| 54 | {% include "erpnext/templates/includes/projects/project_tasks.html" %} |
| 55 | </div> |
| 56 | </div> |
Jannat Patel | 5a42511 | 2021-07-01 17:17:34 +0530 | [diff] [blame] | 57 | {% else %} |
Saurabh | 5d9960a | 2022-11-21 19:37:57 +0530 | [diff] [blame] | 58 | {{ empty_state('Task')}} |
Jannat Patel | 5a42511 | 2021-07-01 17:17:34 +0530 | [diff] [blame] | 59 | {% endif %} |
Rushabh Mehta | b2269dd | 2016-03-23 18:28:50 +0530 | [diff] [blame] | 60 | |
Saurabh | 80e4582 | 2022-11-21 17:42:53 +0530 | [diff] [blame] | 61 | <h4 class="my-account-header">Timesheets</h4> |
Saurabh | 5d9960a | 2022-11-21 19:37:57 +0530 | [diff] [blame] | 62 | {% if doc.timesheets %} |
Jannat Patel | 5a42511 | 2021-07-01 17:17:34 +0530 | [diff] [blame] | 63 | <div class="website-list"> |
| 64 | <div class="result"> |
| 65 | <div class="web-list-item transaction-list-item"> |
Saurabh | 80e4582 | 2022-11-21 17:42:53 +0530 | [diff] [blame] | 66 | <div class="row align-items-center"> |
| 67 | <div class="col-xs-2"><b>Timesheet</b></div> |
| 68 | <div class="col-xs-2"><b>Status</b></div> |
| 69 | <div class="col-xs-2"><b>From</b></div> |
| 70 | <div class="col-xs-2"><b>To</b></div> |
| 71 | <div class="col-xs-2"><b>Modified By</b></div> |
| 72 | <div class="col-xs-2"><b>Modified On</b></div> |
Jannat Patel | 5a42511 | 2021-07-01 17:17:34 +0530 | [diff] [blame] | 73 | </div> |
| 74 | </div> |
Saurabh | 80e4582 | 2022-11-21 17:42:53 +0530 | [diff] [blame] | 75 | {% include "erpnext/templates/includes/projects/project_timesheets.html" %} |
Jannat Patel | 5a42511 | 2021-07-01 17:17:34 +0530 | [diff] [blame] | 76 | </div> |
| 77 | </div> |
| 78 | {% else %} |
Saurabh | 5d9960a | 2022-11-21 19:37:57 +0530 | [diff] [blame] | 79 | {{ empty_state('Timesheet')}} |
Jannat Patel | 5a42511 | 2021-07-01 17:17:34 +0530 | [diff] [blame] | 80 | {% endif %} |
Rushabh Mehta | b2269dd | 2016-03-23 18:28:50 +0530 | [diff] [blame] | 81 | |
Jannat Patel | 5a42511 | 2021-07-01 17:17:34 +0530 | [diff] [blame] | 82 | {% if doc.attachments %} |
| 83 | <div class='padding'></div> |
Rushabh Mehta | b2269dd | 2016-03-23 18:28:50 +0530 | [diff] [blame] | 84 | |
Jannat Patel | 5a42511 | 2021-07-01 17:17:34 +0530 | [diff] [blame] | 85 | <h4>{{ _("Attachments") }}</h4> |
| 86 | <div class="project-attachments"> |
| 87 | {% for attachment in doc.attachments %} |
| 88 | <div class="attachment"> |
| 89 | <a class="no-decoration attachment-link" href="{{ attachment.file_url }}" target="blank"> |
| 90 | <div class="row"> |
| 91 | <div class="col-xs-9"> |
| 92 | <span class="indicator red file-name"> |
| 93 | {{ attachment.file_name }}</span> |
| 94 | </div> |
| 95 | <div class="col-xs-3"> |
| 96 | <span class="pull-right file-size">{{ attachment.file_size }}</span> |
| 97 | </div> |
| 98 | </div> |
| 99 | </a> |
| 100 | </div> |
| 101 | {% endfor %} |
| 102 | </div> |
| 103 | {% endif %} |
JodeQ | 10dfd4a | 2018-09-10 13:40:43 +0200 | [diff] [blame] | 104 | |
Kanchan Chauhan | b3fe6a4 | 2016-03-16 18:01:22 +0530 | [diff] [blame] | 105 | </div> |
| 106 | |
| 107 | <script> |
Saurabh | 80e4582 | 2022-11-21 17:42:53 +0530 | [diff] [blame] | 108 | { % include "frappe/public/js/frappe/provide.js" % } |
| 109 | { % include "frappe/public/js/frappe/form/formatters.js" % } |
| 110 | </script> |
Kanchan Chauhan | b3fe6a4 | 2016-03-16 18:01:22 +0530 | [diff] [blame] | 111 | |
Kanchan Chauhan | e14389e | 2016-03-23 14:14:38 +0530 | [diff] [blame] | 112 | {% endblock %} |
Jannat Patel | 5a42511 | 2021-07-01 17:17:34 +0530 | [diff] [blame] | 113 | |
| 114 | {% macro progress_bar(percent_complete) %} |
| 115 | {% if percent_complete %} |
Saurabh | 80e4582 | 2022-11-21 17:42:53 +0530 | [diff] [blame] | 116 | <span class="small py-2">Project Progress:</span> |
| 117 | <div class="progress progress-hg" style="height: 15px;"> |
| 118 | <div |
| 119 | class="progress-bar progress-bar-{{ 'warning' if percent_complete|round < 100 else 'success' }} active"\ |
| 120 | role="progressbar" aria-valuenow="{{ percent_complete|round|int }}" aria-valuemin="0"\ |
| 121 | aria-valuemax="100" style="width:{{ percent_complete|round|int }}%;"> |
| 122 | </div> |
Jannat Patel | 5a42511 | 2021-07-01 17:17:34 +0530 | [diff] [blame] | 123 | </div> |
Jannat Patel | 5a42511 | 2021-07-01 17:17:34 +0530 | [diff] [blame] | 124 | {% endif %} |
| 125 | {% endmacro %} |
Saurabh | 5d9960a | 2022-11-21 19:37:57 +0530 | [diff] [blame] | 126 | |
| 127 | |
| 128 | {% macro empty_state(section_name) %} |
| 129 | <div class="frappe-list align-items-center"> |
| 130 | <div class=" text-muted flex justify-center align-center" style=""> |
| 131 | <div class=" text-muted flex text-center"> |
| 132 | <div class="msg-box no-border"> |
| 133 | <div> |
| 134 | <img src="/assets/frappe/images/ui-states/list-empty-state.svg" alt="Generic Empty State" class="null-state"> |
| 135 | </div> |
| 136 | <p>You haven't created a {{ section_name }} yet</p> |
| 137 | </div> |
| 138 | </div> |
| 139 | </div> |
| 140 | </div> |
| 141 | {% endmacro %} |