thm-p3-configurator 0.0.131 → 0.0.133
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.
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.useUpdatePrivateQuotationByIdMutation = exports.useUpdatePrivateAppointmentRequestByIdMutation = exports.useUpdatePrivateAppointmentByIdMutation = exports.useCreateSingleOrderMutation = exports.useCreateQuotationMutation = exports.useCreatePrivateQuotationMutation = exports.useCreatePrivateAppointmentRequestMutation = exports.useCreatePrivateAppointmentMutation = void 0;
|
|
6
|
+
exports.useUpdatePrivateQuotationByIdMutation = exports.useUpdatePrivateAppointmentRequestByIdMutation = exports.useUpdatePrivateAppointmentByIdMutation = exports.useCreateSingleOrderMutation = exports.useCreateQuotationMutation = exports.useCreatePrivateQuotationMutation = exports.useCreatePrivateAppointmentRequestMutation = exports.useCreatePrivateAppointmentMutation = exports.useCreateAppointmentRequestMutation = void 0;
|
|
7
7
|
var _reactQuery = require("react-query");
|
|
8
8
|
var _authenticatedProxyApi = require("./authenticatedProxyApi");
|
|
9
9
|
var _publicProxyApi = require("./publicProxyApi");
|
|
@@ -49,11 +49,51 @@ const useCreateQuotationMutation = () => {
|
|
|
49
49
|
};
|
|
50
50
|
|
|
51
51
|
/**
|
|
52
|
-
* @description Creates
|
|
52
|
+
* @description Creates an appointment request
|
|
53
53
|
*/
|
|
54
54
|
exports.useCreateQuotationMutation = useCreateQuotationMutation;
|
|
55
|
+
const useCreateAppointmentRequestMutation = () => {
|
|
56
|
+
const createAppointmentRequestMutation = (0, _reactQuery.useMutation)(_ref2 => {
|
|
57
|
+
let {
|
|
58
|
+
licensePlate,
|
|
59
|
+
model,
|
|
60
|
+
answers,
|
|
61
|
+
cart,
|
|
62
|
+
selectBoardComputerUpdate,
|
|
63
|
+
customer,
|
|
64
|
+
vehicle,
|
|
65
|
+
discount,
|
|
66
|
+
formula,
|
|
67
|
+
branchId
|
|
68
|
+
} = _ref2;
|
|
69
|
+
return _publicProxyApi.publicProxyApi.postAppointmentRequest({
|
|
70
|
+
model,
|
|
71
|
+
licensePlate,
|
|
72
|
+
formula,
|
|
73
|
+
answers: answers,
|
|
74
|
+
cart: cart,
|
|
75
|
+
selectBoardComputerUpdate: selectBoardComputerUpdate,
|
|
76
|
+
customer,
|
|
77
|
+
branchId,
|
|
78
|
+
discount,
|
|
79
|
+
vehicle
|
|
80
|
+
});
|
|
81
|
+
}, {});
|
|
82
|
+
return {
|
|
83
|
+
isCreatingAppointmentRequest: createAppointmentRequestMutation.isLoading,
|
|
84
|
+
isCreateAppointmentRequestError: createAppointmentRequestMutation.isError,
|
|
85
|
+
isCreateAppointmentRequestSuccess: createAppointmentRequestMutation.isSuccess,
|
|
86
|
+
resetAppointmentRequestCreation: createAppointmentRequestMutation.reset,
|
|
87
|
+
createAppointmentRequest: createAppointmentRequestMutation.mutate
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* @description Creates a single order
|
|
93
|
+
*/
|
|
94
|
+
exports.useCreateAppointmentRequestMutation = useCreateAppointmentRequestMutation;
|
|
55
95
|
const useCreateSingleOrderMutation = () => {
|
|
56
|
-
const createSingleOrderMutation = (0, _reactQuery.useMutation)(
|
|
96
|
+
const createSingleOrderMutation = (0, _reactQuery.useMutation)(_ref3 => {
|
|
57
97
|
let {
|
|
58
98
|
licensePlate,
|
|
59
99
|
model,
|
|
@@ -64,7 +104,7 @@ const useCreateSingleOrderMutation = () => {
|
|
|
64
104
|
vehicle,
|
|
65
105
|
preferredDateTime,
|
|
66
106
|
internalNote
|
|
67
|
-
} =
|
|
107
|
+
} = _ref3;
|
|
68
108
|
return _authenticatedProxyApi.authenticatedProxyApi.postSingleOrder({
|
|
69
109
|
licensePlate,
|
|
70
110
|
model,
|
|
@@ -92,7 +132,7 @@ const useCreateSingleOrderMutation = () => {
|
|
|
92
132
|
*/
|
|
93
133
|
exports.useCreateSingleOrderMutation = useCreateSingleOrderMutation;
|
|
94
134
|
const useCreatePrivateQuotationMutation = () => {
|
|
95
|
-
const createQuotationMutation = (0, _reactQuery.useMutation)(
|
|
135
|
+
const createQuotationMutation = (0, _reactQuery.useMutation)(_ref4 => {
|
|
96
136
|
let {
|
|
97
137
|
vehicle,
|
|
98
138
|
customer,
|
|
@@ -107,7 +147,7 @@ const useCreatePrivateQuotationMutation = () => {
|
|
|
107
147
|
formula,
|
|
108
148
|
discount,
|
|
109
149
|
isExitIntent = false
|
|
110
|
-
} =
|
|
150
|
+
} = _ref4;
|
|
111
151
|
return _authenticatedProxyApi.authenticatedProxyApi.postQuotation({
|
|
112
152
|
isExitIntent,
|
|
113
153
|
model,
|
|
@@ -139,7 +179,7 @@ const useCreatePrivateQuotationMutation = () => {
|
|
|
139
179
|
*/
|
|
140
180
|
exports.useCreatePrivateQuotationMutation = useCreatePrivateQuotationMutation;
|
|
141
181
|
const useCreatePrivateAppointmentMutation = () => {
|
|
142
|
-
const createPlannedAppointmentMutation = (0, _reactQuery.useMutation)(
|
|
182
|
+
const createPlannedAppointmentMutation = (0, _reactQuery.useMutation)(_ref5 => {
|
|
143
183
|
let {
|
|
144
184
|
vehicle,
|
|
145
185
|
customer,
|
|
@@ -155,7 +195,7 @@ const useCreatePrivateAppointmentMutation = () => {
|
|
|
155
195
|
formula,
|
|
156
196
|
discount,
|
|
157
197
|
customerAgreed
|
|
158
|
-
} =
|
|
198
|
+
} = _ref5;
|
|
159
199
|
return _authenticatedProxyApi.authenticatedProxyApi.postAppointment({
|
|
160
200
|
appointment,
|
|
161
201
|
model,
|
|
@@ -188,7 +228,7 @@ const useCreatePrivateAppointmentMutation = () => {
|
|
|
188
228
|
*/
|
|
189
229
|
exports.useCreatePrivateAppointmentMutation = useCreatePrivateAppointmentMutation;
|
|
190
230
|
const useCreatePrivateAppointmentRequestMutation = () => {
|
|
191
|
-
const createAppointmentRequestMutation = (0, _reactQuery.useMutation)(
|
|
231
|
+
const createAppointmentRequestMutation = (0, _reactQuery.useMutation)(_ref6 => {
|
|
192
232
|
let {
|
|
193
233
|
vehicle,
|
|
194
234
|
customer,
|
|
@@ -204,7 +244,7 @@ const useCreatePrivateAppointmentRequestMutation = () => {
|
|
|
204
244
|
formula,
|
|
205
245
|
discount,
|
|
206
246
|
customerAgreed
|
|
207
|
-
} =
|
|
247
|
+
} = _ref6;
|
|
208
248
|
return _authenticatedProxyApi.authenticatedProxyApi.postAppointmentRequest({
|
|
209
249
|
appointment,
|
|
210
250
|
model,
|
|
@@ -237,7 +277,7 @@ const useCreatePrivateAppointmentRequestMutation = () => {
|
|
|
237
277
|
*/
|
|
238
278
|
exports.useCreatePrivateAppointmentRequestMutation = useCreatePrivateAppointmentRequestMutation;
|
|
239
279
|
const useUpdatePrivateAppointmentRequestByIdMutation = id => {
|
|
240
|
-
const updateAppointmentRequestByIdMutation = (0, _reactQuery.useMutation)(
|
|
280
|
+
const updateAppointmentRequestByIdMutation = (0, _reactQuery.useMutation)(_ref7 => {
|
|
241
281
|
let {
|
|
242
282
|
vehicle,
|
|
243
283
|
customer,
|
|
@@ -253,7 +293,7 @@ const useUpdatePrivateAppointmentRequestByIdMutation = id => {
|
|
|
253
293
|
formula,
|
|
254
294
|
discount,
|
|
255
295
|
priceCalculationDate
|
|
256
|
-
} =
|
|
296
|
+
} = _ref7;
|
|
257
297
|
return _authenticatedProxyApi.authenticatedProxyApi.putAppointmentRequestById({
|
|
258
298
|
id,
|
|
259
299
|
payload: {
|
|
@@ -289,7 +329,7 @@ const useUpdatePrivateAppointmentRequestByIdMutation = id => {
|
|
|
289
329
|
*/
|
|
290
330
|
exports.useUpdatePrivateAppointmentRequestByIdMutation = useUpdatePrivateAppointmentRequestByIdMutation;
|
|
291
331
|
const useUpdatePrivateQuotationByIdMutation = id => {
|
|
292
|
-
const updateQuotationMutation = (0, _reactQuery.useMutation)(
|
|
332
|
+
const updateQuotationMutation = (0, _reactQuery.useMutation)(_ref8 => {
|
|
293
333
|
let {
|
|
294
334
|
vehicle,
|
|
295
335
|
customer,
|
|
@@ -303,7 +343,7 @@ const useUpdatePrivateQuotationByIdMutation = id => {
|
|
|
303
343
|
formula,
|
|
304
344
|
discount,
|
|
305
345
|
priceCalculationDate
|
|
306
|
-
} =
|
|
346
|
+
} = _ref8;
|
|
307
347
|
return _authenticatedProxyApi.authenticatedProxyApi.putQuotationById({
|
|
308
348
|
id,
|
|
309
349
|
payload: {
|
|
@@ -337,7 +377,7 @@ const useUpdatePrivateQuotationByIdMutation = id => {
|
|
|
337
377
|
*/
|
|
338
378
|
exports.useUpdatePrivateQuotationByIdMutation = useUpdatePrivateQuotationByIdMutation;
|
|
339
379
|
const useUpdatePrivateAppointmentByIdMutation = id => {
|
|
340
|
-
const updateAppointmentByIdMutation = (0, _reactQuery.useMutation)(
|
|
380
|
+
const updateAppointmentByIdMutation = (0, _reactQuery.useMutation)(_ref9 => {
|
|
341
381
|
let {
|
|
342
382
|
vehicle,
|
|
343
383
|
customer,
|
|
@@ -353,7 +393,7 @@ const useUpdatePrivateAppointmentByIdMutation = id => {
|
|
|
353
393
|
formula,
|
|
354
394
|
discount,
|
|
355
395
|
priceCalculationDate
|
|
356
|
-
} =
|
|
396
|
+
} = _ref9;
|
|
357
397
|
return _authenticatedProxyApi.authenticatedProxyApi.putAppointmentById({
|
|
358
398
|
id,
|
|
359
399
|
payload: {
|
|
@@ -265,6 +265,7 @@ const ProductCartTable = () => {
|
|
|
265
265
|
if (isLoadingProducts) {
|
|
266
266
|
return /*#__PURE__*/_react.default.createElement(_FullPageSpinner.default, null);
|
|
267
267
|
}
|
|
268
|
+
console.log('dit is de applicatie config', APP_CONFIG);
|
|
268
269
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
269
270
|
className: (0, _helpers__.withStyle)("content col-lg")
|
|
270
271
|
}, /*#__PURE__*/_react.default.createElement(_TogglableCard.default, {
|
|
@@ -315,11 +316,11 @@ const ProductCartTable = () => {
|
|
|
315
316
|
text: (0, _helpers__.formatPrice)(salesPrice),
|
|
316
317
|
className: 'cart__table-price text-end'
|
|
317
318
|
}] : [{}, {}, {
|
|
318
|
-
text: salesPrice > 0 ? (0, _helpers__.formatPrice)(salesPrice) : '',
|
|
319
|
+
text: APP_CONFIG.internal && salesPrice > 0 ? (0, _helpers__.formatPrice)(salesPrice) : '',
|
|
319
320
|
className: 'cart__table-price text-end'
|
|
320
321
|
}])]
|
|
321
322
|
});
|
|
322
|
-
}), mainProducts && /*#__PURE__*/_react.default.createElement(_ProductTableStaticRow.default, {
|
|
323
|
+
}), mainProducts && APP_CONFIG.internal && /*#__PURE__*/_react.default.createElement(_ProductTableStaticRow.default, {
|
|
323
324
|
productTitle: 'Montage',
|
|
324
325
|
productImage: _montagePlaceholder.default,
|
|
325
326
|
extraCells: [{}, {}, {}, ...(isToggled ? [{
|
|
@@ -374,7 +375,7 @@ const ProductCartTable = () => {
|
|
|
374
375
|
text: (0, _helpers__.formatPrice)(totals === null || totals === void 0 ? void 0 : totals.subtotalMontageExclVat),
|
|
375
376
|
className: 'fw-bold text-end pb-2'
|
|
376
377
|
}] : [{
|
|
377
|
-
text: (0, _helpers__.formatPrice)(totals === null || totals === void 0 ? void 0 : totals.subtotalMontageInclVat),
|
|
378
|
+
text: APP_CONFIG.internal ? (0, _helpers__.formatPrice)(totals === null || totals === void 0 ? void 0 : totals.subtotalMontageInclVat) : (0, _helpers__.formatPrice)((totals === null || totals === void 0 ? void 0 : totals.subtotalMontageExclVat) * 1.21),
|
|
378
379
|
className: 'fw-bold text-end pb-2'
|
|
379
380
|
}])]
|
|
380
381
|
})), accessoireProducts.length > 0 && /*#__PURE__*/_react.default.createElement(_ProductTableSection.default, {
|
|
@@ -404,7 +405,7 @@ const ProductCartTable = () => {
|
|
|
404
405
|
text: (0, _helpers__.formatPrice)(salesPrice),
|
|
405
406
|
className: 'cart__table-price text-end'
|
|
406
407
|
}] : [{}, {}, {
|
|
407
|
-
text: (0, _helpers__.formatPrice)(salesPrice),
|
|
408
|
+
text: APP_CONFIG.internal && salesPrice > 0 ? (0, _helpers__.formatPrice)(salesPrice) : '',
|
|
408
409
|
className: 'cart__table-price text-end'
|
|
409
410
|
}])],
|
|
410
411
|
productAmount: selectedExtras[product.articleNumber],
|
|
@@ -447,7 +448,7 @@ const ProductCartTable = () => {
|
|
|
447
448
|
text: (0, _helpers__.formatPrice)(totals === null || totals === void 0 ? void 0 : totals.totalExtrasExclVat),
|
|
448
449
|
className: 'fw-bold text-end pb-2'
|
|
449
450
|
}] : [{
|
|
450
|
-
text: (0, _helpers__.formatPrice)(totals === null || totals === void 0 ? void 0 : totals.totalExtrasInclVat),
|
|
451
|
+
text: APP_CONFIG.internal ? (0, _helpers__.formatPrice)(totals === null || totals === void 0 ? void 0 : totals.totalExtrasInclVat) : (0, _helpers__.formatPrice)((totals === null || totals === void 0 ? void 0 : totals.totalExtrasExclVat) * 1.21),
|
|
451
452
|
className: 'fw-bold text-end pb-2'
|
|
452
453
|
}])]
|
|
453
454
|
})), /*#__PURE__*/_react.default.createElement(_ProductTableTotal.default, {
|
|
@@ -467,7 +468,7 @@ const ProductCartTable = () => {
|
|
|
467
468
|
text: (0, _helpers__.formatPrice)(totals === null || totals === void 0 ? void 0 : totals.totalBeforeDiscountExclVat),
|
|
468
469
|
className: 'text-end pt-2'
|
|
469
470
|
}] : [{
|
|
470
|
-
text: (0, _helpers__.formatPrice)(totals === null || totals === void 0 ? void 0 : totals.
|
|
471
|
+
text: APP_CONFIG.internal ? (0, _helpers__.formatPrice)(totals === null || totals === void 0 ? void 0 : totals.totalBeforeDiscountInclVat) : (0, _helpers__.formatPrice)(totals === null || totals === void 0 ? void 0 : totals.totalAfterDiscountExclVat),
|
|
471
472
|
className: 'text-end pt-2'
|
|
472
473
|
}])], [{}, {}, {}, ...(isToggled ? [{
|
|
473
474
|
text: '',
|
|
@@ -485,7 +486,7 @@ const ProductCartTable = () => {
|
|
|
485
486
|
text: (0, _helpers__.formatPrice)(totals === null || totals === void 0 ? void 0 : totals.totalVatBeforeDiscount),
|
|
486
487
|
className: 'text-end'
|
|
487
488
|
}] : [{
|
|
488
|
-
text: (0, _helpers__.formatPrice)(totals === null || totals === void 0 ? void 0 : totals.
|
|
489
|
+
text: APP_CONFIG.internal ? (0, _helpers__.formatPrice)(totals === null || totals === void 0 ? void 0 : totals.totalVatBeforeDiscountInclVat) : (0, _helpers__.formatPrice)(totals === null || totals === void 0 ? void 0 : totals.totalVatAfterDiscount),
|
|
489
490
|
className: 'text-end'
|
|
490
491
|
}])], [{}, {}, {}, ...(isToggled ? [{
|
|
491
492
|
text: '',
|
|
@@ -503,7 +504,7 @@ const ProductCartTable = () => {
|
|
|
503
504
|
text: (0, _helpers__.formatPrice)(totals === null || totals === void 0 ? void 0 : totals.totalBeforeDiscountInclVat),
|
|
504
505
|
className: 'fw-bold text-end'
|
|
505
506
|
}] : [{
|
|
506
|
-
text: (0, _helpers__.formatPrice)(totals === null || totals === void 0 ? void 0 : totals.totalBeforeDiscountInclVat),
|
|
507
|
+
text: APP_CONFIG.internal ? (0, _helpers__.formatPrice)(totals === null || totals === void 0 ? void 0 : totals.totalBeforeDiscountInclVat) : (0, _helpers__.formatPrice)(totals === null || totals === void 0 ? void 0 : totals.totalAfterDiscountInclVat),
|
|
507
508
|
className: 'fw-bold text-end'
|
|
508
509
|
}])]].filter(Boolean)
|
|
509
510
|
}), (discountAmount || discountPercentage) && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("td", {
|