@01-edu/shared 1.1.7 → 1.1.9
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 +19 -47
- package/package.json +1 -1
package/attrs-defs.js
CHANGED
|
@@ -294,11 +294,6 @@ types.autoRejectWhereConditions = Object.fromEntries(
|
|
|
294
294
|
description: `Condition relative to ${breath(
|
|
295
295
|
parameter,
|
|
296
296
|
)} of the candidate.`,
|
|
297
|
-
check: condition => {
|
|
298
|
-
if (isntObjectOrIsEmpty(condition)) {
|
|
299
|
-
throw Error('expect to contain a comparison.')
|
|
300
|
-
}
|
|
301
|
-
},
|
|
302
297
|
type: {
|
|
303
298
|
'<': Literal(shouldFailUnder, {
|
|
304
299
|
label: 'is lower than',
|
|
@@ -322,11 +317,6 @@ attrs.autoRejectWhere = {
|
|
|
322
317
|
label: autoRejectWhereLabel,
|
|
323
318
|
instruction: 'List of conditions to automatically reject an application',
|
|
324
319
|
type: types.autoRejectWhereConditions,
|
|
325
|
-
check: autoRejectWhere => {
|
|
326
|
-
if (isntObjectOrIsEmpty(autoRejectWhere)) {
|
|
327
|
-
throw Error('expect to contain at least one condition.')
|
|
328
|
-
}
|
|
329
|
-
},
|
|
330
320
|
},
|
|
331
321
|
}
|
|
332
322
|
|
|
@@ -351,11 +341,6 @@ types.autoValidateWhereConditions = Object.fromEntries(
|
|
|
351
341
|
description: `Condition relative to ${breath(
|
|
352
342
|
parameter,
|
|
353
343
|
)} of the candidate.`,
|
|
354
|
-
check: condition => {
|
|
355
|
-
if (isntObjectOrIsEmpty(condition)) {
|
|
356
|
-
throw Error('expect to contain at least one condition.')
|
|
357
|
-
}
|
|
358
|
-
},
|
|
359
344
|
type: {
|
|
360
345
|
'>': Literal(shouldSucceedFrom, {
|
|
361
346
|
label: 'is bigger than',
|
|
@@ -379,11 +364,6 @@ attrs.autoValidateWhere = {
|
|
|
379
364
|
label: autoValidateWhereLabel,
|
|
380
365
|
instruction: 'List of conditions to automatically accept an application',
|
|
381
366
|
type: types.autoValidateWhereConditions,
|
|
382
|
-
check: autoValidateWhere => {
|
|
383
|
-
if (isntObjectOrIsEmpty(autoValidateWhere)) {
|
|
384
|
-
throw Error('expect to contain at least one condition.')
|
|
385
|
-
}
|
|
386
|
-
},
|
|
387
367
|
},
|
|
388
368
|
}
|
|
389
369
|
|
|
@@ -3690,36 +3670,28 @@ types.timelineChunk = TypeObject({
|
|
|
3690
3670
|
}
|
|
3691
3671
|
},
|
|
3692
3672
|
}),
|
|
3693
|
-
|
|
3694
|
-
label: '
|
|
3673
|
+
skills: TypeObject({
|
|
3674
|
+
label: 'List of developed skills',
|
|
3695
3675
|
editable: true,
|
|
3696
|
-
|
|
3697
|
-
|
|
3698
|
-
|
|
3676
|
+
required: true,
|
|
3677
|
+
value: {},
|
|
3678
|
+
type: mapValues(
|
|
3679
|
+
skillsSet,
|
|
3680
|
+
({ name, type: instruction, description }) => ({
|
|
3681
|
+
label: name,
|
|
3682
|
+
instruction,
|
|
3683
|
+
description,
|
|
3699
3684
|
editable: true,
|
|
3700
|
-
|
|
3701
|
-
|
|
3685
|
+
type: 'number',
|
|
3686
|
+
value: 1,
|
|
3687
|
+
options: arrayOf(100, 1),
|
|
3688
|
+
check: amount => checkIntegerInBetween(amount, 1, 100),
|
|
3702
3689
|
}),
|
|
3703
|
-
|
|
3704
|
-
|
|
3705
|
-
|
|
3706
|
-
|
|
3707
|
-
|
|
3708
|
-
type: [
|
|
3709
|
-
Literal('', {
|
|
3710
|
-
label: 'Skill developed',
|
|
3711
|
-
editable: true,
|
|
3712
|
-
required: true,
|
|
3713
|
-
// check: value => checkNotEmpty(value), // cannot check not empty if def value is empty
|
|
3714
|
-
}),
|
|
3715
|
-
],
|
|
3716
|
-
check: list => {
|
|
3717
|
-
if (!list?.length || !Array.isArray(list)) {
|
|
3718
|
-
throw Error('Must be a non empty array')
|
|
3719
|
-
}
|
|
3720
|
-
},
|
|
3721
|
-
},
|
|
3722
|
-
},
|
|
3690
|
+
),
|
|
3691
|
+
}),
|
|
3692
|
+
notes: Literal('', {
|
|
3693
|
+
label: 'Other qualitative notes',
|
|
3694
|
+
editable: true,
|
|
3723
3695
|
}),
|
|
3724
3696
|
},
|
|
3725
3697
|
})
|