emile 10 months ago
parent d31f11f310
commit 53a587ff69

@ -120,7 +120,7 @@ class TicketRoomConsumer(WebsocketConsumer):
def typing_handler(self, event):
context = {
'user': self.scope['user']
'typing_user': self.scope['user']
}
html = render_to_string("details_templates/partials/typing-message.html", context=context)
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>
<div class="w-[35px] s:w-[60px] h-[35px] s:h-[60px] rounded-full shadow-md border border-gray-100">
{% if user.customerprofile %}
{% if user.customerprofile.image %}
<img src="{{user.customerprofile.image.url}}"
{% if typing_user.customerprofile %}
{% if typing_user.customerprofile.image %}
<img src="{{typing_user.customerprofile.image.url}}"
class="w-full h-full rounded-full object-cover">
{% else %}
<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">
{{ user.first_name.0 }}{{ user.last_name.0 }}
{{ typing_user.first_name.0 }}{{ typing_user.last_name.0 }}
</div>
{% endif %}
{% elif user.staffprofile %}
{% 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">
{% else %}
<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">
{{ user.first_name.0 }}{{ user.last_name.0 }}
{{ typing_user.first_name.0 }}{{ typing_user.last_name.0 }}
</div>
{% endif %}
{% endif %}
@ -28,6 +28,6 @@
<div class="w-full">
<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>
Loading…
Cancel
Save