Fix display issue with AccountID before Operation & other small fixes

This commit is contained in:
Jan Oberhauser 2021-04-02 18:10:22 +02:00
parent 7995bd610d
commit b406d4b60b
11 changed files with 126 additions and 125 deletions

View file

@ -1,4 +1,4 @@
import {
import {
INodeProperties,
} from 'n8n-workflow';
@ -199,13 +199,6 @@ export const clientFields = [
},
default: {},
options: [
{
displayName: 'Is Active',
name: 'is_active',
type: 'string',
default: '',
description: 'Whether the client is active, or archived. Defaults to true.',
},
{
displayName: 'Address',
name: 'address',
@ -220,6 +213,13 @@ export const clientFields = [
default: '',
description: 'The currency used by the estimate. If not provided, the clients currency will be used. See a list of supported currencies',
},
{
displayName: 'Is Active',
name: 'is_active',
type: 'string',
default: '',
description: 'Whether the client is active, or archived. Defaults to true.',
},
],
},

View file

@ -1,4 +1,4 @@
import {
import {
INodeProperties,
} from 'n8n-workflow';

View file

@ -214,20 +214,6 @@ export const contactFields = [
},
default: {},
options: [
{
displayName: 'Last Name',
name: 'last_name',
type: 'string',
default: '',
description: 'The last name of the contact.',
},
{
displayName: 'Title',
name: 'title',
type: 'string',
default: '',
description: 'The title of the contact.',
},
{
displayName: 'Email',
name: 'email',
@ -236,11 +222,18 @@ export const contactFields = [
description: 'The contacts email address.',
},
{
displayName: 'Phone Office',
name: 'phone_office',
displayName: 'Fax',
name: 'fax',
type: 'string',
default: '',
description: 'The contacts office phone number.',
description: 'The contacts fax number.',
},
{
displayName: 'Last Name',
name: 'last_name',
type: 'string',
default: '',
description: 'The last name of the contact.',
},
{
displayName: 'Phone Mobile',
@ -250,11 +243,19 @@ export const contactFields = [
description: 'The contacts mobile phone number.',
},
{
displayName: 'Fax',
name: 'fax',
displayName: 'Phone Office',
name: 'phone_office',
type: 'string',
default: '',
description: 'The contacts fax number.',
description: 'The contacts office phone number.',
},
{
displayName: 'Title',
name: 'title',
type: 'string',
default: '',
description: 'The title of the contact.',
},
],
},
@ -300,6 +301,20 @@ export const contactFields = [
default: '',
description: 'The ID of the client associated with this contact.',
},
{
displayName: 'Email',
name: 'email',
type: 'string',
default: '',
description: 'The contacts email address.',
},
{
displayName: 'Fax',
name: 'fax',
type: 'string',
default: '',
description: 'The contacts fax number.',
},
{
displayName: 'First Name',
name: 'first_name',
@ -315,18 +330,11 @@ export const contactFields = [
description: 'The last name of the contact.',
},
{
displayName: 'Title',
name: 'title',
displayName: 'Phone Mobile',
name: 'phone_mobile',
type: 'string',
default: '',
description: 'The title of the contact.',
},
{
displayName: 'Email',
name: 'email',
type: 'string',
default: '',
description: 'The contacts email address.',
description: 'The contacts mobile phone number.',
},
{
displayName: 'Phone Office',
@ -336,18 +344,11 @@ export const contactFields = [
description: 'The contacts office phone number.',
},
{
displayName: 'Phone Mobile',
name: 'phone_mobile',
displayName: 'Title',
name: 'title',
type: 'string',
default: '',
description: 'The contacts mobile phone number.',
},
{
displayName: 'Fax',
name: 'fax',
type: 'string',
default: '',
description: 'The contacts fax number.',
description: 'The title of the contact.',
},
],
},

View file

@ -1,4 +1,4 @@
import {
import {
INodeProperties,
} from 'n8n-workflow';

View file

@ -1,4 +1,4 @@
import {
import {
INodeProperties,
} from 'n8n-workflow';

View file

@ -175,17 +175,6 @@ export class Harvest implements INodeType {
description: 'The resource to operate on.',
},
{
displayName: 'Account ID',
name: 'accountId',
type: 'options',
required: true,
typeOptions: {
loadOptionsMethod: 'getAccounts',
},
default: '',
},
// operations
...clientOperations,
...companyOperations,
@ -198,6 +187,17 @@ export class Harvest implements INodeType {
...timeEntryOperations,
...userOperations,
{
displayName: 'Account ID',
name: 'accountId',
type: 'options',
required: true,
typeOptions: {
loadOptionsMethod: 'getAccounts',
},
default: '',
},
// fields
...clientFields,
...contactFields,

View file

@ -1,4 +1,4 @@
import {
import {
INodeProperties,
} from 'n8n-workflow';
@ -114,20 +114,6 @@ export const invoiceFields = [
default: '',
description: 'Only return time entries belonging to the client with the given ID.',
},
{
displayName: 'Project ID',
name: 'project_id',
type: 'string',
default: '',
description: 'Only return time entries belonging to the client with the given ID.',
},
{
displayName: 'Updated Since',
name: 'updated_since',
type: 'dateTime',
default: '',
description: 'Only return time entries that have been updated since the given date and time.',
},
{
displayName: 'From',
name: 'from',
@ -136,11 +122,21 @@ export const invoiceFields = [
description: 'Only return time entries with a spent_date on or after the given date.',
},
{
displayName: 'To',
name: 'to',
type: 'dateTime',
displayName: 'Page',
name: 'page',
type: 'number',
typeOptions: {
minValue: 1,
},
default: 1,
description: 'The page number to use in pagination. For instance, if you make a list request and receive 100 records, your subsequent call can include page=2 to retrieve the next page of the list. (Default: 1)',
},
{
displayName: 'Project ID',
name: 'project_id',
type: 'string',
default: '',
description: 'Only return time entries with a spent_date on or before the given date.',
description: 'Only return time entries belonging to the client with the given ID.',
},
{
displayName: 'State',
@ -168,14 +164,19 @@ export const invoiceFields = [
description: 'Only return invoices with a state matching the value provided. Options: draft, open, paid, or closed.',
},
{
displayName: 'Page',
name: 'page',
type: 'number',
typeOptions: {
minValue: 1,
},
default: 1,
description: 'The page number to use in pagination. For instance, if you make a list request and receive 100 records, your subsequent call can include page=2 to retrieve the next page of the list. (Default: 1)',
displayName: 'To',
name: 'to',
type: 'dateTime',
default: '',
description: 'Only return time entries with a spent_date on or before the given date.',
},
{
displayName: 'Updated Since',
name: 'updated_since',
type: 'dateTime',
default: '',
description: 'Only return time entries that have been updated since the given date and time.',
},
],
},

View file

@ -1,4 +1,4 @@
import {
import {
INodeProperties,
} from 'n8n-workflow';
@ -580,7 +580,6 @@ export const projectFields = [
default: false,
description: 'Option to show project budget to all employees. Does not apply to Total Project Fee projects. Defaults to false.',
},
{
displayName: 'Starts On',
name: 'starts_on',

View file

@ -221,13 +221,6 @@ export const taskFields = [
default: 0,
description: 'The default hourly rate to use for this task when it is added to a project. Defaults to 0.',
},
{
displayName: 'Is Default',
name: 'is_default',
type: 'boolean',
default: false,
description: 'Whether this task should be automatically added to future projects. Defaults to false.',
},
{
displayName: 'Is Active',
name: 'is_active',
@ -235,8 +228,16 @@ export const taskFields = [
default: true,
description: 'Whether this task is active or archived. Defaults to true',
},
{
displayName: 'Is Default',
name: 'is_default',
type: 'boolean',
default: false,
description: 'Whether this task should be automatically added to future projects. Defaults to false.',
},
],
},
/* -------------------------------------------------------------------------- */
/* task:update */
/* -------------------------------------------------------------------------- */

View file

@ -1,4 +1,4 @@
import {
import {
INodeProperties,
} from 'n8n-workflow';
@ -153,6 +153,16 @@ export const timeEntryFields = [
default: true,
description: 'Pass true to only return running time entries and false to return non-running time entries.',
},
{
displayName: 'Page',
name: 'page',
type: 'number',
typeOptions: {
minValue: 1,
},
default: 1,
description: 'The page number to use in pagination. For instance, if you make a list request and receive 100 records, your subsequent call can include page=2 to retrieve the next page of the list. (Default: 1)',
},
{
displayName: 'To',
name: 'to',
@ -167,16 +177,6 @@ export const timeEntryFields = [
default: '',
description: 'Only return time entries that have been updated since the given date and time.',
},
{
displayName: 'Page',
name: 'page',
type: 'number',
typeOptions: {
minValue: 1,
},
default: 1,
description: 'The page number to use in pagination. For instance, if you make a list request and receive 100 records, your subsequent call can include page=2 to retrieve the next page of the list. (Default: 1)',
},
{
displayName: 'User ID',
name: 'user_id',

View file

@ -1,4 +1,4 @@
import {
import {
INodeProperties,
} from 'n8n-workflow';
@ -246,13 +246,6 @@ export const userFields = [
},
default: {},
options: [
{
displayName: 'Can Create Projects',
name: 'can_create_projects',
type: 'boolean',
default: false,
description: 'Whether the user can create projects. Only applicable to Project Managers.',
},
{
displayName: 'Can Create Invoices',
name: 'can_create_invoices',
@ -260,6 +253,13 @@ export const userFields = [
default: false,
description: 'Whether the user can create invoices. Only applicable to Project Managers.',
},
{
displayName: 'Can Create Projects',
name: 'can_create_projects',
type: 'boolean',
default: false,
description: 'Whether the user can create projects. Only applicable to Project Managers.',
},
{
displayName: 'Can See Rates',
name: 'can_see_rates',
@ -346,7 +346,6 @@ export const userFields = [
],
},
/* -------------------------------------------------------------------------- */
/* user:update */
/* -------------------------------------------------------------------------- */
@ -381,13 +380,6 @@ export const userFields = [
},
default: {},
options: [
{
displayName: 'Can Create Projects',
name: 'can_create_projects',
type: 'boolean',
default: false,
description: 'Whether the user can create projects. Only applicable to Project Managers.',
},
{
displayName: 'Can Create Invoices',
name: 'can_create_invoices',
@ -395,6 +387,13 @@ export const userFields = [
default: false,
description: 'Whether the user can create invoices. Only applicable to Project Managers.',
},
{
displayName: 'Can Create Projects',
name: 'can_create_projects',
type: 'boolean',
default: false,
description: 'Whether the user can create projects. Only applicable to Project Managers.',
},
{
displayName: 'Can See Rates',
name: 'can_see_rates',