Spaces:
Sleeping
Sleeping
Update templates/prompt_template.html
Browse files
templates/prompt_template.html
CHANGED
@@ -125,12 +125,12 @@
|
|
125 |
<option value="" selected>Select</option>
|
126 |
</select> -->
|
127 |
<h4 id="selectedCompany" style="margin-left: 300px;"></h4>
|
128 |
-
<div class="col-12 d-flex justify-content-end mb-2">
|
129 |
<button class="btn btn-primary"
|
130 |
style="margin-top:-40px;margin-right: -25px;position: fixed;" id="add">Add</button>
|
131 |
|
132 |
-
|
133 |
-
</div>
|
134 |
</div>
|
135 |
<div class="row">
|
136 |
<div id="message-container" style="margin-left: 150px;width:500px;"></div>
|
@@ -277,7 +277,7 @@
|
|
277 |
const role = sessionStorage.getItem('userRole');
|
278 |
console.log('Current role:', role); // Debug statement to check the role
|
279 |
const passedCompanyName = sessionStorage.getItem('company_name')
|
280 |
-
document.getElementById('selectedCompany').innerText = `Company
|
281 |
const company_id = sessionStorage.getItem('company_id');
|
282 |
document.getElementById("company_id").value = company_id;
|
283 |
|
@@ -327,7 +327,6 @@
|
|
327 |
table.clear();
|
328 |
if (!Array.isArray(connectorsResponse)) {
|
329 |
throw new TypeError('Expected an array of companies');
|
330 |
-
|
331 |
displayErrorMessage("prompt template details do not exist for this company. Please fill in the details.");
|
332 |
contentSection.style.display = 'none';
|
333 |
} else {
|
@@ -364,6 +363,12 @@
|
|
364 |
|
365 |
}
|
366 |
|
|
|
|
|
|
|
|
|
|
|
|
|
367 |
|
368 |
|
369 |
// Delete company
|
|
|
125 |
<option value="" selected>Select</option>
|
126 |
</select> -->
|
127 |
<h4 id="selectedCompany" style="margin-left: 300px;"></h4>
|
128 |
+
<!-- <div class="col-12 d-flex justify-content-end mb-2">
|
129 |
<button class="btn btn-primary"
|
130 |
style="margin-top:-40px;margin-right: -25px;position: fixed;" id="add">Add</button>
|
131 |
|
132 |
+
|
133 |
+
</div> -->
|
134 |
</div>
|
135 |
<div class="row">
|
136 |
<div id="message-container" style="margin-left: 150px;width:500px;"></div>
|
|
|
277 |
const role = sessionStorage.getItem('userRole');
|
278 |
console.log('Current role:', role); // Debug statement to check the role
|
279 |
const passedCompanyName = sessionStorage.getItem('company_name')
|
280 |
+
document.getElementById('selectedCompany').innerText = `Company Name: ${passedCompanyName}`;
|
281 |
const company_id = sessionStorage.getItem('company_id');
|
282 |
document.getElementById("company_id").value = company_id;
|
283 |
|
|
|
327 |
table.clear();
|
328 |
if (!Array.isArray(connectorsResponse)) {
|
329 |
throw new TypeError('Expected an array of companies');
|
|
|
330 |
displayErrorMessage("prompt template details do not exist for this company. Please fill in the details.");
|
331 |
contentSection.style.display = 'none';
|
332 |
} else {
|
|
|
363 |
|
364 |
}
|
365 |
|
366 |
+
function displayErrorMessage(message) {
|
367 |
+
const messageContainer = document.getElementById('message-container');
|
368 |
+
if (messageContainer) {
|
369 |
+
messageContainer.innerHTML = `<div class='alert alert-danger'>${message}</div>`;
|
370 |
+
}
|
371 |
+
}
|
372 |
|
373 |
|
374 |
// Delete company
|