Changeset db94dbd


Ignore:
Timestamp:
01/14/21 22:54:45 (4 years ago)
Author:
Vzdra <vladko.zdravkovski@…>
Branches:
master
Children:
5b36317
Parents:
be373a8
Message:

work register

Location:
client_app
Files:
4 added
1 deleted
7 edited

Legend:

Unmodified
Added
Removed
  • client_app/package-lock.json

    rbe373a8 rdb94dbd  
    11371137      "integrity": "sha512-ij4wRiunFfaJxjB0BdrYHIH8FxBJpOwNPhhAcunlmPdXudL1WQV1qoP9un6JsEBAgQH+7UXyyjh0g7jTxXK6tg=="
    11381138    },
     1139    "@date-fns/upgrade": {
     1140      "version": "1.0.3",
     1141      "resolved": "https://registry.npmjs.org/@date-fns/upgrade/-/upgrade-1.0.3.tgz",
     1142      "integrity": "sha512-0BLzKmXwWw3Zh3cZzW4xScmwGijXCAulaFdikqNiSnK8PAgYYSWWxOP/kuJFpKaoIT5KzstVGyHsjA7t/QXi1Q==",
     1143      "requires": {
     1144        "date-fns": "^2.1"
     1145      }
     1146    },
    11391147    "@eslint/eslintrc": {
    11401148      "version": "0.2.2",
     
    39974005      }
    39984006    },
     4007    "classnames": {
     4008      "version": "2.2.6",
     4009      "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.2.6.tgz",
     4010      "integrity": "sha512-JR/iSQOSt+LQIWwrwEzJ9uk0xfN3mTVYMwt1Ir5mUcSN6pU+V4zQFFaJsclJbPuAUQH+yfWef6tm7l1quW3C8Q=="
     4011    },
    39994012    "clean-css": {
    40004013      "version": "4.2.3",
     
    47664779        "whatwg-mimetype": "^2.3.0",
    47674780        "whatwg-url": "^8.0.0"
     4781      }
     4782    },
     4783    "date-fns": {
     4784      "version": "2.16.1",
     4785      "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.16.1.tgz",
     4786      "integrity": "sha512-sAJVKx/FqrLYHAQeN7VpJrPhagZc9R4ImZIWYRFZaaohR3KzmuK88touwsSwSVT8Qcbd4zoDsnGfX4GFB4imyQ=="
     4787    },
     4788    "dayzed": {
     4789      "version": "3.2.1",
     4790      "resolved": "https://registry.npmjs.org/dayzed/-/dayzed-3.2.1.tgz",
     4791      "integrity": "sha512-3jnjfUOGxGA31iYAR2QfiDzWVfl3ccejm7/ya5P1gYpOtc9b4PEcl0xUAf7f74czEteAC/oPQCspNv/LAJlIYw==",
     4792      "requires": {
     4793        "@babel/runtime": "^7.6.2",
     4794        "date-fns": "^2.0.0"
    47684795      }
    47694796    },
     
    66586685        "mime-types": "^2.1.12"
    66596686      }
     6687    },
     6688    "format-string-by-pattern": {
     6689      "version": "1.2.1",
     6690      "resolved": "https://registry.npmjs.org/format-string-by-pattern/-/format-string-by-pattern-1.2.1.tgz",
     6691      "integrity": "sha512-x7JY+q8XvBmHCf4ZSQiiG+8fmC02oiei1JoAsUcdHcy8Kn6LwaE1KUlQ8ph3fNnIcWY65B3aVuKArdbAEQxpLg=="
    66606692    },
    66616693    "forwarded": {
     
    1250212534      }
    1250312535    },
     12536    "react-semantic-ui-datepickers": {
     12537      "version": "2.12.0",
     12538      "resolved": "https://registry.npmjs.org/react-semantic-ui-datepickers/-/react-semantic-ui-datepickers-2.12.0.tgz",
     12539      "integrity": "sha512-IlwyruitM42x/EIcb7aZOaJZxl7aWr/ckib+0Xut4cCURQwYz+LiWxWZhVmHmCgT2lZS6QCXDbyfAxvRnXEqww==",
     12540      "requires": {
     12541        "@babel/runtime": "7.12.1",
     12542        "@date-fns/upgrade": "1.0.3",
     12543        "classnames": "2.2.6",
     12544        "core-js": "3.6.5",
     12545        "date-fns": "2.16.1",
     12546        "dayzed": "3.2.1",
     12547        "format-string-by-pattern": "1.2.1",
     12548        "react-fast-compare": "3.2.0"
     12549      },
     12550      "dependencies": {
     12551        "@babel/runtime": {
     12552          "version": "7.12.1",
     12553          "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.1.tgz",
     12554          "integrity": "sha512-J5AIf3vPj3UwXaAzb5j1xM4WAQDX3EMgemF8rjCP3SoW09LfRKAXQKt6CoVYl230P6iWdRcBbnLDDdnqWxZSCA==",
     12555          "requires": {
     12556            "regenerator-runtime": "^0.13.4"
     12557          }
     12558        },
     12559        "core-js": {
     12560          "version": "3.6.5",
     12561          "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.6.5.tgz",
     12562          "integrity": "sha512-vZVEEwZoIsI+vPEuoF9Iqf5H7/M3eeQqWlQnYa8FSKKePuYTf5MWnxb5SDAzCa60b3JBRS5g9b+Dq7b1y/RCrA=="
     12563        }
     12564      }
     12565    },
    1250412566    "read-pkg": {
    1250512567      "version": "2.0.0",
  • client_app/package.json

    rbe373a8 rdb94dbd  
    1212    "react-router-dom": "^5.2.0",
    1313    "react-scripts": "4.0.1",
     14    "react-semantic-ui-datepickers": "^2.12.0",
    1415    "semantic-ui-css": "^2.4.1",
    1516    "semantic-ui-react": "^2.0.1",
  • client_app/src/components/main/App.js

    rbe373a8 rdb94dbd  
    2121import EditCompany from "../account_edit/company_edit";
    2222import EditTeam from "../account_edit/team_edit";
     23import JobRegister from "../work_register/job_register";
     24import InternshipRegister from "../work_register/internship_register";
     25import ProjectRegister from "../work_register/project_register";
    2326
    2427class App extends Component{
     
    5558                      <Route path={"/company/edit"} render={() => <EditCompany oldUser={this.state.currentUser} updateUser={this.updateUser} message={this.setSuccess}/>}/>
    5659                      <Route path={"/team/edit"} render={() => <EditTeam oldUser={this.state.currentUser} updateUser={this.updateUser} message={this.setSuccess}/>}/>
     60                      <Route path={"/register/job"} render={() => <JobRegister accountId={this.state.currentUser.id} type={this.state.currentUser.type} updateJobs={this.updateJobs} />}/>
     61                      <Route path={"/register/internship"} render={() => <InternshipRegister accountId={this.state.currentUser.id} type={this.state.currentUser.type} updateInternships={this.updateInternships} />}/>
     62                      <Route path={"/register/project"} render={() => <ProjectRegister accountId={this.state.currentUser.id} type={this.state.currentUser.type} updateInternships={this.updateProjects} />}/>
    5763                      <Route path={"/logout"} render={() => <Redirect to={"/login"}/>}/>
    5864                      <Route path={"/"} render={() => <Redirect to={"/login"}/>}/>
     
    8389  }
    8490
     91  updateJobs = (job) => {
     92      this.setState(prevState => ({
     93         currentUser:{
     94             ...prevState.currentUser,
     95             jobs: [...prevState.currentUser.jobs, job]
     96         }
     97      }))
     98  }
     99
     100    updateInternships = (internship) => {
     101        this.setState(prevState => ({
     102            currentUser:{
     103                ...prevState.currentUser,
     104                internships: [...prevState.currentUser.internships, internship]
     105            }
     106        }))
     107    }
     108
     109    updateProjects = (project) => {
     110        this.setState(prevState => ({
     111            currentUser:{
     112                ...prevState.currentUser,
     113                projects: [...prevState.currentUser.projects, project]
     114            }
     115        }))
     116    }
     117
    85118  attemptLogin = (email, password, type) => {
    86119      UserLogin.login(email, password, type).then((res) =>{
  • client_app/src/components/work/company_internships.js

    rbe373a8 rdb94dbd  
    1010            return(
    1111                <Container textAlign="left">
    12                     <Button as={Link} to={"/internships/add"} primary>Add</Button>
    13                     <h1>Registered Jobs:</h1>
     12                    <Button as={Link} to={"/register/internship"} primary>Add</Button>
     13                    <h1>Registered Internships:</h1>
    1414                    {props.userProfile.internships.map(item =>{
    1515                        return <Internships
  • client_app/src/components/work/company_jobs.js

    rbe373a8 rdb94dbd  
    1010            return(
    1111                <Container textAlign="left">
    12                     <Button as={Link} to={"/job/add"} primary>Add</Button>
     12                    <Button as={Link} to={"/register/job"} primary>Add</Button>
    1313                    <h1>Registered Jobs:</h1>
    1414                    {props.userProfile.jobs.map(item =>{
  • client_app/src/components/work/team_jobs.js

    rbe373a8 rdb94dbd  
    1010            return(
    1111                <Container textAlign="left">
    12                     <Button as={Link} to={"/job/add"} primary>Add</Button>
     12                    <Button as={Link} to={"/register/job"} primary>Add</Button>
    1313                    <h1>Registered Jobs:</h1>
    1414                    {props.userProfile.jobs.map(item =>{
  • client_app/src/components/work/team_projects.js

    rbe373a8 rdb94dbd  
    1010            return(
    1111                <Container textAlign="left">
    12                     <Button as={Link} to={"/project/add"} primary>Add</Button>
    13                     <h1>Registered Jobs:</h1>
     12                    <Button as={Link} to={"/register/project"} primary>Add</Button>
     13                    <h1>Registered Projects:</h1>
    1414                    {props.userProfile.projects.map(item =>{
    1515                        return <Projects
Note: See TracChangeset for help on using the changeset viewer.