diff --git a/gui/pages/Content/Knowledge/AddKnowledge.js b/gui/pages/Content/Knowledge/AddKnowledge.js index 98a6abd90..bf788f801 100644 --- a/gui/pages/Content/Knowledge/AddKnowledge.js +++ b/gui/pages/Content/Knowledge/AddKnowledge.js @@ -1,7 +1,7 @@ import React, {useState, useEffect} from 'react'; import KnowledgeForm from "@/pages/Content/Knowledge/KnowledgeForm"; -export default function AddKnowledge({internalId, sendKnowledgeData}) { +export default function AddKnowledge({internalId, sendKnowledgeData, sendDatabaseData}) { const [knowledgeName, setKnowledgeName] = useState(''); const [knowledgeDescription, setKnowledgeDescription] = useState(''); const [selectedIndex, setSelectedIndex] = useState(null); @@ -38,6 +38,7 @@ export default function AddKnowledge({internalId, sendKnowledgeData}) { isEditing={false} setIsEditing={null} sendKnowledgeData={sendKnowledgeData} + sendDatabaseData={sendDatabaseData} />
diff --git a/gui/pages/Content/Knowledge/KnowledgeDetails.js b/gui/pages/Content/Knowledge/KnowledgeDetails.js index 51f237d81..018b853cd 100644 --- a/gui/pages/Content/Knowledge/KnowledgeDetails.js +++ b/gui/pages/Content/Knowledge/KnowledgeDetails.js @@ -8,7 +8,7 @@ import {deleteCustomKnowledge, deleteMarketplaceKnowledge, getKnowledgeDetails} import {removeTab} from "@/utils/utils"; import {EventBus} from "@/utils/eventBus"; -export default function KnowledgeDetails({internalId, knowledgeId}) { +export default function KnowledgeDetails({internalId, knowledgeId, sendDatabaseData}) { const [showDescription, setShowDescription] = useState(false); const [dropdown, setDropdown] = useState(false); const [isEditing, setIsEditing] = useState(false); @@ -33,8 +33,8 @@ export default function KnowledgeDetails({internalId, knowledgeId}) { .then((response) => { console.log(response) toast.success("Knowledge uninstalled successfully", {autoClose: 1800}); - removeTab(knowledgeId, knowledgeName, "Knowledge", internalId); - EventBus.emit('reFetchKnowledge', {}); + removeTab(knowledgeId, knowledgeName, "Knowledge", internalId); + EventBus.emit('reFetchKnowledge', {}); }) .catch((error) => { toast.error("Unable to uninstall knowledge", {autoClose: 1800}); @@ -43,9 +43,9 @@ export default function KnowledgeDetails({internalId, knowledgeId}) { } else { deleteCustomKnowledge(knowledgeId) .then((response) => { - toast.success("Knowledge uninstalled successfully", {autoClose: 1800}); - removeTab(knowledgeId, knowledgeName, "Knowledge", internalId); - EventBus.emit('reFetchKnowledge', {}); + toast.success("Knowledge uninstalled successfully", {autoClose: 1800}); + removeTab(knowledgeId, knowledgeName, "Knowledge", internalId); + EventBus.emit('reFetchKnowledge', {}); }) .catch((error) => { toast.error("Unable to uninstall knowledge", {autoClose: 1800}); @@ -103,6 +103,7 @@ export default function KnowledgeDetails({internalId, knowledgeId}) { isEditing={true} setIsEditing={setIsEditing} sendKnowledgeData={null} + sendDatabaseData={sendDatabaseData} /> :