mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-24 20:24:05 -08:00
feat(BambooHR Node): Add support for Only Current on company reports (#7878)
Github issue / Community forum post (link here to close automatically): https://github.com/n8n-io/n8n/issues/7876 API Docs for reference: https://documentation.bamboohr.com/reference/get-company-report-1
This commit is contained in:
parent
9604b87da9
commit
4175801c90
|
@ -89,6 +89,13 @@ export const companyReportGetDescription: INodeProperties[] = [
|
||||||
default: true,
|
default: true,
|
||||||
description: 'Whether to apply the standard duplicate field filtering or not',
|
description: 'Whether to apply the standard duplicate field filtering or not',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
displayName: 'Only Current',
|
||||||
|
name: 'onlyCurrent',
|
||||||
|
type: 'boolean',
|
||||||
|
default: true,
|
||||||
|
description: 'Whether to hide future dated values from the history table fields or not',
|
||||||
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
|
@ -11,9 +11,10 @@ export async function get(this: IExecuteFunctions, index: number) {
|
||||||
const reportId = this.getNodeParameter('reportId', index) as string;
|
const reportId = this.getNodeParameter('reportId', index) as string;
|
||||||
const format = this.getNodeParameter('format', 0) as string;
|
const format = this.getNodeParameter('format', 0) as string;
|
||||||
const fd = this.getNodeParameter('options.fd', index, true) as boolean;
|
const fd = this.getNodeParameter('options.fd', index, true) as boolean;
|
||||||
|
const onlyCurrent = this.getNodeParameter('options.onlyCurrent', index, true) as boolean;
|
||||||
|
|
||||||
//endpoint
|
//endpoint
|
||||||
const endpoint = `reports/${reportId}/?format=${format}&fd=${fd}`;
|
const endpoint = `reports/${reportId}/?format=${format}&fd=${fd}&onlyCurrent=${onlyCurrent}`;
|
||||||
|
|
||||||
if (format === 'JSON') {
|
if (format === 'JSON') {
|
||||||
const responseData = await apiRequest.call(
|
const responseData = await apiRequest.call(
|
||||||
|
|
Loading…
Reference in a new issue