Proyectos de Subversion LeadersLinked - SPA

Rev

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

Rev 1507 Rev 1567
Línea 4... Línea 4...
4
import { useHistory } from 'react-router-dom'
4
import { useHistory } from 'react-router-dom'
5
import { addNotification } from 'store/notification/notification.actions'
5
import { addNotification } from 'store/notification/notification.actions'
6
import { useDispatch, useSelector } from 'react-redux'
6
import { useDispatch, useSelector } from 'react-redux'
7
import styled from 'styled-components'
7
import styled from 'styled-components'
Línea 8... Línea -...
8
 
-
 
9
import { ButtonPrimary, ButtonSecondary, ButtonTertiary } from '@buttons'
8
 
10
import Spinner from '../UI/Spinner'
9
import Spinner from '../UI/Spinner'
11
import WidgetWrapper from '../widgets/WidgetLayout'
10
import WidgetWrapper from '../widgets/WidgetLayout'
-
 
11
import ConfirmModal from '../modals/ConfirmModal'
Línea 12... Línea 12...
12
import ConfirmModal from '../modals/ConfirmModal'
12
import Button from '../UI/buttons/Buttons'
13
 
13
 
14
const StyledSpinnerContainer = styled.div`
14
const StyledSpinnerContainer = styled.div`
15
  position: absolute;
15
  position: absolute;
Línea 202... Línea 202...
202
            {status && <span>{status}</span>}
202
            {status && <span>{status}</span>}
203
            {isTopData && (
203
            {isTopData && (
204
              <ul>
204
              <ul>
205
                {link_view && (
205
                {link_view && (
206
                  <li>
206
                  <li>
207
                    <ButtonPrimary
207
                    <Button
208
                      label={btnAcceptTitle || labels.view_profile}
208
                      variant='primary'
209
                      onClick={() => navigateTo(link_view)}
209
                      onClick={() => navigateTo(link_view)}
210
                    />
210
                    >
-
 
211
                      {btnAcceptTitle || labels.view_profile}
-
 
212
                    </Button>
211
                  </li>
213
                  </li>
212
                )}
214
                )}
213
                {link_inmail && (
215
                {link_inmail && (
214
                  <li>
216
                  <li>
215
                    <ButtonSecondary
217
                    <Button
216
                      label={labels.message}
218
                      variant='secondary'
217
                      onClick={() => navigateTo(link_inmail)}
219
                      onClick={() => navigateTo(link_inmail)}
218
                    />
220
                    >
-
 
221
                      {labels.message}
-
 
222
                    </Button>
219
                  </li>
223
                  </li>
220
                )}
224
                )}
221
              </ul>
225
              </ul>
222
            )}
226
            )}
223
          </StyledContent>
227
          </StyledContent>
224
        </StyledHeader>
228
        </StyledHeader>
225
        <Actions>
229
        <Actions>
226
          {link_view && !isTopData ? (
230
          {link_view && !isTopData ? (
227
            <ButtonPrimary
-
 
228
              onClick={() => navigateTo(link_view)}
231
            <Button variant='primary' onClick={() => navigateTo(link_view)}>
229
              label={btnAcceptTitle || labels.view_profile}
232
              {btnAcceptTitle || labels.view_profile}
230
            />
233
            </Button>
231
          ) : null}
234
          ) : null}
Línea 232... Línea 235...
232
 
235
 
233
          {link_edit ? (
-
 
234
            <ButtonSecondary
236
          {link_edit ? (
235
              onClick={() => navigateTo(link_edit)}
237
            <Button onClick={() => navigateTo(link_edit)} variant='secondary'>
236
              label={btnEditTitle || labels.edit}
238
              {btnEditTitle || labels.edit}
237
            />
239
            </Button>
Línea 238... Línea 240...
238
          ) : null}
240
          ) : null}
239
 
-
 
240
          {link_accept ? (
241
 
241
            <ButtonSecondary
242
          {link_accept ? (
242
              onClick={() => onConfirm(link_accept)}
243
            <Button onClick={() => onConfirm(link_accept)} variant='secondary'>
243
              label={labels.accept}
244
              {labels.accept}
Línea 244... Línea 245...
244
            />
245
            </Button>
245
          ) : null}
-
 
246
 
246
          ) : null}
247
          {link_inmail && !isTopData ? (
247
 
248
            <ButtonSecondary
248
          {link_inmail && !isTopData ? (
249
              onClick={() => navigateTo(link_inmail)}
249
            <Button variant='secondary' onClick={() => navigateTo(link_inmail)}>
Línea 250... Línea 250...
250
              label={labels.message}
250
              {labels.message}
251
            />
251
            </Button>
-
 
252
          ) : null}
252
          ) : null}
253
 
-
 
254
          {link_admin ? (
253
 
255
            <Button
254
          {link_admin ? (
256
              variant='secondary'
255
            <ButtonSecondary
257
              onClick={() => getManageUrl(link_admin)}
Línea 256... Línea 258...
256
              onClick={() => getManageUrl(link_admin)}
258
            >
257
              label={labels.administrate}
-
 
258
            />
259
              {labels.administrate}
259
          ) : null}
260
            </Button>
260
 
261
          ) : null}
261
          {link_approve ? (
262
 
Línea 262... Línea 263...
262
            <ButtonSecondary
263
          {link_approve ? (
263
              onClick={() => onConfirm(link_approve)}
-
 
264
              label={labels.approve}
264
            <Button variant='secondary' onClick={() => onConfirm(link_approve)}>
265
            />
265
              {labels.approve}
266
          ) : null}
266
            </Button>
267
 
267
          ) : null}
Línea 268... Línea 268...
268
          {link_unblock ? (
268
 
269
            <ButtonSecondary
-
 
270
              onClick={() => onConfirm(link_unblock)}
269
          {link_unblock ? (
271
              label={labels.unblock}
270
            <Button variant='secondary' onClick={() => onConfirm(link_unblock)}>
272
            />
271
              {labels.unblock}
273
          ) : null}
272
            </Button>
Línea 274... Línea 273...
274
 
273
          ) : null}
275
          {link_request ? (
274
 
-
 
275
          {link_request ? (
276
            <ButtonSecondary
276
            <Button variant='secondary' onClick={() => onConfirm(link_request)}>
-
 
277
              {labels.connect}
277
              onClick={() => onConfirm(link_request)}
278
            </Button>
278
              label={labels.connect}
279
          ) : null}
279
            />
280
 
Línea 280... Línea 281...
280
          ) : null}
281
          {link_impersonate ? (
281
 
-
 
282
          {link_impersonate ? (
282
            <Button
283
            <ButtonSecondary
283
              variant='secondary'
284
              onClick={() => getImpersonateUrl(link_impersonate)}
284
              onClick={() => getImpersonateUrl(link_impersonate)}
285
              label='Personificar'
285
            >
Línea 286... Línea 286...
286
            />
286
              Personificar
287
          ) : null}
-
 
288
 
287
            </Button>
289
          {link_remove ? (
288
          ) : null}
290
            <ButtonTertiary
289
 
291
              onClick={() => showConfirm(link_remove)}
290
          {link_remove ? (
Línea 292... Línea 291...
292
              label={labels.remove_application}
291
            <Button variant='tertiary' onClick={() => showConfirm(link_remove)}>
293
            />
-
 
294
          ) : null}
292
              {labels.remove_application}
295
 
293
            </Button>
296
          {link_reject ? (
294
          ) : null}
297
            <ButtonTertiary
295
 
Línea 298... Línea 296...
298
              onClick={() => showConfirm(link_reject)}
296
          {link_reject ? (
299
              label={labels.reject}
297
            <Button variant='tertiary' onClick={() => showConfirm(link_reject)}>
-
 
298
              {labels.reject}
300
            />
299
            </Button>
-
 
300
          ) : null}
301
          ) : null}
301
 
302
 
302
          {link_delete ? (
303
          {link_delete ? (
303
            <Button variant='tertiary' onClick={() => showConfirm(link_delete)}>
Línea 304... Línea 304...
304
            <ButtonTertiary
304
              {btnCancelTitle || labels.cancel}
305
              onClick={() => showConfirm(link_delete)}
-
 
306
              label={btnCancelTitle || labels.cancel}
305
            </Button>
307
            />
306
          ) : null}
308
          ) : null}
307
 
309
 
308
          {link_unfollow ? (
Línea 310... Línea 309...
310
          {link_unfollow ? (
309
            <Button
311
            <ButtonTertiary
-
 
312
              onClick={() => handleUnfollow(link_unfollow)}
310
              variant='tertiary'
313
              label={labels.unfollow}
311
              onClick={() => handleUnfollow(link_unfollow)}
314
            />
312
            >
315
          ) : null}
313
              {labels.unfollow}
Línea 316... Línea 314...
316
 
314
            </Button>
317
          {link_block ? (
-
 
318
            <ButtonTertiary
315
          ) : null}
319
              onClick={() => showConfirm(link_block)}
316
 
320
              label={labels.block}
317
          {link_block ? (
321
            />
318
            <Button variant='tertiary' onClick={() => showConfirm(link_block)}>
322
          ) : null}
319
              {labels.block}
323
 
320
            </Button>
324
          {link_cancel ? (
321
          ) : null}
325
            <ButtonTertiary
322