Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

Rev 3929 Rev 3930
Línea 122... Línea 122...
122
      infoFollows = infoFollows.slice(0, 3);
122
      infoFollows = infoFollows.slice(0, 3);
123
    }
123
    }
124
    return infoFollows
124
    return infoFollows
125
  }
125
  }
126
  return (
126
  return (
127
    <React.Fragment>
127
    <>
128
      <section className="cover-sec">
128
      <section className="cover-sec">
129
        <img
129
        <img
130
          id="user-cover-img"
130
          id="user-cover-img"
131
          src={`/storage/type/company-cover/code/${companyId}/${cover ? `filename/${cover}` : ""
131
          src={`/storage/type/company-cover/code/${companyId}/${cover ? `filename/${cover}` : ""
132
            }`}
132
            }`}
133
          alt="cover-image"
133
          alt="cover-image"
134
        />
134
        />
135
      </section>
135
      </section>
136
      <main>
-
 
137
        <div className="main-section">
136
      <main className="main-section">
138
          <div className="main-section-data">
137
        <div className="main-section-data">
139
            <div className="main-left-sidebar">
138
          <div className="main-left-sidebar">
140
              <div className="user_profile">
139
            <div className="user_profile">
141
                <div className="user-pro-img">
140
              <div className="user-pro-img">
142
                  <img
141
                <img
143
                    src={`/storage/type/company/code/${companyId}/${image ? `filename/${image}` : ""}`}
142
                  src={`/storage/type/company/code/${companyId}/${image ? `filename/${image}` : ""}`}
144
                    alt="profile-image"
143
                  alt="profile-image"
-
 
144
                />
-
 
145
              </div>
-
 
146
              <div className="user_pro_status horizontal-list">
-
 
147
                <h1>{companyName}</h1>
-
 
148
                <div className="row px-5" style={{ marginTop: '10px' }}>
-
 
149
                  {facebook &&
-
 
150
                    <i
-
 
151
                      onClick={() => window.location.href = facebook}
-
 
152
                      className="cursor-pointer fa fa-facebook"
-
 
153
                      style={{ fontSize: '1.4rem' }}
-
 
154
                    />
-
 
155
                  }
-
 
156
                  {twitter &&
-
 
157
                    <i
-
 
158
                      onClick={() => window.location.href = twitter}
-
 
159
                      className="cursor-pointer fa fa-twitter"
-
 
160
                      style={{ fontSize: '1.4rem' }}
-
 
161
                    />
-
 
162
                  }
-
 
163
                  {instagram &&
-
 
164
                    <i
-
 
165
                      onClick={() => window.location.href = instagram}
-
 
166
                      className="fa fa-instagram cursor-pointer"
-
 
167
                      style={{ fontSize: '1.4rem' }}
145
                  />
168
                    />
-
 
169
                  }
146
                </div>
170
                </div>
147
                <div className="user_pro_status horizontal-list">
171
                <div className="container horizontal-list">
148
                  <h1>{companyName}</h1>
172
                  <div className="row ">
149
                  <div className="row px-5" style={{ marginTop: '10px' }}>
173
                    <div className="members_count">
-
 
174
                      <b style={{ fontSize: '1rem' }} id="total-followers">{followers}</b>
-
 
175
                      <p style={{ fontSize: '1rem' }} className="ellipsis">Seguidores</p>
150
                    {facebook &&
176
                    </div>
-
 
177
                    {authorizedLinks?.link_unfollow &&
151
                      <i
178
                      <button
152
                        onClick={() => window.location.href = facebook}
179
                        className="btn btn-secondary"
153
                        className="cursor-pointer fa fa-facebook"
180
                        onClick={() => handleButtonAction(authorizedLinks?.link_unfollow)}
-
 
181
                      >
154
                        style={{ fontSize: '1.4rem' }}
182
                        Dejar de seguir
155
                      />
183
                      </button>
156
                    }
184
                    }
157
                    {twitter &&
185
                    {authorizedLinks?.link_follow &&
158
                      <i
186
                      <button
159
                        onClick={() => window.location.href = twitter}
187
                        className="btn btn-secondary"
160
                        className="cursor-pointer fa fa-twitter"
188
                        onClick={() => handleButtonAction(authorizedLinks?.link_follow)}
-
 
189
                      >
161
                        style={{ fontSize: '1.4rem' }}
190
                        Seguir
162
                      />
191
                      </button>
163
                    }
192
                    }
-
 
193
                    {
-
 
194
                      (authorizedLinks?.link_request && authorizedLinks?.link_unfollow)
164
                    {instagram &&
195
                      &&
-
 
196
                      <button
-
 
197
                        className="btn btn-tertiary"
-
 
198
                        onClick={() => handleButtonAction(authorizedLinks?.link_request)}
-
 
199
                      >
-
 
200
                        ¿Trabaja en esta empresa?
-
 
201
                      </button>
-
 
202
                    }
-
 
203
                    {authorizedLinks?.link_accept &&
-
 
204
                      <button
-
 
205
                        className="btn btn-tertiary"
-
 
206
                        onClick={() => handleButtonAction(authorizedLinks?.link_accept)}
165
                      <i
207
                      >
-
 
208
                        Aceptar
-
 
209
                      </button>
-
 
210
                    }
-
 
211
                    {authorizedLinks?.link_cancel &&
-
 
212
                      <button
-
 
213
                        title=""
-
 
214
                        className="btn btn-tertiary"
166
                        onClick={() => window.location.href = instagram}
215
                        onClick={() => handleButtonAction(authorizedLinks?.link_cancel)}
-
 
216
                      >
-
 
217
                        Cancelar
-
 
218
                      </button>
-
 
219
                    }
-
 
220
                    {authorizedLinks?.link_reject &&
-
 
221
                      <button
-
 
222
                        title=""
167
                        className="fa fa-instagram cursor-pointer"
223
                        className="btn btn-tertiary"
-
 
224
                        onClick={() => handleButtonAction(authorizedLinks?.link_reject)}
-
 
225
                      >
-
 
226
                        Rechazar
-
 
227
                      </button>
-
 
228
                    }
-
 
229
                    {authorizedLinks?.link_leave &&
-
 
230
                      <button
168
                        style={{ fontSize: '1.4rem' }}
231
                        data-link="{{>link_leave}}"
-
 
232
                        title=""
-
 
233
                        className="btn btn-tertiary"
-
 
234
                        onClick={() => handleButtonAction(authorizedLinks?.link_leave)}
-
 
235
                      >
-
 
236
                        Abandonar esta empresa
-
 
237
                      </button>
-
 
238
                    }
-
 
239
                    {authorizedLinks?.link_contact &&
-
 
240
                      <a
-
 
241
                        href={authorizedLinks?.link_contact}
-
 
242
                        className="btn btn-primary"
169
                      />
243
                      >
-
 
244
                        Mensaje
-
 
245
                      </a>
170
                    }
246
                    }
171
                  </div>
-
 
172
                  <div className="container horizontal-list">
-
 
173
                    <div className="row ">
-
 
174
                      <div className="members_count">
-
 
175
                        <b style={{ fontSize: '1rem' }} id="total-followers">{followers}</b>
-
 
176
                        <p style={{ fontSize: '1rem' }} className="ellipsis">Seguidores</p>
-
 
177
                      </div>
-
 
178
                      {authorizedLinks?.link_unfollow &&
-
 
179
                        <button
-
 
180
                          className="btn btn-secondary"
-
 
181
                          onClick={() => handleButtonAction(authorizedLinks?.link_unfollow)}
-
 
182
                        >
-
 
183
                          Dejar de seguir
-
 
184
                        </button>
-
 
185
                      }
-
 
186
                      {authorizedLinks?.link_follow &&
-
 
187
                        <button
-
 
188
                          className="btn btn-secondary"
-
 
189
                          onClick={() => handleButtonAction(authorizedLinks?.link_follow)}
-
 
190
                        >
-
 
191
                          Seguir
-
 
192
                        </button>
-
 
193
                      }
-
 
194
                      {
-
 
195
                        (authorizedLinks?.link_request && authorizedLinks?.link_unfollow)
-
 
196
                        &&
-
 
197
                        <button
-
 
198
                          className="btn btn-tertiary"
-
 
199
                          onClick={() => handleButtonAction(authorizedLinks?.link_request)}
-
 
200
                        >
-
 
201
                          ¿Trabaja en esta empresa?
-
 
202
                        </button>
-
 
203
                      }
-
 
204
                      {authorizedLinks?.link_accept &&
-
 
205
                        <button
-
 
206
                          className="btn btn-tertiary"
-
 
207
                          onClick={() => handleButtonAction(authorizedLinks?.link_accept)}
-
 
208
                        >
-
 
209
                          Aceptar
-
 
210
                        </button>
-
 
211
                      }
-
 
212
                      {authorizedLinks?.link_cancel &&
-
 
213
                        <button
-
 
214
                          title=""
-
 
215
                          className="btn btn-tertiary"
-
 
216
                          onClick={() => handleButtonAction(authorizedLinks?.link_cancel)}
-
 
217
                        >
-
 
218
                          Cancelar
-
 
219
                        </button>
-
 
220
                      }
-
 
221
                      {authorizedLinks?.link_reject &&
-
 
222
                        <button
-
 
223
                          title=""
-
 
224
                          className="btn btn-tertiary"
-
 
225
                          onClick={() => handleButtonAction(authorizedLinks?.link_reject)}
-
 
226
                        >
-
 
227
                          Rechazar
-
 
228
                        </button>
-
 
229
                      }
-
 
230
                      {authorizedLinks?.link_leave &&
-
 
231
                        <button
-
 
232
                          data-link="{{>link_leave}}"
-
 
233
                          title=""
-
 
234
                          className="btn btn-tertiary"
-
 
235
                          onClick={() => handleButtonAction(authorizedLinks?.link_leave)}
-
 
236
                        >
-
 
237
                          Abandonar esta empresa
-
 
238
                        </button>
-
 
239
                      }
-
 
240
                      {authorizedLinks?.link_contact &&
-
 
241
                        <a
-
 
242
                          href={authorizedLinks?.link_contact}
-
 
243
                          className="btn btn-primary"
-
 
244
                        >
-
 
245
                          Mensaje
-
 
246
                        </a>
-
 
247
                      }
-
 
248
                    </div>
-
 
249
                  </div>
247
                  </div>
250
                </div>
248
                </div>
251
              </div>
249
              </div>
252
              <div className="d-none d-md-block">
-
 
253
                <CompanyFollowersHelper companyId={companyId} />
-
 
254
              </div>
-
 
255
            </div>
250
            </div>
256
            <div className="main-ws-sec">
251
            <div className="d-none d-md-block">
257
              <div className="user-tab-sec rewivew">
252
              <CompanyFollowersHelper companyId={companyId} />
258
                {!initialLoading &&
253
            </div>
259
                  <div className="row">
254
          </div>
260
                    {isFollower &&
255
          <div className="main-ws-sec">
261
                      <div className="col text-left pl-0">
256
            <div className="user-tab-sec rewivew">
262
                        <button
257
              {!initialLoading &&
263
                          className="btn btn-link p-0 text-decoration-none"
-
 
264
                          onClick={() => changeCurrentTab(TABS.FEEDS)}
-
 
265
                          style={{ padding: '0 !important' }}
-
 
266
                        >
-
 
267
                          <span className="p-0 default-link font-weight-bold text-dark">Ver Publicaciones</span>
-
 
268
                        </button>
258
                <div className="row">
269
                      </div>
259
                  {isFollower &&
270
                    }
-
 
271
                    <div className="col text-right pl-0">
260
                    <div className="col text-left pl-0">
272
                      <button
261
                      <button
273
                        className="btn btn-link p-0 text-decoration-none"
262
                        className="btn btn-link p-0 text-decoration-none"
274
                        onClick={() => changeCurrentTab(TABS.INFO)}
263
                        onClick={() => changeCurrentTab(TABS.FEEDS)}
275
                        style={{ padding: '0 !important' }}
264
                        style={{ padding: '0 !important' }}
276
                      >
265
                      >
277
                        <span className="p-0 default-link font-weight-bold text-dark">Ver Información</span>
266
                        <span className="p-0 default-link font-weight-bold text-dark">Ver Publicaciones</span>
278
                      </button>
267
                      </button>
279
                    </div>
268
                    </div>
280
                  </div>
-
 
281
                }
-
 
282
              </div>
-
 
283
              {
-
 
284
                currentTab === TABS.FEEDS
-
 
285
                &&
-
 
286
                <div
-
 
287
                  className="product-feed-tab animated fadeIn"
-
 
288
                  id="feed-dd feed"
-
 
289
                  style={{ display: 'block' }}
-
 
290
                >
-
 
291
                  <div className="posts-section">
-
 
292
                    <FeedSection
-
 
293
                      routeTimeline={timeline}
-
 
294
                      image={`/storage/type/company/code/${companyId}/${image ? `filename/${image}` : ""}`}
-
 
295
                    />
-
 
296
                  </div>
-
 
297
                </div>
-
 
298
              }
-
 
299
              {
-
 
300
                currentTab === TABS.INFO
-
 
301
                &&
-
 
302
                < div
-
 
303
                  className="product-feed-tab animated fadeIn"
-
 
304
                  id="feed-dd info"
-
 
305
                  style={{ display: 'block' }}
-
 
306
                >
-
 
307
                  {
-
 
308
                    overview
-
 
309
                    &&
-
 
310
                    <div className="user-profile-extended-ov">
-
 
311
                      <h3>Visión general</h3>
-
 
312
                      <span>{parse(overview)}</span>
-
 
313
                    </div>
-
 
314
                  }
-
 
315
                  {
-
 
316
                    locations
-
 
317
                    &&
-
 
318
                    <div className="user-profile-extended-ov st2">
-
 
319
                      <h3>Ubicación</h3>
-
 
320
                      <span>
-
 
321
                        {locations.map(
-
 
322
                          ({ formatted_address, is_main }, index) => (
-
 
323
                            <React.Fragment key={index}>
-
 
324
                              {index >= 0 ? <hr /> : ""}
-
 
325
                              <p>
-
 
326
                                {`${formatted_address} ${is_main === "y" ? "(Principal)" : ""
-
 
327
                                  }`}
-
 
328
                              </p>
-
 
329
                            </React.Fragment>
-
 
330
                          )
-
 
331
                        )}
-
 
332
                      </span>
-
 
333
                    </div>
-
 
334
                  }
-
 
335
                  {
-
 
336
                    industry
-
 
337
                    &&
-
 
338
                    <div className="user-profile-ov">
-
 
339
                      <h3>Industria</h3>
-
 
340
                      <span>{industry}</span>
-
 
341
                    </div>
-
 
342
                  }
269
                  }
343
                  {
-
 
344
                    companySize
-
 
345
                    &&
-
 
346
                    <div className="user-profile-ov">
270
                  <div className="col text-right pl-0">
347
                      <h3>Tamaño de la empresa</h3>
-
 
348
                      <span>{companySize}</span>
-
 
349
                    </div>
271
                    <button
350
                  }
-
 
351
                  {
-
 
352
                    foundationYear
-
 
353
                    &&
-
 
354
                    <div className="user-profile-ov">
272
                      className="btn btn-link p-0 text-decoration-none"
355
                      <h3>Año de fundación</h3>
273
                      onClick={() => changeCurrentTab(TABS.INFO)}
356
                      <span>{foundationYear}</span>
274
                      style={{ padding: '0 !important' }}
357
                    </div>
-
 
358
                  }
-
 
359
                  {
-
 
360
                    website
-
 
361
                    &&
275
                    >
362
                    <div className="user-profile-ov">
276
                      <span className="p-0 default-link font-weight-bold text-dark">Ver Información</span>
363
                      <h3>Página web</h3>
-
 
364
                      <span>{website}</span>
-
 
365
                    </div>
277
                    </button>
366
                  }
-
 
367
                </div>
278
                  </div>
368
              }
-
 
369
              {
-
 
370
                initialLoading
-
 
371
                &&
-
 
372
                <div
-
 
373
                  style={{
-
 
374
                    display: "flex",
-
 
375
                    justifyContent: "center",
-
 
376
                    alignItems: "center",
-
 
377
                  }}
-
 
378
                >
-
 
379
                  <Spinner />
-
 
380
                </div>
279
                </div>
381
              }
280
              }
382
            </div>
281
            </div>
383
            <div className="right-sidebar">
-
 
384
              {loading &&
282
            {
385
                <div className="spinner-container">
-
 
386
                  <Spinner />
283
              currentTab === TABS.FEEDS
387
                </div>
284
              &&
388
              }
285
              <div
389
              <div className="peopleYouMayKnow">
286
                className="product-feed-tab animated fadeIn"
390
                <div className="sd-title d-flex align-items-center justify-content-between">
-
 
391
                  <h3>Empresas similares:</h3>
287
                id="feed-dd feed"
392
                  {suggestionCompanies.length >= 5 &&
-
 
393
                    <a href="#" onClick={(e) => {
288
                style={{ display: 'block' }}
394
                      e.preventDefault()
289
              >
395
                      setLookMore(!lookMore)
290
                <div className="posts-section">
396
                    }}>
291
                  <FeedSection
397
                      {lookMore ? 'Ver menos' : 'Ver mas'}
292
                    routeTimeline={timeline}
398
                    </a>
293
                    image={`/storage/type/company/code/${companyId}/${image ? `filename/${image}` : ""}`}
399
                  }
294
                  />
400
                </div>
295
                </div>
-
 
296
              </div>
-
 
297
            }
-
 
298
            {
-
 
299
              currentTab === TABS.INFO
-
 
300
              &&
-
 
301
              < div
-
 
302
                className="product-feed-tab animated fadeIn"
-
 
303
                id="feed-dd info"
-
 
304
                style={{ display: 'block' }}
-
 
305
              >
-
 
306
                {
-
 
307
                  overview
-
 
308
                  &&
401
                <div className="suggest-list">
309
                  <div className="user-profile-extended-ov">
402
                  {suggestionCompanies.length
310
                    <h3>Visión general</h3>
403
                    ? getData().map(element => {
311
                    <span>{parse(overview)}</span>
-
 
312
                  </div>
-
 
313
                }
-
 
314
                {
404
                      return (
315
                  locations
-
 
316
                  &&
405
                        <div className='user' key={element.id}>
317
                  <div className="user-profile-extended-ov st2">
-
 
318
                    <h3>Ubicación</h3>
-
 
319
                    <span>
-
 
320
                      {locations.map(
406
                          <div className="w-100 d-flex align-items-center" style={{ gap: '.5rem' }}>
321
                        ({ formatted_address, is_main }, index) => (
407
                            <a href={element.profile} target="_blank" rel="noreferrer">
322
                          <React.Fragment key={index}>
-
 
323
                            {index >= 0 ? <hr /> : ""}
-
 
324
                            <p>
408
                              <img src={element.image} alt={`${element.name} profile image`} />
325
                              {`${formatted_address} ${is_main === "y" ? "(Principal)" : ""
-
 
326
                                }`}
409
                            </a>
327
                            </p>
410
                            <h4>{element.name}</h4>
328
                          </React.Fragment>
411
                          </div>
329
                        )
-
 
330
                      )}
-
 
331
                    </span>
-
 
332
                  </div>
-
 
333
                }
-
 
334
                {
-
 
335
                  industry
-
 
336
                  &&
412
                          <div className="w-100 d-flex align-items-center justify-content-start" style={{ gap: '.5rem' }}>
337
                  <div className="user-profile-ov">
-
 
338
                    <h3>Industria</h3>
-
 
339
                    <span>{industry}</span>
-
 
340
                  </div>
-
 
341
                }
-
 
342
                {
413
                            <a
343
                  companySize
-
 
344
                  &&
414
                              className="btn btn-primary"
345
                  <div className="user-profile-ov">
-
 
346
                    <h3>Tamaño de la empresa</h3>
-
 
347
                    <span>{companySize}</span>
-
 
348
                  </div>
-
 
349
                }
-
 
350
                {
-
 
351
                  foundationYear
-
 
352
                  &&
415
                              href={element.profile}
353
                  <div className="user-profile-ov">
-
 
354
                    <h3>Año de fundación</h3>
-
 
355
                    <span>{foundationYear}</span>
-
 
356
                  </div>
-
 
357
                }
-
 
358
                {
-
 
359
                  website
-
 
360
                  &&
-
 
361
                  <div className="user-profile-ov">
-
 
362
                    <h3>Página web</h3>
416
                              target='_blank'
363
                    <span>{website}</span>
-
 
364
                  </div>
-
 
365
                }
-
 
366
              </div>
-
 
367
            }
-
 
368
            {
-
 
369
              initialLoading
-
 
370
              &&
-
 
371
              <div
-
 
372
                style={{
-
 
373
                  display: "flex",
-
 
374
                  justifyContent: "center",
-
 
375
                  alignItems: "center",
-
 
376
                }}
-
 
377
              >
-
 
378
                <Spinner />
-
 
379
              </div>
-
 
380
            }
-
 
381
          </div>
-
 
382
          <div className="right-sidebar">
-
 
383
            {loading &&
-
 
384
              <div className="spinner-container">
-
 
385
                <Spinner />
-
 
386
              </div>
-
 
387
            }
-
 
388
            <div className="peopleYouMayKnow">
-
 
389
              <div className="sd-title d-flex align-items-center justify-content-between">
-
 
390
                <h3>Empresas similares:</h3>
-
 
391
                {suggestionCompanies.length >= 5 &&
-
 
392
                  <a href="#" onClick={(e) => {
-
 
393
                    e.preventDefault()
417
                              rel="noreferrer"
394
                    setLookMore(!lookMore)
-
 
395
                  }}>
418
                              style={{ fontSize: '.9rem', borderRadius: '4px' }}
396
                    {lookMore ? 'Ver menos' : 'Ver mas'}
419
                            >
397
                  </a>
-
 
398
                }
-
 
399
              </div>
-
 
400
              <div className="suggest-list">
-
 
401
                {suggestionCompanies.length
420
                              MÁS INF
402
                  ? getData().map(element => {
421
                            </a>
403
                    return (
-
 
404
                      <div className='user' key={element.id}>
-
 
405
                        <div className="w-100 d-flex align-items-center" style={{ gap: '.5rem' }}>
-
 
406
                          <a href={element.profile} target="_blank" rel="noreferrer">
-
 
407
                            <img src={element.image} alt={`${element.name} profile image`} />
422
                          </div>
408
                          </a>
-
 
409
                          <h4>{element.name}</h4>
423
                        </div>
410
                        </div>
-
 
411
                        <div className="w-100 d-flex align-items-center justify-content-start" style={{ gap: '.5rem' }}>
424
                      )
412
                          <a
-
 
413
                            className="btn btn-primary"
-
 
414
                            href={element.profile}
-
 
415
                            target='_blank'
-
 
416
                            rel="noreferrer"
-
 
417
                            style={{ fontSize: '.9rem', borderRadius: '4px' }}
425
                    })
418
                          >
-
 
419
                            MÁS INF
-
 
420
                          </a>
426
                    : <div className="view-more">Sin empresas similares</div>
421
                        </div>
-
 
422
                      </div>
-
 
423
                    )
427
                  }
424
                  })
-
 
425
                  : <div className="view-more">Sin empresas similares</div>
428
                </div>
426
                }
429
              </div>
427
              </div>
430
            </div>
428
            </div>
431
          </div>
429
          </div>
432
        </div>
430
        </div>
433
      </main >
431
      </main >
434
    </React.Fragment >
432
    </>
435
  );
433
  );
436
};
434
};
Línea 437... Línea 435...
437
 
435
 
438
const mapDispatchToProps = {
436
const mapDispatchToProps = {