From 5d9960ae5b5731063bde84b7c98737d6a9a70198 Mon Sep 17 00:00:00 2001 From: Saurabh Date: Mon, 21 Nov 2022 19:37:57 +0530 Subject: [PATCH] feat: handle empty state --- erpnext/templates/pages/projects.html | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/erpnext/templates/pages/projects.html b/erpnext/templates/pages/projects.html index cfe1cc8ff6..9fe4338477 100644 --- a/erpnext/templates/pages/projects.html +++ b/erpnext/templates/pages/projects.html @@ -33,13 +33,13 @@
- {% if doc.tasks %}
+ {% if doc.tasks %}
@@ -55,11 +55,11 @@
{% else %} -

{{ _("No Tasks") }}

+ {{ empty_state('Task')}} {% endif %} - {% if doc.timesheets %} + {% if doc.timesheets %}
@@ -76,7 +76,7 @@
{% else %} -

{{ _("No Timesheets") }}

+ {{ empty_state('Timesheet')}} {% endif %} {% if doc.attachments %} @@ -121,7 +121,21 @@ aria-valuemax="100" style="width:{{ percent_complete|round|int }}%;">
-{% else %} -
{% endif %} {% endmacro %} + + +{% macro empty_state(section_name) %} +
+
+
+
+
+ Generic Empty State +
+

You haven't created a {{ section_name }} yet

+
+
+
+
+{% endmacro %} \ No newline at end of file