Advertisement
Guest User

Untitled

a guest
Jul 24th, 2019
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.27 KB | None | 0 0
  1. send: (
  2. text: string,
  3. postId: string,
  4. objectInstanceId: string,
  5. objectInstanceValue: string,
  6. callBack: Function
  7. ) => {
  8. const uuidv4 = require('uuid/v4')
  9. const tempId = uuidv4()
  10. var momentObj = require('moment')
  11. const createdDateTime = momentObj().format()
  12. const createdDate = momentObj().format('YYYY-MM-DD HH:mm:ss.SSS')
  13. const commentCreatedDatevar = momentObj().format('DD-MMM-YY HH:mm:ss')
  14. const comment = Map({
  15. postId: postId || tempId,
  16. text: text,
  17. CommentText: text,
  18. CommentHTML: text,
  19. ObjectInstanceId: objectInstanceId,
  20. ObjectInstanceValue: objectInstanceValue,
  21. isMail: '0',
  22. isTemp: 1,
  23. CreatedDateTime: createdDateTime,
  24. CommentCreatedDatevar: commentCreatedDatevar,
  25. CreatedDate: createdDate,
  26. CommentID: postId || tempId,
  27. })
  28. dispatch(
  29. enoteActions.addEnoteWithOffline(
  30. ownProps.ownerPostUserId,
  31. comment,
  32. tempId
  33. )
  34.  
  35. )
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement