diff --git a/ui/src/views/admin/listForm/edit/FormEdit.tsx b/ui/src/views/admin/listForm/edit/FormEdit.tsx index 19cd6efb..52707851 100644 --- a/ui/src/views/admin/listForm/edit/FormEdit.tsx +++ b/ui/src/views/admin/listForm/edit/FormEdit.tsx @@ -129,28 +129,7 @@ const FormEdit = () => { await getRoleList() await getUserList() } - - // const valueAxisList = () => { - // return listFormValues?.valueAxisDto.map((key: ChartValueAxisDto) => ({ - // value: key.name, - // label: key.name, - // })) - // } - - // const valuePaneList = () => { - // return listFormValues?.panesDto.map((key: ChartPanesDto) => ({ - // value: key.name, - // label: key.name, - // })) - // } - - // const SeriesList = () => { - // return listFormValues?.seriesDto.map((key: ChartSeriesDto) => ({ - // value: key.name, - // label: key.name, - // })) - // } - + //LİST FORM ve LİST FORM FİELDS AİT BİLGİLER useEffect(() => { refreshData() diff --git a/ui/src/views/admin/listForm/edit/json-row-operations/JsonRowOpDialogAnnotation.tsx b/ui/src/views/admin/listForm/edit/json-row-operations/JsonRowOpDialogAnnotation.tsx index 2a88fd45..96e6efe3 100644 --- a/ui/src/views/admin/listForm/edit/json-row-operations/JsonRowOpDialogAnnotation.tsx +++ b/ui/src/views/admin/listForm/edit/json-row-operations/JsonRowOpDialogAnnotation.tsx @@ -15,7 +15,7 @@ import { SelectBoxOption } from '@/shared/types' import { useStoreActions, useStoreState } from '@/store' import { useLocalization } from '@/utils/hooks/useLocalization' import { Field, FieldProps, Form, Formik } from 'formik' -import { Dispatch, SetStateAction, useEffect, useState } from 'react' +import { Dispatch, SetStateAction } from 'react' import { number, object, string } from 'yup' import { JsonRowDialogData } from './types' import { @@ -32,6 +32,7 @@ import { chartTitleWordWrapListOptions, chartSeriesDashStyleOptions, } from '../options' +import { ChartSeriesDto } from '@/proxy/admin/charts/models' const schema = object().shape({ name: string().required('Name Required'), @@ -50,28 +51,21 @@ function JsonRowOpDialogAnnotation({ data: JsonRowDialogData | undefined setData: Dispatch> }) { - const [permissionOptions, setPermissionOptions] = useState([]) const { translate } = useLocalization() - - const permissions: Record | undefined = useStoreState( - (state) => state.abpConfig.config?.auth.grantedPolicies, - ) - - useEffect(() => { - if (permissions) { - setPermissionOptions( - Object.keys(permissions).map((key) => { - return { - value: key, - label: key, - } - }), - ) - } - }, [permissions]) - const { setJsonValue } = useStoreActions((a) => a.admin) + const listFormValues = useStoreState((s) => s.admin.listFormValues) + if (!listFormValues) { + return null + } + + const SeriesList = () => { + return listFormValues?.seriesDto.map((key: ChartSeriesDto) => ({ + value: key.name, + label: key.name, + })) + } + const handleClose = async (e?: any) => { if (e) { e.preventDefault() @@ -219,17 +213,19 @@ function JsonRowOpDialogAnnotation({ invalid={errors.series && touched.series} errorMessage={errors.series} > - + {({ field, form }: FieldProps) => (