chat_container.html 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. <div class="chat-container" id="chat"
  2. hx-on::after-swap="const content = this.querySelector('#chatContent'); if (content) content.scrollTop = content.scrollHeight;">
  3. <div class="header">
  4. <div class="header-left">
  5. <div class="avatar" style="background-color: #5468FF;">
  6. <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none"
  7. stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  8. <path
  9. d="M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z">
  10. </path>
  11. </svg>
  12. </div>
  13. <div class="course-info">
  14. <div class="course-title">{{ forderungen_details[0].Kunde_Text }} / {{ forderungen_details[0].Beleg_Nr }}</div>
  15. <div class="course-participants">4 Mitarbeiter involviert</div>
  16. </div>
  17. </div>
  18. <div class="header-actions">
  19. <button class="icon-button tooltip" data-tooltip="Search">
  20. <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none"
  21. stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  22. <circle cx="11" cy="11" r="8"></circle>
  23. <line x1="21" y1="21" x2="16.65" y2="16.65"></line>
  24. </svg>
  25. </button>
  26. <button class="icon-button tooltip" data-tooltip="Resource Library">
  27. <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none"
  28. stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  29. <path d="M4 19.5A2.5 2.5 0 0 1 6.5 17H20"></path>
  30. <path d="M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z"></path>
  31. </svg>
  32. </button>
  33. <button class="icon-button tooltip" data-tooltip="Settings">
  34. <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none"
  35. stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  36. <circle cx="12" cy="12" r="3"></circle>
  37. <path
  38. d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z">
  39. </path>
  40. </svg>
  41. </button>
  42. </div>
  43. </div>
  44. {% include 'forderungen/details/details_kommentare.html' %}
  45. <div class="input-area">
  46. <div class="toolbar">
  47. <form id="comment-form" method="post" action="{{ detail_url }}" hx-post="{{ detail_url }}"
  48. hx-target="#comments-history" hx-swap="outerHTML" hx-push-url="false"
  49. hx-sync="#comments-history:replace"
  50. hx-disabled-elt="#comment-form input, #comment-form button, #comments-history button"
  51. hx-on::after-request="if (event.detail.successful) this.querySelector('[name=Kommentar]').value = ''">
  52. <input type="hidden" name="_csrf" value="{{ request.state.principal.csrf }}" />
  53. <button type="button" class="btn btn-primary">
  54. <i class="icon icon-lg cil-paperclip"></i>
  55. </button>
  56. <input type="hidden" name="source" value="comments" />
  57. <input type="text" class="message-input" id="comment" name="Kommentar" placeholder="Kommentieren ..."
  58. autofocus="autofocus" />
  59. <button type="submit" class="btn btn-primary" aria-label="Kommentar speichern">
  60. <i class="icon icon-lg cil-chevron-right"></i>
  61. </button>
  62. </form>
  63. <div class="chat-input" style="display: none;">
  64. <div class="input-container">
  65. <div class="input-actions">
  66. <button class="btn input-btn" id="attachBtn" title="Attach file">
  67. <i class="icon icon-lg cil-paperclip"></i>
  68. </button>
  69. </div>
  70. <input type="text" id="messageInput" placeholder="Type a message, use # for tasks, @ for people...">
  71. </div>
  72. <button class="send-btn" id="sendBtn">
  73. <i class="icon icon-lg cil-chevron-right"></i>
  74. </button>
  75. <!-- File Upload Preview -->
  76. <div class="file-preview" id="filePreview" style="display:none;">
  77. <div class="file-preview-header">
  78. <span>File to upload</span>
  79. <button class="file-preview-close" onclick="closeFilePreview()">
  80. <i class="fas fa-times"></i>
  81. </button>
  82. </div>
  83. <div class="file-preview-content">
  84. <div class="file-preview-icon">
  85. <i class="fas fa-file"></i>
  86. </div>
  87. <div class="file-preview-details">
  88. <div class="file-preview-name">document.pdf</div>
  89. <div class="file-preview-size">3.2 MB</div>
  90. </div>
  91. </div>
  92. </div>
  93. </div>
  94. </div>
  95. </div>
  96. </div>
  97. <script>
  98. window.setTimeout(function() {
  99. const content = document.getElementById("chatContent");
  100. if (content) content.scrollTop = content.scrollHeight;
  101. }, 1000);
  102. </script>