From dc8b7fdbd5f116b0c17137a50f04c12849d48317 Mon Sep 17 00:00:00 2001
From: rakesh
Date: Mon, 24 Jan 2022 19:25:04 +0530
Subject: [PATCH 01/14] fixes
---
git_info.json | 2 +-
.../retailer/retailer-search/RetailerSearchProducts.vue | 4 ++--
src/routes/retailer/cart_products.vue | 1 +
3 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/git_info.json b/git_info.json
index 084bfc6..db2d92d 100644
--- a/git_info.json
+++ b/git_info.json
@@ -1 +1 @@
-{"branch_name":"beta","last_commit_date":"2022-01-24T12:46:48.000Z","last_commit_author":"anju j","last_commit_hash":"29509c005abdd92691f4543999a119df3fd403c0"}
\ No newline at end of file
+{"branch_name":"beta","last_commit_date":"2022-01-24T12:54:49.000Z","last_commit_author":"rakesh","last_commit_hash":"4ffb843e46532353dd9a1963aa9f3f079c2ebed2"}
\ No newline at end of file
diff --git a/src/components/retailer/retailer-search/RetailerSearchProducts.vue b/src/components/retailer/retailer-search/RetailerSearchProducts.vue
index 0a12042..9b3d146 100644
--- a/src/components/retailer/retailer-search/RetailerSearchProducts.vue
+++ b/src/components/retailer/retailer-search/RetailerSearchProducts.vue
@@ -1,6 +1,6 @@
-
+
- {{
+ {{
noProducts
}}
diff --git a/src/routes/retailer/cart_products.vue b/src/routes/retailer/cart_products.vue
index 932e271..5f20e68 100644
--- a/src/routes/retailer/cart_products.vue
+++ b/src/routes/retailer/cart_products.vue
@@ -27,6 +27,7 @@
v-model="searchData"
v-on="on"
@input="searchProducts"
+ hide-details
>
From fa1d5ed97b34d0fb23d2cc67aecf12a6119f6623 Mon Sep 17 00:00:00 2001
From: rakesh
Date: Mon, 24 Jan 2022 19:33:34 +0530
Subject: [PATCH 02/14] fixes
---
git_info.json | 2 +-
.../retailer/retailer-search/RetailerSearchProducts.vue | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/git_info.json b/git_info.json
index db2d92d..3d499e0 100644
--- a/git_info.json
+++ b/git_info.json
@@ -1 +1 @@
-{"branch_name":"beta","last_commit_date":"2022-01-24T12:54:49.000Z","last_commit_author":"rakesh","last_commit_hash":"4ffb843e46532353dd9a1963aa9f3f079c2ebed2"}
\ No newline at end of file
+{"branch_name":"beta","last_commit_date":"2022-01-24T13:55:04.000Z","last_commit_author":"rakesh","last_commit_hash":"dc8b7fdbd5f116b0c17137a50f04c12849d48317"}
\ No newline at end of file
diff --git a/src/components/retailer/retailer-search/RetailerSearchProducts.vue b/src/components/retailer/retailer-search/RetailerSearchProducts.vue
index 9b3d146..5617711 100644
--- a/src/components/retailer/retailer-search/RetailerSearchProducts.vue
+++ b/src/components/retailer/retailer-search/RetailerSearchProducts.vue
@@ -1,6 +1,6 @@
-
+
Date: Tue, 25 Jan 2022 12:53:33 +0530
Subject: [PATCH 03/14] login interrupt fixes
---
git_info.json | 1 -
src/services/nav.js | 11 ++++++-----
2 files changed, 6 insertions(+), 6 deletions(-)
delete mode 100644 git_info.json
diff --git a/git_info.json b/git_info.json
deleted file mode 100644
index 3d499e0..0000000
--- a/git_info.json
+++ /dev/null
@@ -1 +0,0 @@
-{"branch_name":"beta","last_commit_date":"2022-01-24T13:55:04.000Z","last_commit_author":"rakesh","last_commit_hash":"dc8b7fdbd5f116b0c17137a50f04c12849d48317"}
\ No newline at end of file
diff --git a/src/services/nav.js b/src/services/nav.js
index faef1c8..9bd518d 100644
--- a/src/services/nav.js
+++ b/src/services/nav.js
@@ -9,17 +9,18 @@ const vueMaintenanceMode = process.env.VUE_APP_MAINTENANCE_MODE;
const loginInterrupt = function(current_url, message) {
- sessionStorage.cinterrupted_page = current_url;
- sessionStorage.cinterrupt_message = message;
+ if(!current_url.includes("gate/sign-in"))
+ sessionStorage.crinterrupted_page = current_url;
+ sessionStorage.crinterrupt_message = message;
window.location.href = loginUrl;
}
const redirectToInterruptedPage = function() {
- //sessionStorage.cinterrupted_page.clear();
- const url = sessionStorage.cinterrupted_page;
+ //sessionStorage.crinterrupted_page.clear();
+ const url = sessionStorage.crinterrupted_page;
if (url) {
window.location.href = url;
- sessionStorage.removeItem("cinterrupted_page");
+ sessionStorage.removeItem("crinterrupted_page");
}
//window.location.href = homeUrl;
else
From e550b1764950541e872cc218b3c7043fa3e07611 Mon Sep 17 00:00:00 2001
From: rakesh
Date: Tue, 25 Jan 2022 14:03:21 +0530
Subject: [PATCH 04/14] fixes
---
git_info.json | 1 +
.../retailer/personalized_order_status.vue | 24 +++++++++++++++++++
src/stores/retailer/account.one.js | 6 ++---
3 files changed, 28 insertions(+), 3 deletions(-)
create mode 100644 git_info.json
diff --git a/git_info.json b/git_info.json
new file mode 100644
index 0000000..b87e223
--- /dev/null
+++ b/git_info.json
@@ -0,0 +1 @@
+{"branch_name":"beta","last_commit_date":"2022-01-25T07:23:33.000Z","last_commit_author":"sidharth","last_commit_hash":"c3b1962bf6bb86f156d4aa412143c19cc6fffac5"}
\ No newline at end of file
diff --git a/src/routes/retailer/personalized_order_status.vue b/src/routes/retailer/personalized_order_status.vue
index be19176..67b27e0 100644
--- a/src/routes/retailer/personalized_order_status.vue
+++ b/src/routes/retailer/personalized_order_status.vue
@@ -17,6 +17,7 @@
details will be made available when the shipping carrier has processed
your package.
+
-
+
+
+
+ UPC {{ product.customAttributes.upc }}
+
+
${{ priceFormatter(product.price) }}
diff --git a/src/services/util.service.js b/src/services/util.service.js
index 81e91b9..6d699dc 100644
--- a/src/services/util.service.js
+++ b/src/services/util.service.js
@@ -700,7 +700,7 @@ export const checkEncodeURI = (str) => {
}
}
export const priceFormatter = (price, pdp) => {
- if (price != undefined) {
+ if (price != undefined) {
price = price.toString();
let decimals = (price.split("."))[1];
if ((!Number(decimals) || isNaN(decimals)) || decimals.length == 1) //if 2 or 2.1
@@ -708,7 +708,7 @@ export const priceFormatter = (price, pdp) => {
if (decimals.length == 2 && pdp) //if 2 or 2.1
return price;
else if (decimals.length > 1) // if 2.34 or 2.56565
- return Number(price.match(/^-?\d+(?:\.\d{0,2})?/)[0]);
+ return Number(price.match(/^-?\d+(?:\.\d{0,4})?/)[0]);
}
}
From 31d3fe75d8dfff0600d43b2dceac460f252beb81 Mon Sep 17 00:00:00 2001
From: rakesh
Date: Thu, 27 Jan 2022 11:55:25 +0530
Subject: [PATCH 09/14] fixes
---
src/services/util.service.js | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/services/util.service.js b/src/services/util.service.js
index 6d699dc..f63aa9f 100644
--- a/src/services/util.service.js
+++ b/src/services/util.service.js
@@ -707,8 +707,13 @@ export const priceFormatter = (price, pdp) => {
return Number(price).toFixed(2);
if (decimals.length == 2 && pdp) //if 2 or 2.1
return price;
+
else if (decimals.length > 1) // if 2.34 or 2.56565
- return Number(price.match(/^-?\d+(?:\.\d{0,4})?/)[0]);
+ {
+ return price.toString().match(/^-?\d+(?:\.\d{0,2})?/)[0]
+ }
+ // if 2.34 or 2.56565
+ // return Number(price.match(/^-?\d+(?:\.\d{0,4})?/)[0]);
}
}
From d5144d80e238271fbbffb89b1f0dcc10d33527c6 Mon Sep 17 00:00:00 2001
From: rakesh
Date: Thu, 27 Jan 2022 12:55:38 +0530
Subject: [PATCH 10/14] fixes
---
src/routes/retailer/cart_products.vue | 3 ++-
src/routes/retailer/checkout_page.vue | 17 +++++++++--------
2 files changed, 11 insertions(+), 9 deletions(-)
diff --git a/src/routes/retailer/cart_products.vue b/src/routes/retailer/cart_products.vue
index 5f20e68..f646777 100644
--- a/src/routes/retailer/cart_products.vue
+++ b/src/routes/retailer/cart_products.vue
@@ -111,7 +111,8 @@
Shipping
- ${{ priceFormatter(cartProductTotalAmt.baseShippingAmount) }}
+
+ TBD
-
+
Shipping Methods
@@ -358,8 +358,9 @@
method.methodTitle
}}
${{ priceFormatter(method.amount) }} {{ priceFormatter(method.amount) ==0 ? 'TBD' : '$' + priceFormatter(method.amount)}}
+
@@ -1864,12 +1865,12 @@ export default {
this.selectedAddressId = "";
this.$store.dispatch("accountOne/setLocalShippAddress", address);
}
- this.verifyAddress();
+ // this.verifyAddress();
this.$store.dispatch("accountOne/setSelectedShippAddressIndex", index);
- // this.verifyAddress();
+ this.verifyAddress();
},
async verifyAddress() {
- let vm = this;
+ let vm = this;
try {
if (
vm.address.regionId &&
@@ -1892,7 +1893,7 @@ export default {
});
stateName = stateName ? stateName[0].label : "";
- let response = await vm.$store.dispatch(
+ /* let response = await vm.$store.dispatch(
"accountOne/validateAddressCheckout",
{ address: vm.addressFields, stateName: stateName }
);
@@ -1906,7 +1907,7 @@ export default {
vm.geoCodedAddressFlag = true;
vm.validAddresses = response[0];
}
- }
+ }*/
if (vm.userAuth) {
await vm.$store.dispatch("accountOne/setEstimatedShipping");
} else if (vm.guestQuoteId) {
From 925836ff0cf1a639b17a2ae4362514de705683c8 Mon Sep 17 00:00:00 2001
From: sidharth
Date: Thu, 27 Jan 2022 15:51:50 +0530
Subject: [PATCH 11/14] payment fixes
---
src/routes/retailer/checkout_page.vue | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/src/routes/retailer/checkout_page.vue b/src/routes/retailer/checkout_page.vue
index de8e5ab..da0df3f 100644
--- a/src/routes/retailer/checkout_page.vue
+++ b/src/routes/retailer/checkout_page.vue
@@ -465,8 +465,8 @@
v-if="shippingInformations.totals.grandTotal !== 0"
>
@@ -1494,6 +1494,14 @@ export default {
countryAndStatesList() {
return this.$store.state.accountOne.allCountries;
},
+ purchaseOrderPayment() {
+ let paymentMethods=this.shippingInformations.paymentMethods;
+ return paymentMethods.filter(method=>method.code==="purchaseorder")[0]
+ },
+ // freePayment() {
+ // let paymentMethods=this.shippingInformations.paymentMethods;
+ // return paymentMethods.filter(method=>method.code==="free")[0]
+ // },
},
methods: {
checkProductType() {
From b1bc4dbba2a2444b8b2b42ffd34b82c065f0a6de Mon Sep 17 00:00:00 2001
From: sidharth
Date: Thu, 27 Jan 2022 17:32:59 +0530
Subject: [PATCH 12/14] removed guest cart call
---
src/stores/retailer/user_cart.one.js | 58 ++--------------------------
1 file changed, 4 insertions(+), 54 deletions(-)
diff --git a/src/stores/retailer/user_cart.one.js b/src/stores/retailer/user_cart.one.js
index 3832b77..4163f54 100644
--- a/src/stores/retailer/user_cart.one.js
+++ b/src/stores/retailer/user_cart.one.js
@@ -16,7 +16,7 @@ import {
doFetchGiftMessage,
doPutCConectionCartItem
} from '@/services/user_cart.service';
-import { getCookieByName, removeCookieByName } from '@/services/auth';
+// import { getCookieByName, removeCookieByName } from '@/services/auth';
import { getField, updateField } from 'vuex-map-fields';
import humps from 'lodash-humps';
import { getAuthUser } from '@/services/auth';
@@ -186,66 +186,16 @@ export const userCartProduct = {
})
.catch(() => commit('cartTotalAmtProgress', false))
},
- cartProductList: async({ commit, rootState, dispatch }) => {
+ cartProductList: async({ commit, dispatch }) => {
commit('setCartProductList', []);
commit('cartProductsProgress', true);
- return doFetchQuote().then(async(quoteId) => {
- let guestQuoteId = getCookieByName("cr_guestQuoteId");
- if (guestQuoteId) {
- dispatch('cartProduct/cartProductList', guestQuoteId, { root: true }).then(async(response) => {
- console.log("response", response)
- let guestCartProduct = rootState.cartProduct.cartProductList;
- if (guestCartProduct.length > 0) {
- for (let i = 0; i < guestCartProduct.length; i++) {
- if (guestCartProduct[i].productType == 'configurable') {
- await dispatch("addToConfiguredCart", {
- sku: guestCartProduct[i].parentSku,
- qty: guestCartProduct[i].qty,
- typeId: guestCartProduct[i].productType,
- optionId: guestCartProduct[i].productOption.attributesInfo[0].optionId,
- optionValue: guestCartProduct[i].customAttributes.letter
-
- })
- } else if (guestCartProduct[i].productType == 'giftcard') {
- await dispatch("addToGiftCart", {
- sku: guestCartProduct[i].sku,
- qty: guestCartProduct[i].qty,
- senderName: guestCartProduct[i].productOption.infoBuyRequest.giftcardSenderName,
- senderEmail: guestCartProduct[i].productOption.infoBuyRequest.giftcardSenderEmail,
- giftCartDetails: {
- recipientName: guestCartProduct[i].productOption.infoBuyRequest.giftcardRecipientName,
- recipientEmail: guestCartProduct[i].productOption.infoBuyRequest.giftcardRecipientEmail,
- senderMessage: guestCartProduct[i].productOption.infoBuyRequest.giftcardMessage,
- giftCardAmt: guestCartProduct[i].productOption.infoBuyRequest.giftcardAmount
- }
- })
- } else {
- await dispatch("addToCart", {
- sku: guestCartProduct[i].sku,
- qty: guestCartProduct[i].qty,
- ccid: guestCartProduct[i].ccid ? guestCartProduct[i].ccid : null,
- price: guestCartProduct[i].personalizeDetails ? guestCartProduct[i].qty * guestCartProduct[i].price : null,
- personalizeDetails: guestCartProduct[i].personalizeDetails ? guestCartProduct[i].personalizeDetails : null,
- builderId: guestCartProduct[i].builderId ? guestCartProduct[i].builderId : null,
- })
- }
- }
- }
- removeCookieByName("cr_guestQuoteId")
- const cartProductList = await doFetchCartProducts(quoteId);
- commit('setCartProductDetails', humps(cartProductList))
- commit('setCartProductList', humps(cartProductList))
- commit('cartProductsProgress', false);
- dispatch('productTotalAmt');
- })
- .catch(() => commit('cartProductsProgress', false))
- } else {
+ return doFetchQuote().then(async(quoteId) => {
let cartProductList = await doFetchCartProducts(quoteId);
commit('setCartProductDetails', humps(cartProductList))
commit('setCartProductList', humps(cartProductList))
commit('cartProductsProgress', false);
dispatch('productTotalAmt');
- }
+ // }
})
.catch(() => commit('cartProductsProgress', false))
},
From e6c648f4fb26d790ad3cd243ad5153399545eee6 Mon Sep 17 00:00:00 2001
From: sidharth
Date: Thu, 27 Jan 2022 21:36:03 +0530
Subject: [PATCH 13/14] personalize order bug fixes
---
src/routes/retailer/personalized_order_status.vue | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/routes/retailer/personalized_order_status.vue b/src/routes/retailer/personalized_order_status.vue
index 9452ac0..eaab362 100644
--- a/src/routes/retailer/personalized_order_status.vue
+++ b/src/routes/retailer/personalized_order_status.vue
@@ -31,7 +31,7 @@ export default {
name: "PersonalizedOrderSummaryPage",
data() {
return {
- url: "https://orderexplorer.crane.com//OrderExplorer/?account=customer",
+ url: "https://orderexplorer.crane.com/OrderExplorer/?account=customer",
frameHeight: "800px",
frameWidth: "100%",
};
@@ -44,14 +44,14 @@ export default {
watch: {
customerNumber() {
this.url =
- "https://orderexplorer.crane.com//OrderExplorer/?account=" +
+ "https://orderexplorer.crane.com/OrderExplorer/?account=" +
this.customerNumber;
},
},
mounted() {
if (this.customerNumber)
this.url =
- "https://orderexplorer.crane.com//OrderExplorer/?account=" +
+ "https://orderexplorer.crane.com/OrderExplorer/?account=" +
this.customerNumber;
},
};
From bb6a9d39dd0f0df368dbbba76c3d7d50f6a70266 Mon Sep 17 00:00:00 2001
From: sidharth
Date: Fri, 28 Jan 2022 17:05:44 +0530
Subject: [PATCH 14/14] nav fixes
---
src/services/nav.js | 2 ++
src/stores/gate/auth.module.js | 8 ++++++++
2 files changed, 10 insertions(+)
diff --git a/src/services/nav.js b/src/services/nav.js
index 9bd518d..1f12455 100644
--- a/src/services/nav.js
+++ b/src/services/nav.js
@@ -12,6 +12,8 @@ const loginInterrupt = function(current_url, message) {
if(!current_url.includes("gate/sign-in"))
sessionStorage.crinterrupted_page = current_url;
sessionStorage.crinterrupt_message = message;
+
+ if(!current_url.includes("gate/sign-in"))
window.location.href = loginUrl;
}
diff --git a/src/stores/gate/auth.module.js b/src/stores/gate/auth.module.js
index f67507a..940d91c 100644
--- a/src/stores/gate/auth.module.js
+++ b/src/stores/gate/auth.module.js
@@ -66,8 +66,11 @@ export const auth = {
},
login: async({ commit, state, dispatch }) => {
try {
+ /* eslint-disable */
+
commit('inProgress', true);
const token = await doLogin(state.one);
+
if (token) {
commit('loginSuccess', {token:token,logged:state.one.logged});
dispatch('userCartProduct/checkUserToken', {}, { root: true });
@@ -80,6 +83,11 @@ export const auth = {
redirectToInterruptedPage();
return true;
}
+ else{
+ commit('loginFailure', "Email id or password is incorrect");
+ commit('inProgress', false);
+ }
+
} catch (err) {
commit('inProgress', false);
commit('prepareWithMessage');