@ -2,13 +2,13 @@
< p id = "chatRoomId" class = "hidden" > {{chat_room.id}}< / p >
< div class = "w-full h-full md:h-[ 550px] bg-white rounded-b-none md:rounded-b-md flex flex-col justify-end">
< div class = "w-full h-full md:h-[ 450px] lg:h-[ 550px] bg-white rounded-b-none md:rounded-b-md flex flex-col justify-end">
< div class = "overflow-y-auto flex flex-col gap-5 px-5 pt-3" id = "conversation" >
<!-- ROBOT -->
< div class = "w-full flex items-end gap-2" >
< div >
< div
class="w-[30px] h-[30 px] rounded-full shadow-md text-white flex justify-center items-center bg-osiblue">
class="w-[25px] h-[25 px] rounded-full shadow-md text-white flex justify-center items-center bg-osiblue">
< svg xmlns = "http://www.w3.org/2000/svg" viewBox = "0 0 24 24" class = "w-4" color = "#000000" fill = "none" >
< path d = "M4 15.5C2.89543 15.5 2 14.6046 2 13.5C2 12.3954 2.89543 11.5 4 11.5" stroke = "white"
stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
@ -31,23 +31,22 @@
< / div >
< / div >
< div
class="w-full bg-gray-50 px-3 py-2 rounded-r-3xl rounded-tl-3xl text-secondosiblue text-sm leading-7 bg-opacity-50 shadow-md border border-gray-100">
class="max-w-[80%] bg-gray-50 px-4 py-3 rounded-r-3xl rounded-tl-3xl text-secondosiblue text-sm leading-7 bg-opacity-50 shadow-md border border-gray-100">
< p > {% if chat_room.chatroomguest.name %}Hello {{chat_room.chatroomguest.name}},{% else %}Hello,{% endif %} thank you for contacting us. Please bear with us while we
connect you with the next available agent as soon as possible.< / p >
< / div >
< / div >
<!-- USER MESSAGES -->
< div id = "messages" class = "w-full flex flex-col gap- 3 ">
< div id = "messages" class = "w-full flex flex-col gap- 5 pb-1 ">
{% for message in chat_room_messages %}
<!-- STAFF MESSAGE -->
{% if message.member %}
{% if not message.chatmessageattachment %}
< div class = "w-full flex items-end justify-start gap-2" >
< div >
< div
class="w-[30px] h-[30 px] rounded-full shadow-md text-white flex justify-center items-center bg-osiblue uppercase text-xs">
class="w-[25px] h-[25 px] rounded-full shadow-md text-white flex justify-center items-center bg-osiblue uppercase text-xs">
{% if message.member.staffprofile.image %}
< img class = "w-full h-full rounded-full"
src="http://192.168.1.106:8000{{message.member.staffprofile.image.url}}">
@ -56,59 +55,67 @@
{% endif %}
< / div >
< / div >
{% if not message.chatmessageattachment %}
< div
class="w-fit bg-gray-50 px-3 py-2 rounded-r-3xl rounded-tl-3xl text-secondosiblue text-sm leading-6 bg-opacity-50 shadow-md border border-gray-100">
< p class = "break-all" > {{message.content}}< / p >
< / div >
class="max-w-[80%] bg-gray-50 px-4 py-3 rounded-r-3xl rounded-tl-3xl text-secondosiblue text-sm leading-6 bg-opacity-50 shadow-md border border-gray-100">
< p style = "white-space: pre-line; overflow-wrap: anywhere;" > {{message.content}}< / p >
< / div >
{% else %}
{% if message.chatmessageattachment.is_image %}
< div class = "'w-fit p-4 rounded-l-3xl rounded-tr-3xl text-white shadow-md text-sm leading-6 bg-opacity-70 bg-osiblue" >
< img src = "{{message.chatmessageattachment.attachment}}" >
< div
class="max-w-[80%] bg-gray-50 p-4 rounded-r-3xl rounded-tl-3xl text-secondosiblue text-sm leading-6 bg-opacity-50 shadow-md border border-gray-100">
< img src = "http://192.168.1.106:8000/{{message.chatmessageattachment.attachment}}" class = "rounded-md" >
< / div >
{% else %}
< div class = "w-full p-4 rounded-l-3xl rounded-tr-3xl text-white shadow-md text-sm leading-6 bg-opacity-70 bg-osiblue" >
< div
class="max-w-[80%] bg-gray-50 p-4 rounded-r-3xl rounded-tl-3xl text-secondosiblue text-sm leading-6 bg-opacity-50 shadow-md border border-gray-100">
< div class = "w-full flex items-center gap-1" >
< div >
< svg xmlns = "http://www.w3.org/2000/svg" viewBox = "0 0 24 24" class = "w- 7 text-whit e notFilledSvg">
< svg xmlns = "http://www.w3.org/2000/svg" viewBox = "0 0 24 24" class = "w- 5 text-secondosiblu e notFilledSvg">
< path d = "M8 7L16 7" stroke = "currentColor" stroke-width = "1.5" stroke-linecap = "round" stroke-linejoin = "round" > < / path >
< path d = "M8 11L12 11" stroke = "currentColor" stroke-width = "1.5" stroke-linecap = "round" stroke-linejoin = "round" > < / path >
< path d = "M13 21.5V21C13 18.1716 13 16.7574 13.8787 15.8787C14.7574 15 16.1716 15 19 15H19.5M20 13.3431V10C20 6.22876 20 4.34315 18.8284 3.17157C17.6569 2 15.7712 2 12 2C8.22877 2 6.34315 2 5.17157 3.17157C4 4.34314 4 6.22876 4 10L4 14.5442C4 17.7892 4 19.4117 4.88607 20.5107C5.06508 20.7327 5.26731 20.9349 5.48933 21.1139C6.58831 22 8.21082 22 11.4558 22C12.1614 22 12.5141 22 12.8372 21.886C12.9044 21.8623 12.9702 21.835 13.0345 21.8043C13.3436 21.6564 13.593 21.407 14.0919 20.9081L18.8284 16.1716C19.4065 15.5935 19.6955 15.3045 19.8478 14.9369C20 14.5694 20 14.1606 20 13.3431Z" stroke = "currentColor" stroke-width = "1.5" stroke-linecap = "round" stroke-linejoin = "round" > < / path >
< / svg >
< / div >
< div class = "flex flex-col" >
< span > {{message.chatmessageattachment.file_name}}< / span >
< span class = "text-xs" > {{message.chatmessageattachment.file_name}}< / span >
< / div >
< / div >
< / div >
{% endif %}
{% endif %}
< / div >
<!-- GUEST MESSAGE -->
{% else %}
{% if not message.chatmessageattachment %}
< div class = "w-full flex justify-end" >
< div
class="w-fit px-3 py-2 rounded-l-3xl rounded-tr-3xl text-white shadow-md text-sm leading-6 bg-opacity-70 bg-osiblue">
< p class= "break-all "> {{message.content}}< / p >
class="max-w-[80%] px-4 py-3 rounded-l-3xl rounded-tr-3xl text-white shadow-md text-sm leading-6 bg-opacity-70 bg-osiblue">
< p style= "white-space: pre-line; overflow-wrap: anywhere; "> {{message.content}}< / p >
< / div >
< / div >
{% else %}
{% if message.chatmessageattachment.is_image %}
< div class = "'w-fit p-4 rounded-l-3xl rounded-tr-3xl text-white shadow-md text-sm leading-6 bg-opacity-70 bg-osiblue" >
< img src = "http://192.168.1.106:8000/{{message.chatmessageattachment.attachment}}" >
< div class = "w-full flex justify-end" >
< div class = "max-w-[80%] p-4 rounded-l-3xl rounded-tr-3xl text-white shadow-md text-sm leading-6 bg-opacity-70 bg-osiblue" >
< img src = "http://192.168.1.106:8000/{{message.chatmessageattachment.attachment}}" class = "rounded-md" >
< / div >
< / div >
{% else %}
< div class = "w-full p-4 rounded-l-3xl rounded-tr-3xl text-white shadow-md text-sm leading-6 bg-opacity-70 bg-osiblue" >
< div class = "w-full flex justify-end" >
< div class = "max-w-[80%] p-4 rounded-l-3xl rounded-tr-3xl text-white shadow-md text-sm leading-6 bg-opacity-70 bg-osiblue" >
< div class = "w-full flex items-center gap-1" >
< div >
< svg xmlns = "http://www.w3.org/2000/svg" viewBox = "0 0 24 24" class = "w- 7 text-white notFilledSvg">
< svg xmlns = "http://www.w3.org/2000/svg" viewBox = "0 0 24 24" class = "w- 5 text-white notFilledSvg">
< path d = "M8 7L16 7" stroke = "currentColor" stroke-width = "1.5" stroke-linecap = "round" stroke-linejoin = "round" > < / path >
< path d = "M8 11L12 11" stroke = "currentColor" stroke-width = "1.5" stroke-linecap = "round" stroke-linejoin = "round" > < / path >
< path d = "M13 21.5V21C13 18.1716 13 16.7574 13.8787 15.8787C14.7574 15 16.1716 15 19 15H19.5M20 13.3431V10C20 6.22876 20 4.34315 18.8284 3.17157C17.6569 2 15.7712 2 12 2C8.22877 2 6.34315 2 5.17157 3.17157C4 4.34314 4 6.22876 4 10L4 14.5442C4 17.7892 4 19.4117 4.88607 20.5107C5.06508 20.7327 5.26731 20.9349 5.48933 21.1139C6.58831 22 8.21082 22 11.4558 22C12.1614 22 12.5141 22 12.8372 21.886C12.9044 21.8623 12.9702 21.835 13.0345 21.8043C13.3436 21.6564 13.593 21.407 14.0919 20.9081L18.8284 16.1716C19.4065 15.5935 19.6955 15.3045 19.8478 14.9369C20 14.5694 20 14.1606 20 13.3431Z" stroke = "currentColor" stroke-width = "1.5" stroke-linecap = "round" stroke-linejoin = "round" > < / path >
< / svg >
< / div >
< div class = "flex flex-col" >
< span > {{message.chatmessageattachment.file_name}}< / span >
< span class = "text-xs" > {{message.chatmessageattachment.file_name}}< / span >
< / div >
< / div >
< / div >
< / div >
@ -117,11 +124,10 @@
{% endif %}
{% endfor %}
< / div >
< audio id = "notification-sound" src = "http://192.168.1.106:8000/static/notifications/osichat-notification.mp3" preload = "auto" > < / audio >
< audio id = "notification-sound" src = "http://192.168.1.106:8000/static/notifications/osichat-notification.mp3" preload = "auto" > < / audio >
< div id = "typing" >
< / div >
< div id = "typing" class = "hidden" > < / div >
< / div >