Redmind commited on
Commit
47aae9f
·
verified ·
1 Parent(s): e80faca

Update templates/knowledgebase.html

Browse files
Files changed (1) hide show
  1. templates/knowledgebase.html +16 -6
templates/knowledgebase.html CHANGED
@@ -147,6 +147,16 @@
147
  background-color: #f2dede;
148
  border-color: #ebccd1;
149
  }
 
 
 
 
 
 
 
 
 
 
150
  </style>
151
  </head>
152
 
@@ -160,10 +170,10 @@
160
  <select type="text" id="company" name="company" class="form-control" style="width:20%;margin-left:-40px;"required>
161
  <option value="" selected>Select</option>
162
  </select> -->
163
- <div class="col-12 d-flex justify-content-end mb-3">
164
  <button class="btn btn-primary" style="margin-top:10px;margin-right: -10px;position: fixed;"
165
  id="add" data-action="add">Add</button>
166
- </div>
167
  </div>
168
  </div>
169
  <div class="row">
@@ -294,7 +304,7 @@
294
  });
295
 
296
  const passedCompanyName=sessionStorage.getItem('company_name')
297
- document.getElementById('selectedCompany').innerText = `Company name: ${passedCompanyName}`;
298
  console.log('Current role:', role); // Debug statement to check the role
299
  const company_id=sessionStorage.getItem('company_id');
300
  document.getElementById("company_id").value=company_id;
@@ -518,15 +528,15 @@
518
  success: function () {
519
  var table = $('#knowledgeTable').DataTable();
520
  table.row($(button).closest('tr')).remove().draw();
 
521
  const messageContainer = document.getElementById('message-container');
522
- if (messageContainer)
523
  messageContainer.innerHTML = `
524
  <div class='alert alert-danger'>
525
  Prompt details deleted successfully
526
  <button class='close' onclick='dismissMessage()'>OK</button>
527
  </div>`;
528
- // alert("Company deleted successfully.");
529
- //fetchCompanies(); // Refresh the table
530
  },
531
  error: function (xhr) {
532
  alert("Error deleting company: " + xhr.responseJSON.detail);
 
147
  background-color: #f2dede;
148
  border-color: #ebccd1;
149
  }
150
+
151
+ /* .close {
152
+ position: absolute;
153
+ bottom: 10px;
154
+ right: 10px;
155
+ border: none;
156
+ background: none;
157
+ font-size: 16px;
158
+ cursor: pointer;
159
+ } */
160
  </style>
161
  </head>
162
 
 
170
  <select type="text" id="company" name="company" class="form-control" style="width:20%;margin-left:-40px;"required>
171
  <option value="" selected>Select</option>
172
  </select> -->
173
+ <!-- <div class="col-12 d-flex justify-content-end mb-3">
174
  <button class="btn btn-primary" style="margin-top:10px;margin-right: -10px;position: fixed;"
175
  id="add" data-action="add">Add</button>
176
+ </div> -->
177
  </div>
178
  </div>
179
  <div class="row">
 
304
  });
305
 
306
  const passedCompanyName=sessionStorage.getItem('company_name')
307
+ document.getElementById('selectedCompany').innerText = `Company Name: ${passedCompanyName}`;
308
  console.log('Current role:', role); // Debug statement to check the role
309
  const company_id=sessionStorage.getItem('company_id');
310
  document.getElementById("company_id").value=company_id;
 
528
  success: function () {
529
  var table = $('#knowledgeTable').DataTable();
530
  table.row($(button).closest('tr')).remove().draw();
531
+ //alert("Company deleted successfully.");
532
  const messageContainer = document.getElementById('message-container');
533
+ if (messageContainer)
534
  messageContainer.innerHTML = `
535
  <div class='alert alert-danger'>
536
  Prompt details deleted successfully
537
  <button class='close' onclick='dismissMessage()'>OK</button>
538
  </div>`;
539
+ // fetchCompanies(); // Refresh the table
 
540
  },
541
  error: function (xhr) {
542
  alert("Error deleting company: " + xhr.responseJSON.detail);