├── src ├── index.css ├── components │ ├── Navbar │ │ └── NavBar.css │ ├── Admin │ │ ├── AdminNavBar&Sidebar │ │ │ ├── NavBar.css │ │ │ ├── AdminDrawer.jsx │ │ │ └── AdminSideBar.jsx │ │ ├── Admin_CompanyManagement │ │ │ ├── Admin_CompanyManagement.jsx │ │ │ ├── AdminPostManagement │ │ │ │ ├── AdminPostManagement.jsx │ │ │ │ ├── AdminAllPostList │ │ │ │ │ └── AdminBlockPost.jsx │ │ │ │ └── AdminPostBlockedList │ │ │ │ │ └── AdminUnblockModal.jsx │ │ │ └── AdminCompanyLIst │ │ │ │ └── AdminCompanyList.jsx │ │ ├── AdminMore │ │ │ ├── Skills │ │ │ │ ├── Skills.jsx │ │ │ │ ├── BlockedSkillsList │ │ │ │ │ └── UnblockSkillsModal.jsx │ │ │ │ ├── SkillsList │ │ │ │ │ └── BlockSkillsModal.jsx │ │ │ │ └── AddSkillsModal │ │ │ │ │ └── AddSkillsModal.jsx │ │ │ ├── JobTitle │ │ │ │ ├── JobTitle.jsx │ │ │ │ ├── BlockedTitleList │ │ │ │ │ └── UnBlockedTitleModal.jsx │ │ │ │ ├── AllJobTitleList │ │ │ │ │ └── BlockJobTitleModal.jsx │ │ │ │ └── AddJotTitleModal │ │ │ │ │ └── AddJotTitleModal.jsx │ │ │ ├── JobCategory │ │ │ │ ├── JobCategory.jsx │ │ │ │ ├── AllCategoryList │ │ │ │ │ └── CategoryDeletingModal.jsx │ │ │ │ └── AddJobCategory │ │ │ │ │ └── AddJobCategoryModal.jsx │ │ │ └── AdminMore.jsx │ │ ├── AdminDashboard │ │ │ └── AdminDashboard.jsx │ │ ├── Admin_UserManagement │ │ │ └── Admin_UserManagement.jsx │ │ └── AdminNotifications │ │ │ └── AdminNotifications.jsx │ ├── Loading │ │ └── Loading.jsx │ ├── Company │ │ ├── CompanyProfle │ │ │ └── ComapnyMyInfo.jsx │ │ └── Dashboard │ │ │ ├── ScheduledList │ │ │ └── ScheduledList.jsx │ │ │ ├── PostsComponents │ │ │ ├── BlockUnblock │ │ │ │ ├── DeletePost.jsx │ │ │ │ └── UnblockPost.jsx │ │ │ └── PostList.jsx │ │ │ └── RequestsComponents │ │ │ ├── CompanyList │ │ │ └── ScheduleModal │ │ │ │ └── ScheduleModal.jsx │ │ │ └── RequstsComponents.jsx │ ├── dropdown.jsx │ ├── user │ │ ├── EducatinModals │ │ │ ├── DltEducationModal.jsx │ │ │ └── AddEducation.jsx │ │ ├── ExperienceModals │ │ │ └── DeleteExpModal.jsx │ │ └── LanguageModal │ │ │ └── AddLanguageModal.jsx │ ├── Profile │ │ └── MyinfoComponent │ │ │ ├── ExperienceComponents │ │ │ ├── DeleteExperienceModal.jsx │ │ │ └── ExperienceComponents.jsx │ │ │ ├── EducationsComponents │ │ │ ├── DeleteEducationModal.jsx │ │ │ └── EducationsComponents.jsx │ │ │ ├── Modal │ │ │ └── OpenToCv.jsx │ │ │ ├── SkillComponents │ │ │ └── SkillComponents.jsx │ │ │ └── MyinfoComponent.jsx │ ├── NavBarSearching │ │ └── NavBarSearching.jsx │ ├── Getdata.jsx │ └── choose.jsx ├── assets │ ├── Edit.png │ ├── user.png │ ├── PdfIcon.png │ ├── biginer.png │ ├── expert.png │ ├── hiring.webp │ ├── users.png │ ├── DeleteImg.png │ ├── fileimage.png │ ├── ProfileImg.jpeg │ ├── someexpert.png │ ├── CompanyProfile.png │ ├── defaultprofile.jpeg │ ├── EmailImg │ │ ├── EmailClose.png │ │ └── EmailOpen.png │ ├── VerificationImg │ │ ├── VerifyImage.png │ │ └── UnverifyImage.png │ ├── icons8-google.svg │ └── react.svg ├── pages │ ├── ChoosePage.jsx │ ├── Admin │ │ ├── AdminLoginPage.jsx │ │ └── AdminHomePage.jsx │ ├── Company │ │ ├── CompanyDashboard │ │ │ └── CompanyDashboard.jsx │ │ ├── CompanyHomePage.jsx │ │ └── CompanyNotifications.jsx │ ├── User │ │ ├── CompanyLIst │ │ │ └── CompanyLIst.jsx │ │ ├── SignUpPage │ │ │ └── RegisterResendmail.jsx │ │ ├── RegisterSteps │ │ │ ├── Languages.jsx │ │ │ ├── Position.jsx │ │ │ └── Education.jsx │ │ ├── Notifications │ │ │ └── Notifications.jsx │ │ └── Dashboard │ │ │ └── Dashboard.jsx │ └── ForgotPassword │ │ ├── Mailshowpage.jsx │ │ └── ForgotPassword.jsx ├── constants │ └── constants.js ├── routes │ ├── Admin.jsx │ ├── company.jsx │ └── user.jsx ├── Redux │ ├── store.js │ ├── CompanySlice.js │ └── UserSlice.js ├── ProtectedRoutes │ ├── UserProtected.jsx │ ├── AdminProtected.jsx │ ├── PrivateRoutes.jsx │ └── CompanyProtexted.jsx ├── main.jsx ├── utils │ └── axiosUtils.jsx └── App.jsx ├── vercel.json ├── postcss.config.js ├── vite.config.js ├── .gitignore ├── README.md ├── index.html ├── tailwind.config.js ├── .eslintrc.cjs ├── public └── vite.svg └── package.json /src/index.css: -------------------------------------------------------------------------------- 1 | 2 | @tailwind base; 3 | @tailwind components; 4 | @tailwind utilities; -------------------------------------------------------------------------------- /vercel.json: -------------------------------------------------------------------------------- 1 | { 2 | "routes": [{ "src": "/[^.]+", "dest": "/", "status": 200 }] 3 | } -------------------------------------------------------------------------------- /src/components/Navbar/NavBar.css: -------------------------------------------------------------------------------- 1 | .custom-navbar-width { 2 | max-width: 100% !important; 3 | } 4 | -------------------------------------------------------------------------------- /src/assets/Edit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MOHAMMEDSIFANKP/Career_Bridge_FrontEnd/HEAD/src/assets/Edit.png -------------------------------------------------------------------------------- /src/assets/user.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MOHAMMEDSIFANKP/Career_Bridge_FrontEnd/HEAD/src/assets/user.png -------------------------------------------------------------------------------- /src/assets/PdfIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MOHAMMEDSIFANKP/Career_Bridge_FrontEnd/HEAD/src/assets/PdfIcon.png -------------------------------------------------------------------------------- /src/assets/biginer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MOHAMMEDSIFANKP/Career_Bridge_FrontEnd/HEAD/src/assets/biginer.png -------------------------------------------------------------------------------- /src/assets/expert.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MOHAMMEDSIFANKP/Career_Bridge_FrontEnd/HEAD/src/assets/expert.png -------------------------------------------------------------------------------- /src/assets/hiring.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MOHAMMEDSIFANKP/Career_Bridge_FrontEnd/HEAD/src/assets/hiring.webp -------------------------------------------------------------------------------- /src/assets/users.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MOHAMMEDSIFANKP/Career_Bridge_FrontEnd/HEAD/src/assets/users.png -------------------------------------------------------------------------------- /postcss.config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /src/assets/DeleteImg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MOHAMMEDSIFANKP/Career_Bridge_FrontEnd/HEAD/src/assets/DeleteImg.png -------------------------------------------------------------------------------- /src/assets/fileimage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MOHAMMEDSIFANKP/Career_Bridge_FrontEnd/HEAD/src/assets/fileimage.png -------------------------------------------------------------------------------- /src/components/Admin/AdminNavBar&Sidebar/NavBar.css: -------------------------------------------------------------------------------- 1 | .custom-navbar-width { 2 | max-width: 100% !important; 3 | } 4 | -------------------------------------------------------------------------------- /src/assets/ProfileImg.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MOHAMMEDSIFANKP/Career_Bridge_FrontEnd/HEAD/src/assets/ProfileImg.jpeg -------------------------------------------------------------------------------- /src/assets/someexpert.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MOHAMMEDSIFANKP/Career_Bridge_FrontEnd/HEAD/src/assets/someexpert.png -------------------------------------------------------------------------------- /src/assets/CompanyProfile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MOHAMMEDSIFANKP/Career_Bridge_FrontEnd/HEAD/src/assets/CompanyProfile.png -------------------------------------------------------------------------------- /src/assets/defaultprofile.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MOHAMMEDSIFANKP/Career_Bridge_FrontEnd/HEAD/src/assets/defaultprofile.jpeg -------------------------------------------------------------------------------- /src/assets/EmailImg/EmailClose.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MOHAMMEDSIFANKP/Career_Bridge_FrontEnd/HEAD/src/assets/EmailImg/EmailClose.png -------------------------------------------------------------------------------- /src/assets/EmailImg/EmailOpen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MOHAMMEDSIFANKP/Career_Bridge_FrontEnd/HEAD/src/assets/EmailImg/EmailOpen.png -------------------------------------------------------------------------------- /src/assets/VerificationImg/VerifyImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MOHAMMEDSIFANKP/Career_Bridge_FrontEnd/HEAD/src/assets/VerificationImg/VerifyImage.png -------------------------------------------------------------------------------- /src/assets/VerificationImg/UnverifyImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MOHAMMEDSIFANKP/Career_Bridge_FrontEnd/HEAD/src/assets/VerificationImg/UnverifyImage.png -------------------------------------------------------------------------------- /src/pages/ChoosePage.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import Choos from '../components/choose' 3 | 4 | function ChoosePage() { 5 | return ( 6 |
7 | 8 |
9 | ) 10 | } 11 | 12 | export default ChoosePage -------------------------------------------------------------------------------- /src/constants/constants.js: -------------------------------------------------------------------------------- 1 | export const UserUrl = import.meta.env.VITE_BASE_USER_URL; 2 | export const CompanyUrl = import.meta.env.VITE_COMPANY_URL; 3 | export const AdminUrl = import.meta.env.VITE_ADMIN_URL; 4 | export const wsApiUrl = import.meta.env.VITE_Ws_URL; 5 | -------------------------------------------------------------------------------- /src/pages/Admin/AdminLoginPage.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import AdminLogin from '../../components/Admin/AdminLogin' 3 | 4 | function AdminLoginPage() { 5 | return ( 6 |
7 | 8 |
9 | ) 10 | } 11 | 12 | export default AdminLoginPage -------------------------------------------------------------------------------- /vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import react from '@vitejs/plugin-react' 3 | 4 | // https://vitejs.dev/config/ 5 | // export default defineConfig({ 6 | // plugins: [react()], 7 | // }) 8 | 9 | 10 | export default defineConfig({ 11 | plugins: [react()], 12 | server: { 13 | host: '0.0.0.0', 14 | }, 15 | }) -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | .env 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /src/components/Loading/Loading.jsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { SyncLoader } from "react-spinners"; 3 | 4 | const Loader = ({ loading }) => { 5 | return ( 6 |
7 | 8 |
9 | ); 10 | }; 11 | 12 | export default Loader; -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # React + Vite 2 | 3 | This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules. 4 | 5 | Currently, two official plugins are available: 6 | 7 | - [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh 8 | - [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh 9 | -------------------------------------------------------------------------------- /src/components/Company/CompanyProfle/ComapnyMyInfo.jsx: -------------------------------------------------------------------------------- 1 | import AccountComponents from "./AccountComponents/AccountComponents" 2 | import CompanyAddressComponents from "./AccountComponents/CompanyAddressComponents" 3 | import CompanyComponents from "./AccountComponents/CompanyComponents" 4 | 5 | function ComapnyMyInfo() { 6 | return ( 7 | <> 8 | 9 | 10 | 11 | 12 | ) 13 | } 14 | 15 | export default ComapnyMyInfo -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Vite + React 9 | 10 | 11 |
12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /tailwind.config.js: -------------------------------------------------------------------------------- 1 | // /** @type {import('tailwindcss').Config} */ 2 | // export default { 3 | // content: [ 4 | // "./index.html", 5 | // "./src/**/*.{js,ts,jsx,tsx}", 6 | // ], 7 | // theme: { 8 | // extend: {}, 9 | // }, 10 | // plugins: [], 11 | // } 12 | 13 | import withMT from "@material-tailwind/react/utils/withMT"; 14 | 15 | export default withMT({ 16 | content: ["./index.html", "./src/**/*.{vue,js,ts,jsx,tsx}"], 17 | theme: { 18 | extend: {}, 19 | }, 20 | plugins: [ require('tailwind-scrollbar')], 21 | }); -------------------------------------------------------------------------------- /.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | env: { browser: true, es2020: true }, 4 | extends: [ 5 | 'eslint:recommended', 6 | 'plugin:react/recommended', 7 | 'plugin:react/jsx-runtime', 8 | 'plugin:react-hooks/recommended', 9 | ], 10 | ignorePatterns: ['dist', '.eslintrc.cjs'], 11 | parserOptions: { ecmaVersion: 'latest', sourceType: 'module' }, 12 | settings: { react: { version: '18.2' } }, 13 | plugins: ['react-refresh'], 14 | rules: { 15 | 'react-refresh/only-export-components': [ 16 | 'warn', 17 | { allowConstantExport: true }, 18 | ], 19 | }, 20 | } 21 | -------------------------------------------------------------------------------- /src/components/dropdown.jsx: -------------------------------------------------------------------------------- 1 | import {Menu,MenuHandler,MenuList,MenuItem,Button,} from "@material-tailwind/react"; 2 | export function ProfileList() { 3 | return ( 4 | 10 | 11 | 12 | 13 | 14 | Menu Item 1 15 | Menu Item 2 16 | Menu Item 3 17 | 18 | 19 | ); 20 | } -------------------------------------------------------------------------------- /src/components/Company/Dashboard/ScheduledList/ScheduledList.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | function ScheduledList() { 4 | return ( 5 | <> 6 |
7 |
8 |
9 |

Scheduled list

10 |

See information about all members

11 | 12 |
13 |
14 | 15 |
16 |
17 |
18 | ) 19 | } 20 | 21 | export default ScheduledList -------------------------------------------------------------------------------- /src/routes/Admin.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { Routes, Route } from 'react-router-dom' 3 | import AdminLoginPage from '../pages/Admin/AdminLoginPage' 4 | import AdminHomePage from '../pages/Admin/AdminHomePage' 5 | import AdminProtected from '../ProtectedRoutes/AdminProtected' 6 | import PrivateRoutes from '../ProtectedRoutes/PrivateRoutes' 7 | 8 | function AdminRoutes() { 9 | return ( 10 | 11 | }> 12 | } /> 13 | 14 | }> 15 | } /> 16 | 17 | 18 | ) 19 | } 20 | 21 | export default AdminRoutes 22 | -------------------------------------------------------------------------------- /src/Redux/store.js: -------------------------------------------------------------------------------- 1 | import { persistStore, persistReducer } from 'redux-persist'; 2 | import { configureStore } from "@reduxjs/toolkit"; 3 | import storage from 'redux-persist/lib/storage'; 4 | import UserSlice from './UserSlice'; 5 | import CompanySlice from './CompanySlice'; 6 | import UserReduxSlice from '../Redux/UserSlice'; 7 | 8 | const persistConfig = { 9 | key: 'root', 10 | storage, 11 | }; 12 | 13 | const persistedReducer = persistReducer(persistConfig, UserSlice); 14 | const persistedCompanyReducer = persistReducer(persistConfig, CompanySlice); 15 | 16 | const Store = configureStore({ 17 | reducer: { 18 | user: persistedReducer, 19 | company: persistedCompanyReducer, 20 | }, 21 | }); 22 | 23 | const persistor = persistStore(Store); 24 | 25 | export { Store, persistor }; 26 | -------------------------------------------------------------------------------- /src/ProtectedRoutes/UserProtected.jsx: -------------------------------------------------------------------------------- 1 | import jwt_decode from 'jwt-decode' 2 | import { Outlet } from 'react-router-dom' 3 | import UnknownHomePage from '../pages/UnknownUser/UnknownHomePage' 4 | import Company_HomePage from '../pages/Company/CompanyHomePage' 5 | import AdminHomePage from '../pages/Admin/AdminHomePage' 6 | import Position from '../pages/User/RegisterSteps/Position' 7 | function UserProtected() { 8 | const token = localStorage.getItem('token') 9 | if (token){ 10 | const decode = jwt_decode(token) 11 | if (decode.role === 'user'){ 12 | 13 | return 14 | 15 | } else if (decode.role === 'company'){ 16 | return 17 | } else if (decode.role === 'admin' && decode.is_admin){ 18 | return 19 | } else{ 20 | return 21 | } 22 | } else { 23 | return 24 | } 25 | 26 | } 27 | 28 | export default UserProtected -------------------------------------------------------------------------------- /src/ProtectedRoutes/AdminProtected.jsx: -------------------------------------------------------------------------------- 1 | import jwt_decode from 'jwt-decode' 2 | import { Outlet } from 'react-router-dom' 3 | import CompanyHomePage from '../pages/Company/CompanyHomePage' 4 | import UserHomePage from '../pages/User/UserHomePage/UserHomePage' 5 | import UnknownHomePage from '../pages/UnknownUser/UnknownHomePage' 6 | function AdminProtected() { 7 | const token = localStorage.getItem('token') 8 | if (token) { 9 | const decode = jwt_decode(token) 10 | if (decode.role === 'user') { 11 | return 12 | }else if (decode.role === 'company'){ 13 | return 14 | } else if (decode.role === 'admin' && decode.is_admin) { 15 | return 16 | } else{ 17 | return 18 | } 19 | } else { 20 | return 21 | } 22 | 23 | } 24 | 25 | 26 | export default AdminProtected -------------------------------------------------------------------------------- /src/ProtectedRoutes/PrivateRoutes.jsx: -------------------------------------------------------------------------------- 1 | import jwt_decode from "jwt-decode" 2 | import { Outlet } from "react-router-dom" 3 | import UserHomePage from "../pages/User/UserHomePage/UserHomePage" 4 | import Company_HomePage from "../pages/Company/CompanyHomePage" 5 | import AdminHomePage from "../pages/Admin/AdminHomePage" 6 | import UnknownHomePage from "../pages/UnknownUser/UnknownHomePage" 7 | 8 | function PrivateRoutes() { 9 | const token = localStorage.getItem('token') 10 | if (token){ 11 | const decode = jwt_decode(token) 12 | if (decode.role === 'user'){ 13 | return 14 | } else if (decode.role === 'company'){ 15 | return 16 | } else if (decode.role === 'admin' && decode.is_admin){ 17 | return 18 | } else{ 19 | return 20 | } 21 | } 22 | return 23 | } 24 | 25 | 26 | export default PrivateRoutes 27 | -------------------------------------------------------------------------------- /src/ProtectedRoutes/CompanyProtexted.jsx: -------------------------------------------------------------------------------- 1 | import jwt_decode from "jwt-decode"; 2 | import { Outlet } from "react-router-dom"; 3 | import UnknownHomePage from "../pages/UnknownUser/UnknownHomePage"; 4 | import UserHomePage from "../pages/User/UserHomePage/UserHomePage"; 5 | import AdminHomePage from "../pages/Admin/AdminHomePage"; 6 | import CompanyCreations from "../pages/Company/RegistrationSteps/CompanyCreations"; 7 | 8 | function CompanyProtected() { 9 | const token = localStorage.getItem("token"); 10 | if (token) { 11 | const decode = jwt_decode(token); 12 | if (decode.role === "user") { 13 | return ; 14 | } else if (decode.role === "company") { 15 | if (!decode.is_compleated){ 16 | return ; 17 | }else{ 18 | return ; 19 | } 20 | } else if (decode.role === "admin" && decode.is_admin) { 21 | return ; 22 | } else { 23 | return ; 24 | } 25 | } else { 26 | return ; 27 | } 28 | } 29 | 30 | export default CompanyProtected; 31 | -------------------------------------------------------------------------------- /src/main.jsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import ReactDOM from "react-dom"; 3 | import App from "./App.jsx"; 4 | // For google authendication 5 | import { GoogleOAuthProvider } from "@react-oauth/google"; 6 | import "./index.css"; 7 | // For Redux 8 | import { PersistGate } from "redux-persist/integration/react"; 9 | import { Store, persistor } from "./Redux/store"; 10 | import { Provider } from "react-redux"; 11 | // For React query 12 | import { QueryClient, QueryClientProvider } from "react-query"; 13 | // Render the app inside the PersistGate 14 | const queryClient = new QueryClient(); 15 | 16 | ReactDOM.createRoot(document.getElementById("root")).render( 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | ); 29 | -------------------------------------------------------------------------------- /src/utils/axiosUtils.jsx: -------------------------------------------------------------------------------- 1 | import axios from "axios"; 2 | import {UserUrl, CompanyUrl, AdminUrl} from '../constants/constants' 3 | 4 | // setting for Request time out 5 | const createAxioxClient = (baseURL)=>{ 6 | const client = axios.create({ 7 | baseURL, 8 | timeout: 8000, 9 | timeoutErrorMessage: "Request timeout Please Try Again!!!" 10 | }) 11 | return client 12 | } 13 | 14 | const attatToken = (req, tokenName) =>{ 15 | let authToken = localStorage.getItem('token') 16 | const accesstoken = JSON.parse(authToken); 17 | if (accesstoken){ 18 | req.headers.Authorization = `Bearer ${accesstoken.access}`; 19 | } 20 | return req 21 | } 22 | 23 | const userAxiosInstant = createAxioxClient(UserUrl) 24 | userAxiosInstant.interceptors.request.use(async (req) =>{ 25 | const modifiedReq = attatToken(req, 'token') 26 | return modifiedReq 27 | }) 28 | 29 | const CompanyAxiosInstant = createAxioxClient(CompanyUrl) 30 | CompanyAxiosInstant.interceptors.request.use(async (req) =>{ 31 | const modifiedReq = attatToken(req, 'token') 32 | return modifiedReq 33 | }) 34 | 35 | 36 | const adminAxiosInstant = createAxioxClient(AdminUrl) 37 | adminAxiosInstant.interceptors.request.use(async (req) =>{ 38 | const modifiedReq = attatToken(req, 'token') 39 | return modifiedReq 40 | }) 41 | 42 | export { userAxiosInstant, CompanyAxiosInstant, adminAxiosInstant} -------------------------------------------------------------------------------- /public/vite.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/Redux/CompanySlice.js: -------------------------------------------------------------------------------- 1 | import { createSlice } from "@reduxjs/toolkit"; 2 | 3 | const initialState = { 4 | CompanyInfo: {}, 5 | }; 6 | 7 | const companySlice = createSlice({ 8 | name: "company", 9 | initialState, 10 | reducers: { 11 | setCompanyDetails: (state, action) => { 12 | state.CompanyInfo = action.payload.CompanyInfo; 13 | }, 14 | UpdateCompanyDetails: (state, action) => { 15 | state.CompanyInfo = { 16 | ...state.CompanyInfo, 17 | first_name: action.payload.first_name, 18 | last_name: action.payload.last_name, 19 | profile_image: action.payload.profile_image, 20 | company_name: action.payload.company_name, 21 | industry: action.payload.industry, 22 | company_size: action.payload.company_size, 23 | company_type: action.payload.company_type, 24 | gst: action.payload.gst, 25 | description: action.payload.description, 26 | streetaddress: action.payload.streetaddress, 27 | contry: action.payload.contry, 28 | state: action.payload.state, 29 | city: action.payload.city, 30 | zipcode: action.payload.zipcode, 31 | }; 32 | }, 33 | 34 | LogoutCompanyDetails: (state, action) => { 35 | state.CompanyInfo = {}; 36 | }, 37 | }, 38 | }); 39 | 40 | export const { 41 | setCompanyDetails, 42 | LogoutCompanyDetails, 43 | UpdateCompanyDetails, 44 | 45 | } = companySlice.actions; 46 | export default companySlice.reducer; 47 | -------------------------------------------------------------------------------- /src/components/user/EducatinModals/DltEducationModal.jsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { 3 | Button, 4 | Dialog, 5 | DialogHeader, 6 | DialogBody, 7 | DialogFooter, 8 | } from "@material-tailwind/react"; 9 | import { useDispatch } from "react-redux"; 10 | import { useSelector } from "react-redux/es/hooks/useSelector"; 11 | import { DeleteEducation } from "../../../Redux/UserSlice"; 12 | 13 | const DltEducationModal = ({ isOpen, onClose, id }) => { 14 | const dispatch = useDispatch(); 15 | const { Education } = useSelector((state) => state.user); 16 | const educationToDlt = Education.find((education, index) => index === id); 17 | 18 | const ConfirmButton=()=>{ 19 | dispatch(DeleteEducation(id)) 20 | onClose() 21 | } 22 | return ( 23 | <> 24 | 25 | Remove Education 26 | 27 |

28 | Are you sure you want to remove{" "} 29 | '{educationToDlt && educationToDlt.School}' from your 30 | profile? 31 |

{" "} 32 |
33 | 34 | 37 | 40 | 41 |
42 | 43 | ); 44 | }; 45 | export { DltEducationModal }; 46 | -------------------------------------------------------------------------------- /src/components/user/ExperienceModals/DeleteExpModal.jsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { 3 | Button, 4 | Dialog, 5 | DialogHeader, 6 | DialogBody, 7 | DialogFooter, 8 | } from "@material-tailwind/react"; 9 | import { useDispatch } from "react-redux"; 10 | import { useSelector } from "react-redux/es/hooks/useSelector"; 11 | import { DeteteExperience } from "../../../Redux/UserSlice"; 12 | 13 | const DeleteExpModal = ({ isOpen, onClose, id }) => { 14 | const dispatch = useDispatch(); 15 | const { experiences } = useSelector((state) => state.user); 16 | const experienceToDlt = experiences.find((experience, index) => index === id); 17 | const ConfirmButton=()=>{ 18 | dispatch(DeteteExperience(id)) 19 | onClose() 20 | } 21 | return ( 22 | <> 23 | 24 | Remove Work Experience 25 | 26 |

27 | Are you sure you want to remove{" "} 28 | '{experienceToDlt && experienceToDlt.company}' from your 29 | profile? 30 |

{" "} 31 |
32 | 33 | 36 | 39 | 40 |
41 | 42 | ); 43 | }; 44 | export { DeleteExpModal }; 45 | -------------------------------------------------------------------------------- /src/App.jsx: -------------------------------------------------------------------------------- 1 | import { BrowserRouter as Router, Routes, Route } from 'react-router-dom' 2 | import LoginPage from './pages/LoginPage' 3 | import ChoosePage from './pages/ChoosePage' 4 | import UnknownHomePage from './pages/UnknownUser/UnknownHomePage' 5 | import UserRoutes from './routes/user' 6 | import CompanyRoutes from './routes/company' 7 | import AdminRoutes from './routes/Admin' 8 | import PrivateRoutes from './ProtectedRoutes/PrivateRoutes' 9 | import MailConfirm from './pages/User/SignUpPage/RegisterResendmail' 10 | import MailShowpage from './pages/ForgotPassword/Mailshowpage' 11 | import ForgotPassword from './pages/ForgotPassword/ForgotPassword' 12 | import RestPassword from './pages/ForgotPassword/RestPassword' 13 | 14 | function App() { 15 | 16 | return ( 17 |
18 | 19 | 20 | } > 21 | } /> 22 | } /> 23 | } /> 24 | } /> 25 | } /> 26 | } /> 27 | } /> 28 | 29 | 30 | } /> 31 | } /> 32 | } /> 33 | 34 | 35 |
36 | ) 37 | } 38 | 39 | export default App 40 | -------------------------------------------------------------------------------- /src/routes/company.jsx: -------------------------------------------------------------------------------- 1 | import { Routes, Route } from "react-router-dom"; 2 | import Company_Register_Page from "../pages/Company/CompanyRegister_Page"; 3 | import CompanyHomePage from "../pages/Company/CompanyHomePage"; 4 | import CompanyProtected from "../ProtectedRoutes/CompanyProtexted"; 5 | import PrivateRoutes from "../ProtectedRoutes/PrivateRoutes"; 6 | import CompanyCreations from "../pages/Company/RegistrationSteps/CompanyCreations"; 7 | import CompanyProfile from "../pages/Company/CompanyProfile/CompanyProfile"; 8 | import CompanyDashboard from "../pages/Company/CompanyDashboard/CompanyDashboard"; 9 | import UserFullData from "../components/Company/Dashboard/RequestsComponents/CompanyList/UserFullData"; 10 | import CompanyNotifications from "../pages/Company/CompanyNotifications"; 11 | import CompanyChat from "../pages/Company/CompanyChat/CompanyChat"; 12 | import AllUsersList from "../pages/Company/AllUsersList/AllUsersList"; 13 | function CompanyRoutes() { 14 | return ( 15 | 16 | }> 17 | } /> 18 | 19 | }> 20 | } /> 21 | } /> 22 | } /> 23 | } /> 24 | } /> 25 | } /> 26 | } /> 27 | } /> 28 | 29 | 30 | 31 | ); 32 | } 33 | export default CompanyRoutes; 34 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "frontend", 3 | "private": true, 4 | "version": "0.0.0", 5 | "type": "module", 6 | "scripts": { 7 | "dev": "vite", 8 | "build": "vite build", 9 | "lint": "eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0", 10 | "preview": "vite preview" 11 | }, 12 | "dependencies": { 13 | "@headlessui/react": "^1.7.16", 14 | "@heroicons/react": "^2.0.18", 15 | "@material-tailwind/react": "^2.1.0", 16 | "@react-icons/all-files": "^4.1.0", 17 | "@react-oauth/google": "^0.11.1", 18 | "@reduxjs/toolkit": "^1.9.5", 19 | "axios": "^1.5.1", 20 | "chart.js": "^4.4.0", 21 | "countries-list": "^2.6.1", 22 | "country-state-city": "^3.2.0", 23 | "framer-motion": "^10.15.2", 24 | "jwt-decode": "^3.1.2", 25 | "react": "^18.2.0", 26 | "react-chartjs-2": "^5.2.0", 27 | "react-dom": "^18.2.0", 28 | "react-owl-carousel": "^2.3.3", 29 | "react-pdf": "^7.3.3", 30 | "react-query": "^3.39.3", 31 | "react-redux": "^8.1.2", 32 | "react-router-dom": "^6.16.0", 33 | "react-search-autocomplete": "^8.5.2", 34 | "react-select": "^5.7.4", 35 | "react-spinners": "^0.13.8", 36 | "react-toastify": "^9.1.3", 37 | "redux": "^4.2.1", 38 | "redux-persist": "^6.0.0", 39 | "socket.io-client": "^4.7.2", 40 | "websocket": "^1.0.34" 41 | }, 42 | "devDependencies": { 43 | "@types/react": "^18.2.15", 44 | "@types/react-dom": "^18.2.7", 45 | "@vitejs/plugin-react": "^4.0.3", 46 | "autoprefixer": "^10.4.14", 47 | "eslint": "^8.45.0", 48 | "eslint-plugin-react": "^7.32.2", 49 | "eslint-plugin-react-hooks": "^4.6.0", 50 | "eslint-plugin-react-refresh": "^0.4.3", 51 | "postcss": "^8.4.27", 52 | "tailwind-scrollbar": "^3.0.5", 53 | "tailwindcss": "^3.3.3", 54 | "vite": "^4.4.5" 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /src/components/Admin/AdminNavBar&Sidebar/AdminDrawer.jsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { 3 | Drawer, 4 | Button, 5 | Typography, 6 | IconButton, 7 | } from "@material-tailwind/react"; 8 | import { AdminSideBar } from "./AdminSideBar"; 9 | 10 | export function AdminDrawer(Selections) { 11 | const [open, setOpen] = React.useState(false); 12 | 13 | const openDrawer = () => setOpen(true); 14 | const closeDrawer = () => setOpen(false); 15 | 16 | return ( 17 | 18 | 34 | 35 |
36 | 37 | 45 | 50 | 51 | 52 |
53 | 54 |
55 |
56 |
57 |
58 | ); 59 | } 60 | -------------------------------------------------------------------------------- /src/components/Admin/Admin_CompanyManagement/Admin_CompanyManagement.jsx: -------------------------------------------------------------------------------- 1 | import React, { useState } from "react"; 2 | import AdminCompanyManagemen from "./AdminCompanyLIst/AdminCompanyList"; 3 | import AdminPostManagement from "./AdminPostManagement/AdminPostManagement"; 4 | 5 | function Admin_CompanyManagement() { 6 | const [selected, setselected] = useState("Company List"); 7 | return ( 8 | <> 9 |
10 |
11 |
12 |
setselected("Company List")} 19 | > 20 | Company List 21 |
22 |
setselected("Post Management")} 29 | > 30 | Post Management 31 |
32 |
33 |
34 |
35 |
36 | { selected === "Company List" ? ( 37 | 38 | ) : ( 39 | 40 | )} 41 |
42 |
43 |
44 | 45 | ); 46 | } 47 | 48 | export default Admin_CompanyManagement; 49 | -------------------------------------------------------------------------------- /src/assets/icons8-google.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/components/Profile/MyinfoComponent/ExperienceComponents/DeleteExperienceModal.jsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { 3 | Button, 4 | Dialog, 5 | DialogHeader, 6 | DialogBody, 7 | DialogFooter, 8 | } from "@material-tailwind/react"; 9 | import { useDispatch } from "react-redux"; 10 | import { useSelector } from "react-redux/es/hooks/useSelector"; 11 | import { DeteteExperience } from "../../../../Redux/UserSlice"; 12 | import { toast } from "react-toastify"; 13 | 14 | // Service 15 | import { DeleteExperienceDetails } from "../../../../services/userApi"; 16 | 17 | const DeleteExperienceModal = ({ isOpen, onClose, id }) => { 18 | const dispatch = useDispatch(); 19 | const { experiences } = useSelector((state) => state.user); 20 | const experienceToDlt = experiences.find((experience, index) => index === id.index); 21 | const ConfirmButton=async()=>{ 22 | try{ 23 | const res = await DeleteExperienceDetails(id.id) 24 | dispatch(DeteteExperience(id.index)) 25 | }catch(error){ 26 | toast.error("Somethink wrong") 27 | } 28 | onClose() 29 | } 30 | return ( 31 | <> 32 | 33 | Remove Work Experience 34 | 35 |

36 | Are you sure you want to remove{" "} 37 | '{experienceToDlt && experienceToDlt.company}' from your 38 | profile? 39 |

{" "} 40 |
41 | 42 | 45 | 48 | 49 |
50 | 51 | ); 52 | }; 53 | export { DeleteExperienceModal }; 54 | -------------------------------------------------------------------------------- /src/components/Admin/Admin_CompanyManagement/AdminPostManagement/AdminPostManagement.jsx: -------------------------------------------------------------------------------- 1 | import React, { useEffect, useState } from "react"; 2 | import { Select, Option } from "@material-tailwind/react"; 3 | import AdminAllPostList from "./AdminAllPostList/AdminAllPostList"; 4 | import AdminPostBlockedList from "./AdminPostBlockedList/AdminPostBlockedList"; 5 | function AdminPostManagement() { 6 | const [selected, setSelected] = useState("All List"); 7 | useEffect(()=>{ 8 | document.title = 'Company Posts | Career Bridge' 9 | },[]) 10 | return ( 11 | <> 12 |
13 |
14 |
15 |

{selected === "All List" ? ( 16 | <>All Company Posts 17 | ) : selected === "Block LIst" ? ( 18 | <>Blocked Company Post 19 | ) : ( 20 | <>Reports List 21 | )}

22 |

See information about all posts

23 |
24 |
25 | {" "} 26 | 35 |
36 |
37 |
38 |
39 | {selected === "All List" ? ( 40 | 41 | ) : selected === "Block LIst" ? ( 42 | 43 | ) : ( 44 | <> 45 | )} 46 |
47 |
48 |
49 | 50 | ); 51 | } 52 | 53 | export default AdminPostManagement; 54 | -------------------------------------------------------------------------------- /src/components/Admin/Admin_CompanyManagement/AdminCompanyLIst/AdminCompanyList.jsx: -------------------------------------------------------------------------------- 1 | import React, { useState } from "react"; 2 | import { Select, Option } from "@material-tailwind/react"; 3 | import AdminAllCompanyList from "./AdminAllCompanyList/AdminAllCompanyList"; 4 | import AdminVerifiedList from "./AdminVerifiedList/AdminVerifiedList"; 5 | import AdminCompanyBlockedList from "./AdminCompanyBlockedList/AdminCompanyBlockedList"; 6 | function AdminCompanyManagemen() { 7 | const [selected, setSelected] = useState("All List"); 8 | 9 | return ( 10 | <> 11 |
12 |
13 |
14 |

{selected === "All List" ? ( 15 | <>All Company List 16 | ) : selected === "Unblock List" ? ( 17 | <>Unblocked Company List 18 | ) : ( 19 | <>Blocked Company List 20 | )}

21 |

See information about all posts

22 |
23 |
24 | {" "} 25 | 34 |
35 |
36 |
37 |
38 | {selected === "All List" ? ( 39 | 40 | ) : selected === "Unblock List" ? ( 41 | 42 | ) : ( 43 | 44 | )} 45 |
46 |
47 |
48 | 49 | ); 50 | } 51 | 52 | export default AdminCompanyManagemen; 53 | -------------------------------------------------------------------------------- /src/components/Profile/MyinfoComponent/EducationsComponents/DeleteEducationModal.jsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { 3 | Button, 4 | Dialog, 5 | DialogHeader, 6 | DialogBody, 7 | DialogFooter, 8 | } from "@material-tailwind/react"; 9 | import { useDispatch } from "react-redux"; 10 | import { useSelector } from "react-redux/es/hooks/useSelector"; 11 | import { DeleteEducation } from "../../../../Redux/UserSlice"; 12 | import { ToastContainer, toast } from "react-toastify"; 13 | import "react-toastify/dist/ReactToastify.css"; 14 | // Service 15 | import { DeleteEducationDetails } from "../../../../services/userApi"; 16 | 17 | const DeleteEducationModal = ({ isOpen, onClose, id }) => { 18 | const dispatch = useDispatch(); 19 | const { Education } = useSelector((state) => state.user); 20 | const educationToDlt = Education.find((education, index) => index === id.index); 21 | 22 | const ConfirmButton= async ()=>{ 23 | try { 24 | const res = await DeleteEducationDetails(id.id) 25 | toast.success("Eduction Deleted successfully") 26 | dispatch(DeleteEducation(id.index)) 27 | } catch (error) { 28 | toast.error("Something wrong") 29 | } 30 | onClose() 31 | } 32 | return ( 33 | <> 34 | 35 | Remove Education 36 | 37 |

38 | Are you sure you want to remove{" "} 39 | '{educationToDlt && educationToDlt.School}' from your 40 | profile? 41 |

{" "} 42 |
43 | 44 | 47 | 50 | 51 |
52 | 53 | ); 54 | }; 55 | export { DeleteEducationModal }; 56 | -------------------------------------------------------------------------------- /src/pages/Company/CompanyDashboard/CompanyDashboard.jsx: -------------------------------------------------------------------------------- 1 | import React, { useState } from "react"; 2 | import { NavbarDefault } from "../../../components/Navbar/NavBar"; 3 | import RequstsComponents from "../../../components/Company/Dashboard/RequestsComponents/RequstsComponents"; 4 | import ScheduledList from "../../../components/Company/Dashboard/ScheduledList/ScheduledList"; 5 | import PostList from "../../../components/Company/Dashboard/PostsComponents/PostList"; 6 | 7 | function CompanyDashboard() { 8 | const [selected, setselected] = useState("request"); 9 | return ( 10 | <> 11 |
12 |
13 | 14 |
15 |
16 |
17 |
18 |
setselected("request")} 25 | > 26 |

Requests

27 |
28 | 29 |
setselected("post")} 36 | > 37 | Post 38 |
39 |
40 |
41 | {selected === "request" ? ( 42 | 43 | ) : ( 44 | 45 | )} 46 |
47 |
48 | 49 | ); 50 | } 51 | 52 | export default CompanyDashboard; 53 | -------------------------------------------------------------------------------- /src/components/Admin/AdminMore/Skills/Skills.jsx: -------------------------------------------------------------------------------- 1 | import React, { useEffect, useState } from "react"; 2 | import { Select, Option } from "@material-tailwind/react"; 3 | import SkillsList from "./SkillsList/SkillsList"; 4 | import BlockedSkillsList from "./BlockedSkillsList/BlockedSkillsList"; 5 | import { AddSkillsModal } from "./AddSkillsModal/AddSkillsModal"; 6 | 7 | function Skills() { 8 | const [selected, setSelected] = useState("All Skills List"); 9 | const [open, setOpen] = useState(false); 10 | 11 | const handleOpen = () => setOpen(!open); 12 | useEffect(()=>{ 13 | document.title='Skills | Career Bridge' 14 | },[]) 15 | return ( 16 | <> 17 |
18 |
19 |
20 |

21 | {" "} 22 | {selected === "All Skills List" ? ( 23 | <>All Skills List 24 | ) : ( 25 | <>Deleted Skills List 26 | )} 27 |

28 |

See information about all posts

29 | 33 |
34 |
35 | {" "} 36 | 44 |
45 |
46 |
47 |
48 | {selected === "All Skills List" ? ( 49 | 50 | ) : ( 51 | 52 | )} 53 |
54 |
55 |
56 | 57 | 58 | ); 59 | } 60 | 61 | export default Skills; 62 | -------------------------------------------------------------------------------- /src/components/Admin/AdminMore/JobTitle/JobTitle.jsx: -------------------------------------------------------------------------------- 1 | import React, { useEffect, useState } from "react"; 2 | import { Select, Option } from "@material-tailwind/react"; 3 | import AllJobTitle from "./AllJobTitleList/AllJobTitle"; 4 | import BlockedJobTitleList from "./BlockedTitleList/BlockedJobTitleList"; 5 | import { AddJotTitleModal } from "./AddJotTitleModal/AddJotTitleModal"; 6 | 7 | function JobTitle() { 8 | const [selected, setSelected] = useState("Job TItle List"); 9 | const [open, setOpen] = useState(false); 10 | 11 | const handleOpen = () => setOpen(!open); 12 | useEffect(()=>{ 13 | document.title='Add Job Title Feature' 14 | },[]) 15 | return ( 16 | <> 17 |
18 |
19 |
20 |

21 | {" "} 22 | {selected === "Job TItle List" ? ( 23 | <>All Job Title List 24 | ) : ( 25 | <>Deleted Job Title List 26 | )} 27 |

28 |

See information about all posts

29 | 33 |
34 |
35 | {" "} 36 | 44 |
45 |
46 |
47 |
48 | {selected === "Job TItle List" ? ( 49 | 50 | ) : ( 51 | 52 | )} 53 |
54 |
55 |
56 | 57 | 58 | ); 59 | } 60 | 61 | export default JobTitle; 62 | -------------------------------------------------------------------------------- /src/components/Admin/AdminMore/JobCategory/JobCategory.jsx: -------------------------------------------------------------------------------- 1 | import React, { useEffect, useState } from "react"; 2 | import { Select, Option } from "@material-tailwind/react"; 3 | import AllCategoryList from "./AllCategoryList/AllCategoryList"; 4 | import BlockedCategoryList from "./BlockedCategoryList/BlockedCategoryList"; 5 | import { AddJobCategoryModal } from "./AddJobCategory/AddJobCategoryModal"; 6 | 7 | function JobCategory() { 8 | const [selected, setSelected] = useState("Category List"); 9 | const [open, setOpen] = useState(false); 10 | 11 | const handleOpen = () => setOpen(!open); 12 | useEffect(()=>{ 13 | document.title='Add Job Category Feature' 14 | },[]) 15 | return ( 16 | <> 17 |
18 |
19 |
20 |

21 | {" "} 22 | {selected === "Category List" ? ( 23 | <>All Category List 24 | ) : ( 25 | <>Deleted Category List 26 | )} 27 |

28 |

See information about all posts

29 | 33 |
34 |
35 | {" "} 36 | 44 |
45 |
46 |
47 |
48 | {selected === "Category List" ? ( 49 | 50 | ) : ( 51 | 52 | )} 53 |
54 |
55 |
56 | 57 | 58 | ); 59 | } 60 | 61 | export default JobCategory; 62 | -------------------------------------------------------------------------------- /src/components/Profile/MyinfoComponent/Modal/OpenToCv.jsx: -------------------------------------------------------------------------------- 1 | import { useEffect, useState, useRef } from "react"; 2 | import { 3 | Dialog, 4 | DialogHeader, 5 | DialogBody, 6 | DialogFooter, 7 | Button, 8 | } from "@material-tailwind/react"; 9 | import { Document, Page, pdfjs } from "react-pdf"; 10 | 11 | function OpenToCv({ isOpen, onClose, path }) { 12 | pdfjs.GlobalWorkerOptions.workerSrc = `//cdnjs.cloudflare.com/ajax/libs/pdf.js/${pdfjs.version}/pdf.worker.js`; 13 | const [pageNumber, setPageNumber] = useState(1); 14 | const [numPages, setNumPages] = useState(null); 15 | 16 | function onDocumentLoadSuccess({ numPages }) { 17 | setNumPages(numPages); 18 | } 19 | 20 | function goToNextPage() { 21 | if (pageNumber < numPages) { 22 | setPageNumber(pageNumber + 1); 23 | } 24 | } 25 | 26 | function goToPreviousPage() { 27 | if (pageNumber > 1) { 28 | setPageNumber(pageNumber - 1); 29 | } 30 | } 31 | 32 | function onDocumentLoadSuccess({ numPages }) { 33 | setNumPages(numPages); 34 | } 35 | 36 | return ( 37 | 38 | Cv 39 | 40 |
41 |
42 | 47 | 48 | 49 |
50 |
51 |

52 | Page {pageNumber} of {numPages} 53 |

54 | 55 | 56 |
57 |
58 |
59 | 60 | 63 | 64 |
65 | ); 66 | } 67 | 68 | export default OpenToCv; 69 | -------------------------------------------------------------------------------- /src/routes/user.jsx: -------------------------------------------------------------------------------- 1 | import { Routes, Route } from 'react-router-dom'; 2 | import UserHomePage from '../pages/User/UserHomePage/UserHomePage'; 3 | import SignUpPage from '../pages/User/SignUpPage/SignUpPage'; 4 | import UserProtected from '../ProtectedRoutes/UserProtected'; 5 | import PrivateRoutes from '../ProtectedRoutes/PrivateRoutes'; 6 | import UserProfilePage from '../pages/User/UserProfilePage/UserProfilePage'; 7 | import Position from '../pages/User/RegisterSteps/Position'; 8 | import Role from '../pages/User/RegisterSteps/Role'; 9 | import Experience from '../pages/User/RegisterSteps/Experience'; 10 | import Education from '../pages/User/RegisterSteps/Education'; 11 | import Languages from '../pages/User/RegisterSteps/Languages'; 12 | import Skills from '../pages/User/RegisterSteps/Skills'; 13 | import ProfileCreation from '../pages/User/RegisterSteps/ProfileCreation'; 14 | import Notifications from '../pages/User/Notifications/Notifications'; 15 | import Jobs from '../pages/User/Jobs/Jobs'; 16 | import Dashboard from '../pages/User/Dashboard/Dashboard'; 17 | import UserChat from '../pages/User/UserChat/UserChat'; 18 | import CompanyLIst from '../pages/User/CompanyLIst/CompanyLIst'; 19 | function UserRoutes() { 20 | 21 | return ( 22 | 23 | }> 24 | } /> 25 | 26 | }> 27 | } /> 28 | }/> 29 | } /> 30 | } /> 31 | } /> 32 | } /> 33 | }/> 34 | }/> 35 | }/> 36 | }/> 37 | }/> 38 | }/> 39 | }/> 40 | }/> 41 | }/> 42 | 43 | 44 | 45 | ); 46 | } 47 | 48 | export default UserRoutes; 49 | -------------------------------------------------------------------------------- /src/components/Company/Dashboard/PostsComponents/BlockUnblock/DeletePost.jsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { 3 | Button, 4 | Dialog, 5 | DialogHeader, 6 | DialogBody, 7 | DialogFooter, 8 | } from "@material-tailwind/react"; 9 | import { useSelector } from "react-redux"; 10 | import { ToastContainer, toast } from "react-toastify"; 11 | import "react-toastify/dist/ReactToastify.css"; 12 | import { 13 | CompanyPostBolckUnblock, 14 | CompanyPostDetails, 15 | GetListOfCompanyPost, 16 | } from "../../../../../services/companyApi"; 17 | const DeletePost = ({ 18 | isOpen, 19 | view, 20 | onClose, 21 | resetView, 22 | updateSearcheddata, 23 | Selectedpost, 24 | }) => { 25 | const { CompanyInfo } = useSelector((state) => state.company); 26 | const ConfirmButton = async () => { 27 | try { 28 | const data = { 29 | is_blocked: "false", 30 | is_deleted: "true", 31 | }; 32 | const res = await CompanyPostBolckUnblock(data, Selectedpost.id); 33 | 34 | if (res.status === 200) { 35 | resetView(); 36 | const search = '' 37 | const res2 = await GetListOfCompanyPost(CompanyInfo.companyid,search); 38 | updateSearcheddata(res2.data); 39 | toast.success("Post Deleted successfully"); 40 | } 41 | } catch (error) { 42 | console.log(error); 43 | } 44 | onClose(); 45 | }; 46 | return ( 47 | <> 48 | 49 | 50 | Block Post 51 | 52 |

53 | Are you sure you want to block ' 54 | 55 | {Selectedpost?.Jobtitle.title_name} 56 | 57 | ' from your profile? 58 |

{" "} 59 |
60 | 61 | 68 | 75 | 76 |
77 | 78 | ); 79 | }; 80 | export { DeletePost }; 81 | -------------------------------------------------------------------------------- /src/components/Company/Dashboard/PostsComponents/BlockUnblock/UnblockPost.jsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { 3 | Button, 4 | Dialog, 5 | DialogHeader, 6 | DialogBody, 7 | DialogFooter, 8 | } from "@material-tailwind/react"; 9 | import { useSelector } from "react-redux"; 10 | import { 11 | CompanyPostBolckUnblock, 12 | listofcompanypostarchived, 13 | } from "../../../../../services/companyApi"; 14 | import { ToastContainer, toast } from "react-toastify"; 15 | import "react-toastify/dist/ReactToastify.css"; 16 | const Unblock = ({ 17 | isOpen, 18 | view, 19 | onClose, 20 | resetView, 21 | updateSearcheddata, 22 | Selectedpost, 23 | }) => { 24 | const { CompanyInfo } = useSelector((state) => state.company); 25 | const ConfirmButton = async () => { 26 | try { 27 | const data = { 28 | is_blocked: "false", 29 | is_deleted: "false", 30 | }; 31 | const res = await CompanyPostBolckUnblock(data, Selectedpost.id); 32 | 33 | if (res.status === 200) { 34 | const search = '' 35 | const res2 = await listofcompanypostarchived(CompanyInfo.companyid,search); 36 | console.log(res2,'sian'); 37 | updateSearcheddata(res2.data) 38 | resetView(); 39 | toast.success("Post Deleted successfully"); 40 | } 41 | } catch (error) { 42 | console.log(error); 43 | } 44 | onClose(); 45 | }; 46 | return ( 47 | <> 48 | 49 | 50 | Block Post 51 | 52 |

53 | Are you sure you want to block ' 54 | 55 | {Selectedpost?.Jobtitle.title_name} 56 | 57 | ' from your profile? 58 |

{" "} 59 |
60 | 61 | 68 | 75 | 76 |
77 | 78 | ); 79 | }; 80 | export { Unblock }; 81 | -------------------------------------------------------------------------------- /src/components/Admin/AdminMore/AdminMore.jsx: -------------------------------------------------------------------------------- 1 | import React, { useState } from "react"; 2 | import AdminCompanyManagemen from "../Admin_CompanyManagement/AdminCompanyLIst/AdminCompanyList"; 3 | import AdminPostManagement from "../Admin_CompanyManagement/AdminPostManagement/AdminPostManagement"; 4 | import JobCategory from "./JobCategory/JobCategory"; 5 | import JobTitle from "./JobTitle/JobTitle"; 6 | import Skills from "./Skills/Skills"; 7 | 8 | function AdminMore() { 9 | const [selected, setselected] = useState("Job Category"); 10 | return ( 11 | <> 12 |
13 |
14 |
15 |
setselected("Job Category")} 22 | > 23 | Job Category 24 |
25 |
setselected("Job Titles")} 32 | > 33 | Job Titles 34 |
35 |
setselected("Skills")} 42 | > 43 | Skills 44 |
45 |
46 |
47 |
48 |
49 | {selected === 'Job Category'?( 50 | 51 | ): selected === 'Job Titles'?( 52 | 53 | ):( 54 | 55 | )} 56 |
57 |
58 |
59 | 60 | ); 61 | } 62 | 63 | export default AdminMore; 64 | -------------------------------------------------------------------------------- /src/components/Admin/AdminMore/Skills/BlockedSkillsList/UnblockSkillsModal.jsx: -------------------------------------------------------------------------------- 1 | import React, { useState } from "react"; 2 | import { 3 | Button, 4 | Dialog, 5 | DialogHeader, 6 | DialogBody, 7 | DialogFooter, 8 | } from "@material-tailwind/react"; 9 | import { ToastContainer, toast } from "react-toastify"; 10 | import "react-toastify/dist/ReactToastify.css"; 11 | import {BlockedSkillsLists, SkillsDetails } from "../../../../../services/adminApi"; 12 | import Loader from "../../../../Loading/Loading"; 13 | const UnblockSkillsModal = ({ 14 | isOpen, 15 | onClose, 16 | updateSearcheddata, 17 | Selectedpost 18 | }) => { 19 | // For loading 20 | const [loading, setLoading] = useState(false); 21 | const handleLoading = () => setLoading((cur) => !cur); 22 | const ConfirmButton = async () => { 23 | try { 24 | const data = { 25 | is_deleted: false, 26 | }; 27 | handleLoading(); 28 | const res = await SkillsDetails(data, Selectedpost.id); 29 | 30 | if (res.status === 200) { 31 | const search = ""; 32 | const res2 = await BlockedSkillsLists(search); 33 | updateSearcheddata(res2.data); 34 | toast.success(`${res.data.skills} Unblocked successfully`); 35 | } 36 | handleLoading() 37 | } catch (error) { 38 | handleLoading() 39 | console.log(error); 40 | } 41 | onClose(); 42 | }; 43 | return ( 44 | <> 45 | {loading && } 46 | 47 | 48 | Block Post 49 | 50 |

51 | Are you sure you want to block ' 52 | 53 | {Selectedpost?.skills} 54 | {" "} 55 | ? 56 |

{" "} 57 |
58 | 59 | 66 | 73 | 74 |
75 | 76 | ); 77 | }; 78 | export { UnblockSkillsModal }; 79 | -------------------------------------------------------------------------------- /src/components/Admin/AdminMore/Skills/SkillsList/BlockSkillsModal.jsx: -------------------------------------------------------------------------------- 1 | import React, { useState } from "react"; 2 | import { 3 | Button, 4 | Dialog, 5 | DialogHeader, 6 | DialogBody, 7 | DialogFooter, 8 | } from "@material-tailwind/react"; 9 | import { ToastContainer, toast } from "react-toastify"; 10 | import "react-toastify/dist/ReactToastify.css"; 11 | import {SkillsDetails, SkilLslist } from "../../../../../services/adminApi"; 12 | import Loader from "../../../../Loading/Loading"; 13 | const BlockSkillsModal = ({ 14 | isOpen, 15 | onClose, 16 | resetView, 17 | updateSearcheddata, 18 | Selectedpost 19 | }) => { 20 | // For loading 21 | const [loading, setLoading] = useState(false); 22 | const handleLoading = () => setLoading((cur) => !cur); 23 | const ConfirmButton = async () => { 24 | try { 25 | const data = { 26 | is_deleted: true, 27 | }; 28 | handleLoading(); 29 | const res = await SkillsDetails(data, Selectedpost.id); 30 | 31 | if (res.status === 200) { 32 | resetView(); 33 | const search = ""; 34 | const res2 = await SkilLslist(search); 35 | updateSearcheddata(res2.data); 36 | toast.success(`${res.data.skills} Blocked successfully`); 37 | } 38 | handleLoading() 39 | } catch (error) { 40 | handleLoading() 41 | console.log(error); 42 | } 43 | onClose(); 44 | }; 45 | return ( 46 | <> 47 | {loading && } 48 | 49 | 50 | Block Post 51 | 52 |

53 | Are you sure you want to block ' 54 | 55 | {Selectedpost?.skills} 56 | {" "} 57 | ? 58 |

{" "} 59 |
60 | 61 | 68 | 75 | 76 |
77 | 78 | ); 79 | }; 80 | export { BlockSkillsModal }; 81 | -------------------------------------------------------------------------------- /src/components/Admin/AdminDashboard/AdminDashboard.jsx: -------------------------------------------------------------------------------- 1 | import React, { useEffect, useState } from "react"; 2 | import { 3 | Chart as ChartJS, 4 | ArcElement, 5 | Tooltip, 6 | Legend, 7 | CategoryScale, 8 | LinearScale, 9 | PointElement, 10 | LineElement, 11 | Title, 12 | } from "chart.js"; 13 | import { ToastContainer, toast } from "react-toastify"; 14 | import "react-toastify/dist/ReactToastify.css"; 15 | import { Pie } from "react-chartjs-2"; 16 | import { Line } from "react-chartjs-2"; 17 | import { GetChartData } from "../../../services/adminApi"; 18 | import Loader from "../../Loading/Loading"; 19 | 20 | ChartJS.register( 21 | ArcElement, 22 | Tooltip, 23 | Legend, 24 | CategoryScale, 25 | LinearScale, 26 | PointElement, 27 | LineElement, 28 | Title 29 | ); 30 | 31 | function AdminDashboard() { 32 | const [chartData, setChartData] = useState(null); 33 | const [lineChartData, setLineChartData] = useState(null); 34 | const getDatas = async () => { 35 | try { 36 | handleLoading(); 37 | const res = await GetChartData(); 38 | if (res.status === 200) { 39 | setLineChartData(res.data.line_chart); 40 | setChartData(res.data.pie_chart); 41 | } 42 | handleLoading(); 43 | } catch (error) { 44 | handleLoading(); 45 | console.log(error); 46 | toast.error("Some thing wrong"); 47 | } 48 | }; 49 | useEffect(() => { 50 | document.title = "Dashboard | Career Bridge"; 51 | getDatas(); 52 | }, []); 53 | // For loading 54 | const [loading, setLoading] = useState(false); 55 | const handleLoading = () => setLoading((cur) => !cur); 56 | return ( 57 | <> 58 | {" "} 59 | {loading && } 60 | 61 |
62 | {" "} 63 | {lineChartData && ( 64 |
65 |

66 | Post Counts Over Months 67 |

68 | 69 |
70 | )} 71 | {chartData && ( 72 |
73 |

74 | Users And Posts Chart 75 |

76 | 77 |
78 | )} 79 |
80 | 81 | ); 82 | } 83 | 84 | export default AdminDashboard; 85 | -------------------------------------------------------------------------------- /src/components/Admin/AdminMore/JobTitle/BlockedTitleList/UnBlockedTitleModal.jsx: -------------------------------------------------------------------------------- 1 | import React, { useState } from "react"; 2 | import { 3 | Button, 4 | Dialog, 5 | DialogHeader, 6 | DialogBody, 7 | DialogFooter, 8 | } from "@material-tailwind/react"; 9 | import { ToastContainer, toast } from "react-toastify"; 10 | import "react-toastify/dist/ReactToastify.css"; 11 | import {JobTitledDetails, JobTitledBlockedList } from "../../../../../services/adminApi"; 12 | import Loader from "../../../../Loading/Loading"; 13 | const UnBlockedTitleModal = ({ 14 | isOpen, 15 | onClose, 16 | resetView, 17 | updateSearcheddata, 18 | Selectedpost 19 | }) => { 20 | // For loading 21 | const [loading, setLoading] = useState(false); 22 | const handleLoading = () => setLoading((cur) => !cur); 23 | const ConfirmButton = async () => { 24 | try { 25 | const data = { 26 | title_name : Selectedpost.title_name, 27 | field : Selectedpost.field, 28 | is_deleted: false, 29 | }; 30 | handleLoading(); 31 | const res = await JobTitledDetails(data, Selectedpost.id); 32 | if (res.status === 200) { 33 | const search = ""; 34 | const res2 = await JobTitledBlockedList(search); 35 | console.log(res2); 36 | updateSearcheddata(res2.data); 37 | toast.success(`${res.data.title_name} UnBlocked successfully`); 38 | } 39 | handleLoading() 40 | } catch (error) { 41 | handleLoading() 42 | console.log(error); 43 | } 44 | onClose(); 45 | }; 46 | return ( 47 | <> 48 | {loading && } 49 | 50 | 51 | Block Post 52 | 53 |

54 | Are you sure you want to block ' 55 | 56 | {Selectedpost?.title_name} 57 | {" "} 58 | ? 59 |

{" "} 60 |
61 | 62 | 69 | 76 | 77 |
78 | 79 | ); 80 | }; 81 | export { UnBlockedTitleModal }; 82 | -------------------------------------------------------------------------------- /src/components/Admin/AdminMore/JobCategory/AllCategoryList/CategoryDeletingModal.jsx: -------------------------------------------------------------------------------- 1 | import React, { useState } from "react"; 2 | import { 3 | Button, 4 | Dialog, 5 | DialogHeader, 6 | DialogBody, 7 | DialogFooter, 8 | } from "@material-tailwind/react"; 9 | import { ToastContainer, toast } from "react-toastify"; 10 | import "react-toastify/dist/ReactToastify.css"; 11 | import { 12 | JobFieldListAndCreaterPagination, 13 | JobFieldDetails, 14 | } from "../../../../../services/adminApi"; 15 | import Loader from "../../../../Loading/Loading"; 16 | const CategoryDeletingModal = ({ 17 | isOpen, 18 | view, 19 | onClose, 20 | resetView, 21 | updateSearcheddata, 22 | Selectedpost 23 | }) => { 24 | // For loading 25 | const [loading, setLoading] = useState(false); 26 | const handleLoading = () => setLoading((cur) => !cur); 27 | const ConfirmButton = async () => { 28 | try { 29 | const data = { 30 | field_name : Selectedpost.field_name, 31 | is_deleted: true, 32 | }; 33 | handleLoading(); 34 | const res = await JobFieldDetails(data, Selectedpost.id); 35 | 36 | if (res.status === 200) { 37 | resetView(); 38 | const search = ""; 39 | const res2 = await JobFieldListAndCreaterPagination(search); 40 | updateSearcheddata(res2.data); 41 | toast.success("Jobtitle Deleted successfully"); 42 | } 43 | handleLoading() 44 | } catch (error) { 45 | handleLoading() 46 | console.log(error); 47 | } 48 | onClose(); 49 | }; 50 | return ( 51 | <> 52 | {loading && } 53 | 54 | 55 | Block Post 56 | 57 |

58 | Are you sure you want to block ' 59 | 60 | {Selectedpost?.field_name} 61 | {" "} 62 | ? 63 |

{" "} 64 |
65 | 66 | 73 | 80 | 81 |
82 | 83 | ); 84 | }; 85 | export { CategoryDeletingModal }; 86 | -------------------------------------------------------------------------------- /src/components/Admin/AdminMore/JobTitle/AllJobTitleList/BlockJobTitleModal.jsx: -------------------------------------------------------------------------------- 1 | import React, { useState } from "react"; 2 | import { 3 | Button, 4 | Dialog, 5 | DialogHeader, 6 | DialogBody, 7 | DialogFooter, 8 | } from "@material-tailwind/react"; 9 | import { ToastContainer, toast } from "react-toastify"; 10 | import "react-toastify/dist/ReactToastify.css"; 11 | import { JobTitledListAndpagiantions,JobTitledDetails } from "../../../../../services/adminApi"; 12 | import Loader from "../../../../Loading/Loading"; 13 | const BlockJobTitleModal = ({ 14 | isOpen, 15 | view, 16 | onClose, 17 | resetView, 18 | updateSearcheddata, 19 | Selectedpost 20 | }) => { 21 | // For loading 22 | const [loading, setLoading] = useState(false); 23 | const handleLoading = () => setLoading((cur) => !cur); 24 | const ConfirmButton = async () => { 25 | try { 26 | const data = { 27 | title_name : Selectedpost.title_name, 28 | field : Selectedpost.field, 29 | is_deleted: true, 30 | }; 31 | handleLoading(); 32 | const res = await JobTitledDetails(data, Selectedpost.id); 33 | 34 | if (res.status === 200) { 35 | resetView(); 36 | const search = ""; 37 | const res2 = await JobTitledListAndpagiantions(search); 38 | updateSearcheddata(res2.data); 39 | toast.success(`${res.data.title_name} Blocked successfully`); 40 | } 41 | handleLoading() 42 | } catch (error) { 43 | handleLoading() 44 | console.log(error); 45 | } 46 | onClose(); 47 | }; 48 | return ( 49 | <> 50 | {loading && } 51 | 52 | 53 | Block Post 54 | 55 |

56 | Are you sure you want to block ' 57 | 58 | {Selectedpost?.title_name} 59 | {" "} 60 | ? 61 |

{" "} 62 |
63 | 64 | 71 | 78 | 79 |
80 | 81 | ); 82 | }; 83 | export { BlockJobTitleModal }; 84 | -------------------------------------------------------------------------------- /src/components/Admin/Admin_UserManagement/Admin_UserManagement.jsx: -------------------------------------------------------------------------------- 1 | import React, { useState } from "react"; 2 | import Loader from "../../Loading/Loading"; 3 | import { Select, Option } from "@material-tailwind/react"; 4 | import AllUsersList from "./AllUsersList/AllUsersList"; 5 | import BlockedUsersList from "./BlockedUsersList/BlockedUsersList"; 6 | import AllCompanyUsersList from "./AllCompanyUsersList/AllCompanyUsersList"; 7 | import BlockCompanyUserList from "./BlockCompanyUserList/BlockCompanyUserList"; 8 | function Admin_UserManagement() { 9 | const [selected, setSelected] = useState("All List"); 10 | 11 | return ( 12 | <> 13 |
14 |
15 |
16 |

17 | {" "} 18 | {selected === "All List" ? ( 19 | <>All Users List 20 | ) : selected === "All Company List" ? ( 21 | <>All Company Users List 22 | ) : selected === "Block User List" ? ( 23 | <>Blocked Users List 24 | ) : ( 25 | <>Blocked Company Users List 26 | )} 27 |

28 |

See information about all posts

29 |
30 |
31 | {" "} 32 | 46 |
47 |
48 |
49 |
50 | {selected === "All List" ? ( 51 | 52 | ) : selected === "All Company List" ? ( 53 | 54 | ) : selected === "Block User List" ? ( 55 | 56 | ) : ( 57 | 58 | )} 59 |
60 |
61 |
62 | 63 | ); 64 | } 65 | 66 | export default Admin_UserManagement; 67 | -------------------------------------------------------------------------------- /src/components/Admin/AdminMore/Skills/AddSkillsModal/AddSkillsModal.jsx: -------------------------------------------------------------------------------- 1 | import React, { useState } from "react"; 2 | import { 3 | Dialog, 4 | DialogHeader, 5 | DialogBody, 6 | DialogFooter, 7 | } from "@material-tailwind/react"; 8 | import Loader from "../../../../Loading/Loading"; 9 | import { ToastContainer, toast } from "react-toastify"; 10 | import "react-toastify/dist/ReactToastify.css"; 11 | import { SkillsCreate } from "../../../../../services/adminApi"; 12 | 13 | export function AddSkillsModal({ open, handleOpen }) { 14 | const [Form, setForm] = useState({ skills: "" }); 15 | 16 | // For loading 17 | const [loading, setLoading] = useState(false); 18 | const handleLoading = () => setLoading((cur) => !cur); 19 | const SubmitButton = async () => { 20 | if (Form.skills.trim() === "") { 21 | toast.error("Skills filed connot be blank"); 22 | } else { 23 | try { 24 | handleLoading(); 25 | const res = await SkillsCreate(Form); 26 | if (res.status === 201) { 27 | toast.success(`${res.data.skills} added succesfully`); 28 | } 29 | handleOpen() 30 | handleLoading(); 31 | } catch (error) { 32 | handleOpen() 33 | console.log(error); 34 | handleLoading(); 35 | if (error && error.response.data) { 36 | toast.error(error.response.data[0]); 37 | } else { 38 | toast.error("Something wrong"); 39 | } 40 | } 41 | } 42 | }; 43 | return ( 44 | <> 45 | 46 | {loading && } 47 | 48 | Add Skills 49 | 50 |
51 |

Skills

52 | setForm({ ...Form, skills: e.target.value })} 56 | className="border w-full px-2 py-2 rounded-lg text-black placeholder-gray-700 text-sm focus:border-purple-500 focus:outline-none focus:ring focus:ring-purple-100 border-gray-400" 57 | /> 58 |
59 |
60 | 61 | 64 | 70 | 71 |
72 | 73 | ); 74 | } 75 | -------------------------------------------------------------------------------- /src/components/NavBarSearching/NavBarSearching.jsx: -------------------------------------------------------------------------------- 1 | import React, { useState } from "react"; 2 | import {ReactSearchAutocomplete} from "react-search-autocomplete"; 3 | import { Country, State } from 'country-state-city'; 4 | import { useQuery, useQueryClient } from "react-query"; 5 | import { AdminJobFieldList, AdminJobTitlelist, AdminSkillsList } from "../../services/adminApi"; 6 | import Loader from "../Loading/Loading"; 7 | import { useNavigate } from "react-router-dom"; 8 | 9 | function NavBarSearching() { 10 | const navigate = useNavigate() 11 | const [JobField,setJobfield] = useState([]) 12 | const [JobTitle,setJobTitle] = useState([]) 13 | const [Skills,setSkills] = useState([]) 14 | const countryOptions = Country.getAllCountries().map((country) => ({ 15 | name: country.name, 16 | })); 17 | 18 | const stateOptions = State.getAllStates().map((state) => ({ 19 | name: state.name, 20 | })); 21 | const jobFieldNames = JobField.map((job) => ({ 22 | type: 'Job Field', 23 | name: job.field_name, 24 | })); 25 | const JobTitleNames = JobTitle.map((job) => ({ 26 | type: 'Job Field', 27 | name: job.title_name, 28 | })); 29 | const SkillsNames = Skills.map((Skill) => ({ 30 | type: 'Skills', 31 | name: Skill.skills, 32 | })); 33 | const items = [ 34 | ...jobFieldNames, 35 | ...JobTitleNames, 36 | ...SkillsNames, 37 | ...countryOptions.map((country) => ({ type: 'Country', name: country.name })), 38 | ...stateOptions.map((state) => ({ type: 'State', name: state.name })), 39 | ]; 40 | 41 | const handleOnSelect = (item) => { 42 | navigate(`/user/jobs/${item.name}`) 43 | }; 44 | async function GetJobSkillList(){ 45 | const res = await AdminJobFieldList() 46 | setJobfield(res.data) 47 | const res2 = await AdminJobTitlelist() 48 | setJobTitle(res2.data) 49 | const res3 = await AdminSkillsList() 50 | setSkills(res3.data) 51 | } 52 | // ---------------------------------react quary-------------------------------------// 53 | const queryClient = useQueryClient(); 54 | const { isLoading, error, data } = useQuery({ 55 | queryKey: ["GetJobSkillList"], 56 | queryFn: () => GetJobSkillList(), 57 | }); 58 | 59 | if (isLoading) { 60 | return <>; 61 | } 62 | if (error) { 63 | return ( 64 | <> 65 | ); 66 | } 67 | // ---------------------------------react quary-------------------------------------// 68 | 69 | return ( 70 |
71 | 77 |
78 | ); 79 | } 80 | 81 | export default NavBarSearching; 82 | -------------------------------------------------------------------------------- /src/components/Admin/Admin_CompanyManagement/AdminPostManagement/AdminAllPostList/AdminBlockPost.jsx: -------------------------------------------------------------------------------- 1 | import React, { useState } from "react"; 2 | import { 3 | Button, 4 | Dialog, 5 | DialogHeader, 6 | DialogBody, 7 | DialogFooter, 8 | } from "@material-tailwind/react"; 9 | import { ToastContainer, toast } from "react-toastify"; 10 | import "react-toastify/dist/ReactToastify.css"; 11 | import { 12 | AllCompanyPostlist, 13 | PostBlockedUnblocked, 14 | } from "../../../../../services/adminApi"; 15 | import Loader from "../../../../Loading/Loading"; 16 | const AdminBlockPost = ({ 17 | isOpen, 18 | view, 19 | onClose, 20 | resetView, 21 | updateSearcheddata, 22 | Selectedpost, 23 | BlockUnblock, 24 | }) => { 25 | // For loading 26 | const [loading, setLoading] = useState(false); 27 | const handleLoading = () => setLoading((cur) => !cur); 28 | const ConfirmButton = async () => { 29 | try { 30 | const data = { 31 | is_blocked: BlockUnblock, 32 | }; 33 | handleLoading(); 34 | const res = await PostBlockedUnblocked(data, Selectedpost.id); 35 | 36 | if (res.status === 200) { 37 | resetView(); 38 | const search = ""; 39 | const res2 = await AllCompanyPostlist(search); 40 | updateSearcheddata(res2.data); 41 | toast.success("Post Deleted successfully"); 42 | } 43 | handleLoading() 44 | } catch (error) { 45 | handleLoading() 46 | console.log(error); 47 | } 48 | onClose(); 49 | }; 50 | return ( 51 | <> 52 | {loading && } 53 | 54 | 55 | Block Post 56 | 57 |

58 | Are you sure you want to block '{BlockUnblock} 59 | 60 | {Selectedpost?.Jobtitle.title_name} 61 | 62 | ' from{" "} 63 | 64 | {Selectedpost?.companyinfo.company_name} 65 | {" "} 66 | Post? 67 |

{" "} 68 |
69 | 70 | 77 | 84 | 85 |
86 | 87 | ); 88 | }; 89 | export { AdminBlockPost }; 90 | -------------------------------------------------------------------------------- /src/components/Admin/Admin_CompanyManagement/AdminPostManagement/AdminPostBlockedList/AdminUnblockModal.jsx: -------------------------------------------------------------------------------- 1 | import React, { useState } from "react"; 2 | import { 3 | Button, 4 | Dialog, 5 | DialogHeader, 6 | DialogBody, 7 | DialogFooter, 8 | } from "@material-tailwind/react"; 9 | import { ToastContainer, toast } from "react-toastify"; 10 | import "react-toastify/dist/ReactToastify.css"; 11 | import { 12 | ListBlockPost, 13 | PostBlockedUnblocked, 14 | } from "../../../../../services/adminApi"; 15 | import Loader from "../../../../Loading/Loading"; 16 | const AdminUnblockModal = ({ 17 | isOpen, 18 | view, 19 | onClose, 20 | resetView, 21 | updateSearcheddata, 22 | Selectedpost, 23 | BlockUnblock, 24 | }) => { 25 | // For loading 26 | const [loading, setLoading] = useState(false); 27 | const handleLoading = () => setLoading((cur) => !cur); 28 | const ConfirmButton = async () => { 29 | try { 30 | const data = { 31 | is_blocked: BlockUnblock, 32 | }; 33 | handleLoading(); 34 | const res = await PostBlockedUnblocked(data, Selectedpost.id); 35 | 36 | if (res.status === 200) { 37 | resetView(); 38 | const search = ""; 39 | const res2 = await ListBlockPost(search); 40 | updateSearcheddata(res2.data); 41 | toast.success("Post Deleted successfully"); 42 | } 43 | handleLoading() 44 | } catch (error) { 45 | handleLoading() 46 | console.log(error); 47 | } 48 | onClose(); 49 | }; 50 | return ( 51 | <> 52 | {loading && } 53 | 54 | 55 | Block Post 56 | 57 |

58 | Are you sure you want to block '{BlockUnblock} 59 | 60 | {Selectedpost?.Jobtitle.title_name} 61 | 62 | ' from{" "} 63 | 64 | {Selectedpost?.companyinfo.company_name} 65 | {" "} 66 | Post? 67 |

{" "} 68 |
69 | 70 | 77 | 84 | 85 |
86 | 87 | ); 88 | }; 89 | export { AdminUnblockModal }; 90 | -------------------------------------------------------------------------------- /src/components/Company/Dashboard/RequestsComponents/CompanyList/ScheduleModal/ScheduleModal.jsx: -------------------------------------------------------------------------------- 1 | import React, { useState } from "react"; 2 | import { 3 | Button, 4 | Dialog, 5 | DialogHeader, 6 | DialogBody, 7 | DialogFooter, 8 | } from "@material-tailwind/react"; 9 | import { ToastContainer, toast } from "react-toastify"; 10 | import "react-toastify/dist/ReactToastify.css"; 11 | import Loader from "../../../../../Loading/Loading"; 12 | import { ScheduleDate } from "../../../../../../services/companyApi"; 13 | 14 | function ScheduleModal({ open, handleOpen, user, refechData }) { 15 | const [date, setdate] = useState(""); 16 | // For loading 17 | const [loading, setLoading] = useState(false); 18 | const handleLoading = () => setLoading((cur) => !cur); 19 | const SubmitDate = async () => { 20 | if (date === "") { 21 | toast.error("Please select a date"); 22 | } else { 23 | const data = { 24 | schedule: date, 25 | }; 26 | try { 27 | handleLoading(); 28 | const res = await ScheduleDate(data, user.id); 29 | if (res.status === 200) { 30 | toast.success('date scheduled at '); 31 | setdate(""); 32 | refechData(); 33 | handleOpen(); 34 | } 35 | handleLoading(); 36 | } catch (error) { 37 | if (error && error.response.data) { 38 | toast.error(error.response.data.detail); 39 | } else { 40 | toast.error("Something wrong"); 41 | } 42 | setdate(""); 43 | handleLoading(); 44 | console.log(error); 45 | } 46 | } 47 | }; 48 | 49 | return ( 50 | <> 51 | 52 | {loading && } 53 | 54 | Schedule Time 55 | 56 | setdate(e.target.value)} 63 | /> 64 | 65 | 66 | 74 | 77 | 78 | 79 | 80 | ); 81 | } 82 | 83 | export default ScheduleModal; 84 | -------------------------------------------------------------------------------- /src/components/Admin/AdminMore/JobCategory/AddJobCategory/AddJobCategoryModal.jsx: -------------------------------------------------------------------------------- 1 | import React, { useState, useRef, useEffect } from "react"; 2 | import { 3 | Dialog, 4 | DialogHeader, 5 | DialogBody, 6 | DialogFooter, 7 | } from "@material-tailwind/react"; 8 | import Loader from "../../../../Loading/Loading"; 9 | import { JobFieldCreater } from "../../../../../services/adminApi"; 10 | import { ToastContainer, toast } from "react-toastify"; 11 | import "react-toastify/dist/ReactToastify.css"; 12 | export function AddJobCategoryModal({ open, handleOpen }) { 13 | const [Form, setForm] = useState({ field_name: "" }); 14 | const addinputfield = useRef(null); 15 | // For loading 16 | const [loading, setLoading] = useState(false); 17 | const handleLoading = () => setLoading((cur) => !cur); 18 | const ConformButton = async () => { 19 | if (Form.field_name.trim() === "") { 20 | toast.error("Field connt be blank"); 21 | } else { 22 | try { 23 | handleLoading() 24 | const res = await JobFieldCreater(Form); 25 | if (res.status === 201) { 26 | toast.success(`${res.data.field_name} created successfully`); 27 | handleOpen(); 28 | } 29 | handleLoading() 30 | } catch (error) { 31 | console.log(error); 32 | if (error && error.response) { 33 | toast.error(error.response.data[0]); 34 | } else { 35 | toast.error("Something wrong"); 36 | } 37 | handleOpen(); 38 | handleLoading() 39 | } 40 | } 41 | }; 42 | useEffect(() => { 43 | if (open) { 44 | addinputfield.current.focus(); 45 | } 46 | }, [open]); 47 | return ( 48 | <> 49 | {loading && } 50 | 51 | 52 | Add Job Category 53 | 54 |
55 |

Add Job Category

56 | setForm({ ...Form, field_name: e.target.value })} 60 | className="border py-2 px-3 mx-8 md:w-10/12 w-8/12 rounded-lg text-black placeholder-gray-700 text-sm focus:border-purple-500 focus:outline-none focus:ring focus:ring-purple-100 border-gray-400" 61 | /> 62 |
63 |
64 | 65 | 68 | 74 | 75 |
76 | 77 | ); 78 | } 79 | -------------------------------------------------------------------------------- /src/components/Getdata.jsx: -------------------------------------------------------------------------------- 1 | import { UserInfoDetails, UserDetail } from '../services/userApi'; 2 | import jwt_decode from 'jwt-decode'; 3 | import { useDispatch } from 'react-redux'; 4 | import { 5 | setUserDetails, 6 | setExperiences, 7 | setEducation, 8 | setLanguages, 9 | setSkills, 10 | } from '../Redux/UserSlice'; 11 | 12 | export const fetchUserInfo = async () => { 13 | try { 14 | const token = localStorage.getItem('token'); 15 | const decoded = jwt_decode(token); 16 | const dispatch = useDispatch(); 17 | 18 | if (!decoded.userInfoId) { 19 | const UserDetails = await UserDetail(decoded.user_id); 20 | const userInformation = { 21 | id: UserDetails.data.id, 22 | profile_image: UserDetails.data.profile_image, 23 | email: UserDetails.data.email, 24 | first_name: UserDetails.data.first_name, 25 | last_name: UserDetails.data.last_name, 26 | is_active: UserDetails.data.is_active, 27 | is_compleated: UserDetails.data.is_compleated, 28 | id_admin: UserDetails.data.is_admin, 29 | role: UserDetails.data.role, 30 | }; 31 | if (userInformation) { 32 | dispatch(setUserDetails({ UserInfo: userInformation })); 33 | } 34 | } else { 35 | const res = await UserInfoDetails(decoded.userInfoId); 36 | const UserDetails = await UserDetail(decoded.user_id); 37 | dispatch( 38 | setRole({ 39 | JobFiledRedex: res.data.jobField.field_name, 40 | JobTitleRedex: res.data.jobTitle.title_name, 41 | }) 42 | ); 43 | res.data.experience.map((values, index) => { 44 | dispatch(setExperiences(values)); 45 | }); 46 | res.data.education.map((values, index) => { 47 | dispatch(setEducation(values)); 48 | }); 49 | res.data.languages.map((values, index) => { 50 | dispatch(setLanguages(values)); 51 | }); 52 | res.data.skills.map((values, index) => { 53 | dispatch(setSkills(values)); 54 | }); 55 | const userInformation = { 56 | id: UserDetails.data.id, 57 | profile_image: UserDetails.data.profile_image, 58 | email: UserDetails.data.email, 59 | first_name: UserDetails.data.first_name, 60 | last_name: UserDetails.data.last_name, 61 | is_active: UserDetails.data.is_active, 62 | is_compleated: UserDetails.data.is_compleated, 63 | id_admin: UserDetails.data.is_admin, 64 | role: UserDetails.data.role, 65 | streetaddress: res.data.streetaddress, 66 | userinfoid: res.data.id, 67 | city: res.data.city, 68 | state: res.data.state, 69 | zipcode: res.data.zipcode, 70 | bio: res.data.bio, 71 | cv: res.data.cv, 72 | }; 73 | if (userInformation) { 74 | dispatch(setUserDetails({ UserInfo: userInformation })); 75 | } 76 | } 77 | } catch (error) { 78 | console.log(error); 79 | } 80 | }; 81 | -------------------------------------------------------------------------------- /src/pages/User/CompanyLIst/CompanyLIst.jsx: -------------------------------------------------------------------------------- 1 | import React, { useEffect, useState } from "react"; 2 | import { NavbarDefault } from "../../../components/Navbar/NavBar"; 3 | import { 4 | Card, 5 | CardHeader, 6 | CardBody, 7 | CardFooter, 8 | Typography, 9 | Button, 10 | } from "@material-tailwind/react"; 11 | import { useQuery } from "react-query"; 12 | import { AllCompanyList } from "../../../services/adminApi"; 13 | import Loader from "../../../components/Loading/Loading"; 14 | function CompanyLIst() { 15 | const [Search, setSearch] = useState(""); 16 | const [Searchlist, setSearchlist] = useState([]); 17 | const [alllist, setalllist] = useState([]); 18 | const GetCompanyList = async ()=>{ 19 | try { 20 | const res = await AllCompanyList(Search) 21 | if (res.status === 200){ 22 | setalllist(res.data) 23 | setSearchlist(res.data.results) 24 | } 25 | } catch (error) { 26 | 27 | } 28 | } 29 | //---------------------------- React quary---------------------------------------// 30 | const { data, isLoading, isError } = useQuery( 31 | "GetCompanyList", 32 | GetCompanyList 33 | ); 34 | if (isLoading) { 35 | return ; 36 | } 37 | 38 | if (isError) { 39 | return

There was an error fetching data

; 40 | } 41 | //---------------------------- React quary---------------------------------------// 42 | 43 | return ( 44 | <> 45 |
46 | 47 |
48 |
49 |

Company List

50 |
51 |
52 | {Searchlist?.map((serchlist,index)=>( 53 |
54 | 55 | 56 | card-image 60 | 61 | 62 | 63 | UI/UX Review Check 64 | 65 | 66 | The place is close to Barceloneta Beach and bus stop just 2 67 | min by walk and near to "Naviglio" where you can 68 | enjoy the main night life in Barcelona. 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 |
77 | )) } 78 | 79 |
80 |
81 |
82 | 83 | ); 84 | } 85 | 86 | export default CompanyLIst; 87 | -------------------------------------------------------------------------------- /src/components/Profile/MyinfoComponent/SkillComponents/SkillComponents.jsx: -------------------------------------------------------------------------------- 1 | import React, { useState, useEffect } from "react"; 2 | import { useSelector } from "react-redux/es/hooks/useSelector"; 3 | import Select from "react-select"; 4 | // Servies 5 | import { AdminSkillsList } from "../../../../services/adminApi"; 6 | import { 7 | UpdateUserInfoDetails, 8 | Remove_skill, 9 | } from "../../../../services/userApi"; 10 | 11 | // Redux 12 | import { SetSkills, DeleteSkills, ClearSkills } from "../../../../Redux/UserSlice"; 13 | import { useDispatch } from "react-redux"; 14 | 15 | function SkillComponents() { 16 | const dispatch = useDispatch(); 17 | const { UserInfo } = useSelector((state) => state.user); 18 | const { Skills } = useSelector((state) => state.user); 19 | const [skill, setSkill] = useState([]); 20 | 21 | // Feching data in backend and stored 22 | async function getSkillslist() { 23 | try { 24 | const response = await AdminSkillsList(); 25 | setSkill(response.data); 26 | } catch (error) { 27 | toast.error("Error fetching Skills fields:", error); 28 | } 29 | } 30 | 31 | const options = skill.map((s) => ({ 32 | value: s.skills, 33 | id: s.id, 34 | label: s.skills, 35 | })); 36 | // Add skills 37 | const handleSelectChange = async (selectedOption) => { 38 | const array = []; 39 | array.push({ skills: selectedOption.value }); 40 | const res = await UpdateUserInfoDetails( 41 | { skills: array }, 42 | UserInfo.userinfoid 43 | ); 44 | dispatch(ClearSkills()); 45 | res.data.skills.map((values, index) => { 46 | dispatch(SetSkills(values)); 47 | }); 48 | }; 49 | 50 | // Delete skills 51 | const DltSkills = async (skills, index) => { 52 | const data = {UserInfoId: UserInfo.userinfoid, SkillsId: skills} 53 | const res = await Remove_skill(data) 54 | dispatch(DeleteSkills(index)) 55 | 56 | }; 57 | useEffect(() => { 58 | document.title = "Add your Skills | Career Bridge"; 59 | getSkillslist(); 60 | }, []); 61 | 62 | return ( 63 |
64 |
Add Skills
65 | {!UserInfo.bio === "Add bio" ? ( 66 |
67 |
68 |

+

69 |
70 |
71 | ) : ( 72 |
73 |
74 | {Skills.map((skills, index) => ( 75 |

76 | {skills.skills} 77 | DltSkills(skills.id, index)} 80 | > 81 | X 82 | 83 |

84 | ))} 85 | 41 |
42 |
43 |
44 |

I’m a client, hiring for a project

45 |
46 |
47 |
handleOptionChange('freelancer')} 52 | > 53 |
54 |
55 | 56 |
57 |
58 | 59 |
60 |
61 |
62 |

I’m a freelancer, looking for work

63 |
64 |
65 | 66 |
67 | 70 |
71 |
72 |

Already have an account? Log In

73 |
74 | 75 | 76 | ); 77 | } 78 | 79 | export default Choos; 80 | -------------------------------------------------------------------------------- /src/pages/User/SignUpPage/RegisterResendmail.jsx: -------------------------------------------------------------------------------- 1 | import React, { useState, useEffect } from "react"; 2 | import Loader from "../../../components/Loading/Loading"; 3 | import { ToastContainer, toast } from "react-toastify"; 4 | import MailOpen from "../../../assets/EmailImg/EmailOpen.png"; 5 | import { Link, useNavigate } from "react-router-dom"; 6 | import { UserUrl } from "../../../constants/constants"; 7 | import axios from "axios"; 8 | 9 | function RegisterResendmail() { 10 | const navigate = useNavigate(); 11 | const [Email,setEmail] = useState({email:''}) 12 | // Loading 13 | const [loading, setLoading] = useState(false); 14 | const handleLoading = () => setLoading((cur) => !cur); 15 | 16 | useEffect(() => { 17 | document.title = "Mail | Career Bridge"; 18 | setEmail({...Email,email:localStorage.getItem('email')}) 19 | }, []); 20 | 21 | const Gmail = () => { 22 | window.open("https://mail.google.com/mail/u/0/#inbox", "_blank"); 23 | }; 24 | const ReSend = async () => { 25 | handleLoading(); 26 | try { 27 | const response = await axios.post( 28 | UserUrl + "/api/Resend_registration_link/", 29 | Email 30 | ); 31 | if (response.data.status === "success") { 32 | console.log(response); 33 | handleLoading(); 34 | toast.success(response.data.msg); 35 | } else { 36 | handleLoading(); 37 | toast.error(response.data.msg); 38 | } 39 | } catch (error) { 40 | handleLoading(); 41 | toast.error("Some think wrong"); 42 | } 43 | }; 44 | return ( 45 | <> 46 | {loading && } 47 | 48 |
49 |
50 |

51 | Career Bridge 52 |

53 | 54 | Login 55 | 56 |
57 |
58 |
59 | 60 |
61 |
62 |

63 | Verify your email to continue 64 |

65 |
66 |
67 |

68 | Please check your email and select the link provided to verify 69 | your
address. 70 |

71 |
72 |
75 | localStorage.removeItem('email')}> Change email 76 |
77 |
78 |
79 | 85 | 91 |
92 |
93 |
94 |
95 | 96 | ); 97 | } 98 | 99 | export default RegisterResendmail; 100 | -------------------------------------------------------------------------------- /src/Redux/UserSlice.js: -------------------------------------------------------------------------------- 1 | import { createSlice } from "@reduxjs/toolkit"; 2 | 3 | const initialState = { 4 | UserInfo: {}, 5 | JobFiledRedex: "", 6 | JobTitleRedex: "", 7 | positions : "", 8 | experiences: [], 9 | Education: [], 10 | Language: [], 11 | Skills: [], 12 | }; 13 | 14 | const userSlice = createSlice({ 15 | name: "user", 16 | initialState, 17 | reducers: { 18 | setUserDetails: (state, action) => { 19 | state.UserInfo= action.payload.UserInfo; 20 | }, 21 | UpdateUserDetails: (state, action) =>{ 22 | state.UserInfo = { 23 | ...state.UserInfo, 24 | first_name: action.payload.first_name, 25 | last_name: action.payload.last_name, 26 | bio: action.payload.bio, 27 | streetaddress: action.payload.streetaddress, 28 | city: action.payload.city, 29 | state: action.payload.state, 30 | zipcode: action.payload.zipcode, 31 | cv: action.payload.cv, 32 | }; 33 | }, 34 | LogoutDetails: (state, action) => { 35 | state.UserInfo = {}; 36 | }, 37 | // Role 38 | setRole: (state, action) => { 39 | state.JobFiledRedex = action.payload.JobFiledRedex; 40 | state.JobTitleRedex = action.payload.JobTitleRedex; 41 | }, 42 | ClearRole: (state, action) => { 43 | state.JobFiledRedex = ""; 44 | state.JobTitleRedex = ""; 45 | }, 46 | // Position 47 | setPosition: (state, action)=>{ 48 | state.positions = action.payload.position; 49 | }, 50 | ClearPosition: (state)=>{ 51 | state.positions = '' 52 | }, 53 | // Experience 54 | setExperiences: (state, action) => { 55 | state.experiences.push(action.payload); 56 | }, 57 | EditExpeience: (state, action) => { 58 | const { index, updatedExperience } = action.payload; 59 | state.experiences[index] = updatedExperience; 60 | }, 61 | DeteteExperience: (state, action) => { 62 | const index = action.payload; 63 | state.experiences.splice(index, 1); 64 | }, 65 | CleatExperiences : (state)=>{ 66 | state.experiences = []; 67 | }, 68 | // Education 69 | SetEducation: (state, action) => { 70 | state.Education.push(action.payload); 71 | }, 72 | EditEducation: (state, action) => { 73 | const { index, updatedEducation } = action.payload; 74 | state.Education[index] = updatedEducation; 75 | }, 76 | DeleteEducation: (state, action) => { 77 | const index = action.payload; 78 | state.Education.splice(index, 1); 79 | }, 80 | ClearEducation: (state)=>{ 81 | state.Education = []; 82 | }, 83 | // Language 84 | SetLanguage: (state, action) => { 85 | state.Language.push(action.payload); 86 | }, 87 | DeleteLanguage: (state, action) => { 88 | const index = action.payload; 89 | state.Language.splice(index, 1); 90 | }, 91 | ClearLanguage: (state)=>{ 92 | state.Language = [] 93 | }, 94 | // Skills 95 | SetSkills: (state, action) => { 96 | state.Skills.push(action.payload); 97 | }, 98 | DeleteSkills: (state, action) => { 99 | const index = action.payload; 100 | state.Skills.splice(index, 1); 101 | }, 102 | ClearSkills: (state)=>{ 103 | state.Skills = [] 104 | }, 105 | }, 106 | }); 107 | 108 | export const { 109 | setUserDetails, 110 | setRole, 111 | setPosition, 112 | setExperiences, 113 | EditExpeience, 114 | DeteteExperience, 115 | SetEducation, 116 | EditEducation, 117 | DeleteEducation, 118 | SetLanguage, 119 | DeleteLanguage, 120 | SetSkills, 121 | DeleteSkills, 122 | AfterConfirm, 123 | LogoutDetails, 124 | ClearRole, 125 | ClearPosition, 126 | CleatExperiences, 127 | ClearEducation, 128 | ClearLanguage, 129 | ClearSkills, 130 | UpdateUserDetails, 131 | } = userSlice.actions; 132 | export default userSlice.reducer; 133 | -------------------------------------------------------------------------------- /src/assets/react.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/components/Company/Dashboard/PostsComponents/PostList.jsx: -------------------------------------------------------------------------------- 1 | import React, { useEffect, useState } from "react"; 2 | import { AddPost } from "./AddPost/AddPost"; 3 | import { Select, Option } from "@material-tailwind/react"; 4 | import { Link } from "react-router-dom"; 5 | import PostListingComponents from "./PostListingComponents/PostListingComponents"; 6 | import { useSelector } from "react-redux"; 7 | import ArchivePosts from "./PostListingComponents/ArchivePosts"; 8 | import BlockedPosts from "./PostListingComponents/BlockedPosts"; 9 | function PostList() { 10 | const { CompanyInfo } = useSelector((state) => state.company); 11 | const [TypesofPost, setTypesofPost] = useState("Posts"); 12 | const [open, setOpen] = useState(false); 13 | useEffect(() => { 14 | document.title = "Your Post | Career Bridge"; 15 | }, []); 16 | const handleOpen = () => setOpen(!open); 17 | console.log("sifan daxo"); 18 | return ( 19 | <> 20 |
21 |
22 |
23 |
24 |

25 | {TypesofPost === "Posts" ? ( 26 | <>Post list 27 | ) : TypesofPost === "Archive Posts" ? ( 28 | <>Archive Posts 29 | ) : ( 30 | <>Blocked Posts 31 | )} 32 |

33 |

See information about all posts

34 | {CompanyInfo.is_verify ? ( 35 | 45 | ) : ( 46 | "" 47 | )} 48 |
49 |
50 |
51 | 60 |
61 |
62 |
63 |
64 | {CompanyInfo.is_verify ? ( 65 | <> 66 | {TypesofPost === "Posts" ? ( 67 | 68 | ) : TypesofPost === "Archive Posts" ? ( 69 | 70 | ) : ( 71 | 72 | )} 73 | 74 | ) : ( 75 |
76 |
77 |

78 | Company not verified 79 |

80 |
81 | 82 | Goto Profile 83 | 84 |
85 |
86 |
87 | )} 88 |
89 |
90 |
91 | 92 | 93 | ); 94 | } 95 | 96 | export default PostList; 97 | -------------------------------------------------------------------------------- /src/components/Profile/MyinfoComponent/MyinfoComponent.jsx: -------------------------------------------------------------------------------- 1 | import { useState, useEffect } from "react"; 2 | 3 | // Modal 4 | import { AccountEdit } from "./Modal/AccountEdit"; 5 | 6 | // Images 7 | import EditIcon from "../../../assets/Edit.png"; 8 | import Defaultprofile from "../../../assets/ProfileImg.jpeg"; 9 | 10 | // Redex 11 | import { useDispatch } from "react-redux"; 12 | import { UpdateUserDetails } from "../../../Redux/UserSlice"; 13 | import { useSelector } from "react-redux/es/hooks/useSelector"; 14 | 15 | // Serviece 16 | import { UpdateUserInfoDetails } from "../../../services/userApi"; 17 | import { ToastContainer, toast } from "react-toastify"; 18 | import "react-toastify/dist/ReactToastify.css"; 19 | 20 | // Components 21 | import SkillComponents from "./SkillComponents/SkillComponents"; 22 | import BioComponents from "./BioComponents/BioComponents"; 23 | import CvComponents from "./CvComponents/CvComponents"; 24 | import ExperienceComponents from "./ExperienceComponents/ExperienceComponents"; 25 | import EducationsComponents from "./EducationsComponents/EducationsComponents"; 26 | import AddressComponents from "./AddressComponents"; 27 | 28 | function MyinfoComponent() { 29 | // Redux destructure 30 | 31 | const { UserInfo } = useSelector((state) => state.user); 32 | const { JobTitleRedex } = useSelector((state) => state.user); 33 | 34 | // Modal user info edit 35 | const [open, setOpen] = useState(false); 36 | const handleOpen = () => setOpen(!open); 37 | 38 | useEffect(() => { 39 | document.title = "Profile | Career Bridge"; 40 | }, [UserInfo]); 41 | return ( 42 | <> 43 | 44 |
45 |
46 |

My info

47 |

This is a client account

48 |
49 |
50 |
51 |
52 |
53 |

Account

54 |
55 |
56 |
60 | 61 |
62 | 63 |
64 |
65 |
66 |
67 |
68 |
69 | Profile image 76 |
77 |
78 |
79 |
80 |

Client

81 |

82 | {UserInfo.first_name} {UserInfo.last_name} 83 |

84 |

Email

85 |

{UserInfo.email}

86 |

Position

87 |

{JobTitleRedex}

88 |
89 |
90 |
91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | ); 105 | } 106 | 107 | export default MyinfoComponent; 108 | -------------------------------------------------------------------------------- /src/pages/ForgotPassword/Mailshowpage.jsx: -------------------------------------------------------------------------------- 1 | import React, { useState, useEffect } from "react"; 2 | import Loader from "../../components/Loading/Loading"; 3 | import { ToastContainer, toast } from "react-toastify"; 4 | import MailOpen from "../../assets/EmailImg/EmailOpen.png"; 5 | import { Link, useLocation, useNavigate } from "react-router-dom"; 6 | import { UserUrl } from "../../constants/constants"; 7 | import axios from "axios"; 8 | 9 | function MailShowpage() { 10 | const navigate = useNavigate(); 11 | const location = useLocation(); 12 | const email = location.state && location.state.Email; 13 | const [Email,setEmail] = useState({email:''}) 14 | // Loading 15 | const [loading, setLoading] = useState(false); 16 | const handleLoading = () => setLoading((cur) => !cur); 17 | 18 | useEffect(() => { 19 | document.title = "Mail | Career Bridge"; 20 | setEmail({...Email,email:email}) 21 | }, []); 22 | 23 | const Gmail = () => { 24 | window.open("https://mail.google.com/mail/u/0/#inbox", "_blank"); 25 | }; 26 | const ReSend = async () => { 27 | handleLoading(); 28 | try { 29 | const response = await axios.post( 30 | UserUrl + "/api/forgotpassword/", 31 | Email 32 | ); 33 | if (response.data.status === "success") { 34 | console.log(response); 35 | handleLoading(); 36 | toast.success(response.data.msg); 37 | // setemail({ email: "" }); 38 | localStorage.setItem("UserId", response.data.user); 39 | localStorage.removeItem("email"); 40 | } else { 41 | handleLoading(); 42 | toast.error(response.data.msg); 43 | // setemail({ email: "" }); 44 | } 45 | } catch (error) { 46 | handleLoading(); 47 | toast.error("Some think wrong"); 48 | } 49 | }; 50 | return ( 51 | <> 52 | {loading && } 53 | 54 |
55 |
56 |

57 | Career Bridge 58 |

59 | 60 | Login 61 | 62 |
63 |
64 |
65 | 66 |
67 |
68 |

69 | Verify your email to continue 70 |

71 |
72 |
73 |

74 | Please check your email and select the link provided to verify 75 | your
address. 76 |

77 |
78 |
81 | localStorage.removeItem('email')}> Change email 82 |
83 |
84 |
85 | 91 | 97 |
98 |
99 |
100 |
101 | 102 | ); 103 | } 104 | 105 | export default MailShowpage; 106 | -------------------------------------------------------------------------------- /src/components/user/LanguageModal/AddLanguageModal.jsx: -------------------------------------------------------------------------------- 1 | import { 2 | Dialog, 3 | DialogHeader, 4 | DialogBody, 5 | DialogFooter, 6 | Button, 7 | } from "@material-tailwind/react"; 8 | import LanguageList from "countries-list"; 9 | import { useState } from "react"; 10 | import Select from "react-select"; 11 | 12 | // Redux 13 | import { useDispatch } from "react-redux"; 14 | import { SetLanguage } from "../../../Redux/UserSlice"; 15 | 16 | const AddLanguageModal = ({ isOpen, onClose }) => { 17 | const dispatch = useDispatch(); 18 | 19 | const [Form, setForm] = useState({ language: "", proficiency: "" }); 20 | const [error, seterror] = useState({ language: false, proficiency: false }); 21 | 22 | const languages = Object.keys(LanguageList.languagesAll).map((LangCode) => ({ 23 | name: LanguageList.languagesAll[LangCode].name, 24 | value: LangCode, 25 | })); 26 | 27 | const options = languages.map((lang, index) => ({ 28 | value: lang.name, 29 | label: lang.name, 30 | })); 31 | const options2 = [ 32 | { value: "Basic", label: "Basic" }, 33 | { value: "Conversational", label: "Conversational" }, 34 | { value: "Fluent", label: "Fluent" }, 35 | { value: "Native or Bilingual", label: "Native or Bilingual" }, 36 | ]; 37 | 38 | const Validation = () => { 39 | if (Form.language.trim() === "") { 40 | seterror({ ...error, language: true }); 41 | return false; 42 | } else if (Form.proficiency.trim() === "") { 43 | seterror({ ...error, proficiency: true }); 44 | return false; 45 | } 46 | return true; 47 | }; 48 | 49 | const ConfirmButton = () => { 50 | if (Validation()) { 51 | dispatch(SetLanguage(Form)); 52 | setForm({ language: "", proficiency: "" }) 53 | onClose(); 54 | } 55 | }; 56 | 57 | return ( 58 | 59 | Add languages 60 | 61 |
62 |
63 | 66 | 67 | 79 |
80 |
81 |

Proficiency *

82 | 94 |
95 |
96 |
97 | 98 | 101 | 107 | 108 |
109 | ); 110 | }; 111 | export { AddLanguageModal }; 112 | -------------------------------------------------------------------------------- /src/components/Admin/AdminNotifications/AdminNotifications.jsx: -------------------------------------------------------------------------------- 1 | import React, { useState } from "react"; 2 | import { useQuery, useQueryClient } from "react-query"; 3 | import Loader from "../../Loading/Loading"; 4 | import { 5 | AdminNotification, 6 | AdminNotificationRead, 7 | } from "../../../services/adminApi"; 8 | function AdminNotifications({ Selections }) { 9 | const [NotificationList, setNotificaton] = useState([]); 10 | async function GetNotification() { 11 | const res = await AdminNotification(); 12 | setNotificaton(res.data); 13 | } 14 | const Isread = async (id, path) => { 15 | try { 16 | const data = { 17 | is_read: true, 18 | }; 19 | const res = await AdminNotificationRead(data, id); 20 | if (res.status === 200) { 21 | const res2 = await AdminNotification(); 22 | setNotificaton(res2.data); 23 | Selections(path); 24 | } 25 | } catch (error) { 26 | console.log(error); 27 | } 28 | }; 29 | // ---------------------------------react quary-------------------------------------// 30 | const queryClient = useQueryClient(); 31 | const { isLoading, error, data } = useQuery({ 32 | queryKey: ["usersjoblist"], 33 | queryFn: () => GetNotification(), 34 | }); 35 | 36 | if (isLoading) { 37 | return ; 38 | } 39 | if (error) { 40 | return ( 41 |

42 | Something went Wrong 43 |

44 | ); 45 | } 46 | // ---------------------------------react quary-------------------------------------// 47 | 48 | return ( 49 | <> 50 |
51 | 59 | 64 | 65 |

Notification

66 |
67 |
68 | {NotificationList.length > 0 ? ( 69 | NotificationList.map((notify, index) => ( 70 |
76 |
77 | 85 | 90 | 91 |

{notify.message}

92 |
93 |
94 | 100 |
101 |
102 | )) 103 | ) : ( 104 |
105 |

Notification is empty

106 |
107 | )} 108 |
109 | 110 | ); 111 | } 112 | 113 | export default AdminNotifications; 114 | -------------------------------------------------------------------------------- /src/components/Admin/AdminMore/JobTitle/AddJotTitleModal/AddJotTitleModal.jsx: -------------------------------------------------------------------------------- 1 | import React, { useState } from "react"; 2 | import { 3 | Button, 4 | Dialog, 5 | DialogHeader, 6 | DialogBody, 7 | DialogFooter, 8 | } from "@material-tailwind/react"; 9 | import Select from "react-select"; 10 | import Loader from "../../../../Loading/Loading"; 11 | import { useQuery } from "react-query"; 12 | import { 13 | JobFieldListAndCreaterPagination, 14 | JobTitleCreate, 15 | } from "../../../../../services/adminApi"; 16 | import { ToastContainer, toast } from "react-toastify"; 17 | import "react-toastify/dist/ReactToastify.css"; 18 | export function AddJotTitleModal({ open, handleOpen }) { 19 | const [Form, setForm] = useState({ title_name: "", field: null }); 20 | const [JobCategory, setJobCategory] = useState([]); 21 | 22 | // For loading 23 | const [loading, setLoading] = useState(false); 24 | const handleLoading = () => setLoading((cur) => !cur); 25 | // Options 26 | const options = JobCategory.map((job) => { 27 | const value = job.field_name; 28 | const id = job.id; 29 | const label = job.field_name; 30 | return { value, id, label }; 31 | }); 32 | 33 | const getJobList = async () => { 34 | try { 35 | const Search = ""; 36 | const res = await JobFieldListAndCreaterPagination(Search); 37 | setJobCategory(res.data.results); 38 | } catch (error) { 39 | console.log(error); 40 | } 41 | }; 42 | const SubmitButton = async () => { 43 | if (Form.field === null) { 44 | toast.error("Job Title field connot be empty"); 45 | } else if (Form.title_name.trim() === "") { 46 | toast.error("Job Title field connot be empty"); 47 | } else { 48 | try { 49 | handleLoading(); 50 | const res = await JobTitleCreate(Form); 51 | if (res.status === 201) { 52 | toast.success(`${title_name} created successfully`); 53 | handleOpen(); 54 | } 55 | setForm({ title_name: "", field: null }); 56 | handleLoading(); 57 | } catch (error) { 58 | handleLoading(); 59 | console.log(error); 60 | if (error && error.response.data) { 61 | toast.error(`${error.response.data[0]}`); 62 | } else { 63 | toast.error("something wrong"); 64 | } 65 | handleOpen(); 66 | setForm({ title_name: "", field: null }); 67 | } 68 | } 69 | }; 70 | //---------------------------- React quary---------------------------------------// 71 | 72 | const { data, isLoading, isError } = useQuery("getJobList", getJobList); 73 | if (isLoading) { 74 | return ; 75 | } 76 | 77 | if (isError) { 78 | return ( 79 |

80 | There was an error fetching data 81 |

82 | ); 83 | } 84 | // 85 | return ( 86 | <> 87 | 88 | {loading && } 89 | 90 | Add Job Title 91 | 92 |
93 |

Job Category

94 | setForm({ ...Form, title_name: e.target.value })} 106 | className="border w-full px-2 py-2 rounded-lg text-black placeholder-gray-700 text-sm focus:border-purple-500 focus:outline-none focus:ring focus:ring-purple-100 border-gray-400" 107 | /> 108 |
109 |
110 | 111 | 114 | 120 | 121 |
122 | 123 | ); 124 | } 125 | -------------------------------------------------------------------------------- /src/pages/User/RegisterSteps/Languages.jsx: -------------------------------------------------------------------------------- 1 | import React, { useState, useEffect } from "react"; 2 | import { NavbarDefault } from "../../../components/Navbar/NavBar"; 3 | import { AddLanguageModal } from "../../../components/user/LanguageModal/AddLanguageModal"; 4 | import DeleteImg from "../../../assets/DeleteImg.png"; 5 | import { useNavigate } from "react-router-dom"; 6 | import { ToastContainer, toast } from "react-toastify"; 7 | 8 | // Redux 9 | import { useDispatch } from "react-redux"; 10 | import { DeleteLanguage } from "../../../Redux/UserSlice"; 11 | import { useSelector } from "react-redux/es/hooks/useSelector"; 12 | 13 | function Languages() { 14 | useEffect(() => { 15 | document.title = "Add your Languages | Career Bridge"; 16 | }, []); 17 | 18 | const dispatch = useDispatch(); 19 | const navigate = useNavigate(); 20 | 21 | // Redux Destructure 22 | const { Language } = useSelector((state) => state.user); 23 | 24 | // Modal 25 | const [open, setOpen] = useState(false); 26 | const handleOpen = () => setOpen(!open); 27 | 28 | const DltLanguage = (index) => { 29 | dispatch(DeleteLanguage(index)) 30 | }; 31 | 32 | const NextButton = () =>{ 33 | if(!Language[0]==''){ 34 | navigate('/user/skills') 35 | }else{ 36 | toast.warn('Add Your languages') 37 | } 38 | } 39 | return ( 40 | <> 41 | 42 | 43 |
44 |

5/7

45 |
46 |

47 | Looking good. Next, tell us which languages 48 |
49 | you speak. 50 |

51 |

52 | Upwork is global, so clients are often interested to know what 53 | languages you speak. English is a
54 | must, but do you speak any other languages? 55 |

56 |
57 |
58 |
59 |
60 |

Language

61 |
62 |
63 |

Proficiency

64 |
65 |
66 |
67 | {Language.map((lang, index) => ( 68 |
69 |
{lang.language}
70 |
{lang.proficiency}
71 |
DltLanguage(index)} 73 | className="rounded-full border w-8 h-8 flex justify-center items-center border-purple-400" 74 | > 75 | 76 |
77 |
78 | ))} 79 |
80 |
81 |
+
82 |
Add languages
83 |
84 |
85 |
86 |
87 | 88 |
89 |
90 |
91 |
92 | 98 |
99 |
100 | 106 |
107 |
108 |
109 |
110 | 111 | ); 112 | } 113 | 114 | export default Languages; 115 | -------------------------------------------------------------------------------- /src/components/Profile/MyinfoComponent/EducationsComponents/EducationsComponents.jsx: -------------------------------------------------------------------------------- 1 | import React, { useState } from "react"; 2 | // Redex 3 | import { useDispatch } from "react-redux"; 4 | import { useSelector } from "react-redux/es/hooks/useSelector"; 5 | // Images 6 | import EditIcon from "../../../../assets/Edit.png"; 7 | import DeleteImg from "../../../../assets/DeleteImg.png"; 8 | 9 | // Modal 10 | import { AddEducationsModal } from "./AddEducationsModal"; 11 | import { EditEducationsModal } from "./EditEducationsModal"; 12 | 13 | import { ToastContainer, toast } from "react-toastify"; 14 | import "react-toastify/dist/ReactToastify.css"; 15 | import { DeleteEducationModal } from "./DeleteEducationModal"; 16 | 17 | function EducationsComponents() { 18 | const [id, setId] = useState({id:'',index:''}) 19 | // Add modal 20 | const [open, setOpen] = useState(false); 21 | const handleOpen = () => setOpen(!open); 22 | 23 | // Edit modal 24 | const [EditModal, setEditModal] = useState(false); 25 | const handleEditModal = () => { 26 | if (EditModal) { 27 | setId({ id: '', index: '' }); 28 | } 29 | setEditModal(!EditModal); 30 | }; 31 | 32 | // Delete Modal 33 | const [DltModal, setDltModal] = useState(false); 34 | const handleDltModal = () => { 35 | if (DltModal) { 36 | setId({ id: '', index: '' }); 37 | } 38 | setDltModal(!DltModal); 39 | }; 40 | const { Education } = useSelector((state) => state.user); 41 | 42 | return ( 43 | <> 44 | 45 |
46 |
47 |

Education

48 |
49 |
50 |
51 |
55 |
56 |

60 | + 61 |

62 |

63 | Add Education 64 |

65 |
66 |
67 |
68 | {Education.map((educations, index) => ( 69 |
73 |
74 |
{handleEditModal(),setId({id:educations.id,index:index})}}> 76 | 77 |
78 |
{handleDltModal(),setId({id:educations.id,index:index})}}> 80 | 81 |
82 |
83 |
84 |

{educations.School}

85 |

{educations.Degree}

86 |

87 | {educations.DatesAttended} - {educations.Datesended} 88 |

89 |
90 |
91 | ))} 92 |
93 |
94 | 95 | 96 | 97 | 98 | ); 99 | } 100 | 101 | export default EducationsComponents; 102 | -------------------------------------------------------------------------------- /src/pages/Company/CompanyHomePage.jsx: -------------------------------------------------------------------------------- 1 | import React, { useState } from "react"; 2 | import { NavbarDefault } from "../../components/Navbar/NavBar"; 3 | import HomeJoblist from "../../components/user/Home/HomeJoblist"; 4 | import { useSelector } from "react-redux"; 5 | import { useNavigate } from "react-router-dom"; 6 | import CompanyHome from "../../components/Company/CompanyHome/CompanyHome"; 7 | 8 | function CompanyHomePage() { 9 | const navigate = useNavigate(); 10 | 11 | const [selected, setSelect] = useState("home"); 12 | return ( 13 | <> 14 |
15 |
16 | 17 |
18 |
19 |
20 |
setSelect("home")} 25 | > 26 | 34 | 39 | 40 |

Home

41 |
42 |
navigate("/company/dashboard/")} 49 | > 50 | 58 | 63 | 64 | 65 |

Dashboard

66 |
67 |
navigate('/company/allusers')} 74 | > 75 | 83 | 88 | 89 | 90 |

All Users

91 |
92 |
93 |
94 | 95 | 96 |
97 |
98 |
99 | 100 | ); 101 | } 102 | 103 | export default CompanyHomePage; 104 | -------------------------------------------------------------------------------- /src/components/Profile/MyinfoComponent/ExperienceComponents/ExperienceComponents.jsx: -------------------------------------------------------------------------------- 1 | import React, { useState } from "react"; 2 | 3 | // Redex 4 | import { useSelector } from "react-redux/es/hooks/useSelector"; 5 | // Images 6 | import EditIcon from "../../../../assets/Edit.png"; 7 | import DeleteImg from "../../../../assets/DeleteImg.png"; 8 | // Modal 9 | import { EditExperienceModal } from "./EditExperienceModal"; 10 | import { DeleteExperienceModal } from "./DeleteExperienceModal"; 11 | import AddExperienceModal from "./AddExperienceModal"; 12 | function ExperienceComponents() { 13 | const [EditId, setEditId] = useState({ id: "", index: "" }); 14 | 15 | // Add Modal 16 | const [Addopen, setAddOpen] = useState(false); 17 | const AddhandleOpen = () => setAddOpen(!Addopen); 18 | // Modal Edit 19 | const [Editopen, setEditOpen] = useState(false); 20 | const EdithandleOpen = () => { 21 | if (Editopen) { 22 | setEditId({ id: '', index: '' }); 23 | } 24 | setEditOpen(!Editopen); 25 | }; 26 | // Modal Delete 27 | const [Deleteopen, setDeleteOpen] = useState(false); 28 | const DeleterhandleOpen = () => setDeleteOpen(!Deleteopen); 29 | 30 | const { experiences } = useSelector((state) => state.user); 31 | return ( 32 | <> 33 |
34 |
35 |

Experience

36 |
37 |
38 |
39 |
40 |
44 |

48 | + 49 |

50 |

51 | Add Experience 52 |

53 |
54 |
55 |
56 | {experiences.map((experience, index) => ( 57 |
61 |
62 |
{ 65 | EdithandleOpen(); 66 | setEditId({ ...EditId, id: experience.id, index: index }); 67 | }} 68 | > 69 | 70 |
71 |
{ 74 | DeleterhandleOpen(); 75 | setEditId({ ...EditId, id: experience.id, index: index }); 76 | }} 77 | > 78 | 79 |
80 |
81 |
82 |

83 | {experience.subtitle} 84 |

85 |

{experience.company}

86 |

87 | {experience.startdate} - {experience.enddate} 88 |

89 |

90 | {experience.state} , {experience.country} 91 |

92 |
93 |
94 | ))} 95 |
96 |
97 | 98 | 103 | 108 | 109 | ); 110 | } 111 | 112 | export default ExperienceComponents; 113 | -------------------------------------------------------------------------------- /src/pages/User/Notifications/Notifications.jsx: -------------------------------------------------------------------------------- 1 | import React, { useState } from "react"; 2 | import { useQuery, useQueryClient } from "react-query"; 3 | import Loader from "../../../components/Loading/Loading"; 4 | import { NavbarDefault } from "../../../components/Navbar/NavBar"; 5 | import { NotificationRead, usernotification } from "../../../services/userApi"; 6 | import { useSelector } from "react-redux"; 7 | import { useNavigate } from "react-router-dom"; 8 | function Notifications() { 9 | const navigate = useNavigate() 10 | const {UserInfo} = useSelector((state) => state.user); 11 | const [NotificationList, setNotificaton] = useState([]); 12 | async function GetNotification() { 13 | const res = await usernotification(UserInfo.id); 14 | setNotificaton(res.data); 15 | } 16 | const Isread = async (id, path,read) => { 17 | if (read){ 18 | return navigate(path) 19 | } 20 | try { 21 | const data = { 22 | is_read: true, 23 | }; 24 | const res = await NotificationRead(data, id); 25 | if (res.status === 200) { 26 | const res2 = await usernotification(UserInfo.id); 27 | setNotificaton(res2.data); 28 | navigate(path) 29 | } 30 | } catch (error) { 31 | console.log(error); 32 | } 33 | }; 34 | // ---------------------------------react quary-------------------------------------// 35 | const queryClient = useQueryClient(); 36 | const { isLoading, error, data } = useQuery({ 37 | queryKey: ["usersjoblist"], 38 | queryFn: () => GetNotification(), 39 | }); 40 | 41 | if (isLoading) { 42 | return ; 43 | } 44 | if (error) { 45 | return ( 46 |

47 | Something went Wrong 48 |

49 | ); 50 | } 51 | // ---------------------------------react quary-------------------------------------// 52 | 53 | return ( 54 | <> 55 |
59 |
60 | {" "} 61 |
62 |
63 | 71 | 76 | 77 |

Notification

78 |
79 |
80 | {NotificationList.length > 0 ? ( 81 | NotificationList.map((notify, index) => ( 82 |
88 |
89 | 97 | 102 | 103 |

{notify.message}

104 |
105 |
106 | 112 |
113 |
114 | )) 115 | ) : ( 116 |
117 |

Notification is empty

118 |
119 | )} 120 |
121 |
122 | 123 | ); 124 | } 125 | 126 | export default Notifications; 127 | -------------------------------------------------------------------------------- /src/pages/Company/CompanyNotifications.jsx: -------------------------------------------------------------------------------- 1 | import React, { useState } from "react"; 2 | import { useQuery, useQueryClient } from "react-query"; 3 | import Loader from "../../components/Loading/Loading"; 4 | import { NavbarDefault } from "../../components/Navbar/NavBar"; 5 | import { NotificationRead} from "../../services/userApi"; 6 | import { useSelector } from "react-redux"; 7 | import { CompanyNotification } from "../../services/companyApi"; 8 | import { useNavigate } from "react-router-dom"; 9 | function CompanyNotifications() { 10 | const navigate = useNavigate() 11 | const {CompanyInfo} = useSelector((state) => state.company); 12 | const [NotificationList, setNotificaton] = useState([]); 13 | async function GetNotification() { 14 | const res = await CompanyNotification(CompanyInfo.id); 15 | console.log(res); 16 | setNotificaton(res.data); 17 | } 18 | const Isread = async (id, path) => { 19 | try { 20 | const data = { 21 | is_read: true, 22 | }; 23 | const res = await NotificationRead(data, id); 24 | if (res.status === 200) { 25 | const res2 = await CompanyNotification(CompanyInfo.id); 26 | setNotificaton(res2.data); 27 | navigate(path) 28 | } 29 | } catch (error) { 30 | console.log(error); 31 | } 32 | }; 33 | // ---------------------------------react quary-------------------------------------// 34 | const queryClient = useQueryClient(); 35 | const { isLoading, error, data } = useQuery({ 36 | queryKey: ["usersjoblist"], 37 | queryFn: () => GetNotification(), 38 | }); 39 | 40 | if (isLoading) { 41 | return ; 42 | } 43 | if (error) { 44 | return ( 45 |

46 | Something went Wrong 47 |

48 | ); 49 | } 50 | // ---------------------------------react quary-------------------------------------// 51 | 52 | return ( 53 | <> 54 |
58 |
59 | {" "} 60 |
61 |
62 | 70 | 75 | 76 |

Notification

77 |
78 |
79 | {NotificationList.length > 0 ? ( 80 | NotificationList.map((notify, index) => ( 81 |
87 |
88 | 96 | 101 | 102 |

{notify.message}

103 |
104 |
105 | 111 |
112 |
113 | )) 114 | ) : ( 115 |
116 |

Notification is empty

117 |
118 | )} 119 |
120 |
121 | 122 | ); 123 | } 124 | 125 | export default CompanyNotifications; 126 | -------------------------------------------------------------------------------- /src/pages/User/RegisterSteps/Position.jsx: -------------------------------------------------------------------------------- 1 | import React, { useState, useEffect } from "react"; 2 | import biginer from "../../../assets/biginer.png"; 3 | import someexpert from "../../../assets/someexpert.png"; 4 | import expert from "../../../assets/expert.png"; 5 | import { ToastContainer, toast } from "react-toastify"; 6 | import "react-toastify/dist/ReactToastify.css"; 7 | import { NavbarDefault } from "../../../components/Navbar/NavBar"; 8 | import { useNavigate } from "react-router-dom"; 9 | 10 | // Redux 11 | import { useDispatch } from "react-redux"; 12 | import { setPosition } from "../../../Redux/UserSlice"; 13 | 14 | function Position() { 15 | const navigate = useNavigate(); 16 | const dispatch = useDispatch(); 17 | const [pos, setPos] = useState(""); 18 | const [selectedDiv, setSelectedDiv] = useState(-1); 19 | useEffect(() => { 20 | document.title = "Add your Position | Career Bridge"; 21 | }, []); 22 | const SelectionSubmit = () => { 23 | if (selectedDiv === -1) { 24 | toast.warn("choose an option"); 25 | } else { 26 | if (selectedDiv === 0) { 27 | dispatch(setPosition({ position: pos })); 28 | } else if (selectedDiv === 1) { 29 | dispatch(setPosition({ position: pos })); 30 | } else { 31 | dispatch(setPosition({ position: pos })); 32 | } 33 | navigate("/user/role"); 34 | } 35 | }; 36 | return ( 37 | <> 38 | 39 |
40 | 41 |

1/7

42 |
43 |

44 | A few quick questions: first, have you
freelanced before? 45 |

46 |

47 | This lets us know how much help to give you along the way. We won’t 48 | share your answer with anyone
else, including potential 49 | clients. 50 |

51 |
52 |
53 |
{ 58 | setSelectedDiv(0); 59 | setPos('fresher'); 60 | }} 61 | > 62 |
63 | 64 |

65 | I am new to this 66 |

67 |
68 |
69 |
{ 74 | setSelectedDiv(1); 75 | setPos('experience') 76 | }} 77 | > 78 |
79 | 80 |

81 | Some experience 82 |

83 |
84 |
85 | 86 |
{ 91 | setSelectedDiv(2); 92 | setPos('expert') 93 | }} 94 | > 95 |
96 | 97 |

98 | I am an expert 99 |

100 |
101 |
102 |
103 |
104 |
105 |
106 | {/*
107 | 113 |
*/} 114 |
115 | 121 |
122 |
123 |
124 |
125 |
126 | 127 | ); 128 | } 129 | 130 | export default Position; 131 | -------------------------------------------------------------------------------- /src/components/Admin/AdminNavBar&Sidebar/AdminSideBar.jsx: -------------------------------------------------------------------------------- 1 | import { 2 | Card, 3 | Typography, 4 | List, 5 | ListItem, 6 | ListItemPrefix, 7 | ListItemSuffix, 8 | Chip, 9 | } from "@material-tailwind/react"; 10 | import { 11 | PresentationChartBarIcon, 12 | ShoppingBagIcon, 13 | UserCircleIcon, 14 | Cog6ToothIcon, 15 | InboxIcon, 16 | PowerIcon, 17 | } from "@heroicons/react/24/solid"; 18 | import { useNavigate } from "react-router-dom"; 19 | export function AdminSideBar({ Selections }) { 20 | const navigate = useNavigate(); 21 | 22 | const handleSignOut = () => { 23 | localStorage.removeItem('token'); 24 | navigate('/admin/login'); 25 | }; 26 | return ( 27 | 28 |
29 | 30 | Sidebar 31 | 32 |
33 | 34 | { 36 | Selections("Dashboard"); 37 | }} 38 | > 39 | 40 | 41 | 42 | Dashboard 43 | 44 | { 46 | Selections("Users"); 47 | }} 48 | > 49 | 50 | 56 | 57 | 58 | 59 | Users 60 | 61 | { 63 | Selections("Company"); 64 | }} 65 | > 66 | 67 | 73 | 78 | 79 | 80 | Company 81 | 82 | Selections("More")}> 83 | 84 | 91 | 92 | 93 | 94 | More 95 | 96 | { 98 | Selections("Inbox"); 99 | }} 100 | > 101 | 102 | 103 | 104 | Inbox 105 | 106 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | Log Out 120 | 121 | 122 |
123 | ); 124 | } 125 | -------------------------------------------------------------------------------- /src/pages/ForgotPassword/ForgotPassword.jsx: -------------------------------------------------------------------------------- 1 | import React, { useEffect, useState, useRef } from "react"; 2 | import { useNavigate, Link } from "react-router-dom"; 3 | import { ToastContainer, toast } from "react-toastify"; 4 | import Loader from "../../components/Loading/Loading"; 5 | import EmailImg from "../../assets/EmailImg/EmailClose.png"; 6 | import { UserUrl } from "../../constants/constants"; 7 | import axios from "axios"; 8 | 9 | function ForgotPassword() { 10 | const navigate = useNavigate(); 11 | const [email, setemail] = useState({ 12 | email: "", 13 | }); 14 | const [error, seterror] = useState({ email: "" }); 15 | // UseRef for Focus 16 | const emailInputRef = useRef(null); 17 | 18 | // Loading 19 | const [loading, setLoading] = useState(false); 20 | const handleLoading = () => setLoading((cur) => !cur); 21 | 22 | useEffect(() => { 23 | emailInputRef.current.focus(); 24 | document.title = "Forgot Password | Career Bridge"; 25 | }, []); 26 | 27 | // Validation for email 28 | function isValidEmail(email) { 29 | const Regex = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/; 30 | return Regex.test(email); 31 | } 32 | 33 | const Validation = () => { 34 | if (email.email.trim() === "") { 35 | emailInputRef.current.focus(); 36 | seterror({ ...error, email: true }); 37 | toast.error("Email should not be empty"); 38 | return false; 39 | } else if (!isValidEmail(email.email.trim())) { 40 | emailInputRef.current.focus(); 41 | seterror({ ...error, email: true }); 42 | toast.warn("Enter a valid email"); 43 | return false; 44 | } 45 | return true; 46 | }; 47 | 48 | // click handler then send message 49 | const SendMail = async () => { 50 | if (Validation()) { 51 | handleLoading() 52 | try { 53 | const response = await axios.post(UserUrl + "/api/forgotpassword/", email); 54 | if (response.data.status === 'success' ){ 55 | 56 | toast.success(response.data.msg) 57 | localStorage.setItem('UserId',response.data.user) 58 | const Email = email.email 59 | navigate('/forgot-resendmail',{ state: {Email} }) 60 | setemail({email:''}) 61 | }else{ 62 | 63 | toast.error(response.data.msg) 64 | setemail({email:''}) 65 | } 66 | handleLoading() 67 | } catch (error) { 68 | console.log(error); 69 | handleLoading() 70 | toast.error('Some think wrong') 71 | } 72 | } 73 | }; 74 | 75 | return ( 76 | <> 77 | {loading && } 78 | 79 |
80 |
81 |

82 | Career Bridge 83 |

84 | Login 85 |
86 |
87 |
88 |
89 | 90 |
91 |
92 |

93 | Forgot your password 94 |

95 |
96 |
97 |

98 | Enter your email address and select{" "} 99 | Send Email. 100 |

101 |
102 |
103 | { 116 | setemail({ ...email, [e.target.name]: e.target.value }); 117 | seterror({ ...error, email: false }); 118 | }} 119 | /> 120 |
121 |
122 | 128 | 134 |
135 |
136 |
137 |
138 | 139 | ); 140 | } 141 | export default ForgotPassword; 142 | -------------------------------------------------------------------------------- /src/pages/User/Dashboard/Dashboard.jsx: -------------------------------------------------------------------------------- 1 | import React, { useEffect, useState } from "react"; 2 | import { NavbarDefault } from "../../../components/Navbar/NavBar"; 3 | import AllapplyedList from "../../../components/user/Dashboard/AllapplyedList"; 4 | import AcceptedList from "../../../components/user/Dashboard/AcceptedList"; 5 | import PendingList from "../../../components/user/Dashboard/PendingList"; 6 | import InvitesList from "../../../components/user/Dashboard/InvitesList/InvitesList"; 7 | 8 | function Dashboard() { 9 | const [selected, setselected] = useState("Applyed"); 10 | const [applyed, setapplyed] = useState("all"); 11 | console.log(applyed); 12 | useEffect(() => { 13 | document.title = "Dashboard | Career Bridge"; 14 | }, []); 15 | return ( 16 | <> 17 |
18 |
19 | 20 |
21 |
22 |
23 |
24 |
25 |
setselected("Applyed")} 32 | > 33 |

Applyed list

34 |
35 | 36 |
setselected("Pending")} 43 | > 44 | Invite List 45 |
46 |
47 |
48 | {selected === "Applyed" ? ( 49 | <> 50 |
51 |
52 |
53 |

54 | Applyed Job list 55 |

56 |

57 | See information about all Applyed List 58 |

59 |
60 |
setapplyed("all")} 67 | > 68 |

All

69 |
70 |
setapplyed("accepted")} 77 | > 78 |

Accepted

79 |
80 |
setapplyed("pending")} 87 | > 88 |

Pending

89 |
90 |
91 |
92 |
93 | {applyed === "all" ? ( 94 | 95 | ) : applyed === "accepted" ? ( 96 | 97 | ) : ( 98 | 99 | )} 100 |
101 |
102 |
103 | 104 | ) : ( 105 |
106 | 107 |
108 | )} 109 |
110 |
111 |
112 | 113 | ); 114 | } 115 | 116 | export default Dashboard; 117 | -------------------------------------------------------------------------------- /src/pages/Admin/AdminHomePage.jsx: -------------------------------------------------------------------------------- 1 | import React, { useState } from "react"; 2 | import { 3 | PresentationChartBarIcon, 4 | Cog6ToothIcon, 5 | InboxIcon, 6 | PowerIcon, 7 | } from "@heroicons/react/24/solid"; 8 | import { AdminNavBar } from "../../components/Admin/AdminNavBar&Sidebar/AdminNavBar"; 9 | import { AdminSideBar } from "../../components/Admin/AdminNavBar&Sidebar/AdminSideBar"; 10 | import Admin_UserManagement from "../../components/Admin/Admin_UserManagement/Admin_UserManagement"; 11 | import Admin_CompanyManagement from "../../components/Admin/Admin_CompanyManagement/Admin_CompanyManagement"; 12 | import AdminNotifications from "../../components/Admin/AdminNotifications/AdminNotifications"; 13 | import AdminMore from "../../components/Admin/AdminMore/AdminMore"; 14 | import AdminDashboard from "../../components/Admin/AdminDashboard/AdminDashboard"; 15 | import { useNavigate } from "react-router-dom"; 16 | function AdminHomePage() { 17 | const navigate = useNavigate(); 18 | 19 | const handleSignOut = () => { 20 | localStorage.removeItem('token'); 21 | navigate('/admin/login'); 22 | }; 23 | const [SelectedList, setSelectedList] = useState("Dashboard"); 24 | const Selections = (data) => { 25 | setSelectedList(data); 26 | }; 27 | 28 | return ( 29 |
30 |
31 | 32 |
33 |
34 |
35 |
36 |
37 | setSelectedList("Dashboard")} 40 | /> 41 | setSelectedList("Users")} 43 | xmlns="http://www.w3.org/2000/svg" 44 | viewBox="0 0 24 24" 45 | fill="currentColor" 46 | className="w-6 h-6" 47 | > 48 | 49 | 50 | setSelectedList("Company")} 52 | xmlns="http://www.w3.org/2000/svg" 53 | viewBox="0 0 24 24" 54 | fill="currentColor" 55 | className="w-6 h-6" 56 | > 57 | 62 | 63 | setSelectedList("More")} 65 | xmlns="http://www.w3.org/2000/svg" 66 | viewBox="0 0 24 24" 67 | fill="currentColor" 68 | className="w-6 h-6" 69 | > 70 | 71 | 72 | 73 | setSelectedList("Inbox")} 76 | /> 77 | 78 |
79 |
80 |
81 | 82 |
83 |
84 |
85 | {SelectedList === "Dashboard" ? ( 86 | 87 | ) : SelectedList === "Users" ? ( 88 | 89 | ) : SelectedList === "Company" ? ( 90 | 91 | ) : SelectedList === "Inbox" ? ( 92 | 93 | ) : SelectedList === 'More'?( 94 | 95 | ): ( 96 | "" 97 | )} 98 |
99 |
100 |
101 | ); 102 | } 103 | 104 | export default AdminHomePage; 105 | -------------------------------------------------------------------------------- /src/pages/User/RegisterSteps/Education.jsx: -------------------------------------------------------------------------------- 1 | import React, { useState, useEffect } from "react"; 2 | import { NavbarDefault } from "../../../components/Navbar/NavBar"; 3 | import { useNavigate } from "react-router-dom"; 4 | import FileImage from "../../../assets/fileimage.png"; 5 | import EditImage from "../../../assets/Edit.png"; 6 | import DeleteImg from "../../../assets/DeleteImg.png"; 7 | import { AddEducation } from "../../../components/user/EducatinModals/AddEducation"; 8 | import { EditEducationModal } from "../../../components/user/EducatinModals/EditEducation"; 9 | import { DltEducationModal } from "../../../components/user/EducatinModals/DltEducationModal"; 10 | import countriesList from "countries-list"; 11 | import { ToastContainer, toast } from "react-toastify"; 12 | 13 | // Redux 14 | import { useSelector } from "react-redux/es/hooks/useSelector"; 15 | 16 | function Education() { 17 | const navigate = useNavigate(); 18 | 19 | useEffect(() => { 20 | document.title = "Add your Education | Career Bridge"; 21 | }, []); 22 | 23 | const { Education } = useSelector((state) => state.user); 24 | const {positions} = useSelector((state) => state.user) 25 | 26 | // Add modal 27 | const [open, setOpen] = useState(false); 28 | const handleOpen = () => setOpen(!open); 29 | 30 | // Edit modal 31 | const [Editopen, setEditOpen] = useState(false); 32 | const [id,setId] = useState('') 33 | 34 | const EdithandleOpen = (index) =>{ 35 | setId(index) 36 | setEditOpen(!Editopen) 37 | }; 38 | 39 | // Delete modal 40 | const [Dltopen, setDltopen] = useState(false) 41 | 42 | const DlthandleOpen = (index) =>{ 43 | setDltopen(!Dltopen) 44 | setId(index) 45 | } 46 | 47 | const NextButton = () =>{ 48 | if (!Education[0]==''){ 49 | navigate("/user/languages") 50 | }else{ 51 | toast.warn('Add Your education') 52 | } 53 | } 54 | 55 | return ( 56 | <> 57 | 58 | 59 |
60 |

4/7

61 |
62 |

63 | Clients like to know what you know - add 64 |
your education here. 65 |

66 |

67 | You don’t have to have a degree. Adding any relevant education helps 68 | make your profile more visible. 69 |

70 |
71 |
72 |
73 |
74 |

78 | + 79 |

80 |

81 | Add education 82 |

83 |
84 |
85 | {Education.map((education, index) => ( 86 |
90 |
91 | 92 |
93 |
94 |
95 |
EdithandleOpen(index)} className="rounded-full border border-purple-400 me-2 p-2 mt-2"> 96 | 97 |
98 |
DlthandleOpen(index)} className="flex justify-center items-center rounded-full border border-purple-400 w-8 h-8 mt-2 me-3"> 99 | 100 |
101 |
102 |
103 |

{education.School}

104 |

{education.Degree}

105 |
106 |

Descrption :

107 |

{education.Description}

108 |
109 |
110 |
111 |
112 | ))} 113 |
114 |
115 | 116 | 117 | 118 |
119 |
120 |
121 |
122 | 134 |
135 |
136 | 142 |
143 |
144 |
145 |
146 | 147 | ); 148 | } 149 | 150 | export default Education; 151 | -------------------------------------------------------------------------------- /src/components/user/EducatinModals/AddEducation.jsx: -------------------------------------------------------------------------------- 1 | import { useState } from "react"; 2 | import { 3 | Dialog, 4 | DialogHeader, 5 | DialogBody, 6 | DialogFooter, 7 | Button, 8 | } from "@material-tailwind/react"; 9 | 10 | // Redux 11 | import { useDispatch } from "react-redux"; 12 | import { SetEducation } from "../../../Redux/UserSlice"; 13 | 14 | const AddEducation = ({ isOpen, onClose }) => { 15 | 16 | const dispatch = useDispatch(); 17 | 18 | const [Form, setForm] = useState({ 19 | School: "", 20 | Degree: "", 21 | DatesAttended: "", 22 | Datesended: "", 23 | Description: "", 24 | }); 25 | 26 | const [error, seterror] = useState({ 27 | School: false, 28 | Degree: false, 29 | DatesAttended: false, 30 | Datesended: false, 31 | Description: false, 32 | }); 33 | 34 | // Validation 35 | const Validation = () => { 36 | if (Form.School.trim() === "") { 37 | seterror({ ...error, School: true }); 38 | return false; 39 | } else if (Form.Degree.trim() === "") { 40 | seterror({ ...error, Degree: true }); 41 | return false; 42 | } else if (Form.DatesAttended.trim() === "") { 43 | seterror({ ...error, DatesAttended: true }); 44 | return false; 45 | } else if (Form.Datesended.trim() === "") { 46 | seterror({ ...error, Datesended: true }); 47 | return false; 48 | } else if (Form.Description.trim() === "") { 49 | seterror({ ...error, Description: true }); 50 | return false; 51 | } 52 | return true; 53 | }; 54 | 55 | const ConfirmButton = () => { 56 | if (Validation()) { 57 | dispatch(SetEducation(Form)) 58 | onClose() 59 | } 60 | }; 61 | return ( 62 | 63 | Add Education History 64 | 65 |
66 |
67 |

School *

68 | { 73 | setForm({ ...Form, [e.target.name]: e.target.value }); 74 | seterror({ ...error, School: false }); 75 | }} 76 | className={`border w-full py-2 px-3 rounded-lg text-black placeholder-gray-700 text-sm focus:border-purple-500 focus:outline-none focus:ring focus:ring-purple-100 ${ 77 | error.School 78 | ? "focus:ring-red-200 border-2 border-red-400" 79 | : "border-gray-400" 80 | }`} 81 | /> 82 |
83 |
84 |

Degree

85 | { 90 | setForm({ ...Form, [e.target.name]: e.target.value }); 91 | seterror({ ...error, Degree: false }); 92 | }} 93 | className={`border w-full py-2 px-3 rounded-lg text-black placeholder-gray-700 text-sm focus:border-purple-500 focus:outline-none focus:ring focus:ring-purple-100 ${ 94 | error.Degree 95 | ? "focus:ring-red-200 border-2 border-red-400" 96 | : "border-gray-400" 97 | }`} 98 | /> 99 |
100 |
101 |
102 |

Dates Attended

103 | { 108 | setForm({ ...Form, [e.target.name]: e.target.value }); 109 | seterror({ ...error, DatesAttended: false }); 110 | }} 111 | className={`border w-full py-2 px-3 rounded-lg text-black placeholder-gray-700 text-sm focus:border-purple-500 focus:outline-none focus:ring focus:ring-purple-100 ${ 112 | error.DatesAttended 113 | ? "focus:ring-red-200 border-2 border-red-400" 114 | : "border-gray-400" 115 | }`} 116 | /> 117 |
118 |
119 |

120 | { 125 | setForm({ ...Form, [e.target.name]: e.target.value }); 126 | seterror({ ...error, Datesended: false }); 127 | }} 128 | className={`border w-full py-2 px-3 rounded-lg text-black placeholder-gray-700 text-sm focus:border-purple-500 focus:outline-none focus:ring focus:ring-purple-100 ${ 129 | error.Datesended 130 | ? "focus:ring-red-200 border-2 border-red-400" 131 | : "border-gray-400" 132 | }`} 133 | /> 134 |
135 |
136 |
137 |

Description

138 | 151 |
152 |
153 |
154 | 155 | 158 | 164 | 165 |
166 | ); 167 | }; 168 | export { AddEducation }; 169 | --------------------------------------------------------------------------------