diff --git a/components/Inventors/viewDetails/Drawer.jsx b/components/Inventors/viewDetails/Drawer.jsx new file mode 100644 index 0000000..ee74dd6 --- /dev/null +++ b/components/Inventors/viewDetails/Drawer.jsx @@ -0,0 +1,246 @@ +"use client"; + +import { useState } from "react"; +import { + Button, + Dialog, + DialogBackdrop, + DialogPanel, + TransitionChild, +} from "@headlessui/react"; +import { XMarkIcon } from "@heroicons/react/24/outline"; +import Image from "next/image"; +import ProfileImage from "../../../public/images/demo-pics.png"; + +export default function LeadDetailsModal({ open, onClose, lead }) { + if (!lead) return null; + + const handleAction = (action) => { + console.log(`Lead ${action}:`, lead.name); + onClose(); + }; + + const renderTextWithLabel = (label, text, fallback) => ( +
+

{label}:

+

{text || fallback}

+
+ ); + + const renderLinkWithLabel = (label, url, fallback) => ( +
+

{label}:

+

+ + {url || fallback} + +

+
+ ); + + return ( + + +
+
+
+ + +
+ +
+
+
+
+
+ + +
+ +
+
+ {lead.name} { + e.target.src = ProfileImage; + }} + /> +
+
+

+ {lead.name} +

+

+ {lead.position || "No Job Title"} + + @ {lead.company || "No Company"} + +

+
+
+
+ {renderTextWithLabel( + "Email", + lead.email, + "No Email" + )} + {renderTextWithLabel( + "Phone number", + lead.phone, + "No Phone Number" + )} + {renderTextWithLabel( + "Location", + lead.location, + "No Location" + )} +
+

+ Areas of Interest: +

+

+ {lead.interests || "No Interests"} +

+
+
+
+
+ {renderTextWithLabel( + "Experience", + lead.experience, + "No Experience" + )} + {renderTextWithLabel( + "Primary skill", + lead.primarySkill, + "No Primary Skill" + )} + {renderTextWithLabel( + "Secondary skill", + lead.secondarySkill, + "No Secondary Skill" + )} +
+
+
+
+ +
+
+
+

+ Bio/Short Description +

+

+ {lead.bio || "No bio available"} +

+
+
+
+

+ TECHNOLOGIES/TOOLS +

+
+ {lead.technologies?.length ? ( + lead.technologies.map((tech, index) => ( + + {tech} + + )) + ) : ( +

+ No technologies listed +

+ )} +
+
+
+
+ +
+

+ Contact Info +

+
+
+ {renderLinkWithLabel( + "Skill Profile URL", + lead.skillProfileURL, + "No URL" + )} + {renderLinkWithLabel( + "Personal website (Portfolio)", + lead.personalWebsite, + "No URL" + )} + {renderLinkWithLabel( + "X (Twitter)", + lead.twitter, + "No Twitter" + )} +
+
+
+ {renderLinkWithLabel( + "LinkedIn", + lead.linkedin, + "No LinkedIn" + )} + {renderLinkWithLabel( + "Facebook", + lead.facebook, + "No Facebook" + )} +
+
+
+
+
+
+
+
+
+
+
+ ); +} diff --git a/package-lock.json b/package-lock.json index 9c74058..41ea46b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,6 +8,8 @@ "name": "inventors-admin", "version": "0.1.0", "dependencies": { + "@headlessui/react": "^2.1.10", + "@heroicons/react": "^2.1.5", "next": "14.2.13", "react": "^18", "react-dom": "^18" @@ -88,6 +90,87 @@ "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, + "node_modules/@floating-ui/core": { + "version": "1.6.8", + "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.6.8.tgz", + "integrity": "sha512-7XJ9cPU+yI2QeLS+FCSlqNFZJq8arvswefkZrYI1yQBbftw6FyrZOxYSh+9S7z7TpeWlRt9zJ5IhM1WIL334jA==", + "license": "MIT", + "dependencies": { + "@floating-ui/utils": "^0.2.8" + } + }, + "node_modules/@floating-ui/dom": { + "version": "1.6.11", + "resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.6.11.tgz", + "integrity": "sha512-qkMCxSR24v2vGkhYDo/UzxfJN3D4syqSjyuTFz6C7XcpU1pASPRieNI0Kj5VP3/503mOfYiGY891ugBX1GlABQ==", + "license": "MIT", + "dependencies": { + "@floating-ui/core": "^1.6.0", + "@floating-ui/utils": "^0.2.8" + } + }, + "node_modules/@floating-ui/react": { + "version": "0.26.25", + "resolved": "https://registry.npmjs.org/@floating-ui/react/-/react-0.26.25.tgz", + "integrity": "sha512-hZOmgN0NTOzOuZxI1oIrDu3Gcl8WViIkvPMpB4xdd4QD6xAMtwgwr3VPoiyH/bLtRcS1cDnhxLSD1NsMJmwh/A==", + "license": "MIT", + "dependencies": { + "@floating-ui/react-dom": "^2.1.2", + "@floating-ui/utils": "^0.2.8", + "tabbable": "^6.0.0" + }, + "peerDependencies": { + "react": ">=16.8.0", + "react-dom": ">=16.8.0" + } + }, + "node_modules/@floating-ui/react-dom": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@floating-ui/react-dom/-/react-dom-2.1.2.tgz", + "integrity": "sha512-06okr5cgPzMNBy+Ycse2A6udMi4bqwW/zgBF/rwjcNqWkyr82Mcg8b0vjX8OJpZFy/FKjJmw6wV7t44kK6kW7A==", + "license": "MIT", + "dependencies": { + "@floating-ui/dom": "^1.0.0" + }, + "peerDependencies": { + "react": ">=16.8.0", + "react-dom": ">=16.8.0" + } + }, + "node_modules/@floating-ui/utils": { + "version": "0.2.8", + "resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.2.8.tgz", + "integrity": "sha512-kym7SodPp8/wloecOpcmSnWJsK7M0E5Wg8UcFA+uO4B9s5d0ywXOEro/8HM9x0rW+TljRzul/14UYz3TleT3ig==", + "license": "MIT" + }, + "node_modules/@headlessui/react": { + "version": "2.1.10", + "resolved": "https://registry.npmjs.org/@headlessui/react/-/react-2.1.10.tgz", + "integrity": "sha512-6mLa2fjMDAFQi+/R10B+zU3edsUk/MDtENB2zHho0lqKU1uzhAfJLUduWds4nCo8wbl3vULtC5rJfZAQ1yqIng==", + "license": "MIT", + "dependencies": { + "@floating-ui/react": "^0.26.16", + "@react-aria/focus": "^3.17.1", + "@react-aria/interactions": "^3.21.3", + "@tanstack/react-virtual": "^3.8.1" + }, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "react": "^18", + "react-dom": "^18" + } + }, + "node_modules/@heroicons/react": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@heroicons/react/-/react-2.1.5.tgz", + "integrity": "sha512-FuzFN+BsHa+7OxbvAERtgBTNeZpUjgM/MIizfVkSCL2/edriN0Hx/DWRCR//aPYwO5QX/YlgLGXk+E3PcfZwjA==", + "license": "MIT", + "peerDependencies": { + "react": ">= 16" + } + }, "node_modules/@humanwhocodes/config-array": { "version": "0.13.0", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.13.0.tgz", @@ -439,6 +522,89 @@ "node": ">=14" } }, + "node_modules/@react-aria/focus": { + "version": "3.18.4", + "resolved": "https://registry.npmjs.org/@react-aria/focus/-/focus-3.18.4.tgz", + "integrity": "sha512-91J35077w9UNaMK1cpMUEFRkNNz0uZjnSwiyBCFuRdaVuivO53wNC9XtWSDNDdcO5cGy87vfJRVAiyoCn/mjqA==", + "license": "Apache-2.0", + "dependencies": { + "@react-aria/interactions": "^3.22.4", + "@react-aria/utils": "^3.25.3", + "@react-types/shared": "^3.25.0", + "@swc/helpers": "^0.5.0", + "clsx": "^2.0.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0" + } + }, + "node_modules/@react-aria/interactions": { + "version": "3.22.4", + "resolved": "https://registry.npmjs.org/@react-aria/interactions/-/interactions-3.22.4.tgz", + "integrity": "sha512-E0vsgtpItmknq/MJELqYJwib+YN18Qag8nroqwjk1qOnBa9ROIkUhWJerLi1qs5diXq9LHKehZDXRlwPvdEFww==", + "license": "Apache-2.0", + "dependencies": { + "@react-aria/ssr": "^3.9.6", + "@react-aria/utils": "^3.25.3", + "@react-types/shared": "^3.25.0", + "@swc/helpers": "^0.5.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0" + } + }, + "node_modules/@react-aria/ssr": { + "version": "3.9.6", + "resolved": "https://registry.npmjs.org/@react-aria/ssr/-/ssr-3.9.6.tgz", + "integrity": "sha512-iLo82l82ilMiVGy342SELjshuWottlb5+VefO3jOQqQRNYnJBFpUSadswDPbRimSgJUZuFwIEYs6AabkP038fA==", + "license": "Apache-2.0", + "dependencies": { + "@swc/helpers": "^0.5.0" + }, + "engines": { + "node": ">= 12" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0" + } + }, + "node_modules/@react-aria/utils": { + "version": "3.25.3", + "resolved": "https://registry.npmjs.org/@react-aria/utils/-/utils-3.25.3.tgz", + "integrity": "sha512-PR5H/2vaD8fSq0H/UB9inNbc8KDcVmW6fYAfSWkkn+OAdhTTMVKqXXrZuZBWyFfSD5Ze7VN6acr4hrOQm2bmrA==", + "license": "Apache-2.0", + "dependencies": { + "@react-aria/ssr": "^3.9.6", + "@react-stately/utils": "^3.10.4", + "@react-types/shared": "^3.25.0", + "@swc/helpers": "^0.5.0", + "clsx": "^2.0.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0" + } + }, + "node_modules/@react-stately/utils": { + "version": "3.10.4", + "resolved": "https://registry.npmjs.org/@react-stately/utils/-/utils-3.10.4.tgz", + "integrity": "sha512-gBEQEIMRh5f60KCm7QKQ2WfvhB2gLUr9b72sqUdIZ2EG+xuPgaIlCBeSicvjmjBvYZwOjoOEnmIkcx2GHp/HWw==", + "license": "Apache-2.0", + "dependencies": { + "@swc/helpers": "^0.5.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0" + } + }, + "node_modules/@react-types/shared": { + "version": "3.25.0", + "resolved": "https://registry.npmjs.org/@react-types/shared/-/shared-3.25.0.tgz", + "integrity": "sha512-OZSyhzU6vTdW3eV/mz5i6hQwQUhkRs7xwY2d1aqPvTdMe0+2cY7Fwp45PAiwYLEj73i9ro2FxF9qC4DvHGSCgQ==", + "license": "Apache-2.0", + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0" + } + }, "node_modules/@rtsao/scc": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@rtsao/scc/-/scc-1.1.0.tgz", @@ -465,6 +631,33 @@ "tslib": "^2.4.0" } }, + "node_modules/@tanstack/react-virtual": { + "version": "3.10.8", + "resolved": "https://registry.npmjs.org/@tanstack/react-virtual/-/react-virtual-3.10.8.tgz", + "integrity": "sha512-VbzbVGSsZlQktyLrP5nxE+vE1ZR+U0NFAWPbJLoG2+DKPwd2D7dVICTVIIaYlJqX1ZCEnYDbaOpmMwbsyhBoIA==", + "license": "MIT", + "dependencies": { + "@tanstack/virtual-core": "3.10.8" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/tannerlinsley" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0", + "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0" + } + }, + "node_modules/@tanstack/virtual-core": { + "version": "3.10.8", + "resolved": "https://registry.npmjs.org/@tanstack/virtual-core/-/virtual-core-3.10.8.tgz", + "integrity": "sha512-PBu00mtt95jbKFi6Llk9aik8bnR3tR/oQP1o3TSi+iG//+Q2RTIzCEgKkHG8BB86kxMNW6O8wku+Lmi+QFR6jA==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/tannerlinsley" + } + }, "node_modules/@types/json5": { "version": "0.0.29", "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", @@ -1137,6 +1330,15 @@ "resolved": "https://registry.npmjs.org/client-only/-/client-only-0.0.1.tgz", "integrity": "sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==" }, + "node_modules/clsx": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.1.tgz", + "integrity": "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -4421,6 +4623,12 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/tabbable": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/tabbable/-/tabbable-6.2.0.tgz", + "integrity": "sha512-Cat63mxsVJlzYvN51JmVXIgNoUokrIaT2zLclCXjRd8boZ0004U4KCs/sToJ75C6sdlByWxpYnb5Boif1VSFew==", + "license": "MIT" + }, "node_modules/tailwindcss": { "version": "3.4.13", "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.13.tgz", diff --git a/package.json b/package.json index 15905c3..6c18788 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,8 @@ "lint": "next lint" }, "dependencies": { + "@headlessui/react": "^2.1.10", + "@heroicons/react": "^2.1.5", "next": "14.2.13", "react": "^18", "react-dom": "^18" diff --git a/pages/inventors/index.js b/pages/inventors/index.js index b90de47..f8549eb 100644 --- a/pages/inventors/index.js +++ b/pages/inventors/index.js @@ -1,352 +1,366 @@ -import { useState, useEffect } from 'react'; -import { useRouter } from 'next/router'; -import Layout from '@/layouts/main'; +import { useState, useEffect } from "react"; +import { useRouter } from "next/router"; +import Layout from "@/layouts/main"; -import { Icon } from '@iconify/react'; -import Image from 'next/image'; -import Button from '@/components/Button'; +import { Icon } from "@iconify/react"; +import Image from "next/image"; +import Button from "@/components/Button"; -import { inventorsLeads } from '@/utils/leads'; -import { shortenEmail, shortenPhone } from '@/utils/helpers'; +import { inventorsLeads } from "@/utils/leads"; +import { shortenEmail, shortenPhone } from "@/utils/helpers"; +import ViewLeadDetails from "@/components/Inventors/viewDetails/Drawer"; const tabs = [ - { name: 'All', active: true }, - { name: 'Approved', active: false }, - { name: 'Unapproved', active: false }, - { name: 'Declined', active: false }, - { name: 'Deactivated', active: false }, + { name: "All", active: true }, + { name: "Approved", active: false }, + { name: "Unapproved", active: false }, + { name: "Declined", active: false }, + { name: "Deactivated", active: false }, ]; const Inventors = () => { - const router = useRouter(); + const [isModalOpen, setIsModalOpen] = useState(false); - const [selectedLeads, setSelectedLeads] = useState([]); - const [searchText, setSearchText] = useState(''); - const [allLeads, setAllLeads] = useState(inventorsLeads); - const [filteredLeads, setFilteredLeads] = useState([]); + const handleCloseModal = () => setIsModalOpen(false); + const router = useRouter(); + const [selectedLead, setSelectedLead] = useState(null); + const [selectedLeads, setSelectedLeads] = useState([]); + const [searchText, setSearchText] = useState(""); + const [allLeads, setAllLeads] = useState(inventorsLeads); + const [filteredLeads, setFilteredLeads] = useState([]); - const [currentPage, setCurrentPage] = useState(1); - const [leadsPerPage, setLeadsPerPage] = useState(5); + const [currentPage, setCurrentPage] = useState(1); + const [leadsPerPage, setLeadsPerPage] = useState(5); - const indexOfLastLead = currentPage * leadsPerPage; - const indexOfFirstLead = indexOfLastLead - leadsPerPage; - const currentLeads = filteredLeads?.slice(indexOfFirstLead, indexOfLastLead); + const indexOfLastLead = currentPage * leadsPerPage; + const indexOfFirstLead = indexOfLastLead - leadsPerPage; + const currentLeads = filteredLeads?.slice(indexOfFirstLead, indexOfLastLead); + const handleOpenModal = (id) => { + const lead = allLeads.find((lead) => lead.id === id); // Find lead by id + setSelectedLead(lead); // Set the lead being viewed + setIsModalOpen(true); + }; + const nextPage = () => { + if (currentPage < Math.ceil(filteredLeads?.length / leadsPerPage)) { + setCurrentPage(currentPage + 1); + } + }; - const nextPage = () => { - if (currentPage < Math.ceil(filteredLeads?.length / leadsPerPage)) { - setCurrentPage(currentPage + 1); - } - }; + const prevPage = () => { + if (currentPage > 1) { + setCurrentPage(currentPage - 1); + } + }; - const prevPage = () => { - if (currentPage > 1) { - setCurrentPage(currentPage - 1); - } - }; + useEffect(() => { + setFilteredLeads(allLeads); + }, [allLeads]); - useEffect(() => { - setFilteredLeads(allLeads); - }, [allLeads]); + useEffect(() => { + if (tabs.some((tab) => tab.active) && searchText === "") { + setSelectedLeads([]); + const tab = tabs.find((tab) => tab.active); + if (tab.name === "All") { + setFilteredLeads(allLeads); + } else { + setFilteredLeads(allLeads.filter((lead) => lead.status === tab.name)); + } + } else if (tabs.some((tab) => tab.active) && searchText !== "") { + const tab = tabs.find((tab) => tab.active); + if (tab.name === "All") { + const filteredLeads = allLeads.filter((lead) => + lead.name.toLowerCase().includes(searchText.toLowerCase()) + ); + setFilteredLeads(filteredLeads); + } else { + const filteredLeads = allLeads.filter( + (lead) => + lead.status === tab.name && + lead.name.toLowerCase().includes(searchText.toLowerCase()) + ); + setFilteredLeads(filteredLeads); + } + } else { + setFilteredLeads(allLeads); + } + }, [searchText, allLeads]); - useEffect(() => { - if (tabs.some((tab) => tab.active) && searchText === '') { - setSelectedLeads([]); - const tab = tabs.find((tab) => tab.active); - if (tab.name === 'All') { - setFilteredLeads(allLeads); - } else { - setFilteredLeads(allLeads.filter((lead) => lead.status === tab.name)); - } - } else if (tabs.some((tab) => tab.active) && searchText !== '') { - const tab = tabs.find((tab) => tab.active); - if (tab.name === 'All') { - const filteredLeads = allLeads.filter((lead) => - lead.name.toLowerCase().includes(searchText.toLowerCase()) - ); - setFilteredLeads(filteredLeads); - } else { - const filteredLeads = allLeads.filter( - (lead) => - lead.status === tab.name && - lead.name.toLowerCase().includes(searchText.toLowerCase()) - ); - setFilteredLeads(filteredLeads); - } - } else { - setFilteredLeads(allLeads); - } - }, [searchText, allLeads]); + const tableHeaders = [ + { + key: "select", + content: ( + 0 && + selectedLeads.length === filteredLeads?.length + } + onChange={(e) => { + if (e.target.checked) { + // Select all leads + setSelectedLeads(filteredLeads); + } else { + // Unselect all leads + setSelectedLeads([]); + } + }} + /> + ), + }, + { key: "name", content: "Name" }, + { key: "school", content: "School (Alumni)" }, + { key: "email", content: "Email" }, + { key: "phone", content: "Phone", className: "hidden lg:block" }, + { key: "status", content: "Status" }, + { key: "action", content: "Action" }, + ]; - const tableHeaders = [ - { - key: 'select', - content: ( - 0 && - selectedLeads.length === filteredLeads?.length - } - onChange={(e) => { - if (e.target.checked) { - // Select all leads - setSelectedLeads(filteredLeads); - } else { - // Unselect all leads - setSelectedLeads([]); - } - }} - /> - ), - }, - { key: 'name', content: 'Name' }, - { key: 'school', content: 'School (Alumni)' }, - { key: 'email', content: 'Email' }, - { key: 'phone', content: 'Phone', className: 'hidden lg:block' }, - { key: 'status', content: 'Status' }, - { key: 'action', content: 'Action' }, - ]; + return ( + <> + {/* Search */} +
+ setSearchText(e.target.value)} + className="border-[2px] border-[#E0E6EB] p-3 rounded-lg w-1/4 outline-none text-[#98A4AE]" + /> +
+ + {selectedLeads.length > 0 ? ( + + ) : ( + + )} +
+
- return ( - <> - {/* Search */} -
- setSearchText(e.target.value)} - className="border-[2px] border-[#E0E6EB] p-3 rounded-lg w-1/4 outline-none text-[#98A4AE]" - /> -
- - {selectedLeads.length > 0 ? ( - - ) : ( - - )} -
-
+ {/* Tabs */} +
+ +
- {/* Tabs */} -
- -
+ {currentLeads?.length === 0 && ( +
+
+ Figma Icon +
+

+ Oops, Nothing to see here, right? +

+

Let’s get your profile set up.

+ +
+
+
+ )} - {currentLeads?.length === 0 && ( -
-
- Figma Icon -
-

- Oops, Nothing to see here, right? -

-

Let’s get your profile set up.

- -
-
-
- )} + {currentLeads?.length > 0 && ( + <> +
+ + + + {tableHeaders.map((header) => ( + + ))} + + + + {currentLeads?.map((lead, index) => ( + selectedLead.id === lead.id + ) + ? "bg-mintGreen border-white" + : "border-[#EFF2F7]" + }`} + > + + + + + + + + + ))} + +
+ {header.content} +
+ selectedLead.id === lead.id + )} + onChange={(e) => { + if (e.target.checked) { + setSelectedLeads([...selectedLeads, lead]); + } else { + setSelectedLeads( + selectedLeads.filter( + (selectedLead) => selectedLead.id !== lead.id + ) + ); + } + }} + /> + +
+ Profile Icon +
+

+ {lead.name} +

+ + {lead.position} + +
+
+
+ {lead.school + (lead.alumni ? " (Alumni)" : "")} + + {shortenEmail(lead.email)} + + {shortenPhone(lead.phone)} + + + {lead.status} + + + + handleOpenModal(lead.id)} + icon="ph:eye" + className="text-[#909090] text-lg cursor-pointer" + /> +
+
- {currentLeads?.length > 0 && ( - <> -
- - - - {tableHeaders.map((header) => ( - - ))} - - - - {currentLeads?.map((lead, index) => ( - selectedLead.id === lead.id - ) - ? 'bg-mintGreen border-white' - : 'border-[#EFF2F7]' - }`} - > - - - - - - - - - ))} - -
- {header.content} -
- selectedLead.id === lead.id - )} - onChange={(e) => { - if (e.target.checked) { - setSelectedLeads([...selectedLeads, lead]); - } else { - setSelectedLeads( - selectedLeads.filter( - (selectedLead) => selectedLead.id !== lead.id - ) - ); - } - }} - /> - -
- Profile Icon -
-

- {lead.name} -

- - {lead.position} - -
-
-
- {lead.school + (lead.alumni ? ' (Alumni)' : '')} - - {shortenEmail(lead.email)} - - {shortenPhone(lead.phone)} - - - {lead.status} - - - -
-
- -
-

- Page {currentPage} of{' '} - {Math.ceil(filteredLeads?.length / leadsPerPage)} -

-
- - -
-
- - )} +
+

+ Page {currentPage} of{" "} + {Math.ceil(filteredLeads?.length / leadsPerPage)} +

+
+ + +
+
+ + )} - {/* deactivate leads dialog box */} - {/*
+ {/* deactivate leads dialog box */} + {/*
{
*/} - - ); + + ); }; export default Inventors; Inventors.getLayout = function getLayout(page) { - return {page}; + return {page}; }; diff --git a/public/images/demo-pics.png b/public/images/demo-pics.png new file mode 100644 index 0000000..5e353e6 Binary files /dev/null and b/public/images/demo-pics.png differ diff --git a/tailwind.config.js b/tailwind.config.js index 46d2ed1..0d0235a 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -14,6 +14,8 @@ module.exports = { mintGreen: "var(--mint-green)", darkGray: "var(--dark-gray)", lightGray: "var(--light-gray)", + primary: "#00977F", + destructive: "#B42318", }, }, }, diff --git a/utils/leads.js b/utils/leads.js index 216ee58..1801244 100644 --- a/utils/leads.js +++ b/utils/leads.js @@ -1,68 +1,187 @@ export const inventorsLeads = [ - { - id: 1, - name: 'Happiness Omale', - position: 'Social Media Manager', - school: 'OAUSTECH', - email: 'omalehappiness@gmail.com', - phone: '+234 706 765 2134', - status: 'Approved', - alumni: true, - }, - { - id: 2, - name: 'Owosupi Kehinde', - position: 'Software Engineer', - school: 'OAUSTECH', - email: 'owosupikehinde@gmail.com', - phone: '+234 706 765 2134', - status: 'Approved', - alumni: true, - }, - { - id: 3, - name: 'Adesokan Oluwajuwon', - position: 'Co-Founder', - school: 'OAUSTECH', - email: 'adesokanoluwa@gmail.com', - phone: '+234 706 765 2134', - status: 'Declined', - alumni: true, - }, - { - id: 4, - name: 'Kelvin Doe', - school: 'Bells University', - email: 'kelvin@gmail.com', - phone: '+234 706 765 2134', - status: 'Deactivated', - alumni: false, - }, - { - id: 5, - name: 'Owosupi Kehinde', - school: 'OAUSTECH', - email: 'owosupikehinde@gmail.com', - phone: '+234 706 765 2134', - status: 'Approved', - alumni: true, - }, - { - id: 6, - name: 'Kelvin Doe', - school: 'Bells University', - email: 'kelvin@gmail.com', - phone: '+234 706 765 2134', - status: 'Unapproved', - alumni: false, - }, - { - id: 7, - name: 'Kelvin Doe', - school: 'Bells University', - email: 'kelvin@gmail.com', - phone: '+234 706 765 2134', - status: 'Approved', - alumni: false, - }, + { + id: 1, + name: "Happiness Omale", + position: "Social Media Manager", + school: "OAUSTECH", + email: "omalehappiness@gmail.com", + phone: "+234 706 765 2134", + status: "Approved", + alumni: true, + location: "Lagos, Nigeria", + interests: "Digital Marketing, Content Creation", + experience: "5 years in social media management", + primarySkill: "Social Media Strategy", + secondarySkill: "Content Marketing", + bio: "A passionate social media manager with a knack for creating engaging content.", + technologies: ["Hootsuite", "Canva", "Google Analytics"], + skillProfileURL: "https://www.linkedin.com/in/happiness-omale", + personalWebsite: "http://happinessomale.com", + twitter: "https://twitter.com/happinessomale", + linkedin: "https://www.linkedin.com/in/happinessomale", + facebook: "https://www.facebook.com/happinessomale", + }, + { + id: 2, + name: "Owosupi Kehinde", + position: "Software Engineer", + school: "OAUSTECH", + email: "owosupikehinde@gmail.com", + phone: "+234 706 765 2134", + status: "Approved", + alumni: true, + location: "Ibadan, Nigeria", + interests: "Web Development, AI", + experience: "3 years in software development", + primarySkill: "JavaScript", + secondarySkill: "React", + bio: "A dedicated software engineer with a focus on building scalable web applications.", + technologies: ["JavaScript", "React", "Node.js"], + skillProfileURL: "https://www.linkedin.com/in/owosupikehinde", + personalWebsite: "http://owosupikehinde.com", + twitter: "https://twitter.com/owosupikehinde", + linkedin: "https://www.linkedin.com/in/owosupikehinde", + facebook: "https://www.facebook.com/owosupikehinde", + }, + { + id: 3, + name: "Adesokan Oluwajuwon", + position: "Co-Founder", + school: "OAUSTECH", + email: "adesokanoluwa@gmail.com", + phone: "+234 706 765 2134", + status: "Declined", + alumni: true, + location: "Abuja, Nigeria", + interests: "Entrepreneurship, Technology", + experience: "2 years as a startup co-founder", + primarySkill: "Business Development", + secondarySkill: "Strategic Planning", + bio: "An aspiring entrepreneur with a passion for technology and innovation.", + technologies: ["Startup Methodologies", "Agile", "Market Research"], + skillProfileURL: "https://www.linkedin.com/in/adesokanoluwa", + personalWebsite: "http://adesokanoluwa.com", + twitter: "https://twitter.com/adesokanoluwa", + linkedin: "https://www.linkedin.com/in/adesokanoluwa", + facebook: "https://www.facebook.com/adesokanoluwa", + }, + { + id: 4, + name: "Kelvin Doe", + position: "Project Manager", + school: "Bells University", + email: "kelvin@gmail.com", + phone: "+234 706 765 2134", + status: "Deactivated", + alumni: false, + location: "Port Harcourt, Nigeria", + interests: "Project Management, Leadership", + experience: "4 years in project management", + primarySkill: "Agile Methodologies", + secondarySkill: "Team Leadership", + bio: "An experienced project manager skilled in leading teams and delivering projects on time.", + technologies: ["Trello", "JIRA", "Microsoft Project"], + skillProfileURL: "https://www.linkedin.com/in/kelvindoe", + personalWebsite: "http://kelvindoe.com", + twitter: "https://twitter.com/kelvindoe", + linkedin: "https://www.linkedin.com/in/kelvindoe", + facebook: "https://www.facebook.com/kelvindoe", + }, + { + id: 5, + name: "Owosupi Kehinde", + position: "Software Engineer", + school: "OAUSTECH", + email: "owosupikehinde@gmail.com", + phone: "+234 706 765 2134", + status: "Approved", + alumni: true, + location: "Ibadan, Nigeria", + interests: "Web Development, AI", + experience: "3 years in software development", + primarySkill: "JavaScript", + secondarySkill: "React", + bio: "A dedicated software engineer with a focus on building scalable web applications.", + technologies: ["JavaScript", "React", "Node.js"], + skillProfileURL: "https://www.linkedin.com/in/owosupikehinde", + personalWebsite: "http://owosupikehinde.com", + twitter: "https://twitter.com/owosupikehinde", + linkedin: "https://www.linkedin.com/in/owosupikehinde", + facebook: "https://www.facebook.com/owosupikehinde", + }, + { + id: 6, + name: "Kelvin Doe", + position: "Quality Assurance Engineer", + school: "Bells University", + email: "kelvin@gmail.com", + phone: "+234 706 765 2134", + status: "Unapproved", + alumni: false, + location: "Enugu, Nigeria", + interests: "Software Testing, Automation", + experience: "2 years in QA", + primarySkill: "Automated Testing", + secondarySkill: "Performance Testing", + bio: "A detail-oriented QA engineer with a passion for ensuring software quality.", + technologies: ["Selenium", "JMeter", "Postman"], + skillProfileURL: "https://www.linkedin.com/in/kelvindoe", + personalWebsite: "http://kelvindoe.com", + twitter: "https://twitter.com/kelvindoe", + linkedin: "https://www.linkedin.com/in/kelvindoe", + facebook: "https://www.facebook.com/kelvindoe", + }, + { + id: 7, + name: "Kelvin Doe", + position: "Systems Analyst", + school: "Bells University", + email: "kelvin@gmail.com", + phone: "+234 706 765 2134", + status: "Approved", + alumni: false, + location: "Owerri, Nigeria", + interests: "Systems Design, Data Analysis", + experience: "3 years as a systems analyst", + primarySkill: "Data Analysis", + secondarySkill: "Systems Integration", + bio: "A systems analyst with expertise in analyzing and improving IT systems.", + technologies: ["SQL", "Python", "Tableau"], + skillProfileURL: "https://www.linkedin.com/in/kelvindoe", + personalWebsite: "http://kelvindoe.com", + twitter: "https://twitter.com/kelvindoe", + linkedin: "https://www.linkedin.com/in/kelvindoe", + facebook: "https://www.facebook.com/kelvindoe", + }, + // New entry for Temoye Dennis + { + id: 8, + name: "Temoye Dennis", + position: "Frontend Developer", + school: "OAUSTECH", + email: "temoyedennis@gmail.com", + phone: "+234 706 765 2134", + status: "Approved", + alumni: true, + location: "Lagos, Nigeria", + interests: "Frontend Development, User Experience", + experience: "5 years in frontend development", + primarySkill: "React", + secondarySkill: "Next.js", + bio: "A frontend developer and computer engineer with a passion for creating responsive and user-friendly web applications.", + technologies: [ + "React", + "Next.js", + "Chakra UI", + "Tailwind CSS", + "Redux", + "React Native", + "PHP", + ], + skillProfileURL: "https://www.linkedin.com/in/temoyedennis", + personalWebsite: "http://temoyedennis.com", + twitter: "https://twitter.com/temoyedennis", + linkedin: "https://www.linkedin.com/in/temoyedennis", + facebook: "https://www.facebook.com/temoyedennis", + }, ];