Spaces:
Runtime error
Runtime error
Update templates/knowledgebase.html
Browse files146 unmodified lines1471481491501511527 unmodified lines160161162163164165166167168169124 unmodified lines294295296297298299300217 unmodified lines518519520521522523524525526527528529530531532146 unmodified linesbackground-color: #f2dede;border-color: #ebccd1;}</style></head>7 unmodified lines<select type="text" id="company" name="company" class="form-control" style="width:20%;margin-left:-40px;"required><option value="" selected>Select</option></select> --><div class="col-12 d-flex justify-content-end mb-3"><button class="btn btn-primary" style="margin-top:10px;margin-right: -10px;position: fixed;"id="add" data-action="add">Add</button></div></div></div><div class="row">124 unmodified lines});const passedCompanyName=sessionStorage.getItem('company_name')document.getElementById('selectedCompany').innerText = `Company name: ${passedCompanyName}`;console.log('Current role:', role); // Debug statement to check the roleconst company_id=sessionStorage.getItem('company_id');document.getElementById("company_id").value=company_id;217 unmodified linessuccess: function () {var table = $('#knowledgeTable').DataTable();table.row($(button).closest('tr')).remove().draw();const messageContainer = document.getElementById('message-container');if (messageContainer)messageContainer.innerHTML = `<div class='alert alert-danger'>Prompt details deleted successfully<button class='close' onclick='dismissMessage()'>OK</button></div>`;// alert("Company deleted successfully.");//fetchCompanies(); // Refresh the table},error: function (xhr) {alert("Error deleting company: " + xhr.responseJSON.detail);146 unmodified lines1471481491501511521531541551561571581591601611627 unmodified lines170171172173174175176177178179124 unmodified lines304305306307308309310217 unmodified lines528529530531532533534535536537538539540541542146 unmodified linesbackground-color: #f2dede;border-color: #ebccd1;}/* .close {position: absolute;bottom: 10px;right: 10px;border: none;background: none;font-size: 16px;cursor: pointer;} */</style></head>7 unmodified lines<select type="text" id="company" name="company" class="form-control" style="width:20%;margin-left:-40px;"required><option value="" selected>Select</option></select> --><!-- <div class="col-12 d-flex justify-content-end mb-3"><button class="btn btn-primary" style="margin-top:10px;margin-right: -10px;position: fixed;"id="add" data-action="add">Add</button></div> --></div></div><div class="row">124 unmodified lines});const passedCompanyName=sessionStorage.getItem('company_name')document.getElementById('selectedCompany').innerText = `Company Name: ${passedCompanyName}`;console.log('Current role:', role); // Debug statement to check the roleconst company_id=sessionStorage.getItem('company_id');document.getElementById("company_id").value=company_id;217 unmodified linessuccess: function () {var table = $('#knowledgeTable').DataTable();table.row($(button).closest('tr')).remove().draw();//alert("Company deleted successfully.");const messageContainer = document.getElementById('message-container');if (messageContainer)messageContainer.innerHTML = `<div class='alert alert-danger'>Prompt details deleted successfully<button class='close' onclick='dismissMessage()'>OK</button></div>`;// fetchCompanies(); // Refresh the table},error: function (xhr) {alert("Error deleting company: " + xhr.responseJSON.detail);
templates/knowledgebase.html+16-6