thm-p3-configurator 0.0.92 → 0.0.94
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.
|
@@ -930,8 +930,7 @@ const orderSessionReducer = (state, action) => {
|
|
|
930
930
|
case orderSessionActions.CLEAR_ANSWERS:
|
|
931
931
|
{
|
|
932
932
|
return _objectSpread(_objectSpread({}, state), {}, {
|
|
933
|
-
answers: {}
|
|
934
|
-
durationAnswer: undefined
|
|
933
|
+
answers: {}
|
|
935
934
|
});
|
|
936
935
|
}
|
|
937
936
|
case orderSessionActions.SET_PRICE_CALCULATION_DATE:
|
|
@@ -67,7 +67,7 @@ function _toPrimitive(t, r) {
|
|
|
67
67
|
* @description Covnerts an existing hyper dossier object into a local order session
|
|
68
68
|
*/
|
|
69
69
|
const parseDossierToOrderSession = exports.parseDossierToOrderSession = function parseDossierToOrderSession() {
|
|
70
|
-
var _dossier$kanaal, _dossier$kanaalPartne, _dossier$kanaalHoofka, _dossier$
|
|
70
|
+
var _dossier$kanaal, _dossier$kanaalPartne, _dossier$kanaalHoofka, _dossier$statusDossie, _dossier$statusDossie2, _dossier$vestiging, _dossier$typeEigendom, _Date, _dossier$klant, _dossier$klant2, _dossier$klant3, _dossier$klant4, _dossier$klant5, _dossier$klant$postal, _dossier$klant6, _dossier$klant$city, _dossier$klant7, _dossier$klant$street, _dossier$klant8, _dossier$klant$huisnu, _dossier$klant9, _dossier$anwbId;
|
|
71
71
|
let dossier = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
72
72
|
return {
|
|
73
73
|
licensePlate: dossier === null || dossier === void 0 ? void 0 : dossier.kenteken,
|
|
@@ -83,7 +83,6 @@ const parseDossierToOrderSession = exports.parseDossierToOrderSession = function
|
|
|
83
83
|
durationOptions: [],
|
|
84
84
|
execution1Options: [],
|
|
85
85
|
execution2Options: [],
|
|
86
|
-
customerAgreed: (_dossier$akkoordOpmer = dossier === null || dossier === void 0 ? void 0 : dossier.akkoordOpmerkingen) !== null && _dossier$akkoordOpmer !== void 0 ? _dossier$akkoordOpmer : false,
|
|
87
86
|
selectedExtras: {},
|
|
88
87
|
// Note: there is no way to make which articles found in dossier.lines is towbar/cableset/comboset
|
|
89
88
|
// Therefore: we leave them empty now, and update the order when fetching the products again from the custom API
|
|
@@ -124,8 +124,9 @@ const InternalSessionEditPage = props => {
|
|
|
124
124
|
const history = (0, _reactRouter.useHistory)();
|
|
125
125
|
const hydrateOrderSessionByDossier = (0, _react.useCallback)(async dossierById => {
|
|
126
126
|
try {
|
|
127
|
-
var _orderRes$data, _orderRes$data2;
|
|
128
|
-
|
|
127
|
+
var _dossierById$akkoordO, _orderRes$data, _orderRes$data2;
|
|
128
|
+
let session = (0, _dossier.parseDossierToOrderSession)(dossierById);
|
|
129
|
+
session.customerAgreed = (_dossierById$akkoordO = dossierById === null || dossierById === void 0 ? void 0 : dossierById.akkoordOpmerkingen) !== null && _dossierById$akkoordO !== void 0 ? _dossierById$akkoordO : false;
|
|
129
130
|
const orderRes = await _orderApi.orderApi.getOrder(new URLSearchParams((0, _helpers__.removeNullishProps)(_objectSpread(_objectSpread({}, session), {}, {
|
|
130
131
|
formula
|
|
131
132
|
}))).toString());
|