-
Contacts - {% if show_pageitems %} {% show_pageitems %}{% else %} {{contact_obj_list|length}}{% endif %}
-
-
-
-
+
Contacts - {% if show_pageitems %} {% show_pageitems %}{% else %}
+ {{contact_obj_list|length}}{% endif %}
+
+
+
+
@@ -77,12 +82,12 @@
{% if contact_obj_list|length > 0 %}
- | S.no |
- Name |
+ S.no |
+ Name |
Assigned To |
- City |
- State |
- Actions |
+ City |
+ State |
+ Actions |
{% endif %}
@@ -95,25 +100,26 @@
{% for contact in contact_obj_list %}
| {{ forloop.counter }} |
- {{contact.first_name}} {{contact.last_name}} |
+ {{contact.first_name}}
+ {{contact.last_name}} |
- {% with contact_users=contact.assigned_to.all %}
- {% for user in contact_users %}
- {% if user.profile_pic %}
+ {% with contact_users=contact.assigned_to.all %}
+ {% for user in contact_users %}
+ {% if user.profile_pic %}
{% thumbnail user.profile_pic "40x40" crop="center" as im %}
{% endthumbnail %}
- {% else %}
-
-
-
- {% endif %}
- {% empty %}
- None
- {% endfor %}
- {% endwith %}
+ {% else %}
+
+
+
+ {% endif %}
+ {% empty %}
+ None
+ {% endfor %}
+ {% endwith %}
|
{% if contact.address.city %}
@@ -130,10 +136,12 @@
{% endif %}
|
- {# View #}
-
+
+
{% if request.user == contact.created_by or request.user.role == "ADMIN" or request.user.is_superuser %}
-
+
{% endif %}
|
@@ -155,30 +163,140 @@
+
+
+{% for contact_record in contact_obj_list %}
+
+
+
+{% endfor %}
+
+
+
{%endblock%}
{% block js_block %}
diff --git a/invoices/templates/invoices_list.html b/invoices/templates/invoices_list.html
index 24babbcb..89f95506 100644
--- a/invoices/templates/invoices_list.html
+++ b/invoices/templates/invoices_list.html
@@ -143,7 +143,7 @@
{% for invoice in invoices %}
| {{ forloop.counter }} |
-
+ |
{{ invoice.invoice_title }} |
{{ invoice.invoice_number }} |
{{ invoice.email }} |
@@ -188,6 +188,8 @@
{% if request.user == invoice.created_by or request.user.role == "ADMIN" or request.user.is_superuser %}
+
{% if invoice.is_draft %}
@@ -330,6 +332,222 @@
+
+
+{% for invoice in invoices %}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {% if invoice.invoice_title %}
+
+ {% endif %}
+ {% if invoice.invoice_number %}
+
+ {% endif %}
+ {% if invoice.name %}
+
+ {% endif %}
+ {% if invoice.email %}
+
+ {% endif %}
+ {% if invoice.phone %}
+
+ {% endif %}
+
+
+ {% if invoice.quantity %}
+
+ {% endif %}
+ {% if invoice.rate %}
+
+ {% endif %}
+ {% if invoice.total_amount %}
+
+ {% endif %}
+ {% if invoice.currency %}
+
+ {% endif %}
+ {% if invoice.status %}
+
+ {% endif %}
+
+
+
+
+ {% if invoice.due_date %}
+
+ {% endif %}
+
+ {% if invoice.details %}
+
+ {% endif %}
+
+ {% if invoice.assigned_to.all %}
+
+ {% endif %}
+
+
+
+
+
+ Created by {{ invoice.created_by }} created on
+ {{ invoice.created_on }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+{% endfor %}
+
+
{% endblock %}
{% block js_block %}
diff --git a/leads/models.py b/leads/models.py
index e7aa7822..41109e9d 100644
--- a/leads/models.py
+++ b/leads/models.py
@@ -1,12 +1,13 @@
+import arrow
from django.db import models
from django.utils.translation import pgettext_lazy
from django.utils.translation import ugettext_lazy as _
-
-from common.models import User
-from common.utils import (LEAD_STATUS, LEAD_SOURCE,
- COUNTRIES, return_complete_address)
from phonenumber_field.modelfields import PhoneNumberField
+
from accounts.models import Tags
+from common.models import User
+from common.utils import (COUNTRIES, LEAD_SOURCE, LEAD_STATUS,
+ return_complete_address)
from contacts.models import Contact
@@ -66,3 +67,7 @@ class Lead(models.Model):
def get_complete_address(self):
return return_complete_address(self)
+
+ @property
+ def created_on_arrow(self):
+ return arrow.get(self.created_on).humanize()
diff --git a/leads/templates/leads.html b/leads/templates/leads.html
index 0342c213..38b07ec2 100644
--- a/leads/templates/leads.html
+++ b/leads/templates/leads.html
@@ -144,8 +144,13 @@
{% for lead in open_leads %}
| {{ forloop.counter }} |
-
- {{ lead.title }} |
+
+
+
+ {{ lead.title }}
+
+ |
{% if lead.created_by %}
{% if lead.created_by.profile_pic %}
@@ -198,8 +203,10 @@
{% endif %}
{% endwith %}
|
- {{ lead.created_on }} |
+ {{ lead.created_on_arrow }} |
+
{% if request.user == lead.created_by or request.user.role == "ADMIN" or request.user.is_superuser %}
@@ -256,7 +263,7 @@
{% for lead in close_leads %}
|
| {{ forloop.counter }} |
-
+ |
{{ lead.title }} |
{{ lead.source }} |
{{ lead.get_status_display }} |
@@ -293,6 +300,8 @@
{{ lead.created_on }} |
+
{% if request.user == lead.created_by %}
@@ -319,6 +328,334 @@
+
+
+
+{% for lead_record in open_leads %}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {% if lead_record.description %}
+
+ {% endif %}
+
+
+
+
+ Created by {{ lead_record.created_by }} created on {{ lead_record.created_on }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+{% endfor %}
+
+
+{% for lead_record in close_leads %}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {% if lead_record.description %}
+
+ {% endif %}
+
+
+
+
+ Created by {{ lead_record.created_by }} created on {{ lead_record.created_on }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+{% endfor %}
+
{% endblock %}
{% block js_block %}
diff --git a/leads/templates/view_leads.html b/leads/templates/view_leads.html
index 9b1c92c2..27fb33f3 100644
--- a/leads/templates/view_leads.html
+++ b/leads/templates/view_leads.html
@@ -36,8 +36,10 @@
diff --git a/marketing/forms.py b/marketing/forms.py
index fa71c06a..235dd637 100644
--- a/marketing/forms.py
+++ b/marketing/forms.py
@@ -11,7 +11,7 @@ from marketing.models import (
EmailTemplate, Campaign, Tag
)
-email_regex = '^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$'
+email_regex = '^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*(\.[a-zA-Z]{2,4})$'
def csv_doc_validate(document):
diff --git a/opportunity/templates/opportunity.html b/opportunity/templates/opportunity.html
index 33f17f1c..620d81dd 100644
--- a/opportunity/templates/opportunity.html
+++ b/opportunity/templates/opportunity.html
@@ -117,7 +117,7 @@
| S.No |
Name |
Assigned To |
- Tags |
+ Tags |
Account |
Stage |
@@ -135,7 +135,9 @@
{% for opportunity in opportunity_list %}
| {{ forloop.counter }} |
- {{ opportunity.name }} |
+ {{ opportunity.name }} |
{% with opportunity_users=opportunity.assigned_to.all %}
{% for user in opportunity_users %}
@@ -188,7 +190,7 @@
| {% if opportunity.lead_source %}{{ opportunity.lead_source }}{% else %}Not Specified{% endif %}
|
-
+
{% if request.user == opportunity.created_by or request.user.role == "ADMIN" or request.user.is_superuser %}
@@ -216,6 +218,170 @@
+
+
+{% for opportunity_record in opportunity_list %}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {% if opportunity_record.contacts.all %}
+
+ {% endif %}
+
+
+ {% if opportunity_record.amount %}
+
+ {% endif %}
+
+
+
+
+ {% if opportunity_record.stage %}
+
+ {% endif %}
+
+
+ {% if opportunity_record.lead_source %}
+
+ {% endif %}
+
+
+ {% if opportunity_record.probability %}
+
+ {% endif %}
+
+
+ {% if opportunity_record.closed_on %}
+
+ {% endif %}
+
+
+
+
+ {% if opportunity_record.description %}
+
+ {% endif %}
+
+ {% if opportunity_record.tags.all %}
+
+ {% endif %}
+
+
+
+ Created by {{ opportunity_record.created_by }} created on
+ {{ opportunity_record.created_on }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+{% endfor %}
{% endblock %}
{% block js_block %}
diff --git a/requirements.txt b/requirements.txt
index a128e721..46b7499f 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,4 +1,4 @@
-Django==2.2.2
+Django==2.2.3
boto==2.49.0
boto3==1.9.94
django-simple-pagination==1.3
@@ -25,3 +25,4 @@ vine==1.2.0
openpyxl==2.6.0
lxml==4.3.2
cssselect==1.0.3
+arrow==0.14.2
\ No newline at end of file
diff --git a/tasks/templates/tasks_tasks_list.html b/tasks/templates/tasks_tasks_list.html
index fab37e74..399dfa33 100644
--- a/tasks/templates/tasks_tasks_list.html
+++ b/tasks/templates/tasks_tasks_list.html
@@ -116,7 +116,7 @@
{% if task.due_date < today and task.status != 'completed' %}
|
| {{ forloop.counter }} |
- {% if task.title %}{% if task.title %}{{ task.title }}{% endif %}
|
@@ -165,6 +165,8 @@
|
{% if request.user == task.created_by or request.user.role == 'ADMIN' %}
+
| {{ forloop.counter }} |
- {% if task.title %}{{ task.title }}{% endif %}
+ | {% if task.title %}{{ task.title }}{% endif %}
|
{% if task.created_by %}
@@ -225,6 +227,8 @@
|
{% if request.user == task.created_by or request.user.role == 'ADMIN' %}
+
| {{ forloop.counter }} |
- {% if task.title %}{{ task.title }}{% endif %}
+ | {% if task.title %}{{ task.title }}{% endif %}
|
{% if task.created_by %}
@@ -284,6 +288,8 @@
|
{% if request.user == task.created_by or request.user.role == 'ADMIN' %}
+
+
+{% for task in tasks %}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {% if task.title %}
+
+ {% endif %}
+ {% if task.priority %}
+
+ {% endif %}
+ {% if task.status %}
+
+ {% endif %}
+
+
+ {% if task.due_date %}
+
+ {% endif %}
+ {% if task.account %}
+
+ {% endif %}
+ {% if task.contacts.all %}
+
+ {% endif %}
+
+
+ {% if task.assigned_to.all %}
+
+ {% endif %}
+
+
+
+ Created by {{ task.created_by }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+{% endfor %}
+
+
+
{% endblock %}
{% block js_block %}
diff --git a/teams/templates/teams.html b/teams/templates/teams.html
index ed51eb0b..d4df5acc 100644
--- a/teams/templates/teams.html
+++ b/teams/templates/teams.html
@@ -120,7 +120,7 @@
{% for team in teams %}
| {{ forloop.counter }} |
-
+ |
{{ team.name }} |
{{ team.description }} |
@@ -161,6 +161,8 @@
| {{ team.created_on|date:'d-m-Y' }} |
{% if request.user == team.created_by or request.user.role == 'ADMIN' or reques.user.is_superuser %}
+
+
+{% for team_obj in teams %}
+
+
+
+
+
+
+
+
+
+
+
+
+ Team
+
+
+
+
+ {% if team_obj.name %}
+
+ {% endif %}
+ {% if team_obj.description %}
+
+ {% endif %}
+
+ {% endfor %}
+ {% endwith %}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+{% endfor %}
+
{% endblock %}
{% block js_block %}
| |