thm-p3-configurator 0.0.79 → 0.0.81
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.
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
require("core-js/modules/es.promise.js");
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
6
7
|
exports.orderApi = void 0;
|
|
8
|
+
require("core-js/modules/es.promise.js");
|
|
7
9
|
var _axios = _interopRequireDefault(require("axios"));
|
|
8
10
|
var _index = require("../__constants__/index.js");
|
|
9
11
|
var _LocalStorageWorker = require("../__services__/LocalStorageWorker.js");
|
|
@@ -29,6 +31,19 @@ orderClient.interceptors.request.use(config => {
|
|
|
29
31
|
config.headers.Authorization = "Bearer ".concat(authSession === null || authSession === void 0 ? void 0 : authSession.accessToken);
|
|
30
32
|
return config;
|
|
31
33
|
});
|
|
34
|
+
|
|
35
|
+
// Add response interceptor to log 4xx errors
|
|
36
|
+
orderClient.interceptors.response.use(response => response, error => {
|
|
37
|
+
if (error.response && error.response.status >= 400 && error.response.status < 500) {
|
|
38
|
+
console.log('4xx Error:', {
|
|
39
|
+
status: error.response.status,
|
|
40
|
+
url: error.config.url,
|
|
41
|
+
method: error.config.method,
|
|
42
|
+
data: error.response.data
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
return Promise.reject(error);
|
|
46
|
+
});
|
|
32
47
|
const orderApi = exports.orderApi = {
|
|
33
48
|
getOrder: orderParameters => orderClient("api".concat(APP_CONFIG.internal ? '' : '/public', "/order?").concat(orderParameters) // Remove the `/public` param if the configurator is internal,
|
|
34
49
|
),
|
|
@@ -204,12 +204,17 @@ const SingleOrderModalContent = _ref3 => {
|
|
|
204
204
|
} = _ref5;
|
|
205
205
|
setSelectedBranchId(value);
|
|
206
206
|
setLocalBranchId(value);
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
207
|
+
if (branchIdWithFormulaCode.has(value)) {
|
|
208
|
+
console.log('setting formula code', branchIdWithFormulaCode.get(value));
|
|
209
|
+
dispatch({
|
|
210
|
+
type: _OrderSessionContext.orderSessionActions.SET_SINGLE_ORDER_FORMULA_CODE,
|
|
211
|
+
payload: {
|
|
212
|
+
formulaCode: branchIdWithFormulaCode.get(value)
|
|
213
|
+
}
|
|
214
|
+
});
|
|
215
|
+
} else {
|
|
216
|
+
console.log('no formula code found');
|
|
217
|
+
}
|
|
213
218
|
}
|
|
214
219
|
}));
|
|
215
220
|
};
|
|
@@ -98,9 +98,12 @@ const InternalSingleOrderProductOverview = _ref => {
|
|
|
98
98
|
executionAnswer2
|
|
99
99
|
}] = (0, _OrderSessionContext.useOrderSession)();
|
|
100
100
|
let formula = (0, _FormulaContext.useFormula)();
|
|
101
|
+
console.log('singleOrderFormulaCode', singleOrderFormulaCode);
|
|
101
102
|
if (singleOrderFormulaCode) {
|
|
102
103
|
formula = singleOrderFormulaCode;
|
|
104
|
+
console.log('hello world');
|
|
103
105
|
}
|
|
106
|
+
console.log('current formula', formula);
|
|
104
107
|
const mergedFilters = _objectSpread(_objectSpread({}, filters), {}, {
|
|
105
108
|
licensePlate,
|
|
106
109
|
model,
|