@solidstarters/solid-core-ui 1.0.2 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/auth/SolidForgotPassword.d.ts +3 -0
- package/dist/components/auth/SolidForgotPassword.d.ts.map +1 -0
- package/dist/components/auth/SolidForgotPassword.js +108 -0
- package/dist/components/auth/SolidForgotPassword.js.map +1 -0
- package/dist/components/auth/SolidLogin.d.ts +3 -0
- package/dist/components/auth/SolidLogin.d.ts.map +1 -0
- package/dist/components/auth/SolidLogin.js +115 -0
- package/dist/components/auth/SolidLogin.js.map +1 -0
- package/dist/components/auth/SolidOTPVerify.d.ts +3 -0
- package/dist/components/auth/SolidOTPVerify.d.ts.map +1 -0
- package/dist/components/auth/SolidOTPVerify.js +108 -0
- package/dist/components/auth/SolidOTPVerify.js.map +1 -0
- package/dist/components/auth/SolidRegister.d.ts +3 -0
- package/dist/components/auth/SolidRegister.d.ts.map +1 -0
- package/dist/components/auth/SolidRegister.js +166 -0
- package/dist/components/auth/SolidRegister.js.map +1 -0
- package/dist/components/auth/SolidResetPassword.d.ts +3 -0
- package/dist/components/auth/SolidResetPassword.d.ts.map +1 -0
- package/dist/components/auth/SolidResetPassword.js +119 -0
- package/dist/components/auth/SolidResetPassword.js.map +1 -0
- package/dist/components/core/common/FilterComponent.d.ts +33 -1
- package/dist/components/core/common/FilterComponent.d.ts.map +1 -1
- package/dist/components/core/common/FilterComponent.js +26 -25
- package/dist/components/core/common/FilterComponent.js.map +1 -1
- package/dist/components/core/common/SolidConfigureLayoutElement.d.ts.map +1 -1
- package/dist/components/core/common/SolidConfigureLayoutElement.js +3 -3
- package/dist/components/core/common/SolidConfigureLayoutElement.js.map +1 -1
- package/dist/components/core/common/SolidCreateButton.js +1 -1
- package/dist/components/core/common/SolidCreateButton.js.map +1 -1
- package/dist/components/core/common/SolidGlobalSearchElement.d.ts +1 -1
- package/dist/components/core/common/SolidGlobalSearchElement.d.ts.map +1 -1
- package/dist/components/core/common/SolidGlobalSearchElement.js +14 -9
- package/dist/components/core/common/SolidGlobalSearchElement.js.map +1 -1
- package/dist/components/core/common/SolidLayoutViews.d.ts +19 -0
- package/dist/components/core/common/SolidLayoutViews.d.ts.map +1 -0
- package/dist/components/core/common/SolidLayoutViews.js +14 -0
- package/dist/components/core/common/SolidLayoutViews.js.map +1 -0
- package/dist/components/core/common/SolidListViewOptions.d.ts +2 -0
- package/dist/components/core/common/SolidListViewOptions.d.ts.map +1 -0
- package/dist/components/core/common/SolidListViewOptions.js +11 -0
- package/dist/components/core/common/SolidListViewOptions.js.map +1 -0
- package/dist/components/core/filter/SolidManyToOneFilterElement.js +1 -1
- package/dist/components/core/filter/SolidManyToOneFilterElement.js.map +1 -1
- package/dist/components/core/filter/columns/SolidBigintField.d.ts +4 -0
- package/dist/components/core/filter/columns/SolidBigintField.d.ts.map +1 -0
- package/dist/components/core/filter/columns/SolidBigintField.js +8 -0
- package/dist/components/core/filter/columns/SolidBigintField.js.map +1 -0
- package/dist/components/core/filter/columns/SolidBooleanField.d.ts +4 -0
- package/dist/components/core/filter/columns/SolidBooleanField.d.ts.map +1 -0
- package/dist/components/core/filter/columns/SolidBooleanField.js +27 -0
- package/dist/components/core/filter/columns/SolidBooleanField.js.map +1 -0
- package/dist/components/core/filter/columns/SolidComputedField.d.ts +4 -0
- package/dist/components/core/filter/columns/SolidComputedField.d.ts.map +1 -0
- package/dist/components/core/filter/columns/SolidComputedField.js +22 -0
- package/dist/components/core/filter/columns/SolidComputedField.js.map +1 -0
- package/dist/components/core/filter/columns/SolidDateField.d.ts +9 -0
- package/dist/components/core/filter/columns/SolidDateField.d.ts.map +1 -0
- package/dist/components/core/filter/columns/SolidDateField.js +35 -0
- package/dist/components/core/filter/columns/SolidDateField.js.map +1 -0
- package/dist/components/core/filter/columns/SolidDatetimeField.d.ts +4 -0
- package/dist/components/core/filter/columns/SolidDatetimeField.d.ts.map +1 -0
- package/dist/components/core/filter/columns/SolidDatetimeField.js +24 -0
- package/dist/components/core/filter/columns/SolidDatetimeField.js.map +1 -0
- package/dist/components/core/filter/columns/SolidDecimalField.d.ts +4 -0
- package/dist/components/core/filter/columns/SolidDecimalField.d.ts.map +1 -0
- package/dist/components/core/filter/columns/SolidDecimalField.js +8 -0
- package/dist/components/core/filter/columns/SolidDecimalField.js.map +1 -0
- package/dist/components/core/filter/columns/SolidExternalIdField.d.ts +4 -0
- package/dist/components/core/filter/columns/SolidExternalIdField.d.ts.map +1 -0
- package/dist/components/core/filter/columns/SolidExternalIdField.js +25 -0
- package/dist/components/core/filter/columns/SolidExternalIdField.js.map +1 -0
- package/dist/components/core/filter/columns/SolidFloatField.d.ts +4 -0
- package/dist/components/core/filter/columns/SolidFloatField.d.ts.map +1 -0
- package/dist/components/core/filter/columns/SolidFloatField.js +8 -0
- package/dist/components/core/filter/columns/SolidFloatField.js.map +1 -0
- package/dist/components/core/filter/columns/SolidIdField.d.ts +4 -0
- package/dist/components/core/filter/columns/SolidIdField.d.ts.map +1 -0
- package/dist/components/core/filter/columns/SolidIdField.js +25 -0
- package/dist/components/core/filter/columns/SolidIdField.js.map +1 -0
- package/dist/components/core/filter/columns/SolidIntField.d.ts +4 -0
- package/dist/components/core/filter/columns/SolidIntField.d.ts.map +1 -0
- package/dist/components/core/filter/columns/SolidIntField.js +34 -0
- package/dist/components/core/filter/columns/SolidIntField.js.map +1 -0
- package/dist/components/core/filter/columns/SolidLongTextField.d.ts +4 -0
- package/dist/components/core/filter/columns/SolidLongTextField.d.ts.map +1 -0
- package/dist/components/core/filter/columns/SolidLongTextField.js +8 -0
- package/dist/components/core/filter/columns/SolidLongTextField.js.map +1 -0
- package/dist/components/core/filter/columns/SolidMediaMultipleField.d.ts +4 -0
- package/dist/components/core/filter/columns/SolidMediaMultipleField.d.ts.map +1 -0
- package/dist/components/core/filter/columns/SolidMediaMultipleField.js +35 -0
- package/dist/components/core/filter/columns/SolidMediaMultipleField.js.map +1 -0
- package/dist/components/core/filter/columns/SolidMediaSingleField.d.ts +4 -0
- package/dist/components/core/filter/columns/SolidMediaSingleField.d.ts.map +1 -0
- package/dist/components/core/filter/columns/SolidMediaSingleField.js +35 -0
- package/dist/components/core/filter/columns/SolidMediaSingleField.js.map +1 -0
- package/dist/components/core/filter/columns/SolidRelationField.d.ts +4 -0
- package/dist/components/core/filter/columns/SolidRelationField.d.ts.map +1 -0
- package/dist/components/core/filter/columns/SolidRelationField.js +12 -0
- package/dist/components/core/filter/columns/SolidRelationField.js.map +1 -0
- package/dist/components/core/filter/columns/SolidRichTextField.d.ts +4 -0
- package/dist/components/core/filter/columns/SolidRichTextField.d.ts.map +1 -0
- package/dist/components/core/filter/columns/SolidRichTextField.js +8 -0
- package/dist/components/core/filter/columns/SolidRichTextField.js.map +1 -0
- package/dist/components/core/filter/columns/SolidSelectionDynamicField.d.ts +4 -0
- package/dist/components/core/filter/columns/SolidSelectionDynamicField.d.ts.map +1 -0
- package/dist/components/core/filter/columns/SolidSelectionDynamicField.js +25 -0
- package/dist/components/core/filter/columns/SolidSelectionDynamicField.js.map +1 -0
- package/dist/components/core/filter/columns/SolidSelectionStaticField.d.ts +4 -0
- package/dist/components/core/filter/columns/SolidSelectionStaticField.d.ts.map +1 -0
- package/dist/components/core/filter/columns/SolidSelectionStaticField.js +26 -0
- package/dist/components/core/filter/columns/SolidSelectionStaticField.js.map +1 -0
- package/dist/components/core/filter/columns/SolidShortTextField.d.ts +4 -0
- package/dist/components/core/filter/columns/SolidShortTextField.d.ts.map +1 -0
- package/dist/components/core/filter/columns/SolidShortTextField.js +33 -0
- package/dist/components/core/filter/columns/SolidShortTextField.js.map +1 -0
- package/dist/components/core/filter/columns/SolidTimeField.d.ts +4 -0
- package/dist/components/core/filter/columns/SolidTimeField.d.ts.map +1 -0
- package/dist/components/core/filter/columns/SolidTimeField.js +24 -0
- package/dist/components/core/filter/columns/SolidTimeField.js.map +1 -0
- package/dist/components/core/filter/columns/SolidUuidField.d.ts +4 -0
- package/dist/components/core/filter/columns/SolidUuidField.d.ts.map +1 -0
- package/dist/components/core/filter/columns/SolidUuidField.js +25 -0
- package/dist/components/core/filter/columns/SolidUuidField.js.map +1 -0
- package/dist/components/core/filter/columns/relations/SolidRelationManyToOneField.d.ts +4 -0
- package/dist/components/core/filter/columns/relations/SolidRelationManyToOneField.d.ts.map +1 -0
- package/dist/components/core/filter/columns/relations/SolidRelationManyToOneField.js +54 -0
- package/dist/components/core/filter/columns/relations/SolidRelationManyToOneField.js.map +1 -0
- package/dist/components/core/kanban/KanbanBoard.d.ts +1 -1
- package/dist/components/core/kanban/KanbanBoard.d.ts.map +1 -1
- package/dist/components/core/kanban/KanbanBoard.js +11 -11
- package/dist/components/core/kanban/KanbanBoard.js.map +1 -1
- package/dist/components/core/kanban/SolidKanbanView.d.ts.map +1 -1
- package/dist/components/core/kanban/SolidKanbanView.js +113 -202
- package/dist/components/core/kanban/SolidKanbanView.js.map +1 -1
- package/dist/components/core/list/SolidListView.d.ts.map +1 -1
- package/dist/components/core/list/SolidListView.js +312 -62
- package/dist/components/core/list/SolidListView.js.map +1 -1
- package/dist/components/core/list/SolidManyToOneFilterElement.js +2 -3
- package/dist/components/core/list/SolidManyToOneFilterElement.js.map +1 -1
- package/dist/components/core/list/columns/SolidBooleanColumn.js +3 -1
- package/dist/components/core/list/columns/SolidBooleanColumn.js.map +1 -1
- package/dist/components/core/list/columns/SolidSelectionStaticColumn.js +3 -1
- package/dist/components/core/list/columns/SolidSelectionStaticColumn.js.map +1 -1
- package/dist/components/core/list/columns/SolidShortTextColumn.d.ts.map +1 -1
- package/dist/components/core/list/columns/SolidShortTextColumn.js +5 -1
- package/dist/components/core/list/columns/SolidShortTextColumn.js.map +1 -1
- package/dist/components/core/list/columns/SolidTimeColumn.js +3 -1
- package/dist/components/core/list/columns/SolidTimeColumn.js.map +1 -1
- package/dist/components/core/list/columns/SolidUuidColumn.js +3 -1
- package/dist/components/core/list/columns/SolidUuidColumn.js.map +1 -1
- package/dist/components/layout/AppConfig.d.ts +4 -0
- package/dist/components/layout/AppConfig.d.ts.map +1 -0
- package/dist/components/layout/AppConfig.js +57 -0
- package/dist/components/layout/AppConfig.js.map +1 -0
- package/dist/components/layout/AppSidebar.d.ts +3 -0
- package/dist/components/layout/AppSidebar.d.ts.map +1 -0
- package/dist/components/layout/AppSidebar.js +75 -0
- package/dist/components/layout/AppSidebar.js.map +1 -0
- package/dist/components/layout/CustomPagination.d.ts +0 -6
- package/dist/components/layout/CustomPagination.d.ts.map +1 -1
- package/dist/components/layout/CustomPagination.js +48 -27
- package/dist/components/layout/CustomPagination.js.map +1 -1
- package/dist/components/layout/FilterMenu.d.ts.map +1 -1
- package/dist/components/layout/FilterMenu.js +1 -2
- package/dist/components/layout/FilterMenu.js.map +1 -1
- package/dist/components/layout/Layout.d.ts +3 -0
- package/dist/components/layout/Layout.d.ts.map +1 -0
- package/dist/components/layout/Layout.js +114 -0
- package/dist/components/layout/Layout.js.map +1 -0
- package/dist/components/layout/context/layoutcontext.d.ts +5 -0
- package/dist/components/layout/context/layoutcontext.d.ts.map +1 -0
- package/dist/components/layout/context/layoutcontext.js +56 -0
- package/dist/components/layout/context/layoutcontext.js.map +1 -0
- package/dist/components/layout/navbar-two-menu.d.ts.map +1 -1
- package/dist/components/layout/navbar-two-menu.js +5 -5
- package/dist/components/layout/navbar-two-menu.js.map +1 -1
- package/dist/components/layout/user-profile-menu.d.ts.map +1 -1
- package/dist/components/layout/user-profile-menu.js +37 -5
- package/dist/components/layout/user-profile-menu.js.map +1 -1
- package/dist/components/modelsComponents/filterIcon.d.ts.map +1 -1
- package/dist/components/modelsComponents/filterIcon.js.map +1 -1
- package/dist/components/tables/ListViewTable.d.ts.map +1 -1
- package/dist/components/tables/ListViewTable.js +2 -1
- package/dist/components/tables/ListViewTable.js.map +1 -1
- package/dist/helpers/helpers.d.ts +1 -1
- package/dist/helpers/helpers.d.ts.map +1 -1
- package/dist/index.d.ts +20 -14
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +41 -32
- package/dist/index.js.map +1 -1
- package/package.json +2 -1
- package/src/components/auth/SolidForgotPassword.tsx +124 -0
- package/src/components/auth/SolidLogin.tsx +156 -0
- package/src/components/auth/SolidOTPVerify.tsx +127 -0
- package/src/components/auth/SolidRegister.tsx +221 -0
- package/src/components/auth/SolidResetPassword.tsx +160 -0
- package/src/components/core/common/FilterComponent.tsx +45 -40
- package/src/components/core/common/SolidConfigureLayoutElement.tsx +11 -10
- package/src/components/core/common/SolidCreateButton.tsx +1 -1
- package/src/components/core/common/SolidGlobalSearchElement.tsx +33 -13
- package/src/components/core/common/SolidLayoutViews.tsx +87 -0
- package/src/components/core/common/SolidListViewOptions.tsx +31 -0
- package/src/components/core/filter/SolidManyToOneFilterElement.tsx +1 -1
- package/src/components/core/kanban/KanbanBoard.tsx +7 -4
- package/src/components/core/kanban/SolidKanbanView.tsx +110 -248
- package/src/components/core/list/SolidListView.tsx +421 -96
- package/src/components/core/list/SolidManyToOneFilterElement.tsx +3 -3
- package/src/components/core/list/columns/SolidBooleanColumn.tsx +1 -1
- package/src/components/core/list/columns/SolidSelectionStaticColumn.tsx +1 -1
- package/src/components/core/list/columns/SolidShortTextColumn.tsx +8 -3
- package/src/components/core/list/columns/SolidTimeColumn.tsx +1 -1
- package/src/components/core/list/columns/SolidUuidColumn.tsx +1 -1
- package/src/components/layout/AppConfig.tsx +103 -0
- package/src/components/layout/AppSidebar.tsx +170 -0
- package/src/components/layout/CustomPagination.tsx +55 -55
- package/src/components/layout/FilterMenu.tsx +1 -2
- package/src/components/layout/Layout.tsx +136 -0
- package/src/components/layout/context/layoutcontext.tsx +52 -0
- package/src/components/layout/navbar-two-menu.tsx +12 -9
- package/src/components/layout/user-profile-menu.tsx +74 -189
- package/src/components/modelsComponents/filterIcon.tsx +0 -1
- package/src/components/tables/ListViewTable.tsx +4 -3
- package/src/index.ts +158 -144
- package/src/types/index.d.ts +26 -0
- package/src/types/layout.d.ts +94 -0
- package/src/types/next-auth.d.ts +0 -0
- package/dist/components/core/kanban/SolidKanbanFilter.d.ts +0 -2
- package/dist/components/core/kanban/SolidKanbanFilter.d.ts.map +0 -1
- package/dist/components/core/kanban/SolidKanbanViewSearchColumn.d.ts +0 -10
- package/dist/components/core/kanban/SolidKanbanViewSearchColumn.d.ts.map +0 -1
- package/dist/components/core/kanban/SolidManyToOneFilterElement.d.ts +0 -2
- package/dist/components/core/kanban/SolidManyToOneFilterElement.d.ts.map +0 -1
- package/dist/components/core/kanban/SolidSelectionDynamicFilterElement.d.ts +0 -2
- package/dist/components/core/kanban/SolidSelectionDynamicFilterElement.d.ts.map +0 -1
- package/dist/components/core/kanban/SolidSelectionStaticFilterElement.d.ts +0 -2
- package/dist/components/core/kanban/SolidSelectionStaticFilterElement.d.ts.map +0 -1
- package/dist/components/core/kanban/SolidVarInputsFilterElement.d.ts +0 -12
- package/dist/components/core/kanban/SolidVarInputsFilterElement.d.ts.map +0 -1
- package/dist/components/core/kanban/columns/SolidBigintColumn.d.ts +0 -4
- package/dist/components/core/kanban/columns/SolidBigintColumn.d.ts.map +0 -1
- package/dist/components/core/kanban/columns/SolidBooleanColumn.d.ts +0 -4
- package/dist/components/core/kanban/columns/SolidBooleanColumn.d.ts.map +0 -1
- package/dist/components/core/kanban/columns/SolidComputedColumn.d.ts +0 -4
- package/dist/components/core/kanban/columns/SolidComputedColumn.d.ts.map +0 -1
- package/dist/components/core/kanban/columns/SolidDateColumn.d.ts +0 -9
- package/dist/components/core/kanban/columns/SolidDateColumn.d.ts.map +0 -1
- package/dist/components/core/kanban/columns/SolidDatetimeColumn.d.ts +0 -4
- package/dist/components/core/kanban/columns/SolidDatetimeColumn.d.ts.map +0 -1
- package/dist/components/core/kanban/columns/SolidDecimalColumn.d.ts +0 -4
- package/dist/components/core/kanban/columns/SolidDecimalColumn.d.ts.map +0 -1
- package/dist/components/core/kanban/columns/SolidExternalIdColumn.d.ts +0 -4
- package/dist/components/core/kanban/columns/SolidExternalIdColumn.d.ts.map +0 -1
- package/dist/components/core/kanban/columns/SolidFloatColumn.d.ts +0 -4
- package/dist/components/core/kanban/columns/SolidFloatColumn.d.ts.map +0 -1
- package/dist/components/core/kanban/columns/SolidIdColumn.d.ts +0 -4
- package/dist/components/core/kanban/columns/SolidIdColumn.d.ts.map +0 -1
- package/dist/components/core/kanban/columns/SolidIntColumn.d.ts +0 -4
- package/dist/components/core/kanban/columns/SolidIntColumn.d.ts.map +0 -1
- package/dist/components/core/kanban/columns/SolidLongTextColumn.d.ts +0 -4
- package/dist/components/core/kanban/columns/SolidLongTextColumn.d.ts.map +0 -1
- package/dist/components/core/kanban/columns/SolidMediaMultipleColumn.d.ts +0 -4
- package/dist/components/core/kanban/columns/SolidMediaMultipleColumn.d.ts.map +0 -1
- package/dist/components/core/kanban/columns/SolidMediaSingleColumn.d.ts +0 -4
- package/dist/components/core/kanban/columns/SolidMediaSingleColumn.d.ts.map +0 -1
- package/dist/components/core/kanban/columns/SolidRelationColumn.d.ts +0 -4
- package/dist/components/core/kanban/columns/SolidRelationColumn.d.ts.map +0 -1
- package/dist/components/core/kanban/columns/SolidRichTextColumn.d.ts +0 -4
- package/dist/components/core/kanban/columns/SolidRichTextColumn.d.ts.map +0 -1
- package/dist/components/core/kanban/columns/SolidSelectionDynamicColumn.d.ts +0 -4
- package/dist/components/core/kanban/columns/SolidSelectionDynamicColumn.d.ts.map +0 -1
- package/dist/components/core/kanban/columns/SolidSelectionStaticColumn.d.ts +0 -4
- package/dist/components/core/kanban/columns/SolidSelectionStaticColumn.d.ts.map +0 -1
- package/dist/components/core/kanban/columns/SolidShortTextColumn.d.ts +0 -4
- package/dist/components/core/kanban/columns/SolidShortTextColumn.d.ts.map +0 -1
- package/dist/components/core/kanban/columns/SolidTimeColumn.d.ts +0 -4
- package/dist/components/core/kanban/columns/SolidTimeColumn.d.ts.map +0 -1
- package/dist/components/core/kanban/columns/SolidUuidColumn.d.ts +0 -4
- package/dist/components/core/kanban/columns/SolidUuidColumn.d.ts.map +0 -1
- package/dist/components/core/kanban/columns/relations/SolidRelationManyToOneColumn.d.ts +0 -4
- package/dist/components/core/kanban/columns/relations/SolidRelationManyToOneColumn.d.ts.map +0 -1
- package/src/components/common/FilterComponent.tsx +0 -428
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { useRegisterMutation } from "@/redux/api/authApi";
|
|
4
|
+
import { FetchBaseQueryError } from "@reduxjs/toolkit/query/react";
|
|
5
|
+
import { useFormik } from "formik";
|
|
6
|
+
import Link from "next/link";
|
|
7
|
+
import { useRouter } from "next/navigation";
|
|
8
|
+
import { Button } from "primereact/button";
|
|
9
|
+
import { InputText } from "primereact/inputtext";
|
|
10
|
+
import { Message } from "primereact/message";
|
|
11
|
+
import { Password } from "primereact/password";
|
|
12
|
+
import { Toast } from "primereact/toast";
|
|
13
|
+
import { classNames } from "primereact/utils";
|
|
14
|
+
import { ChangeEventHandler, useContext, useEffect, useRef, useState } from "react";
|
|
15
|
+
import * as Yup from "yup";
|
|
16
|
+
import { LayoutContext } from "../layout/context/layoutcontext";
|
|
17
|
+
|
|
18
|
+
const SolidRegister = () => {
|
|
19
|
+
const { layoutConfig } = useContext(LayoutContext);
|
|
20
|
+
const { authLayout } = layoutConfig;
|
|
21
|
+
const toast = useRef<Toast>(null);
|
|
22
|
+
const [password, setPassword] = useState("");
|
|
23
|
+
const [checked, setChecked] = useState<boolean>(false);
|
|
24
|
+
const [showPassword, setShowPassword] = useState(false);
|
|
25
|
+
const [user, setUser] = useState({
|
|
26
|
+
name: "",
|
|
27
|
+
email: "",
|
|
28
|
+
password: "",
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
const validationSchema = Yup.object({
|
|
32
|
+
username: Yup.string().required("User Name is required"),
|
|
33
|
+
email: Yup.string()
|
|
34
|
+
.email("Invalid email address")
|
|
35
|
+
.required("Email is required"),
|
|
36
|
+
password: Yup.string().required("Password is required"),
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
const router = useRouter();
|
|
40
|
+
|
|
41
|
+
const isFormFieldValid = (formik: any, fieldName: string) =>
|
|
42
|
+
formik.touched[fieldName] && formik.errors[fieldName];
|
|
43
|
+
|
|
44
|
+
const [register, { isLoading, error, isSuccess, data }] = useRegisterMutation();
|
|
45
|
+
|
|
46
|
+
const onChange: ChangeEventHandler<HTMLInputElement> = (e) => {
|
|
47
|
+
setUser({ ...user, [e.target.name]: e.target.value });
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
const initialValues = {
|
|
51
|
+
username: "",
|
|
52
|
+
email: "",
|
|
53
|
+
password: "",
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
const formik = useFormik({
|
|
57
|
+
initialValues,
|
|
58
|
+
validationSchema,
|
|
59
|
+
enableReinitialize: true,
|
|
60
|
+
onSubmit: async (values) => {
|
|
61
|
+
try {
|
|
62
|
+
const userData = {
|
|
63
|
+
username: values.username,
|
|
64
|
+
email: values.email,
|
|
65
|
+
password: values.password,
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
await register(userData);
|
|
69
|
+
} catch (err) {
|
|
70
|
+
console.log('inside', err);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
const showError = () => {
|
|
76
|
+
if (error) {
|
|
77
|
+
if ("data" in error) {
|
|
78
|
+
const apiError = error as FetchBaseQueryError;
|
|
79
|
+
const errorMessages = Array.isArray(apiError.data?.message)
|
|
80
|
+
? apiError.data?.message
|
|
81
|
+
: [apiError.data?.message];
|
|
82
|
+
|
|
83
|
+
toast.current?.show({
|
|
84
|
+
severity: "error",
|
|
85
|
+
summary: "Error",
|
|
86
|
+
detail: errorMessages.join(", "),
|
|
87
|
+
life: 3000,
|
|
88
|
+
});
|
|
89
|
+
} else {
|
|
90
|
+
const serializedError = error as Error;
|
|
91
|
+
toast.current?.show({
|
|
92
|
+
severity: "error",
|
|
93
|
+
summary: "Error",
|
|
94
|
+
detail: serializedError.message || "An error occurred",
|
|
95
|
+
life: 3000,
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
useEffect(() => {
|
|
102
|
+
if (error) {
|
|
103
|
+
showError();
|
|
104
|
+
}
|
|
105
|
+
}, [error]);
|
|
106
|
+
|
|
107
|
+
useEffect(() => {
|
|
108
|
+
if (isSuccess) {
|
|
109
|
+
router.replace("/auth/login");
|
|
110
|
+
}
|
|
111
|
+
}, [isSuccess])
|
|
112
|
+
return (
|
|
113
|
+
<>
|
|
114
|
+
<Toast ref={toast} />
|
|
115
|
+
<div className={`auth-container ${authLayout === 'Center' ? 'center' : 'side'}`}>
|
|
116
|
+
<div className="flex justify-content-center">
|
|
117
|
+
<div className="solid-logo flex align-items-center gap-3">
|
|
118
|
+
<img
|
|
119
|
+
alt="solid logo"
|
|
120
|
+
src={'/images/SS-Logo-1 1.png'}
|
|
121
|
+
className="position-relative img-fluid"
|
|
122
|
+
/>
|
|
123
|
+
<div>
|
|
124
|
+
<p className="solid-logo-title">
|
|
125
|
+
Solid<br />Starters
|
|
126
|
+
</p>
|
|
127
|
+
</div>
|
|
128
|
+
</div>
|
|
129
|
+
</div>
|
|
130
|
+
<h2 className="solid-auth-title text-center">Sign Up To Your Account</h2>
|
|
131
|
+
<p className="solid-auth-subtitle text-sm">By continuing, you agree to the <Link href={'#'}>Terms of Service</Link> and acknowledge you’ve read our <Link href={'#'}>Privacy Policy.</Link> </p>
|
|
132
|
+
<>
|
|
133
|
+
<form onSubmit={formik.handleSubmit}>
|
|
134
|
+
<div className="grid">
|
|
135
|
+
<div className="col-6">
|
|
136
|
+
<div className="flex flex-column gap-2">
|
|
137
|
+
<label htmlFor="email" className="solid-auth-input-label">First Name</label>
|
|
138
|
+
<InputText
|
|
139
|
+
id="username"
|
|
140
|
+
name="username"
|
|
141
|
+
placeholder="username"
|
|
142
|
+
onChange={formik.handleChange}
|
|
143
|
+
value={formik.values.username}
|
|
144
|
+
/>
|
|
145
|
+
{isFormFieldValid(formik, "username") && <Message
|
|
146
|
+
className="text-red-500 text-sm"
|
|
147
|
+
severity="error"
|
|
148
|
+
text={formik?.errors?.username?.toString()}
|
|
149
|
+
/>}
|
|
150
|
+
</div>
|
|
151
|
+
</div>
|
|
152
|
+
<div className="col-6">
|
|
153
|
+
<div className="flex flex-column gap-2">
|
|
154
|
+
<label htmlFor="email" className="solid-auth-input-label">Last Name</label>
|
|
155
|
+
<InputText
|
|
156
|
+
id="email"
|
|
157
|
+
name="email"
|
|
158
|
+
placeholder="Yourgmail@123.com"
|
|
159
|
+
onChange={formik.handleChange}
|
|
160
|
+
value={formik.values.email}
|
|
161
|
+
/>
|
|
162
|
+
{isFormFieldValid(formik, "email") && <Message
|
|
163
|
+
className="text-red-500 text-sm"
|
|
164
|
+
severity="error"
|
|
165
|
+
text={formik?.errors?.email?.toString()}
|
|
166
|
+
/>}
|
|
167
|
+
</div>
|
|
168
|
+
</div>
|
|
169
|
+
</div>
|
|
170
|
+
<div className="flex flex-column gap-2 mt-3">
|
|
171
|
+
<label htmlFor="email" className="solid-auth-input-label">Email</label>
|
|
172
|
+
<InputText
|
|
173
|
+
id="email"
|
|
174
|
+
name="email"
|
|
175
|
+
placeholder="Yourgmail@123.com"
|
|
176
|
+
onChange={formik.handleChange}
|
|
177
|
+
value={formik.values.email}
|
|
178
|
+
/>
|
|
179
|
+
{isFormFieldValid(formik, "email") && <Message
|
|
180
|
+
className="text-red-500 text-sm"
|
|
181
|
+
severity="error"
|
|
182
|
+
text={formik?.errors?.email?.toString()}
|
|
183
|
+
/>}
|
|
184
|
+
</div>
|
|
185
|
+
<div className="flex flex-column gap-2 mt-3">
|
|
186
|
+
<label htmlFor="password" className="solid-auth-input-label">Password</label>
|
|
187
|
+
<Password
|
|
188
|
+
id="password"
|
|
189
|
+
name="password"
|
|
190
|
+
value={formik.values.password}
|
|
191
|
+
onChange={formik.handleChange}
|
|
192
|
+
placeholder="***************"
|
|
193
|
+
toggleMask
|
|
194
|
+
className={classNames("", {
|
|
195
|
+
"p-invalid": isFormFieldValid(formik, "password"),
|
|
196
|
+
})}
|
|
197
|
+
inputClassName="w-full"
|
|
198
|
+
feedback={false}
|
|
199
|
+
/>
|
|
200
|
+
{isFormFieldValid(formik, "password") && <Message
|
|
201
|
+
className="text-red-500 text-sm"
|
|
202
|
+
severity="error"
|
|
203
|
+
text={formik?.errors?.password?.toString()}
|
|
204
|
+
/>}
|
|
205
|
+
</div>
|
|
206
|
+
<div className="mt-4">
|
|
207
|
+
<Button className="w-full font-light" label="Sign Up" />
|
|
208
|
+
</div>
|
|
209
|
+
</form>
|
|
210
|
+
</>
|
|
211
|
+
</div>
|
|
212
|
+
<div className="text-center mt-5">
|
|
213
|
+
<div className="text-sm text-400 secondary-dark-color">
|
|
214
|
+
Already have an account ? <Link className="font-bold" href="/auth/login">Sign In</Link>
|
|
215
|
+
</div>
|
|
216
|
+
</div>
|
|
217
|
+
</>
|
|
218
|
+
);
|
|
219
|
+
};
|
|
220
|
+
|
|
221
|
+
export default SolidRegister;
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { Form, Formik } from "formik";
|
|
4
|
+
import { signIn } from "next-auth/react";
|
|
5
|
+
import Link from "next/link";
|
|
6
|
+
import { useRouter } from "next/navigation";
|
|
7
|
+
import { Button } from "primereact/button";
|
|
8
|
+
import { Message } from "primereact/message";
|
|
9
|
+
import { Password } from "primereact/password";
|
|
10
|
+
import { Toast } from "primereact/toast";
|
|
11
|
+
import { classNames } from "primereact/utils";
|
|
12
|
+
import { useContext, useRef, useState } from "react";
|
|
13
|
+
import * as Yup from "yup";
|
|
14
|
+
import { LayoutContext } from "../layout/context/layoutcontext";
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
const SolidResetPassword = () => {
|
|
18
|
+
const { layoutConfig } = useContext(LayoutContext);
|
|
19
|
+
const { authLayout } = layoutConfig;
|
|
20
|
+
const toast = useRef<Toast>(null);
|
|
21
|
+
const router = useRouter();
|
|
22
|
+
|
|
23
|
+
const [password, setPassword] = useState('');
|
|
24
|
+
const [checked, setChecked] = useState<boolean>(false);
|
|
25
|
+
|
|
26
|
+
const validationSchema = Yup.object({
|
|
27
|
+
email: Yup.string()
|
|
28
|
+
.email("Invalid email address")
|
|
29
|
+
.required("Email is required"),
|
|
30
|
+
password: Yup.string().required("Password is required"),
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
const showToast = (severity: "success" | "error", summary: string, detail: string) => {
|
|
34
|
+
toast.current?.show({
|
|
35
|
+
severity,
|
|
36
|
+
summary,
|
|
37
|
+
detail,
|
|
38
|
+
life: 3000,
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
const isFormFieldValid = (formik: any, fieldName: string) =>
|
|
43
|
+
formik.touched[fieldName] && formik.errors[fieldName];
|
|
44
|
+
|
|
45
|
+
return (
|
|
46
|
+
<>
|
|
47
|
+
<Toast ref={toast} />
|
|
48
|
+
<div className={`auth-container ${authLayout === 'Center' ? 'center' : 'side'}`}>
|
|
49
|
+
<div className="flex justify-content-center">
|
|
50
|
+
<div className="solid-logo flex align-items-center gap-3">
|
|
51
|
+
<img
|
|
52
|
+
alt="solid logo"
|
|
53
|
+
src={'/images/SS-Logo-1 1.png'}
|
|
54
|
+
className="position-relative img-fluid"
|
|
55
|
+
/>
|
|
56
|
+
<div>
|
|
57
|
+
<p className="solid-logo-title">
|
|
58
|
+
Solid<br />Starters
|
|
59
|
+
</p>
|
|
60
|
+
</div>
|
|
61
|
+
</div>
|
|
62
|
+
</div>
|
|
63
|
+
<h2 className="solid-auth-title text-center">Create New Password</h2>
|
|
64
|
+
<p className="solid-auth-subtitle text-sm">By continuing, you agree to the <Link href={'#'}>Terms of Service</Link> and acknowledge you’ve read our <Link href={'#'}>Privacy Policy.</Link> </p>
|
|
65
|
+
<>
|
|
66
|
+
<Formik
|
|
67
|
+
initialValues={{
|
|
68
|
+
email: "",
|
|
69
|
+
password: "",
|
|
70
|
+
}}
|
|
71
|
+
validationSchema={validationSchema}
|
|
72
|
+
onSubmit={async (values) => {
|
|
73
|
+
// Handle form submission
|
|
74
|
+
const email = values.email;
|
|
75
|
+
const password = values.password;
|
|
76
|
+
|
|
77
|
+
const response = await signIn("credentials", {
|
|
78
|
+
redirect: false,
|
|
79
|
+
email,
|
|
80
|
+
password,
|
|
81
|
+
});
|
|
82
|
+
if (response?.error) {
|
|
83
|
+
showToast("error", "Login Error", response.error);
|
|
84
|
+
} else {
|
|
85
|
+
showToast("success", "Login Success", "Redirecting to dashboard...");
|
|
86
|
+
router.push("/admin/core/solid-core/user/list");
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
}}
|
|
90
|
+
>
|
|
91
|
+
{(formik) => (
|
|
92
|
+
<Form>
|
|
93
|
+
<div className="flex flex-column gap-2">
|
|
94
|
+
<label htmlFor="email" className="solid-auth-input-label">New Password</label>
|
|
95
|
+
<Password
|
|
96
|
+
id="password"
|
|
97
|
+
placeholder="***************"
|
|
98
|
+
value={password}
|
|
99
|
+
onChange={(e) => {
|
|
100
|
+
setPassword(e.target.value);
|
|
101
|
+
formik.setFieldValue("password", e.target.value);
|
|
102
|
+
}}
|
|
103
|
+
toggleMask
|
|
104
|
+
className={classNames("", {
|
|
105
|
+
"p-invalid": isFormFieldValid(formik, "password"),
|
|
106
|
+
})}
|
|
107
|
+
inputClassName="w-full"
|
|
108
|
+
feedback={false}
|
|
109
|
+
/>
|
|
110
|
+
{isFormFieldValid(formik, "password") && <Message
|
|
111
|
+
className="text-red-500 text-sm"
|
|
112
|
+
severity="error"
|
|
113
|
+
text={formik?.errors?.password?.toString()}
|
|
114
|
+
/>}
|
|
115
|
+
</div>
|
|
116
|
+
<div className="flex flex-column gap-2 mt-4" style={{}}>
|
|
117
|
+
<label htmlFor="password" className="solid-auth-input-label">Confirm Password</label>
|
|
118
|
+
<Password
|
|
119
|
+
id="password"
|
|
120
|
+
placeholder="***************"
|
|
121
|
+
value={password}
|
|
122
|
+
onChange={(e) => {
|
|
123
|
+
setPassword(e.target.value);
|
|
124
|
+
formik.setFieldValue("password", e.target.value);
|
|
125
|
+
}}
|
|
126
|
+
toggleMask
|
|
127
|
+
className={classNames("", {
|
|
128
|
+
"p-invalid": isFormFieldValid(formik, "password"),
|
|
129
|
+
})}
|
|
130
|
+
inputClassName="w-full"
|
|
131
|
+
feedback={false}
|
|
132
|
+
/>
|
|
133
|
+
{isFormFieldValid(formik, "password") && <Message
|
|
134
|
+
className="text-red-500 text-sm"
|
|
135
|
+
severity="error"
|
|
136
|
+
text={formik?.errors?.password?.toString()}
|
|
137
|
+
/>}
|
|
138
|
+
</div>
|
|
139
|
+
{/* <div className="flex align-items-center mt-4">
|
|
140
|
+
<Checkbox inputId="remember" onChange={(e: any) => setChecked(e.checked)} checked={checked} />
|
|
141
|
+
<label htmlFor="remember" className="ml-2">Remember me</label>
|
|
142
|
+
</div> */}
|
|
143
|
+
<div className="mt-4">
|
|
144
|
+
<Button className="w-full font-light" label="Reset Password" />
|
|
145
|
+
</div>
|
|
146
|
+
</Form>
|
|
147
|
+
)}
|
|
148
|
+
</Formik>
|
|
149
|
+
</>
|
|
150
|
+
</div>
|
|
151
|
+
<div className="text-center mt-5">
|
|
152
|
+
<div className="text-sm text-400 secondary-dark-color">
|
|
153
|
+
{'<'} Back to <Link className="font-bold" href="/auth/login">Sign In</Link>
|
|
154
|
+
</div>
|
|
155
|
+
</div>
|
|
156
|
+
</>
|
|
157
|
+
);
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
export default SolidResetPassword;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
2
|
"use client";
|
|
3
|
+
|
|
3
4
|
import { Calendar } from 'primereact/calendar';
|
|
4
5
|
import { Dropdown } from 'primereact/dropdown';
|
|
5
6
|
import { InputNumber } from 'primereact/inputnumber';
|
|
@@ -9,17 +10,17 @@ import React, { useEffect, useState } from 'react';
|
|
|
9
10
|
import { SolidFilterFields } from '../filter/SolidFilterFields';
|
|
10
11
|
import { Button } from 'primereact/button';
|
|
11
12
|
|
|
12
|
-
enum FilterRuleType {
|
|
13
|
+
export enum FilterRuleType {
|
|
13
14
|
RULE = 'rule',
|
|
14
15
|
RULE_GROUP = 'rule_group'
|
|
15
16
|
}
|
|
16
17
|
|
|
17
|
-
enum FilterOperator {
|
|
18
|
+
export enum FilterOperator {
|
|
18
19
|
AND = 'and',
|
|
19
20
|
OR = 'or'
|
|
20
21
|
}
|
|
21
22
|
|
|
22
|
-
enum FilterMatchMode {
|
|
23
|
+
export enum FilterMatchMode {
|
|
23
24
|
STARTS_WITH = 'startsWith',
|
|
24
25
|
CONTAINS = 'contains',
|
|
25
26
|
EQUALS = 'equals',
|
|
@@ -27,18 +28,18 @@ enum FilterMatchMode {
|
|
|
27
28
|
LESS_THAN = 'lt',
|
|
28
29
|
}
|
|
29
30
|
|
|
30
|
-
interface FilterRule {
|
|
31
|
+
export interface FilterRule {
|
|
31
32
|
id: number;
|
|
32
33
|
type: FilterRuleType;
|
|
33
34
|
matchOperator?: FilterOperator;
|
|
34
|
-
fieldName?: string;
|
|
35
|
-
matchMode?: FilterMatchMode;
|
|
35
|
+
fieldName?: string | null;
|
|
36
|
+
matchMode?: FilterMatchMode | null;
|
|
36
37
|
value?: any;
|
|
37
38
|
parentRule: number | null;
|
|
38
39
|
children?: FilterRule[];
|
|
39
40
|
}
|
|
40
41
|
|
|
41
|
-
interface Field {
|
|
42
|
+
export interface Field {
|
|
42
43
|
name: string;
|
|
43
44
|
type: 'string' | 'number' | 'date';
|
|
44
45
|
}
|
|
@@ -220,18 +221,18 @@ const FilterRuleComponent = ({ viewData, fields, rule, onChange, onAddRule, onAd
|
|
|
220
221
|
|
|
221
222
|
</button>
|
|
222
223
|
|
|
223
|
-
|
|
224
|
-
|
|
224
|
+
<button onClick={() => onDelete(rule.id)}>
|
|
225
|
+
<div className="card flex justify-content-center">
|
|
225
226
|
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
227
|
+
<i className="custom-target-icon pi pi-trash p-text-secondary p-overlay-badge"
|
|
228
|
+
data-pr-tooltip="Delete Rule"
|
|
229
|
+
data-pr-position="right"
|
|
230
|
+
data-pr-at="right+5 top"
|
|
231
|
+
data-pr-my="left center-2"
|
|
232
|
+
style={{ fontSize: '1.2rem', cursor: 'pointer' }}>
|
|
233
|
+
</i>
|
|
234
|
+
</div>
|
|
235
|
+
</button>
|
|
235
236
|
|
|
236
237
|
</div>
|
|
237
238
|
|
|
@@ -302,28 +303,28 @@ const FilterGroupComponent = ({ viewData, fields, group, onChange, onAddRule, on
|
|
|
302
303
|
};
|
|
303
304
|
|
|
304
305
|
// Main Filter component
|
|
305
|
-
const FilterComponent = ({ viewData, fields }) => {
|
|
306
|
-
const initialState: FilterRule[] = [
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
];
|
|
325
|
-
|
|
326
|
-
const [filterRules, setFilterRules] = useState<FilterRule[]>(initialState);
|
|
306
|
+
const FilterComponent = ({ viewData, fields, filterRules, setFilterRules, handleApplyCustomFilter }) => {
|
|
307
|
+
// const initialState: FilterRule[] = [
|
|
308
|
+
// {
|
|
309
|
+
// id: 1,
|
|
310
|
+
// type: FilterRuleType.RULE_GROUP,
|
|
311
|
+
// matchOperator: FilterOperator.OR,
|
|
312
|
+
// parentRule: null,
|
|
313
|
+
// children: [
|
|
314
|
+
// {
|
|
315
|
+
// id: Date.now() + getRandomInt(1, 500),
|
|
316
|
+
// type: FilterRuleType.RULE,
|
|
317
|
+
// fieldName: null,
|
|
318
|
+
// matchMode: null,
|
|
319
|
+
// value: null,
|
|
320
|
+
// parentRule: 1,
|
|
321
|
+
// children: []
|
|
322
|
+
// }
|
|
323
|
+
// ]
|
|
324
|
+
// }
|
|
325
|
+
// ];
|
|
326
|
+
|
|
327
|
+
// const [filterRules, setFilterRules] = useState<FilterRule[]>(initialState);
|
|
327
328
|
const [printedState, setPrintedState] = useState<string>('');
|
|
328
329
|
|
|
329
330
|
const addChild = (rules, parentId, newChild) => {
|
|
@@ -421,8 +422,12 @@ const FilterComponent = ({ viewData, fields }) => {
|
|
|
421
422
|
|
|
422
423
|
const handlePrintState = () => {
|
|
423
424
|
setPrintedState(JSON.stringify(filterRules, null, 2)); // Pretty format the state
|
|
425
|
+
handleApplyCustomFilter()
|
|
424
426
|
};
|
|
425
427
|
|
|
428
|
+
|
|
429
|
+
|
|
430
|
+
|
|
426
431
|
return (
|
|
427
432
|
<div className=''>
|
|
428
433
|
<div className="filter-builder">
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
|
+
import { Button } from "primereact/button";
|
|
2
3
|
import { Dialog } from "primereact/dialog";
|
|
3
4
|
import { useState } from "react";
|
|
4
5
|
|
|
@@ -7,23 +8,23 @@ export const SolidConfigureLayoutElement = ({ }: any) => {
|
|
|
7
8
|
|
|
8
9
|
const [visible, setVisible] = useState<boolean>(false);
|
|
9
10
|
|
|
10
|
-
const [componentsToRender, setComponentsToRender] = useState(["Header", "NonExistentComponent"]);
|
|
11
|
-
|
|
12
11
|
return (
|
|
13
|
-
<div className="
|
|
14
|
-
<
|
|
15
|
-
|
|
12
|
+
<div className="flex justify-content-center">
|
|
13
|
+
<Button
|
|
14
|
+
type="button"
|
|
15
|
+
size="small"
|
|
16
|
+
icon="pi pi-cog"
|
|
17
|
+
onClick={() => setVisible(true)}
|
|
18
|
+
severity="secondary"
|
|
19
|
+
outlined
|
|
20
|
+
/>
|
|
16
21
|
<Dialog header="Header" visible={visible} style={{ width: '50vw' }} onHide={() => { if (!visible) return; setVisible(false); }}>
|
|
17
22
|
<p className="m-0">
|
|
18
|
-
ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
|
|
23
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
|
|
19
24
|
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
|
|
20
25
|
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
|
|
21
26
|
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
|
22
27
|
</p>
|
|
23
|
-
<div>
|
|
24
|
-
|
|
25
|
-
</div>
|
|
26
|
-
|
|
27
28
|
</Dialog>
|
|
28
29
|
</div>
|
|
29
30
|
)
|
|
@@ -13,7 +13,7 @@ export const SolidCreateButton = ({ url }: any) => {
|
|
|
13
13
|
return (
|
|
14
14
|
<div>
|
|
15
15
|
<Link href={createPath}>
|
|
16
|
-
<Button type="button" icon="pi pi-plus" label="Add" size='small'
|
|
16
|
+
<Button type="button" icon="pi pi-plus" label="Add" size='small'></Button>
|
|
17
17
|
</Link>
|
|
18
18
|
</div>
|
|
19
19
|
)
|
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
import { useEffect, useState } from "react";
|
|
1
|
+
import { useEffect, useRef, useState } from "react";
|
|
3
2
|
import { Dialog } from "primereact/dialog";
|
|
4
3
|
import { TabPanel, TabView } from "primereact/tabview";
|
|
5
4
|
import { SolidSearchBox } from "./SolidSearchBox";
|
|
6
5
|
import FilterComponent from "@/components/core/common/FilterComponent";
|
|
7
6
|
import { Button } from "primereact/button";
|
|
7
|
+
import { InputText } from "primereact/inputtext";
|
|
8
|
+
import { OverlayPanel } from "primereact/overlaypanel";
|
|
9
|
+
import { Divider } from "primereact/divider";
|
|
8
10
|
|
|
9
11
|
|
|
10
|
-
export const SolidGlobalSearchElement = ({ viewData, applyFilter,
|
|
12
|
+
export const SolidGlobalSearchElement = ({ viewData, applyFilter, showGlobalSearchElement, setShowGlobalSearchElement,customFilter, setCustomFilter,handleApplyCustomFilter }: any) => {
|
|
11
13
|
|
|
12
|
-
const [visible, setVisible] = useState<boolean>(false);
|
|
13
14
|
const handleApplyFilter = (filters: any) => {
|
|
14
|
-
|
|
15
|
+
setShowGlobalSearchElement(false);
|
|
15
16
|
applyFilter(filters)
|
|
16
17
|
}
|
|
17
18
|
|
|
@@ -26,20 +27,39 @@ export const SolidGlobalSearchElement = ({ viewData, applyFilter, filterValues,
|
|
|
26
27
|
}
|
|
27
28
|
}, [])
|
|
28
29
|
|
|
30
|
+
const op = useRef(null);
|
|
29
31
|
|
|
30
32
|
return (
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
<div className="flex justify-content-center solid-custom-filter-wrapper">
|
|
34
|
+
<div className="p-inputgroup flex-1"
|
|
35
|
+
onClick={(e) =>
|
|
36
|
+
// @ts-ignore
|
|
37
|
+
op.current.toggle(e)}
|
|
38
|
+
>
|
|
39
|
+
<InputText placeholder="Search Here" className="p-inputtext-sm" />
|
|
40
|
+
<Button
|
|
41
|
+
icon="pi pi-search"
|
|
42
|
+
severity="secondary"
|
|
43
|
+
outlined size="small"
|
|
44
|
+
/>
|
|
45
|
+
</div>
|
|
46
|
+
<OverlayPanel ref={op} className="solid-custom-overlay" style={{ minWidth: 378 }}>
|
|
47
|
+
<div className="px-4 py-3">
|
|
48
|
+
<p className="m-0">Searching...</p>
|
|
49
|
+
</div>
|
|
50
|
+
<Divider className="m-0" />
|
|
51
|
+
<div className="px-2 py-1">
|
|
52
|
+
<Button text size="small" label="Custom Filter" iconPos="left" icon='pi pi-plus' onClick={() => setShowGlobalSearchElement(true)}/>
|
|
53
|
+
</div>
|
|
54
|
+
</OverlayPanel>
|
|
55
|
+
<Dialog header={false} className="search-filter-popup" showHeader={false} visible={showGlobalSearchElement} style={{ width: '50vw' }} onHide={() => { if (!showGlobalSearchElement) return; setShowGlobalSearchElement(false); }}>
|
|
36
56
|
<div className="flex field-popup-navigation gap-3 justify-content-between ">
|
|
37
57
|
<div className="flex text-2xl font-bold align-items-center ml-4" style={{ color: '#000' }}>
|
|
38
|
-
<i className="pi pi-search" style={{ marginRight: '5px',color:"#06b6d4" }}></i>
|
|
58
|
+
<i className="pi pi-search" style={{ marginRight: '5px', color: "#06b6d4" }}></i>
|
|
39
59
|
<p className="popup-heading m-0">Search and Filter</p>
|
|
40
60
|
</div>
|
|
41
61
|
<div className="flex align-items-center gap-3 close-popup">
|
|
42
|
-
<Button icon="pi pi-times" rounded text aria-label="Cancel" type="reset" size="small" onClick={() =>
|
|
62
|
+
<Button icon="pi pi-times" rounded text aria-label="Cancel" type="reset" size="small" onClick={() => setShowGlobalSearchElement(false)} />
|
|
43
63
|
</div>
|
|
44
64
|
</div>
|
|
45
65
|
<div className="card relative">
|
|
@@ -49,7 +69,7 @@ export const SolidGlobalSearchElement = ({ viewData, applyFilter, filterValues,
|
|
|
49
69
|
</TabPanel>
|
|
50
70
|
<TabPanel header="Filter" >
|
|
51
71
|
{fields.length > 0 &&
|
|
52
|
-
<FilterComponent viewData={viewData} fields={fields}></FilterComponent>
|
|
72
|
+
<FilterComponent viewData={viewData} fields={fields} filterRules={customFilter} setFilterRules={setCustomFilter} handleApplyCustomFilter={handleApplyCustomFilter} ></FilterComponent>
|
|
53
73
|
}
|
|
54
74
|
{/* <SolidKanbanFilter solidKanbanViewMetaData={solidKanbanViewMetaData} handleApplyFilter={handleApplyFilter} filterValues={filterValues} setFilterValues={setFilterValues}></SolidKanbanFilter> */}
|
|
55
75
|
</TabPanel>
|