From db70d1e1c448dbc70e2276b1fa0216e8f564530c Mon Sep 17 00:00:00 2001 From: mukilan2815 Date: Wed, 3 Jul 2024 10:02:03 +0530 Subject: [PATCH] done --- src/App.js | 18 +- src/Components/ATable.jsx | 9 + src/Components/BTable.jsx | 7 + src/Components/CTable.jsx | 7 + src/Pages/Admin/AdminAO.jsx | 230 ------------------ src/Pages/Admin/AdminCEO.jsx | 9 - src/Pages/Admin/AdminGC.jsx | 107 -------- src/Pages/Admin/AdminMC.jsx | 9 - src/Pages/Admin/AdminOB.jsx | 7 - src/Pages/Admin/Allmembers.jsx | 139 +++++++++++ src/Pages/Admin/LoginAdmin.jsx | 94 +++++++ src/Pages/Admin/Navbar.jsx | 4 +- src/Pages/Admin/makeData.jsx | 64 ----- src/Pages/Client/NewMember/Membershipform.jsx | 27 +- 14 files changed, 279 insertions(+), 452 deletions(-) create mode 100644 src/Components/ATable.jsx create mode 100644 src/Components/BTable.jsx create mode 100644 src/Components/CTable.jsx delete mode 100644 src/Pages/Admin/AdminAO.jsx delete mode 100644 src/Pages/Admin/AdminCEO.jsx delete mode 100644 src/Pages/Admin/AdminGC.jsx delete mode 100644 src/Pages/Admin/AdminMC.jsx delete mode 100644 src/Pages/Admin/AdminOB.jsx create mode 100644 src/Pages/Admin/Allmembers.jsx create mode 100644 src/Pages/Admin/LoginAdmin.jsx delete mode 100644 src/Pages/Admin/makeData.jsx diff --git a/src/App.js b/src/App.js index 70a19f2..bd10e63 100644 --- a/src/App.js +++ b/src/App.js @@ -6,14 +6,10 @@ import Submittedform from "./Pages/Client/NewMember/Submittedform"; import Submittedpayment from "./Pages/Client/NewMember/Submittedpayment"; import Login from "./Pages/Client/ExistingMember/Login"; -import AdminGC from "./Pages/Admin/AdminGC"; -import AdminAO from "./Pages/Admin/AdminAO"; -import AdminCEO from "./Pages/Admin/AdminCEO"; -import AdminOB from "./Pages/Admin/AdminOB"; -import AdminMC from "./Pages/Admin/AdminMC"; - import Home from "./Pages/Admin/Home"; import Analysis from "./Pages/Admin/Analysis"; +import LoginAdmin from "./Pages/Admin/LoginAdmin"; +import Allmembers from "./Pages/Admin/Allmembers"; function App() { return ( @@ -30,13 +26,9 @@ function App() { {/* Admin */} - } /> - } /> - } /> - } /> - } /> - } /> - + } /> + } /> + } /> } /> diff --git a/src/Components/ATable.jsx b/src/Components/ATable.jsx new file mode 100644 index 0000000..b161890 --- /dev/null +++ b/src/Components/ATable.jsx @@ -0,0 +1,9 @@ +import React from 'react' + +const ATable = () => { + return ( +
ATable
+ ) +} + +export default ATable \ No newline at end of file diff --git a/src/Components/BTable.jsx b/src/Components/BTable.jsx new file mode 100644 index 0000000..30c3cd4 --- /dev/null +++ b/src/Components/BTable.jsx @@ -0,0 +1,7 @@ +import React from "react"; + +const BTable = () => { + return
BTable
; +}; + +export default BTable; diff --git a/src/Components/CTable.jsx b/src/Components/CTable.jsx new file mode 100644 index 0000000..1a6ae69 --- /dev/null +++ b/src/Components/CTable.jsx @@ -0,0 +1,7 @@ +import React from "react"; + +const CTable = () => { + return
CTable
; +}; + +export default CTable; diff --git a/src/Pages/Admin/AdminAO.jsx b/src/Pages/Admin/AdminAO.jsx deleted file mode 100644 index cafdc24..0000000 --- a/src/Pages/Admin/AdminAO.jsx +++ /dev/null @@ -1,230 +0,0 @@ -import { useMemo } from "react"; -import { - MRT_GlobalFilterTextInput, - MRT_ToggleFiltersButton, - MantineReactTable, - useMantineReactTable, -} from "mantine-react-table"; -import { Box, Button, Flex, Menu, Text, Title } from "@mantine/core"; -import { IconUserCircle, IconSend } from "@tabler/icons-react"; -import { formData } from "./makeData"; - -const Example = () => { - const columns = useMemo( - () => [ - { - id: "employee", //id used to define `group` column - header: "Employee", - columns: [ - { - accessorFn: (row) => `${row.firstName} ${row.lastName}`, //accessorFn used to join multiple data into a single cell - id: "name", //id is still required when using accessorFn instead of accessorKey - header: "Name", - size: 250, - filterVariant: "autocomplete", - Cell: ({ renderedCellValue, row }) => ( - - avatar - {renderedCellValue} - - ), - }, - { - accessorKey: "email", //accessorKey used to define `data` column. `id` gets set to accessorKey automatically - enableClickToCopy: true, - header: "Email", - size: 300, - }, - ], - }, - { - id: "id", - header: "Job Info", - columns: [ - { - accessorKey: "salary", - header: "Salary", - size: 200, - filterVariant: "range-slider", - mantineFilterRangeSliderProps: { - color: "indigo", - label: (value) => - value?.toLocaleString?.("en-US", { - style: "currency", - currency: "USD", - minimumFractionDigits: 0, - maximumFractionDigits: 0, - }), - }, - //custom conditional format and styling - Cell: ({ cell }) => ( - ({ - backgroundColor: - cell.getValue() < 50_000 - ? theme.colors.red[9] - : cell.getValue() >= 50_000 && cell.getValue() < 75_000 - ? theme.colors.yellow[9] - : theme.colors.green[9], - borderRadius: "4px", - color: "#fff", - maxWidth: "9ch", - padding: "4px", - })} - > - {cell.getValue()?.toLocaleString?.("en-US", { - style: "currency", - currency: "USD", - minimumFractionDigits: 0, - maximumFractionDigits: 0, - })} - - ), - }, - { - accessorKey: "jobTitle", //hey a simple column for once - header: "Job Title", - filterVariant: "multi-select", - size: 350, - }, - { - accessorFn: (row) => { - //convert to Date for sorting and filtering - const sDay = new Date(row.startDate); - sDay.setHours(0, 0, 0, 0); // remove time from date (useful if filter by equals exact date) - return sDay; - }, - id: "startDate", - header: "Start Date", - filterVariant: "date-range", - sortingFn: "datetime", - enableColumnFilterModes: false, //keep this as only date-range filter with between inclusive filterFn - Cell: ({ cell }) => cell.getValue()?.toLocaleDateString(), //render Date as a string - Header: ({ column }) => {column.columnDef.header}, //custom header markup - }, - ], - }, - ], - [] - ); - - const table = useMantineReactTable({ - columns, - data, - enableColumnFilterModes: true, - enableColumnOrdering: true, - enableFacetedValues: true, - enableGrouping: true, - enablePinning: true, - enableRowActions: true, - enableRowSelection: true, - initialState: { showColumnFilters: true, showGlobalFilter: true }, - paginationDisplayMode: "pages", - positionToolbarAlertBanner: "bottom", - mantinePaginationProps: { - radius: "xl", - size: "lg", - }, - mantineSearchTextInputProps: { - placeholder: "Search Employees", - }, - renderDetailPanel: ({ row }) => ( - - avatar - - Signature Catch Phrase: - "{row.original.signatureCatchPhrase}" - - - ), - renderRowActionMenuItems: () => ( - <> - }>View Profile - }>Send Email - - ), - renderTopToolbar: ({ table }) => { - const handleDeactivate = () => { - table.getSelectedRowModel().flatRows.map((row) => { - alert("deactivating " + row.getValue("name")); - }); - }; - - const handleActivate = () => { - table.getSelectedRowModel().flatRows.map((row) => { - alert("activating " + row.getValue("name")); - }); - }; - - const handleContact = () => { - table.getSelectedRowModel().flatRows.map((row) => { - alert("contact " + row.getValue("name")); - }); - }; - - return ( - - - {/* import MRT sub-components */} - - - - - - - - - - ); - }, - }); - - return ; -}; - -export default Example; diff --git a/src/Pages/Admin/AdminCEO.jsx b/src/Pages/Admin/AdminCEO.jsx deleted file mode 100644 index c90c5ff..0000000 --- a/src/Pages/Admin/AdminCEO.jsx +++ /dev/null @@ -1,9 +0,0 @@ -import React from 'react' - -const AdminCEO = () => { - return ( -
AdminCEO
- ) -} - -export default AdminCEO \ No newline at end of file diff --git a/src/Pages/Admin/AdminGC.jsx b/src/Pages/Admin/AdminGC.jsx deleted file mode 100644 index 0756058..0000000 --- a/src/Pages/Admin/AdminGC.jsx +++ /dev/null @@ -1,107 +0,0 @@ -import React, { useState } from "react"; - -const AdminGC = () => { - const [popup, setPopup] = useState(false); - const [rejectingRecord, setRejectingRecord] = useState({}); - const [reason, setReason] = useState(""); - - return ( - <> - {popup && ( -
-
-

Popup

-

- Please Provide the reason to Reject the application of{" "} - {rejectingRecord["Nameofapplicant"]} -

-