1. View, filter, and save Product Permutation. \n 2. Synchronised with Product Category page and all common functionality moved into base and base table css, js, and python files.
This commit is contained in:
24
static/js/lib/business_objects.js
Normal file
24
static/js/lib/business_objects.js
Normal file
@@ -0,0 +1,24 @@
|
||||
|
||||
|
||||
export default class BusinessObjects {
|
||||
static getOptionJsonFromObjectJsonAndKeys(objectJson, keyText, keyValue, valueSelected = null) {
|
||||
return {
|
||||
text: objectJson[keyText],
|
||||
value: objectJson[keyValue],
|
||||
selected: (objectJson[keyValue] == valueSelected),
|
||||
};
|
||||
}
|
||||
static getOptionJsonFromObjectJson(objectJson, valueSelected = null) {
|
||||
let keyText = objectJson[flagNameAttrOptionText];
|
||||
let keyValue = objectJson[flagNameAttrOptionValue];
|
||||
console.log({objectJson, keyText, keyValue});
|
||||
return BusinessObjects.getOptionJsonFromObjectJsonAndKeys(objectJson, keyText, keyValue, valueSelected);
|
||||
}
|
||||
/*
|
||||
static getOptionJsonFromProductPermutation(permutation) {
|
||||
return {
|
||||
text: permutation
|
||||
};
|
||||
}
|
||||
*/
|
||||
}
|
||||
Reference in New Issue
Block a user