{
+ const selectOptions = useMemo(
+ () =>
+ options.map((option) => ({
+ label: option.label,
+ value: option.value,
+ })),
+ [options]
+ );
+ return (
+
+ {
+ if (!value || !value.length) {
+ return "This is a required field";
+ }
+ }}
+ >
+ {({
+ field, // { name, value, onChange, onBlur }
+ form,
+ }: FieldProps) => {
+ return (
+
+
+ );
+ }}
+
+
+ );
+};
diff --git a/src/pages/preselectionForms/components/formConfigurator/ValuesFieldsCard.tsx b/src/pages/preselectionForms/components/formConfigurator/ValuesFieldsCard.tsx
index 7ba159c6..ab191c71 100644
--- a/src/pages/preselectionForms/components/formConfigurator/ValuesFieldsCard.tsx
+++ b/src/pages/preselectionForms/components/formConfigurator/ValuesFieldsCard.tsx
@@ -1,6 +1,5 @@
import { FC, useEffect } from "react";
import { OptionsField } from "src/pages/preselectionForms/components/formConfigurator/OptionsField";
-import { CufMultiselect } from "src/pages/Jotform/CufConfigurator/CufMultiselect";
import {
aqBootstrapTheme,
Card,
@@ -12,6 +11,7 @@ import { DropZone } from "src/pages/preselectionForms/components/formConfigurato
import { XLg, GripVertical } from "react-bootstrap-icons";
import { ShortTitleField } from "./ShortTitleField";
import styled from "styled-components";
+import { CufMultiselect } from "./CufMultiselect";
const StyledInlineField = styled.div`
display: flex;
diff --git a/src/pages/preselectionForms/functions/scrollToFormTitle.tsx b/src/pages/preselectionForms/functions/scrollToFormTitle.tsx
index 53c32ee0..c730e29e 100644
--- a/src/pages/preselectionForms/functions/scrollToFormTitle.tsx
+++ b/src/pages/preselectionForms/functions/scrollToFormTitle.tsx
@@ -1,4 +1,4 @@
-function scrollToFormTitle() {
+export function scrollToFormTitle() {
const selector = `[id="formTitle"]`;
const formTitleElement = document.querySelector(selector) as HTMLElement;
formTitleElement?.scrollIntoView({
diff --git a/src/pages/preselectionForms/singleSlice.ts b/src/pages/preselectionForms/singleSlice.ts
index 75b590af..4225597c 100644
--- a/src/pages/preselectionForms/singleSlice.ts
+++ b/src/pages/preselectionForms/singleSlice.ts
@@ -2,6 +2,10 @@ import { createSlice, PayloadAction } from "@reduxjs/toolkit";
import { v4 as uuidv4 } from "uuid";
import { GetCampaignsFormsByFormIdApiResponse } from "../../services/tryberApi";
+interface CufField {
+ fieldData: ApiComponents["schemas"]["CustomUserFieldsData"];
+ checked: boolean;
+}
interface PreselectionFormState {
profileFieldsList: ProfileField[];
cufList: CufField[];
diff --git a/src/store.ts b/src/store.ts
index 137f2467..10501e39 100644
--- a/src/store.ts
+++ b/src/store.ts
@@ -2,7 +2,6 @@ import { configureStore, PreloadedState } from "@reduxjs/toolkit";
import { tryberApiSlice } from "src/services/tryberApi/apiTags";
import oldReducers from "src/redux/reducer";
import { combineReducers } from "redux";
-import jotformReducer from "src/pages/Jotform/jotformSlice";
import campaignPreselectionReducer from "src/pages/preselectionForms/singleSlice";
import campaignPreselectionListReducer from "src/pages/preselectionForms/listSlice";
import selectionReducer from "src/pages/campaigns/selection/selectionSlice";
@@ -12,7 +11,6 @@ import type { TypedUseSelectorHook } from "react-redux";
const rootReducer = combineReducers({
...oldReducers,
- jotform: jotformReducer,
campaignPreselection: campaignPreselectionReducer,
campaignPreselectionList: campaignPreselectionListReducer,
selection: selectionReducer,