{% extends 'base.html' %} {% load i18n static humanize %} {% block title %}{{ _('Leads')|capfirst }}{% endblock title %} {% block content %}

{{ _("Leads")|capfirst }}

{% include "crm/leads/partials/update_action.html" %}
{% if perms.inventory.add_lead %}
{{ _("Add Lead") }}
{% endif %}
{% include 'partials/search_box.html' %}
{% if page_obj.object_list %}
{% for lead in leads %} {% comment %} {% endcomment %} {% endfor %} {% endif %}
{{ _("Lead Name")|capfirst }}
{{ _("Car")|capfirst }}
{{ _("email")|capfirst }}
{{ _("Phone Number") }}
{{ _("Schedule") }}
{{ _("Action")|capfirst }}
{{ _("Assigned To")|capfirst }}
{{ _("Opportunity")|capfirst }}
{{ _("Action") }}
{{lead.full_name|capfirst}}

{% if lead.status == "new" %} {{_("New")}} {% elif lead.status == "pending" %} {{_("Pending")}} {% elif lead.status == "in_progress" %} {{_("In Progress")}} {% elif lead.status == "qualified" %} {{_("Qualified")}} {% elif lead.status == "contacted" %} {{_("Contacted")}} {% elif lead.status == "canceled" %} {{_("Canceled")}} {% endif %}
{{ lead.id_car_make.get_local_name }} - {{ lead.id_car_model.get_local_name }} {{ lead.year }} {{ lead.email }} {{ lead.phone_number }} {% if request.user.staffmember.staff %}

{% for schedule in lead.get_latest_schedules %} {% endfor %}
{% if schedule.scheduled_type == "call" %} {{ schedule.scheduled_at|naturaltime|capfirst }} {% elif schedule.scheduled_type == "meeting" %} {{ schedule.scheduled_at|naturaltime|capfirst }} {% elif schedule.scheduled_type == "email" %} {{ schedule.scheduled_at|naturaltime|capfirst }} {% endif %}
View All ...
{% endif %}
{{ lead.get_status|upper }} {{ lead.staff|upper }} {% if lead.opportunity.stage == "prospect" %} {{ lead.opportunity.stage|upper }} {% elif lead.opportunity.stage == "proposal" %} {{ lead.opportunity.stage|upper }} {% elif lead.opportunity.stage == "negotiation" %} {{ lead.opportunity.stage|upper }} {% elif lead.opportunity.stage == "closed_won" %} {{ lead.opportunity.stage|upper }} {% elif lead.opportunity.stage == "closed_lost" %} {{ lead.opportunity.stage|upper }} {% endif %} {% if lead.opportunity %} Opportunity {{ lead.opportunity.lead}} {% endif %} {% if user == lead.staff.user or request.is_dealer %}
{% endif %}
{% if is_paginated %} {% include 'partials/pagination.html' %} {% endif %}
{% endblock %} {% block customJS %} {% endblock customJS %}