@managesome/eposmatic-toolkit 0.2.658 → 0.2.659

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.
@@ -18,6 +18,7 @@ const store_1 = require("../store");
18
18
  const order_engine_1 = require("./order-engine");
19
19
  const platform_catalog_1 = require("./platform-catalog");
20
20
  const platform_num_1 = require("./platform-num");
21
+ const price_conversion_1 = require("./price-conversion");
21
22
  function getSpecialsPostedData(data, payload) {
22
23
  return data.some((special) => special._id === payload._id)
23
24
  ? data
@@ -50,10 +51,12 @@ function getSpecialsDeletedData(data, payload) {
50
51
  function getSpecialWithPrice(special, writeable) {
51
52
  const convertToPrice = writeable ? platform_num_1.convertPriceObjToCents : platform_num_1.convertPriceObjFromCents;
52
53
  const convertItemSpecialHours = writeable ? platform_num_1.convertSpecialHoursToCents : platform_num_1.convertSpecialHoursFromCents;
54
+ const convertNumPrice = writeable ? price_conversion_1.convertPriceToCents : price_conversion_1.convertPriceFromCents;
53
55
  return {
54
56
  ...special,
55
57
  ...(special.price != null ? { price: convertToPrice(special.price) } : {}),
56
58
  ...(special.discount_amount != null ? { discount_amount: convertToPrice(special.discount_amount) } : {}),
59
+ ...(special.display_price != null ? { display_price: convertNumPrice(special.display_price) } : {}),
57
60
  ...(special.item_special_hours != null
58
61
  ? {
59
62
  item_special_hours: convertItemSpecialHours(special.item_special_hours),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@managesome/eposmatic-toolkit",
3
- "version": "0.2.658",
3
+ "version": "0.2.659",
4
4
  "description": "A Toolkit Library for Eposmatic",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",