From 53fa013c3962bbffdf660a74f9c53c98d70766fe Mon Sep 17 00:00:00 2001 From: "pramod.mahajan" Date: Fri, 26 Sep 2025 11:47:03 +0530 Subject: [PATCH] split projectList component --- src/components/Project/ManageProject.jsx | 8 +- src/pages/project/ProjectsPage.jsx | 105 +++++++++++++++++ src/utils/constants.jsx | 138 +++++++++++++---------- 3 files changed, 186 insertions(+), 65 deletions(-) create mode 100644 src/pages/project/ProjectsPage.jsx diff --git a/src/components/Project/ManageProject.jsx b/src/components/Project/ManageProject.jsx index 7bcef356..a14def21 100644 --- a/src/components/Project/ManageProject.jsx +++ b/src/components/Project/ManageProject.jsx @@ -77,13 +77,7 @@ const ManageProject = () => { )} - {isProjectCreated && ( -
-

Additional Content

-

Now that the project is created, you can access this content.

- {/* Add more content here */} -
- )} + ); }; diff --git a/src/pages/project/ProjectsPage.jsx b/src/pages/project/ProjectsPage.jsx new file mode 100644 index 00000000..3bb73175 --- /dev/null +++ b/src/pages/project/ProjectsPage.jsx @@ -0,0 +1,105 @@ +import React from "react"; +import Breadcrumb from "../../components/common/Breadcrumb"; +import { PROJECt_STATUS } from "../../utils/constants"; + +const ProjectsPage = () => { + return ( +
+ + + +
+
+
+
+
+ { + setSearchTerm(e.target.value); + setCurrentPage(1); + }} + /> +
+ +
+ + +
+ +
+ +
    + {PROJECt_STATUS.map(({ id, label }) => ( +
  • +
    + handleStatusChange(id)} + /> + +
    +
  • + ))} +
+
+
+ +
+ +
+
+
+
+
+ ); +}; + +export default ProjectsPage; diff --git a/src/utils/constants.jsx b/src/utils/constants.jsx index 1af801ca..5d17337a 100644 --- a/src/utils/constants.jsx +++ b/src/utils/constants.jsx @@ -1,54 +1,53 @@ -export const THRESH_HOLD = 48; // hours +export const THRESH_HOLD = 48; // hours export const DURATION_TIME = 10; // minutes export const ITEMS_PER_PAGE = 20; -export const OTP_EXPIRY_SECONDS = 300 // OTP time +export const OTP_EXPIRY_SECONDS = 300; // OTP time export const MANAGE_MASTER = "588a8824-f924-4955-82d8-fc51956cf323"; -export const VIEW_MASTER = "5ffbafe0-7ab0-48b1-bb50-c1bf76b65f9d" +export const VIEW_MASTER = "5ffbafe0-7ab0-48b1-bb50-c1bf76b65f9d"; -export const MANAGE_PROJECT = "172fc9b6-755b-4f62-ab26-55c34a330614" +export const MANAGE_PROJECT = "172fc9b6-755b-4f62-ab26-55c34a330614"; -export const VIEW_PROJECTS = "6ea44136-987e-44ba-9e5d-1cf8f5837ebc" +export const VIEW_PROJECTS = "6ea44136-987e-44ba-9e5d-1cf8f5837ebc"; -export const MANAGE_EMPLOYEES = "a97d366a-c2bb-448d-be93-402bd2324566" +export const MANAGE_EMPLOYEES = "a97d366a-c2bb-448d-be93-402bd2324566"; -export const VIEW_ALL_EMPLOYEES = "60611762-7f8a-4fb5-b53f-b1139918796b" +export const VIEW_ALL_EMPLOYEES = "60611762-7f8a-4fb5-b53f-b1139918796b"; -export const VIEW_TEAM_MEMBERS = "b82d2b7e-0d52-45f3-997b-c008ea460e7f" +export const VIEW_TEAM_MEMBERS = "b82d2b7e-0d52-45f3-997b-c008ea460e7f"; -export const MANAGE_TEAM = "b94802ce-0689-4643-9e1d-11c86950c35b" +export const MANAGE_TEAM = "b94802ce-0689-4643-9e1d-11c86950c35b"; -export const MANAGE_PROJECT_INFRA = "cf2825ad-453b-46aa-91d9-27c124d63373" +export const MANAGE_PROJECT_INFRA = "cf2825ad-453b-46aa-91d9-27c124d63373"; -export const VIEW_PROJECT_INFRA = "8d7cc6e3-9147-41f7-aaa7-fa507e450bd4" - -export const REGULARIZE_ATTENDANCE ="57802c4a-00aa-4a1f-a048-fd2f70dd44b6" -export const TEAM_ATTENDANCE = "915e6bff-65f6-4e3f-aea8-3fd217d3ea9e" -export const SELF_ATTENDANCE = "ccb0589f-712b-43de-92ed-5b6088e7dc4e" +export const VIEW_PROJECT_INFRA = "8d7cc6e3-9147-41f7-aaa7-fa507e450bd4"; +export const REGULARIZE_ATTENDANCE = "57802c4a-00aa-4a1f-a048-fd2f70dd44b6"; +export const TEAM_ATTENDANCE = "915e6bff-65f6-4e3f-aea8-3fd217d3ea9e"; +export const SELF_ATTENDANCE = "ccb0589f-712b-43de-92ed-5b6088e7dc4e"; export const ASSIGN_TO_PROJECT = "b94802ce-0689-4643-9e1d-11c86950c35b"; export const INFRASTRUCTURE = "9666de86-d7c7-4d3d-acaa-fcd6d6b81f3c"; -export const MANAGE_TASK = "08752f33-3b29-4816-b76b-ea8a968ed3c5" +export const MANAGE_TASK = "08752f33-3b29-4816-b76b-ea8a968ed3c5"; -export const APPROVE_TASK = "db4e40c5-2ba9-4b6d-b8a6-a16a250ff99c" +export const APPROVE_TASK = "db4e40c5-2ba9-4b6d-b8a6-a16a250ff99c"; -export const VIEW_TASK = "9fcc5f87-25e3-4846-90ac-67a71ab92e3c" +export const VIEW_TASK = "9fcc5f87-25e3-4846-90ac-67a71ab92e3c"; -export const ASSIGN_REPORT_TASK = "6a32379b-8b3f-49a6-8c48-4b7ac1b55dc2" +export const ASSIGN_REPORT_TASK = "6a32379b-8b3f-49a6-8c48-4b7ac1b55dc2"; // ------------------------Directory------------------------------------- -export const DIRECTORY_ADMIN = "4286a13b-bb40-4879-8c6d-18e9e393beda" +export const DIRECTORY_ADMIN = "4286a13b-bb40-4879-8c6d-18e9e393beda"; -export const DIRECTORY_MANAGER = "62668630-13ce-4f52-a0f0-db38af2230c5" +export const DIRECTORY_MANAGER = "62668630-13ce-4f52-a0f0-db38af2230c5"; -export const DIRECTORY_USER = "0f919170-92d4-4337-abd3-49b66fc871bb" +export const DIRECTORY_USER = "0f919170-92d4-4337-abd3-49b66fc871bb"; // -----------------------Expense---------------------------------------- -export const VIEW_SELF_EXPENSE = "385be49f-8fde-440e-bdbc-3dffeb8dd116" +export const VIEW_SELF_EXPENSE = "385be49f-8fde-440e-bdbc-3dffeb8dd116"; export const VIEW_ALL_EXPNESE = "01e06444-9ca7-4df4-b900-8c3fa051b92f"; @@ -58,19 +57,22 @@ export const REVIEW_EXPENSE = "1f4bda08-1873-449a-bb66-3e8222bd871b"; export const APPROVE_EXPENSE = "eaafdd76-8aac-45f9-a530-315589c6deca"; -export const PROCESS_EXPENSE = "ea5a1529-4ee8-4828-80ea-0e23c9d4dd11" +export const PROCESS_EXPENSE = "ea5a1529-4ee8-4828-80ea-0e23c9d4dd11"; -export const EXPENSE_MANAGE = "ea5a1529-4ee8-4828-80ea-0e23c9d4dd11" +export const EXPENSE_MANAGE = "ea5a1529-4ee8-4828-80ea-0e23c9d4dd11"; -export const EXPENSE_REJECTEDBY = ["d1ee5eec-24b6-4364-8673-a8f859c60729","965eda62-7907-4963-b4a1-657fb0b2724b"] +export const EXPENSE_REJECTEDBY = [ + "d1ee5eec-24b6-4364-8673-a8f859c60729", + "965eda62-7907-4963-b4a1-657fb0b2724b", +]; -export const EXPENSE_DRAFT = "297e0d8f-f668-41b5-bfea-e03b354251c8" +export const EXPENSE_DRAFT = "297e0d8f-f668-41b5-bfea-e03b354251c8"; // ----------------------------Tenant------------------------- -export const SUPPER_TENANT = "d032cb1a-3f30-462c-bef0-7ace73a71c0b" -export const MANAGE_TENANTS = "00e20637-ce8d-4417-bec4-9b31b5e65092" -export const VIEW_TENANTS = "647145c6-2108-4c98-aab4-178602236e55" -export const ActiveTenant = "297e0d8f-f668-41b5-bfea-e03b354251c8" +export const SUPPER_TENANT = "d032cb1a-3f30-462c-bef0-7ace73a71c0b"; +export const MANAGE_TENANTS = "00e20637-ce8d-4417-bec4-9b31b5e65092"; +export const VIEW_TENANTS = "647145c6-2108-4c98-aab4-178602236e55"; +export const ActiveTenant = "297e0d8f-f668-41b5-bfea-e03b354251c8"; // ---------------------Documents--------------------------------- export const VIEW_DOCUMENT = "71189504-f1c8-4ca5-8db6-810497be2854"; @@ -81,42 +83,62 @@ export const DOWNLOAD_DOCUMENT = "404373d0-860f-490e-a575-1c086ffbce1d"; export const VERIFY_DOCUMENT = "13a1f30f-38d1-41bf-8e7a-b75189aab8e0"; // -------------------Application Role------------------------------ -// 1 - Expense Manage -export const EXPENSE_MANAGEMENT = "a4e25142-449b-4334-a6e5-22f70e4732d7" +// 1 - Expense Manage +export const EXPENSE_MANAGEMENT = "a4e25142-449b-4334-a6e5-22f70e4732d7"; export const TENANT_STATUS = [ - {id:"62b05792-5115-4f99-8ff5-e8374859b191",name:"Active"}, - {id:"c0b5def8-087e-4235-b3a4-8e2f0ed91b94",name:"In Active"}, - {id:"35d7840a-164a-448b-95e6-efb2ec84a751",name:"Supspended"} -] + { id: "62b05792-5115-4f99-8ff5-e8374859b191", name: "Active" }, + { id: "c0b5def8-087e-4235-b3a4-8e2f0ed91b94", name: "In Active" }, + { id: "35d7840a-164a-448b-95e6-efb2ec84a751", name: "Supspended" }, +]; export const DOCUMENTS_ENTITIES = { - ProjectEntity : "c8fe7115-aa27-43bc-99f4-7b05fabe436e", - EmployeeEntity:"dbb9555a-7a0c-40f2-a9ed-f0463f1ceed7", -} + ProjectEntity: "c8fe7115-aa27-43bc-99f4-7b05fabe436e", + EmployeeEntity: "dbb9555a-7a0c-40f2-a9ed-f0463f1ceed7", +}; - -export const CONSTANT_TEXT = { - -} +export const CONSTANT_TEXT = {}; export const SUBSCRIPTION_PLAN_FREQUENCIES = { 0: "Monthly", - 1:"Quarterly", - 2:"Half-Yearly", - 3:"Yearly" -} + 1: "Quarterly", + 2: "Half-Yearly", + 3: "Yearly", +}; export const reference = [ - { val: "google", name: "Google" }, - { val: "frineds", name: "Friends" }, - { val: "advertisement", name: "Advertisement" }, - { val: "root tenant", name: "Root Tenant" }, - ]; -export const orgSize = [ - { val: "1-50", name: "1-50" }, - { val: "51-100", name: "51-100" }, - { val: "101-500", name: "101-500" }, - { val: "500+", name: "500+" }, + { val: "google", name: "Google" }, + { val: "frineds", name: "Friends" }, + { val: "advertisement", name: "Advertisement" }, + { val: "root tenant", name: "Root Tenant" }, +]; +export const orgSize = [ + { val: "1-50", name: "1-50" }, + { val: "51-100", name: "51-100" }, + { val: "101-500", name: "101-500" }, + { val: "500+", name: "500+" }, +]; + +export const PROJECt_STATUS = [ + { + id: "b74da4c2-d07e-46f2-9919-e75e49b12731", + label: "Active", + }, + { + id: "cdad86aa-8a56-4ff4-b633-9c629057dfef", + label: "In Progress", + }, + { + id: "603e994b-a27f-4e5d-a251-f3d69b0498ba", + label: "On Hold", + }, + { + id: "ef1c356e-0fe0-42df-a5d3-8daee355492d", + label: "Inactive", + }, + { + id: "33deaef9-9af1-4f2a-b443-681ea0d04f81", + label: "Completed", + }, ]; export const BASE_URL = process.env.VITE_BASE_URL;