Proyectos de Subversion LeadersLinked - SPA

Rev

Rev 3274 | Rev 3446 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 3274 Rev 3444
Línea 1... Línea 1...
1
import React from 'react'
1
import React from 'react';
2
import { useParams } from 'react-router-dom'
2
import { useParams } from 'react-router-dom';
3
import { Grid } from '@mui/material'
3
import { Grid } from '@mui/material';
4
 
4
 
5
import { formatObjectToArray } from '@app/utils'
5
import { formatObjectToArray } from '@app/utils';
6
import { useFetch } from '@hooks'
6
import { useFetch } from '@hooks';
7
 
7
 
8
import ProfileCard from '@app/components/profile/ProfileCard'
8
import ProfileCard from '@app/components/profile/ProfileCard';
9
import AptitudesCard from '@app/components/profile/aptitudes/AptitudesCard'
9
import AptitudesCard from '@app/components/profile/aptitudes/AptitudesCard';
10
import LanguagesCard from '@app/components/profile/languages/LanguagesCard'
10
import LanguagesCard from '@app/components/profile/languages/LanguagesCard';
11
import LocationCard from '@app/components/profile/location/LocationCard'
11
import LocationCard from '@app/components/profile/location/LocationCard';
12
import SkillsCard from '@app/components/profile/skills/SkillsCard'
12
import SkillsCard from '@app/components/profile/skills/SkillsCard';
13
import HobbiesCard from '@app/components/profile/hobbies/HobbiesCard'
13
import HobbiesCard from '@app/components/profile/hobbies/HobbiesCard';
14
import EducationsCard from '@app/components/profile/educations/educations-card'
14
import EducationsCard from '@app/components/profile/educations/educations-card';
15
import ExperiencesCard from '@components/profile/experiences/experiences-card'
15
import ExperiencesCard from '@components/profile/experiences/experiences-card';
Línea 16... Línea 16...
16
 
16
 
Línea 17... Línea 17...
17
import '../../styles/profile/profile.scss'
17
import '../../styles/profile/profile.scss';
18
 
18
 
19
const ProfileEditLayout = () => {
19
const ProfileEditLayout = () => {
Línea 20... Línea 20...
20
  const { uuid } = useParams()
20
  const { uuid } = useParams();
21
  const { data: profile } = useFetch(`/profile/my-profiles/edit/${uuid}`)
21
  const { data: profile } = useFetch(`/profile/my-profiles/edit/${uuid}`);
22
 
22
 
23
  const {
23
  const {
24
    user_experiences = [],
24
    user_experiences = [],
25
    user_educations = [],
25
    user_educations = [],
26
    formatted_address = '',
26
    formatted_address = '',
27
    user_languages = {},
27
    user_languages = {},
28
    user_skills = {},
28
    user_skills = {},
Línea 29... Línea 29...
29
    user_aptitudes = {},
29
    user_aptitudes = {},
30
    user_hobbies_and_interests = {}
30
    user_hobbies_and_interests = {}
31
  } = profile
31
  } = profile;
32
 
32
 
Línea 40... Línea 40...
40
          flexDirection: 'column',
40
          flexDirection: 'column',
41
          gap: 1
41
          gap: 1
42
        }}
42
        }}
43
      >
43
      >
44
        <ProfileCard
44
        <ProfileCard
45
          {...profile}
-
 
46
          sizes={{
-
 
47
            image: profile.image_size_profile,
-
 
48
            cover: profile.image_size_cover
-
 
49
          }}
-
 
50
          uuid={profile.user_uuid}
-
 
51
          image={profile.image}
-
 
52
          cover={profile.cover}
45
          cover={profile.cover}
53
          edit
46
          avatar={profile.image}
-
 
47
          name={profile.full_name}
-
 
48
          description={profile.overview}
-
 
49
          address={profile.formatted_address}
-
 
50
          coverUrl={profile.link_cover_upload}
-
 
51
          avatarUrl={profile.link_image_upload}
-
 
52
          coverSize={profile.image_size_cover}
-
 
53
          avatarSize={profile.image_size_profile}
-
 
54
          requestConnection={profile.request_connection}
-
 
55
          linkRequest={profile.link_request}
-
 
56
          linkCancel={profile.link_cancel}
-
 
57
          linkInmail={profile.link_inmail}
-
 
58
          following={profile.following}
-
 
59
          totalConnections={profile.follower}
-
 
60
          facebook={profile.facebook}
-
 
61
          twitter={profile.twitter}
-
 
62
          instagram={profile.instagram}
54
        />
63
        />
Línea 55... Línea 64...
55
 
64
 
Línea 56... Línea 65...
56
        <ExperiencesCard experiences={user_experiences} uuid={uuid} edit />
65
        <ExperiencesCard experiences={user_experiences} uuid={uuid} edit />
Línea 57... Línea 66...
57
 
66
 
Línea 58... Línea -...
58
        <EducationsCard educations={user_educations} uuid={uuid} edit />
-
 
59
 
67
        <EducationsCard educations={user_educations} uuid={uuid} edit />
60
        <LocationCard address={formatted_address} uuid={uuid} edit />
-
 
61
 
-
 
62
        <LanguagesCard
-
 
Línea 63... Línea -...
63
          languages={formatObjectToArray(user_languages)}
-
 
64
          uuid={uuid}
68
 
65
          edit
-
 
66
        />
-
 
67
 
-
 
Línea 68... Línea -...
68
        <SkillsCard
-
 
69
          skills={formatObjectToArray(user_skills)}
69
        <LocationCard address={formatted_address} uuid={uuid} edit />
70
          uuid={uuid}
-
 
71
          edit
-
 
72
        />
-
 
Línea 73... Línea -...
73
 
-
 
74
        <AptitudesCard
70
 
75
          aptitudes={formatObjectToArray(user_aptitudes)}
-
 
76
          uuid={uuid}
-
 
77
          edit
-
 
78
        />
71
        <LanguagesCard languages={formatObjectToArray(user_languages)} uuid={uuid} edit />
79
 
72
 
80
        <HobbiesCard
73
        <SkillsCard skills={formatObjectToArray(user_skills)} uuid={uuid} edit />
81
          hobbies={formatObjectToArray(user_hobbies_and_interests)}
74
 
Línea 82... Línea 75...
82
          uuid={uuid}
75
        <AptitudesCard aptitudes={formatObjectToArray(user_aptitudes)} uuid={uuid} edit />