Proyectos de Subversion LeadersLinked - SPA

Rev

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

Rev 1485 Rev 2194
Línea 46... Línea 46...
46
 
46
 
47
        addUrl.current = data.link_answers_add
47
        addUrl.current = data.link_answers_add
48
        setQuestion(data)
48
        setQuestion(data)
49
      })
49
      })
50
      .catch((error) => {
-
 
51
        dispatch(
-
 
52
          addNotification({
-
 
53
            style: 'danger',
50
      .catch((error) => {
54
            msg: 'Error interno. Por favor, inténtelo de nuevo más tarde.'
-
 
55
          })
-
 
56
        )
-
 
57
        throw new Error(error)
51
        dispatch(addNotification({ style: 'danger', msg: error.message }))
58
      })
52
      })
Línea 59... Línea 53...
59
  }
53
  }
60
 
54
 
Línea 77... Línea 71...
77
        closeModal()
71
        closeModal()
78
        dispatch(addNotification({ style: 'success', msg: data }))
72
        dispatch(addNotification({ style: 'success', msg: data }))
79
        history.replace('/my-coach')
73
        history.replace('/my-coach')
80
      })
74
      })
81
      .catch((error) => {
75
      .catch((error) => {
82
        dispatch(
-
 
83
          addNotification({
-
 
84
            style: 'danger',
-
 
85
            msg: 'Ha ocurrido un error, por favor intente más tarde.'
76
        dispatch(addNotification({ style: 'danger', msg: error.message }))
86
          })
-
 
87
        )
-
 
88
        throw new Error(error)
-
 
89
      })
77
      })
90
  }
78
  }
Línea 91... Línea 79...
91
 
79
 
92
  const confirmDeleteAnswer = () => {
80
  const confirmDeleteAnswer = () => {
Línea 112... Línea 100...
112
          reactions: data.total_reactions
100
          reactions: data.total_reactions
113
        }))
101
        }))
114
        closeModal()
102
        closeModal()
115
      })
103
      })
116
      .catch((error) => {
104
      .catch((error) => {
117
        dispatch(
-
 
118
          addNotification({
-
 
119
            style: 'danger',
-
 
120
            msg: 'Ha ocurrido un error, por favor intente más tarde.'
105
        dispatch(addNotification({ style: 'danger', msg: error.message }))
121
          })
-
 
122
        )
-
 
123
        throw new Error(error)
-
 
124
      })
106
      })
125
  }
107
  }
Línea 126... Línea 108...
126
 
108
 
127
  const deleteQuestion = (url) => {
109
  const deleteQuestion = (url) => {
Línea 208... Línea 190...
208
          }
190
          }
Línea 209... Línea 191...
209
 
191
 
210
          setAnswers(data.items)
192
          setAnswers(data.items)
211
        })
193
        })
212
        .catch((error) => {
-
 
213
          dispatch(
-
 
214
            addNotification({
-
 
215
              style: 'danger',
194
        .catch((error) => {
216
              msg: 'Error interno. Por favor, inténtelo de nuevo más tarde.'
-
 
217
            })
-
 
218
          )
-
 
219
          throw new Error(error)
195
          dispatch(addNotification({ style: 'danger', msg: error.message }))
220
        })
196
        })
221
    }
197
    }
Línea 222... Línea 198...
222
  }, [question])
198
  }, [question])