resources/assets/js/components/Note.js
/**
  **handling the update of new note
  **/
handling the update of new note
handling the update of new note
handleNoteEdit(row,cellName,values){
    var self = this
    self.props.loading("Editing Note Please Wait")
    var combined = {[cellName]:values}
    console.log(combined)
    axios.put("/api/updatenote/"+row.ID,combined).then(
      function(response){
        return response
      }).then(
        function(result){
          if(result.data.success){
            self.props.success(result.data.msg)
          }else{
            self.props.failed(result.data.msg)
          }
        }
        ).catch(function(error){
          self.props.failed("Sorry an Error has Occurred")
        })
  }
handleNoteEdit ( row , cellName , values ) { var self = this self . props . loading ( "Editing Note Please Wait" ) var combined = { [ cellName ] : values } console . log ( combined ) axios . put ( "/api/updatenote/" + row . ID , combined ) . then ( function ( response ) { return response } ) . then ( function ( result ) { if ( result . data . success ) { self . props . success ( result . data . msg ) } else { self . props . failed ( result . data . msg ) } } ) . catch ( function ( error ) { self . props . failed ( "Sorry an Error has Occurred" ) } ) }
handling the update of new note
handling the update of new note
//combined between fields and values