{% extends 'base.html' %} {% load i18n static humanize %} {% load crispy_forms_tags %} {% block customCSS %} {% endblock customCSS %} {% block content %}
{% include "crm/leads/partials/update_action.html" %}

{{ _("Lead Details")}}

{{ _("Lead Details")}}

{{ lead.first_name }} {{ lead.last_name }}

{% if lead.staff %}

{{ _("Assigned to")}}: {{ lead.staff }}

{% else %}

{{ _("Not Assigned")}}

{% endif %}
{{ _("Status")}} {% if lead.status == "new" %} {{_("New")}} {% elif lead.status == "contacted" %} {{_("Contacted")}} {% elif lead.status == "qualified" %} {{_("Qualified")}} {% elif lead.status == "unqualified" %} {{_("Unqualified")}} {% elif lead.status == "converted" %} {{_("Converted")}} {% endif %}
{{ _("Car Requested") }}
Car Make Logo

{{ lead.id_car_make.get_local_name }} - {{ lead.id_car_model.get_local_name }} {{ lead.year }}

{{ _("Related Records") }}
{{ _("Opportunity") }}
{% if lead.opportunity %} {{ lead.opportunity }} {% else %}

{{ _("No Opportunity") }}

{% endif %}
{{ _("Email") }}
{{ lead.email }}
{{ _("Phone") }}
{{ lead.phone_number}}
{{ _("Created")}}
{{ lead.created|naturalday|capfirst }}
{{ _("Lead Source")}}
{% if lead.source == 'REFERRALS' %} {% elif lead.source == 'WHATSAPP' %} {% elif lead.source == 'SHOWROOM' %} {% elif lead.source == 'TIKTOK' %} {% elif lead.source == 'INSTAGRAM' %} {% elif lead.source == 'X' %} {% elif lead.source == 'FACEBOOK' %} {% elif lead.source == 'MOTORY' %} {% elif lead.source == 'INFLUENCERS' %} {% elif lead.source == 'YOUTUBE' %} {% elif lead.source == 'CAMPAIGN' %} {% endif %} {{ lead.source|upper }}
{{ _("Lead Channel")}}
{{ lead.channel|upper }}
{{ _("Address") }}
{{ lead.address}}
{{lead.status|capfirst}}
  {% trans "Current Stage" %}
{{lead.next_action|capfirst}}
  {% trans "Next Action" %} :  {{lead.next_action_date|naturalday|capfirst}}

{{ _("Activities") }} ({{ activities.count}})

{% if perms.inventory.change_lead%} {% endif %}
{% for activity in activities %}
{% if activity.activity_type == "call" %} {% elif activity.activity_type == "note" %} {% elif activity.activity_type == "task" %} {% elif activity.activity_type == "email" %} {% elif activity.activity_type == "visit" %} {% elif activity.activity_type == "whatsapp" %} {% endif %}
{% if forloop.last %} {% else %} {% endif %}
{{ activity.activity_type|capfirst }}

{{ activity.created|naturalday|capfirst }}

{{ _("created by") }} {{ activity.created_by }}

{{ activity.notes }}

{% endfor %}

{{ _("Opportunities") }} ({{ lead.get_opportunities.count}})

{% if perms.inventory.add_opportunity%} {{ _("Add Opportunity") }} {% endif%}
{% for opportunity in lead.get_opportunities %} {% endfor %}
{{ _("Car") }} {{ _("Probability")}} {{ _("Priority")}}
{{opportunity.car}} {{opportunity.probability}} {{opportunity.priority|capfirst}} View

{{ _("Notes") }}

{% if perms.inventory.change_lead %} {% endif %}
{% for note in notes %} {% endfor %}
{{ _("Note") }} {{ _("Created On")}} {{ _("Last Updated")}}
{{note.note}} {{ note.created|naturalday|capfirst }} {{ note.updated|naturalday|capfirst }} {% if note.created_by == request.user %} {{ _("Update") }} {% endif %}

{{ _("Emails") }}

{% if perms.inventory.change_lead%} {% endif %}
{% for email in emails.sent %} {% endfor %}
Subject Sent by Date Action Status
{{email.subject}}
{{email.to_email}}
{{email.from_email}} {{email.created|naturalday}} Call sent
{% for email in emails.draft %} {% endfor %}
Subject Sent by Date Action Status
{{email.subject}}
{{email.to_email}}
{{email.from_email}} {{email.created}} Send draft
{% comment %} {% endcomment %}

{{ _("Tasks") }}

{% if perms.inventory.change_lead%} {% comment %} {% endcomment %} {% endif %}
{% for task in schedules %} {% include "partials/task.html" %} {% endfor %}
Name Note Due Date Completed
{% include 'modal/delete_modal.html' %} {% comment %} {% endcomment %} {% include "components/task_modal.html" with content_type="lead" slug=lead.slug %} {% include "components/note_modal.html" with content_type="lead" slug=lead.slug %} {% include "components/schedule_modal.html" with content_type="lead" slug=lead.slug %} {% endblock content %} {% block customJS %} {% endblock customJS %}