File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
components/close/actions/search-leads Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change 11import close from "../../close.app.mjs" ;
2+ import utils from "../../common/utils.mjs" ;
23
34export default {
45 type : "action" ,
@@ -25,6 +26,16 @@ export default {
2526 } ,
2627 } ,
2728 async run ( { $ } ) {
29+ const data = { } ;
30+ if ( this . name ) data . name = this . name ;
31+ if ( this . url ) data . url = this . url ;
32+ if ( this . statusId ) data . status_id = this . statusId ;
33+ if ( this . contacts ) data . contacts = utils . parseObject ( this . contacts ) ;
34+ if ( this . addresses ) data . addresses = utils . parseObject ( this . addresses ) ;
35+ const moreFields = { } ;
36+ for ( let key in this . moreFields ) {
37+ moreFields [ key ] = utils . parseObject ( this . moreFields [ key ] ) ;
38+ }
2839 const response = await this . close . searchLeads ( {
2940 data : {
3041 query : {
You can’t perform that action at this time.
0 commit comments