@ordergroove/offers 2.27.12 → 2.27.13-alpha-PR-652-2.0
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ordergroove/offers",
|
|
3
|
-
"version": "2.27.
|
|
3
|
+
"version": "2.27.13-alpha-PR-652-2.0+bb674a9f",
|
|
4
4
|
"description": "offer state component",
|
|
5
5
|
"author": "Eugenio Lattanzio <eugenio63@gmail.com>",
|
|
6
6
|
"homepage": "https://github.com/ordergroove/plush-toys#readme",
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@ordergroove/offers-templates": "^0.4.14"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "bb674a9fa83310f4d92f61e5ac2d2b0da989ab98"
|
|
49
49
|
}
|
|
@@ -50,13 +50,20 @@ export class SelectFrequency extends withChildOptions(FrequencyStatus) {
|
|
|
50
50
|
|
|
51
51
|
// default frequency comes from redux store first, then default option value, and then finally attribute value.
|
|
52
52
|
get defaultFrequency() {
|
|
53
|
+
const { options, isSelected } = this.childOptions;
|
|
54
|
+
|
|
55
|
+
if (isSelected && this.frequencies?.length) {
|
|
56
|
+
const ix = options.findIndex(it => it.value === isSelected) || 0;
|
|
57
|
+
return this.frequencies[ix];
|
|
58
|
+
}
|
|
59
|
+
|
|
53
60
|
if (this.configDefaultFrequency) {
|
|
54
61
|
return this.configDefaultFrequency;
|
|
55
62
|
}
|
|
56
63
|
if (this.productDefaultFrequency) {
|
|
57
64
|
return this.productDefaultFrequency;
|
|
58
65
|
}
|
|
59
|
-
|
|
66
|
+
|
|
60
67
|
if (isSelected) {
|
|
61
68
|
return isSelected;
|
|
62
69
|
}
|