@01-edu/shared 1.1.6 → 1.1.7

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/attrs-defs.js CHANGED
@@ -209,6 +209,7 @@ const autoRejectWhereLabel = `Automatic reject if`
209
209
  const sharedAutoValidationOperator = action => ({
210
210
  type: 'string',
211
211
  restrictive: true,
212
+ editable: true,
212
213
  label: `${action} - number of conditions to fulfil`,
213
214
  ...Functions({ all: () => 'and', one: () => 'or' }),
214
215
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@01-edu/shared",
3
- "version": "1.1.6",
3
+ "version": "1.1.7",
4
4
  "type": "module",
5
5
  "description": "",
6
6
  "scripts": {
package/toolbox.js CHANGED
@@ -491,12 +491,12 @@ export const timePlusDelay = (time, delay) =>
491
491
  new Date(new Date(time).getTime() + delay).toISOString()
492
492
 
493
493
  export const getRecordStatus = record => {
494
- if (!isFinished(record.startAt)) return 'starting soon'
495
- if (record.endAt && isFinished(record.endAt)) {
494
+ if (!isFinished(record?.startAt)) return 'starting soon'
495
+ if (record?.endAt && isFinished(record?.endAt)) {
496
496
  return 'finished'
497
497
  }
498
- if (record.type.isPermanent) return 'permanent'
499
- return record.endAt ? 'in progress' : 'unblock required'
498
+ if (record?.type.isPermanent) return 'permanent'
499
+ return record?.endAt ? 'in progress' : 'unblock required'
500
500
  }
501
501
 
502
502
  export const createFrequencyMap = arr =>