{% include "_pwa_head.html" %}
{% include "_global_user_menu.html" %}
Call #{{ detail.call.id }}

{{ detail.call.customer_name }}

{{ detail.call.complaint_description }}

{{ detail.call.call_type }} {{ detail.call.status }} {% if detail.call.priority %} {{ detail.call.priority }} {% endif %} {% if detail.call.phone_call_url %} Call Customer {% endif %} Back to Dashboard
{% with messages = get_flashed_messages(with_categories=true) %} {% if messages %}
{% for category, message in messages %}
{{ message }}
{% endfor %}
{% endif %} {% endwith %}

Call Summary

Primary customer and issue details.

Phone

{{ detail.call.phone }}

Location

{{ ((detail.call.location + ', ') if detail.call.location else '') ~ detail.call.district }}

Entry Type

{{ detail.call.call_type }}

Complaint Type

{{ detail.call.complaint_type }}

Complaint

{{ detail.call.complaint_description or 'Not provided' }}
{% if detail.call.is_lead %}

Lead Source

{{ detail.call.lead_source or 'Not provided' }}
{% else %}

Service Type

{{ detail.call.preferred_service }}

Preferred Time

{{ detail.call.preferred_datetime_display }}
{% endif %}

Device Model

{{ detail.call.device_model or 'Not provided' }}

Assigned Branch

{{ detail.call.assigned_branch_name or 'Unassigned' }}

Assigned Engineer

{{ detail.call.assigned_engineer_name or 'Unassigned' }}

Created By

{{ detail.call.created_by or detail.call.source }}

Created / Updated

{{ detail.call.created_at_display }} / {{ detail.call.updated_at_display }}
{% if detail.closure %}

Closure Summary

Final status, billing, and payment details captured when the case was closed.

Final Status

{{ detail.closure.final_status }}
{% if detail.closure.completion_type %}

Completion Type

{{ detail.closure.completion_type }}
{% endif %} {% if detail.closure.close_reason %}

Reason

{{ detail.closure.close_reason }}
{% endif %} {% if detail.closure.narration %}

Narration

{{ detail.closure.narration }}
{% endif %} {% if detail.closure.engineer_name %}

Engineer

{{ detail.closure.engineer_name }}
{% endif %} {% if detail.closure.closed_by_brand %}

Closed By

{{ detail.closure.closed_by_brand }}
{% endif %} {% if detail.closure.payment_mode %}

Mode of Payment

{{ detail.closure.payment_mode }}
{% endif %} {% if detail.closure.payment_status %}

Payment Status

{{ detail.closure.payment_status }}
{% endif %} {% if detail.closure.completion_type == 'Paid Service' %}

Service Charges

{{ '%.2f'|format(detail.closure.service_charges|float) }}

Product Value

{{ '%.2f'|format(detail.closure.product_value|float) }}

Customer Price

{{ '%.2f'|format(detail.closure.customer_price|float) }}

Product Profit

{{ '%.2f'|format(detail.closure.product_profit|float) }}

Total Profit

{{ '%.2f'|format(detail.closure.total_profit|float) }}
{% endif %}

Closed At

{{ detail.closure.closed_at_display }}

Closed By User

{{ detail.closure.closed_by_user or 'System' }}
{% endif %}
{% if detail.attachments %}

Complaint Media

Complaint or device images/videos uploaded with the case. Media auto-deletes 30 days after Completed, Failed, or Cancelled.

{% for attachment in detail.attachments %} {% endfor %}
{% endif %}
{% if can_assign %}

Assign Call

{% if actor.role in ['admin', 'super_admin'] %}Admin and super admin can assign the case to a branch and optionally choose an engineer now or later.{% else %}Coordinator can fill engineer name when the case is already assigned to their branch and no engineer has been selected yet.{% endif %}

{% if actor.role in ['admin', 'super_admin'] %}
{% else %}
{% endif %}
{% if actor.role in ['admin', 'super_admin'] %}Leave engineer blank to assign this case only to the branch. Choose a name if you want to lock it to one engineer now.{% else %}Choose the engineer from the search results to complete the branch assignment.{% endif %}
{% elif assign_message %}

Assign Call

Engineer assignment permissions depend on role and current assignment state.

{{ assign_message }}
{% endif %}

Update Status

Allowed transitions are enforced at the API layer.

{% if can_update_status %}
{% else %}
{{ status_update_message }}
{% endif %}

Close Case

Finalise the case with the required reason, narration, or billing details.

{% if can_close %}
{% else %}
{{ close_message }}
{% endif %}

Reschedule

Moves the call to Rescheduled and stores the new preferred time.

{% if can_reschedule %}
{% else %}
{{ reschedule_message }}
{% endif %}

Add Note

Use notes for follow-up, spare requirements, and engineer remarks.

{% if can_add_note %}
{% else %}
{{ note_message }}
{% endif %}
{% if detail.closure and detail.closure.is_credit_pending %}

Credit Settlement

Mark this completed paid service as received once the customer clears the pending credit.

{% if can_update_credit_payment %}
{% else %}
{{ credit_payment_message }}
{% endif %}
{% endif %}

Notes

Latest call notes in reverse chronological order.

{% if detail.notes %} {% for note in detail.notes %}
{{ note.created_by or 'System' }}
{{ note.created_at_display }}

{{ note.note }}

{% endfor %} {% else %}

No notes yet

Add a note to capture the next action.

{% endif %}

Timeline

System activity, notifications, status changes, and notes.

{% if detail.timeline %} {% for item in detail.timeline %}
{{ item.title }}
{{ item.created_at_display }} ยท {{ item.done_by or 'System' }}

{{ item.description }}

{% endfor %} {% else %}

No activity yet

The timeline will populate as the call moves through the workflow.

{% endif %}