rerobe-js-orm 3.1.2 → 3.1.4
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/form-states/Product/ProductFormState.d.ts +1 -0
- package/lib/form-states/Product/ProductFormState.js +19 -11
- package/lib/models/CustomerNotification.d.ts +1 -0
- package/lib/models/CustomerNotification.js +2 -0
- package/lib/types/customer-notification-types.d.ts +1 -0
- package/package.json +1 -1
|
@@ -489,7 +489,7 @@ class ProductFormState extends FormState_1.default {
|
|
|
489
489
|
}
|
|
490
490
|
}
|
|
491
491
|
fieldFactory(fieldType, fieldKey, fieldOptions) {
|
|
492
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
|
|
492
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
|
|
493
493
|
let options = fieldOptions || [];
|
|
494
494
|
let hidden = false;
|
|
495
495
|
if (fieldType === 'singleSelect') {
|
|
@@ -527,6 +527,14 @@ class ProductFormState extends FormState_1.default {
|
|
|
527
527
|
});
|
|
528
528
|
}
|
|
529
529
|
}
|
|
530
|
+
if ((_b = (_a = this.opts) === null || _a === void 0 ? void 0 : _a.materials) === null || _b === void 0 ? void 0 : _b.length) {
|
|
531
|
+
const materialsOptions = this.opts.materials.map((t) => ({
|
|
532
|
+
label: t,
|
|
533
|
+
value: t,
|
|
534
|
+
key: t,
|
|
535
|
+
}));
|
|
536
|
+
options = this.utilities.uniqObjArray([...options, ...materialsOptions], 'value');
|
|
537
|
+
}
|
|
530
538
|
}
|
|
531
539
|
if (fieldKey === 'editorAuthorizations') {
|
|
532
540
|
selectedValue = this.props[fieldKey] || {};
|
|
@@ -561,7 +569,7 @@ class ProductFormState extends FormState_1.default {
|
|
|
561
569
|
options.splice(0, 0, ...selectedSizeOptions);
|
|
562
570
|
}
|
|
563
571
|
}
|
|
564
|
-
if ((
|
|
572
|
+
if ((_d = (_c = this.opts) === null || _c === void 0 ? void 0 : _c.sizes) === null || _d === void 0 ? void 0 : _d.length) {
|
|
565
573
|
const sizesOptions = this.opts.sizes.map((t) => ({ label: t, value: t }));
|
|
566
574
|
options = this.utilities.uniqObjArray([...selectedSizeOptions, ...sizesOptions], 'value');
|
|
567
575
|
}
|
|
@@ -575,7 +583,7 @@ class ProductFormState extends FormState_1.default {
|
|
|
575
583
|
options.splice(0, 0, ...selectedJeanSizeOptions);
|
|
576
584
|
}
|
|
577
585
|
}
|
|
578
|
-
if ((
|
|
586
|
+
if ((_f = (_e = this.opts) === null || _e === void 0 ? void 0 : _e.jeanSizes) === null || _f === void 0 ? void 0 : _f.length) {
|
|
579
587
|
const jeanSizesOptions = this.opts.jeanSizes.map((t) => ({ label: t, value: t }));
|
|
580
588
|
options = this.utilities.uniqObjArray([...selectedJeanSizeOptions, ...jeanSizesOptions], 'value');
|
|
581
589
|
}
|
|
@@ -589,7 +597,7 @@ class ProductFormState extends FormState_1.default {
|
|
|
589
597
|
options.splice(0, 0, ...selectedShoeSizeOptions);
|
|
590
598
|
}
|
|
591
599
|
}
|
|
592
|
-
if ((
|
|
600
|
+
if ((_h = (_g = this.opts) === null || _g === void 0 ? void 0 : _g.shoeSizes) === null || _h === void 0 ? void 0 : _h.length) {
|
|
593
601
|
const shoeSizesOptions = this.opts.shoeSizes.map((t) => ({ label: t, value: t }));
|
|
594
602
|
options = this.utilities.uniqObjArray([...selectedShoeSizeOptions, ...shoeSizesOptions], 'value');
|
|
595
603
|
}
|
|
@@ -602,7 +610,7 @@ class ProductFormState extends FormState_1.default {
|
|
|
602
610
|
options.splice(0, 0, ...selectedBrandOptions);
|
|
603
611
|
}
|
|
604
612
|
}
|
|
605
|
-
if ((
|
|
613
|
+
if ((_k = (_j = this.opts) === null || _j === void 0 ? void 0 : _j.brands) === null || _k === void 0 ? void 0 : _k.length) {
|
|
606
614
|
const brandsOptions = this.opts.brands.map((t) => ({ label: t, value: t }));
|
|
607
615
|
options = this.utilities.uniqObjArray([...selectedBrandOptions, ...brandsOptions], 'value');
|
|
608
616
|
}
|
|
@@ -615,7 +623,7 @@ class ProductFormState extends FormState_1.default {
|
|
|
615
623
|
options.splice(0, 0, ...selectedColorOptions);
|
|
616
624
|
}
|
|
617
625
|
}
|
|
618
|
-
if ((
|
|
626
|
+
if ((_m = (_l = this.opts) === null || _l === void 0 ? void 0 : _l.colors) === null || _m === void 0 ? void 0 : _m.length) {
|
|
619
627
|
const colorsOptions = this.opts.colors.map((t) => ({ label: t, value: t }));
|
|
620
628
|
options = this.utilities.uniqObjArray([...selectedColorOptions, ...colorsOptions], 'value');
|
|
621
629
|
}
|
|
@@ -649,7 +657,7 @@ class ProductFormState extends FormState_1.default {
|
|
|
649
657
|
options.splice(0, 0, ...selectedPrimaryAgeCategoryOptions);
|
|
650
658
|
}
|
|
651
659
|
}
|
|
652
|
-
if ((
|
|
660
|
+
if ((_p = (_o = this.opts) === null || _o === void 0 ? void 0 : _o.primaryAgeCategories) === null || _p === void 0 ? void 0 : _p.length) {
|
|
653
661
|
const primaryAgeCategoryOptions = this.opts.primaryAgeCategories.map((t) => ({ label: t, value: t }));
|
|
654
662
|
options = this.utilities.uniqObjArray([...selectedPrimaryAgeCategoryOptions, ...primaryAgeCategoryOptions], 'value');
|
|
655
663
|
}
|
|
@@ -662,7 +670,7 @@ class ProductFormState extends FormState_1.default {
|
|
|
662
670
|
options.splice(0, 0, ...selectedOptions);
|
|
663
671
|
}
|
|
664
672
|
}
|
|
665
|
-
if ((
|
|
673
|
+
if ((_r = (_q = this.opts) === null || _q === void 0 ? void 0 : _q.conditions) === null || _r === void 0 ? void 0 : _r.length) {
|
|
666
674
|
const conditionsOptions = this.opts.conditions.map((t) => ({
|
|
667
675
|
label: t.label || '',
|
|
668
676
|
value: t.value || '',
|
|
@@ -717,7 +725,7 @@ class ProductFormState extends FormState_1.default {
|
|
|
717
725
|
if (this.props.gender === 'Man') {
|
|
718
726
|
options = options_1.manClothingSizeOptions;
|
|
719
727
|
}
|
|
720
|
-
if ((
|
|
728
|
+
if ((_t = (_s = this.opts) === null || _s === void 0 ? void 0 : _s.clothingSizes) === null || _t === void 0 ? void 0 : _t.length) {
|
|
721
729
|
const clothingSizesOptions = this.opts.clothingSizes.map((t) => ({ label: t, value: t }));
|
|
722
730
|
options = this.utilities.uniqObjArray(clothingSizesOptions, 'value');
|
|
723
731
|
}
|
|
@@ -729,7 +737,7 @@ class ProductFormState extends FormState_1.default {
|
|
|
729
737
|
selectedMajorDefectsOptions = this.props.majorDefects.map((t) => ({ label: t, value: t }));
|
|
730
738
|
}
|
|
731
739
|
let majorDefectsOptions = [];
|
|
732
|
-
if ((
|
|
740
|
+
if ((_v = (_u = this.opts) === null || _u === void 0 ? void 0 : _u.majorDefects) === null || _v === void 0 ? void 0 : _v.length) {
|
|
733
741
|
majorDefectsOptions = this.opts.majorDefects.map((t) => ({ label: t, value: t }));
|
|
734
742
|
}
|
|
735
743
|
options = this.utilities.uniqObjArray([...selectedMajorDefectsOptions, ...majorDefectsOptions], 'value');
|
|
@@ -740,7 +748,7 @@ class ProductFormState extends FormState_1.default {
|
|
|
740
748
|
selectedMinorDefectsOptions = this.props.minorDefects.map((t) => ({ label: t, value: t }));
|
|
741
749
|
}
|
|
742
750
|
let minorDefectsOptions = [];
|
|
743
|
-
if ((
|
|
751
|
+
if ((_x = (_w = this.opts) === null || _w === void 0 ? void 0 : _w.minorDefects) === null || _x === void 0 ? void 0 : _x.length) {
|
|
744
752
|
minorDefectsOptions = this.opts.minorDefects.map((t) => ({ label: t, value: t }));
|
|
745
753
|
}
|
|
746
754
|
options = this.utilities.uniqObjArray([...selectedMinorDefectsOptions, ...minorDefectsOptions], 'value');
|
|
@@ -17,6 +17,7 @@ class CustomerNotification extends Base_1.default {
|
|
|
17
17
|
this.recipientList = (props === null || props === void 0 ? void 0 : props.recipientList) || [];
|
|
18
18
|
this.isRead = (props === null || props === void 0 ? void 0 : props.isRead) || false;
|
|
19
19
|
this.skipSend = (props === null || props === void 0 ? void 0 : props.skipSend) || false;
|
|
20
|
+
this.messageToAdmin = (props === null || props === void 0 ? void 0 : props.messageToAdmin) || '';
|
|
20
21
|
}
|
|
21
22
|
toObj() {
|
|
22
23
|
return {
|
|
@@ -33,6 +34,7 @@ class CustomerNotification extends Base_1.default {
|
|
|
33
34
|
recipientList: this.recipientList,
|
|
34
35
|
isRead: this.isRead,
|
|
35
36
|
skipSend: this.skipSend,
|
|
37
|
+
messageToAdmin: this.messageToAdmin,
|
|
36
38
|
};
|
|
37
39
|
}
|
|
38
40
|
}
|
|
@@ -17,6 +17,7 @@ declare type CustomerNotificationAttributes = {
|
|
|
17
17
|
recipientList: RecipientList[];
|
|
18
18
|
isRead?: boolean;
|
|
19
19
|
skipSend?: boolean;
|
|
20
|
+
messageToAdmin?: string;
|
|
20
21
|
};
|
|
21
22
|
declare type ORDER_CONFIRMATION_TYPE = 'ORDER_CONFIRMATION';
|
|
22
23
|
declare type ORDER_CANCELLATION_TYPE = 'ORDER_CANCELLATION';
|