File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
components/quickbooks/sources Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -81,6 +81,7 @@ module.exports = {
8181 await this . processEvent ( entity ) ;
8282 } ,
8383 async processEvent ( entity ) {
84+ const { name, id, operation} = entity
8485 const eventToEmit = {
8586 event_notification : entity ,
8687 record_details : { } ,
@@ -89,14 +90,21 @@ module.exports = {
8990 // to get the full record data
9091 if ( entity . operation !== "Delete" ) {
9192 eventToEmit . record_details = await this . quickbooks
92- . getRecordDetails ( entity . name , entity . id ) ;
93+ . getRecordDetails ( name , id ) ;
9394 }
94-
95- const summary = `${ entity . name } ${ entity . id } ${ this . toPastTense ( entity . operation ) } ` ;
95+ const summary = `${ name } ${ id } ${ this . toPastTense ( operation ) } ` ;
9696 const ts = entity ?. lastUpdated
9797 ? Date . parse ( entity . lastUpdated )
9898 : Date . now ( ) ;
99+ const event_id = [
100+ name ,
101+ id ,
102+ operation ,
103+ ts ,
104+ ] . join ( "-" ) ;
105+ console . log ( event_id )
99106 this . $emit ( eventToEmit , {
107+ id : event_id ,
100108 summary,
101109 ts,
102110 } ) ;
You can’t perform that action at this time.
0 commit comments