feat: new nlp pattern input (partial)

This commit is contained in:
Mohamed Marrouchi
2024-11-25 09:51:19 +01:00
parent 3dbb500a5f
commit 5cda7ae2c6
6 changed files with 260 additions and 13 deletions

View File

@@ -12,6 +12,7 @@ import { RegisterOptions, useFormContext } from "react-hook-form";
import AutoCompleteEntitySelect from "@/app-components/inputs/AutoCompleteEntitySelect";
import { Input } from "@/app-components/inputs/Input";
import NlpPatternSelect from "@/app-components/inputs/NlpPatternSelect";
import { RegexInput } from "@/app-components/inputs/RegexInput";
import { useGetFromCache } from "@/hooks/crud/useGet";
import { useTranslate } from "@/hooks/useTranslate";
@@ -147,6 +148,7 @@ const PatternInput: FC<PatternInputProps> = ({
</Input>
</Grid>
<Grid item xs={9}>
{patternType === "nlp" && <NlpPatternSelect />}
{patternType === "nlp" ? (
<AutoCompleteEntitySelect<INlpValue, "value">
value={(pattern as NlpPattern[]).map((v) =>