thm-p3-configurator 0.0.305 → 0.0.307
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/dist/src/shared/__components__/internal/InternalCustomerDetailsForm.js +160 -242
- package/dist/src/shared/__constants__/cartTable.js +5 -2
- package/dist/src/shared/__containers__/ProductsCartOverview.js +42 -3
- package/dist/src/shared/__containers__/internal/InternalAppointmentForm.js +193 -436
- package/dist/src/shared/__containers__/internal/InternalExtraPriceForm.js +141 -0
- package/dist/src/shared/__containers__/internal/InternalQuotationForm.js +143 -186
- package/dist/src/shared/__context__/OrderSessionContext.js +24 -0
- package/dist/src/shared/__helpers__/cartTable.js +46 -7
- package/package.json +1 -1
|
@@ -5,7 +5,7 @@ require("core-js/modules/web.dom-collections.iterator.js");
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.textCell = exports.priceCell = exports.getTotalRowCells = exports.getSectionTotalCells = exports.getMontageCells = exports.getMarketCorrectionCells = exports.getMainProductCells = exports.getDiscountRowCells = exports.getCartTableHeaderColumns = exports.getCartTableDisplayMode = exports.getAccessoryProductCells = exports.emptyCells = exports.emptyCell = void 0;
|
|
8
|
+
exports.textCell = exports.priceCell = exports.getTotalRowCells = exports.getSectionTotalCells = exports.getMontageCells = exports.getMarketCorrectionCells = exports.getMainProductCells = exports.getExtraPriceCells = exports.getDiscountRowCells = exports.getCartTableHeaderColumns = exports.getCartTableDisplayMode = exports.getAccessoryProductCells = exports.emptyCells = exports.emptyCell = void 0;
|
|
9
9
|
require("core-js/modules/esnext.iterator.map.js");
|
|
10
10
|
require("core-js/modules/web.dom-collections.iterator.js");
|
|
11
11
|
var _cartTable = require("../__constants__/cartTable");
|
|
@@ -257,6 +257,45 @@ const getMarketCorrectionCells = exports.getMarketCorrectionCells = function get
|
|
|
257
257
|
}
|
|
258
258
|
};
|
|
259
259
|
|
|
260
|
+
/**
|
|
261
|
+
* Generate extra cells for extra price (Meerprijs) rows
|
|
262
|
+
* @param {string} displayMode - Current display mode
|
|
263
|
+
* @param {Object} values - Price values
|
|
264
|
+
* @param {number} values.salesIncl - Sales price incl VAT
|
|
265
|
+
* @param {number} values.salesExcl - Sales price excl VAT
|
|
266
|
+
* @param {boolean} showCatalogPrice - Whether to show the catalog price column
|
|
267
|
+
* @returns {Array} Array of cell configuration objects
|
|
268
|
+
*/
|
|
269
|
+
const getExtraPriceCells = exports.getExtraPriceCells = function getExtraPriceCells(displayMode, _ref4) {
|
|
270
|
+
let {
|
|
271
|
+
salesIncl,
|
|
272
|
+
salesExcl
|
|
273
|
+
} = _ref4;
|
|
274
|
+
let showCatalogPrice = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
275
|
+
const baseCells = [{}, {}, {}];
|
|
276
|
+
switch (displayMode) {
|
|
277
|
+
case _cartTable.CART_TABLE_DISPLAY_MODES.TOGGLED_TMG:
|
|
278
|
+
// TMG style: Inkoopprijs - Marge - [Catalogprijs] - Verkoopprijs
|
|
279
|
+
return [...baseCells, priceCell(0),
|
|
280
|
+
// Purchase price is 0
|
|
281
|
+
priceCell(salesExcl),
|
|
282
|
+
// Margin equals sales
|
|
283
|
+
...(showCatalogPrice ? [textCell('N.v.t.', _cartTable.CART_TABLE_PRICE_CELL_CLASS)] : []), priceCell(salesExcl)];
|
|
284
|
+
case _cartTable.CART_TABLE_DISPLAY_MODES.TOGGLED_STANDARD:
|
|
285
|
+
// Standard style: Inkoopprijs - Marge - [Catalogprijs] - Korting% - Verkoopprijs
|
|
286
|
+
return [...baseCells, priceCell(0),
|
|
287
|
+
// Purchase price is 0
|
|
288
|
+
priceCell(salesExcl),
|
|
289
|
+
// Margin equals sales
|
|
290
|
+
...(showCatalogPrice ? [textCell('N.v.t.', _cartTable.CART_TABLE_PRICE_CELL_CLASS)] : []), emptyCell(_cartTable.CART_TABLE_PRICE_CELL_CLASS),
|
|
291
|
+
// No discount for extra price
|
|
292
|
+
priceCell(salesExcl)];
|
|
293
|
+
default:
|
|
294
|
+
// Default mode: Just show price incl VAT
|
|
295
|
+
return [...baseCells, priceCell(salesIncl)];
|
|
296
|
+
}
|
|
297
|
+
};
|
|
298
|
+
|
|
260
299
|
/**
|
|
261
300
|
* Generate extra cells for section total rows
|
|
262
301
|
* @param {string} displayMode - Current display mode
|
|
@@ -267,12 +306,12 @@ const getMarketCorrectionCells = exports.getMarketCorrectionCells = function get
|
|
|
267
306
|
* @param {boolean} showCatalogPrice - Whether to show the catalog price column (false for THC, true otherwise)
|
|
268
307
|
* @returns {Array} Array of cell configuration objects
|
|
269
308
|
*/
|
|
270
|
-
const getSectionTotalCells = exports.getSectionTotalCells = function getSectionTotalCells(displayMode,
|
|
309
|
+
const getSectionTotalCells = exports.getSectionTotalCells = function getSectionTotalCells(displayMode, _ref5) {
|
|
271
310
|
let {
|
|
272
311
|
tmgSubtotals,
|
|
273
312
|
standardSubtotals,
|
|
274
313
|
defaultSubtotal
|
|
275
|
-
} =
|
|
314
|
+
} = _ref5;
|
|
276
315
|
let showCatalogPrice = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
277
316
|
const baseCells = [{}, {}];
|
|
278
317
|
switch (displayMode) {
|
|
@@ -308,13 +347,13 @@ const getSectionTotalCells = exports.getSectionTotalCells = function getSectionT
|
|
|
308
347
|
* @param {boolean} showCatalogPrice - Whether to show the catalog price column (false for THC, true otherwise)
|
|
309
348
|
* @returns {Array} Array of cell configuration objects
|
|
310
349
|
*/
|
|
311
|
-
const getTotalRowCells = exports.getTotalRowCells = function getTotalRowCells(displayMode,
|
|
350
|
+
const getTotalRowCells = exports.getTotalRowCells = function getTotalRowCells(displayMode, _ref6) {
|
|
312
351
|
let {
|
|
313
352
|
label,
|
|
314
353
|
locationValue,
|
|
315
354
|
consumerValue,
|
|
316
355
|
className = 'text-end'
|
|
317
|
-
} =
|
|
356
|
+
} = _ref6;
|
|
318
357
|
let showCatalogPrice = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
319
358
|
const baseCells = [{}, {}, {}];
|
|
320
359
|
switch (displayMode) {
|
|
@@ -341,12 +380,12 @@ const getTotalRowCells = exports.getTotalRowCells = function getTotalRowCells(di
|
|
|
341
380
|
* @param {boolean} showCatalogPrice - Whether to show the catalog price column (false for THC, true otherwise)
|
|
342
381
|
* @returns {Array} Array of cell configuration objects
|
|
343
382
|
*/
|
|
344
|
-
const getDiscountRowCells = exports.getDiscountRowCells = function getDiscountRowCells(displayMode,
|
|
383
|
+
const getDiscountRowCells = exports.getDiscountRowCells = function getDiscountRowCells(displayMode, _ref7) {
|
|
345
384
|
let {
|
|
346
385
|
label,
|
|
347
386
|
value,
|
|
348
387
|
className = 'text-end'
|
|
349
|
-
} =
|
|
388
|
+
} = _ref7;
|
|
350
389
|
let showCatalogPrice = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
351
390
|
const baseCells = [{}, {}, {}];
|
|
352
391
|
switch (displayMode) {
|