Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

Rev 5000 | Rev 5822 | Ir a la última revisión | | Comparar con el anterior | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
3564 stevensc 1
/* eslint-disable react/prop-types */
5000 stevensc 2
import React, { useState } from 'react';
3
import ApplicationSidebar from './application-sidebar/ApplicationSidebar';
4
import ApplyModal from './apply-modal/ApplyModal';
5
import Description from './description/Description';
6
import Information from './information/Information';
7
import Widget from './widget/Widget';
1 www 8
 
5000 stevensc 9
const View = ({
10
  jobId,
11
  companyId,
12
  companyImage,
13
  jobTitle,
14
  companyName,
15
  timeElapsed,
16
  location,
17
  jobSaved,
18
  lastDateOfApplication,
19
  employmentType,
20
  jobCategory,
21
  jobDescription,
22
  jobSkills,
23
  totalApplications,
24
  jobVisits,
25
  experience,
26
  salary,
27
  jobLanguages,
28
  jobDegrees,
29
  companyIndustry,
30
  companySize,
31
  companyAddress,
32
  companyWebsite,
33
  companyFoundationYear,
34
  jobApplyOperation,
35
  userProfiles,
36
}) => {
1 www 37
  const [showApplyModal, setShowApplyModal] = useState(false);
38
  const [isJobApplied, setIsJobApplied] = useState(
5000 stevensc 39
    jobApplyOperation === 'apply' ? false : true
1 www 40
  );
41
 
3564 stevensc 42
  const handleShowApplyModal = () => setShowApplyModal((currentState) => !currentState)
43
  const handleApply = () => setIsJobApplied(true)
44
  const handleWithdrawApply = () => setIsJobApplied(false)
1 www 45
 
46
  return (
5000 stevensc 47
    <>
48
      <div className='tab tab-feed'>
49
        <ul>
50
          <li data-tab='portfolio-dd' className='active animated fadeIn'>
51
            <a href='#' title=''>
52
              <img src='/images/ic3.png' alt='' />
53
              <span>Avance</span>
54
            </a>
55
          </li>
56
          <li data-tab='info-dd' className='animated fadeIn'>
57
            <a href='#' title=''>
58
              <img src='/images/ic2.png' alt='' />
59
              <span>Información</span>
60
            </a>
61
          </li>
62
        </ul>
63
      </div>
64
      <div className='description_header product-feed-tab current animated fadeIn'>
65
        <Description
66
          jobId={jobId}
67
          companyId={companyId}
68
          companyImage={companyImage}
69
          jobTitle={jobTitle}
70
          companyName={companyName}
71
          timeElapsed={timeElapsed}
72
          location={location}
73
          jobSaved={jobSaved}
74
          lastDateOfApplication={lastDateOfApplication}
75
          employmentType={employmentType}
76
          jobCategory={jobCategory}
77
          jobDescription={jobDescription}
78
          jobSkills={jobSkills}
79
          totalApplications={totalApplications}
80
          jobVisits={jobVisits}
81
        />
82
      </div>
5002 stevensc 83
      <Information
84
        jobDescription={jobDescription}
85
        lastDateOfApplication={lastDateOfApplication}
86
        employmentType={employmentType}
87
        location={location}
88
        experience={experience}
89
        salary={salary}
90
        jobCategory={jobCategory}
91
        jobSkills={jobSkills}
92
        jobLanguages={jobLanguages}
93
        jobDegrees={jobDegrees}
94
      />
5000 stevensc 95
      <div className='sidebar'>
96
        <ApplicationSidebar
97
          jobId={jobId}
98
          onApply={handleShowApplyModal}
99
          onWithdrawApply={handleWithdrawApply}
100
          isJobApplied={isJobApplied}
101
        />
102
        <Widget
103
          companyIndustry={companyIndustry}
104
          companySize={companySize}
105
          companyAddress={companyAddress}
106
          companyWebsite={companyWebsite}
107
          companyFoundationYear={companyFoundationYear}
108
        />
109
      </div>
1 www 110
      <ApplyModal
111
        show={showApplyModal}
112
        onHide={() => setShowApplyModal(false)}
113
        jobId={jobId}
114
        userProfiles={userProfiles}
115
        onApplied={handleApply}
116
      />
5000 stevensc 117
    </>
1 www 118
  );
119
};
120
 
121
export default View;