├── .gitignore
├── LICENSE
├── README.md
├── package-lock.json
├── package.json
├── public
├── favicon.ico
├── index.html
├── logo192.png
├── logo512.png
├── manifest.json
└── robots.txt
└── src
├── App.css
├── App.js
├── App.test.js
├── index.css
├── index.js
├── layouts
├── AboutUsLayout.jsx
├── ButtonsOfEdit.jsx
├── ButtonsOfPagination.jsx
├── CandidateLayout.jsx
├── Dashboard.jsx
├── DateLabel.jsx
├── EmployerLayout.jsx
├── FavotireJobPostingLayout.jsx
├── Footer.jsx
├── GithubButton.jsx
├── Headline.jsx
├── HighlightedContent.jsx
├── HomeLayout.jsx
├── JobPostingLayout.jsx
├── LanguageLevelIcons.jsx
├── LinkedinButton.jsx
├── LogIn.jsx
├── MessageModal.jsx
├── Navi.jsx
├── SignUp.jsx
├── ViewAllJobPostingsByPostingDate.jsx
└── adminLayouts
│ ├── AdminLayout.jsx
│ └── CardOfConfirm.jsx
├── logo.svg
├── pages
├── CandidateAdd.jsx
├── CandidateDetail.jsx
├── CandidateList.jsx
├── CandidateUpdate.jsx
├── CoverLetterAdd.jsx
├── CoverLetterEdit.jsx
├── EducationAdd.jsx
├── EducationDelete.jsx
├── EmployerAdd.jsx
├── EmployerDetail.jsx
├── EmployerList.jsx
├── EmployerUpdate.jsx
├── ExperienceAdd.jsx
├── ExperienceDelete.jsx
├── JobPostingAdd.jsx
├── JobPostingDetail.jsx
├── JobPostingList.jsx
├── LanguageLevelAdd.jsx
├── LanguageLevelDelete.jsx
├── LinkAdd.jsx
├── LinkDelete.jsx
├── ResumeDetailsEdit.jsx
├── SkillAdd.jsx
├── SkillDelete.jsx
└── adminPages
│ ├── AppDetailsEdit.jsx
│ ├── CityAdd.jsx
│ ├── CityUpdate.jsx
│ ├── CompanyStaffAdd.jsx
│ ├── CompanyStaffUpdate.jsx
│ ├── CompanyStaffUpdateButton.jsx
│ ├── Confirm.jsx
│ ├── JobTitleAdd.jsx
│ ├── JobTitleUpdate.jsx
│ ├── LanguageAdd.jsx
│ ├── LanguageUpdate.jsx
│ ├── LevelAdd.jsx
│ ├── LevelUpdate.jsx
│ ├── LinkNameAdd.jsx
│ ├── LinkNameUpdate.jsx
│ ├── WorkingTimeAdd.jsx
│ ├── WorkingTimeUpdate.jsx
│ ├── WorkingTypeAdd.jsx
│ └── WorkingTypeUpdate.jsx
├── reportWebVitals.js
├── services
├── authService.js
├── candidateService.js
├── cityService.js
├── companyStaffService.js
├── coverLetterService.js
├── educationService.js
├── employerService.js
├── experienceService.js
├── favoriteJobPostingService.js
├── jobPostingService.js
├── jobTitleService.js
├── languageLevelService.js
├── languageService.js
├── levelService.js
├── linkNameService.js
├── linkService.js
├── resumeService.js
├── skillService.js
├── updatedEmployerService.js
├── userActivationService.js
├── workingTimeService.js
└── workingTypeService.js
└── setupTests.js
/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | # misc
15 | .DS_Store
16 | .env.local
17 | .env.development.local
18 | .env.test.local
19 | .env.production.local
20 |
21 | npm-debug.log*
22 | yarn-debug.log*
23 | yarn-error.log*
24 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License
2 |
3 | Copyright (c) 2021, Merve Üçer.
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining
6 | a copy of this software and associated documentation files (the "Software"),
7 | to deal in the Software without restriction, including without limitation
8 | the rights to use, copy, modify, merge, publish, distribute, sublicense,
9 | and/or sell copies of the Software, and to permit persons to whom
10 | the Software is furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in
13 | all copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18 | THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
19 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
20 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
21 | OTHER DEALINGS IN THE SOFTWARE.
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # 📷 Web App Screenshots (% 125)
2 |
3 | 
4 |
5 | ---
6 |
7 | 
8 |
9 | ---
10 |
11 | 
12 |
13 | ---
14 |
15 | 
16 |
17 | ---
18 |
19 | 
20 |
21 | ---
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 |
49 | ---
50 |
51 | 
52 |
53 | ---
54 |
55 | 
56 |
57 | ---
58 |
59 | 
60 |
61 | ---
62 |
63 | 
64 |
65 | ---
66 |
67 | 
68 |
69 | ---
70 |
71 | 
72 |
73 | ---
74 |
75 | 
76 |
77 | # Getting Started with Create React App
78 |
79 | This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
80 |
81 | ## Available Scripts
82 |
83 | In the project directory, you can run:
84 |
85 | ### `npm start`
86 |
87 | Runs the app in the development mode.\
88 | Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
89 |
90 | The page will reload if you make edits.\
91 | You will also see any lint errors in the console.
92 |
93 | ### `npm test`
94 |
95 | Launches the test runner in the interactive watch mode.\
96 | See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
97 |
98 | ### `npm run build`
99 |
100 | Builds the app for production to the `build` folder.\
101 | It correctly bundles React in production mode and optimizes the build for the best performance.
102 |
103 | The build is minified and the filenames include the hashes.\
104 | Your app is ready to be deployed!
105 |
106 | See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
107 |
108 | ### `npm run eject`
109 |
110 | **Note: this is a one-way operation. Once you `eject`, you can’t go back!**
111 |
112 | If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
113 |
114 | Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
115 |
116 | You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
117 |
118 | ## Learn More
119 |
120 | You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
121 |
122 | To learn React, check out the [React documentation](https://reactjs.org/).
123 |
124 | ### Code Splitting
125 |
126 | This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting)
127 |
128 | ### Analyzing the Bundle Size
129 |
130 | This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size)
131 |
132 | ### Making a Progressive Web App
133 |
134 | This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app)
135 |
136 | ### Advanced Configuration
137 |
138 | This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration)
139 |
140 | ### Deployment
141 |
142 | This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment)
143 |
144 | ### `npm run build` fails to minify
145 |
146 | This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify)
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "hrms",
3 | "version": "0.1.0",
4 | "private": true,
5 | "dependencies": {
6 | "@testing-library/jest-dom": "^5.14.1",
7 | "@testing-library/react": "^11.2.7",
8 | "@testing-library/user-event": "^12.8.3",
9 | "axios": "^0.21.1",
10 | "formik": "^2.2.9",
11 | "react": "^17.0.2",
12 | "react-dom": "^17.0.2",
13 | "react-router-dom": "^5.2.0",
14 | "react-scripts": "4.0.3",
15 | "semantic-ui-css": "^2.4.1",
16 | "semantic-ui-react": "^2.0.3",
17 | "web-vitals": "^1.1.2",
18 | "yup": "^0.32.9"
19 | },
20 | "scripts": {
21 | "start": "react-scripts start",
22 | "build": "react-scripts build",
23 | "test": "react-scripts test",
24 | "eject": "react-scripts eject"
25 | },
26 | "eslintConfig": {
27 | "extends": [
28 | "react-app",
29 | "react-app/jest"
30 | ]
31 | },
32 | "browserslist": {
33 | "production": [
34 | ">0.2%",
35 | "not dead",
36 | "not op_mini all"
37 | ],
38 | "development": [
39 | "last 1 chrome version",
40 | "last 1 firefox version",
41 | "last 1 safari version"
42 | ]
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/merveucer/hrms-frontend/731d6e895fd5aa35f66a1300f69a50fac10dc4f0/public/favicon.ico
--------------------------------------------------------------------------------
/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
15 |
16 |
25 | React App
26 |
27 |
28 |
29 | You need to enable JavaScript to run this app.
30 |
31 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/public/logo192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/merveucer/hrms-frontend/731d6e895fd5aa35f66a1300f69a50fac10dc4f0/public/logo192.png
--------------------------------------------------------------------------------
/public/logo512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/merveucer/hrms-frontend/731d6e895fd5aa35f66a1300f69a50fac10dc4f0/public/logo512.png
--------------------------------------------------------------------------------
/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | },
10 | {
11 | "src": "logo192.png",
12 | "type": "image/png",
13 | "sizes": "192x192"
14 | },
15 | {
16 | "src": "logo512.png",
17 | "type": "image/png",
18 | "sizes": "512x512"
19 | }
20 | ],
21 | "start_url": ".",
22 | "display": "standalone",
23 | "theme_color": "#000000",
24 | "background_color": "#ffffff"
25 | }
26 |
--------------------------------------------------------------------------------
/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 | Disallow:
4 |
--------------------------------------------------------------------------------
/src/App.css:
--------------------------------------------------------------------------------
1 | @import url(https://fonts.googleapis.com/css?family=Montserrat&display=swap); /* montserrat */
2 | @import url(https://use.typekit.net/jur8lgk.css); /* orbitron, shuriken-std */
3 |
4 | .ui {
5 | font-family: montserrat, sans-serif !important;
6 | }
7 |
8 | .ui.dashboard.container {
9 | margin-top: 3em;
10 | }
11 |
12 | .ui.content.container {
13 | margin-top: 6em;
14 | margin-bottom: 2.6em;
15 | }
16 |
17 | .ui.footer.container {
18 | margin-top: 3.5em;
19 | }
20 |
21 | .ui.headline.container {
22 | margin-top: 7em;
23 | margin-bottom: 1.8em;
24 | }
25 |
26 | .ui.view-all-job-postings-by-posting-date.container {
27 | margin-top: 3.5em;
28 | margin-bottom: 3.5em;
29 | }
30 |
31 | .ui.button {
32 | font-family: orbitron, sans-serif !important;
33 | }
34 |
35 | .montserrat {
36 | font-family: montserrat, sans-serif !important;
37 | }
38 |
39 | .orbitron {
40 | font-family: orbitron, sans-serif !important;
41 | }
42 |
43 | .headline-1 {
44 | font-family: shuriken-std, sans-serif !important;
45 | font-size: 470%;
46 | font-style: normal;
47 | }
48 |
49 | .headline-2 {
50 | font-family: shuriken-std, sans-serif !important;
51 | font-size: 870%;
52 | font-style: normal;
53 | }
54 |
55 | .detail-header {
56 | font-family: orbitron, sans-serif !important;
57 | font-size: 130%;
58 | }
59 |
60 | .date {
61 | float: right;
62 | margin-bottom: 1em;
63 | }
64 |
65 | .extra {
66 | color: darkgrey;
67 | }
68 |
69 | .or {
70 | font-family: orbitron, sans-serif !important;
71 | color: white;
72 | text-align: center;
73 | }
74 |
75 | .coverLetterEdit {
76 | margin-bottom: 1em;
77 | }
78 |
--------------------------------------------------------------------------------
/src/App.js:
--------------------------------------------------------------------------------
1 | import "./App.css";
2 | import "semantic-ui-css/semantic.min.css";
3 | import Dashboard from "./layouts/Dashboard";
4 |
5 | function App() {
6 | return (
7 |
8 |
9 |
10 | );
11 | }
12 |
13 | export default App;
14 |
--------------------------------------------------------------------------------
/src/App.test.js:
--------------------------------------------------------------------------------
1 | import { render, screen } from '@testing-library/react';
2 | import App from './App';
3 |
4 | test('renders learn react link', () => {
5 | render( );
6 | const linkElement = screen.getByText(/learn react/i);
7 | expect(linkElement).toBeInTheDocument();
8 | });
9 |
--------------------------------------------------------------------------------
/src/index.css:
--------------------------------------------------------------------------------
1 | body {
2 | margin: 0;
3 | font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen",
4 | "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue",
5 | sans-serif;
6 | -webkit-font-smoothing: antialiased;
7 | -moz-osx-font-smoothing: grayscale;
8 | }
9 |
10 | code {
11 | font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New",
12 | monospace;
13 | }
14 |
--------------------------------------------------------------------------------
/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import { BrowserRouter } from 'react-router-dom';
4 | import './index.css';
5 | import App from './App';
6 | import reportWebVitals from './reportWebVitals';
7 |
8 |
9 | ReactDOM.render(
10 | ,
11 | document.getElementById('root')
12 | );
13 |
14 | // If you want to start measuring performance in your app, pass a function
15 | // to log results (for example: reportWebVitals(console.log))
16 | // or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
17 | reportWebVitals();
18 |
--------------------------------------------------------------------------------
/src/layouts/AboutUsLayout.jsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import Headline from "./Headline";
3 | import { Container, Header, Grid } from "semantic-ui-react";
4 |
5 | export default function AboutUsLayout() {
6 | return (
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 | Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
18 | eiusmod tempor incididunt ut labore et dolore magna aliqua. Lorem
19 | ipsum dolor sit amet consectetur adipiscing elit pellentesque.
20 | Enim sed faucibus turpis in eu mi. Amet risus nullam eget felis
21 | eget nunc lobortis mattis aliquam. Mauris augue neque gravida in
22 | fermentum et sollicitudin ac orci. Amet nulla facilisi morbi
23 | tempus iaculis urna id volutpat lacus. Dignissim diam quis enim
24 | lobortis scelerisque fermentum dui faucibus. Mauris pharetra et
25 | ultrices neque. Diam volutpat commodo sed egestas egestas
26 | fringilla phasellus. Donec adipiscing tristique risus nec feugiat.
27 | Scelerisque mauris pellentesque pulvinar pellentesque habitant
28 | morbi tristique senectus et. Mauris commodo quis imperdiet massa
29 | tincidunt. Facilisi nullam vehicula ipsum a. Amet nisl suscipit
30 | adipiscing bibendum est.
31 |
32 |
33 |
34 | Elit duis tristique sollicitudin nibh sit. Vitae proin sagittis
35 | nisl rhoncus mattis. Mus mauris vitae ultricies leo integer
36 | malesuada nunc. Eget gravida cum sociis natoque penatibus et
37 | magnis dis parturient. Ut placerat orci nulla pellentesque
38 | dignissim enim sit amet. Neque sodales ut etiam sit amet.
39 | Condimentum vitae sapien pellentesque habitant morbi tristique.
40 | Nunc sed blandit libero volutpat. Porttitor lacus luctus accumsan
41 | tortor. Ante metus dictum at tempor commodo ullamcorper a lacus.
42 | Augue interdum velit euismod in pellentesque massa.
43 |
44 |
45 |
46 | Orci eu lobortis elementum nibh tellus molestie nunc non.
47 | Adipiscing elit ut aliquam purus sit amet luctus venenatis lectus.
48 | Arcu dui vivamus arcu felis bibendum ut tristique. Nisl pretium
49 | fusce id velit ut tortor pretium. Diam donec adipiscing tristique
50 | risus nec. Pretium quam vulputate dignissim suspendisse in. Est
51 | ultricies integer quis auctor elit sed vulputate mi sit. Nulla
52 | facilisi cras fermentum odio eu feugiat pretium nibh. Pharetra
53 | magna ac placerat vestibulum lectus mauris ultrices. Adipiscing
54 | diam donec adipiscing tristique risus. Nulla aliquet enim tortor
55 | at. Adipiscing vitae proin sagittis nisl. Et egestas quis ipsum
56 | suspendisse ultrices gravida. Ipsum a arcu cursus vitae. Sit amet
57 | tellus cras adipiscing enim. Tempus urna et pharetra pharetra
58 | massa. Tincidunt tortor aliquam nulla facilisi cras fermentum odio
59 | eu. Cursus mattis molestie a iaculis at.
60 |
61 |
62 |
63 | Arcu odio ut sem nulla pharetra diam. At erat pellentesque
64 | adipiscing commodo elit at imperdiet dui accumsan. Tristique et
65 | egestas quis ipsum suspendisse ultrices gravida. Pharetra
66 | convallis posuere morbi leo urna molestie at. Duis at consectetur
67 | lorem donec massa sapien faucibus. Pellentesque habitant morbi
68 | tristique senectus. Massa vitae tortor condimentum lacinia quis
69 | vel. At in tellus integer feugiat scelerisque varius morbi enim
70 | nunc. Vitae elementum curabitur vitae nunc. Ultricies mi quis
71 | hendrerit dolor magna eget. Scelerisque purus semper eget duis.
72 | Rhoncus aenean vel elit scelerisque mauris pellentesque pulvinar.
73 | Sed odio morbi quis commodo odio. Natoque penatibus et magnis dis.
74 | Arcu odio ut sem nulla pharetra diam sit. Tempus egestas sed sed
75 | risus pretium quam vulputate. Ac turpis egestas sed tempus. Nunc
76 | eget lorem dolor sed viverra ipsum nunc.
77 |
78 |
79 |
80 | Nunc eget lorem dolor sed viverra ipsum. Nec ultrices dui sapien
81 | eget mi proin sed libero enim. Feugiat nisl pretium fusce id velit
82 | ut. Nunc mattis enim ut tellus elementum sagittis vitae. Convallis
83 | tellus id interdum velit laoreet id donec ultrices. Nisl vel
84 | pretium lectus quam id leo in vitae turpis. Quam elementum
85 | pulvinar etiam non quam lacus suspendisse. Accumsan sit amet nulla
86 | facilisi. Volutpat odio facilisis mauris sit amet massa vitae
87 | tortor. Mauris cursus mattis molestie a iaculis. Non odio euismod
88 | lacinia at quis risus.
89 |
90 |
91 |
92 |
93 |
94 |
95 | );
96 | }
97 |
--------------------------------------------------------------------------------
/src/layouts/ButtonsOfEdit.jsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import { NavLink } from "react-router-dom";
3 | import { Grid, Button } from "semantic-ui-react";
4 |
5 | export default function ButtonsOfEdit({ content, firstIcon, secondIcon, firstTo, secondTo }) {
6 | return (
7 |
8 |
9 |
10 |
19 |
20 |
21 |
30 |
39 |
40 |
41 |
42 | );
43 | }
44 |
--------------------------------------------------------------------------------
/src/layouts/ButtonsOfPagination.jsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import { Grid, Button } from "semantic-ui-react";
3 |
4 | export default function ButtonsOfPagination({ previous, next, pageContent, pageSizeOne, pageSizeTwo, pageSizeThree, pageSizeFour, pageSizeContent }) {
5 | return (
6 |
7 |
8 |
9 |
17 |
24 |
31 |
38 |
45 |
46 |
47 |
54 |
62 |
69 |
70 |
71 |
72 | );
73 | }
74 |
--------------------------------------------------------------------------------
/src/layouts/CandidateLayout.jsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import Headline from "./Headline";
3 | import CandidateList from "../pages/CandidateList";
4 | import { Container } from "semantic-ui-react";
5 |
6 | export default function CandidateLayout() {
7 | return (
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 | );
16 | }
17 |
--------------------------------------------------------------------------------
/src/layouts/Dashboard.jsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import { Route } from "react-router-dom";
3 | import Navi from "./Navi";
4 | import Footer from "./Footer";
5 | import HomeLayout from "./HomeLayout";
6 | import JobPostingLayout from "./JobPostingLayout";
7 | import CandidateLayout from "./CandidateLayout";
8 | import EmployerLayout from "./EmployerLayout";
9 | import AboutUsLayout from "./AboutUsLayout";
10 | import JobPostingDetail from "./../pages/JobPostingDetail";
11 | import CandidateDetail from "./../pages/CandidateDetail";
12 | import EmployerDetail from "./../pages/EmployerDetail";
13 | import JobPostingAdd from "./../pages/JobPostingAdd";
14 | import CandidateAdd from "./../pages/CandidateAdd";
15 | import EmployerAdd from "./../pages/EmployerAdd";
16 | import ResumeDetailsEdit from "./../pages/ResumeDetailsEdit";
17 | import LinkAdd from "./../pages/LinkAdd";
18 | import CoverLetterAdd from "./../pages/CoverLetterAdd";
19 | import EducationAdd from "./../pages/EducationAdd";
20 | import ExperienceAdd from "./../pages/ExperienceAdd";
21 | import LanguageLevelAdd from "./../pages/LanguageLevelAdd";
22 | import SkillAdd from "./../pages/SkillAdd";
23 | import LinkDelete from "./../pages/LinkDelete";
24 | import CoverLetterEdit from "./../pages/CoverLetterEdit";
25 | import EducationDelete from "./../pages/EducationDelete";
26 | import ExperienceDelete from "./../pages/ExperienceDelete";
27 | import LanguageLevelDelete from "./../pages/LanguageLevelDelete";
28 | import SkillDelete from "./../pages/SkillDelete";
29 | import CandidateUpdate from "./../pages/CandidateUpdate";
30 | import EmployerUpdate from "./../pages/EmployerUpdate";
31 | import FavoriteJobPostingLayout from "./FavotireJobPostingLayout";
32 | import AdminLayout from "./adminLayouts/AdminLayout";
33 | import CompanyStaffAdd from "./../pages/adminPages/CompanyStaffAdd";
34 | import CompanyStaffUpdate from "./../pages/adminPages/CompanyStaffUpdate";
35 | import AppDetailsEdit from "./../pages/adminPages/AppDetailsEdit";
36 | import CityAdd from "./../pages/adminPages/CityAdd";
37 | import CityUpdate from "./../pages/adminPages/CityUpdate";
38 | import JobTitleAdd from "./../pages/adminPages/JobTitleAdd";
39 | import JobTitleUpdate from "./../pages/adminPages/JobTitleUpdate";
40 | import LanguageAdd from "./../pages/adminPages/LanguageAdd";
41 | import LanguageUpdate from "./../pages/adminPages/LanguageUpdate";
42 | import LevelAdd from "./../pages/adminPages/LevelAdd";
43 | import LevelUpdate from "./../pages/adminPages/LevelUpdate";
44 | import LinkNameAdd from "./../pages/adminPages/LinkNameAdd";
45 | import LinkNameUpdate from "./../pages/adminPages/LinkNameUpdate";
46 | import WorkingTimeAdd from "./../pages/adminPages/WorkingTimeAdd";
47 | import WorkingTimeUpdate from "./../pages/adminPages/WorkingTimeUpdate";
48 | import WorkingTypeAdd from "./../pages/adminPages/WorkingTypeAdd";
49 | import WorkingTypeUpdate from "./../pages/adminPages/WorkingTypeUpdate";
50 | import Confirm from "./../pages/adminPages/Confirm";
51 | import { Container } from "semantic-ui-react";
52 |
53 | export default function Dashboard() {
54 | return (
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | );
110 | }
111 |
--------------------------------------------------------------------------------
/src/layouts/DateLabel.jsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import { Label, Grid } from "semantic-ui-react";
3 |
4 | export default function DateLabel({value}) {
5 | return (
6 |
7 |
8 |
9 |
10 |
11 |
12 | {value}
13 |
14 |
15 |
16 |
17 |
18 |
19 | );
20 | }
21 |
--------------------------------------------------------------------------------
/src/layouts/EmployerLayout.jsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import Headline from "./Headline";
3 | import EmployerList from "../pages/EmployerList";
4 | import { Container } from "semantic-ui-react";
5 |
6 | export default function EmployerLayout() {
7 | return (
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 | );
16 | }
17 |
--------------------------------------------------------------------------------
/src/layouts/FavotireJobPostingLayout.jsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import { useParams } from "react-router";
3 | import Headline from "./Headline";
4 | import JobPostingList from "../pages/JobPostingList";
5 | import { Container } from "semantic-ui-react";
6 |
7 | export default function FavoriteJobPostingLayout() {
8 |
9 | let { id } = useParams();
10 |
11 | return (
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 | );
20 | }
21 |
--------------------------------------------------------------------------------
/src/layouts/Footer.jsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import { NavLink } from "react-router-dom";
3 | import { Container, Divider, Grid, List, Icon } from "semantic-ui-react";
4 |
5 | export default function Footer() {
6 | return (
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 | 2021 ・ Merve Üçer
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 | );
38 | }
39 |
--------------------------------------------------------------------------------
/src/layouts/GithubButton.jsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import { Button } from "semantic-ui-react";
3 |
4 | export default function GithubButton({ url }) {
5 | return (
6 |
14 | );
15 | }
16 |
--------------------------------------------------------------------------------
/src/layouts/Headline.jsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import { Container, Segment, Header } from "semantic-ui-react";
3 |
4 | export default function Headline({ content }) {
5 | return (
6 |
7 |
8 |
11 |
12 |
13 |
14 | );
15 | }
16 |
--------------------------------------------------------------------------------
/src/layouts/HighlightedContent.jsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import { Grid, Image, Divider, Segment, Header, Input } from "semantic-ui-react";
3 |
4 | export default function HighlightedContent() {
5 | return (
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
20 |
21 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 | );
35 | }
36 |
--------------------------------------------------------------------------------
/src/layouts/HomeLayout.jsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import HighlightedContent from "./HighlightedContent";
3 | import ViewAllJobPostingsByPostingDate from "./ViewAllJobPostingsByPostingDate";
4 | import JobPostingList from "./../pages/JobPostingList";
5 | import { Divider, Icon } from "semantic-ui-react";
6 |
7 | export default function HomeLayout() {
8 | return (
9 |
10 |
11 |
12 |
13 | Recently Posted
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 | );
23 | }
24 |
--------------------------------------------------------------------------------
/src/layouts/JobPostingLayout.jsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import Headline from "./Headline";
3 | import JobPostingList from "../pages/JobPostingList";
4 | import { Container } from "semantic-ui-react";
5 |
6 | export default function JobPostingLayout() {
7 | return (
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 | );
16 | }
17 |
--------------------------------------------------------------------------------
/src/layouts/LanguageLevelIcons.jsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import { Icon } from "semantic-ui-react";
3 |
4 | export default function LanguageLevelIcons({ level }) {
5 | let name1 = "circle outline", name2 = "circle outline", name3 = "circle outline", name4 = "circle outline", name5 = "circle outline";
6 |
7 | if (level === "Level 1") {
8 | name1 = "circle";
9 | }
10 |
11 | if (level === "Level 2") {
12 | name1 = name2 = "circle";
13 | }
14 |
15 | if (level === "Level 3") {
16 | name1 = name2 = name3 = "circle";
17 | }
18 |
19 | if (level === "Level 4") {
20 | name1 = name2 = name3 = name4 = "circle";
21 | }
22 |
23 | if (level === "Level 5") {
24 | name1 = name2 = name3 = name4 = name5 = "circle";
25 | }
26 |
27 | return (
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 | );
36 | }
37 |
--------------------------------------------------------------------------------
/src/layouts/LinkedinButton.jsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import { Button } from "semantic-ui-react";
3 |
4 | export default function LinkedinButton({ url }) {
5 | return (
6 |
14 | );
15 | }
16 |
--------------------------------------------------------------------------------
/src/layouts/LogIn.jsx:
--------------------------------------------------------------------------------
1 | import React, { useState } from "react";
2 | import { NavLink } from "react-router-dom";
3 | import { Button, Grid, Header, Icon, Modal, Segment } from "semantic-ui-react";
4 |
5 | export default function LogIn() {
6 | const [open, setOpen] = useState(false);
7 |
8 | const handleModal = (value) => {
9 | setOpen(value);
10 | };
11 |
12 | return (
13 |
14 | handleModal(true)}
19 | />
20 |
21 | handleModal(false)}
25 | onOpen={() => handleModal(true)}
26 | open={open}
27 | size="small"
28 | >
29 |
30 |
31 | What type of account do you want to log into ?
32 |
33 |
34 |
35 |
36 |
37 |
38 | setOpen(false)}
46 | >
47 |
48 |
49 |
50 | or
51 |
52 |
53 |
54 | setOpen(false)}
62 | >
63 |
64 |
65 |
66 |
67 |
68 |
69 | );
70 | }
71 |
--------------------------------------------------------------------------------
/src/layouts/MessageModal.jsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import { Modal, Header, Icon } from "semantic-ui-react";
3 |
4 | export default function MessageModal({ onClose, onOpen, open, content }) {
5 | return (
6 |
14 |
18 |
19 | );
20 | }
21 |
--------------------------------------------------------------------------------
/src/layouts/Navi.jsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import { NavLink } from "react-router-dom";
3 | import LogIn from "./LogIn";
4 | import SignUp from "./SignUp";
5 | import { Menu, Container, Header } from "semantic-ui-react";
6 |
7 | export default function Navi() {
8 | return (
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 | );
30 | }
31 |
--------------------------------------------------------------------------------
/src/layouts/SignUp.jsx:
--------------------------------------------------------------------------------
1 | import React, { useState } from "react";
2 | import { NavLink } from "react-router-dom";
3 | import { Button, Grid, Header, Icon, Modal, Segment } from "semantic-ui-react";
4 |
5 | export default function SignUp() {
6 | const [open, setOpen] = useState(false);
7 |
8 | const handleModal = (value) => {
9 | setOpen(value);
10 | };
11 |
12 | return (
13 |
14 | handleModal(true)}
19 | />
20 |
21 | handleModal(false)}
25 | onOpen={() => handleModal(true)}
26 | open={open}
27 | size="small"
28 | >
29 |
30 |
31 | What type of account do you want to create ?
32 |
33 |
34 |
35 |
36 |
37 |
38 | setOpen(false)}
46 | />
47 |
48 |
49 |
50 | or
51 |
52 |
53 |
54 | setOpen(false)}
62 | />
63 |
64 |
65 |
66 |
67 |
68 |
69 | );
70 | }
71 |
--------------------------------------------------------------------------------
/src/layouts/ViewAllJobPostingsByPostingDate.jsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import { NavLink } from "react-router-dom";
3 | import { Container, Grid, Reveal, Image, Button } from "semantic-ui-react";
4 |
5 | export default function ViewAllJobPostingsByPostingDate() {
6 | return (
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 | );
25 | }
26 |
--------------------------------------------------------------------------------
/src/layouts/adminLayouts/AdminLayout.jsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import { NavLink } from "react-router-dom";
3 | import Headline from "../Headline";
4 | import CompanyStaffUpdateButton from "../../pages/adminPages/CompanyStaffUpdateButton";
5 | import { Button, Container, Grid } from "semantic-ui-react";
6 |
7 | export default function AdminLayout() {
8 | let id = 1; // TODO: companyStaffId
9 |
10 | return (
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 | );
30 | }
31 |
--------------------------------------------------------------------------------
/src/layouts/adminLayouts/CardOfConfirm.jsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import { NavLink } from "react-router-dom";
3 | import { Card, Button } from "semantic-ui-react";
4 |
5 | export default function CardOfConfirm({ header, confirm, unconfirm, view }) {
6 | return (
7 |
8 |
9 |
10 |
11 |
12 |
20 |
28 |
36 |
37 |
38 | );
39 | }
40 |
--------------------------------------------------------------------------------
/src/logo.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/pages/CandidateAdd.jsx:
--------------------------------------------------------------------------------
1 | import React, { useState } from "react";
2 | import { Formik, useFormik } from "formik";
3 | import * as Yup from "yup";
4 | import Headline from "./../layouts/Headline";
5 | import AuthService from "./../services/authService";
6 | import DateLabel from "./../layouts/DateLabel";
7 | import MessageModal from "./../layouts/MessageModal";
8 | import { Container, Grid, Label, Form, Button } from "semantic-ui-react";
9 |
10 | export default function CandidateAdd() {
11 | const [open, setOpen] = useState(false);
12 |
13 | let authService = new AuthService();
14 |
15 | const initialValues = {
16 | firstName: "",
17 | lastName: "",
18 | identityNumber: "",
19 | dateOfBirth: "",
20 | email: "",
21 | password: "",
22 | confirmPassword: "",
23 | };
24 |
25 | const validationSchema = Yup.object({
26 | firstName: Yup.string().required("Required Field"),
27 | lastName: Yup.string().required("Required Field"),
28 | identityNumber: Yup.string().length(11 ,"Not 11 Characters in Length").required("Required Field"),
29 | dateOfBirth: Yup.date().required("Required Field"),
30 | email: Yup.string().email("Not a Valid Email").required("Required Field"),
31 | password: Yup.string().required("Required Field"),
32 | confirmPassword: Yup.string().required("Required Field"),
33 | });
34 |
35 | const onSubmit = (values, { resetForm }) => {
36 | console.log(values);
37 | authService.registerCandidate(values);
38 | handleModal(true);
39 | setTimeout(() => {
40 | resetForm();
41 | }, 100);
42 | };
43 |
44 | const formik = useFormik({
45 | initialValues: initialValues,
46 | validationSchema: validationSchema,
47 | onSubmit: onSubmit,
48 | });
49 |
50 | const handleModal = (value) => {
51 | setOpen(value);
52 | };
53 |
54 | const handleChange = (fieldName, value) => {
55 | formik.setFieldValue(fieldName, value);
56 | };
57 |
58 | return (
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 | handleChange("firstName", data.value)}
75 | value={formik.values.firstName}
76 | />
77 | {formik.errors.firstName && formik.touched.firstName && }
78 | handleChange("lastName", data.value)}
82 | value={formik.values.lastName}
83 | />
84 | {formik.errors.lastName && formik.touched.lastName && }
85 |
86 | handleChange("identityNumber", data.value)}
91 | value={formik.values.identityNumber}
92 | />
93 | handleChange("dateOfBirth", data.value)}
98 | value={formik.values.dateOfBirth}
99 | />
100 |
101 |
102 |
103 |
104 | {formik.errors.identityNumber && formik.touched.identityNumber && }
105 |
106 |
107 | {formik.errors.dateOfBirth && formik.touched.dateOfBirth && }
108 |
109 |
110 |
111 | handleChange("email", data.value)}
116 | value={formik.values.email}
117 | />
118 | {formik.errors.email && formik.touched.email && }
119 | handleChange("password", data.value)}
123 | value={formik.values.password}
124 | />
125 | {formik.errors.password && formik.touched.password && }
126 | handleChange("confirmPassword", data.value)}
130 | value={formik.values.confirmPassword}
131 | />
132 | {formik.errors.confirmPassword && formik.touched.confirmPassword && }
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 | handleModal(false)} onOpen={() => handleModal(true)} open={open} content="An activation e-mail has been sent !" />
144 |
145 |
146 | );
147 | }
148 |
--------------------------------------------------------------------------------
/src/pages/CandidateList.jsx:
--------------------------------------------------------------------------------
1 | import React, { useState, useEffect } from "react";
2 | import { NavLink } from "react-router-dom";
3 | import ResumeService from "./../services/resumeService";
4 | import GithubButton from "./../layouts/GithubButton";
5 | import LinkedinButton from "./../layouts/LinkedinButton";
6 | import { Card, Divider, Image} from "semantic-ui-react";
7 |
8 | export default function CandidateList() {
9 | const [resumes, setResumes] = useState([]);
10 |
11 | let resumeService = new ResumeService();
12 |
13 | useEffect(() => {
14 | resumeService.getAllResumesDetailsByActivatedCandidate().then((result) => setResumes(result.data.data));
15 | }, []);
16 |
17 | return (
18 |
19 | {resumes.map((resume) => (
20 |
21 |
22 |
23 | {resume.image == null
24 | ?
25 | : }
26 |
27 |
28 | {resume.candidate?.firstName} {resume.candidate?.lastName}
29 |
30 |
31 | {resume.experiences.length === 0 && resume.educations.length === 0
32 | ?
33 | : resume.experiences.length === 0
34 | ? resume.educations[0].department
35 | : resume.experiences[0].jobTitle?.title}
36 |
37 |
38 |
39 | {resume.links.length === 0
40 | ?
41 | : resume.links.map((link) =>
42 | (link.linkName?.id === 1
43 | ?
44 | : )
45 | )}
46 |
47 |
48 | ))}
49 |
50 | );
51 | }
52 |
--------------------------------------------------------------------------------
/src/pages/CandidateUpdate.jsx:
--------------------------------------------------------------------------------
1 | import React, { useEffect, useState } from "react";
2 | import { useParams } from "react-router";
3 | import { Formik, useFormik } from "formik";
4 | import * as Yup from "yup";
5 | import Headline from "./../layouts/Headline";
6 | import CandidateService from "../services/candidateService";
7 | import DateLabel from "./../layouts/DateLabel";
8 | import MessageModal from "./../layouts/MessageModal";
9 | import { Container, Grid, Label, Form, Button } from "semantic-ui-react";
10 |
11 | export default function CandidateUpdate() {
12 | let { id } = useParams();
13 |
14 | const [candidate, setCandidate] = useState({});
15 | const [open, setOpen] = useState(false);
16 |
17 | let candidateService = new CandidateService();
18 |
19 | useEffect(() => {
20 | candidateService.getById(id).then((result) => setCandidate(result.data.data));
21 | }, []);
22 |
23 | const initialValues = {
24 | id: id,
25 | firstName: candidate.firstName,
26 | lastName: candidate.lastName,
27 | identityNumber: candidate.identityNumber,
28 | dateOfBirth: candidate.dateOfBirth,
29 | email: candidate.email,
30 | password: candidate.password,
31 | };
32 |
33 | const validationSchema = Yup.object({
34 | firstName: Yup.string(),
35 | lastName: Yup.string(),
36 | identityNumber: Yup.string().length(11 ,"Not 11 Characters in Length"),
37 | dateOfBirth: Yup.date(),
38 | email: Yup.string().email("Not a Valid Email"),
39 | password: Yup.string(),
40 | });
41 |
42 | const onSubmit = (values) => {
43 | console.log(values);
44 | candidateService.update(values);
45 | handleModal(true);
46 | };
47 |
48 | const formik = useFormik({
49 | initialValues: initialValues,
50 | validationSchema: validationSchema,
51 | onSubmit: onSubmit,
52 | });
53 |
54 | const handleModal = (value) => {
55 | setOpen(value);
56 | };
57 |
58 | const handleChange = (fieldName, value) => {
59 | formik.setFieldValue(fieldName, value);
60 | };
61 |
62 | return (
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 | handleChange("firstName", data.value)}
81 | value={formik.values.firstName}
82 | />
83 | {formik.errors.firstName && formik.touched.firstName && }
84 | handleChange("lastName", data.value)}
90 | value={formik.values.lastName}
91 | />
92 | {formik.errors.lastName && formik.touched.lastName && }
93 |
94 | handleChange("identityNumber", data.value)}
100 | value={formik.values.identityNumber}
101 | />
102 | handleChange("dateOfBirth", data.value)}
108 | value={formik.values.dateOfBirth}
109 | />
110 |
111 |
112 |
113 |
114 | {formik.errors.identityNumber && formik.touched.identityNumber && }
115 |
116 |
117 | {formik.errors.dateOfBirth && formik.touched.dateOfBirth && }
118 |
119 |
120 |
121 | handleChange("email", data.value)}
127 | value={formik.values.email}
128 | />
129 | {formik.errors.email && formik.touched.email && }
130 | handleChange("password", data.value)}
136 | value={formik.values.password}
137 | />
138 | {formik.errors.password && formik.touched.password && }
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 | handleModal(false)} onOpen={() => handleModal(true)} open={open} content="Updated !" />
150 |
151 |
152 | )
153 | }
154 |
--------------------------------------------------------------------------------
/src/pages/CoverLetterAdd.jsx:
--------------------------------------------------------------------------------
1 | import React, { useState } from "react";
2 | import { useParams } from "react-router";
3 | import { Formik, useFormik } from "formik";
4 | import * as Yup from "yup";
5 | import Headline from "../layouts/Headline";
6 | import DateLabel from "./../layouts/DateLabel";
7 | import CoverLetterService from "./../services/coverLetterService";
8 | import MessageModal from "./../layouts/MessageModal";
9 | import { Container, Grid, Form, Label, Button } from "semantic-ui-react";
10 |
11 | export default function CoverLetterAdd() {
12 | let { id } = useParams();
13 |
14 | const [open, setOpen] = useState(false);
15 |
16 | let coverLetterService = new CoverLetterService();
17 |
18 | const initialValues = {
19 | candidate: {id: id},
20 | name: "",
21 | content: "",
22 | };
23 |
24 | const validationSchema = Yup.object({
25 | name: Yup.string().required("Required Field"),
26 | content: Yup.string().max(1150, "Over 1150 Characters").required("Required Field"),
27 | });
28 |
29 | const onSubmit = (values, { resetForm }) => {
30 | coverLetterService.add(values);
31 | console.log(values);
32 | handleModal(true);
33 | setTimeout(() => {
34 | resetForm();
35 | }, 100);
36 | };
37 |
38 | const formik = useFormik({
39 | initialValues: initialValues,
40 | validationSchema: validationSchema,
41 | onSubmit: onSubmit,
42 | });
43 |
44 | const handleModal = (value) => {
45 | setOpen(value);
46 | };
47 |
48 | const handleChange = (fieldName, value) => {
49 | formik.setFieldValue(fieldName, value);
50 | };
51 |
52 | return (
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 | handleChange("name", data.value)}
69 | value={formik.values.name}
70 | />
71 | {formik.errors.name && formik.touched.name && }
72 | handleChange("content", data.value)}
77 | value={formik.values.content}
78 | />
79 | {formik.errors.content && formik.touched.content && }
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 | handleModal(false)} onOpen={() => handleModal(true)} open={open} content="Added !" />
91 |
92 |
93 | );
94 | }
95 |
--------------------------------------------------------------------------------
/src/pages/CoverLetterEdit.jsx:
--------------------------------------------------------------------------------
1 | import React, { useState, useEffect } from "react";
2 | import { useParams } from "react-router";
3 | import Headline from "../layouts/Headline";
4 | import DateLabel from "../layouts/DateLabel";
5 | import ResumeService from "../services/resumeService";
6 | import CoverLetterService from "../services/coverLetterService";
7 | import MessageModal from "../layouts/MessageModal";
8 | import { Container, Grid, Segment, Button, Header } from "semantic-ui-react";
9 |
10 | export default function CoverLetterEdit() {
11 | let { id } = useParams();
12 |
13 | const [resume, setResume] = useState({});
14 | const [coverLetters, setCoverLetters] = useState([]);
15 | const [openDelete, setOpenDelete] = useState(false);
16 | const [openDeleteFromResume, setOpenDeleteFromResume] = useState(false);
17 | const [openAddedToResume, setOpenAddedToResume] = useState(false);
18 |
19 | let resumeService = new ResumeService();
20 | let coverLetterService = new CoverLetterService();
21 |
22 | useEffect(() => {
23 | resumeService.getByCandidateId(id).then((result) => setResume(result.data.data));
24 | coverLetterService.getAllByCandidateId(id).then((result) => setCoverLetters(result.data.data));
25 | }, [coverLetters]);
26 |
27 | const handleModalDelete = (value) => {
28 | setOpenDelete(value)
29 | };
30 |
31 | const handleModalDeleteFromResume = (value) => {
32 | setOpenDeleteFromResume(value)
33 | };
34 |
35 | const handleModalAddedToResume = (value) => {
36 | setOpenAddedToResume(value)
37 | };
38 |
39 | const handleDelete = (coverLetterId) => {
40 | coverLetterService.delete(coverLetterId);
41 | resumeService.update({id: 1});
42 | handleModalDelete(true);
43 | };
44 |
45 | const handleDeleteFromResume = () => {
46 | resumeService.deleteCoverLetterFromResume(resume.id);
47 | handleModalDeleteFromResume(true);
48 | }
49 |
50 | const handleAddedToResume = (coverLetterId) => {
51 | resumeService.addCoverLetterToResume(resume.id, coverLetterId);
52 | handleModalAddedToResume(true);
53 | }
54 |
55 | return (
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 | {coverLetters.length === 0
65 | ?
66 | :
67 |
68 |
69 |
70 | {coverLetters.map((coverLetter) => (
71 |
72 |
73 | {resume.id === coverLetter.resume?.id
74 | ? handleDeleteFromResume()} />
75 | :
76 | handleDelete(coverLetter.id)} />
77 | handleAddedToResume(coverLetter.id)} />
78 | }
79 |
80 | {coverLetter.name}
81 | {coverLetter.content}
82 |
83 |
))}
84 | }
85 |
86 |
87 |
88 |
89 |
90 | handleModalDelete(false)} onOpen={() => handleModalDelete(true)} open={openDelete} content="Deleted !" />
91 | handleModalDeleteFromResume(false)} onOpen={() => handleModalDeleteFromResume(true)} open={openDeleteFromResume} content="Removed from resume !" />
92 | handleModalAddedToResume(false)} onOpen={() => handleModalAddedToResume(true)} open={openAddedToResume} content="Added to resume !" />
93 |
94 |
95 | );
96 | }
97 |
--------------------------------------------------------------------------------
/src/pages/EducationAdd.jsx:
--------------------------------------------------------------------------------
1 | import React, { useState } from "react";
2 | import { useParams } from "react-router";
3 | import { Formik, useFormik } from "formik";
4 | import * as Yup from "yup";
5 | import Headline from "../layouts/Headline";
6 | import DateLabel from "./../layouts/DateLabel";
7 | import EducationService from "./../services/educationService";
8 | import ResumeService from "./../services/resumeService";
9 | import MessageModal from "./../layouts/MessageModal";
10 | import { Container, Grid, Form, Label, Button } from "semantic-ui-react";
11 |
12 | export default function EducationAdd() {
13 | let { id } = useParams();
14 |
15 | const [open, setOpen] = useState(false);
16 |
17 | let educationService = new EducationService();
18 | let resumeService = new ResumeService();
19 |
20 | const initialValues = {
21 | resume: {id: id},
22 | nameOfEducationalInstitution: "",
23 | department: "",
24 | degree: "",
25 | startingDate: "",
26 | graduationDate: "",
27 | };
28 |
29 | const validationSchema = Yup.object({
30 | nameOfEducationalInstitution: Yup.string().required("Required Field"),
31 | department: Yup.string().required("Required Field"),
32 | degree: Yup.string().required("Required Field"),
33 | startingDate: Yup.date().required("Required Field"),
34 | graduationDate: Yup.date(),
35 | });
36 |
37 | const onSubmit = (values, { resetForm }) => {
38 | educationService.add(values);
39 | resumeService.update({id: id});
40 | console.log(values);
41 | handleModal(true);
42 | setTimeout(() => {
43 | resetForm();
44 | }, 100);
45 | };
46 |
47 | const formik = useFormik({
48 | initialValues: initialValues,
49 | validationSchema: validationSchema,
50 | onSubmit: onSubmit,
51 | });
52 |
53 | const handleModal = (value) => {
54 | setOpen(value);
55 | };
56 |
57 | const handleChange = (fieldName, value) => {
58 | formik.setFieldValue(fieldName, value);
59 | };
60 |
61 | return (
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 | handleChange("nameOfEducationalInstitution", data.value)}
78 | value={formik.values.nameOfEducationalInstitution}
79 | />
80 | {formik.errors.nameOfEducationalInstitution && formik.touched.nameOfEducationalInstitution && }
81 | handleChange("department", data.value)}
85 | value={formik.values.department}
86 | />
87 | {formik.errors.department && formik.touched.department && }
88 | handleChange("degree", data.value)}
92 | value={formik.values.degree}
93 | />
94 | {formik.errors.degree && formik.touched.degree && }
95 |
96 | handleChange("startingDate", data.value)}
101 | value={formik.values.startingDate}
102 | />
103 | handleChange("graduationDate", data.value)}
108 | value={formik.values.graduationDate}
109 | />
110 |
111 |
112 |
113 |
114 | {formik.errors.startingDate && formik.touched.startingDate && }
115 |
116 |
117 | {formik.errors.graduationDate && formik.touched.graduationDate && }
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 | handleModal(false)} onOpen={() => handleModal(true)} open={open} content="Added !" />
132 |
133 |
134 | );
135 | }
136 |
--------------------------------------------------------------------------------
/src/pages/EducationDelete.jsx:
--------------------------------------------------------------------------------
1 | import React, { useState, useEffect } from "react";
2 | import { useParams } from "react-router";
3 | import Headline from "../layouts/Headline";
4 | import DateLabel from "../layouts/DateLabel";
5 | import ResumeService from "../services/resumeService";
6 | import EducationService from "../services/educationService";
7 | import MessageModal from "../layouts/MessageModal";
8 | import { Container, Grid, Segment, Button, Header } from "semantic-ui-react";
9 |
10 | export default function EducationDelete() {
11 | let { id } = useParams();
12 |
13 | const [resumes, setResumes] = useState([]);
14 | const [resume, setResume] = useState({});
15 | const [open, setOpen] = useState(false);
16 |
17 | let resumeService = new ResumeService();
18 | let educationService = new EducationService();
19 |
20 | useEffect(() => {
21 | resumeService.getAllResumesDetailsByActivatedCandidate().then((result) => setResumes(result.data.data));
22 | resumeService.getById(id).then((result) => setResume(result.data.data));
23 | }, [resume]);
24 |
25 | const handleModal = (value) => {
26 | setOpen(value)
27 | };
28 |
29 | const handleDelete = (educationId) => {
30 | educationService.delete(educationId);
31 | resumeService.update({id: id});
32 | handleModal(true);
33 | };
34 |
35 | return (
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 | {resumes.map((resume) => (
45 |
46 | {resume.id == id && (
47 |
48 | {resume.educations.length === 0
49 | ?
50 | :
51 |
52 |
53 |
54 | {resume.educations.map((education) => (
55 |
56 | handleDelete(education.id)} />
57 |
58 | {education.nameOfEducationalInstitution}
59 |
60 | {education.degree} ・ {education.department}
61 |
62 |
63 | {new Date(education.startingDate).getFullYear()}
64 | -
65 | {education.graduationDate === "Devam ediyor."
66 | ? "Continues"
67 | : new Date(education.graduationDate).getFullYear()}
68 |
69 |
70 | ))}
71 | }
72 |
73 | )}
74 |
75 | ))}
76 |
77 |
78 |
79 |
80 |
81 | handleModal(false)} onOpen={() => handleModal(true)} open={open} content="Deleted !" />
82 |
83 |
84 | );
85 | }
86 |
--------------------------------------------------------------------------------
/src/pages/EmployerAdd.jsx:
--------------------------------------------------------------------------------
1 | import React, { useState } from "react";
2 | import { Formik, useFormik } from "formik";
3 | import * as Yup from "yup";
4 | import Headline from "./../layouts/Headline";
5 | import AuthService from "./../services/authService";
6 | import DateLabel from "./../layouts/DateLabel";
7 | import MessageModal from "./../layouts/MessageModal";
8 | import { Container, Grid, Label, Form, Button } from "semantic-ui-react";
9 |
10 | export default function EmployerAdd() {
11 | const [open, setOpen] = useState(false);
12 |
13 | let authService = new AuthService();
14 |
15 | const initialValues = {
16 | companyName: "",
17 | phoneNumber: "",
18 | webAddress: "",
19 | email: "",
20 | password: "",
21 | confirmPassword: "",
22 | };
23 |
24 | const validationSchema = Yup.object({
25 | companyName: Yup.string().required("Required Field"),
26 | phoneNumber: Yup.string().required("Required Field"),
27 | webAddress: Yup.string().required("Required Field"),
28 | email: Yup.string().email("Not a Valid Email").required("Required Field"),
29 | password: Yup.string().required("Required Field"),
30 | confirmPassword: Yup.string().required("Required Field"),
31 | });
32 |
33 | const onSubmit = (values, { resetForm }) => {
34 | console.log(values);
35 | authService.registerEmployer(values);
36 | handleModal(true);
37 | setTimeout(() => {
38 | resetForm();
39 | }, 100);
40 | };
41 |
42 | const formik = useFormik({
43 | initialValues: initialValues,
44 | validationSchema: validationSchema,
45 | onSubmit: onSubmit,
46 | });
47 |
48 | const handleModal = (value) => {
49 | setOpen(value);
50 | };
51 |
52 | const handleChange = (fieldName, value) => {
53 | formik.setFieldValue(fieldName, value);
54 | };
55 |
56 | return (
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 | handleChange("companyName", data.value)}
73 | value={formik.values.companyName}
74 | />
75 | {formik.errors.companyName && formik.touched.companyName && }
76 | handleChange("phoneNumber", data.value)}
80 | value={formik.values.phoneNumber}
81 | />
82 | {formik.errors.phoneNumber && formik.touched.phoneNumber && }
83 | handleChange("webAddress", data.value)}
88 | value={formik.values.webAddress}
89 | />
90 | {formik.errors.webAddress && formik.touched.webAddress && }
91 | handleChange("email", data.value)}
96 | value={formik.values.email}
97 | />
98 | {formik.errors.email && formik.touched.email && }
99 | handleChange("password", data.value)}
103 | value={formik.values.password}
104 | />
105 | {formik.errors.password && formik.touched.password && }
106 | handleChange("confirmPassword", data.value)}
110 | value={formik.values.confirmPassword}
111 | />
112 | {formik.errors.confirmPassword && formik.touched.confirmPassword && }
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 | handleModal(false)} onOpen={() => handleModal(true)} open={open} content="An activation e-mail has been sent !" />
124 |
125 |
126 | );
127 | }
128 |
--------------------------------------------------------------------------------
/src/pages/EmployerDetail.jsx:
--------------------------------------------------------------------------------
1 | import React, { useState, useEffect } from "react";
2 | import { NavLink } from "react-router-dom";
3 | import { useParams } from "react-router";
4 | import EmployerService from "./../services/employerService";
5 | import UpdatedEmployerService from "./../services/updatedEmployerService";
6 | import UserActivationService from "./../services/userActivationService";
7 | import Headline from "../layouts/Headline";
8 | import JobPostingList from "./JobPostingList";
9 | import DateLabel from "./../layouts/DateLabel";
10 | import { Container, Header, Grid, Divider, Icon, Button } from "semantic-ui-react";
11 |
12 | export default function EmployerDetail() {
13 | let { id, type } = useParams();
14 |
15 | const [employer, setEmployer] = useState({});
16 | const [updatedEmployers, setUpdatedEmployers] = useState([]);
17 | const [userActivation, setUserActivation] = useState({});
18 |
19 | let employerService = new EmployerService();
20 | let updatedEmployerService = new UpdatedEmployerService();
21 | let userActivationService = new UserActivationService();
22 |
23 | useEffect(() => {
24 | if (type == "employer") {
25 | employerService.getById(id).then((result) => setEmployer(result.data.data));
26 | updatedEmployerService.getAll().then((result) => setUpdatedEmployers(result.data.data));
27 | } else if (type == "updatedEmployer") {
28 | employerService.getOneThatWaitingForUpdateConfirmationById(id).then((result) => setEmployer(result.data.data));
29 | }
30 | userActivationService.getByUserId(id).then((result) => setUserActivation(result.data.data));
31 | }, []);
32 |
33 | return (
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 | {employer.companyName}
52 |
53 |
54 |
55 | {employer.webAddress}
56 |
57 |
58 | {employer.email}
59 |
60 |
61 | {employer.phoneNumber}
62 |
63 | {updatedEmployers.map((updatedEmployer) => (
64 | updatedEmployer.employer.id == id &&
65 |
66 | ))}
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 | );
79 | }
80 |
--------------------------------------------------------------------------------
/src/pages/EmployerList.jsx:
--------------------------------------------------------------------------------
1 | import React, { useState, useEffect } from "react";
2 | import { NavLink } from "react-router-dom";
3 | import EmployerService from "./../services/employerService";
4 | import { Card, Header } from "semantic-ui-react";
5 |
6 | export default function EmployerList() {
7 | const [employers, setEmployers] = useState([]);
8 |
9 | let employerService = new EmployerService();
10 |
11 | useEffect(() => {
12 | employerService.getAllByIsConfirmedAndUserConfirmationTypeIdSortedByCompanyName(true, 1).then((result) => setEmployers(result.data.data));
13 | }, []);
14 |
15 | return (
16 |
17 | {employers.map((employer) => (
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 | ))}
27 |
28 | );
29 | }
30 |
--------------------------------------------------------------------------------
/src/pages/EmployerUpdate.jsx:
--------------------------------------------------------------------------------
1 | import React, { useEffect, useState } from "react";
2 | import { useParams } from "react-router";
3 | import { Formik, useFormik } from "formik";
4 | import * as Yup from "yup";
5 | import Headline from "./../layouts/Headline";
6 | import EmployerService from "../services/employerService";
7 | import DateLabel from "./../layouts/DateLabel";
8 | import MessageModal from "./../layouts/MessageModal";
9 | import { Container, Grid, Label, Form, Button } from "semantic-ui-react";
10 |
11 | export default function EmployerUpdate() {
12 | let { id } = useParams();
13 |
14 | const [employer, setEmployer] = useState({});
15 | const [open, setOpen] = useState(false);
16 |
17 | let employerService = new EmployerService();
18 |
19 | useEffect(() => {
20 | employerService.getById(id).then((result) => setEmployer(result.data.data));
21 | }, []);
22 |
23 | const initialValues = {
24 | id: id,
25 | companyName: employer.companyName,
26 | phoneNumber: employer.phoneNumber,
27 | webAddress: employer.webAddress,
28 | email: employer.email,
29 | password: employer.password,
30 | };
31 |
32 | const validationSchema = Yup.object({
33 | companyName: Yup.string(),
34 | phoneNumber: Yup.string(),
35 | webAddress: Yup.string(),
36 | email: Yup.string().email("Not a Valid Email"),
37 | password: Yup.string(),
38 | });
39 |
40 | const onSubmit = (values) => {
41 | console.log(values);
42 | employerService.update(values);
43 | handleModal(true);
44 | };
45 |
46 | const formik = useFormik({
47 | initialValues: initialValues,
48 | validationSchema: validationSchema,
49 | onSubmit: onSubmit,
50 | });
51 |
52 | const handleModal = (value) => {
53 | setOpen(value);
54 | };
55 |
56 | const handleChange = (fieldName, value) => {
57 | formik.setFieldValue(fieldName, value);
58 | };
59 |
60 | return (
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 | handleChange("companyName", data.value)}
79 | value={formik.values.companyName}
80 | />
81 | {formik.errors.companyName && formik.touched.companyName && }
82 | handleChange("phoneNumber", data.value)}
88 | value={formik.values.phoneNumber}
89 | />
90 | {formik.errors.phoneNumber && formik.touched.phoneNumber && }
91 | handleChange("webAddress", data.value)}
97 | value={formik.values.webAddress}
98 | />
99 | {formik.errors.webAddress && formik.touched.webAddress && }
100 | handleChange("email", data.value)}
106 | value={formik.values.email}
107 | />
108 | {formik.errors.email && formik.touched.email && }
109 | handleChange("password", data.value)}
115 | value={formik.values.password}
116 | />
117 | {formik.errors.password && formik.touched.password && }
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 | handleModal(false)} onOpen={() => handleModal(true)} open={open} content="Waiting for update confirmation !" />
129 |
130 |
131 | );
132 | }
133 |
--------------------------------------------------------------------------------
/src/pages/ExperienceAdd.jsx:
--------------------------------------------------------------------------------
1 | import React, { useEffect, useState } from "react";
2 | import { useParams } from "react-router";
3 | import { Formik, useFormik } from "formik";
4 | import * as Yup from "yup";
5 | import Headline from "../layouts/Headline";
6 | import DateLabel from "./../layouts/DateLabel";
7 | import ExperienceService from "./../services/experienceService";
8 | import JobTitleService from "./../services/jobTitleService";
9 | import ResumeService from "./../services/resumeService";
10 | import MessageModal from "./../layouts/MessageModal";
11 | import { Container, Grid, Form, Label, Button } from "semantic-ui-react";
12 |
13 | export default function ExperienceAdd() {
14 | let { id } = useParams();
15 |
16 | const [jobTitles, setJobTitles] = useState([]);
17 | const [open, setOpen] = useState(false);
18 |
19 | let experienceService = new ExperienceService();
20 | let jobTitleService = new JobTitleService();
21 | let resumeService = new ResumeService();
22 |
23 | useEffect(() => {
24 | jobTitleService.getAll().then((result) => setJobTitles(result.data.data));
25 | }, []);
26 |
27 | const jobTitleOptions = jobTitles.map((jobTitle) => ({
28 | key: jobTitle.id,
29 | text: jobTitle.title,
30 | value: jobTitle,
31 | }));
32 |
33 | const initialValues = {
34 | resume: {id: id},
35 | companyName: "",
36 | jobTitle: "",
37 | startingDate: "",
38 | terminationDate: "",
39 | };
40 |
41 | const validationSchema = Yup.object({
42 | companyName: Yup.string().required("Required Field"),
43 | jobTitle: Yup.object().required("Required Field"),
44 | startingDate: Yup.date().required("Required Field"),
45 | terminationDate: Yup.date("Required Field"),
46 | });
47 |
48 | const onSubmit = (values, { resetForm }) => {
49 | experienceService.add(values);
50 | resumeService.update({id: id});
51 | console.log(values);
52 | handleModal(true);
53 | setTimeout(() => {
54 | resetForm();
55 | }, 100);
56 | };
57 |
58 | const formik = useFormik({
59 | initialValues: initialValues,
60 | validationSchema: validationSchema,
61 | onSubmit: onSubmit,
62 | });
63 |
64 | const handleModal = (value) => {
65 | setOpen(value);
66 | };
67 |
68 | const handleChange = (fieldName, value) => {
69 | formik.setFieldValue(fieldName, value);
70 | };
71 |
72 | return (
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 | handleChange("companyName", data.value)}
89 | value={formik.values.companyName}
90 | />
91 | {formik.errors.companyName && formik.touched.companyName && }
92 | handleChange("jobTitle", data.value)}
97 | value={formik.values.jobTitle}
98 | />
99 | {formik.errors.jobTitle && formik.touched.jobTitle && }
100 |
101 | handleChange("startingDate", data.value)}
106 | value={formik.values.startingDate}
107 | />
108 | handleChange("terminationDate", data.value)}
113 | value={formik.values.terminationDate}
114 | />
115 |
116 |
117 |
118 |
119 | {formik.errors.startingDate && formik.touched.startingDate && }
120 |
121 |
122 | {formik.errors.terminationDate && formik.touched.terminationDate && }
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 | handleModal(false)} onOpen={() => handleModal(true)} open={open} content="Added !" />
137 |
138 |
139 | );
140 | }
141 |
--------------------------------------------------------------------------------
/src/pages/ExperienceDelete.jsx:
--------------------------------------------------------------------------------
1 | import React, { useState, useEffect } from "react";
2 | import { useParams } from "react-router";
3 | import Headline from "../layouts/Headline";
4 | import DateLabel from "../layouts/DateLabel";
5 | import ResumeService from "../services/resumeService";
6 | import ExperienceService from "../services/experienceService";
7 | import MessageModal from "../layouts/MessageModal";
8 | import { Container, Grid, Segment, Button, Header } from "semantic-ui-react";
9 |
10 | export default function ExperienceDeelet() {
11 | let { id } = useParams();
12 |
13 | const [resumes, setResumes] = useState([]);
14 | const [resume, setResume] = useState({});
15 | const [open, setOpen] = useState(false);
16 |
17 | let resumeService = new ResumeService();
18 | let experienceService = new ExperienceService();
19 |
20 | useEffect(() => {
21 | resumeService.getAllResumesDetailsByActivatedCandidate().then((result) => setResumes(result.data.data));
22 | resumeService.getById(id).then((result) => setResume(result.data.data));
23 | }, [resume]);
24 |
25 | const handleModal = (value) => {
26 | setOpen(value)
27 | };
28 |
29 | const handleDelete = (experienceId) => {
30 | experienceService.delete(experienceId);
31 | resumeService.update({id: id});
32 | handleModal(true);
33 | };
34 |
35 | return (
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 | {resumes.map((resume) => (
45 |
46 | {resume.id == id && (
47 |
48 | {resume.experiences.length === 0
49 | ?
50 | :
51 |
52 |
53 |
54 | {resume.experiences.map((experience) => (
55 |
56 | handleDelete(experience.id)} />
57 |
58 | {experience.jobTitle?.title}
59 |
60 | {experience.companyName}
61 |
62 |
63 | {new Date(experience.startingDate).getMonth()}.{new Date(experience.startingDate).getFullYear()}
64 | -
65 | {experience.terminationDate === "Devam ediyor."
66 | ? "Continues"
67 | : new Date(experience.terminationDate).getMonth() + "." + new Date(experience.terminationDate).getFullYear()}
68 |
69 |
70 | ))}
71 | }
72 |
73 | )}
74 |
75 | ))}
76 |
77 |
78 |
79 |
80 |
81 | handleModal(false)} onOpen={() => handleModal(true)} open={open} content="Deleted !" />
82 |
83 |
84 | );
85 | }
86 |
--------------------------------------------------------------------------------
/src/pages/JobPostingDetail.jsx:
--------------------------------------------------------------------------------
1 | import React, { useState, useEffect } from "react";
2 | import { useParams, useHistory } from "react-router";
3 | import JobPostingService from "./../services/jobPostingService";
4 | import FavoriteJobPostingService from "./../services/favoriteJobPostingService";
5 | import Headline from "../layouts/Headline";
6 | import DateLabel from "./../layouts/DateLabel";
7 | import MessageModal from "./../layouts/MessageModal";
8 | import { Container, Header, Grid, Divider, Icon, Label, Button } from "semantic-ui-react";
9 |
10 | export default function JobPostingDetail() {
11 | let { id } = useParams();
12 |
13 | const [jobPosting, setJobPosting] = useState({});
14 | const [open, setOpen] = useState(false);
15 |
16 | const history = useHistory();
17 |
18 | let jobPostingService = new JobPostingService();
19 | let favoriteJobPostingService = new FavoriteJobPostingService();
20 |
21 | useEffect(() => {
22 | jobPostingService.getById(id).then((result) => setJobPosting(result.data.data));
23 | }, []);
24 |
25 | const handleModal = (value) => {
26 | setOpen(value);
27 | };
28 |
29 | const handleMakeActiveOrPassive = (id, isActive) => {
30 | jobPostingService.makeActiveOrPassive(id, isActive);
31 | handleModal(true);
32 | };
33 |
34 | const handleAddToFavorites = (jobPosting) => {
35 | favoriteJobPostingService.add({jobPosting, candidate:{id: 8}}) // TODO: candidateId
36 | };
37 |
38 | return (
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 | handleAddToFavorites(jobPosting)} />
52 | handleMakeActiveOrPassive(jobPosting.id, false)} />
53 |
54 |
55 |
56 |
57 | {jobPosting.jobTitle?.title}
58 |
59 |
60 | {jobPosting.employer?.companyName}
61 |
62 |
63 | {jobPosting.employer?.webAddress}
64 |
65 |
66 | {jobPosting.employer?.email}
67 |
68 |
69 | {jobPosting.employer?.phoneNumber}
70 |
71 |
72 |
73 | {jobPosting.jobDescription}
74 |
75 |
76 |
77 | City
78 |
79 | {jobPosting.city?.city}
80 |
81 |
82 | Working Time
83 |
84 | {jobPosting.workingTime?.time}
85 |
86 |
87 | Working Type
88 |
89 | {jobPosting.workingType?.type}
90 |
91 |
92 | Salary Min
93 |
94 | {jobPosting.salaryMin}
95 |
96 |
97 | Salary Max
98 |
99 | {jobPosting.salaryMax}
100 |
101 |
102 | Number of Open Positions
103 |
104 |
105 | {jobPosting.numberOfOpenPositions}
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 | Closing Date
121 |
122 | {new Date(jobPosting.closingDate).toDateString()}
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 | history.push(`/employers/employer/${jobPosting.employer.id}`)} onOpen={() => handleModal(true)} open={open} content="Made passive !" />
136 |
137 |
138 | );
139 | }
140 |
--------------------------------------------------------------------------------
/src/pages/LanguageLevelAdd.jsx:
--------------------------------------------------------------------------------
1 | import React, { useEffect, useState } from "react";
2 | import { useParams } from "react-router";
3 | import { Formik, useFormik } from "formik";
4 | import * as Yup from "yup";
5 | import Headline from "../layouts/Headline";
6 | import DateLabel from "./../layouts/DateLabel";
7 | import LanguageLevelService from "./../services/languageLevelService";
8 | import LanguageService from "./../services/languageService";
9 | import LevelService from "./../services/levelService";
10 | import ResumeService from "./../services/resumeService";
11 | import MessageModal from "./../layouts/MessageModal";
12 | import { Container, Grid, Form, Label, Button } from "semantic-ui-react";
13 |
14 | export default function LanguageLevelAdd() {
15 | let { id } = useParams();
16 |
17 | const [languages, setLanguages] = useState([]);
18 | const [levels, setLevels] = useState([]);
19 | const [open, setOpen] = useState(false);
20 |
21 | let languageLevelService = new LanguageLevelService();
22 | let languageService = new LanguageService();
23 | let levelService = new LevelService();
24 | let resumeService = new ResumeService();
25 |
26 | useEffect(() => {
27 | languageService.getAll().then((result) => setLanguages(result.data.data));
28 | levelService.getAll().then((result) => setLevels(result.data.data));
29 | }, []);
30 |
31 | const languageOptions = languages.map((language) => ({
32 | key: language.id,
33 | text: language.language,
34 | value: language,
35 | }));
36 |
37 | const levelOptions = levels.map((level) => ({
38 | key: level.id,
39 | text: level.level,
40 | value: level,
41 | }));
42 |
43 | const initialValues = {
44 | resume: {id: id},
45 | language: "",
46 | level: "",
47 | };
48 |
49 | const validationSchema = Yup.object({
50 | language: Yup.object().required("Required Field"),
51 | level: Yup.object().required("Required Field"),
52 | });
53 |
54 | const onSubmit = (values, { resetForm }) => {
55 | languageLevelService.add(values);
56 | resumeService.update({id: id});
57 | console.log(values);
58 | handleModal(true);
59 | setTimeout(() => {
60 | resetForm();
61 | }, 100);
62 | };
63 |
64 | const formik = useFormik({
65 | initialValues: initialValues,
66 | validationSchema: validationSchema,
67 | onSubmit: onSubmit,
68 | });
69 |
70 | const handleModal = (value) => {
71 | setOpen(value);
72 | };
73 |
74 | const handleChange = (fieldName, value) => {
75 | formik.setFieldValue(fieldName, value);
76 | };
77 |
78 | return (
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 | handleChange("language", data.value)}
96 | value={formik.values.language}
97 | />
98 | {formik.errors.language && formik.touched.language && }
99 | handleChange("level", data.value)}
104 | value={formik.values.level}
105 | />
106 | {formik.errors.language && formik.touched.language && }
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 | handleModal(false)} onOpen={() => handleModal(true)} open={open} content="Added !" />
118 |
119 |
120 | );
121 | }
122 |
--------------------------------------------------------------------------------
/src/pages/LanguageLevelDelete.jsx:
--------------------------------------------------------------------------------
1 | import React, { useState, useEffect } from "react";
2 | import { useParams } from "react-router";
3 | import Headline from "../layouts/Headline";
4 | import DateLabel from "../layouts/DateLabel";
5 | import ResumeService from "../services/resumeService";
6 | import LanguageLevelService from "../services/languageLevelService";
7 | import MessageModal from "../layouts/MessageModal";
8 | import LanguageLevelIcons from "./../layouts/LanguageLevelIcons";
9 | import { Container, Grid, Segment, Button, Header } from "semantic-ui-react";
10 |
11 | export default function LanguageLevelDelete() {
12 | let { id } = useParams();
13 |
14 | const [resumes, setResumes] = useState([]);
15 | const [resume, setResume] = useState({});
16 | const [open, setOpen] = useState(false);
17 |
18 | let resumeService = new ResumeService();
19 | let languageLevelService = new LanguageLevelService();
20 |
21 | useEffect(() => {
22 | resumeService.getAllResumesDetailsByActivatedCandidate().then((result) => setResumes(result.data.data));
23 | resumeService.getById(id).then((result) => setResume(result.data.data));
24 | }, [resume]);
25 |
26 | const handleModal = (value) => {
27 | setOpen(value)
28 | };
29 |
30 | const handleDelete = (languageLevelId) => {
31 | languageLevelService.delete(languageLevelId);
32 | resumeService.update({id: id});
33 | handleModal(true);
34 | };
35 |
36 | return (
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 | {resumes.map((resume) => (
46 |
47 | {resume.id == id && (
48 |
49 | {resume.languageLevels.length === 0
50 | ?
51 | :
52 |
53 |
54 |
55 | {resume.languageLevels.map((languageLevel) => (
56 |
57 | handleDelete(languageLevel.id)} />
58 |
59 |
60 |
61 | {languageLevel.language?.language}
62 |
63 |
64 | ))}
65 | }
66 |
67 | )}
68 |
69 | ))}
70 |
71 |
72 |
73 |
74 |
75 | handleModal(false)} onOpen={() => handleModal(true)} open={open} content="Deleted !" />
76 |
77 |
78 | );
79 | }
80 |
--------------------------------------------------------------------------------
/src/pages/LinkAdd.jsx:
--------------------------------------------------------------------------------
1 | import React, { useEffect, useState } from "react";
2 | import { useParams } from "react-router";
3 | import { Formik, useFormik } from "formik";
4 | import * as Yup from "yup";
5 | import Headline from "../layouts/Headline";
6 | import DateLabel from "./../layouts/DateLabel";
7 | import LinkService from "./../services/linkService";
8 | import LinkNameService from "./../services/linkNameService";
9 | import ResumeService from "./../services/resumeService";
10 | import MessageModal from "./../layouts/MessageModal";
11 | import { Container, Grid, Form, Label, Button } from "semantic-ui-react";
12 |
13 | export default function LinkAdd() {
14 | let { id } = useParams();
15 |
16 | const [linkNames, setLinkNames] = useState([]);
17 | const [open, setOpen] = useState(false);
18 |
19 | let linkService = new LinkService();
20 | let linkNameService = new LinkNameService();
21 | let resumeService = new ResumeService();
22 |
23 | useEffect(() => {
24 | linkNameService.getAll().then((result) => setLinkNames(result.data.data));
25 | }, []);
26 |
27 | const linkNameOptions = linkNames.map((linkName) => ({
28 | key: linkName.id,
29 | text: linkName.name,
30 | value: linkName,
31 | }));
32 |
33 | const initialValues = {
34 | resume: {id: id},
35 | linkName: "",
36 | url: "",
37 | };
38 |
39 | const validationSchema = Yup.object({
40 | linkName: Yup.object().required("Required Field"),
41 | url: Yup.string().required("Required Field"),
42 | });
43 |
44 | const onSubmit = (values, { resetForm }) => {
45 | linkService.add(values);
46 | resumeService.update({id: id});
47 | console.log(values);
48 | handleModal(true);
49 | setTimeout(() => {
50 | resetForm();
51 | }, 100);
52 | };
53 |
54 | const formik = useFormik({
55 | initialValues: initialValues,
56 | validationSchema: validationSchema,
57 | onSubmit: onSubmit,
58 | });
59 |
60 | const handleModal = (value) => {
61 | setOpen(value);
62 | };
63 |
64 | const handleChange = (fieldName, value) => {
65 | formik.setFieldValue(fieldName, value);
66 | };
67 |
68 | return (
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 | handleChange("linkName", data.value)}
86 | value={formik.values.linkName}
87 | />
88 | {formik.errors.linkName && formik.touched.linkName && }
89 | handleChange("url", data.value)}
93 | value={formik.values.url}
94 | />
95 | {formik.errors.url && formik.touched.url && }
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 | handleModal(false)} onOpen={() => handleModal(true)} open={open} content="Added !" />
107 |
108 |
109 | );
110 | }
111 |
--------------------------------------------------------------------------------
/src/pages/LinkDelete.jsx:
--------------------------------------------------------------------------------
1 | import React, { useState, useEffect } from "react";
2 | import { useParams } from "react-router";
3 | import Headline from "../layouts/Headline";
4 | import DateLabel from "../layouts/DateLabel";
5 | import ResumeService from "../services/resumeService";
6 | import LinkService from "../services/linkService";
7 | import GithubButton from "../layouts/GithubButton";
8 | import LinkedinButton from "../layouts/LinkedinButton";
9 | import MessageModal from "../layouts/MessageModal";
10 | import { Container, Grid, Segment, Button, Header } from "semantic-ui-react";
11 |
12 | export default function LinkDelete() {
13 | let { id } = useParams();
14 |
15 | const [resumes, setResumes] = useState([]);
16 | const [resume, setResume] = useState({});
17 | const [open, setOpen] = useState(false);
18 |
19 | let resumeService = new ResumeService();
20 | let linkService = new LinkService();
21 |
22 | useEffect(() => {
23 | resumeService.getAllResumesDetailsByActivatedCandidate().then((result) => setResumes(result.data.data));
24 | resumeService.getById(id).then((result) => setResume(result.data.data));
25 | }, [resume]);
26 |
27 | const handleModal = (value) => {
28 | setOpen(value)
29 | };
30 |
31 | const handleDelete = (linkId) => {
32 | linkService.delete(linkId);
33 | resumeService.update({id: id});
34 | handleModal(true);
35 | };
36 |
37 | return (
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 | {resumes.map((resume) => (
47 |
48 | {resume.id == id && (
49 |
50 | {resume.links.length === 0
51 | ?
52 | :
53 |
54 |
55 |
56 | {(resume.links.map((link) =>
57 | (link.linkName?.id === 1
58 | ?
59 | handleDelete(link.id)} />
60 |
61 | {link.url}
62 |
63 |
64 | :
65 | handleDelete(link.id)} />
66 |
67 | {link.url}
68 |
69 | )))}
70 | }
71 |
72 | )}
73 |
74 | ))}
75 |
76 |
77 |
78 |
79 |
80 | handleModal(false)} onOpen={() => handleModal(true)} open={open} content="Deleted !" />
81 |
82 |
83 | );
84 | }
85 |
--------------------------------------------------------------------------------
/src/pages/ResumeDetailsEdit.jsx:
--------------------------------------------------------------------------------
1 | import React, { useState, useEffect } from "react";
2 | import { useParams } from "react-router";
3 | import Headline from "../layouts/Headline";
4 | import ResumeService from "../services/resumeService";
5 | import ButtonsOfEdit from "../layouts/ButtonsOfEdit";
6 | import { Container, Grid } from "semantic-ui-react";
7 |
8 | export default function ResumeDetailsEdit() {
9 | let { id } = useParams();
10 |
11 | const [resume, setResume] = useState({});
12 |
13 | let resumeService = new ResumeService();
14 |
15 | useEffect(() => {
16 | resumeService.getById(id).then((result) => setResume(result.data.data));
17 | }, []);
18 |
19 | return (
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
35 |
42 |
49 |
56 |
63 |
70 |
71 |
72 |
73 |
74 |
75 |
76 | );
77 | }
78 |
--------------------------------------------------------------------------------
/src/pages/SkillAdd.jsx:
--------------------------------------------------------------------------------
1 | import React, { useState } from "react";
2 | import { useParams } from "react-router";
3 | import { Formik, useFormik } from "formik";
4 | import * as Yup from "yup";
5 | import Headline from "../layouts/Headline";
6 | import DateLabel from "./../layouts/DateLabel";
7 | import SkillService from "./../services/skillService";
8 | import ResumeService from "./../services/resumeService";
9 | import MessageModal from "./../layouts/MessageModal";
10 | import { Container, Grid, Form, Label, Button } from "semantic-ui-react";
11 |
12 | export default function SkillAdd() {
13 | let { id } = useParams();
14 |
15 | const [open, setOpen] = useState(false);
16 |
17 | let skillService = new SkillService();
18 | let resumeService = new ResumeService();
19 |
20 | const initialValues = {
21 | resume: {id: id},
22 | skill: "",
23 | };
24 |
25 | const validationSchema = Yup.object({
26 | skill: Yup.string().required("Required Field"),
27 | });
28 |
29 | const onSubmit = (values, { resetForm }) => {
30 | skillService.add(values);
31 | resumeService.update({id: id});
32 | console.log(values);
33 | handleModal(true);
34 | setTimeout(() => {
35 | resetForm();
36 | }, 100);
37 | };
38 |
39 | const formik = useFormik({
40 | initialValues: initialValues,
41 | validationSchema: validationSchema,
42 | onSubmit: onSubmit,
43 | });
44 |
45 | const handleModal = (value) => {
46 | setOpen(value);
47 | };
48 |
49 | const handleChange = (fieldName, value) => {
50 | formik.setFieldValue(fieldName, value);
51 | };
52 |
53 | return (
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 | handleChange("skill", data.value)}
70 | value={formik.values.skill}
71 | />
72 | {formik.errors.skill && formik.touched.skill && }
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 | handleModal(false)} onOpen={() => handleModal(true)} open={open} content="Added !" />
84 |
85 |
86 | );
87 | }
88 |
--------------------------------------------------------------------------------
/src/pages/SkillDelete.jsx:
--------------------------------------------------------------------------------
1 | import React, { useState, useEffect } from "react";
2 | import { useParams } from "react-router";
3 | import Headline from "../layouts/Headline";
4 | import DateLabel from "../layouts/DateLabel";
5 | import ResumeService from "../services/resumeService";
6 | import SkillService from "../services/skillService";
7 | import MessageModal from "../layouts/MessageModal";
8 | import { Container, Grid, Segment, Button, Header } from "semantic-ui-react";
9 |
10 | export default function SkillDelete() {
11 | let { id } = useParams();
12 |
13 | const [resumes, setResumes] = useState([]);
14 | const [resume, setResume] = useState({});
15 | const [open, setOpen] = useState(false);
16 |
17 | let resumeService = new ResumeService();
18 | let skillService = new SkillService();
19 |
20 | useEffect(() => {
21 | resumeService.getAllResumesDetailsByActivatedCandidate().then((result) => setResumes(result.data.data));
22 | resumeService.getById(id).then((result) => setResume(result.data.data));
23 | }, [resume]);
24 |
25 | const handleModal = (value) => {
26 | setOpen(value)
27 | };
28 |
29 | const handleDelete = (skillId) => {
30 | skillService.delete(skillId);
31 | resumeService.update({id: id});
32 | handleModal(true);
33 | };
34 |
35 | return (
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 | {resumes.map((resume) => (
45 |
46 | {resume.id == id && (
47 |
48 | {resume.skills.length === 0
49 | ?
50 | :
51 |
52 |
53 |
54 | {resume.skills.map((skill) => (
55 |
56 | handleDelete(skill.id)} />
57 |
58 | ・ {skill.skill}
59 |
60 |
61 | ))}
62 | }
63 |
64 | )}
65 |
66 | ))}
67 |
68 |
69 |
70 |
71 |
72 | handleModal(false)} onOpen={() => handleModal(true)} open={open} content="Deleted !" />
73 |
74 |
75 | );
76 | }
77 |
--------------------------------------------------------------------------------
/src/pages/adminPages/AppDetailsEdit.jsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import Headline from "./../../layouts/Headline";
3 | import ButtonsOfEdit from "./../../layouts/ButtonsOfEdit";
4 | import { Container, Grid } from "semantic-ui-react";
5 |
6 | export default function AppDetailsEdit() {
7 | return (
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
23 |
30 |
37 |
44 |
51 |
58 |
65 |
66 |
67 |
68 |
69 |
70 |
71 | );
72 | }
73 |
--------------------------------------------------------------------------------
/src/pages/adminPages/CityAdd.jsx:
--------------------------------------------------------------------------------
1 | import React, { useState } from "react";
2 | import { Formik, useFormik } from "formik";
3 | import * as Yup from "yup";
4 | import Headline from "./../../layouts/Headline";
5 | import CityService from "../../services/cityService";
6 | import DateLabel from "./../../layouts/DateLabel";
7 | import MessageModal from "./../../layouts/MessageModal";
8 | import { Container, Grid, Label, Form, Button } from "semantic-ui-react";
9 |
10 | export default function CityAdd() {
11 | const [open, setOpen] = useState(false);
12 |
13 | let cityService = new CityService();
14 |
15 | const initialValues = {
16 | city: "",
17 | };
18 |
19 | const validationSchema = Yup.object({
20 | city: Yup.string().required("Required Field"),
21 | });
22 |
23 | const onSubmit = (values, { resetForm }) => {
24 | console.log(values);
25 | cityService.add(values);
26 | handleModal(true);
27 | setTimeout(() => {
28 | resetForm();
29 | }, 100);
30 | };
31 |
32 | const formik = useFormik({
33 | initialValues: initialValues,
34 | validationSchema: validationSchema,
35 | onSubmit: onSubmit,
36 | });
37 |
38 | const handleModal = (value) => {
39 | setOpen(value);
40 | };
41 |
42 | const handleChange = (fieldName, value) => {
43 | formik.setFieldValue(fieldName, value);
44 | };
45 |
46 | return (
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 | handleChange("city", data.value)}
63 | value={formik.values.city}
64 | />
65 | {formik.errors.city && formik.touched.city && }
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 | handleModal(false)} onOpen={() => handleModal(true)} open={open} content="Added !" />
77 |
78 |
79 | );
80 | }
81 |
--------------------------------------------------------------------------------
/src/pages/adminPages/CityUpdate.jsx:
--------------------------------------------------------------------------------
1 | import React, { useEffect, useState } from "react";
2 | import { Formik, useFormik } from "formik";
3 | import * as Yup from "yup";
4 | import Headline from "./../../layouts/Headline";
5 | import CityService from "../../services/cityService";
6 | import DateLabel from "./../../layouts/DateLabel";
7 | import MessageModal from "./../../layouts/MessageModal";
8 | import { Container, Grid, Label, Form, Button } from "semantic-ui-react";
9 |
10 | export default function CityUpdate() {
11 | const [cities, setCities] = useState([]);
12 | const [open, setOpen] = useState(false);
13 |
14 | let cityService = new CityService();
15 |
16 | useEffect(() => {
17 | cityService.getAll().then((result) => setCities(result.data.data));
18 | }, []);
19 |
20 | const cityOptions = cities.map((city) => ({
21 | key: city.id,
22 | text: city.city,
23 | value: city.id,
24 | }));
25 |
26 | const initialValues = {
27 | id: "",
28 | city: "",
29 | };
30 |
31 | const validationSchema = Yup.object({
32 | id: Yup.number().required("Required Field"),
33 | city: Yup.string().required("Required Field"),
34 | });
35 |
36 | const onSubmit = (values) => {
37 | console.log(values);
38 | cityService.update(values);
39 | handleModal(true);
40 | };
41 |
42 | const formik = useFormik({
43 | initialValues: initialValues,
44 | validationSchema: validationSchema,
45 | onSubmit: onSubmit,
46 | });
47 |
48 | const handleModal = (value) => {
49 | setOpen(value);
50 | };
51 |
52 | const handleChange = (fieldName, value) => {
53 | formik.setFieldValue(fieldName, value);
54 | };
55 |
56 | return (
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 | handleChange("id", data.value)}
74 | value={formik.values.id}
75 | />
76 | {formik.errors.id && formik.touched.id && }
77 | handleChange("city", data.value)}
81 | value={formik.values.city}
82 | />
83 | {formik.errors.city && formik.touched.city && }
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 | handleModal(false)} onOpen={() => handleModal(true)} open={open} content="Updated !" />
95 |
96 |
97 | );
98 | }
99 |
--------------------------------------------------------------------------------
/src/pages/adminPages/CompanyStaffAdd.jsx:
--------------------------------------------------------------------------------
1 | import React, { useEffect, useState } from "react";
2 | import { Formik, useFormik } from "formik";
3 | import * as Yup from "yup";
4 | import Headline from "./../../layouts/Headline";
5 | import AuthService from "./../../services/authService";
6 | import DateLabel from "./../../layouts/DateLabel";
7 | import MessageModal from "./../../layouts/MessageModal";
8 | import { Container, Grid, Label, Form, Button } from "semantic-ui-react";
9 |
10 | export default function CompanyStaffAdd() {
11 | const [open, setOpen] = useState(false);
12 |
13 | let authService = new AuthService();
14 |
15 | const initialValues = {
16 | firstName: "",
17 | lastName: "",
18 | email: "",
19 | password: "",
20 | };
21 |
22 | const validationSchema = Yup.object({
23 | firstName: Yup.string().required("Required Field"),
24 | lastName: Yup.string().required("Required Field"),
25 | email: Yup.string().email("Not a Valid Email").required("Required Field"),
26 | password: Yup.string().required("Required Field"),
27 | });
28 |
29 | const onSubmit = (values, { resetForm }) => {
30 | console.log(values);
31 | authService.registerCompanyStaff(values);
32 | handleModal(true);
33 | setTimeout(() => {
34 | resetForm();
35 | }, 100);
36 | };
37 |
38 | const formik = useFormik({
39 | initialValues: initialValues,
40 | validationSchema: validationSchema,
41 | onSubmit: onSubmit,
42 | });
43 |
44 | const handleModal = (value) => {
45 | setOpen(value);
46 | };
47 |
48 | const handleChange = (fieldName, value) => {
49 | formik.setFieldValue(fieldName, value);
50 | };
51 |
52 | return (
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 | handleChange("firstName", data.value)}
69 | value={formik.values.firstName}
70 | />
71 | {formik.errors.firstName && formik.touched.firstName && }
72 | handleChange("lastName", data.value)}
76 | value={formik.values.lastName}
77 | />
78 | {formik.errors.firstName && formik.touched.firstName && }
79 | handleChange("email", data.value)}
84 | value={formik.values.email}
85 | />
86 | {formik.errors.email && formik.touched.email && }
87 | handleChange("password", data.value)}
91 | value={formik.values.password}
92 | />
93 | {formik.errors.password && formik.touched.password && }
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 | handleModal(false)} onOpen={() => handleModal(true)} open={open} content="Signed up !" />
105 |
106 |
107 | );
108 | }
109 |
--------------------------------------------------------------------------------
/src/pages/adminPages/CompanyStaffUpdate.jsx:
--------------------------------------------------------------------------------
1 | import React, { useEffect, useState } from "react";
2 | import { useParams } from "react-router";
3 | import { Formik, useFormik } from "formik";
4 | import * as Yup from "yup";
5 | import Headline from "./../../layouts/Headline";
6 | import CompanyStaffService from "./../../services/companyStaffService";
7 | import DateLabel from "./../../layouts/DateLabel";
8 | import MessageModal from "./../../layouts/MessageModal";
9 | import { Container, Grid, Label, Form, Button } from "semantic-ui-react";
10 |
11 | export default function CompanyStaffUpdate() {
12 | let { id } = useParams();
13 |
14 | const [companyStaff, setCompanyStaff] = useState({});
15 | const [open, setOpen] = useState(false);
16 |
17 | let companyStaffService = new CompanyStaffService();
18 |
19 | useEffect(() => {
20 | companyStaffService.getById(id).then((result) => setCompanyStaff(result.data.data));
21 | }, []);
22 |
23 | const initialValues = {
24 | id: id,
25 | firstName: companyStaff.firstName,
26 | lastName: companyStaff.lastName,
27 | email: companyStaff.email,
28 | password: companyStaff.password,
29 | };
30 |
31 | const validationSchema = Yup.object({
32 | firstName: Yup.string(),
33 | lastName: Yup.string(),
34 | email: Yup.string().email("Not a Valid Email"),
35 | password: Yup.string(),
36 | });
37 |
38 | const onSubmit = (values) => {
39 | console.log(values);
40 | companyStaffService.update(values);
41 | handleModal(true);
42 | };
43 |
44 | const formik = useFormik({
45 | initialValues: initialValues,
46 | validationSchema: validationSchema,
47 | onSubmit: onSubmit,
48 | });
49 |
50 | const handleModal = (value) => {
51 | setOpen(value);
52 | };
53 |
54 | const handleChange = (fieldName, value) => {
55 | formik.setFieldValue(fieldName, value);
56 | };
57 |
58 | return (
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 | handleChange("firstName", data.value)}
77 | value={formik.values.firstName}
78 | />
79 | {formik.errors.firstName && formik.touched.firstName && }
80 | handleChange("lastName", data.value)}
86 | value={formik.values.lastName}
87 | />
88 | {formik.errors.firstName && formik.touched.firstName && }
89 | handleChange("email", data.value)}
95 | value={formik.values.email}
96 | />
97 | {formik.errors.email && formik.touched.email && }
98 | handleChange("password", data.value)}
104 | value={formik.values.password}
105 | />
106 | {formik.errors.password && formik.touched.password && }
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 | handleModal(false)} onOpen={() => handleModal(true)} open={open} content="Updated !" />
118 |
119 |
120 | );
121 | }
122 |
--------------------------------------------------------------------------------
/src/pages/adminPages/CompanyStaffUpdateButton.jsx:
--------------------------------------------------------------------------------
1 | import React, { useEffect, useState } from "react";
2 | import { NavLink } from "react-router-dom";
3 | import CompanyStaffService from "./../../services/companyStaffService";
4 | import { Button, Header } from "semantic-ui-react";
5 |
6 | export default function CompanyStaffUpdateButton({ id }) {
7 | const [companyStaff, setCompanyStaff] = useState({});
8 |
9 | let companyStaffService = new CompanyStaffService();
10 |
11 | useEffect(() => {
12 | companyStaffService.getById(id).then((result) => setCompanyStaff(result.data.data));
13 | }, []);
14 |
15 | return (
16 |
17 |
26 |
32 |
33 |
34 |
35 |
36 |
37 | );
38 | }
39 |
--------------------------------------------------------------------------------
/src/pages/adminPages/Confirm.jsx:
--------------------------------------------------------------------------------
1 | import React, { useState, useEffect } from "react";
2 | import { useParams } from "react-router";
3 | import Headline from "./../../layouts/Headline";
4 | import EmployerService from "./../../services/employerService";
5 | import JobPostingService from "./../../services/jobPostingService";
6 | import MessageModal from "./../../layouts/MessageModal";
7 | import CardOfConfirm from "../../layouts/adminLayouts/CardOfConfirm";
8 | import { Container, Grid, Header, Segment } from "semantic-ui-react";
9 |
10 | export default function Confirm() {
11 | let { id } = useParams();
12 |
13 | const [employersWaitingForAccountConfirmation, setEmployersWaitingForAccountConfirmation] = useState([]);
14 | const [employersWaitingForUpdateConfirmation, setEmployersWaitingForUpdateConfirmation] = useState([]);
15 | const [jobPostingsWaitingForPostingConfirmation, setJobPostingsWaitingForPostingConfirmation] = useState([]);
16 | const [openConfirmed, setOpenConfirmed] = useState(false);
17 | const [openUnconfirmed, setOpenUnconfirmed] = useState(false);
18 |
19 | let employerService = new EmployerService();
20 | let jobPostingService = new JobPostingService();
21 |
22 | useEffect(() => {
23 | employerService.getAllOnesThatWaitingForAccountConfirmation().then((result) => setEmployersWaitingForAccountConfirmation(result.data.data));
24 | employerService.getAllOnesThatWaitingForUpdateConfirmation().then((result) => setEmployersWaitingForUpdateConfirmation(result.data.data));
25 | jobPostingService.getAllOnesThatWaitingForPostingConfirmation().then((result) => setJobPostingsWaitingForPostingConfirmation(result.data.data));
26 | }, []);
27 |
28 | const handleModalConfirmed = (value) => {
29 | setOpenConfirmed(value)
30 | if (value === false) {
31 | window.location.reload();
32 | }
33 | };
34 |
35 | const handleModalUnconfirmed = (value) => {
36 | setOpenUnconfirmed(value)
37 | if (value === false) {
38 | window.location.reload();
39 | }
40 | };
41 |
42 | const handleEmployerConfirmation = (employerId, isConfirmed, userConfirmationTypeId) => {
43 | employerService.confirm(id, employerId, isConfirmed, userConfirmationTypeId);
44 | if (isConfirmed) {
45 | handleModalConfirmed(true);
46 | } else {
47 | handleModalUnconfirmed(true);
48 | }
49 | };
50 |
51 | const handleJobPostingConfirmation = (isConfirmed, jobPostingConfirmationTypeId, jobPostingId) => {
52 | jobPostingService.confirm(id, isConfirmed, jobPostingConfirmationTypeId, jobPostingId);
53 | if (isConfirmed) {
54 | handleModalConfirmed(true);
55 | } else {
56 | handleModalUnconfirmed(true);
57 | }
58 | };
59 |
60 | return (
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 | {employersWaitingForAccountConfirmation.map((employer) => (
71 | handleEmployerConfirmation(employer.id, true, 1)}
74 | unconfirm={() => handleEmployerConfirmation(employer.id, false, 1)}
75 | view={`/employers/employer/${employer.id}`}
76 | />))}
77 |
78 |
79 |
80 |
81 | {employersWaitingForUpdateConfirmation.map((employer) => (
82 | handleEmployerConfirmation(employer.id, true, 2)}
85 | unconfirm={() => handleEmployerConfirmation(employer.id, false, 2)}
86 | view={`/employers/updatedEmployer/${employer.id}`}
87 | />))}
88 |
89 |
90 |
91 |
92 | {jobPostingsWaitingForPostingConfirmation.map((jobPosting) => (
93 | handleJobPostingConfirmation(true, 1, jobPosting.id)}
96 | unconfirm={() => handleJobPostingConfirmation(false, 1, jobPosting.id)}
97 | view={`/jobPostings/jobPosting/${jobPosting.id}`}
98 | />))}
99 |
100 |
101 |
102 |
103 | handleModalConfirmed(false)} onOpen={() => handleModalConfirmed(true)} open={openConfirmed} content="Confirmed !" />
104 | handleModalUnconfirmed(false)} onOpen={() => handleModalUnconfirmed(true)} open={openUnconfirmed} content="Unconfirmed !" />
105 |
106 |
107 | );
108 | }
109 |
--------------------------------------------------------------------------------
/src/pages/adminPages/JobTitleAdd.jsx:
--------------------------------------------------------------------------------
1 | import React, { useState } from "react";
2 | import { Formik, useFormik } from "formik";
3 | import * as Yup from "yup";
4 | import Headline from "./../../layouts/Headline";
5 | import JobTitleService from "../../services/jobTitleService";
6 | import DateLabel from "./../../layouts/DateLabel";
7 | import MessageModal from "./../../layouts/MessageModal";
8 | import { Container, Grid, Label, Form, Button } from "semantic-ui-react";
9 |
10 | export default function JobTitleAdd() {
11 | const [open, setOpen] = useState(false);
12 |
13 | let jobTitleService = new JobTitleService();
14 |
15 | const initialValues = {
16 | title: "",
17 | };
18 |
19 | const validationSchema = Yup.object({
20 | title: Yup.string().required("Required Field"),
21 | });
22 |
23 | const onSubmit = (values, { resetForm }) => {
24 | console.log(values);
25 | jobTitleService.add(values);
26 | handleModal(true);
27 | setTimeout(() => {
28 | resetForm();
29 | }, 100);
30 | };
31 |
32 | const formik = useFormik({
33 | initialValues: initialValues,
34 | validationSchema: validationSchema,
35 | onSubmit: onSubmit,
36 | });
37 |
38 | const handleModal = (value) => {
39 | setOpen(value);
40 | };
41 |
42 | const handleChange = (fieldName, value) => {
43 | formik.setFieldValue(fieldName, value);
44 | };
45 |
46 | return (
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 | handleChange("title", data.value)}
63 | value={formik.values.title}
64 | />
65 | {formik.errors.title && formik.touched.title && }
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 | handleModal(false)} onOpen={() => handleModal(true)} open={open} content="Added !" />
77 |
78 |
79 | );
80 | }
81 |
--------------------------------------------------------------------------------
/src/pages/adminPages/JobTitleUpdate.jsx:
--------------------------------------------------------------------------------
1 | import React, { useEffect, useState } from "react";
2 | import { Formik, useFormik } from "formik";
3 | import * as Yup from "yup";
4 | import Headline from "./../../layouts/Headline";
5 | import JobTitleService from "../../services/jobTitleService";
6 | import DateLabel from "./../../layouts/DateLabel";
7 | import MessageModal from "./../../layouts/MessageModal";
8 | import { Container, Grid, Label, Form, Button } from "semantic-ui-react";
9 |
10 | export default function JobTitleUpdate() {
11 | const [jobTitles, setJobTitles] = useState([]);
12 | const [open, setOpen] = useState(false);
13 |
14 | let jobTitleService = new JobTitleService();
15 |
16 | useEffect(() => {
17 | jobTitleService.getAll().then((result) => setJobTitles(result.data.data));
18 | }, []);
19 |
20 | const jobTitleOptions = jobTitles.map((jobTitle) => ({
21 | key: jobTitle.id,
22 | text: jobTitle.title,
23 | value: jobTitle.id,
24 | }));
25 |
26 | const initialValues = {
27 | id: "",
28 | title: "",
29 | };
30 |
31 | const validationSchema = Yup.object({
32 | id: Yup.number().required("Required Field"),
33 | title: Yup.string().required("Required Field"),
34 | });
35 |
36 | const onSubmit = (values) => {
37 | console.log(values);
38 | jobTitleService.update(values);
39 | handleModal(true);
40 | };
41 |
42 | const formik = useFormik({
43 | initialValues: initialValues,
44 | validationSchema: validationSchema,
45 | onSubmit: onSubmit,
46 | });
47 |
48 | const handleModal = (value) => {
49 | setOpen(value);
50 | };
51 |
52 | const handleChange = (fieldName, value) => {
53 | formik.setFieldValue(fieldName, value);
54 | };
55 |
56 | return (
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 | handleChange("id", data.value)}
74 | value={formik.values.id}
75 | />
76 | {formik.errors.id && formik.touched.id && }
77 | handleChange("title", data.value)}
81 | value={formik.values.title}
82 | />
83 | {formik.errors.title && formik.touched.title && }
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 | handleModal(false)} onOpen={() => handleModal(true)} open={open} content="Updated !" />
95 |
96 |
97 | );
98 | }
99 |
--------------------------------------------------------------------------------
/src/pages/adminPages/LanguageAdd.jsx:
--------------------------------------------------------------------------------
1 | import React, { useState } from "react";
2 | import { Formik, useFormik } from "formik";
3 | import * as Yup from "yup";
4 | import Headline from "./../../layouts/Headline";
5 | import LanguageService from "../../services/languageService";
6 | import DateLabel from "./../../layouts/DateLabel";
7 | import MessageModal from "./../../layouts/MessageModal";
8 | import { Container, Grid, Label, Form, Button } from "semantic-ui-react";
9 |
10 | export default function LanguageAdd() {
11 | const [open, setOpen] = useState(false);
12 |
13 | let languageService = new LanguageService();
14 |
15 | const initialValues = {
16 | language: "",
17 | };
18 |
19 | const validationSchema = Yup.object({
20 | language: Yup.string().required("Required Field"),
21 | });
22 |
23 | const onSubmit = (values, { resetForm }) => {
24 | console.log(values);
25 | languageService.add(values);
26 | handleModal(true);
27 | setTimeout(() => {
28 | resetForm();
29 | }, 100);
30 | };
31 |
32 | const formik = useFormik({
33 | initialValues: initialValues,
34 | validationSchema: validationSchema,
35 | onSubmit: onSubmit,
36 | });
37 |
38 | const handleModal = (value) => {
39 | setOpen(value);
40 | };
41 |
42 | const handleChange = (fieldName, value) => {
43 | formik.setFieldValue(fieldName, value);
44 | };
45 |
46 | return (
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 | handleChange("language", data.value)}
63 | value={formik.values.language}
64 | />
65 | {formik.errors.language && formik.touched.language && }
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 | handleModal(false)} onOpen={() => handleModal(true)} open={open} content="Added !" />
77 |
78 |
79 | );
80 | }
81 |
--------------------------------------------------------------------------------
/src/pages/adminPages/LanguageUpdate.jsx:
--------------------------------------------------------------------------------
1 | import React, { useEffect, useState } from "react";
2 | import { Formik, useFormik } from "formik";
3 | import * as Yup from "yup";
4 | import Headline from "./../../layouts/Headline";
5 | import LanguageService from "../../services/languageService";
6 | import DateLabel from "./../../layouts/DateLabel";
7 | import MessageModal from "./../../layouts/MessageModal";
8 | import { Container, Grid, Label, Form, Button } from "semantic-ui-react";
9 |
10 | export default function LanguageUpdate() {
11 | const [languages, setLanguages] = useState([]);
12 | const [open, setOpen] = useState(false);
13 |
14 | let languageService = new LanguageService();
15 |
16 | useEffect(() => {
17 | languageService.getAll().then((result) => setLanguages(result.data.data));
18 | }, []);
19 |
20 | const languageOptions = languages.map((language) => ({
21 | key: language.id,
22 | text: language.language,
23 | value: language.id,
24 | }));
25 |
26 | const initialValues = {
27 | id: "",
28 | language: "",
29 | };
30 |
31 | const validationSchema = Yup.object({
32 | id: Yup.number().required("Required Field"),
33 | language: Yup.string().required("Required Field"),
34 | });
35 |
36 | const onSubmit = (values) => {
37 | console.log(values);
38 | languageService.update(values);
39 | handleModal(true);
40 | };
41 |
42 | const formik = useFormik({
43 | initialValues: initialValues,
44 | validationSchema: validationSchema,
45 | onSubmit: onSubmit,
46 | });
47 |
48 | const handleModal = (value) => {
49 | setOpen(value);
50 | };
51 |
52 | const handleChange = (fieldName, value) => {
53 | formik.setFieldValue(fieldName, value);
54 | };
55 |
56 | return (
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 | handleChange("id", data.value)}
73 | value={formik.values.id}
74 | />
75 | {formik.errors.id && formik.touched.id && }
76 | handleChange("language", data.value)}
80 | value={formik.values.language}
81 | />
82 | {formik.errors.language && formik.touched.language && }
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 | handleModal(false)} onOpen={() => handleModal(true)} open={open} content="Updated !" />
94 |
95 |
96 | );
97 | }
98 |
--------------------------------------------------------------------------------
/src/pages/adminPages/LevelAdd.jsx:
--------------------------------------------------------------------------------
1 | import React, { useState } from "react";
2 | import { Formik, useFormik } from "formik";
3 | import * as Yup from "yup";
4 | import Headline from "./../../layouts/Headline";
5 | import LevelService from "../../services/levelService";
6 | import DateLabel from "./../../layouts/DateLabel";
7 | import MessageModal from "./../../layouts/MessageModal";
8 | import { Container, Grid, Label, Form, Button } from "semantic-ui-react";
9 |
10 | export default function LevelAdd() {
11 | const [open, setOpen] = useState(false);
12 |
13 | let levelService = new LevelService();
14 |
15 | const initialValues = {
16 | level: "",
17 | };
18 |
19 | const validationSchema = Yup.object({
20 | level: Yup.string().required("Required Field"),
21 | });
22 |
23 | const onSubmit = (values, { resetForm }) => {
24 | console.log(values);
25 | levelService.add(values);
26 | handleModal(true);
27 | setTimeout(() => {
28 | resetForm();
29 | }, 100);
30 | };
31 |
32 | const formik = useFormik({
33 | initialValues: initialValues,
34 | validationSchema: validationSchema,
35 | onSubmit: onSubmit,
36 | });
37 |
38 | const handleModal = (value) => {
39 | setOpen(value);
40 | };
41 |
42 | const handleChange = (fieldName, value) => {
43 | formik.setFieldValue(fieldName, value);
44 | };
45 |
46 | return (
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 | handleChange("level", data.value)}
63 | value={formik.values.level}
64 | />
65 | {formik.errors.level && formik.touched.level && }
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 | handleModal(false)} onOpen={() => handleModal(true)} open={open} content="Added !" />
77 |
78 |
79 | );
80 | }
81 |
--------------------------------------------------------------------------------
/src/pages/adminPages/LevelUpdate.jsx:
--------------------------------------------------------------------------------
1 | import React, { useEffect, useState } from "react";
2 | import { Formik, useFormik } from "formik";
3 | import * as Yup from "yup";
4 | import Headline from "./../../layouts/Headline";
5 | import LevelService from "../../services/levelService";
6 | import DateLabel from "./../../layouts/DateLabel";
7 | import MessageModal from "./../../layouts/MessageModal";
8 | import { Container, Grid, Label, Form, Button } from "semantic-ui-react";
9 |
10 | export default function LevelUpdate() {
11 | const [levels, setLevels] = useState([]);
12 | const [open, setOpen] = useState(false);
13 |
14 | let levelService = new LevelService();
15 |
16 | useEffect(() => {
17 | levelService.getAll().then((result) => setLevels(result.data.data));
18 | }, []);
19 |
20 | const levelOptions = levels.map((level) => ({
21 | key: level.id,
22 | text: level.level,
23 | value: level.id,
24 | }));
25 |
26 | const initialValues = {
27 | id: "",
28 | level: "",
29 | };
30 |
31 | const validationSchema = Yup.object({
32 | id: Yup.number().required("Required Field"),
33 | level: Yup.string().required("Required Field"),
34 | });
35 |
36 | const onSubmit = (values) => {
37 | console.log(values);
38 | levelService.update(values);
39 | handleModal(true);
40 | };
41 |
42 | const formik = useFormik({
43 | initialValues: initialValues,
44 | validationSchema: validationSchema,
45 | onSubmit: onSubmit,
46 | });
47 |
48 | const handleModal = (value) => {
49 | setOpen(value);
50 | };
51 |
52 | const handleChange = (fieldName, value) => {
53 | formik.setFieldValue(fieldName, value);
54 | };
55 |
56 | return (
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 | handleChange("id", data.value)}
74 | value={formik.values.id}
75 | />
76 | {formik.errors.id && formik.touched.id && }
77 | handleChange("level", data.value)}
81 | value={formik.values.level}
82 | />
83 | {formik.errors.level && formik.touched.level && }
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 | handleModal(false)} onOpen={() => handleModal(true)} open={open} content="Updated !" />
95 |
96 |
97 | );
98 | }
99 |
--------------------------------------------------------------------------------
/src/pages/adminPages/LinkNameAdd.jsx:
--------------------------------------------------------------------------------
1 | import React, { useState } from "react";
2 | import { Formik, useFormik } from "formik";
3 | import * as Yup from "yup";
4 | import Headline from "./../../layouts/Headline";
5 | import LinkNameService from "../../services/linkNameService";
6 | import DateLabel from "./../../layouts/DateLabel";
7 | import MessageModal from "./../../layouts/MessageModal";
8 | import { Container, Grid, Label, Form, Button } from "semantic-ui-react";
9 |
10 | export default function LinkNameAdd() {
11 | const [open, setOpen] = useState(false);
12 |
13 | let linkNameService = new LinkNameService();
14 |
15 | const initialValues = {
16 | name: "",
17 | };
18 |
19 | const validationSchema = Yup.object({
20 | name: Yup.string().required("Required Field"),
21 | });
22 |
23 | const onSubmit = (values, { resetForm }) => {
24 | console.log(values);
25 | linkNameService.add(values);
26 | handleModal(true);
27 | setTimeout(() => {
28 | resetForm();
29 | }, 100);
30 | };
31 |
32 | const formik = useFormik({
33 | initialValues: initialValues,
34 | validationSchema: validationSchema,
35 | onSubmit: onSubmit,
36 | });
37 |
38 | const handleModal = (value) => {
39 | setOpen(value);
40 | };
41 |
42 | const handleChange = (fieldName, value) => {
43 | formik.setFieldValue(fieldName, value);
44 | };
45 |
46 | return (
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 | handleChange("name", data.value)}
63 | value={formik.values.name}
64 | />
65 | {formik.errors.name && formik.touched.name && }
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 | handleModal(false)} onOpen={() => handleModal(true)} open={open} content="Added !" />
77 |
78 |
79 | );
80 | }
81 |
--------------------------------------------------------------------------------
/src/pages/adminPages/LinkNameUpdate.jsx:
--------------------------------------------------------------------------------
1 | import React, { useEffect, useState } from "react";
2 | import { Formik, useFormik } from "formik";
3 | import * as Yup from "yup";
4 | import Headline from "./../../layouts/Headline";
5 | import LinkNameService from "../../services/linkNameService";
6 | import DateLabel from "./../../layouts/DateLabel";
7 | import MessageModal from "./../../layouts/MessageModal";
8 | import { Container, Grid, Label, Form, Button } from "semantic-ui-react";
9 |
10 | export default function LinkNameUpdate() {
11 | const [linkNames, setLinkNames] = useState([]);
12 | const [open, setOpen] = useState(false);
13 |
14 | let linkNameService = new LinkNameService();
15 |
16 | useEffect(() => {
17 | linkNameService.getAll().then((result) => setLinkNames(result.data.data));
18 | }, []);
19 |
20 | const linkNameOptions = linkNames.map((linkName) => ({
21 | key: linkName.id,
22 | text: linkName.name,
23 | value: linkName.id,
24 | }));
25 |
26 | const initialValues = {
27 | id: "",
28 | name: "",
29 | };
30 |
31 | const validationSchema = Yup.object({
32 | id: Yup.number().required("Required Field"),
33 | name: Yup.string().required("Required Field"),
34 | });
35 |
36 | const onSubmit = (values) => {
37 | console.log(values);
38 | linkNameService.update(values);
39 | handleModal(true);
40 | };
41 |
42 | const formik = useFormik({
43 | initialValues: initialValues,
44 | validationSchema: validationSchema,
45 | onSubmit: onSubmit,
46 | });
47 |
48 | const handleModal = (value) => {
49 | setOpen(value);
50 | };
51 |
52 | const handleChange = (fieldName, value) => {
53 | formik.setFieldValue(fieldName, value);
54 | };
55 |
56 | return (
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 | handleChange("id", data.value)}
74 | value={formik.values.id}
75 | />
76 | {formik.errors.id && formik.touched.id && }
77 | handleChange("name", data.value)}
81 | value={formik.values.name}
82 | />
83 | {formik.errors.name && formik.touched.name && }
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 | handleModal(false)} onOpen={() => handleModal(true)} open={open} content="Updated !" />
95 |
96 |
97 | );
98 | }
99 |
--------------------------------------------------------------------------------
/src/pages/adminPages/WorkingTimeAdd.jsx:
--------------------------------------------------------------------------------
1 | import React, { useState } from "react";
2 | import { Formik, useFormik } from "formik";
3 | import * as Yup from "yup";
4 | import Headline from "./../../layouts/Headline";
5 | import WorkingTimeService from "../../services/workingTimeService";
6 | import DateLabel from "./../../layouts/DateLabel";
7 | import MessageModal from "./../../layouts/MessageModal";
8 | import { Container, Grid, Label, Form, Button } from "semantic-ui-react";
9 |
10 | export default function WorkingTimeAdd() {
11 | const [open, setOpen] = useState(false);
12 |
13 | let workingTimeService = new WorkingTimeService();
14 |
15 | const initialValues = {
16 | time: "",
17 | };
18 |
19 | const validationSchema = Yup.object({
20 | time: Yup.string().required("Required Field"),
21 | });
22 |
23 | const onSubmit = (values, { resetForm }) => {
24 | console.log(values);
25 | workingTimeService.add(values);
26 | handleModal(true);
27 | setTimeout(() => {
28 | resetForm();
29 | }, 100);
30 | };
31 |
32 | const formik = useFormik({
33 | initialValues: initialValues,
34 | validationSchema: validationSchema,
35 | onSubmit: onSubmit,
36 | });
37 |
38 | const handleModal = (value) => {
39 | setOpen(value);
40 | };
41 |
42 | const handleChange = (fieldName, value) => {
43 | formik.setFieldValue(fieldName, value);
44 | };
45 |
46 | return (
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 | handleChange("time", data.value)}
63 | value={formik.values.time}
64 | />
65 | {formik.errors.time && formik.touched.time && }
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 | handleModal(false)} onOpen={() => handleModal(true)} open={open} content="Added !" />
77 |
78 |
79 | );
80 | }
81 |
--------------------------------------------------------------------------------
/src/pages/adminPages/WorkingTimeUpdate.jsx:
--------------------------------------------------------------------------------
1 | import React, { useEffect, useState } from "react";
2 | import { Formik, useFormik } from "formik";
3 | import * as Yup from "yup";
4 | import Headline from "./../../layouts/Headline";
5 | import WorkingTimeService from "../../services/workingTimeService";
6 | import DateLabel from "./../../layouts/DateLabel";
7 | import MessageModal from "./../../layouts/MessageModal";
8 | import { Container, Grid, Label, Form, Button } from "semantic-ui-react";
9 |
10 | export default function WorkingTimeUpdate() {
11 | const [workingTimes, setWorkingTimes] = useState([]);
12 | const [open, setOpen] = useState(false);
13 |
14 | let workingTimeService = new WorkingTimeService();
15 |
16 | useEffect(() => {
17 | workingTimeService.getAll().then((result) => setWorkingTimes(result.data.data));
18 | }, []);
19 |
20 | const workingTimeOptions = workingTimes.map((workingTime) => ({
21 | key: workingTime.id,
22 | text: workingTime.time,
23 | value: workingTime.id,
24 | }));
25 |
26 | const initialValues = {
27 | id: "",
28 | time: "",
29 | };
30 |
31 | const validationSchema = Yup.object({
32 | id: Yup.number().required("Required Field"),
33 | time: Yup.string().required("Required Field"),
34 | });
35 |
36 | const onSubmit = (values) => {
37 | console.log(values);
38 | workingTimeService.update(values);
39 | handleModal(true);
40 | };
41 |
42 | const formik = useFormik({
43 | initialValues: initialValues,
44 | validationSchema: validationSchema,
45 | onSubmit: onSubmit,
46 | });
47 |
48 | const handleModal = (value) => {
49 | setOpen(value);
50 | };
51 |
52 | const handleChange = (fieldName, value) => {
53 | formik.setFieldValue(fieldName, value);
54 | };
55 |
56 | return (
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 | handleChange("id", data.value)}
74 | value={formik.values.id}
75 | />
76 | {formik.errors.id && formik.touched.id && }
77 | handleChange("time", data.value)}
81 | value={formik.values.time}
82 | />
83 | {formik.errors.time && formik.touched.time && }
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 | handleModal(false)} onOpen={() => handleModal(true)} open={open} content="Updated !" />
95 |
96 |
97 | );
98 | }
99 |
--------------------------------------------------------------------------------
/src/pages/adminPages/WorkingTypeAdd.jsx:
--------------------------------------------------------------------------------
1 | import React, { useState } from "react";
2 | import { Formik, useFormik } from "formik";
3 | import * as Yup from "yup";
4 | import Headline from "./../../layouts/Headline";
5 | import WorkingTypeService from "../../services/workingTypeService";
6 | import DateLabel from "./../../layouts/DateLabel";
7 | import MessageModal from "./../../layouts/MessageModal";
8 | import { Container, Grid, Label, Form, Button } from "semantic-ui-react";
9 |
10 | export default function WorkingTypeAdd() {
11 | const [open, setOpen] = useState(false);
12 |
13 | let workingTypeService = new WorkingTypeService();
14 |
15 | const initialValues = {
16 | type: "",
17 | };
18 |
19 | const validationSchema = Yup.object({
20 | type: Yup.string().required("Required Field"),
21 | });
22 |
23 | const onSubmit = (values, { resetForm }) => {
24 | console.log(values);
25 | workingTypeService.add(values);
26 | handleModal(true);
27 | setTimeout(() => {
28 | resetForm();
29 | }, 100);
30 | };
31 |
32 | const formik = useFormik({
33 | initialValues: initialValues,
34 | validationSchema: validationSchema,
35 | onSubmit: onSubmit,
36 | });
37 |
38 | const handleModal = (value) => {
39 | setOpen(value);
40 | };
41 |
42 | const handleChange = (fieldName, value) => {
43 | formik.setFieldValue(fieldName, value);
44 | };
45 |
46 | return (
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 | handleChange("type", data.value)}
63 | value={formik.values.type}
64 | />
65 | {formik.errors.type && formik.touched.type && }
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 | handleModal(false)} onOpen={() => handleModal(true)} open={open} content="Added !" />
77 |
78 |
79 | );
80 | }
81 |
--------------------------------------------------------------------------------
/src/pages/adminPages/WorkingTypeUpdate.jsx:
--------------------------------------------------------------------------------
1 | import React, { useEffect, useState } from "react";
2 | import { Formik, useFormik } from "formik";
3 | import * as Yup from "yup";
4 | import Headline from "./../../layouts/Headline";
5 | import WorkingTypeService from "../../services/workingTypeService";
6 | import DateLabel from "./../../layouts/DateLabel";
7 | import MessageModal from "./../../layouts/MessageModal";
8 | import { Container, Grid, Label, Form, Button } from "semantic-ui-react";
9 |
10 | export default function WorkingTypeUpdate() {
11 | const [workingTypes, setWorkingTypes] = useState([]);
12 | const [open, setOpen] = useState(false);
13 |
14 | let workingTypeService = new WorkingTypeService();
15 |
16 | useEffect(() => {
17 | workingTypeService.getAll().then((result) => setWorkingTypes(result.data.data));
18 | }, []);
19 |
20 | const workingTypeOptions = workingTypes.map((workingType) => ({
21 | key: workingType.id,
22 | text: workingType.type,
23 | value: workingType.id,
24 | }));
25 |
26 | const initialValues = {
27 | id: "",
28 | type: "",
29 | };
30 |
31 | const validationSchema = Yup.object({
32 | id: Yup.number().required("Required Field"),
33 | type: Yup.string().required("Required Field"),
34 | });
35 |
36 | const onSubmit = (values) => {
37 | console.log(values);
38 | workingTypeService.update(values);
39 | handleModal(true);
40 | };
41 |
42 | const formik = useFormik({
43 | initialValues: initialValues,
44 | validationSchema: validationSchema,
45 | onSubmit: onSubmit,
46 | });
47 |
48 | const handleModal = (value) => {
49 | setOpen(value);
50 | };
51 |
52 | const handleChange = (fieldName, value) => {
53 | formik.setFieldValue(fieldName, value);
54 | };
55 |
56 | return (
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 | handleChange("id", data.value)}
74 | value={formik.values.id}
75 | />
76 | {formik.errors.id && formik.touched.id && }
77 | handleChange("type", data.value)}
81 | value={formik.values.type}
82 | />
83 | {formik.errors.type && formik.touched.type && }
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 | handleModal(false)} onOpen={() => handleModal(true)} open={open} content="Updated !" />
95 |
96 |
97 | );
98 | }
--------------------------------------------------------------------------------
/src/reportWebVitals.js:
--------------------------------------------------------------------------------
1 | const reportWebVitals = onPerfEntry => {
2 | if (onPerfEntry && onPerfEntry instanceof Function) {
3 | import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
4 | getCLS(onPerfEntry);
5 | getFID(onPerfEntry);
6 | getFCP(onPerfEntry);
7 | getLCP(onPerfEntry);
8 | getTTFB(onPerfEntry);
9 | });
10 | }
11 | };
12 |
13 | export default reportWebVitals;
14 |
--------------------------------------------------------------------------------
/src/services/authService.js:
--------------------------------------------------------------------------------
1 | import axios from "axios";
2 |
3 | export default class AuthService {
4 |
5 | registerCompanyStaff(values, confirmPassword) {
6 | return axios.post(` http://localhost:8080/api/auth/registerCompanyStaff?confirmPassword=${confirmPassword}`, values)
7 | }
8 |
9 | registerCandidate(values, confirmPassword) {
10 | return axios.post(` http://localhost:8080/api/auth/registerCandidate?confirmPassword=${confirmPassword}`, values)
11 | }
12 |
13 | registerEmployer(values, confirmPassword) {
14 | return axios.post(` http://localhost:8080/api/auth/registerEmployer?confirmPassword=${confirmPassword}`, values)
15 | }
16 |
17 | }
--------------------------------------------------------------------------------
/src/services/candidateService.js:
--------------------------------------------------------------------------------
1 | import axios from "axios";
2 |
3 | export default class EmployerService {
4 |
5 | update(values) {
6 | return axios.put("http://localhost:8080/api/candidates/update", values);
7 | }
8 |
9 | getById(id) {
10 | return axios.get(`http://localhost:8080/api/candidates/getById?id=${id}`);
11 | }
12 |
13 | }
--------------------------------------------------------------------------------
/src/services/cityService.js:
--------------------------------------------------------------------------------
1 | import axios from "axios";
2 |
3 | export default class CityService {
4 |
5 | add(values) {
6 | return axios.post("http://localhost:8080/api/cities/add", values);
7 | }
8 |
9 | update(values) {
10 | return axios.put("http://localhost:8080/api/cities/update", values);
11 | }
12 |
13 | getAll() {
14 | return axios.get("http://localhost:8080/api/cities/getAll");
15 | }
16 |
17 | }
--------------------------------------------------------------------------------
/src/services/companyStaffService.js:
--------------------------------------------------------------------------------
1 | import axios from "axios";
2 |
3 | export default class CompanyStaffService {
4 |
5 | update(values) {
6 | return axios.put("http://localhost:8080/api/companyStaffs/update", values);
7 | }
8 |
9 | getById(id) {
10 | return axios.get(`http://localhost:8080/api/companyStaffs/getById?id=${id}`);
11 | }
12 |
13 | }
--------------------------------------------------------------------------------
/src/services/coverLetterService.js:
--------------------------------------------------------------------------------
1 | import axios from "axios";
2 |
3 | export default class CoverLetterService {
4 |
5 | add(values) {
6 | return axios.post("http://localhost:8080/api/coverLetters/add", values);
7 | }
8 |
9 | delete(id) {
10 | return axios.delete(`http://localhost:8080/api/coverLetters/delete?id=${id}`);
11 | }
12 |
13 | getAllByCandidateId(candidateId) {
14 | return axios.get(`http://localhost:8080/api/coverLetters/getAllByCandidateId?candidateId=${candidateId}`);
15 | }
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/src/services/educationService.js:
--------------------------------------------------------------------------------
1 | import axios from "axios";
2 |
3 | export default class EducationService {
4 |
5 | add(values) {
6 | return axios.post("http://localhost:8080/api/educations/add", values);
7 | }
8 |
9 | delete(id) {
10 | return axios.delete(`http://localhost:8080/api/educations/delete?id=${id}`);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/src/services/employerService.js:
--------------------------------------------------------------------------------
1 | import axios from "axios";
2 |
3 | export default class EmployerService {
4 |
5 | update(values) {
6 | return axios.put("http://localhost:8080/api/employers/update", values);
7 | }
8 |
9 | getById(id) {
10 | return axios.get(`http://localhost:8080/api/employers/getById?id=${id}`);
11 | }
12 |
13 | confirm(companyStaffId, employerId, isConfirmed, userConfirmationTypeId) {
14 | return axios.put(`http://localhost:8080/api/employers/confirm?companyStaffId=${companyStaffId}&employerId=${employerId}&isConfirmed=${isConfirmed}&userConfirmationTypeId=${userConfirmationTypeId}`);
15 | }
16 |
17 | getAllByIsConfirmedAndUserConfirmationTypeIdSortedByCompanyName(isConfirmed, userConfirmationTypeId) {
18 | return axios.get(`http://localhost:8080/api/employers/getAllByIsConfirmedAndUserConfirmationTypeIdSortedByCompanyName?isConfirmed=${isConfirmed}&userConfirmationTypeId=${userConfirmationTypeId}`);
19 | }
20 |
21 | getAllOnesThatWaitingForAccountConfirmation() {
22 | return axios.get("http://localhost:8080/api/employers/getAllOnesThatWaitingForAccountConfirmation")
23 | }
24 |
25 | getAllOnesThatWaitingForUpdateConfirmation() {
26 | return axios.get("http://localhost:8080/api/employers/getAllOnesThatWaitingForUpdateConfirmation")
27 | }
28 |
29 | getOneThatWaitingForUpdateConfirmationById(id) {
30 | return axios.get(`http://localhost:8080/api/employers/getOneThatWaitingForUpdateConfirmationById?id=${id}`);
31 | }
32 |
33 | }
--------------------------------------------------------------------------------
/src/services/experienceService.js:
--------------------------------------------------------------------------------
1 | import axios from "axios";
2 |
3 | export default class ExperienceService {
4 |
5 | add(values) {
6 | return axios.post("http://localhost:8080/api/experiences/add", values);
7 | }
8 |
9 | delete(id) {
10 | return axios.delete(`http://localhost:8080/api/experiences/delete?id=${id}`);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/src/services/favoriteJobPostingService.js:
--------------------------------------------------------------------------------
1 | import axios from "axios";
2 |
3 | export default class FavoriteJobPostingService {
4 |
5 | add(values) {
6 | return axios.post("http://localhost:8080/api/favoriteJobPostings/add", values);
7 | }
8 |
9 | delete(id) {
10 | return axios.delete(`http://localhost:8080/api/favoriteJobPostings/delete?id=${id}`);
11 | }
12 |
13 | getAllByCandidateId(id) {
14 | return axios.get(`http://localhost:8080/api/favoriteJobPostings/getAllByCandidateId?candidateId=${id}`);
15 | }
16 |
17 | getAllActiveJobPostingsByCandidateIdSortedByDateOfAddToFavorites(id) {
18 | return axios.get(`http://localhost:8080/api/favoriteJobPostings/getAllActiveJobPostingsByCandidateIdSortedByDateOfAddToFavorites?candidateId=${id}`);
19 | }
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/src/services/jobPostingService.js:
--------------------------------------------------------------------------------
1 | import axios from "axios";
2 |
3 | export default class JobPostingService {
4 |
5 | add(values) {
6 | return axios.post("http://localhost:8080/api/jobPostings/add", values)
7 | }
8 |
9 | getById(id) {
10 | return axios.get(`http://localhost:8080/api/jobPostings/getById?id=${id}`);
11 | }
12 |
13 | makeActiveOrPassive(id, isActive) {
14 | return axios.put(`http://localhost:8080/api/jobPostings/makeActiveOrPassive?id=${id}&isActive=${isActive}`)
15 | }
16 |
17 | confirm(companyStaffId, isConfirmed, jobPostingConfirmationTypeId, jobPostingId) {
18 | return axios.put(`http://localhost:8080/api/jobPostings/confirm?companyStaffId=${companyStaffId}&isConfirmed=${isConfirmed}&jobPostingConfirmationTypeId=${jobPostingConfirmationTypeId}&jobPostingId=${jobPostingId}`);
19 | }
20 |
21 | getAllActiveOnesSortedByPostingDateTop6() {
22 | return axios.get("http://localhost:8080/api/jobPostings/getAllActiveOnesSortedByPostingDateTop6");
23 | }
24 |
25 | getAllActiveOnesByEmployerIdSortedByPostingDate(employerId) {
26 | return axios.get(`http://localhost:8080/api/jobPostings/getAllActiveOnesByEmployerIdSortedByPostingDate?employerId=${employerId}`);
27 | }
28 |
29 | getAllActiveOnesFilteredByCityAndJobTitleAndWorkingTimeAndWorkingType(cityId, jobTitleId, workingTimeId, workingTypeId) {
30 | return axios.get(`http://localhost:8080/api/jobPostings/getAllActiveOnesFilteredByCityAndJobTitleAndWorkingTimeAndWorkingType?cityId=${cityId}&jobTitleId=${jobTitleId}&workingTimeId=${workingTimeId}&workingTypeId=${workingTypeId}`);
31 | }
32 |
33 | getAllActiveOnesByPageFilteredByCityAndJobTitleAndWorkingTimeAndWorkingType(cityId, jobTitleId, workingTimeId, workingTypeId, pageNo, pageSize) {
34 | return axios.get(`http://localhost:8080/api/jobPostings/getAllActiveOnesByPageFilteredByCityAndJobTitleAndWorkingTimeAndWorkingType?cityId=${cityId}&jobTitleId=${jobTitleId}&pageNo=${pageNo}&pageSize=${pageSize}&workingTimeId=${workingTimeId}&workingTypeId=${workingTypeId}`);
35 | }
36 |
37 | getAllOnesThatWaitingForPostingConfirmation() {
38 | return axios.get("http://localhost:8080/api/jobPostings/getAllOnesThatWaitingForPostingConfirmation");
39 | }
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/src/services/jobTitleService.js:
--------------------------------------------------------------------------------
1 | import axios from "axios";
2 |
3 | export default class JobTitleService {
4 |
5 | add(values) {
6 | return axios.post("http://localhost:8080/api/jobTitles/add", values);
7 | }
8 |
9 | update(values) {
10 | return axios.put("http://localhost:8080/api/jobTitles/update", values);
11 | }
12 |
13 | getAll() {
14 | return axios.get("http://localhost:8080/api/jobTitles/getAll");
15 | }
16 |
17 | }
--------------------------------------------------------------------------------
/src/services/languageLevelService.js:
--------------------------------------------------------------------------------
1 | import axios from "axios";
2 |
3 | export default class LanguageLevelService {
4 |
5 | add(values) {
6 | return axios.post("http://localhost:8080/api/languageLevels/add", values);
7 | }
8 |
9 | delete(id) {
10 | return axios.delete(`http://localhost:8080/api/languageLevels/delete?id=${id}`);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/src/services/languageService.js:
--------------------------------------------------------------------------------
1 | import axios from "axios";
2 |
3 | export default class LanguageService {
4 |
5 | add(values) {
6 | return axios.post("http://localhost:8080/api/languages/add", values);
7 | }
8 |
9 | update(values) {
10 | return axios.put("http://localhost:8080/api/languages/update", values);
11 | }
12 |
13 | getAll() {
14 | return axios.get("http://localhost:8080/api/languages/getAll");
15 | }
16 |
17 | }
--------------------------------------------------------------------------------
/src/services/levelService.js:
--------------------------------------------------------------------------------
1 | import axios from "axios";
2 |
3 | export default class LevelService {
4 |
5 | add(values) {
6 | return axios.post("http://localhost:8080/api/levels/add", values);
7 | }
8 |
9 | update(values) {
10 | return axios.put("http://localhost:8080/api/levels/update", values);
11 | }
12 |
13 | getAll() {
14 | return axios.get("http://localhost:8080/api/levels/getAll");
15 | }
16 |
17 | }
--------------------------------------------------------------------------------
/src/services/linkNameService.js:
--------------------------------------------------------------------------------
1 | import axios from "axios";
2 |
3 | export default class LinkNameService {
4 |
5 | add(values) {
6 | return axios.post("http://localhost:8080/api/linkNames/add", values);
7 | }
8 |
9 | update(values) {
10 | return axios.put("http://localhost:8080/api/linkNames/update", values);
11 | }
12 |
13 | getAll() {
14 | return axios.get("http://localhost:8080/api/linkNames/getAll");
15 | }
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/src/services/linkService.js:
--------------------------------------------------------------------------------
1 | import axios from "axios";
2 |
3 | export default class LinkService {
4 |
5 | add(values) {
6 | return axios.post("http://localhost:8080/api/links/add", values);
7 | }
8 |
9 | delete(id) {
10 | return axios.delete(`http://localhost:8080/api/links/delete?id=${id}`);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/src/services/resumeService.js:
--------------------------------------------------------------------------------
1 | import axios from "axios";
2 |
3 | export default class ResumeService {
4 |
5 | update(values) {
6 | return axios.put("http://localhost:8080/api/resumes/update", values);
7 | }
8 |
9 | getById(id) {
10 | return axios.get(`http://localhost:8080/api/resumes/getById?id=${id}`);
11 | }
12 |
13 | addCoverLetterToResume(resumeId, coverLetterId) {
14 | return axios.post(`http://localhost:8080/api/resumes/addCoverLetterToResume?coverLetterId=${coverLetterId}&resumeId=${resumeId}`);
15 | }
16 |
17 | deleteCoverLetterFromResume(resumeId) {
18 | return axios.delete(`http://localhost:8080/api/resumes/deleteCoverLetterFromResume?resumeId=${resumeId}`);
19 | }
20 |
21 | getAllResumesDetailsByActivatedCandidate() {
22 | return axios.get("http://localhost:8080/api/resumes/getAllResumesDetailsByActivatedCandidate");
23 | }
24 |
25 | getByCandidateId(candidateId) {
26 | return axios.get(`http://localhost:8080/api/resumes/getByCandidateId?candidateId=${candidateId}`);
27 | }
28 |
29 | }
--------------------------------------------------------------------------------
/src/services/skillService.js:
--------------------------------------------------------------------------------
1 | import axios from "axios";
2 |
3 | export default class SkillService {
4 |
5 | add(values) {
6 | return axios.post("http://localhost:8080/api/skills/add", values);
7 | }
8 |
9 | delete(id) {
10 | return axios.delete(`http://localhost:8080/api/skills/delete?id=${id}`);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/src/services/updatedEmployerService.js:
--------------------------------------------------------------------------------
1 | import axios from "axios";
2 |
3 | export default class UpdatedEmployerService {
4 |
5 | getAll() {
6 | return axios.get(`http://localhost:8080/api/updatedEmployers/getAll`);
7 | }
8 |
9 | }
--------------------------------------------------------------------------------
/src/services/userActivationService.js:
--------------------------------------------------------------------------------
1 | import axios from "axios";
2 |
3 | export default class UserActivationService {
4 |
5 | getByUserId(userId) {
6 | return axios.get(`http://localhost:8080/api/userActivations/getByUserId?userId=${userId}`);
7 | }
8 |
9 | }
--------------------------------------------------------------------------------
/src/services/workingTimeService.js:
--------------------------------------------------------------------------------
1 | import axios from "axios";
2 |
3 | export default class WorkingTimeService {
4 |
5 | add(values) {
6 | return axios.post("http://localhost:8080/api/workingTimes/add", values);
7 | }
8 |
9 | update(values) {
10 | return axios.put("http://localhost:8080/api/workingTimes/update", values);
11 | }
12 |
13 | getAll() {
14 | return axios.get("http://localhost:8080/api/workingTimes/getAll");
15 | }
16 |
17 | }
--------------------------------------------------------------------------------
/src/services/workingTypeService.js:
--------------------------------------------------------------------------------
1 | import axios from "axios";
2 |
3 | export default class WorkingTypeService {
4 |
5 | add(values) {
6 | return axios.post("http://localhost:8080/api/workingTypes/add", values);
7 | }
8 |
9 | update(values) {
10 | return axios.put("http://localhost:8080/api/workingTypes/update", values);
11 | }
12 |
13 | getAll() {
14 | return axios.get("http://localhost:8080/api/workingTypes/getAll");
15 | }
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/src/setupTests.js:
--------------------------------------------------------------------------------
1 | // jest-dom adds custom jest matchers for asserting on DOM nodes.
2 | // allows you to do things like:
3 | // expect(element).toHaveTextContent(/react/i)
4 | // learn more: https://github.com/testing-library/jest-dom
5 | import '@testing-library/jest-dom';
6 |
--------------------------------------------------------------------------------