diff --git a/public/locales/fa/app.json b/public/locales/fa/app.json
index 4f7eef8..a7361da 100644
--- a/public/locales/fa/app.json
+++ b/public/locales/fa/app.json
@@ -167,6 +167,8 @@
"error_message_city_id": "شهر خود را وارد کنید",
"error_message_role_id": "نقش خود را وارد کنید",
"error_message_new_password": "رمز عبور جدید را وارد کنید",
- "error_message_new_password_regex": "رمز عبور باید حداقل 8 کاراکتر و متشکل از عدد، حرف یا سمبل باشد"
+ "error_message_new_password_regex": "رمز عبور باید حداقل 8 کاراکتر و متشکل از عدد، حرف یا سمبل باشد",
+ "button_cancel": "بستن",
+ "button_confirm": "ثبت"
}
}
diff --git a/src/components/dashboard/expert-management/Form/CreateForm/CreateContent/PersonalInfo/__tests__/index.test.js b/src/components/dashboard/expert-management/Form/CreateForm/CreateContent/PersonalInfo/__tests__/index.test.js
index e69de29..66aba9e 100644
--- a/src/components/dashboard/expert-management/Form/CreateForm/CreateContent/PersonalInfo/__tests__/index.test.js
+++ b/src/components/dashboard/expert-management/Form/CreateForm/CreateContent/PersonalInfo/__tests__/index.test.js
@@ -0,0 +1,71 @@
+import {act, fireEvent, render, screen, waitFor} from "@testing-library/react";
+import React from 'react';
+import MockAppWithProviders from "../../../../../../../../../mocks/AppWithProvider";
+import CreateContent from "../../../CreateContent";
+
+describe("PersonalInfo Component From Expert Management", () => {
+ describe("Rendering", () => {
+ it("Name TextField Rendered", async () => {
+ render();
+ await waitFor(() => {
+ const nameTextField = screen.queryByLabelText('نام');
+ expect(nameTextField).toBeInTheDocument();
+ });
+ });
+ it("Email TextField Rendered", async () => {
+ render();
+ await waitFor(() => {
+ const emailTextField = screen.queryByLabelText('پست الکترونیک');
+ expect(emailTextField).toBeInTheDocument();
+ });
+ });
+ it("Phone Number TextField Rendered", async () => {
+ render();
+ await waitFor(() => {
+ const phoneNumberTextField = screen.queryByLabelText('شماره همراه');
+ expect(phoneNumberTextField).toBeInTheDocument();
+ });
+ });
+ it("National Id TextField Rendered", async () => {
+ render();
+ await waitFor(() => {
+ const nationalIdTextField = screen.queryByLabelText('کد ملی');
+ expect(nationalIdTextField).toBeInTheDocument();
+ });
+ });
+ });
+ describe("Behavioral", () => {
+ it("Name TextField Work Correctly", async () => {
+ render();
+ const nameTextField = screen.queryByLabelText('نام');
+ fireEvent.change(nameTextField, {target: {value: 'exampleName'}});
+ await act(() => {
+ expect(nameTextField).toHaveValue('exampleName');
+ })
+ });
+ it("Email TextField Work Correctly", async () => {
+ render();
+ const emailTextField = screen.queryByLabelText('پست الکترونیک');
+ fireEvent.change(emailTextField, {target: {value: 'exampleEmail'}});
+ await act(() => {
+ expect(emailTextField).toHaveValue('exampleEmail');
+ })
+ });
+ it("Phone Number TextField Work Correctly", async () => {
+ render();
+ const phoneNumberTextField = screen.queryByLabelText('شماره همراه');
+ fireEvent.change(phoneNumberTextField, {target: {value: 'examplePhoneNumber'}});
+ await act(() => {
+ expect(phoneNumberTextField).toHaveValue('examplePhoneNumber');
+ })
+ });
+ it("National Id TextField Work Correctly", async () => {
+ render();
+ const nationalIdTextField = screen.queryByLabelText('کد ملی');
+ fireEvent.change(nationalIdTextField, {target: {value: 'exampleNationalId'}});
+ await act(() => {
+ expect(nationalIdTextField).toHaveValue('exampleNationalId');
+ })
+ });
+ });
+});
\ No newline at end of file
diff --git a/src/components/dashboard/expert-management/Form/CreateForm/CreateContent/PersonalInfo/index.jsx b/src/components/dashboard/expert-management/Form/CreateForm/CreateContent/PersonalInfo/index.jsx
index 9254771..0dde112 100644
--- a/src/components/dashboard/expert-management/Form/CreateForm/CreateContent/PersonalInfo/index.jsx
+++ b/src/components/dashboard/expert-management/Form/CreateForm/CreateContent/PersonalInfo/index.jsx
@@ -3,71 +3,70 @@ import {useTranslations} from "next-intl";
const PersonalInfo = ({formik}) => {
const t = useTranslations();
+
return (
- <>
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
- >
+
+
+
+
+
+
+
+
+
+
)
}
export default PersonalInfo
\ No newline at end of file
diff --git a/src/components/dashboard/expert-management/Form/CreateForm/CreateContent/RestInfo/Position&Role.jsx b/src/components/dashboard/expert-management/Form/CreateForm/CreateContent/RestInfo/Position&Role.jsx
new file mode 100644
index 0000000..47d594c
--- /dev/null
+++ b/src/components/dashboard/expert-management/Form/CreateForm/CreateContent/RestInfo/Position&Role.jsx
@@ -0,0 +1,69 @@
+import {FormControl, FormHelperText, Grid, InputLabel, MenuItem, Select, TextField} from "@mui/material";
+import {useTranslations} from "next-intl";
+import useRequest from "@/lib/app/hooks/useRequest";
+import useRole from "@/lib/app/hooks/useRole";
+
+const PositionAndRole = ({formik}) => {
+ const t = useTranslations();
+ const requestServer = useRequest()
+ const {roleList, isLoadingRoleList, errorRoleList} = useRole();
+
+ return (
+
+
+
+
+
+
+ {t("ExpertMangement.text_field_role_id")}
+
+
+ {formik.touched.role_id && formik.errors.role_id ? formik.errors.role_id : ""}
+
+
+
+
+ )
+}
+export default PositionAndRole
\ No newline at end of file
diff --git a/src/components/dashboard/expert-management/Form/CreateForm/CreateContent/RestInfo/Province&City.jsx b/src/components/dashboard/expert-management/Form/CreateForm/CreateContent/RestInfo/Province&City.jsx
new file mode 100644
index 0000000..46245b2
--- /dev/null
+++ b/src/components/dashboard/expert-management/Form/CreateForm/CreateContent/RestInfo/Province&City.jsx
@@ -0,0 +1,110 @@
+import {FormControl, FormHelperText, Grid, InputLabel, MenuItem, Select} from "@mui/material";
+import {useTranslations} from "next-intl";
+import {useState} from "react";
+import useProvince from "@/lib/app/hooks/useProvince";
+import {GET_CITY_LIST} from "@/core/data/apiRoutes";
+import useRequest from "@/lib/app/hooks/useRequest";
+
+const ProvinceAndCity = ({formik}) => {
+ const t = useTranslations();
+ const requestServer = useRequest()
+ const [cityList, setCityList] = useState([]);
+ const [cityTextField, setCityTextField] = useState(t("ExpertMangement.text_field_please_select_province"));
+ const {provinceList, isLoadingProvinceList, errorProvinceList} = useProvince();
+
+ function getCities(province_id) {
+ formik.setFieldTouched("city_id", false, false);
+ formik.setFieldValue("city_id", "")
+ setCityTextField(t("ExpertMangement.text_field_loading_cities_list"))
+ requestServer(`${GET_CITY_LIST}?province_id=${province_id}`, "get", {auth: true, notification: false})
+ .then(({data}) => {
+ const result = data.data;
+ const formattedData = result.map((city, index) => ({
+ id: index,
+ name: city.name,
+ value: city.id,
+ }));
+ setCityList(formattedData);
+ setCityTextField(t("ExpertMangement.text_field_city_id"))
+ }).catch(() => {
+ setCityTextField(t("ExpertMangement.text_field_error_fetching_cities"))
+ });
+ }
+
+ return (
+
+
+
+ {t("ExpertMangement.text_field_province_id")}
+
+
+ {formik.touched.province_id && formik.errors.province_id ? formik.errors.province_id : ""}
+
+
+
+
+
+ {cityTextField}
+
+
+ {formik.touched.city_id && formik.errors.city_id ? formik.errors.city_id : ""}
+
+
+
+
+ )
+}
+export default ProvinceAndCity
\ No newline at end of file
diff --git a/src/components/dashboard/expert-management/Form/CreateForm/CreateContent/RestInfo/__tests__/index.test.js b/src/components/dashboard/expert-management/Form/CreateForm/CreateContent/RestInfo/__tests__/index.test.js
index e69de29..1139c9c 100644
--- a/src/components/dashboard/expert-management/Form/CreateForm/CreateContent/RestInfo/__tests__/index.test.js
+++ b/src/components/dashboard/expert-management/Form/CreateForm/CreateContent/RestInfo/__tests__/index.test.js
@@ -0,0 +1,65 @@
+import {act, fireEvent, render, screen, waitFor} from "@testing-library/react";
+import React from 'react';
+import MockAppWithProviders from "../../../../../../../../../mocks/AppWithProvider";
+import CreateContent from "../../../CreateContent";
+
+describe("CreateContent Component From Expert Management", () => {
+ describe("Rendering", () => {
+ it("Position TextField Rendered", async () => {
+ render();
+ await waitFor(() => {
+ const positionTextField = screen.queryByLabelText('سمت');
+ expect(positionTextField).toBeInTheDocument();
+ });
+ });
+ it("Province Select Box Rendered", async () => {
+ render();
+ await waitFor(() => {
+ const provinceSelectBox = screen.getByTestId('province-select');
+ expect(provinceSelectBox).toBeInTheDocument();
+ });
+ });
+ it("City Select Box Rendered", async () => {
+ render();
+ await waitFor(() => {
+ const citySelectBox = screen.getByTestId('city-select');
+ expect(citySelectBox).toBeInTheDocument();
+ });
+ });
+ it("Role Select Box Rendered", async () => {
+ render();
+ await waitFor(() => {
+ const roleSelectBox = screen.getByTestId('role-select');
+ expect(roleSelectBox).toBeInTheDocument();
+ });
+ });
+ });
+ describe("Behavioral", () => {
+ it("Position TextField Work Correctly", async () => {
+ render();
+ const positionTextField = screen.queryByLabelText('سمت');
+ fireEvent.change(positionTextField, {target: {value: 'examplePosition'}});
+ await act(() => {
+ expect(positionTextField).toHaveValue('examplePosition');
+ })
+ });
+ it("Province Select Box Work Correctly", async () => {
+ render();
+ screen.debug()
+ await waitFor(() => {
+ expect(screen.queryByText("آذربایجان شرقی")).toBeInTheDocument();
+ });
+ // const provinceSelectBox = screen.getByTestId('province-select');
+ // fireEvent.change(provinceSelectBox, {target: {value: 1}});
+ // expect(provinceSelectBox).toHaveValue(1);
+ });
+ // it("Role Select Box Work Correctly", async () => {
+ // render();
+ // const roleSelectBox = screen.getByTestId('role-select');
+ // fireEvent.change(roleSelectBox, {target: {value: '1'}});
+ // await act(() => {
+ // expect(roleSelectBox).toHaveValue('1');
+ // })
+ // });
+ });
+});
\ No newline at end of file
diff --git a/src/components/dashboard/expert-management/Form/CreateForm/CreateContent/RestInfo/index.jsx b/src/components/dashboard/expert-management/Form/CreateForm/CreateContent/RestInfo/index.jsx
index e69de29..4e2a764 100644
--- a/src/components/dashboard/expert-management/Form/CreateForm/CreateContent/RestInfo/index.jsx
+++ b/src/components/dashboard/expert-management/Form/CreateForm/CreateContent/RestInfo/index.jsx
@@ -0,0 +1,12 @@
+import ProvinceAndCity from "./Province&City";
+import PositionAndRole from "./Position&Role";
+
+const RestInfo = ({formik}) => {
+ return (
+ <>
+
+
+ >
+ )
+}
+export default RestInfo
\ No newline at end of file
diff --git a/src/components/dashboard/expert-management/Form/CreateForm/CreateContent/UserInfo/__test__/index.test.js b/src/components/dashboard/expert-management/Form/CreateForm/CreateContent/UserInfo/__test__/index.test.js
index e69de29..bfc7e3b 100644
--- a/src/components/dashboard/expert-management/Form/CreateForm/CreateContent/UserInfo/__test__/index.test.js
+++ b/src/components/dashboard/expert-management/Form/CreateForm/CreateContent/UserInfo/__test__/index.test.js
@@ -0,0 +1,42 @@
+import {act, fireEvent, render, screen, waitFor} from "@testing-library/react";
+import React from 'react';
+import MockAppWithProviders from "../../../../../../../../../mocks/AppWithProvider";
+import CreateContent from "../../../CreateContent";
+
+describe("CreateContent Component From Expert Management", () => {
+ describe("Rendering", () => {
+ it("UserName TextField Rendered", async () => {
+ render();
+ await waitFor(() => {
+ const usernameTextField = screen.queryByLabelText('نام کاربری');
+ expect(usernameTextField).toBeInTheDocument();
+ });
+ });
+ it("Password TextField Rendered", async () => {
+ render();
+ await waitFor(() => {
+ const passwordTextField = screen.queryByLabelText('رمز عبور');
+ expect(passwordTextField).toBeInTheDocument();
+ });
+
+ });
+ });
+ describe("Behavioral", () => {
+ it("Username TextField Work Correctly", async () => {
+ render();
+ const usernameTextField = screen.queryByLabelText('نام کاربری');
+ fireEvent.change(usernameTextField, {target: {value: 'exampleUsername'}});
+ await act(() => {
+ expect(usernameTextField).toHaveValue('exampleUsername');
+ })
+ });
+ it("Password TextField Work Correctly", async () => {
+ render();
+ const passwordTextField = screen.queryByLabelText('رمز عبور');
+ fireEvent.change(passwordTextField, {target: {value: 'examplePassword'}});
+ await act(() => {
+ expect(passwordTextField).toHaveValue('examplePassword');
+ })
+ });
+ });
+});
\ No newline at end of file
diff --git a/src/components/dashboard/expert-management/Form/CreateForm/CreateContent/UserInfo/index.jsx b/src/components/dashboard/expert-management/Form/CreateForm/CreateContent/UserInfo/index.jsx
index 189f997..2455b26 100644
--- a/src/components/dashboard/expert-management/Form/CreateForm/CreateContent/UserInfo/index.jsx
+++ b/src/components/dashboard/expert-management/Form/CreateForm/CreateContent/UserInfo/index.jsx
@@ -1,9 +1,16 @@
import {Grid, IconButton, InputAdornment, TextField} from "@mui/material";
import {useTranslations} from "next-intl";
import {Visibility, VisibilityOff} from "@mui/icons-material";
+import {useState} from "react";
const UserInfo = ({formik}) => {
const t = useTranslations();
+ const [showPassword, setShowPassword] = useState(false);
+
+ const handleClickShowPassword = () => {
+ setShowPassword(!showPassword);
+ };
+
return (
<>
diff --git a/src/components/dashboard/expert-management/Form/CreateForm/CreateContent/__tests__/index.test.js b/src/components/dashboard/expert-management/Form/CreateForm/CreateContent/__tests__/index.test.js
index fee508f..429f468 100644
--- a/src/components/dashboard/expert-management/Form/CreateForm/CreateContent/__tests__/index.test.js
+++ b/src/components/dashboard/expert-management/Form/CreateForm/CreateContent/__tests__/index.test.js
@@ -1,156 +1,21 @@
-import {act, fireEvent, render, screen, waitFor} from "@testing-library/react";
+import {render, screen} from "@testing-library/react";
import React from 'react';
import CreateContent from "../../CreateContent";
import MockAppWithProviders from "../../../../../../../../mocks/AppWithProvider";
describe("CreateContent Component From Expert Management", () => {
describe("Rendering", () => {
- it("Name TextField Rendered", async () => {
+ it("Password TextField Rendered", () => {
render();
- await waitFor(() => {
- const nameTextField = screen.queryByLabelText('نام');
- expect(nameTextField).toBeInTheDocument();
- });
+ const cancelBtn = screen.queryByText('بستن');
+ expect(cancelBtn).toBeInTheDocument();
});
- it("UserName TextField Rendered", async () => {
+ it("Password TextField Rendered", () => {
render();
- await waitFor(() => {
- const usernameTextField = screen.queryByLabelText('نام کاربری');
- expect(usernameTextField).toBeInTheDocument();
- });
- });
- it("Email TextField Rendered", async () => {
- render();
- await waitFor(() => {
- const emailTextField = screen.queryByLabelText('پست الکترونیک');
- expect(emailTextField).toBeInTheDocument();
- });
- });
- it("Phone Number TextField Rendered", async () => {
- render();
- await waitFor(() => {
- const phoneNumberTextField = screen.queryByLabelText('شماره همراه');
- expect(phoneNumberTextField).toBeInTheDocument();
- });
- });
- it("National Id TextField Rendered", async () => {
- render();
- await waitFor(() => {
- const nationalIdTextField = screen.queryByLabelText('کد ملی');
- expect(nationalIdTextField).toBeInTheDocument();
- });
- });
- it("Password TextField Rendered", async () => {
- render();
- await waitFor(() => {
- const passwordTextField = screen.queryByLabelText('رمز عبور');
- expect(passwordTextField).toBeInTheDocument();
- });
-
- });
- it("Position TextField Rendered", async () => {
- render();
- await waitFor(() => {
- const positionTextField = screen.queryByLabelText('سمت');
- expect(positionTextField).toBeInTheDocument();
- });
- });
- it("Province Select Box Rendered", async () => {
- render();
- await waitFor(() => {
- const provinceSelectBox = screen.getByTestId('province-select');
- expect(provinceSelectBox).toBeInTheDocument();
- });
- });
- it("City Select Box Rendered", async () => {
- render();
- await waitFor(() => {
- const citySelectBox = screen.getByTestId('city-select');
- expect(citySelectBox).toBeInTheDocument();
- });
- });
- it("Role Select Box Rendered", async () => {
- render();
- await waitFor(() => {
- const roleSelectBox = screen.getByTestId('role-select');
- expect(roleSelectBox).toBeInTheDocument();
- });
+ const cancelBtn = screen.queryByText('ثبت');
+ expect(cancelBtn).toBeInTheDocument();
});
});
describe("Behavioral", () => {
- it("Name TextField Work Correctly", async () => {
- render();
- const nameTextField = screen.queryByLabelText('نام');
- fireEvent.change(nameTextField, {target: {value: 'exampleName'}});
- await act(() => {
- expect(nameTextField).toHaveValue('exampleName');
- })
- });
- it("Username TextField Work Correctly", async () => {
- render();
- const usernameTextField = screen.queryByLabelText('نام کاربری');
- fireEvent.change(usernameTextField, {target: {value: 'exampleUsername'}});
- await act(() => {
- expect(usernameTextField).toHaveValue('exampleUsername');
- })
- });
- it("Email TextField Work Correctly", async () => {
- render();
- const emailTextField = screen.queryByLabelText('پست الکترونیک');
- fireEvent.change(emailTextField, {target: {value: 'exampleEmail'}});
- await act(() => {
- expect(emailTextField).toHaveValue('exampleEmail');
- })
- });
- it("Phone Number TextField Work Correctly", async () => {
- render();
- const phoneNumberTextField = screen.queryByLabelText('شماره همراه');
- fireEvent.change(phoneNumberTextField, {target: {value: 'examplePhoneNumber'}});
- await act(() => {
- expect(phoneNumberTextField).toHaveValue('examplePhoneNumber');
- })
- });
- it("National Id TextField Work Correctly", async () => {
- render();
- const nationalIdTextField = screen.queryByLabelText('کد ملی');
- fireEvent.change(nationalIdTextField, {target: {value: 'exampleNationalId'}});
- await act(() => {
- expect(nationalIdTextField).toHaveValue('exampleNationalId');
- })
- });
- it("Password TextField Work Correctly", async () => {
- render();
- const passwordTextField = screen.queryByLabelText('رمز عبور');
- fireEvent.change(passwordTextField, {target: {value: 'examplePassword'}});
- await act(() => {
- expect(passwordTextField).toHaveValue('examplePassword');
- })
- });
- it("Position TextField Work Correctly", async () => {
- render();
- const positionTextField = screen.queryByLabelText('سمت');
- fireEvent.change(positionTextField, {target: {value: 'examplePosition'}});
- await act(() => {
- expect(positionTextField).toHaveValue('examplePosition');
- })
- });
- it("Province Select Box Work Correctly", async () => {
- render();
- screen.debug()
- await waitFor(() => {
- expect(screen.queryByText("آذربایجان شرقی")).toBeInTheDocument();
- }, {timeout: 4000});
- // const provinceSelectBox = screen.getByTestId('province-select');
- // fireEvent.change(provinceSelectBox, {target: {value: 1}});
- // expect(provinceSelectBox).toHaveValue(1);
- });
- // it("Role Select Box Work Correctly", async () => {
- // render();
- // const roleSelectBox = screen.getByTestId('role-select');
- // fireEvent.change(roleSelectBox, {target: {value: '1'}});
- // await act(() => {
- // expect(roleSelectBox).toHaveValue('1');
- // })
- // });
});
});
\ No newline at end of file
diff --git a/src/components/dashboard/expert-management/Form/CreateForm/CreateContent/index.jsx b/src/components/dashboard/expert-management/Form/CreateForm/CreateContent/index.jsx
index ae6485d..b042da6 100644
--- a/src/components/dashboard/expert-management/Form/CreateForm/CreateContent/index.jsx
+++ b/src/components/dashboard/expert-management/Form/CreateForm/CreateContent/index.jsx
@@ -1,63 +1,16 @@
-import {
- Box,
- Button,
- Chip,
- DialogActions,
- DialogContent,
- Divider,
- FormControl,
- FormHelperText,
- Grid,
- IconButton,
- InputAdornment,
- InputLabel,
- MenuItem,
- Select,
- TextField,
-} from "@mui/material";
+import {Box, Button, Chip, DialogActions, DialogContent, Divider,} from "@mui/material";
import * as Yup from "yup";
import {useTranslations} from "next-intl";
import {useFormik} from "formik";
-import {useState} from "react";
import useRequest from "@/lib/app/hooks/useRequest";
-import {CREATE_EXPERT_MANAGEMENT, GET_CITY_LIST} from "@/core/data/apiRoutes";
-import useRole from "@/lib/app/hooks/useRole";
-import {Visibility, VisibilityOff} from "@mui/icons-material";
-import useProvince from "@/lib/app/hooks/useProvince";
+import {CREATE_EXPERT_MANAGEMENT} from "@/core/data/apiRoutes";
import PersonalInfo from "@/components/dashboard/expert-management/Form/CreateForm/CreateContent/PersonalInfo";
import UserInfo from "@/components/dashboard/expert-management/Form/CreateForm/CreateContent/UserInfo";
+import RestInfo from "@/components/dashboard/expert-management/Form/CreateForm/CreateContent/RestInfo";
const CreateContent = ({setOpenCreateDialog, mutate, fetchUrl}) => {
const t = useTranslations();
const requestServer = useRequest()
- const [cityList, setCityList] = useState([]);
- const [cityTextField, setCityTextField] = useState(t("ExpertMangement.text_field_please_select_province"));
- const {provinceList, isLoadingProvinceList, errorProvinceList} = useProvince();
- const {roleList, isLoadingRoleList, errorRoleList} = useRole();
- const [showPassword, setShowPassword] = useState(false);
-
- const handleClickShowPassword = () => {
- setShowPassword(!showPassword);
- };
-
- function getCities(province_id) {
- formik.setFieldTouched("city_id", false, false);
- formik.setFieldValue("city_id", "")
- setCityTextField(t("ExpertMangement.text_field_loading_cities_list"))
- requestServer(`${GET_CITY_LIST}?province_id=${province_id}`, "get", {auth: true, notification: false})
- .then(({data}) => {
- const result = data.data;
- const formattedData = result.map((city, index) => ({
- id: index,
- name: city.name,
- value: city.id,
- }));
- setCityList(formattedData);
- setCityTextField(t("ExpertMangement.text_field_city_id"))
- }).catch(() => {
- setCityTextField(t("ExpertMangement.text_field_error_fetching_cities"))
- });
- }
const validationSchema = Yup.object().shape({
name: Yup.string().required(t("ExpertMangement.error_message_name")),
@@ -125,7 +78,7 @@ const CreateContent = ({setOpenCreateDialog, mutate, fetchUrl}) => {
/>
-
+ {!formik ? null : }
{
/>
-
+ {!formik ? null : }
{
/>
-
-
-
- {t("ExpertMangement.text_field_province_id")}
-
-
- {formik.touched.province_id && formik.errors.province_id ? formik.errors.province_id : ""}
-
-
-
-
-
- {cityTextField}
-
-
- {formik.touched.city_id && formik.errors.city_id ? formik.errors.city_id : ""}
-
-
-
-
-
-
-
-
-
-
- {t("ExpertMangement.text_field_role_id")}
-
-
- {formik.touched.role_id && formik.errors.role_id ? formik.errors.role_id : ""}
-
-
-
-
+ {!formik ? null : }
+
+
>
)
diff --git a/src/core/data/apiRoutes.js b/src/core/data/apiRoutes.js
index 6e604c1..c56ce21 100644
--- a/src/core/data/apiRoutes.js
+++ b/src/core/data/apiRoutes.js
@@ -1,5 +1,9 @@
const BASE_URL = process.env.NEXT_PUBLIC_BASE_URL;
+//login
+export const GET_USER_TOKEN = BASE_URL + "/api/auth/login";
+//end login
+
// role list
export const GET_ROLE_LIST = BASE_URL + "/dashboard/roles/list";
// role list
@@ -9,10 +13,6 @@ export const GET_PROVINCE_LIST = BASE_URL + "/api/provinces";
export const GET_CITY_LIST = BASE_URL + "/api/cities";
// province/city list
-//login
-export const GET_USER_TOKEN = BASE_URL + "/api/auth/login";
-//end login
-
//change password
export const SET_USER_PASSWORD = BASE_URL + "/dashboard/profile/change_password";
//end change password