You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+43-1Lines changed: 43 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -72,6 +72,22 @@ commtrackr.init({ // Initialize CommTracker with configurations
72
72
admin: [2] // Access levels for admins
73
73
},
74
74
commissions:'commissions', // req.session object variable for user commissions array
75
+
possibleStatuses: [ // Possible commission status strings
76
+
{
77
+
label:'Completed', // Status label
78
+
value:'Completed'// Status value
79
+
}, {
80
+
label:'In Progress',
81
+
value:'In Progress'
82
+
}, {
83
+
label:'On Hold',
84
+
value:'On Hold'
85
+
}, {
86
+
label:'Cancelled',
87
+
value:'Cancelled'
88
+
}
89
+
],
90
+
disableFieldEditing: ['amount', 'currency'] // Array of field IDs that admins cannot edit
75
91
},
76
92
fields: [
77
93
{
@@ -102,7 +118,9 @@ commtrackr.init({ // Initialize CommTracker with configurations
102
118
// This function is called when a commission is updated
103
119
// You can implement your own logic here, such as saving to a database
104
120
// data contains the updated commission object
105
-
// Action metadata can be accessed via data.updatedAt and data.updatedBy
121
+
// The constant data.id contains the unique commission ID
122
+
// Action metadata can be accessed via data.updatedAt, data.updatedBy, and data.sendEmail
123
+
// Updated metadata can be accessed via data.user, data.amount, data.currency, data.date, data.status, and data.locked
106
124
// Updated fields can be accessed via data.fields
107
125
},
108
126
sync: (req) => {
@@ -220,3 +238,27 @@ Session Example:
220
238
}
221
239
]
222
240
```
241
+
242
+
### possibleStatuses
243
+
244
+
`possibleStatuses` should be an array of possible commission status objects. Each status object should have a label and value property.
245
+
246
+
Type: `Array`
247
+
248
+
Default:
249
+
250
+
```javascript
251
+
[]
252
+
```
253
+
254
+
### disableFieldEditing
255
+
256
+
`disableFieldEditing` should be an array of field IDs that admins cannot edit. This is useful for restricting access to certain fields even for admin users.
0 commit comments