Merge branch 'beta' of git.treelet.net:crane/retailer-vue into beta
This commit is contained in:
commit
fb32a560be
|
@ -1,17 +1,16 @@
|
||||||
|
|
||||||
VUE_APP_BRAINTREE_AUTH_KEY=sandbox_bn48hmp6_cz6p85sw4dr5tp8h
|
VUE_APP_BRAINTREE_AUTH_KEY=sandbox_bn48hmp6_cz6p85sw4dr5tp8h
|
||||||
VUE_APP_MAGENTO_API_URL=https://retailer.crane.com
|
VUE_APP_MAGENTO_API_URL=https://retailer-stg.crane.com
|
||||||
VUE_APP_CRANE_URL=/shop
|
VUE_APP_CRANE_URL=/shop
|
||||||
VUE_APP_GATE_URL=/gate
|
VUE_APP_GATE_URL=/gate
|
||||||
VUE_APP_ME_URL=/b2b
|
VUE_APP_ME_URL=/b2b
|
||||||
VUE_APP_LOGIN_URL=/gate/sign-in
|
VUE_APP_LOGIN_URL=/gate/sign-in
|
||||||
VUE_APP_PERSONALIZE_URL=https://studio.crane.com/personalize
|
VUE_APP_PERSONALIZE_URL=https://studio-stg.crane.com/personalize
|
||||||
VUE_APP_IMAGE_PATH_URL=https://retailer.crane.com/media/catalog/product
|
VUE_APP_IMAGE_PATH_URL=https://retailer-stg.crane.com/media/catalog/product
|
||||||
VUE_APP_RETAILOR_ID=49057567-f789-420c-98b6-2e0443af73f5
|
VUE_APP_RETAILOR_ID=49057567-f789-420c-98b6-2e0443af73f5
|
||||||
VUE_APP_IMAGE_CATEGORY_PATH_URL=https://retailer.crane.com
|
VUE_APP_IMAGE_CATEGORY_PATH_URL=https://retailer-stg.crane.com
|
||||||
VUE_APP_NODESLS_API_URL=https://imagelib-sls.crane.com
|
VUE_APP_NODESLS_API_URL=https://imagelib-sls-stg.crane.com
|
||||||
|
|
||||||
VUE_APP_HOME_PAGE_URL=https://www-retailer.crane.com
|
VUE_APP_HOME_PAGE_URL=https://www-stg.crane.com
|
||||||
VUE_APP_CC_CONNECTION_URL=https://www.staging.personalized-stationery.com/CranesConnectionRedesign/Personalize.aspx?
|
VUE_APP_CC_CONNECTION_URL=https://www.staging.personalized-stationery.com/CranesConnectionRedesign/Personalize.aspx?
|
||||||
VUE_APP_MAINTENANCE_MODE=false
|
VUE_APP_MAINTENANCE_MODE=false
|
||||||
VUE_APP_MAINTENANCE_PAGE_URL=/maintenance
|
VUE_APP_MAINTENANCE_PAGE_URL=/maintenance
|
||||||
|
@ -23,6 +22,6 @@ VUE_APP_CRANE_ORDER_URL=https://ordertest.crane.com
|
||||||
DEPLOY_S3_REGION=us-east-1
|
DEPLOY_S3_REGION=us-east-1
|
||||||
DEPLOY_S3_BUCKET=
|
DEPLOY_S3_BUCKET=
|
||||||
DEPLOY_CLOUDFRONT_ID=
|
DEPLOY_CLOUDFRONT_ID=
|
||||||
VUE_APP_ASSETS_NODESLS_URL=https://assets-sls.crane.com
|
VUE_APP_ASSETS_NODESLS_URL=https://assets-stg-sls.crane.com
|
||||||
VUE_APP_IMAGE_LIB_URL=https://imagelib-api.crane.com
|
VUE_APP_IMAGE_LIB_URL=https://imagelib-stg-api.crane.com
|
||||||
VUE_APP_BASE_URL=https://www-retailer.crane.com
|
VUE_APP_BASE_URL=https://www-stg.crane.com
|
|
@ -1 +1 @@
|
||||||
{"branch_name":"beta","last_commit_date":"2022-01-13T13:54:00.000Z","last_commit_author":"rakesh","last_commit_hash":"4bdc1d9abfc813b05544d9192739ad4cc4e20f95"}
|
{"branch_name":"beta","last_commit_date":"2022-01-18T11:39:58.000Z","last_commit_author":"sidharth","last_commit_hash":"10dcca315f8a4cb7a86e87becb9e7cd05a3ecb36"}
|
|
@ -1,4 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
|
<div>
|
||||||
<v-row v-if="searchResults.page.length" class="mx-4">
|
<v-row v-if="searchResults.page.length" class="mx-4">
|
||||||
<v-col cols="12" lg="12" md="12" sm="12" >
|
<v-col cols="12" lg="12" md="12" sm="12" >
|
||||||
<v-row v-if="inProgress">
|
<v-row v-if="inProgress">
|
||||||
|
@ -105,15 +106,20 @@
|
||||||
}}</v-alert>
|
}}</v-alert>
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
|
|
||||||
|
<SnackbarComponent :snackbar="snackbar"></SnackbarComponent>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
/* eslint-disable no-alert, no-console , no-debugger */
|
/* eslint-disable no-alert, no-console , no-debugger */
|
||||||
//import * as easings from "vuetify/es5/services/goto/easing-patterns";
|
//import * as easings from "vuetify/es5/services/goto/easing-patterns";
|
||||||
import { mapState } from "vuex";
|
import { mapState } from "vuex";
|
||||||
|
import SnackbarComponent from "@/components/common/SnackbarComponent";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "RetailerSearchProducts",
|
name: "RetailerSearchProducts",
|
||||||
components: {
|
components: {
|
||||||
|
SnackbarComponent
|
||||||
},
|
},
|
||||||
props: [
|
props: [
|
||||||
"criteria",
|
"criteria",
|
||||||
|
@ -154,6 +160,12 @@ export default {
|
||||||
menu: false,
|
menu: false,
|
||||||
showDrawarFilter: false,
|
showDrawarFilter: false,
|
||||||
noProducts: "No products found.",
|
noProducts: "No products found.",
|
||||||
|
snackbar: {
|
||||||
|
show: false,
|
||||||
|
message: null,
|
||||||
|
color: null,
|
||||||
|
timeout: 0
|
||||||
|
},
|
||||||
}),
|
}),
|
||||||
methods: {
|
methods: {
|
||||||
roundUp(num) {
|
roundUp(num) {
|
||||||
|
|
|
@ -477,7 +477,8 @@
|
||||||
:readonly="readOnlyCheckBox"
|
:readonly="readOnlyCheckBox"
|
||||||
hide-details
|
hide-details
|
||||||
></v-checkbox>
|
></v-checkbox>
|
||||||
<v-row v-if="sameAddress">
|
<div v-if="sameAddress">
|
||||||
|
<v-row >
|
||||||
<v-col cols="12" class="pl-sm-10">
|
<v-col cols="12" class="pl-sm-10">
|
||||||
<BillingAddressComponent :address="address" />
|
<BillingAddressComponent :address="address" />
|
||||||
<v-btn
|
<v-btn
|
||||||
|
@ -491,6 +492,34 @@
|
||||||
>
|
>
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
|
<v-row class="pl-3">
|
||||||
|
|
||||||
|
<v-col cols="12" align="right">
|
||||||
|
<v-btn
|
||||||
|
class="primary mx-3 text-uppercase"
|
||||||
|
@click="placeOrderFree()"
|
||||||
|
tile
|
||||||
|
depressed
|
||||||
|
>Place Order</v-btn
|
||||||
|
>
|
||||||
|
</v-col>
|
||||||
|
|
||||||
|
<!-- <v-col cols="12" sm="6">
|
||||||
|
<v-braintree
|
||||||
|
:authorization="braintreeAuthKey"
|
||||||
|
:vaultManager="true"
|
||||||
|
@success="onPaymentSuccess"
|
||||||
|
@error="onPaymentError"
|
||||||
|
@load="onGatewayLoad"
|
||||||
|
@loadFail="onGatewayLoadFail"
|
||||||
|
>
|
||||||
|
<template v-slot:button="slotProps">
|
||||||
|
<v-btn @click="slotProps.submit" color="success">Place Order</v-btn>
|
||||||
|
</template>
|
||||||
|
</v-braintree>
|
||||||
|
</v-col>-->
|
||||||
|
</v-row>
|
||||||
|
</div>
|
||||||
<v-row v-else>
|
<v-row v-else>
|
||||||
<v-col cols="12" sm="8" v-if="this.userAuth">
|
<v-col cols="12" sm="8" v-if="this.userAuth">
|
||||||
<v-row v-if="addressLength > 0">
|
<v-row v-if="addressLength > 0">
|
||||||
|
@ -1313,8 +1342,17 @@
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
<v-row class="pl-3">
|
<v-row class="pl-3">
|
||||||
|
<v-col cols="12" align="right">
|
||||||
<v-col cols="12" align="right">
|
<v-text-field
|
||||||
|
v-model="poNumber"
|
||||||
|
type="text"
|
||||||
|
dense
|
||||||
|
placeholder="Purchase Order Number"
|
||||||
|
outlined
|
||||||
|
:rules="textRules"
|
||||||
|
></v-text-field>
|
||||||
|
</v-col>
|
||||||
|
<!-- <v-col cols="12" align="right">
|
||||||
<v-btn
|
<v-btn
|
||||||
class="primary mx-3 text-uppercase"
|
class="primary mx-3 text-uppercase"
|
||||||
@click="placeOrderFree()"
|
@click="placeOrderFree()"
|
||||||
|
@ -1322,7 +1360,7 @@
|
||||||
depressed
|
depressed
|
||||||
>Place Order</v-btn
|
>Place Order</v-btn
|
||||||
>
|
>
|
||||||
</v-col>
|
</v-col>-->
|
||||||
|
|
||||||
<!-- <v-col cols="12" sm="6">
|
<!-- <v-col cols="12" sm="6">
|
||||||
<v-braintree
|
<v-braintree
|
||||||
|
@ -1827,7 +1865,8 @@ export default {
|
||||||
sameAddress: true,
|
sameAddress: true,
|
||||||
paymentMethod: "",
|
paymentMethod: "",
|
||||||
paymentMethodFree: true,
|
paymentMethodFree: true,
|
||||||
freePaymentMethod: "free",
|
freePaymentMethod: "purchaseorder",
|
||||||
|
poNumber:'',
|
||||||
cartItemPanel: [0],
|
cartItemPanel: [0],
|
||||||
saveInAddressBook: false,
|
saveInAddressBook: false,
|
||||||
showAddressDialog: false,
|
showAddressDialog: false,
|
||||||
|
@ -2722,87 +2761,9 @@ export default {
|
||||||
try {
|
try {
|
||||||
let res = await this.$store.dispatch("accountOne/setOrder", {
|
let res = await this.$store.dispatch("accountOne/setOrder", {
|
||||||
method: this.freePaymentMethod,
|
method: this.freePaymentMethod,
|
||||||
|
"poNumber": this.poNumber,
|
||||||
});
|
});
|
||||||
await this.$store.dispatch("accountOne/setPaymentInProgress", true);
|
|
||||||
if (res) {
|
|
||||||
try {
|
|
||||||
let resp = await this.$store.dispatch(
|
|
||||||
"meProductOne/fetchOrderProduct",
|
|
||||||
res
|
|
||||||
);
|
|
||||||
if (resp && resp.items) {
|
|
||||||
/*googleAanalyticsCheckout("checkout_progress", {
|
|
||||||
items: resp.items,
|
|
||||||
});
|
|
||||||
googleAanalyticsCheckout("set_checkout_option", {
|
|
||||||
checkout_step: 1,
|
|
||||||
checkout_option: "payment",
|
|
||||||
});*/
|
|
||||||
|
|
||||||
googleAanalyticsCheckoutAddPaymentInfo(
|
|
||||||
"add_payment_info",
|
|
||||||
resp
|
|
||||||
);
|
|
||||||
googleAanalyticsPurchase(resp, resp.incrementId);
|
|
||||||
let shippingAddress = [];
|
|
||||||
let ccid = "";
|
|
||||||
let webOrderNumber = resp.incrementId;
|
|
||||||
let magentoOrderNumber = res;
|
|
||||||
for (let i = 0; resp.items.length > i; i++) {
|
|
||||||
let obj = resp.items[i];
|
|
||||||
if (obj.extensionAttributes) {
|
|
||||||
ccid = obj.extensionAttributes.ccid;
|
|
||||||
if (ccid) {
|
|
||||||
shippingAddress =
|
|
||||||
resp.extensionAttributes.shippingAssignments[0]
|
|
||||||
.shipping.address;
|
|
||||||
try {
|
|
||||||
let response = await this.$store.dispatch(
|
|
||||||
"accountOne/setCCOrder",
|
|
||||||
{
|
|
||||||
orderNumber: ccid,
|
|
||||||
shippingAddress: shippingAddress,
|
|
||||||
webOrderNumber: webOrderNumber,
|
|
||||||
estimatedShipping: this.estimatedShipping,
|
|
||||||
}
|
|
||||||
);
|
|
||||||
} catch (error) {
|
|
||||||
console.log(error);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (obj.extensionAttributes.personalizeDetails) {
|
|
||||||
await this.placeCraneOrder(
|
|
||||||
resp,
|
|
||||||
obj,
|
|
||||||
webOrderNumber,
|
|
||||||
magentoOrderNumber
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch (error) {
|
|
||||||
await this.$store.dispatch(
|
|
||||||
"accountOne/setPaymentInProgress",
|
|
||||||
false
|
|
||||||
);
|
|
||||||
this.isPageLoader = false;
|
|
||||||
this.snackbar = {
|
|
||||||
message: error,
|
|
||||||
color: "error",
|
|
||||||
show: true,
|
|
||||||
timeout: 5000,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
await this.$store.dispatch(
|
|
||||||
"accountOne/setPaymentInProgress",
|
|
||||||
false
|
|
||||||
);
|
|
||||||
this.$router.push({
|
|
||||||
name: "OrderSuccess",
|
|
||||||
params: { orderNumber: res },
|
|
||||||
});
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.isPageLoader = false;
|
this.isPageLoader = false;
|
||||||
this.snackbar = {
|
this.snackbar = {
|
||||||
|
|
|
@ -320,10 +320,10 @@ export const doProductsOrder = meWrapRequest((userQuote, paymentMethod, oneAddre
|
||||||
"cartId": userQuote,
|
"cartId": userQuote,
|
||||||
"billingAddress": oneAddress,
|
"billingAddress": oneAddress,
|
||||||
"paymentMethod": paymentMethod,
|
"paymentMethod": paymentMethod,
|
||||||
"comments": ""
|
"comments": "",
|
||||||
})
|
})
|
||||||
};
|
};
|
||||||
return fetch(`${vueAppMagenotApiUrl}/rest/crn_retailer/carts/mine/payment-information`, requestOptions)
|
return fetch(`${vueAppMagenotApiUrl}/rest/crn_retailer/V1/carts/mine/payment-information`, requestOptions)
|
||||||
});
|
});
|
||||||
|
|
||||||
/*export const doProductsOrderOnCC = meWrapRequest((orderNumber, shippingAddress, webOrderNumber) => {
|
/*export const doProductsOrderOnCC = meWrapRequest((orderNumber, shippingAddress, webOrderNumber) => {
|
||||||
|
|
Loading…
Reference in New Issue