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

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

{% if perms.inventory.add_lead %}
{{ _("Add Lead") }}
{% endif %}
{% include 'partials/search_box.html' %}
{% if page_obj.object_list %}
{% for lead in leads %} {% endfor %} {% endif %}
{{ _("Lead Name")|capfirst }}
{{ _("Car")|capfirst }}
{{ _("email")|capfirst }}
{{ _("Phone Number") }}
{{ _("Schedule") }}
{{ _("Assigned To")|capfirst }}
{{ _("Source")|capfirst }}
{{ _("Channel")|capfirst }}
{{ _("Stage")|capfirst }}
{{ _("Is Opportunity")|capfirst }}
{{ _("Create date") }}
{{lead.full_name}}

{% 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 }}

{% for schedule in lead.get_latest_schedules %} {% endfor %}
{% if schedule.scheduled_type == "Call" %} {{ schedule.scheduled_at }} {% elif schedule.scheduled_type == "Meeting" %} {{ schedule.scheduled_at }} {% elif schedule.scheduled_type == "Email" %} {{ schedule.scheduled_at }} {% endif %}
View All ...
{{ lead.staff|upper }} {{ lead.source|upper }} {{ lead.channel|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 %} View Details {% else %} {{ _("No") }} {% endif %} {% if user == lead.staff.user or request.is_dealer %}
{% endif %}
{% if is_paginated %} {% endif %}
{% endblock %}