show eye in password input and some fixes
This commit is contained in:
parent
0412bccffb
commit
daddeb12f8
|
|
@ -1,7 +1,55 @@
|
|||
import React from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import useSetPageTitle from "../../../../Hooks/useSetPageTitle";
|
||||
import PageHeader from "../../../../Layout/Dashboard/PageHeader";
|
||||
import { Suspense } from "react";
|
||||
import { Spin } from "antd";
|
||||
import { ModalEnum } from "../../../../enums/Model";
|
||||
import PersonalDetailsForm from "../Form/PersonalDetailsForm";
|
||||
import { Formik, Form } from "formik";
|
||||
import { getInitialValues, getValidationSchema } from "../Form/formUtils";
|
||||
import TitleDetailsForm from "../Form/TitleDetailsForm";
|
||||
import AttachmentForm from "../Form/AttachmentForm";
|
||||
import useModalHandler from "../../../../utils/useModalHandler";
|
||||
|
||||
const Page = () => {
|
||||
return <div>Page</div>;
|
||||
const TableHeader = ({canEdit,ModelAbility}:{canEdit?: any;ModelAbility?: any;}) => {
|
||||
|
||||
const [t] = useTranslation();
|
||||
useSetPageTitle(t(`page_header.add_reseller`));
|
||||
const handelSubmit = (values: any) => {
|
||||
console.log(values, "values");
|
||||
};
|
||||
const { handel_open_model } = useModalHandler();
|
||||
|
||||
return (
|
||||
<div className="TableWithHeader">
|
||||
<Suspense fallback={<Spin />}>
|
||||
<PageHeader
|
||||
pageTitle="edit_reseller"
|
||||
ModelAbility={ModalEnum?.RE_SELLER_EDIT}
|
||||
canAdd={false}
|
||||
/>
|
||||
<div>
|
||||
<Formik
|
||||
initialValues={getInitialValues({})}
|
||||
validationSchema={getValidationSchema}
|
||||
onSubmit={handelSubmit}
|
||||
>
|
||||
<Form className="Form_details_container">
|
||||
<PersonalDetailsForm />
|
||||
<TitleDetailsForm />
|
||||
<AttachmentForm />
|
||||
<div className="resellerButton">
|
||||
<button type="button">{t("practical.cancel")}</button>
|
||||
<button type="submit">
|
||||
{t("practical.edit")} {t("models.reseller")}
|
||||
</button>
|
||||
</div>
|
||||
</Form>
|
||||
</Formik>
|
||||
</div>
|
||||
</Suspense>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default Page;
|
||||
export default TableHeader;
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ import { useDeleteTag } from "../../../api/tags";
|
|||
import PageHeader from "../../../Layout/Dashboard/PageHeader";
|
||||
import FilterLayout from "../../../Layout/Dashboard/FilterLayout";
|
||||
import FilterForm from "./Form/FilterForm";
|
||||
import EditReSeller from "./Edit/Page";
|
||||
const Table = lazy(() => import("./Table"));
|
||||
const DeleteModalForm = lazy(
|
||||
() => import("../../../Layout/Dashboard/DeleteModels"),
|
||||
|
|
@ -40,6 +41,7 @@ const TableHeader = () => {
|
|||
filterTitle="table.reseller"
|
||||
/>
|
||||
<Table />
|
||||
{/* <EditReSeller/> */}
|
||||
<DeleteModalForm
|
||||
deleteMutation={deleteMutation}
|
||||
ModelEnum={ModalEnum?.RE_SELLER_DELETE}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ import { Form, useFormikContext } from "formik";
|
|||
|
||||
import { useTranslation } from "react-i18next";
|
||||
import ValidationField from "../../Components/ValidationField/ValidationField";
|
||||
import { Input } from "antd";
|
||||
|
||||
type FormFieldType = {
|
||||
isLoading: boolean;
|
||||
|
|
@ -18,7 +19,7 @@ const FormField = ({ isLoading }: FormFieldType) => {
|
|||
|
||||
<ValidationField name="username" label="username" />
|
||||
|
||||
<ValidationField name="password" label="password" />
|
||||
<ValidationField name="password" label="password" as={Input.Password} />
|
||||
|
||||
<button disabled={ !isValid || isLoading} type="submit" className="auth_submit_button">
|
||||
{t("practical.login")}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user