mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-11 04:47:29 -08:00
✨ 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:
parent
421dd72224
commit
0b1b4baaab
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue