henrybuilt-js-library
Advanced tools
Comparing version 1.8.220 to 1.8.222
{ | ||
"name": "henrybuilt-js-library", | ||
"version": "1.8.220", | ||
"version": "1.8.222", | ||
"description": "", | ||
@@ -8,3 +8,3 @@ "main": "index.js", | ||
"watch": "webpack --watch", | ||
"develop": "concurrently --kill-others \"webpack --watch\" \"python -m SimpleHTTPServer\"", | ||
"develop": "concurrently --kill-others \"webpack --watch\" \"python3 -m http.server\"", | ||
"build": "webpack && node docs/build.js", | ||
@@ -11,0 +11,0 @@ "build-doc": "node docs/build.js", |
@@ -27,3 +27,3 @@ # `henrybuilt-js-library` | ||
1. open another terminal tab and run `npm run develop` | ||
1. temporarily uncomment line 113 in `henrybuilt-website/app/controllers/application_controller.rb` | ||
1. temporarily uncomment line 147 in `henrybuilt-website/app/controllers/application_controller.rb` | ||
1. run `npm run build` until it builds without errors | ||
@@ -30,0 +30,0 @@ 1. push and Max will manage deployment |
@@ -17,3 +17,3 @@ module.exports = { | ||
], | ||
years: ['2020', '2021', '2022', '2023', '2024', '2025', '2026', '2027', '2028', '2029'] | ||
years: ['2022', '2023', '2024', '2025', '2026', '2027', '2028', '2029', '2030'] | ||
}; |
@@ -56,6 +56,6 @@ var libMaterials = require('@src/materials/materials'); | ||
else if (resourceKey === 'project') { | ||
var {productInstances, taxRate, discount, companyKey, brandKey} = project; | ||
var {productInstances, taxRate, discount, companyKey, brandKey, customShippingPrice} = project; | ||
var subtotals = {}, total = dinero(0), payments = [], shippingTotal; | ||
var obfuscateShipping = !((companyKey === 'hb' && brandKey === 'po') || companyKey === 'vp' || project.orderType === 'change-order' || project.deliveryState === 'CA'); | ||
var obfuscateShipping = !((companyKey === 'hb' && brandKey === 'po') || companyKey === 'vp' || project.orderType === 'change-order' || project.deliveryState === 'CA' || customShippingPrice); | ||
var shouldTaxShipping = project.deliveryState !== 'CA'; | ||
@@ -68,3 +68,6 @@ | ||
if (project.deliveryType === 'pickup') { | ||
if (customShippingPrice) { | ||
shippingTotal = dinero(customShippingPrice); | ||
} | ||
else if (project.deliveryType === 'pickup') { | ||
shippingTotal = dinero(0); | ||
@@ -470,3 +473,3 @@ } | ||
shippingRateForProject({project}) { | ||
var {deliveryState} = project; | ||
var {deliveryState, companyKey, country} = project; | ||
@@ -480,2 +483,9 @@ var shippingRate = 0.12; | ||
if (project && moment(project.pricingDate).isSameOrAfter('2022-05-26')) { | ||
if (deliveryState === 'HI') shippingRate = companyKey === 'st' ? 0.25 : 0.21; | ||
else if (deliveryState === 'AK')shippingRate = companyKey === 'st' ? 0.25 : 0.21;//#HINT intentionally redundant | ||
if (country !== 'United States') shippingRate = companyKey === 'st' ? 0.135 : 0.09 //HINT this should override everything else | ||
} | ||
return shippingRate; | ||
@@ -482,0 +492,0 @@ }, |
Sorry, the diff of this file is too big to display
876897
8131