rerobe-js-orm 4.1.2 → 4.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.js +3 -3
- package/lib/form-states/Product/options.d.ts +4 -0
- package/lib/form-states/Product/options.js +24 -1409
- package/lib/helpers/OrderHelpers.js +1 -1
- package/lib/helpers/ReRobeProductHelpers.d.ts +3 -0
- package/lib/helpers/ReRobeProductHelpers.js +127 -0
- package/lib/helpers/Utilities.d.ts +5 -3
- package/lib/helpers/Utilities.js +42 -36
- package/lib/models/Product.js +7 -8
- package/lib/types/rerobe-product-types.d.ts +43 -0
- package/package.json +1 -1
|
@@ -80,7 +80,7 @@ class ProductFormState extends FormState_1.default {
|
|
|
80
80
|
this.fields.locationIds = this.fieldFactory('multiSelect', 'locationIds');
|
|
81
81
|
this.fields.inventoryLocations = this.fieldFactory('multiSelect', 'inventoryLocations');
|
|
82
82
|
this.fields.featuredCollections = this.fieldFactory('multiSelect', 'featuredCollections');
|
|
83
|
-
this.fields.primaryAgeCategory = this.fieldFactory('singleSelect', 'primaryAgeCategory');
|
|
83
|
+
this.fields.primaryAgeCategory = this.fieldFactory('singleSelect', 'primaryAgeCategory', options_1.primaryAgeCategoryOptions);
|
|
84
84
|
this.fields.tags = this.fieldFactory('multiSelect', 'tags');
|
|
85
85
|
this.fields.metaDataTitle = this.fieldFactory('textInput', 'metaDataTitle');
|
|
86
86
|
this.fields.metaDataDescription = this.fieldFactory('textInput', 'metaDataDescription');
|
|
@@ -752,8 +752,8 @@ class ProductFormState extends FormState_1.default {
|
|
|
752
752
|
}
|
|
753
753
|
}
|
|
754
754
|
if ((_p = (_o = this.opts) === null || _o === void 0 ? void 0 : _o.primaryAgeCategories) === null || _p === void 0 ? void 0 : _p.length) {
|
|
755
|
-
const
|
|
756
|
-
options = this.utilities.uniqObjArray([...selectedPrimaryAgeCategoryOptions, ...
|
|
755
|
+
const suppliedPrimaryAgeCategoryOptions = this.opts.primaryAgeCategories.map((t) => ({ label: t, value: t }));
|
|
756
|
+
options = this.utilities.uniqObjArray([...selectedPrimaryAgeCategoryOptions, ...suppliedPrimaryAgeCategoryOptions], 'value');
|
|
757
757
|
}
|
|
758
758
|
}
|
|
759
759
|
if (fieldKey === 'condition') {
|