@dhyasama/totem-models 6.0.0 → 6.2.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 +29 -18
- package/package.json +4 -4
- package/.npmignore +0 -14
- package/package-lock.json +0 -1854
package/lib/Organization.js
CHANGED
|
@@ -213,41 +213,52 @@ module.exports = function(mongoose, config) {
|
|
|
213
213
|
color: { type: String, trim: true }
|
|
214
214
|
}],
|
|
215
215
|
|
|
216
|
-
voting: {
|
|
217
|
-
active: { type: Boolean, default: false },
|
|
218
|
-
votes: [{
|
|
219
|
-
name: { type: String, trim: true },
|
|
220
|
-
value: { type: Number }
|
|
221
|
-
}]
|
|
222
|
-
},
|
|
223
|
-
|
|
224
|
-
sectors: {
|
|
225
|
-
active: { type: Boolean, default: false }
|
|
226
|
-
},
|
|
227
|
-
|
|
228
216
|
customFields: [{
|
|
229
217
|
|
|
230
|
-
custom: { type: Boolean },
|
|
231
|
-
|
|
232
218
|
// Data stored on deals will be accessed with this key
|
|
233
219
|
// It must follow standard js variable naming rules
|
|
234
220
|
// Whenever possible, just use the label and replace spaces with underscore
|
|
235
221
|
// Will not be displayed
|
|
236
|
-
|
|
222
|
+
// Changing it after data is in the system will make data inaccessible
|
|
223
|
+
key: { type: String, trim: true, required: true },
|
|
237
224
|
|
|
238
225
|
// User friendly text, will be displayed
|
|
239
226
|
label: { type: String, trim: true, required: true },
|
|
240
227
|
|
|
241
228
|
// Dictates the type of control rendered on form
|
|
242
229
|
// Also impacts data validation
|
|
243
|
-
type: { type: String, enum: ['Text', 'Checkbox', 'Single select', 'Multiple select'], required: true },
|
|
230
|
+
type: { type: String, enum: ['Text', 'Number', 'Tags', 'Poll', 'Checkbox', 'Single select', 'Multiple select'], required: true },
|
|
231
|
+
|
|
232
|
+
// These will be the choices in polls, single-selects and multi-selects
|
|
233
|
+
options: [{
|
|
234
|
+
|
|
235
|
+
// This is the option shown to users
|
|
236
|
+
label: { type: String, trim: true, required: true },
|
|
244
237
|
|
|
245
|
-
|
|
246
|
-
|
|
238
|
+
// This is the value that gets stored
|
|
239
|
+
value: { type: String, trim: true, required: true },
|
|
247
240
|
|
|
241
|
+
// This is used to validate and aggregate answers for polls
|
|
242
|
+
type: { type: String, enum: ['String', 'Number', 'Boolean'] }
|
|
243
|
+
|
|
244
|
+
}],
|
|
245
|
+
|
|
246
|
+
// For controlling display on web pages
|
|
248
247
|
display: {
|
|
248
|
+
|
|
249
|
+
// Sets the order to render fields
|
|
249
250
|
order: { type: Number },
|
|
251
|
+
|
|
252
|
+
// Sets the number of columns for this property to span on the deals list
|
|
253
|
+
colspan: 2,
|
|
254
|
+
|
|
255
|
+
// Optionally include as an option on the deal filter
|
|
256
|
+
showOnFilter: {},
|
|
257
|
+
|
|
258
|
+
// Optionally show or hide fields on deals list
|
|
259
|
+
// Fields are always shown on org pages and in edit forms
|
|
250
260
|
showOnList: { type: Boolean }
|
|
261
|
+
|
|
251
262
|
}
|
|
252
263
|
|
|
253
264
|
}]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dhyasama/totem-models",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.2.0",
|
|
4
4
|
"author": "Jason Reynolds",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"description": "Models for Totem platform",
|
|
@@ -14,14 +14,14 @@
|
|
|
14
14
|
"dependencies": {
|
|
15
15
|
"@dhyasama/ffvc-crypto": "^1.0.0",
|
|
16
16
|
"@dhyasama/ffvc-geoip": "^1.0.0",
|
|
17
|
-
"@dhyasama/ffvc-s3": "^1.
|
|
18
|
-
"@dhyasama/ffvc-utilities": "^2.
|
|
17
|
+
"@dhyasama/ffvc-s3": "^1.1.0",
|
|
18
|
+
"@dhyasama/ffvc-utilities": "^2.6.2",
|
|
19
19
|
"async": "^2.6.1",
|
|
20
20
|
"awesome-phonenumber": "^1.0.14",
|
|
21
21
|
"bcrypt": "^0.8.0",
|
|
22
22
|
"bluebird": "^3.5.3",
|
|
23
23
|
"escape-string-regexp": "^1.0.5",
|
|
24
|
-
"moment": "^2.
|
|
24
|
+
"moment": "^2.23.0",
|
|
25
25
|
"mongoose-deep-populate": "^3.0.0",
|
|
26
26
|
"mongoose-filter-denormalize": "^0.2.1",
|
|
27
27
|
"mongoose-post-find": "0.0.2",
|