emile 10 months ago
parent d31f11f310
commit 53a587ff69

@ -120,7 +120,7 @@ class TicketRoomConsumer(WebsocketConsumer):
def typing_handler(self, event): def typing_handler(self, event):
context = { context = {
'user': self.scope['user'] 'typing_user': self.scope['user']
} }
html = render_to_string("details_templates/partials/typing-message.html", context=context) html = render_to_string("details_templates/partials/typing-message.html", context=context)
self.send(text_data=json.dumps({ self.send(text_data=json.dumps({

@ -1,24 +1,24 @@
<div id="typing-notification" class="flex items-center gap-3 mb-10 fade-in-up"> <div id="typing-notification" class="flex items-center gap-3 mb-10 fade-in-up">
<div> <div>
<div class="w-[35px] s:w-[60px] h-[35px] s:h-[60px] rounded-full shadow-md border border-gray-100"> <div class="w-[35px] s:w-[60px] h-[35px] s:h-[60px] rounded-full shadow-md border border-gray-100">
{% if user.customerprofile %} {% if typing_user.customerprofile %}
{% if user.customerprofile.image %} {% if typing_user.customerprofile.image %}
<img src="{{user.customerprofile.image.url}}" <img src="{{typing_user.customerprofile.image.url}}"
class="w-full h-full rounded-full object-cover"> class="w-full h-full rounded-full object-cover">
{% else %} {% else %}
<div <div
class="w-full h-full border border-secondosiblue bg-secondosiblue text-white uppercase rounded-full flex justify-center items-center p-1 shadow-md"> class="w-full h-full border border-secondosiblue bg-secondosiblue text-white uppercase rounded-full flex justify-center items-center p-1 shadow-md">
{{ user.first_name.0 }}{{ user.last_name.0 }} {{ typing_user.first_name.0 }}{{ typing_user.last_name.0 }}
</div> </div>
{% endif %} {% endif %}
{% elif user.staffprofile %} {% elif user.staffprofile %}
{% if user.staffprofile.image %} {% if user.staffprofile.image %}
<img src="{{user.staffprofile.image.url}}" <img src="{{typing_user.staffprofile.image.url}}"
class="w-full h-full rounded-full object-cover"> class="w-full h-full rounded-full object-cover">
{% else %} {% else %}
<div <div
class="w-full h-full border border-osiblue bg-osiblue text-white uppercase rounded-full flex justify-center items-center p-1 shadow-md"> class="w-full h-full border border-osiblue bg-osiblue text-white uppercase rounded-full flex justify-center items-center p-1 shadow-md">
{{ user.first_name.0 }}{{ user.last_name.0 }} {{ typing_user.first_name.0 }}{{ typing_user.last_name.0 }}
</div> </div>
{% endif %} {% endif %}
{% endif %} {% endif %}
@ -28,6 +28,6 @@
<div class="w-full"> <div class="w-full">
<p class="text-secondosiblue font-light text-sm s:text-base"> <p class="text-secondosiblue font-light text-sm s:text-base">
<span class="font-semibold">{{user.first_name}}</span> is typing... </p> <span class="font-semibold">{{typing_user.first_name}}</span> is typing... </p>
</div> </div>
</div> </div>
Loading…
Cancel
Save