Changeset ed3f5c4


Ignore:
Timestamp:
01/15/21 04:14:15 (3 years ago)
Author:
Vzdra <vladko.zdravkovski@…>
Branches:
master
Children:
6729ba5
Parents:
4302312
Message:

more groundwork

Location:
client_app/src/components
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • client_app/src/components/filter/search.js

    r4302312 red3f5c4  
    9595                </Form>
    9696
    97                 {formData.items.map(item => {
    98                     return  (item.skillsTrained && <Internships
    99                             item={item} />) || (<Jobs item={item} />)
     97                {formData.items.map((item,index) => {
     98                    return (item.skillsTrained && <Internships key={item.id} index={index} item={item} />)
     99                        || (<Jobs key={item.id} index={index} item={item} />)
    100100                })}
    101101            </Container>
  • client_app/src/components/item_components/internship_component.js

    r4302312 red3f5c4  
    55    return(
    66        <Segment>
    7             <Header as="h3">{props.title}</Header>
    8             {props.type!=="USER" ? <Button primary>Edit</Button> : <span> </span>}
    9             <Segment>{props.description}</Segment>
     7            <Header as="h3">{props.item.title}</Header>
     8            {props.item.type!=="USER" ? <Button primary>Edit</Button> : <span> </span>}
     9            <Segment>{props.item.description}</Segment>
    1010            <Segment>
    11                 <Header as="h5" color="grey">{props.accountName}</Header>
    12                 <Header as="h4" color="blue">Owner Mail: {props.accountEmail}</Header>
     11                <Header as="h5" color="grey">{props.item.accountName}</Header>
     12                <Header as="h4" color="blue">Owner Mail: {props.item.accountEmail}</Header>
    1313            </Segment>
    1414            <Segment>
    1515                <Header as="h3">Skills Trained:</Header>
    1616                <List>
    17                     {props.skills.map(skill => {
     17                    {props.item.skillsTrained.map(skill => {
    1818                        return <List.Item key={skill.id}>{skill.name}</List.Item>
    1919                    })}
  • client_app/src/components/item_components/job_component.js

    r4302312 red3f5c4  
    77        <Segment>
    88            <Header as="h3">{props.item.title}</Header>
    9             {props.type!=="USER" ? <Button primary as={Link} to={{
     9            {props.item.type!=="USER" ? <Button primary as={Link} to={{
    1010                pathname: "/edit/job",
    1111                state: {
     
    2323                <Header as="h3">Skills Required:</Header>
    2424                <List>
    25                     {props.item.skills.map(skill => {
     25                    {props.item.skillsRequired.map(skill => {
    2626                        return <List.Item key={skill.id}>{skill.name}</List.Item>
    2727                    })}
  • client_app/src/components/item_components/project_component.js

    r4302312 red3f5c4  
    66    return(
    77        <Segment>
    8             <Header as="h3">{props.title}</Header>
    9             {props.type!=="USER" ? <Button primary>Edit</Button> : <span> </span>}
    10             <Segment>{props.description}</Segment>
     8            <Header as="h3">{props.item.title}</Header>
     9            {props.item.type!=="USER" ? <Button primary>Edit</Button> : <span> </span>}
     10            <Segment>{props.item.description}</Segment>
    1111            <Segment>
    12                 <Header as="h5" color="grey">{props.accountName}</Header>
    13                 <Header as="h4" color="blue">Owner Mail: {props.accountEmail}</Header>
     12                <Header as="h5" color="grey">{props.item.accountName}</Header>
     13                <Header as="h4" color="blue">Owner Mail: {props.item.accountEmail}</Header>
    1414            </Segment>
    1515            <Segment>
    1616                <Header as="h3">Skills Required:</Header>
    1717                <List>
    18                     {props.skills.map(skill => {
     18                    {props.item.skillsRequired.map(skill => {
    1919                        return <List.Item key={skill.id}>{skill.name}</List.Item>
    2020                    })}
  • client_app/src/components/main/App.js

    r4302312 red3f5c4  
    6363                      <Route path={"/register/project"} render={() => <ProjectRegister accountId={this.state.currentUser.id} type={this.state.currentUser.type} updateProjects={this.updateProjects} />}/>
    6464                      <Route path={"/edit/job"} render={(props) => <EditJob {...props}  editJob={this.editJob}/>} />
    65                       <Route path={"/edit/internship"} render={(props) => <EditInternship {...props}  editJob={this.editInternship}/>} />
    66                       <Route path={"/edit/project"} render={(props) => <EditProject {...props}  editJob={this.editProject}/>} />
     65                      {/*<Route path={"/edit/internship"} render={(props) => <EditInternship {...props}  editJob={this.editInternship}/>} />*/}
     66                      {/*<Route path={"/edit/project"} render={(props) => <EditProject {...props}  editJob={this.editProject}/>} />*/}
    6767                      <Route path={"/logout"} render={() => <Redirect to={"/login"}/>}/>
    6868                      <Route path={"/"} render={() => <Redirect to={"/login"}/>}/>
  • client_app/src/components/work/company_internships.js

    r4302312 red3f5c4  
    1212                    <Button as={Link} to={"/register/internship"} primary>Add</Button>
    1313                    <h1>Registered Internships:</h1>
    14                     {props.userProfile.internships.map(item =>{
     14                    {props.userProfile.internships.map((item, index) =>{
    1515                        return <Internships
    16                             title={item.title}
    17                             description={item.description}
    18                             accountName={item.accountName}
    19                             accountEmail={item.accountEmail}
    20                             skills={item.skillsTrained}
    21                             type={props.userProfile.type}
     16                            key={item.id}
     17                            index={index}
     18                            item={item}
    2219                        />
    2320                    })}
  • client_app/src/components/work/company_jobs.js

    r4302312 red3f5c4  
    1212                    <Button as={Link} to={"/register/job"} primary>Add</Button>
    1313                    <h1>Registered Jobs:</h1>
    14                     {props.userProfile.jobs.map(item =>{
     14                    {props.userProfile.jobs.map((item, index) =>{
    1515                        return <Jobs
     16                            key={item.id}
     17                            index={index}
    1618                            item={item}
    1719                        />
  • client_app/src/components/work/team_jobs.js

    r4302312 red3f5c4  
    1212                    <Button as={Link} to={"/register/job"} primary>Add</Button>
    1313                    <h1>Registered Jobs:</h1>
    14                     {props.userProfile.jobs.map(item =>{
     14                    {props.userProfile.jobs.map((item, index) =>{
    1515                        return <Jobs
     16                            key={item.id}
     17                            index={index}
    1618                            item={item}
    1719                        />
  • client_app/src/components/work/team_projects.js

    r4302312 red3f5c4  
    1212                    <Button as={Link} to={"/register/project"} primary>Add</Button>
    1313                    <h1>Registered Projects:</h1>
    14                     {props.userProfile.projects.map(item =>{
     14                    {props.userProfile.projects.map((item, index) =>{
    1515                        return <Projects
    16                             title={item.title}
    17                             description={item.description}
    18                             accountName={item.accountName}
    19                             accountEmail={item.accountEmail}
    20                             skills={item.skillsRequired}
    21                             type={props.userProfile.type}
     16                            key={item.id}
     17                            index={index}
     18                            item={item}
    2219                        />
    2320                    })}
  • client_app/src/components/work/user_internships.js

    r4302312 red3f5c4  
    1010                <Container>
    1111                <h1>Internships for you!</h1>
    12                 {props.userProfile.internships.map(item =>{
     12                {props.userProfile.internships.map((item, index) =>{
    1313                    return <Internships
    14                         title={item.title}
    15                         description={item.description}
    16                         accountName={item.accountName}
    17                         accountEmail={item.accountEmail}
    18                         skills={item.skillsTrained}
    19                         type={props.userProfile.type}
     14                        key={item.id}
     15                        index={index}
     16                        item={item}
    2017                    />})
    2118                }
  • client_app/src/components/work/user_jobs.js

    r4302312 red3f5c4  
    1111                <Container textAlign="left">
    1212                    <h1>Jobs for you!</h1>
    13                     {props.userProfile.jobs.map(item =>{
     13                    {props.userProfile.jobs.map((item, index) =>{
    1414                        return <Jobs
     15                            key={item.id}
     16                            index={index}
    1517                            item={item}
    1618                        />
  • client_app/src/components/work/user_projects.js

    r4302312 red3f5c4  
    1010                <Container>
    1111                    <h1>Projects for you!</h1>
    12                     {props.userProfile.projects.map(item =>{
     12                    {props.userProfile.projects.map((item,index) =>{
    1313                        return <Projects
    14                             title={item.title}
    15                             description={item.description}
    16                             accountName={item.accountName}
    17                             accountEmail={item.accountEmail}
    18                             skills={item.skillsRequired}
    19                             type={props.userProfile.type}
     14                            key={item.id}
     15                            index={index}
     16                            item={item}
    2017                        />})
    2118                    }
Note: See TracChangeset for help on using the changeset viewer.