@dhyasama/totem-models 8.79.0 → 8.80.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/Organization.js +51 -0
- package/package.json +1 -1
package/lib/Organization.js
CHANGED
|
@@ -310,6 +310,57 @@ module.exports = function(mongoose, config) {
|
|
|
310
310
|
sourceTypes: { type: Array, default: ['Cold Inbound', 'Cold Outbound', 'Met at Event', 'Was Referred', 'Other'] },
|
|
311
311
|
referrerTypes: { type: Array, default: ['Founder', 'Investor', 'Service Provider', 'Friends & Family', 'Limited Partner', 'Other'] },
|
|
312
312
|
|
|
313
|
+
customFields: [{
|
|
314
|
+
|
|
315
|
+
// Data stored on deals will be accessed with this key
|
|
316
|
+
// It must follow standard js variable naming rules
|
|
317
|
+
// Whenever possible, just use the label and replace spaces with underscore
|
|
318
|
+
// Will not be displayed
|
|
319
|
+
// Changing it after data is in the system will make data on deal inaccessible
|
|
320
|
+
key: { type: String, trim: true },
|
|
321
|
+
|
|
322
|
+
// User friendly text, will be displayed
|
|
323
|
+
label: { type: String, trim: true },
|
|
324
|
+
|
|
325
|
+
// Dictates the type of control rendered on form
|
|
326
|
+
// Also impacts data validation
|
|
327
|
+
type: { type: String, enum: ['Text', 'Number', 'Money', 'Tags', 'Poll', 'Checkbox', 'Single Select', 'Multiple Select'] },
|
|
328
|
+
|
|
329
|
+
// These will be the choices in polls, single-selects and multi-selects
|
|
330
|
+
options: [{
|
|
331
|
+
|
|
332
|
+
// This is the option shown to users
|
|
333
|
+
label: { type: String, trim: true },
|
|
334
|
+
|
|
335
|
+
// This is the value that gets stored
|
|
336
|
+
value: { type: String, trim: true },
|
|
337
|
+
|
|
338
|
+
// This is used to aggregate answers for polls
|
|
339
|
+
type: { type: String, enum: ['String', 'Number', 'Boolean'] }
|
|
340
|
+
|
|
341
|
+
}],
|
|
342
|
+
|
|
343
|
+
// For controlling display on web pages
|
|
344
|
+
display: {
|
|
345
|
+
|
|
346
|
+
// sets the order to render fields on list, org page deal section and deal edit form
|
|
347
|
+
// order is co-mingled with order for standard fields
|
|
348
|
+
order: { type: Number },
|
|
349
|
+
|
|
350
|
+
// colspan is for the number of columns the field should take up on the list page
|
|
351
|
+
colspan: { type: Number, default: 1 },
|
|
352
|
+
|
|
353
|
+
// showOnFilter controls whether values are extracted and used in filtering options on list page
|
|
354
|
+
showOnFilter: { type: Boolean, default: true },
|
|
355
|
+
|
|
356
|
+
// showOnList controls if the field will be on deal list page
|
|
357
|
+
// fields are always shown on org pages and in edit forms
|
|
358
|
+
showOnList: { type: Boolean, default: true }
|
|
359
|
+
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
}],
|
|
363
|
+
|
|
313
364
|
reports: [{
|
|
314
365
|
name: { type: String, trim: true },
|
|
315
366
|
filters: [{
|