@dhyasama/totem-models 9.11.0 → 9.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/Financials.js +59 -8
- package/lib/Organization.js +1 -58
- package/package.json +1 -1
package/lib/Financials.js
CHANGED
|
@@ -26,13 +26,50 @@ module.exports = function(mongoose, config) {
|
|
|
26
26
|
|
|
27
27
|
fiscalMonthOffset: { type: Number, default: 0 },
|
|
28
28
|
|
|
29
|
+
recurring: {
|
|
30
|
+
template: { type: String, trim: true },
|
|
31
|
+
email: { type: String, trim: true },
|
|
32
|
+
recipients: [{ type: String, trim: true }],
|
|
33
|
+
send: {
|
|
34
|
+
daysAfter: { type: Number, default: 0 },
|
|
35
|
+
period: { type: String, enum: [null, 'month', 'quarter', 'year']},
|
|
36
|
+
time: {
|
|
37
|
+
hour: { type: Number, default: 0 },
|
|
38
|
+
minute: { type: Number, default: 0 },
|
|
39
|
+
second: { type: Number, default: 0 }
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
remind: {
|
|
43
|
+
daysAfter: { type: Number, default: 0 },
|
|
44
|
+
ocurrences: { type: Number, default: 0 },
|
|
45
|
+
time: {
|
|
46
|
+
hour: { type: Number, default: 0 },
|
|
47
|
+
minute: { type: Number, default: 0 },
|
|
48
|
+
second: { type: Number, default: 0 }
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
due: {
|
|
52
|
+
daysAfter: { type: Number, default: 0 },
|
|
53
|
+
time: {
|
|
54
|
+
hour: { type: Number, default: 0 },
|
|
55
|
+
minute: { type: Number, default: 0 },
|
|
56
|
+
second: { type: Number, default: 0 }
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
review: { type: Boolean, default: false }
|
|
60
|
+
},
|
|
61
|
+
|
|
29
62
|
snapshots: [{
|
|
30
63
|
|
|
31
64
|
uuid: { type: String },
|
|
32
65
|
|
|
33
|
-
managedServices: { type: Boolean, default: false },
|
|
66
|
+
managedServices: { type: Boolean, default: false }, // to be folded into review
|
|
67
|
+
review: { type: Boolean, default: false },
|
|
34
68
|
|
|
35
|
-
|
|
69
|
+
// In Progress -> Delivered or Opened
|
|
70
|
+
// Not Scheduled to be removed
|
|
71
|
+
// Scheduled to be removed
|
|
72
|
+
status: { type: String, enum: ['Delivered', 'Opened', 'Overdue', 'In Review', 'Completed', 'Archived', 'In Progress', 'Not Scheduled', 'Scheduled'] },
|
|
36
73
|
action: { type: String },
|
|
37
74
|
|
|
38
75
|
year: { type: Number, default: 0 },
|
|
@@ -120,31 +157,41 @@ module.exports = function(mongoose, config) {
|
|
|
120
157
|
|
|
121
158
|
comment: { type: String, trim: true },
|
|
122
159
|
|
|
160
|
+
dueOn: { type: Date, index: false },
|
|
161
|
+
|
|
123
162
|
submittedOn: { type: Date, index: false },
|
|
124
163
|
submittedBy: { type: String, trim: true },
|
|
125
164
|
|
|
165
|
+
archivedOn: { type: Date, index: false },
|
|
126
166
|
reviewedOn: { type: Date, index: false },
|
|
167
|
+
|
|
127
168
|
rejection: { type: String, trim: true },
|
|
128
169
|
|
|
129
170
|
notifications: {
|
|
130
171
|
|
|
131
172
|
company: {
|
|
132
173
|
|
|
133
|
-
email: {
|
|
134
|
-
subject: { type: String, trim: true }
|
|
135
|
-
},
|
|
136
|
-
|
|
137
174
|
sendTo: [{
|
|
138
175
|
email: { type: String, trim: true },
|
|
139
176
|
name: { type: String, trim: true }
|
|
140
177
|
}],
|
|
141
178
|
|
|
179
|
+
// to be nested under initial and reminders, and removed
|
|
180
|
+
email: {
|
|
181
|
+
subject: { type: String, trim: true },
|
|
182
|
+
body: { type: String, trim: true }
|
|
183
|
+
},
|
|
184
|
+
|
|
142
185
|
initial: {
|
|
143
186
|
sendOn: { type: Date, required: false },
|
|
144
187
|
sentOn: { type: Date, required: false },
|
|
145
188
|
sentToQueue: { type: Boolean, default: false },
|
|
146
189
|
postmarkMessageId: { type: String, trim: true },
|
|
147
|
-
status: { type: String, enum: [null, 'Sent', 'Bounced', 'Delivered', 'Opened', 'Clicked']}
|
|
190
|
+
status: { type: String, enum: [null, 'Sent', 'Bounced', 'Delivered', 'Opened', 'Clicked']},
|
|
191
|
+
email: {
|
|
192
|
+
subject: { type: String, trim: true },
|
|
193
|
+
body: { type: String, trim: true }
|
|
194
|
+
},
|
|
148
195
|
},
|
|
149
196
|
|
|
150
197
|
reminders: [{
|
|
@@ -152,7 +199,11 @@ module.exports = function(mongoose, config) {
|
|
|
152
199
|
sentOn: { type: Date, required: false },
|
|
153
200
|
sentToQueue: { type: Boolean, default: false },
|
|
154
201
|
postmarkMessageId: { type: String, trim: true },
|
|
155
|
-
status: { type: String, enum: [null, 'Sent', 'Bounced', 'Delivered', 'Opened', 'Clicked']}
|
|
202
|
+
status: { type: String, enum: [null, 'Sent', 'Bounced', 'Delivered', 'Opened', 'Clicked']},
|
|
203
|
+
email: {
|
|
204
|
+
subject: { type: String, trim: true },
|
|
205
|
+
body: { type: String, trim: true }
|
|
206
|
+
}
|
|
156
207
|
}],
|
|
157
208
|
|
|
158
209
|
rejections: [{
|
package/lib/Organization.js
CHANGED
|
@@ -179,6 +179,7 @@ module.exports = function(mongoose, config) {
|
|
|
179
179
|
},
|
|
180
180
|
|
|
181
181
|
locale: { type: String, default: 'en-us', trim: true },
|
|
182
|
+
timezone: { type: String, default: 'America/New_York', trim: true },
|
|
182
183
|
|
|
183
184
|
style: {
|
|
184
185
|
backgroundColor: { type: String, default: '#666666', trim: true },
|
|
@@ -264,10 +265,7 @@ module.exports = function(mongoose, config) {
|
|
|
264
265
|
financials: {
|
|
265
266
|
|
|
266
267
|
active: { type: Boolean, default: false },
|
|
267
|
-
|
|
268
268
|
managedServices: { type: Boolean, default: false },
|
|
269
|
-
reminders: { type: [Number], default: [7, 7, 7] },
|
|
270
|
-
|
|
271
269
|
carta: {
|
|
272
270
|
active: { type: Boolean, default: false }
|
|
273
271
|
},
|
|
@@ -307,61 +305,6 @@ module.exports = function(mongoose, config) {
|
|
|
307
305
|
_id: false,
|
|
308
306
|
prompt: { type: String, trim: true },
|
|
309
307
|
required: { type: Boolean, default: false }
|
|
310
|
-
}],
|
|
311
|
-
|
|
312
|
-
customFields: [{
|
|
313
|
-
|
|
314
|
-
// store the data using this key (changing it after data is in the system will make data inaccessible)
|
|
315
|
-
key: { type: String, trim: true },
|
|
316
|
-
|
|
317
|
-
// User friendly text, will be displayed
|
|
318
|
-
label: { type: String, trim: true },
|
|
319
|
-
|
|
320
|
-
// Dictates the type of control rendered on form and data validation
|
|
321
|
-
type: { type: String, enum: ['Text', 'Number', 'Checkbox', 'Single Select', 'Timestamp', 'Tags', 'Person', 'Org', 'Poll'] },
|
|
322
|
-
|
|
323
|
-
// These are the number formats
|
|
324
|
-
format: { type: String, enum: [null, 'number', 'abbreviated', 'decimal', 'financials', 'currency', 'ownership', 'multiple', 'variance'] },
|
|
325
|
-
|
|
326
|
-
// These will be the choices in polls, single-selects and multi-selects
|
|
327
|
-
options: [{
|
|
328
|
-
|
|
329
|
-
// This is the option shown to users
|
|
330
|
-
label: { type: String, trim: true },
|
|
331
|
-
|
|
332
|
-
// This is the value that gets stored
|
|
333
|
-
value: { type: String, trim: true },
|
|
334
|
-
|
|
335
|
-
// This is used to aggregate answers for polls
|
|
336
|
-
type: { type: String, enum: ['String', 'Number', 'Boolean'] }
|
|
337
|
-
|
|
338
|
-
}],
|
|
339
|
-
|
|
340
|
-
// Determines whether the field should be pinned to the entity page
|
|
341
|
-
pin: { type: Boolean, default: false }
|
|
342
|
-
|
|
343
|
-
}],
|
|
344
|
-
|
|
345
|
-
reports: [{
|
|
346
|
-
name: { type: String, trim: true },
|
|
347
|
-
filters: [{
|
|
348
|
-
_id: false,
|
|
349
|
-
key: { type: String, trim: true },
|
|
350
|
-
condition: { type: String, enum: [null, 'equals', 'doesNotEqual', 'contains', 'doesNotContain', 'lessThan', 'greaterThan']},
|
|
351
|
-
values: [{ type: String, trim: true }]
|
|
352
|
-
}],
|
|
353
|
-
sort: {
|
|
354
|
-
by: { type: String, trim: true },
|
|
355
|
-
reverse: { type: Boolean, default: false }
|
|
356
|
-
},
|
|
357
|
-
fields: [{
|
|
358
|
-
_id: false,
|
|
359
|
-
key: { type: String, trim: true },
|
|
360
|
-
label: { type: String, trim: true },
|
|
361
|
-
total: { type: String, enum: [null, 'sum', 'average', 'count', 'multiple']},
|
|
362
|
-
width: { type: Number, default: 150 }
|
|
363
|
-
}],
|
|
364
|
-
view: { type: String, trim: true }
|
|
365
308
|
}]
|
|
366
309
|
|
|
367
310
|
},
|