fixes
This commit is contained in:
parent
b1c7714e57
commit
a6553b23d8
|
|
@ -30,7 +30,6 @@ const TooltipComp = ({
|
||||||
placement="top"
|
placement="top"
|
||||||
title={<div onClick={handleEdit}>{t(`header.${note}`)}</div>}
|
title={<div onClick={handleEdit}>{t(`header.${note}`)}</div>}
|
||||||
color={color}
|
color={color}
|
||||||
|
|
||||||
>
|
>
|
||||||
<div className={`gear `}>{icon}</div>
|
<div className={`gear `}>{icon}</div>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ import { useTranslation } from "react-i18next";
|
||||||
import { MdExpandLess, MdExpandMore } from "react-icons/md";
|
import { MdExpandLess, MdExpandMore } from "react-icons/md";
|
||||||
import { Link, useNavigate } from "react-router-dom";
|
import { Link, useNavigate } from "react-router-dom";
|
||||||
import { useFilterStateState } from "../../../zustand/Filter";
|
import { useFilterStateState } from "../../../zustand/Filter";
|
||||||
|
import { Tooltip } from "antd";
|
||||||
|
|
||||||
export const MenuItem = ({ item, location, index, isOpen }: any) => {
|
export const MenuItem = ({ item, location, index, isOpen }: any) => {
|
||||||
const isActive = location.pathname.split("/")[1] === item.path?.slice(1);
|
const isActive = location.pathname.split("/")[1] === item.path?.slice(1);
|
||||||
|
|
@ -25,7 +26,13 @@ export const MenuItem = ({ item, location, index, isOpen }: any) => {
|
||||||
className={`link ${isActive ? "active" : ""} ${item?.children && "DropDownLink"}`}
|
className={`link ${isActive ? "active" : ""} ${item?.children && "DropDownLink"}`}
|
||||||
onClick={() => handleNavigate()}
|
onClick={() => handleNavigate()}
|
||||||
>
|
>
|
||||||
<i>{item.icon}</i>
|
<Tooltip
|
||||||
|
placement="topLeft"
|
||||||
|
title={t(item?.text)}
|
||||||
|
color={'#E0E0E0'}
|
||||||
|
>
|
||||||
|
<i>{item.icon}</i>
|
||||||
|
</Tooltip>
|
||||||
{/* Conditionally render the text based on sidebar width */}
|
{/* Conditionally render the text based on sidebar width */}
|
||||||
<span style={{ display: isOpen === false ? "none" : "inline" }}>
|
<span style={{ display: isOpen === false ? "none" : "inline" }}>
|
||||||
{t(item.text)}
|
{t(item.text)}
|
||||||
|
|
|
||||||
|
|
@ -67,6 +67,9 @@ const FilterForm = () => {
|
||||||
name: TagName,
|
name: TagName,
|
||||||
page: TagCurrentPage
|
page: TagCurrentPage
|
||||||
});
|
});
|
||||||
|
|
||||||
|
console.log(Tag);
|
||||||
|
|
||||||
const TagOption = Tag?.data ?? []
|
const TagOption = Tag?.data ?? []
|
||||||
const canChangeTagPage = !!Tag?.links?.next;
|
const canChangeTagPage = !!Tag?.links?.next;
|
||||||
const TagPage = Tag?.meta?.current_page;
|
const TagPage = Tag?.meta?.current_page;
|
||||||
|
|
@ -116,7 +119,7 @@ const FilterForm = () => {
|
||||||
TagsIds
|
TagsIds
|
||||||
*/}
|
*/}
|
||||||
|
|
||||||
<ValidationField
|
<ValidationField
|
||||||
searchBy="TagName"
|
searchBy="TagName"
|
||||||
name="tagsIds"
|
name="tagsIds"
|
||||||
label="tag"
|
label="tag"
|
||||||
|
|
@ -155,7 +158,7 @@ const FilterForm = () => {
|
||||||
lessonsIds
|
lessonsIds
|
||||||
*/}
|
*/}
|
||||||
|
|
||||||
<ValidationField
|
<ValidationField
|
||||||
searchBy="LessonName"
|
searchBy="LessonName"
|
||||||
name="lessonsIds"
|
name="lessonsIds"
|
||||||
label="lesson"
|
label="lesson"
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,19 @@
|
||||||
import React from "react";
|
import React, { useState } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { FaRegAddressBook } from "react-icons/fa";
|
import { FaRegAddressBook } from "react-icons/fa";
|
||||||
import ValidationField from "../../../../Components/ValidationField/ValidationField";
|
import ValidationField from "../../../../Components/ValidationField/ValidationField";
|
||||||
import { nationalities } from "../../../../types/App";
|
import { nationalities } from "../../../../types/App";
|
||||||
import { useGetAllArea } from "../../../../api/Area";
|
import { useGetAllArea } from "../../../../api/Area";
|
||||||
|
import { useGetAllCity } from "../../../../api/City";
|
||||||
|
|
||||||
const TitleDetailsForm = () => {
|
const TitleDetailsForm = () => {
|
||||||
const [t] = useTranslation();
|
const [t] = useTranslation();
|
||||||
const {data} = useGetAllArea();
|
const {data:city} = useGetAllCity();
|
||||||
|
const [CityId, setCityId] = useState()
|
||||||
|
|
||||||
|
const {data} = useGetAllArea({
|
||||||
|
city_id:CityId
|
||||||
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="TitleDetailsForm">
|
<div className="TitleDetailsForm">
|
||||||
|
|
@ -16,12 +22,22 @@ const TitleDetailsForm = () => {
|
||||||
<h4>{t("header.address")}</h4>
|
<h4>{t("header.address")}</h4>
|
||||||
</header>
|
</header>
|
||||||
<main className="main_form_body">
|
<main className="main_form_body">
|
||||||
|
<ValidationField
|
||||||
|
name={"city"}
|
||||||
|
placeholder={"_"}
|
||||||
|
label={"city"}
|
||||||
|
type="Select"
|
||||||
|
option={city?.data}
|
||||||
|
onChange={(e)=>setCityId(e)}
|
||||||
|
/>
|
||||||
<ValidationField
|
<ValidationField
|
||||||
name={"area_id"}
|
name={"area_id"}
|
||||||
placeholder={"_"}
|
placeholder={"_"}
|
||||||
label={"city"}
|
label={"city"}
|
||||||
type="Select"
|
type="Select"
|
||||||
|
disabled={!CityId}
|
||||||
option={data?.data}
|
option={data?.data}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
{/* <ValidationField name={"address"} placeholder={"_"} label={"address"} /> */}
|
{/* <ValidationField name={"address"} placeholder={"_"} label={"address"} /> */}
|
||||||
</main>
|
</main>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user