Skip to content

Commit

Permalink
feat(BambooHR Node): Add support for Only Current on company reports (#…
Browse files Browse the repository at this point in the history
…7878)

Github issue / Community forum post (link here to close automatically):
#7876

API Docs for reference:
https://documentation.bamboohr.com/reference/get-company-report-1
  • Loading branch information
Joffcom committed Dec 5, 2023
1 parent 9604b87 commit 4175801
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Expand Up @@ -89,6 +89,13 @@ export const companyReportGetDescription: INodeProperties[] = [
default: true,
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',
},
],
},
];
Expand Up @@ -11,9 +11,10 @@ export async function get(this: IExecuteFunctions, index: number) {
const reportId = this.getNodeParameter('reportId', index) as string;
const format = this.getNodeParameter('format', 0) as string;
const fd = this.getNodeParameter('options.fd', index, true) as boolean;
const onlyCurrent = this.getNodeParameter('options.onlyCurrent', index, true) as boolean;

//endpoint
const endpoint = `reports/${reportId}/?format=${format}&fd=${fd}`;
const endpoint = `reports/${reportId}/?format=${format}&fd=${fd}&onlyCurrent=${onlyCurrent}`;

if (format === 'JSON') {
const responseData = await apiRequest.call(
Expand Down

0 comments on commit 4175801

Please sign in to comment.