Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- send: (
- text: string,
- postId: string,
- objectInstanceId: string,
- objectInstanceValue: string,
- callBack: Function
- ) => {
- const uuidv4 = require('uuid/v4')
- const tempId = uuidv4()
- var momentObj = require('moment')
- const createdDateTime = momentObj().format()
- const createdDate = momentObj().format('YYYY-MM-DD HH:mm:ss.SSS')
- const commentCreatedDatevar = momentObj().format('DD-MMM-YY HH:mm:ss')
- const comment = Map({
- postId: postId || tempId,
- text: text,
- CommentText: text,
- CommentHTML: text,
- ObjectInstanceId: objectInstanceId,
- ObjectInstanceValue: objectInstanceValue,
- isMail: '0',
- isTemp: 1,
- CreatedDateTime: createdDateTime,
- CommentCreatedDatevar: commentCreatedDatevar,
- CreatedDate: createdDate,
- CommentID: postId || tempId,
- })
- dispatch(
- enoteActions.addEnoteWithOffline(
- ownProps.ownerPostUserId,
- comment,
- tempId
- )
- )
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement