Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

Rev 1095 Rev 1158
Línea 40... Línea 40...
40
  };
40
  };
Línea 41... Línea 41...
41
 
41
 
42
  const handleCancel = (link) => {
42
  const handleCancel = (link) => {
43
    setLoading(true);
43
    setLoading(true);
44
    axios.post(link)
44
    axios.post(link)
45
    .then((response) => {
45
      .then((response) => {
46
      const resData = response.data;
46
        const resData = response.data;
47
      if (resData.success) {
47
        if (resData.success) {
48
        addNotification({
48
          addNotification({
49
          style: "success",
49
            style: "success",
50
          msg: resData.data,
50
            msg: resData.data,
51
        });
51
          });
52
        fetchSentRequests();
52
          fetchSentRequests();
53
      } else {
53
        } else {
54
        setLoading(false);
54
          setLoading(false);
55
        addNotification({
55
          addNotification({
56
          style: "danger",
56
            style: "danger",
57
          msg: resData.data ?? "ha ocurrido un error",
57
            msg: resData.data ?? "ha ocurrido un error",
58
        });
58
          });
59
      }
59
        }
60
    });
60
      });
Línea 61... Línea 61...
61
  };
61
  };
62
 
62
 
63
  const handleSearch = () => { 
63
  const handleSearch = () => {
64
    clearTimeout(axiosThrottle);
64
    clearTimeout(axiosThrottle);
65
    const searchValue = getValues("search");
65
    const searchValue = getValues("search");
66
  
66
 
67
    axiosThrottle = setTimeout(() => {
67
    axiosThrottle = setTimeout(() => {
68
      fetchSentRequests(searchValue);
68
      fetchSentRequests(searchValue);
Línea 104... Línea 104...
104
          <div
104
          <div
105
            className="row"
105
            className="row"
106
            id="profiles-container"
106
            id="profiles-container"
107
          >
107
          >
108
            {
108
            {
109
              sentRequests
109
              sentRequests.length
110
                ?
110
                ?
111
                sentRequests.map((request, index) => {
111
                sentRequests.map((request, index) => {
112
                  return (
112
                  return (
113
                    <RequestTemplate
113
                    <RequestTemplate
114
                      key={index}
114
                      key={index}
Línea 117... Línea 117...
117
                    />
117
                    />
118
                  )
118
                  )
119
                }
119
                }
120
                )
120
                )
121
                :
121
                :
-
 
122
                <div style={{ margin: "auto", textAlign: "center" }}>
-
 
123
                  Ningún registro coincidio con su consulta
122
                <p>No hay resultados</p>
124
                </div>
123
            }
125
            }
124
          </div>
126
          </div>
125
          {/* <!--product-feed-tab end--> */}
127
          {/* <!--product-feed-tab end--> */}
126
        </div>
128
        </div>
127
      </div>
129
      </div>