ti2 1.0.86 → 1.0.88
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/controllers/app.js +17 -1
- package/controllers/bookings.js +1 -1
- package/package.json +1 -1
package/controllers/app.js
CHANGED
|
@@ -44,7 +44,23 @@ const tokenTemplate = async (req, res, next) => {
|
|
|
44
44
|
},
|
|
45
45
|
});
|
|
46
46
|
template = R.map(safeRegExp, template);
|
|
47
|
-
return res.json({
|
|
47
|
+
return res.json({
|
|
48
|
+
template: {
|
|
49
|
+
...template,
|
|
50
|
+
// ttlProducts and doNotCallPluginForProducts are being used at ti2 level
|
|
51
|
+
// hence we should just by default allow them for all ti2 plugins
|
|
52
|
+
ttlForProducts: {
|
|
53
|
+
type: 'number',
|
|
54
|
+
regExp: /.+/,
|
|
55
|
+
default: 60 * 60 * 24, // 1 day
|
|
56
|
+
},
|
|
57
|
+
doNotCallPluginForProducts: {
|
|
58
|
+
type: 'boolean',
|
|
59
|
+
regExp: /.+/,
|
|
60
|
+
default: false,
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
});
|
|
48
64
|
} catch (err) {
|
|
49
65
|
return next(err);
|
|
50
66
|
}
|
package/controllers/bookings.js
CHANGED
|
@@ -102,7 +102,7 @@ const $searchProductList = (products, searchInput = '', optionId = '') => {
|
|
|
102
102
|
} ${R.path(['optionName'], option) || ''
|
|
103
103
|
} ${R.path(['optionId'], option) || ''
|
|
104
104
|
} ${R.path(['supplierId'], product) || ''}`;
|
|
105
|
-
const inputValueLower = searchInput.trim().toLowerCase();
|
|
105
|
+
const inputValueLower = (searchInput || '').trim().toLowerCase();
|
|
106
106
|
const parts = inputValueLower.split(' ').filter(Boolean); // Filter out any empty strings just in case
|
|
107
107
|
const pwFilteredOptions = products.map(product => {
|
|
108
108
|
const filteredOptions = R.pathOr([], ['options'], product).filter(option => {
|