Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

Rev 1588 Rev 1592
Línea 32... Línea 32...
32
    link_approve,
32
    link_approve,
33
    link_inmail,
33
    link_inmail,
34
    link_request,
34
    link_request,
35
    link_unblock,
35
    link_unblock,
36
    link_unfollow,
36
    link_unfollow,
-
 
37
    link_leave,
37
    link_admin,
38
    link_admin,
38
    fetchCallback
39
    fetchCallback
39
  } = props;
40
  } = props;
Línea 40... Línea 41...
40
 
41
 
Línea 44... Línea 45...
44
  const [showBlockConfirmationBox, setShowBlockConfirmationBox] = useState(false);
45
  const [showBlockConfirmationBox, setShowBlockConfirmationBox] = useState(false);
45
  const [showRejectConfirmationBox, setShowRejectConfirmationBox] = useState(false);
46
  const [showRejectConfirmationBox, setShowRejectConfirmationBox] = useState(false);
46
  const [showApproveConfirmationBox, setShowApproveConfirmationBox] = useState(false);
47
  const [showApproveConfirmationBox, setShowApproveConfirmationBox] = useState(false);
47
  const [showRequestConfirmationBox, setShowRequestConfirmationBox] = useState(false);
48
  const [showRequestConfirmationBox, setShowRequestConfirmationBox] = useState(false);
48
  const [showUnblockConfirmationBox, setShowUnblockConfirmationBox] = useState(false);
49
  const [showUnblockConfirmationBox, setShowUnblockConfirmationBox] = useState(false);
-
 
50
  const [showLeaveConfirmationBox, setShowLeaveConfirmationBox] = useState(false);
Línea 49... Línea 51...
49
 
51
 
50
  const [loading, setLoading] = useState(false)
52
  const [loading, setLoading] = useState(false)
51
  const handleShowConfirmationBox = (show = !showConfirmationBox) => {
53
  const handleShowConfirmationBox = (show = !showConfirmationBox) => {
52
    setShowConfirmationBox(show);
54
    setShowConfirmationBox(show);
Línea 67... Línea 69...
67
    setShowRequestConfirmationBox(show);
69
    setShowRequestConfirmationBox(show);
68
  };
70
  };
69
  const handleUnblockConfirmationBox = (show = !showConfirmationBox) => {
71
  const handleUnblockConfirmationBox = (show = !showConfirmationBox) => {
70
    setShowUnblockConfirmationBox(show);
72
    setShowUnblockConfirmationBox(show);
71
  };
73
  };
-
 
74
  const handleLeaveConfirmationBox = (show = !showConfirmationBox) => {
-
 
75
    setShowLeaveConfirmationBox(show);
-
 
76
  };
Línea 72... Línea 77...
72
 
77
 
73
  const handleCancelApply = (url = link_delete) => {
78
  const handleCancelApply = (url = link_delete) => {
74
    setLoading(true);
79
    setLoading(true);
75
    axios
80
    axios
Línea 347... Línea 352...
347
                    Cancelar
352
                    Cancelar
348
                  </a>
353
                  </a>
349
                </li>
354
                </li>
350
              )
355
              )
351
            }
356
            }
-
 
357
            {
-
 
358
              link_leave && (
-
 
359
                <li>
-
 
360
                  <a
-
 
361
                    href="#"
-
 
362
                    className="btn btn-primary"
-
 
363
                    onClick={(e) => {
-
 
364
                      e.preventDefault();
-
 
365
                      handleCancelConfirmationBox();
-
 
366
                    }}
-
 
367
                  >
-
 
368
                    Abandonar
-
 
369
                  </a>
-
 
370
                </li>
-
 
371
              )
-
 
372
            }
Línea 352... Línea 373...
352
 
373
 
353
          </ul>
374
          </ul>
354
        </div>
375
        </div>
355
        {link_delete && (
376
        {link_delete && (
Línea 413... Línea 434...
413
              onClose={() => handleUnblockConfirmationBox(false)}
434
              onClose={() => handleUnblockConfirmationBox(false)}
414
              onAccept={() => handleCancelApply(link_unblock)}
435
              onAccept={() => handleCancelApply(link_unblock)}
415
            />
436
            />
416
          </div>
437
          </div>
417
        )}
438
        )}
-
 
439
        {link_leave && (
-
 
440
          <div style={{ position: "relative" }}>
-
 
441
            <ConfirmationBox
-
 
442
              show={showLeaveConfirmationBox}
-
 
443
              onClose={() => handleLeaveConfirmationBox(false)}
-
 
444
              onAccept={() => handleCancelApply(link_leave)}
-
 
445
            />
-
 
446
          </div>
-
 
447
        )}
418
        {loading && (
448
        {loading && (
419
          <StyledSpinnerContainer>
449
          <StyledSpinnerContainer>
420
            <Spinner />
450
            <Spinner />
421
          </StyledSpinnerContainer>
451
          </StyledSpinnerContainer>
422
        )}
452
        )}