From d1c0e083ac8f64dfaa8505fc11e30728dbd5a58d Mon Sep 17 00:00:00 2001 From: it-fixcomart Date: Mon, 19 Aug 2024 09:36:24 +0700 Subject: update voucher pasti hemat avoid failed --- src/utils/solrMapping.js | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/utils') diff --git a/src/utils/solrMapping.js b/src/utils/solrMapping.js index d4694eb2..ff851f6c 100644 --- a/src/utils/solrMapping.js +++ b/src/utils/solrMapping.js @@ -38,6 +38,7 @@ export const productMappingSolr = (products, pricelist) => { qtySold: product?.qty_sold_f || 0, isTkdn:product?.tkdn_b || false, isSni:product?.sni_b || false, + newVoucherPastiHemat: [], voucherPastiHemat:product?.voucher_pastihemat || [] }; @@ -56,6 +57,14 @@ export const productMappingSolr = (products, pricelist) => { name: product.category_name_s || '', }, ]; + productMapped.newVoucherPastiHemat = [ + { + min_purchase: product.min_purchase_f || 0, + discount_type: product.discount_type_s || '', + discount_amount: product.discount_amount_f || 0, + max_discount: product.max_discount_f || 0, + }, + ]; return productMapped; }); }; -- cgit v1.2.3