@hulkapps/app-manager-vue 2.2.7 → 2.2.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/dist/app-manager-vue.esm.js +33 -7
- package/dist/app-manager-vue.min.js +2 -2
- package/dist/app-manager-vue.ssr.js +35 -9
- package/dist/hulkapps-app-manager.css +1 -1
- package/dist/hulkapps-app-manager.min.css +1 -1
- package/package.json +1 -1
- package/src/components/Plans/AppManagerGroupPlan.vue +17 -2
- package/src/components/Plans/AppManagerSliderPlan.vue +14 -2
package/package.json
CHANGED
|
@@ -238,6 +238,7 @@
|
|
|
238
238
|
plan: {},
|
|
239
239
|
plans: [],
|
|
240
240
|
features: [],
|
|
241
|
+
featureValues: [],
|
|
241
242
|
featuresByGroup: [],
|
|
242
243
|
shopify_plan: '',
|
|
243
244
|
default_plan_id: null,
|
|
@@ -342,7 +343,15 @@
|
|
|
342
343
|
} else return feature.value
|
|
343
344
|
}
|
|
344
345
|
else if(feature?.value_type === 'array') {
|
|
345
|
-
|
|
346
|
+
console.log(this.featureValues);
|
|
347
|
+
console.log(feature);
|
|
348
|
+
let values= JSON.parse(feature.value);
|
|
349
|
+
let that = this;
|
|
350
|
+
values = values.map(function(value){
|
|
351
|
+
return that.featureValues[feature.feature_id][value];
|
|
352
|
+
});
|
|
353
|
+
console.log(values);
|
|
354
|
+
return values.join(', ')
|
|
346
355
|
}
|
|
347
356
|
else if(feature?.value_type === 'string') {
|
|
348
357
|
return feature.value.replace('"', '').replace('"', '')
|
|
@@ -417,6 +426,13 @@
|
|
|
417
426
|
this.features = this.features?.sort((featureA, featureB) => parseInt(featureA.display_order) - parseInt(featureB.display_order))
|
|
418
427
|
this.features = this.features?.sort((featureA, featureB) => parseInt(featureA.group_order) - parseInt(featureB.group_order))
|
|
419
428
|
this.featuresByGroup = this.groupBy(this.features, 'group')
|
|
429
|
+
|
|
430
|
+
//Get feature array time values
|
|
431
|
+
this.features.forEach((feature) => {
|
|
432
|
+
if(feature.value_type == 'array'){
|
|
433
|
+
this.featureValues[feature.uuid] = feature.values;
|
|
434
|
+
}
|
|
435
|
+
});
|
|
420
436
|
}
|
|
421
437
|
},
|
|
422
438
|
async fetchPlans() {
|
|
@@ -477,7 +493,6 @@
|
|
|
477
493
|
await this.fetchFeatures();
|
|
478
494
|
await this.fetchPlans();
|
|
479
495
|
this.planLoading = false;
|
|
480
|
-
console.log(this.shop.plan.price);
|
|
481
496
|
}
|
|
482
497
|
}
|
|
483
498
|
</script>
|
|
@@ -212,6 +212,7 @@
|
|
|
212
212
|
plan: {},
|
|
213
213
|
plans: [],
|
|
214
214
|
features: [],
|
|
215
|
+
featureValues:[],
|
|
215
216
|
shopify_plan: '',
|
|
216
217
|
default_plan_id: null,
|
|
217
218
|
onboard: true,
|
|
@@ -345,7 +346,12 @@
|
|
|
345
346
|
} else return feature.value
|
|
346
347
|
}
|
|
347
348
|
else if(feature?.value_type === 'array') {
|
|
348
|
-
|
|
349
|
+
let values= JSON.parse(feature.value);
|
|
350
|
+
let that = this;
|
|
351
|
+
values = values.map(function(value){
|
|
352
|
+
return that.featureValues[feature.feature_id][value];
|
|
353
|
+
});
|
|
354
|
+
return values.join(', ')
|
|
349
355
|
}
|
|
350
356
|
else if(feature?.value_type === 'string') {
|
|
351
357
|
return feature.value.replace('"', '').replace('"', '')
|
|
@@ -461,7 +467,13 @@
|
|
|
461
467
|
if (data.features.length) {
|
|
462
468
|
this.features = data.features;
|
|
463
469
|
this.features = this.features?.filter((item) => item.hidden_feature !== true)
|
|
464
|
-
this.features = this.features?.sort((featureA, featureB) => parseInt(featureA.display_order) - parseInt(featureB.display_order))
|
|
470
|
+
this.features = this.features?.sort((featureA, featureB) => parseInt(featureA.display_order) - parseInt(featureB.display_order));
|
|
471
|
+
//Get feature array time values
|
|
472
|
+
this.features.forEach((feature) => {
|
|
473
|
+
if(feature.value_type == 'array'){
|
|
474
|
+
this.featureValues[feature.uuid] = feature.values;
|
|
475
|
+
}
|
|
476
|
+
});
|
|
465
477
|
}
|
|
466
478
|
},
|
|
467
479
|
async fetchPlans() {
|