diff --git a/frontend/public/locales/en/translation.json b/frontend/public/locales/en/translation.json index dd9bad2aa..4feb04cf3 100644 --- a/frontend/public/locales/en/translation.json +++ b/frontend/public/locales/en/translation.json @@ -124,6 +124,7 @@ "visual_editor": "Visual Editor", "nlp": "NLU", "nlp_entities": "NLU Entities", + "nlp_dataset": "NLU Dataset", "inbox": "Inbox", "categories": "Flows", "context_vars": "Context Vars", @@ -164,7 +165,7 @@ "regular_blocks": "Regular Blocks", "advanced_blocks": "Advanced blocks", "custom_blocks": "Custom blocks", - "nlp": "NLU Samples", + "nlp_datatset": "NLU Dataset", "nlp_train": "NLU training", "nlp_entities": "NLU Entities", "new_nlp_entity": "New NLU Entity", @@ -172,6 +173,7 @@ "nlp_entity_values": "NLU Values", "new_nlp_entity_value": "New NLU Value", "evaluation_report": "Evaluation Report", + "add_nlp_sample": "Add NLU Sample", "edit_nlp_sample": "Edit NLU Sample", "edit_nlp_value": "Edit NLU Value", "context_vars": "Context Vars", diff --git a/frontend/public/locales/fr/translation.json b/frontend/public/locales/fr/translation.json index 7ce2c0dd1..b9b09a904 100644 --- a/frontend/public/locales/fr/translation.json +++ b/frontend/public/locales/fr/translation.json @@ -124,6 +124,7 @@ "visual_editor": "Editeur Visuel", "nlp": "NLU", "nlp_entities": "Entités NLU", + "nlp_dataset": "Données NLU", "inbox": "Boîte de réception", "categories": "Catégories", "context_vars": "Variables contextuelles", @@ -164,15 +165,17 @@ "regular_blocks": "Blocs réguliers", "advanced_blocks": "Blocs avancés", "custom_blocks": "Blocs spécifiques", - "nlp": "Expressions NLU", + "nlp": "Données NLU", "nlp_train": "Apprentissage NLU", "nlp_entities": "Entités NLU", + "nlp_dataset": "Données NLU", "new_nlp_entity": "Nouvelle entité NLU", "edit_nlp_entity": "Modifier l'entité NLU", "edit_nlp_value": "Modifier la valeur NLU", "nlp_entity_values": "Valeurs NLU", "new_nlp_entity_value": "Nouvelle valeur NLU", "evaluation_report": "Rapport d'évaluation", + "add_nlp_sample": "Ajouter l'expression NLU", "edit_nlp_sample": "Modifier l'expression NLU", "context_vars": "Variables contextuelles", "new_context_var": "Nouvelle variable contextuelle", diff --git a/frontend/src/components/nlp/components/NlpEntity.tsx b/frontend/src/components/nlp/NlpEntity.tsx similarity index 77% rename from frontend/src/components/nlp/components/NlpEntity.tsx rename to frontend/src/components/nlp/NlpEntity.tsx index 4ae9c9696..7d1f08779 100644 --- a/frontend/src/components/nlp/components/NlpEntity.tsx +++ b/frontend/src/components/nlp/NlpEntity.tsx @@ -1,5 +1,5 @@ /* - * Copyright © 2024 Hexastack. All rights reserved. + * Copyright © 2025 Hexastack. All rights reserved. * * Licensed under the GNU Affero General Public License v3.0 (AGPLv3) with the following additional terms: * 1. The name "Hexabot" is a trademark of Hexastack. You may not use this name in derivative works without express written permission. @@ -7,8 +7,9 @@ */ import AddIcon from "@mui/icons-material/Add"; +import DatasetLinkedIcon from "@mui/icons-material/DatasetLinked"; import DeleteIcon from "@mui/icons-material/Delete"; -import { Button, Chip, Grid } from "@mui/material"; +import { Button, Chip, Grid, Paper } from "@mui/material"; import { GridColDef, GridRowSelectionModel } from "@mui/x-data-grid"; import { useRouter } from "next/router"; import { useState } from "react"; @@ -29,12 +30,13 @@ import { useHasPermission } from "@/hooks/useHasPermission"; import { useSearch } from "@/hooks/useSearch"; import { useToast } from "@/hooks/useToast"; import { useTranslate } from "@/hooks/useTranslate"; +import { PageHeader } from "@/layout/content/PageHeader"; import { EntityType, Format } from "@/services/types"; import { INlpEntity } from "@/types/nlp-entity.types"; import { PermissionAction } from "@/types/permission.types"; import { getDateTimeFormatter } from "@/utils/date"; -import { NlpEntityDialog } from "../NlpEntityDialog"; +import { NlpEntityDialog } from "./NlpEntityDialog"; const NlpEntity = () => { const router = useRouter(); @@ -87,7 +89,7 @@ const NlpEntity = () => { action: (row) => router.push( { - pathname: "/nlp/nlp-entities/[id]/nlpValues", + pathname: "/nlp/entities/[id]/values", query: { id: row.id }, }, undefined, @@ -176,7 +178,7 @@ const NlpEntity = () => { }; return ( - + { } }} /> - - - - - - - {hasPermission(EntityType.NLP_ENTITY, PermissionAction.CREATE) ? ( + + - + - ) : null} - {selectedNlpEntities.length > 0 && ( - - - - )} - - - + {hasPermission(EntityType.NLP_ENTITY, PermissionAction.CREATE) ? ( + + + + ) : null} + {selectedNlpEntities.length > 0 && ( + + + + )} + + + + + + ); diff --git a/frontend/src/components/nlp/components/NlpSample.tsx b/frontend/src/components/nlp/NlpSample.tsx similarity index 68% rename from frontend/src/components/nlp/components/NlpSample.tsx rename to frontend/src/components/nlp/NlpSample.tsx index b29adcc81..30ac7b3ce 100644 --- a/frontend/src/components/nlp/components/NlpSample.tsx +++ b/frontend/src/components/nlp/NlpSample.tsx @@ -1,13 +1,15 @@ /* - * Copyright © 2024 Hexastack. All rights reserved. + * Copyright © 2025 Hexastack. All rights reserved. * * Licensed under the GNU Affero General Public License v3.0 (AGPLv3) with the following additional terms: * 1. The name "Hexabot" is a trademark of Hexastack. You may not use this name in derivative works without express written permission. * 2. All derivative works must include clear attribution to the original creator and software, Hexastack and Hexabot, in a prominent location (e.g., in the software's "About" section, documentation, and README file). */ +import AddIcon from "@mui/icons-material/Add"; import CircleIcon from "@mui/icons-material/Circle"; import ClearIcon from "@mui/icons-material/Clear"; +import DatasetIcon from "@mui/icons-material/Dataset"; import DeleteIcon from "@mui/icons-material/Delete"; import DownloadIcon from "@mui/icons-material/Download"; import { @@ -19,6 +21,7 @@ import { IconButton, InputAdornment, MenuItem, + Paper, Stack, Typography, } from "@mui/material"; @@ -50,6 +53,7 @@ import { useHasPermission } from "@/hooks/useHasPermission"; import { useSearch } from "@/hooks/useSearch"; import { useToast } from "@/hooks/useToast"; import { useTranslate } from "@/hooks/useTranslate"; +import { PageHeader } from "@/layout/content/PageHeader"; import { EntityType, Format } from "@/services/types"; import { ILanguage } from "@/types/language.types"; import { @@ -62,7 +66,7 @@ import { PermissionAction } from "@/types/permission.types"; import { getDateTimeFormatter } from "@/utils/date"; import { buildURL } from "@/utils/URL"; -import { NlpSampleDialog } from "../NlpSampleDialog"; +import { NlpSampleDialog } from "./NlpSampleDialog"; const NLP_SAMPLE_TYPE_COLORS = { all: "#fff", @@ -148,6 +152,7 @@ export default function NlpSample() { }, ); const deleteDialogCtl = useDialog(false); + const addDialogCtl = useDialog(false); const editDialogCtl = useDialog(false); const actionColumns = getActionsColumn( [ @@ -299,7 +304,8 @@ export default function NlpSample() { }; return ( - + + - + - - - fullWidth={false} - sx={{ - minWidth: "256px", - }} - autoFocus - searchFields={["title", "code"]} - entity={EntityType.LANGUAGE} - format={Format.BASIC} - labelKey="title" - label={t("label.language")} - multiple={false} - onChange={(_e, selected) => setLanguage(selected?.id)} - /> - setType(e.target.value as NlpSampleType)} - SelectProps={{ - ...(type && { - endAdornment: ( - - setType("all")}> - - - + + + + + + fullWidth={false} + sx={{ + minWidth: "256px", + }} + autoFocus + searchFields={["title", "code"]} + entity={EntityType.LANGUAGE} + format={Format.BASIC} + labelKey="title" + label={t("label.language")} + multiple={false} + onChange={(_e, selected) => setLanguage(selected?.id)} + /> + + + setType(e.target.value as NlpSampleType)} + SelectProps={{ + ...(type && { + endAdornment: ( + + setType("all")}> + + + + ), + }), + renderValue: (value) => {t(`label.${value}`)}, + }} + > + {["all", ...Object.values(NlpSampleType)].map( + (nlpSampleType, index) => ( + + + + {t(`label.${nlpSampleType}`)} + + ), - }), - renderValue: (value) => {t(`label.${value}`)}, - }} - > - {["all", ...Object.values(NlpSampleType)].map( - (nlpSampleType, index) => ( - - - - {t(`label.${nlpSampleType}`)} - - - ), - )} - - + )} + + + {hasPermission(EntityType.NLP_SAMPLE, PermissionAction.CREATE) && hasPermission( EntityType.NLP_SAMPLE_ENTITY, PermissionAction.CREATE, - ) ? ( - - ) : null} - {hasPermission(EntityType.NLP_SAMPLE, PermissionAction.READ) && - hasPermission( - EntityType.NLP_SAMPLE_ENTITY, - PermissionAction.READ, ) ? ( ) : null} - {selectedNlpSamples.length > 0 && ( - + + + + {hasPermission(EntityType.NLP_SAMPLE, PermissionAction.CREATE) && + hasPermission( + EntityType.NLP_SAMPLE_ENTITY, + PermissionAction.CREATE, + ) ? ( + + ) : null} + {hasPermission(EntityType.NLP_SAMPLE, PermissionAction.READ) && + hasPermission( + EntityType.NLP_SAMPLE_ENTITY, + PermissionAction.READ, + ) ? ( - - )} - + ) : null} + {selectedNlpSamples.length > 0 && ( + + + + )} + + - - - - + + + + + ); diff --git a/frontend/src/components/nlp/NlpSampleDialog.tsx b/frontend/src/components/nlp/NlpSampleDialog.tsx index 3a14ce11c..0651cb5b4 100644 --- a/frontend/src/components/nlp/NlpSampleDialog.tsx +++ b/frontend/src/components/nlp/NlpSampleDialog.tsx @@ -1,15 +1,17 @@ /* - * Copyright © 2024 Hexastack. All rights reserved. + * Copyright © 2025 Hexastack. All rights reserved. * * Licensed under the GNU Affero General Public License v3.0 (AGPLv3) with the following additional terms: * 1. The name "Hexabot" is a trademark of Hexastack. You may not use this name in derivative works without express written permission. * 2. All derivative works must include clear attribution to the original creator and software, Hexastack and Hexabot, in a prominent location (e.g., in the software's "About" section, documentation, and README file). */ + import { Dialog, DialogContent } from "@mui/material"; import { FC } from "react"; import { DialogTitle } from "@/app-components/dialogs/DialogTitle"; +import { useCreate } from "@/hooks/crud/useCreate"; import { useUpdate } from "@/hooks/crud/useUpdate"; import { DialogControlProps } from "@/hooks/useDialog"; import { useToast } from "@/hooks/useToast"; @@ -32,7 +34,19 @@ export const NlpSampleDialog: FC = ({ }) => { const { t } = useTranslate(); const { toast } = useToast(); - const { mutateAsync: updateSample } = useUpdate< + const { mutate: addSample } = useCreate< + EntityType.NLP_SAMPLE, + INlpDatasetSampleAttributes + >(EntityType.NLP_SAMPLE, { + onError: () => { + toast.error(t("message.internal_server_error")); + }, + onSuccess: () => { + toast.success(t("message.success_save")); + closeDialog(); + }, + }); + const { mutate: updateSample } = useUpdate< EntityType.NLP_SAMPLE, INlpDatasetSampleAttributes >(EntityType.NLP_SAMPLE, { @@ -41,33 +55,34 @@ export const NlpSampleDialog: FC = ({ }, onSuccess: () => { toast.success(t("message.success_save")); + closeDialog(); }, }); const onSubmitForm = (form: INlpSampleFormAttributes) => { if (sample?.id) { - updateSample( - { - id: sample.id, - params: { - text: form.text, - type: form.type, - entities: [...form.keywordEntities, ...form.traitEntities], - language: form.language, - }, - }, - { - onSuccess: () => { - closeDialog(); - }, + updateSample({ + id: sample.id, + params: { + text: form.text, + type: form.type, + entities: [...form.keywordEntities, ...form.traitEntities], + language: form.language, }, - ); + }); + } else { + addSample({ + text: form.text, + type: form.type, + entities: [...form.keywordEntities, ...form.traitEntities], + language: form.language, + }); } }; return ( - {t("title.edit_nlp_sample")} + {sample?.id ? t("title.edit_nlp_sample") : t("title.add_nlp_sample")} diff --git a/frontend/src/components/nlp/components/NlpValues.tsx b/frontend/src/components/nlp/NlpValues.tsx similarity index 62% rename from frontend/src/components/nlp/components/NlpValues.tsx rename to frontend/src/components/nlp/NlpValues.tsx index 747295785..74a2a27a6 100644 --- a/frontend/src/components/nlp/components/NlpValues.tsx +++ b/frontend/src/components/nlp/NlpValues.tsx @@ -1,19 +1,20 @@ /* - * Copyright © 2024 Hexastack. All rights reserved. + * Copyright © 2025 Hexastack. All rights reserved. * * Licensed under the GNU Affero General Public License v3.0 (AGPLv3) with the following additional terms: * 1. The name "Hexabot" is a trademark of Hexastack. You may not use this name in derivative works without express written permission. * 2. All derivative works must include clear attribution to the original creator and software, Hexastack and Hexabot, in a prominent location (e.g., in the software's "About" section, documentation, and README file). */ + import { faGraduationCap } from "@fortawesome/free-solid-svg-icons"; import AddIcon from "@mui/icons-material/Add"; import ArrowBackIcon from "@mui/icons-material/ArrowBack"; import DeleteIcon from "@mui/icons-material/Delete"; -import { Box, Button, ButtonGroup, Chip, Grid, Slide } from "@mui/material"; +import { Box, Button, ButtonGroup, Chip, Grid, Paper } from "@mui/material"; import { GridColDef, GridRowSelectionModel } from "@mui/x-data-grid"; import { useRouter } from "next/router"; -import { useEffect, useState } from "react"; +import { useState } from "react"; import { DeleteDialog } from "@/app-components/dialogs"; import { FilterTextfield } from "@/app-components/inputs/FilterTextfield"; @@ -39,10 +40,9 @@ import { INlpValue } from "@/types/nlp-value.types"; import { PermissionAction } from "@/types/permission.types"; import { getDateTimeFormatter } from "@/utils/date"; -import { NlpValueDialog } from "../NlpValueDialog"; +import { NlpValueDialog } from "./NlpValueDialog"; export const NlpValues = ({ entityId }: { entityId: string }) => { - const [direction, setDirection] = useState<"up" | "down">("up"); const deleteEntityDialogCtl = useDialog(false); const editValueDialogCtl = useDialog(false); const addNlpValueDialogCtl = useDialog(false); @@ -144,12 +144,6 @@ export const NlpValues = ({ entityId }: { entityId: string }) => { }, actionColumns, ]; - - useEffect(() => { - //TODO: need to be enhanced in a separate issue (for the content page as well) - return setDirection("down"); - }, []); - const canHaveSynonyms = nlpEntity?.lookups?.[0] === NlpLookups.keywords; const handleSelectionChange = (selection: GridRowSelectionModel) => { setSelectedNlpValues(selection as string[]); @@ -157,105 +151,105 @@ export const NlpValues = ({ entityId }: { entityId: string }) => { return ( - - - - - - - - } + + + + + + + } + > + - - - - - - {hasPermission( - EntityType.NLP_VALUE, - PermissionAction.CREATE, - ) ? ( + + + + + {hasPermission( + EntityType.NLP_VALUE, + PermissionAction.CREATE, + ) ? ( + + ) : null} + {selectedNlpValues.length > 0 && ( + - ) : null} - {selectedNlpValues.length > 0 && ( - - - - )} - - - - { - refetchEntity(); - }} - /> - { - if (selectedNlpValues.length > 0) { - deleteNlpValues(selectedNlpValues); - setSelectedNlpValues([]); - deleteEntityDialogCtl.closeDialog(); - } else if (deleteEntityDialogCtl.data) { - deleteNlpValue(deleteEntityDialogCtl.data); - } - }} - /> - {}} - /> - + + )} + + + + { + refetchEntity(); + }} + /> + { + if (selectedNlpValues.length > 0) { + deleteNlpValues(selectedNlpValues); + setSelectedNlpValues([]); + deleteEntityDialogCtl.closeDialog(); + } else if (deleteEntityDialogCtl.data) { + deleteNlpValue(deleteEntityDialogCtl.data); + } + }} + /> + {}} + /> + + - - - - + + + + ); }; diff --git a/frontend/src/components/nlp/index.tsx b/frontend/src/components/nlp/index.tsx deleted file mode 100644 index 96f0f08eb..000000000 --- a/frontend/src/components/nlp/index.tsx +++ /dev/null @@ -1,131 +0,0 @@ -/* - * Copyright © 2024 Hexastack. All rights reserved. - * - * Licensed under the GNU Affero General Public License v3.0 (AGPLv3) with the following additional terms: - * 1. The name "Hexabot" is a trademark of Hexastack. You may not use this name in derivative works without express written permission. - * 2. All derivative works must include clear attribution to the original creator and software, Hexastack and Hexabot, in a prominent location (e.g., in the software's "About" section, documentation, and README file). - */ - -import { faGraduationCap } from "@fortawesome/free-solid-svg-icons"; -import { Grid, Paper, Tab, Tabs } from "@mui/material"; -import dynamic from "next/dynamic"; -import { useRouter } from "next/router"; -import React from "react"; - -import { TabPanel } from "@/app-components/tabs/TabPanel"; -import { useCreate } from "@/hooks/crud/useCreate"; -import { useFind } from "@/hooks/crud/useFind"; -import { useToast } from "@/hooks/useToast"; -import { useTranslate } from "@/hooks/useTranslate"; -import { PageHeader } from "@/layout/content/PageHeader"; -import { EntityType, Format } from "@/services/types"; -import { - INlpDatasetSampleAttributes, - INlpSample, - INlpSampleFormAttributes, - INlpSampleFull, -} from "@/types/nlp-sample.types"; - -import NlpDatasetCounter from "./components/NlpDatasetCounter"; -import NlpSample from "./components/NlpSample"; -import NlpDatasetSample from "./components/NlpTrainForm"; -import { NlpValues } from "./components/NlpValues"; - -const NlpEntity = dynamic(() => import("./components/NlpEntity")); - -export const Nlp = ({ - entityId, - selectedTab, -}: { - entityId?: string; - selectedTab: "sample" | "entity"; -}) => { - useFind( - { - entity: EntityType.NLP_ENTITY, - format: Format.FULL, - }, - { - hasCount: false, - }, - ); - const router = useRouter(); - const handleChange = (_event: React.SyntheticEvent, newValue: string) => { - router.push( - `/nlp/${newValue === "sample" ? "" : "nlp-entities"}`, - undefined, - { - shallow: true, - scroll: false, - }, - ); - }; - const { t } = useTranslate(); - const { toast } = useToast(); - const { mutateAsync: createSample } = useCreate< - EntityType.NLP_SAMPLE, - INlpDatasetSampleAttributes, - INlpSample, - INlpSampleFull - >(EntityType.NLP_SAMPLE, { - onError: () => { - toast.error(t("message.internal_server_error")); - }, - onSuccess: () => { - toast.success(t("message.success_save")); - }, - }); - const onSubmitForm = (params: INlpSampleFormAttributes) => { - createSample({ - text: params.text, - type: params.type, - entities: [...params.traitEntities, ...params.keywordEntities], - language: params.language, - }); - }; - - return ( - - - - - - - - - - - - - - - - - - - - - - - - {/* NLP SAMPLES */} - - - - - - {/* NLP ENTITIES */} - - {entityId ? : } - - - - - - ); -}; diff --git a/frontend/src/layout/VerticalMenu.tsx b/frontend/src/layout/VerticalMenu.tsx index 857f9dfac..3c41d0fc1 100644 --- a/frontend/src/layout/VerticalMenu.tsx +++ b/frontend/src/layout/VerticalMenu.tsx @@ -23,6 +23,8 @@ import { import { Flag, Language } from "@mui/icons-material"; import AppsIcon from "@mui/icons-material/Apps"; import ChevronLeftIcon from "@mui/icons-material/ChevronLeft"; +import DatasetIcon from "@mui/icons-material/Dataset"; +import DatasetLinkedIcon from "@mui/icons-material/DatasetLinked"; import DriveFolderUploadIcon from "@mui/icons-material/DriveFolderUpload"; import FolderIcon from "@mui/icons-material/Folder"; import HomeIcon from "@mui/icons-material/Home"; @@ -124,11 +126,25 @@ const getMenuItems = (ssoEnabled: boolean): MenuItem[] => [ }, { text: "menu.nlp", - href: "/nlp", Icon: faGraduationCap, - requires: { - [EntityType.NLP_SAMPLE]: [PermissionAction.READ], - }, + submenuItems: [ + { + text: "menu.nlp_entities", + href: "/nlp/entities", + Icon: DatasetLinkedIcon, + requires: { + [EntityType.NLP_ENTITY]: [PermissionAction.READ], + }, + }, + { + text: "menu.nlp_dataset", + href: "/nlp/dataset", + Icon: DatasetIcon, + requires: { + [EntityType.NLP_SAMPLE]: [PermissionAction.READ], + }, + }, + ], }, { text: "menu.inbox", diff --git a/frontend/src/pages/nlp/nlp-entities/[id]/nlpValues.tsx b/frontend/src/pages/nlp/dataset.tsx similarity index 56% rename from frontend/src/pages/nlp/nlp-entities/[id]/nlpValues.tsx rename to frontend/src/pages/nlp/dataset.tsx index 55a89b226..8c575d04a 100644 --- a/frontend/src/pages/nlp/nlp-entities/[id]/nlpValues.tsx +++ b/frontend/src/pages/nlp/dataset.tsx @@ -1,11 +1,23 @@ /* - * Copyright © 2024 Hexastack. All rights reserved. + * Copyright © 2025 Hexastack. All rights reserved. * * Licensed under the GNU Affero General Public License v3.0 (AGPLv3) with the following additional terms: * 1. The name "Hexabot" is a trademark of Hexastack. You may not use this name in derivative works without express written permission. * 2. All derivative works must include clear attribution to the original creator and software, Hexastack and Hexabot, in a prominent location (e.g., in the software's "About" section, documentation, and README file). */ -import NlpPage from "../.."; -export default NlpPage; +import { ReactElement } from "react"; + +import NlpSample from "@/components/nlp/NlpSample"; +import { Layout } from "@/layout"; + +const DatasetPage = () => { + return ; +}; + +DatasetPage.getLayout = function getLayout(page: ReactElement) { + return {page}; +}; + +export default DatasetPage; diff --git a/frontend/src/pages/nlp/index.tsx b/frontend/src/pages/nlp/entities/[id]/values.tsx similarity index 65% rename from frontend/src/pages/nlp/index.tsx rename to frontend/src/pages/nlp/entities/[id]/values.tsx index 3cf24bc9f..a6dc6f4a6 100644 --- a/frontend/src/pages/nlp/index.tsx +++ b/frontend/src/pages/nlp/entities/[id]/values.tsx @@ -1,5 +1,5 @@ /* - * Copyright © 2024 Hexastack. All rights reserved. + * Copyright © 2025 Hexastack. All rights reserved. * * Licensed under the GNU Affero General Public License v3.0 (AGPLv3) with the following additional terms: * 1. The name "Hexabot" is a trademark of Hexastack. You may not use this name in derivative works without express written permission. @@ -9,22 +9,17 @@ import { useRouter } from "next/router"; import { ReactElement } from "react"; -import { Nlp } from "@/components/nlp"; +import { NlpValues } from "@/components/nlp/NlpValues"; import { Layout } from "@/layout"; -const NlpPage = () => { +const NlpValuesPage = () => { const router = useRouter(); - return ( - - ); + return ; }; -NlpPage.getLayout = function getLayout(page: ReactElement) { +NlpValuesPage.getLayout = function getLayout(page: ReactElement) { return {page}; }; -export default NlpPage; +export default NlpValuesPage; diff --git a/frontend/src/pages/nlp/nlp-entities/index.tsx b/frontend/src/pages/nlp/entities/index.tsx similarity index 55% rename from frontend/src/pages/nlp/nlp-entities/index.tsx rename to frontend/src/pages/nlp/entities/index.tsx index 68d25538a..516efb963 100644 --- a/frontend/src/pages/nlp/nlp-entities/index.tsx +++ b/frontend/src/pages/nlp/entities/index.tsx @@ -1,11 +1,23 @@ /* - * Copyright © 2024 Hexastack. All rights reserved. + * Copyright © 2025 Hexastack. All rights reserved. * * Licensed under the GNU Affero General Public License v3.0 (AGPLv3) with the following additional terms: * 1. The name "Hexabot" is a trademark of Hexastack. You may not use this name in derivative works without express written permission. * 2. All derivative works must include clear attribution to the original creator and software, Hexastack and Hexabot, in a prominent location (e.g., in the software's "About" section, documentation, and README file). */ -import NlpPage from "../index"; -export default NlpPage; +import { ReactElement } from "react"; + +import NlpEntity from "@/components/nlp/NlpEntity"; +import { Layout } from "@/layout"; + +const NlpEntitiesPage = () => { + return ; +}; + +NlpEntitiesPage.getLayout = function getLayout(page: ReactElement) { + return {page}; +}; + +export default NlpEntitiesPage;