This repository was archived by the owner on May 6, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathAttendanceFields.ts
More file actions
176 lines (167 loc) · 3.74 KB
/
AttendanceFields.ts
File metadata and controls
176 lines (167 loc) · 3.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
import { EasyNodeOperationType, EasyNodeResourceType } from '../Model';
import { INodeProperties } from 'n8n-workflow';
const CommonAttendanceOptions: INodeProperties[] = [
{
displayName: 'Departure',
name: 'departure',
type: 'dateTime',
default: '',
},
{
displayName: 'Description',
name: 'description',
type: 'string',
default: '',
},
{
displayName: 'Activity ID',
name: 'activityId',
type: 'number',
default: '',
},
];
const AttendanceUpdateOptions: INodeProperties[] = [
{
displayName: 'Arrival',
name: 'arrival',
type: 'dateTime',
default: '',
},
];
export const AttendanceFields: INodeProperties[] = [
{
displayName: 'Operation',
name: 'operation',
type: 'options',
noDataExpression: true,
displayOptions: {
show: {
resource: [EasyNodeResourceType.attendances],
},
},
default: 'get-many',
options: [
{
name: 'Get One',
description: 'Get a single attendance entity',
value: EasyNodeOperationType.getOne,
action: 'Get one',
},
{
name: 'Get Many',
description: 'Get multiple attendance entities',
value: EasyNodeOperationType.getMany,
action: 'Get many',
},
{
name: 'Search',
description: 'Search attendance entities',
value: EasyNodeOperationType.search,
action: 'Search',
},
{
name: 'Create',
description: 'Create attendance entity',
value: EasyNodeOperationType.create,
action: 'Create',
},
{
name: 'Update',
description: 'Update attendance entity',
value: EasyNodeOperationType.update,
action: 'Update',
},
],
},
{
displayName: 'Attendance ID',
name: 'id',
type: 'number',
displayOptions: {
show: {
operation: [EasyNodeOperationType.getOne, EasyNodeOperationType.update],
resource: [EasyNodeResourceType.attendances],
},
},
default: '',
},
{
displayName: 'EasyRedmine Attendances Query Name or ID',
name: 'attendanceQueryId',
type: 'options',
description:
'Choose a query to filter the results. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
displayOptions: {
show: {
resource: [EasyNodeResourceType.attendances],
operation: [EasyNodeOperationType.getMany],
},
},
typeOptions: {
loadOptionsMethod: 'getEasyAttendanceQueries',
},
default: '',
},
{
displayName: 'Arrival',
name: 'arrival',
type: 'dateTime',
default: '',
displayOptions: {
show: {
operation: [EasyNodeOperationType.create],
resource: [EasyNodeResourceType.attendances],
},
},
},
{
displayName: 'Create Fields',
name: 'attendanceCreateOptions',
type: 'collection',
placeholder: 'Add option',
default: {},
displayOptions: {
show: {
operation: [EasyNodeOperationType.create],
resource: [EasyNodeResourceType.attendances],
},
},
options: [...CommonAttendanceOptions],
},
{
displayName: 'Update Fields',
name: 'attendanceUpdateOptions',
type: 'collection',
placeholder: 'Add option',
default: {},
displayOptions: {
show: {
operation: [EasyNodeOperationType.update],
resource: [EasyNodeResourceType.attendances],
},
},
options: [...AttendanceUpdateOptions, ...CommonAttendanceOptions],
},
{
displayName: 'Search Options',
name: 'attendanceSearchOptions',
type: 'collection',
placeholder: 'Add option',
default: {},
displayOptions: {
show: {
operation: [EasyNodeOperationType.search],
resource: [EasyNodeResourceType.attendances],
},
},
options: [
{
displayName: 'Query',
name: 'query',
type: 'string',
default: '',
description: 'Search query for attendances',
},
],
},
];