From 044a5968cfed81e878f663bfc7198d11c4d8d70f Mon Sep 17 00:00:00 2001 From: Akansha Sakhre Date: Mon, 25 Nov 2024 13:29:47 +0530 Subject: [PATCH 1/4] autosave on clicking cancel --- .../Onboarding/FormLayout/FormLayout.tsx | 29 +++++-------------- 1 file changed, 7 insertions(+), 22 deletions(-) diff --git a/src/containers/Organization/Onboarding/FormLayout/FormLayout.tsx b/src/containers/Organization/Onboarding/FormLayout/FormLayout.tsx index f3dca372b..19afd308c 100644 --- a/src/containers/Organization/Onboarding/FormLayout/FormLayout.tsx +++ b/src/containers/Organization/Onboarding/FormLayout/FormLayout.tsx @@ -90,12 +90,7 @@ export const FormLayout = ({ useEffect(() => { if (handleEffect) handleEffect(identifier, formik); - }, [ - formik.touched?.name, - formik.values.name, - formik.values.registered_address, - formik.values.same_address, - ]); + }, [formik.touched?.name, formik.values.name, formik.values.registered_address, formik.values.same_address]); const header = (
@@ -123,11 +118,7 @@ export const FormLayout = ({ if (field.children) { return (
- + {field.label}
@@ -135,11 +126,7 @@ export const FormLayout = ({ return (
{child.label && ( - + {child.label} )} @@ -161,9 +148,7 @@ export const FormLayout = ({ )} - {field.fieldEndAdornment && - field.fieldEndAdornment.show && - field.fieldEndAdornment.component(formik)} + {field.fieldEndAdornment && field.fieldEndAdornment.show && field.fieldEndAdornment.component(formik)}
); })} @@ -176,6 +161,8 @@ export const FormLayout = ({ variant="outlined" color="primary" onClick={() => { + const payload = setPayload(formik.values); + saveData(payload, identifier); handleStepChange(false); }} className={styles.Button} @@ -235,9 +222,7 @@ export const FormLayout = ({ buttonOkLoading={loading} >
-

- You wont be able to make changes to this page once confirmed. Do you want to go ahead? -

+

You wont be able to make changes to this page once confirmed. Do you want to go ahead?

{loading &&

Please wait, this might take a few seconds.

}
From 7c327684440950520474344a8cccf7e257a8352c Mon Sep 17 00:00:00 2001 From: Akansha Sakhre Date: Mon, 25 Nov 2024 13:35:12 +0530 Subject: [PATCH 2/4] removed whats new link --- src/config/menu.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/config/menu.ts b/src/config/menu.ts index fb6f1a6c2..3ca3334d2 100644 --- a/src/config/menu.ts +++ b/src/config/menu.ts @@ -1,5 +1,5 @@ import { organizationHasDynamicRole } from 'common/utils'; -import { ANALYTICS_URL, GLIFIC_DOCS_URL, NEW_UI_BLOG } from 'config'; +import { ANALYTICS_URL, GLIFIC_DOCS_URL } from 'config'; import { getOrganizationServices } from 'services/AuthService'; const allRoles = ['Staff', 'Manager', 'Admin', 'Dynamic', 'Glific_admin']; @@ -279,14 +279,14 @@ const menus = (): Menu[] => [ roles: staffLevel, }, - { - title: "What's new", - path: '/changelog', - url: NEW_UI_BLOG, - icon: 'new', - type: 'sideDrawer', - roles: staffLevel, - }, + // { + // title: "What's new", + // path: '/changelog', + // url: NEW_UI_BLOG, + // icon: 'new', + // type: 'sideDrawer', + // roles: staffLevel, + // }, ]; export const getMenus = (menuType = 'sideDrawer', role = 'Staff') => From 23e1e9c0c54cc30bb8c8336df5c803bb0e8a16cd Mon Sep 17 00:00:00 2001 From: Akansha Sakhre Date: Mon, 25 Nov 2024 13:41:08 +0530 Subject: [PATCH 3/4] added documentation links --- src/common/HelpData.tsx | 5 ++--- .../Assistants/AssistantOptions/AssistantOptions.tsx | 8 +++++++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/common/HelpData.tsx b/src/common/HelpData.tsx index feed84a86..c6a90a4d8 100644 --- a/src/common/HelpData.tsx +++ b/src/common/HelpData.tsx @@ -24,8 +24,7 @@ export const triggerInfo: HelpDataProps = { }; export const searchInfo: HelpDataProps = { - heading: - 'Glific provides search functionality to NGO staff to find contacts from a large set of contacts list.', + heading: 'Glific provides search functionality to NGO staff to find contacts from a large set of contacts list.', link: 'https://glific.github.io/docs/docs/Product%20Features/Searches', }; @@ -105,5 +104,5 @@ export const blockedContactsInfo: HelpDataProps = { export const assistantsInfo: HelpDataProps = { heading: 'Assistants can call OpenAI’s models with specific instructions to tune their personality and capabilities. Assistants can access multiple tools in parallel. Assistants can access files in several formats as part of their creation. When using tools, Assistants can also create files (e.g., images, spreadsheets, etc) and cite files they reference in the Messages they create.', - link: 'https://glific.github.io/docs/docs/Product%20Features/Flows/Flow%20Variables/Flow%20variables%20vs%20Contact%20variables', // Replace with the actual Glific documentation link + link: 'https://glific.github.io/docs/docs/Integrations/RAG%20using%20OpenAI%20file%20search%20assistant', // Replace with the actual Glific documentation link }; diff --git a/src/containers/Assistants/AssistantOptions/AssistantOptions.tsx b/src/containers/Assistants/AssistantOptions/AssistantOptions.tsx index 297cf10ef..a0b085377 100644 --- a/src/containers/Assistants/AssistantOptions/AssistantOptions.tsx +++ b/src/containers/Assistants/AssistantOptions/AssistantOptions.tsx @@ -30,7 +30,8 @@ interface AssistantOptionsProps { const temperatureInfo = 'Controls randomness: Lowering results in less random completions. As the temperature approaches zero, the model will become deterministic and repetitive.'; - +const filesInfo = + 'Enables the assistant with knowledge from files that you or your users upload. Once a file is uploaded, the assistant automatically decides when to retrieve content based on user requests.'; export const AssistantOptions = ({ currentId, options, setOptions }: AssistantOptionsProps) => { const [showUploadDialog, setShowUploadDialog] = useState(false); const [files, setFiles] = useState([]); @@ -171,6 +172,11 @@ export const AssistantOptions = ({ currentId, options, setOptions }: AssistantOp
Files +