Add option to user_id parameter - Pipedrive (#2337)

* Adjust User Id field to become mandatory in getAll Ativities
Include Stage order in title Selection

*  Small change to #2322

Co-authored-by: Rodrigo Correia <rodrigoscdc@gmail.com>
This commit is contained in:
Ricardo Espinoza 2021-10-19 00:02:52 -04:00 committed by GitHub
parent 421dd72224
commit 0b1b4baaab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3928,10 +3928,11 @@ export class Pipedrive implements INodeType {
return sortOptionParameters(returnData); return sortOptionParameters(returnData);
}, },
// Get all Organizations to display them to user so that he can // Get all Users to display them to user so that he can
// select them easily // select them easily
async getUserIds(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> { async getUserIds(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
const returnData: INodePropertyOptions[] = []; const returnData: INodePropertyOptions[] = [];
const resource = this.getCurrentNodeParameter('resource');
const { data } = await pipedriveApiRequest.call(this, 'GET', '/users', {}); const { data } = await pipedriveApiRequest.call(this, 'GET', '/users', {});
for (const user of data) { for (const user of data) {
if (user.active_flag === true) { if (user.active_flag === true) {
@ -3942,6 +3943,13 @@ export class Pipedrive implements INodeType {
} }
} }
if(resource === 'activity'){
returnData.push({
name: 'All Users',
value: 0,
});
}
return sortOptionParameters(returnData); return sortOptionParameters(returnData);
}, },
// Get all Deals to display them to user so that he can // Get all Deals to display them to user so that he can