code cleanup

This commit is contained in:
sidharth 2022-01-11 19:48:17 +05:30
parent 25ae333143
commit 72055c92e6
84 changed files with 206 additions and 7776 deletions

View File

@ -3,7 +3,7 @@ VUE_APP_BRAINTREE_AUTH_KEY=sandbox_bn48hmp6_cz6p85sw4dr5tp8h
VUE_APP_MAGENTO_API_URL=https://retailer-stg.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=/retailer 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-stg.crane.com/personalize VUE_APP_PERSONALIZE_URL=https://studio-stg.crane.com/personalize
VUE_APP_IMAGE_PATH_URL=https://retailer-stg.crane.com/media/catalog/product VUE_APP_IMAGE_PATH_URL=https://retailer-stg.crane.com/media/catalog/product
@ -11,7 +11,7 @@ VUE_APP_RETAILOR_ID=49057567-f789-420c-98b6-2e0443af73f5
VUE_APP_IMAGE_CATEGORY_PATH_URL=https://retailer-stg.crane.com VUE_APP_IMAGE_CATEGORY_PATH_URL=https://retailer-stg.crane.com
VUE_APP_NODESLS_API_URL=https://imagelib-sls-stg.crane.com VUE_APP_NODESLS_API_URL=https://imagelib-sls-stg.crane.com
VUE_APP_HOME_PAGE_URL=https://www-stg.crane.com VUE_APP_HOME_PAGE_URL=https://www-retailer-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
@ -19,4 +19,10 @@ VUE_APP_GTAG_ID=GTM-N774RX4
VUE_APP_GA_ID=UA-26415879-3 VUE_APP_GA_ID=UA-26415879-3
VUE_APP_IMAGE_CATEGORY_PARAMS=?height=600&width=600 VUE_APP_IMAGE_CATEGORY_PARAMS=?height=600&width=600
VUE_APP_CRANE_ORDER_URL=https://ordertest.crane.com VUE_APP_CRANE_ORDER_URL=https://ordertest.crane.com
VUE_APP_BASE_URL=https://www-stg.crane.com
DEPLOY_S3_REGION=us-east-1
DEPLOY_S3_BUCKET=
DEPLOY_CLOUDFRONT_ID=
VUE_APP_ASSETS_NODESLS_URL=https://assets-stg-sls.crane.com
VUE_APP_IMAGE_LIB_URL=https://imagelib-stg-api.crane.com
VUE_APP_BASE_URL=https://www-retailer-stg.crane.com

View File

@ -3,7 +3,7 @@ VUE_APP_BRAINTREE_AUTH_KEY=sandbox_bn48hmp6_cz6p85sw4dr5tp8h
VUE_APP_MAGENTO_API_URL=https://retailer-stg.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=/retailer 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-stg.crane.com/personalize VUE_APP_PERSONALIZE_URL=https://studio-stg.crane.com/personalize
VUE_APP_IMAGE_PATH_URL=https://retailer-stg.crane.com/media/catalog/product VUE_APP_IMAGE_PATH_URL=https://retailer-stg.crane.com/media/catalog/product

View File

@ -1 +1 @@
{"branch_name":"beta","last_commit_date":"2022-01-10T10:55:59.000Z","last_commit_author":"Rares Pop","last_commit_hash":"d02052be80b30163732b3db331da31fd0f8887b7"} {"branch_name":"beta","last_commit_date":"2022-01-10T16:11:16.000Z","last_commit_author":"sidharth","last_commit_hash":"25ae3331437809e4092c87f686e093b4f662b163"}

View File

@ -20,50 +20,7 @@
>mdi-close</v-icon >mdi-close</v-icon
> >
<div class="px-4 pb-3"> <div class="px-4 pb-3">
<!-- <v-autocomplete
v-model="search"
autofocus
color="white"
class="mt-0 py-0 white--text header-input-custom background-transparent search-catalog mobile-header-autocomplete"
height="30"
:items="searchResultList"
:loading="searchInProgress"
:search-input.sync="lookupCatelog"
@change="GotoPage(search)"
@blur="showSearchInput=false"
hide-details
:no-filter="true"
hide-no-data
flat
filled
dense
clearable
item-text="title"
item-value="title"
prepend-icon="mdi-magnify"
return-object
>
<template v-slot:selection="data">
<span class="ml-2" v-text="data.item.title "></span>
</template>
<template v-slot:item="data ">
<template>
<v-list-item-content>
<div class="d-flex justify-space-between">
<v-list-item-title class="d-block text-truncate">{{data.item.title}}</v-list-item-title>
</div>
</v-list-item-content>
</template>
</template>
</v-autocomplete>-->
<!--<v-text-field
prepend-icon="mdi-magnify"
color="white"
class="h4 px-4 pl-3 header-input-custom white--text"
single-line
placeholder
></v-text-field>-->
<v-text-field <v-text-field
v-model="search" v-model="search"
autofocus autofocus
@ -87,117 +44,7 @@
indeterminate indeterminate
></v-progress-circular> ></v-progress-circular>
</v-row> </v-row>
<v-list
v-else
class="pl-4 mobile-header-list background-transparent"
v-for="(categories, index) in categoryList.childrenData"
v-bind:key="index"
v-show="index === 0"
dense
>
<v-list-group
class="mobile-header-list"
v-for="(category, i) in categories.childrenData"
v-bind:key="i"
:class="
category.id == activeMainMenu && pageName() == 'CategoryPage'
? 'active-menu-nav-link'
: 'mobile-header-list'
"
v-show="
category.name !== 'Baby' &&
category.name !== 'Gifts' &&
category.isActive
"
>
<template v-slot:activator>
<v-list-item-title>
<span
@click="categoryProducts('main', category.id, '', '')"
:class="
category.id == activeMainMenu && pageName() == 'CategoryPage'
? 'active-menu-nav-link'
: 'white--text'
"
class="text-uppercase h2 my-2"
>{{ category.name }}</span
>
</v-list-item-title>
</template>
<v-list-group
no-action
sub-group
flat
class="mobile-header-list-subcategory"
v-for="(subcategorys, index) in category.childrenData"
v-bind:key="index"
v-show="subcategorys.isActive"
:class="
subcategorys.id == activeSubMenu
? 'active-menu-nav-link'
: 'mobile-header-list-subcategory'
"
>
<template v-slot:activator>
<v-list-item-title>
<span
@click="
categoryProducts(
'subManu',
category.id,
subcategorys.id,
''
)
"
:class="
subcategorys.id == activeSubMenu &&
pageName() == 'CategoryPage'
? 'active-menu-nav-link'
: 'white--text'
"
class="text-uppercase h4"
>
{{ subcategorys.name }}
</span>
</v-list-item-title>
</template>
<v-list-item
v-for="(items, index) in subcategorys.childrenData"
v-bind:key="index"
>
<span
@click="
categoryProducts(
'subManuChild',
category.id,
subcategorys.id,
items.id
)
"
:class="
items.id == activeSubMenuItem
? 'active-menu-nav-link'
: 'white--text'
"
class="white--text text-uppercase h5 pa-0"
>{{ items.name }}</span
>
</v-list-item>
</v-list-group>
</v-list-group>
</v-list>
<v-list class="pl-4 mobile-header-list background-transparent">
<v-list-item>
<v-list-item-content class="pa-0">
<v-list-item-title
@click="goToStoreLocator()"
class="white--text text-uppercase h2 my-2"
>Store Locator</v-list-item-title
>
</v-list-item-content>
</v-list-item>
</v-list>
<v-list class="pl-4 mobile-header-list background-transparent"> <v-list class="pl-4 mobile-header-list background-transparent">
<v-list-group v-if="userAuth"> <v-list-group v-if="userAuth">
@ -474,7 +321,7 @@ export default {
this.$store.dispatch("auth/logout"); this.$store.dispatch("auth/logout");
}, },
goToDashboard() { goToDashboard() {
window.open("/retailer/account-dashboard", "_self"); window.open("/b2b", "_self");
}, },
}, },
created() { created() {

View File

@ -677,7 +677,7 @@ export default {
window.open("/gate/sign-in", "_self"); window.open("/gate/sign-in", "_self");
}, },
goToDashboard() { goToDashboard() {
window.open("/retailer/account-dashboard", "_self"); window.open("/b2b", "_self");
}, },
}, },
created() { created() {

View File

@ -1,6 +1,6 @@
<template> <template>
<div v-resize="checkActiveCategory"> <div v-resize="checkActiveCategory">
<HeaderPromoBanner <!-- <HeaderPromoBanner
v-if=" v-if="
pageName() == 'HomePage' && pageName() == 'HomePage' &&
heroBanner && heroBanner &&
@ -9,7 +9,7 @@
" "
@closeHeroBanner="closeBanner" @closeHeroBanner="closeBanner"
:headerPromoBanner="headerPromoBanner" :headerPromoBanner="headerPromoBanner"
/> /> -->
<v-app-bar <v-app-bar
v-if="heroData && newUser" v-if="heroData && newUser"
flat flat
@ -239,7 +239,7 @@
class="mt-md-11 cursor-pointer" class="mt-md-11 cursor-pointer"
></v-img> ></v-img>
<v-spacer></v-spacer> <v-spacer></v-spacer>
<template v-slot:extension> <!-- <template v-slot:extension>
<v-spacer></v-spacer> <v-spacer></v-spacer>
<div <div
v-for="(categories, index) in categoryList.childrenData" v-for="(categories, index) in categoryList.childrenData"
@ -258,8 +258,7 @@
v-for="(category, i) in categories.childrenData" v-for="(category, i) in categories.childrenData"
v-bind:key="i" v-bind:key="i"
> >
<template v-slot:activator="{ on }"> <template v-slot:activator="{ on }">
<!-- {{i}} - {{category}} -->
<div <div
v-if=" v-if="
category.name !== 'Baby' && category.name !== 'Baby' &&
@ -294,7 +293,7 @@
</v-toolbar-items> </v-toolbar-items>
</div> </div>
<v-spacer></v-spacer> <v-spacer></v-spacer>
</template> </template> -->
</v-app-bar> </v-app-bar>
<v-app-bar <v-app-bar
height="56" height="56"
@ -392,7 +391,7 @@
contain contain
aspect-ratio="1" aspect-ratio="1"
></v-img> ></v-img>
<div <!-- <div
v-for="(categories, index) in categoryList.childrenData" v-for="(categories, index) in categoryList.childrenData"
v-bind:key="index" v-bind:key="index"
> >
@ -446,7 +445,7 @@
</v-col> </v-col>
</v-menu> </v-menu>
</v-toolbar-items> </v-toolbar-items>
</div> </div> -->
</v-col> </v-col>
<v-col class="d-flex justify-end pr-0"> <v-col class="d-flex justify-end pr-0">
<v-toolbar-items> <v-toolbar-items>
@ -873,7 +872,7 @@ export default {
}; };
}, },
goToDashboard() { goToDashboard() {
window.open("/retailer/account-dashboard", "_self"); window.open("/b2b", "_self");
}, },
goToLogin() { goToLogin() {
localStorage.removeItem("cr_mainCategoryId"); localStorage.removeItem("cr_mainCategoryId");

View File

@ -1,124 +0,0 @@
.faq-page-hero-image{
height:650px;
width: 100%;
}
.faq-page-hero-container{
-moz-box-shadow: inset 0px 90px 150px #404040;
-webkit-box-shadow: inset 0px 90px 150px #404040;
box-shadow: inset 0px 90px 150px #404040;
}
.text-primary {
color: #2805da;
}
.fontcolor-black-lighten-3 {
color: #1D1D1D !important;
}
.faq-page-hero-text {
text-align: center;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
color: #ffffff;
}
.faq-page-link-block{
display:contents !important;
}
.faq-head-list {
list-style-type: none;
}
.decoration-none {
text-decoration: none;
}
.faq-page-mobile-hero-text{
color: #404040!important;
}
.faq-page-row{
display: flex;
}
.faq-page-col-3{
display: block;
width: 25%;
}
.faq-page-col-7{
display: block;
width: 75%;
}
.faq-page-collapsible {
background-color: #777;
color: white;
cursor: pointer;
padding: 18px;
padding-left:0px;
padding-bottom:10px;
width: 100%;
border: none;
text-align: left;
outline: none;
font-size: 15px;
}
.active, .faq-page-collapsible:hover {
background-color: #555;
}
.faq-page-content {
max-height: 0;
overflow: hidden;
transition: max-height 0.2s ease-out;
}
.faq-page-content .faq-page-content-border{
border-bottom: 1px solid#e1e1e1 !important;
border-radius: 0 !important;
}
.faq-page-collapsible:after {
content: '\2304';
color: rgba(0,0,0,.54);
float: right;
font-size: x-large;
align-self: right;
margin-left: 5px;
margin-top:-5px;
margin-right:-15px;
}
.faq-page-collapsible.border-bottom-1 {
border-bottom: 1px solid #e1e1e1 !important;
border-radius: 0 !important;
}
.active.border-bottom-1 {
border-bottom: 0px solid #e1e1e1 !important;
border-radius: 0 !important;
}
.active:after {
color: #2805da;
content: "\2303";
margin-top:5px !important;
}
.faq-page-content.border-bottom-1 {
border-bottom: 1px solid #ee0c0c;
border-radius: 0 !important;
}
@media screen and (max-width: 600px) {
.faq-page-hero-image{
height:380px !important;
width: 100%;
}
.faq-page-row{
display: block !important;
width: 100%;
}
.faq-page-col-4{
display: flex !important;
width: 100% !important;
}
.faq-page-col-7{
display: block !important;
width: 100% !important;
}
}
/*
.router-link-active{
color: #1D1D1D !important;
}*/

View File

@ -1,317 +0,0 @@
<template>
<div class="mb-12">
<div v-if="pageContent.length">
<div v-html="getPageContent()"></div>
</div>
</div>
</template>
<script>
export default {
name: "FaqComponent",
data() {
return {
image: require("@/assets/c4aa164d9b01387a88228c67620f7faf861b5544.png")
};
},
computed: {
pageContent: function() {
return this.$store.state.layout.pageContent;
}
},
methods: {
getPageContent() {
if (this.pageContent.length) {
let data = this.pageContent.filter(element => {
return element.identifier === "frequentaly-asked-question-page";
});
if (data.length > 0) {
let path = data[0].content;
var div = document.createElement("div");
div.innerHTML = path;
let imgSrcUrls = div.getElementsByTagName("img");
for (let i = 0; i < imgSrcUrls.length; i++) {
let urlValue = imgSrcUrls[i].getAttribute("src");
if (urlValue) {
imgSrcUrls[i].setAttribute(
"src",
this.imageBasePathUrl() +
"/media/" +
imgSrcUrls[i].src
.replace(window.location.href, "")
.replace(window.location.origin, "")
.replace(/%22%7D%7D/g, "")
.replace(/%7B%7B/g, "")
.replace(/%20url=%22/g, "")
.replace("media", "")
);
}
}
return div.innerHTML;
}
}
},
imageBasePathUrl() {
return process.env.VUE_APP_IMAGE_CATEGORY_PATH_URL;
},
scrollToFaqHead(headName) {
var element = this.$el.querySelector("#" + this.removeSpace(headName));
var top = element.offsetTop;
window.scrollTo(0, top - 60);
},
removeSpace(faqHead) {
return faqHead
.trim()
.replace(/[^a-z0-9]+/gi, "-")
.toLowerCase();
}
},
mounted(){
window.onload = function() {
/* var coll = document.getElementsByClassName("faq-page-collapsible");
var i;
for (i = 0; i < coll.length; i++) {
coll[i].addEventListener("click", function() {
this.classList.toggle("active");
var content = this.nextElementSibling;
if (content.style.maxHeight){
content.style.maxHeight = null;
} else {
content.style.maxHeight = content.scrollHeight + "px";
}
});
}*/
document.getElementById("paperFirstButton").onclick = function() {
expandPaper("paperFirstButton");
};
document.getElementById("paperSecondButton").onclick = function() {
expandPaper("paperSecondButton");
};
function expandPaper(divId) {
var array=["paperFirstButton","paperSecondButton"];
array.filter((val)=>{
if(val==divId){
document.getElementById(val).classList.toggle("active");
var content = document.getElementById(val).nextElementSibling;
if (content.style.maxHeight){
content.style.maxHeight = null;
} else {
content.style.maxHeight = content.scrollHeight + "px";
}
}else{
document.getElementById(val).classList.remove("active");
var content2 = document.getElementById(val).nextElementSibling;
content2.style.maxHeight = null;
}
})
}
document.getElementById("proofsFirstButton").onclick = function() {
expandProofs("proofsFirstButton");
};
document.getElementById("proofsSecondButton").onclick = function() {
expandProofs("proofsSecondButton");
};
function expandProofs(divId) {
var array=["proofsFirstButton","proofsSecondButton"];
array.filter((val)=>{
if(val==divId){
document.getElementById(val).classList.toggle("active");
var content = document.getElementById(val).nextElementSibling;
if (content.style.maxHeight){
content.style.maxHeight = null;
} else {
content.style.maxHeight = content.scrollHeight + "px";
}
}else{
document.getElementById(val).classList.remove("active");
var content2 = document.getElementById(val).nextElementSibling;
content2.style.maxHeight = null;
}
})
}
document.getElementById("ordersFirstButton").onclick = function() {
expandOrders("ordersFirstButton");
};
document.getElementById("ordersSecondButton").onclick = function() {
expandOrders("ordersSecondButton");
};
function expandOrders(divId) {
var array=["ordersFirstButton","ordersSecondButton"];
array.filter((val)=>{
if(val==divId){
document.getElementById(val).classList.toggle("active");
var content = document.getElementById(val).nextElementSibling;
if (content.style.maxHeight){
content.style.maxHeight = null;
} else {
content.style.maxHeight = content.scrollHeight + "px";
}
}else{
document.getElementById(val).classList.remove("active");
var content2 = document.getElementById(val).nextElementSibling;
content2.style.maxHeight = null;
}
})
}
document.getElementById("samplesFirstButton").onclick = function() {
expandSamples("samplesFirstButton");
};
document.getElementById("samplesSecondButton").onclick = function() {
expandSamples("samplesSecondButton");
};
function expandSamples(divId) {
var array=["samplesFirstButton","samplesSecondButton"];
array.filter((val)=>{
if(val==divId){
document.getElementById(val).classList.toggle("active");
var content = document.getElementById(val).nextElementSibling;
if (content.style.maxHeight){
content.style.maxHeight = null;
} else {
content.style.maxHeight = content.scrollHeight + "px";
}
}else{
document.getElementById(val).classList.remove("active");
var content2 = document.getElementById(val).nextElementSibling;
content2.style.maxHeight = null;
}
})
}
document.getElementById("customFirstButton").onclick = function() {
expandCustom("customFirstButton");
};
document.getElementById("customSecondButton").onclick = function() {
expandCustom("customSecondButton");
};
function expandCustom(divId) {
var array=["customFirstButton","customSecondButton"];
array.filter((val)=>{
if(val==divId){
document.getElementById(val).classList.toggle("active");
var content = document.getElementById(val).nextElementSibling;
if (content.style.maxHeight){
content.style.maxHeight = null;
} else {
content.style.maxHeight = content.scrollHeight + "px";
}
}else{
document.getElementById(val).classList.remove("active");
var content2 = document.getElementById(val).nextElementSibling;
content2.style.maxHeight = null;
}
})
}
document.getElementById("paymentFirstButton").onclick = function() {
expandPayment("paymentFirstButton");
};
document.getElementById("paymentSecondButton").onclick = function() {
expandPayment("paymentSecondButton");
};
function expandPayment(divId) {
var array=["paymentFirstButton","paymentSecondButton"];
array.filter((val)=>{
if(val==divId){
document.getElementById(val).classList.toggle("active");
var content = document.getElementById(val).nextElementSibling;
if (content.style.maxHeight){
content.style.maxHeight = null;
} else {
content.style.maxHeight = content.scrollHeight + "px";
}
}else{
document.getElementById(val).classList.remove("active");
var content2 = document.getElementById(val).nextElementSibling;
content2.style.maxHeight = null;
}
})
}
document.getElementById("shippingFirstButton").onclick = function() {
expandShipping("shippingFirstButton");
};
document.getElementById("shippingSecondButton").onclick = function() {
expandShipping("shippingSecondButton");
};
function expandShipping(divId) {
var array=["shippingFirstButton","shippingSecondButton"];
array.filter((val)=>{
if(val==divId){
document.getElementById(val).classList.toggle("active");
var content = document.getElementById(val).nextElementSibling;
if (content.style.maxHeight){
content.style.maxHeight = null;
} else {
content.style.maxHeight = content.scrollHeight + "px";
}
}else{
document.getElementById(val).classList.remove("active");
var content2 = document.getElementById(val).nextElementSibling;
content2.style.maxHeight = null;
}
})
}
document.getElementById("faqPaper").onclick = function() {
scrollToDiv('paper','faqPaper');
};
document.getElementById("faqProofs").onclick = function() {
scrollToDiv('proofs','faqProofs');
};
document.getElementById("faqOrders").onclick = function() {
scrollToDiv('orders','faqOrders');
};
document.getElementById("faqSamples").onclick = function() {
scrollToDiv('samples','faqSamples');
};
document.getElementById("faqCustom").onclick = function() {
scrollToDiv('custom','faqCustom');
};
document.getElementById("faqPayment").onclick = function() {
scrollToDiv('payment','faqPayment');
};
document.getElementById("faqShipping").onclick = function() {
scrollToDiv('shipping','faqShipping');
};
function scrollToDiv(divId,textId) {
var elmnt = document.getElementById(divId);
elmnt.scrollIntoView();
var faqIds=["faqPaper","faqProofs","faqOrders","faqCustom","faqPayment","faqShipping"]
faqIds.filter((val)=>{
if(val == textId){
document.getElementById(val).style.color = "#000";
}else{
document.getElementById(val).style.color = "#2805da";
}
})
/* eslint-disable */
//secondButton
//debugger
}
}
},
};
</script>
<style>
.faq-content > .v-expansion-panel-content__wrap {
padding-left: 0 !important;
}
.faq-panel.v-expansion-panel--active
> .v-expansion-panel-header--active
.v-expansion-panel-header__icon:not(.v-expansion-panel-header__icon--disable-rotate)
.v-icon {
color: #2805da !important;
}
.faq-head-list .router-link-active {
color: #1d1d1d !important;
}
</style>
<style src="./FaqComponent.scss" lang="scss"/>

View File

@ -1,44 +0,0 @@
.landing-right-icon {
background-image: url('../../../assets/blue-arrow.png');
max-width: 22px;
height: 11px;
background-position: right center;
background-size: contain;
}
@media screen and (max-width: 600px) {
.landing-page-bottom-margin-150 {
margin-bottom: 50px;
}
.landing-page-top-margin-150 {
margin-top: 50px;
}
}
@media screen and (min-width: 601px) {
.landing-page-bottom-margin-150 {
margin-bottom: 150px;
}
.landing-page-top-margin-150 {
margin-top: 150px;
}
}
.landing-page-link{
color: #2E5D86;
}
.landing-page-link:hover{
color: #CCB7FF !important;
}
.landing-page-icon{
background-image: url('../../../assets/landing-page-arrow.png');
max-width:22px;
height:16px;
background-position: right center;
background-size:contain;
}
.landing-page-icon:hover{
background-image: url('../../../assets/landing-page-hover-arrow.png');
max-width:22px;
height:16px;
background-position: right center;
background-size:contain;
}

View File

@ -1,194 +0,0 @@
<template>
<div class="homepage-overflow-x-hidden white" v-if="landingPageContent">
<div v-html="getPageContent()">
</div>
</div>
</template>
<script>
export default {
name: "LandingComponent",
components: {},
computed: {
isMobileDevice: function() {
return this.$vuetify.breakpoint.xsOnly ? true : false;
},
landingPageContent: function() {
return this.$store.state.layout.pageContent;
},
pageId: function(){
return this.$route.meta.pid
}
},
watch: {
// landingPageContent(){
// this.pushRoute();
// }
},
methods: {
imageBasePathUrl() {
return process.env.VUE_APP_IMAGE_CATEGORY_PATH_URL;
},
getPageContent() {
if (this.landingPageContent.length) {
let data = this.landingPageContent.filter(element=>{
return element.id === this.pageId});
if(data.length > 0){
let path = data[0].content;
var div = document.createElement("div");
div.innerHTML = path;
let imgSrcUrls = div.getElementsByTagName("img");
for (let i = 0; i < imgSrcUrls.length; i++) {
let urlValue = imgSrcUrls[i].getAttribute("src");
if (urlValue) {
imgSrcUrls[i].setAttribute(
"src",
this.imageBasePathUrl() +
"/media/" +
imgSrcUrls[i].src
.replace(window.location.href, "")
.replace(window.location.origin, "")
.replace(/%22%7D%7D/g, "")
.replace(/%7B%7B/g, "")
.replace(/%20url=%22/g, "")
.replace("media", "")
);
}
}
return div.innerHTML
}
}
},
pushRoute() {
this.$router
.push({
name: "LandingPage",
}) .catch(error => {
error;
});
},
},
created() {
// this.$store.dispatch("block/fetchLandingPage", this.pageUrlKey);
}
};
</script>
<style lang="scss">
html {
scroll-behavior: smooth;
}
.arrow-top-margin-130 {
margin-top: 130px;
}
.arrow {
border: solid white;
border-width: 0 3px 3px 0;
display: inline-block;
padding: 18px;
}
.down {
transform: rotate(45deg);
-webkit-transform: rotate(45deg);
}
.hero-image {
background-position: center;
background-repeat: no-repeat;
background-size: cover;
position: relative;
}
.landing-page-hero-text {
text-align: center;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
color: white;
}
.landing-page-hero-image{
height:62.5%;
width:100%;
}
.landing-page-image{
height:auto;
width:100%;
}
.landing-page-top-row{
display:flex;
}
.landing-page-row{
display:flex;
}
.landing-page-col-6{
width: 50%;
display: block;
margin-top:auto;
margin-bottom:auto;
}
.landing-page-content-maxwidth-750{
max-width:750px;
}
.landing-page-link{
color: #2E5D86 !important;
& .landing-page-icon{
background-image: url('../../../assets/landing-page-arrow.png');
max-width:22px;
height:16px;
background-position: right center;
background-size:contain;
}
}
.landing-page-link:hover{
color: #CCB7FF !important;
& .landing-page-icon{
background-image: url('../../../assets/landing-page-hover-arrow.png');
max-width:22px;
height:16px;
background-position: right center;
background-size:contain;
}
}
@media screen and (min-width: 601px) {
.landing-page-bottom-margin-150 {
margin-bottom: 150px;
}
.landing-page-top-margin-150 {
margin-top: 150px;
}
}
@media screen and (max-width: 601px) {
.arrow{
display: none;
}
.landing-page-hero-text {
display: none;
}
.landing-page-hero-image{
height:62.5%;
width:100%;
}
.landing-page-row{
display:block;
text-align: center;
}
.landing-page-top-row{
display:flex;
flex-direction:column-reverse;
text-align: center;
}
.landing-page-col-6{
width: 100%;
display: block;
margin-top:auto;
margin-bottom:auto;
}
.landing-page-link{
justify-content: center;
}
}
</style>
<style src="./LandingComponent.scss" lang="scss" scoped />

View File

@ -17,20 +17,7 @@
:to="{name:'AccountDashboard'}" :to="{name:'AccountDashboard'}"
>Account Dashboard</router-link> >Account Dashboard</router-link>
</v-hover> </v-hover>
<v-hover v-slot:default="{ hover }">
<router-link
:class="hover ? 'primary--text darken-3 white' : 'white--text'"
class="my-account-link d-block text-decoration-none h4 pa-2 px-6 my-1"
:to="{name:'MyOrders'}"
>My Orders</router-link>
</v-hover>
<v-hover v-slot:default="{ hover }">
<router-link
:class="hover ? 'primary--text darken-3 white' : 'white--text'"
class="my-account-link d-block text-decoration-none h4 pa-2 px-6 my-1"
:to="{name:'SaveForLater'}"
>Saved For Later</router-link>
</v-hover>
<v-hover v-slot:default="{ hover }"> <v-hover v-slot:default="{ hover }">
<router-link <router-link
:class="hover ? 'primary--text darken-3 white' : 'white--text'" :class="hover ? 'primary--text darken-3 white' : 'white--text'"
@ -44,14 +31,7 @@
class="my-account-link d-block text-decoration-none h4 pa-2 px-6 my-1" class="my-account-link d-block text-decoration-none h4 pa-2 px-6 my-1"
:to="{name:'EditAccountInfo',params:{value:'false'}}" :to="{name:'EditAccountInfo',params:{value:'false'}}"
>Account Information</router-link> >Account Information</router-link>
</v-hover> </v-hover>
<v-hover v-slot:default="{ hover }">
<router-link
:class="hover ? 'primary--text darken-3 white' : 'white--text'"
class="my-account-link d-block text-decoration-none h4 pa-2 px-6 my-1"
:to="{name:'StoreCreditInfoPage'}"
>Store Credit</router-link>
</v-hover>
<v-hover v-slot:default="{ hover }"> <v-hover v-slot:default="{ hover }">
<router-link <router-link
:class="hover ? 'primary--text darken-3 white' : 'white--text'" :class="hover ? 'primary--text darken-3 white' : 'white--text'"

View File

@ -25,7 +25,7 @@
max-width="100" max-width="100"
contain contain
></v-img> ></v-img>
<div <!-- <div
v-for="(categories, index) in categoryList.childrenData" v-for="(categories, index) in categoryList.childrenData"
v-bind:key="index" v-bind:key="index"
> >
@ -74,7 +74,7 @@
</v-col> </v-col>
</v-menu> </v-menu>
</v-toolbar-items> </v-toolbar-items>
</div> </div> -->
</v-col> </v-col>
<v-col class="d-flex justify-end pr-0"> <v-col class="d-flex justify-end pr-0">
<!--<v-btn icon @click="goToShopping()"> <!--<v-btn icon @click="goToShopping()">
@ -88,14 +88,14 @@
> >
<v-icon>mdi-logout</v-icon> <v-icon>mdi-logout</v-icon>
</v-btn> </v-btn>
<v-btn <!-- <v-btn
icon icon
@click="showSearchInput = true" @click="showSearchInput = true"
class="d-none d-md-block header-buttons" class="d-none d-md-block header-buttons"
:max-width="$vuetify.breakpoint.mdOnly ? '35px' : ''" :max-width="$vuetify.breakpoint.mdOnly ? '35px' : ''"
> >
<v-icon class="header-action-icons">mdi-magnify</v-icon> <v-icon class="header-action-icons">mdi-magnify</v-icon>
</v-btn> </v-btn> -->
<v-btn <v-btn
icon icon
class="header-buttons" class="header-buttons"
@ -129,43 +129,7 @@
:width="searchInputWidth" :width="searchInputWidth"
height="64" height="64"
> >
<!--<v-autocomplete
v-model="search"
v-if="showSearchInput"
autofocus
class="mt-0 py-0 search-catalog memodule-header-autocomplete"
height="30"
:items="searchResultList"
:loading="searchInProgress"
:search-input.sync="lookupCatelog"
@change="GotoPage(search)"
@blur="showSearchInput=false"
hide-details
:no-filter="true"
hide-no-data
flat
solo
clearable
item-text="name"
item-value="sku"
label="Search"
append-icon="mdi-magnify"
return-object
>
<template v-slot:selection="data">
<span class="ml-2" v-text="data.item.title "></span>
</template>
<template v-slot:item="data ">
<template>
<v-list-item-content>
<div class="d-flex justify-space-between">
<v-list-item-title class="d-block text-truncate">{{data.item.title}}</v-list-item-title>
</div>
</v-list-item-content>
</template>
</template>
</v-autocomplete>-->
<v-text-field <v-text-field
v-model="search" v-model="search"
autofocus autofocus
@ -190,7 +154,7 @@
</v-app-bar> </v-app-bar>
</template> </template>
<script> <script>
import SubMenu from "@/components/layout/sub-menu/SubMenu"; // import SubMenu from "@/components/layout/sub-menu/SubMenu";
import { doFetchCatelogProducts } from "@/services/product.service"; import { doFetchCatelogProducts } from "@/services/product.service";
import { import {
customAttributeValueNew, customAttributeValueNew,
@ -201,7 +165,7 @@ import {
import humps from "lodash-humps"; import humps from "lodash-humps";
export default { export default {
name: "Header", name: "Header",
components: { SubMenu }, // components: { SubMenu },
props: [], props: [],
data: () => ({ data: () => ({

View File

@ -1,392 +1,21 @@
import CategoryPage from '@/routes/retailer/category_page'; export default [
import LandingPage from '@/routes/retailer/landing_page'; // {
import ProductPage from '@/routes/retailer/product_page'; // path: '/test',
// name: 'Main',
let seoRoutes = window.seoRoutes ? window.seoRoutes({ cp: CategoryPage , pp: ProductPage, lp: LandingPage }) : []; // redirect: '/me',
// component: () => import( /* webpackChunkName: "craneMain" */'@/components/layout/Layout.vue'),
let seoUrls = window.urlRewrites ? window.urlRewrites : []; // children: childrenRoutes
// },
const vueHomePageUrl = process.env.VUE_APP_HOME_PAGE_URL;
let defaultRoutes = [{
path: '',
name: 'HomePage',
component: () => import( /* webpackChunkName: "craneMain" */'@/routes/retailer/home_page.vue'),
meta: {
breadcrumb: {
label: 'Home',
},
}
},
{
path: 'search',
name: 'SearchPage',
component: () => import( /* webpackChunkName: "craneMain-search" */'@/routes/retailer/search_page.vue'),
meta: {
breadcrumb: {
label: 'SearchPage Page',
},
}
},
{
path: 'faq-page',
name: 'FaqPage',
component: () => import( /* webpackChunkName: "craneMain" */'@/routes/retailer/faq_page.vue'),
meta: {
"canonical": true,
breadcrumb: {
label: 'FAQ Page',
},
}
},
{
path: 'shortcuts',
name: 'shortcutsPage',
component: () => import( /* webpackChunkName: "craneMain" */'@/routes/retailer/shortcuts_page.vue'),
meta: {
"canonical": true,
breadcrumb: {
label: 'shortcuts Page',
},
}
},
// {
// path: 'store-locator',
// name: 'StoreLocatore',
// component: () => import( /* webpackChunkName: "craneMain-store-locator" */'@/routes/retailer/store_locator_page.vue'),
// meta: {
// "canonical": true,
// breadcrumb: {
// label: 'Store Locatore',
// },
// }
// },
{
path: 'crane-connection/:retailorId/:quantity/:itemNumber/:ccid?/:savItemId?',
name: 'CraneConnection',
component: () => import( /* webpackChunkName: "craneMain" */'@/routes/retailer/crane_connection.vue'),
meta: {
breadcrumb: {
label: 'Crane Connection',
},
}
},
{
path: 'careers',
name: 'Careers',
component: () => import( /* webpackChunkName: "craneMain" */'@/routes/retailer/careers.vue'),
meta: {
"canonical": true,
breadcrumb: {
label: 'Careers',
},
}
},
{
path: 'crane-concierge',
name: 'CraneConcierge',
component: () => import( /* webpackChunkName: "craneMain" */'@/routes/retailer/crane_concierge.vue'),
meta: {
"canonical": true,
breadcrumb: {
label: 'Crane Concierge',
},
}
},
{
path: 'returns',
name: 'ReturnPolicy',
component: () => import( /* webpackChunkName: "craneMain" */'@/routes/retailer/return_policy.vue'),
meta: {
"canonical": true,
breadcrumb: {
label: 'Return Policy',
},
}
},
{
path: 'privacy-policy',
name: 'PrivacyPolicy',
component: () => import( /* webpackChunkName: "craneMain" */'@/routes/retailer/privacy_policy.vue'),
meta: {
"canonical": true,
breadcrumb: {
label: 'Privacy Policy',
},
}
},
{
path: 'terms-conditions',
name: 'TermsAndConditions',
component: () => import( /* webpackChunkName: "craneMain" */'@/routes/retailer/terms_conditions.vue'),
meta: {
"canonical": true,
breadcrumb: {
label: 'Terms Conditions',
},
}
},
{
path: 'logout-success',
name: 'LogOutSuccess',
component: () => import( /* webpackChunkName: "craneMain" */'@/routes/retailer/logout_success.vue'),
meta: {
breadcrumb: {
label: 'LogOut Success',
},
}
},
{
path: 'cc-action/:ccid/:mode/:quantity/:itemNumber/:orderTotal/:itemId?',
name: 'CCAction',
component: () => import( /* webpackChunkName: "craneMain" */'@/routes/retailer/cc_action.vue'),
meta: {
breadcrumb: {
label: 'CC Action',
},
}
},
{
path: 'cc-update/:ccid/:mode/:quantity/:itemNumber/:itemId/:orderTotal?',
name: 'CCUpdate',
component: () => import( /* webpackChunkName: "craneMain" */'@/routes/retailer/cc_update.vue'),
meta: {
breadcrumb: {
label: 'CC Update',
},
}
},
{
path: 'cc-cancel/:mode/:itemId/:ccid?/:itemNumber?',
name: 'CCCancel',
component: () => import( /* webpackChunkName: "craneMain" */'@/routes/retailer/cc_cancel.vue'),
meta: {
breadcrumb: {
label: 'CC Cancel',
},
}
},
{
path: 'cc-error',
name: 'CCError',
component: () => import( /* webpackChunkName: "craneMain" */'@/routes/retailer/cc_error.vue'),
meta: {
breadcrumb: {
label: 'CC Error',
},
}
},
{
path: 'etiquette-guide',
name: 'EtiquetteGuide',
component: () => import( /* webpackChunkName: "craneMain" */'@/routes/retailer/etiquette_guide.vue'),
meta: {
"canonical": true,
breadcrumb: {
label: 'Etiquette Guide',
},
}
},
{
path: 'accessibility',
name: 'Accessibility',
component: () => import( /* webpackChunkName: "craneMain" */'@/routes/retailer/accessibility.vue'),
meta: {
"canonical": true,
breadcrumb: {
label: 'Accessibility',
},
}
},
{
path: 'about-us',
name: 'AboutUs',
component: () => import( /* webpackChunkName: "craneMain" */'@/routes/retailer/about_us.vue'),
meta: {
"canonical": true,
breadcrumb: {
label: 'About Us',
},
}
},
{
path: 'printing-processes',
name: 'PrintingProcesses',
component: () => import( /* webpackChunkName: "craneMain" */'@/routes/retailer/printing_processes.vue'),
meta: {
"canonical": true,
breadcrumb: {
label: 'Our Printing Process',
},
}
},
{
path: 'our-papers',
name: 'OurPapers',
component: () => import( /* webpackChunkName: "craneMain" */'@/routes/retailer/our_papers.vue'),
meta: {
"canonical": true,
breadcrumb: {
label: 'OurPapers',
},
}
},
{
path: 'order-success/:orderNumber',
name: 'OrderSuccess',
component: () => import( /* webpackChunkName: "craneMain" */'@/routes/retailer/order_success.vue'),
meta: {
breadcrumb: {
label: 'Order Success',
},
}
},
{
path: 'maintenance',
name: 'Maintenance',
component: () => import( /* webpackChunkName: "craneMain" */'@/routes/retailer/maintenance.vue'),
meta: {
"canonical": true,
breadcrumb: {
label: 'Maintenance',
},
}
}, {
path: 'shipping-and-delivery',
name: 'ShippingAndDelivery',
component: () => import( /* webpackChunkName: "craneMain" */'@/routes/retailer/shipping_delivery.vue'),
meta: {
"canonical": true,
breadcrumb: {
label: 'Shipping and Delivery',
},
}
},
{
path: 'checkout',
name: 'CheckoutPage',
component: () => import( /* webpackChunkName: "craneMain-checkout" */'@/routes/retailer/checkout_page.vue'),
meta: {
breadcrumb: {
label: 'checkout',
},
}
},
{
path: 'cart-products',
name: 'CartProducts',
component: () => import( /* webpackChunkName: "craneMain-cart-products" */'@/routes/retailer/cart_products.vue'),
meta: {
"canonical": true,
breadcrumb: {
label: 'cart products',
},
}
},
{
path: 'introducing-crane-x-sarah-flint',
name: 'LandingPage',
component: () => import( /* webpackChunkName: "craneMain" */'@/routes/retailer/landing_page.vue'),
meta: { "id": 149, "canonical": true, "breadcrumb": { "label": "Crane x Sarah Flint" } }
},
{
path: 'gift-guide',
name: 'GiftGuide',
component: () => import( /* webpackChunkName: "craneMain" */'@/routes/retailer/gift_guide.vue'),
meta: {
"canonical": true,
breadcrumb: {
label: 'GiftGuide',
},
}
},
{
path: 'playground',
name: 'Playground',
component: () => import( /* webpackChunkName: "craneMain" */'@/routes/retailer/playground.vue'),
meta: {
breadcrumb: {
label: 'Playground Page',
},
}
},
//{
//path: 'shipping-and-delivery-cms',
//name: 'ShippingAndDeliveryCms',
//component: () => import( /* webpackChunkName: "craneMain" */'@/routes/retailer/shipping_delivery_cms.vue'),
//meta: {
// "canonical": true,
// breadcrumb: {
// label: 'Shipping and Delivery',
//},
// }
//}
];
let shopRoutes = [{
path: '/',
name: 'ShopPage',
component: () => import( /* webpackChunkName: "craneMain" */'@/routes/retailer/home_page.vue'),
meta: {
"canonical": true,
breadcrumb: {
label: 'Home',
},
}
},
{
path: 'our-papers',
name: 'OurPapers',
component: () => import( /* webpackChunkName: "craneMain" */'@/routes/retailer/product_page.vue'),
meta: {
"canonical": true,
breadcrumb: {
label: 'OurPapers',
},
}
},
{
path: 'product-details/:sku',
name: 'ProductPage',
component: () => import( /* webpackChunkName: "craneMain-product-details" */'@/routes/retailer/product_page.vue'),
meta: {
breadcrumb: {
label: 'Product Page',
},
}
},
{
path: '*',
name: 'RouteNotFound',
component: () => import( /* webpackChunkName: "craneMain" */'@/routes/retailer/route_not_found.vue'),
}
];
let childrenRoutes = seoRoutes.concat(defaultRoutes);
export default [{
path: '/',
name: 'Main',
component: () => import( /* webpackChunkName: "craneMain" */'@/components/layout/Layout.vue'),
children: childrenRoutes
}, {
path: '/shop',
name: 'Shop',
component: () => import( /* webpackChunkName: "craneMain" */'@/components/layout/Layout.vue'),
children: shopRoutes,
},
{ {
path: '/me', path: '/',
name: 'MyAccountPage', name: 'MyAccountPage',
redirect: 'me/account-dashboard', redirect: '/b2b',
component: () => import(/* webpackChunkName: "meModule" */ '@/components/retailer/layout/Layout.vue'), component: () => import(/* webpackChunkName: "meModule" */ '@/components/retailer/layout/Layout.vue'),
children: [{ children: [
path: 'account-dashboard', {
path: 'b2b',
name: 'AccountDashboard', name: 'AccountDashboard',
component: () => import(/* webpackChunkName: "meModule" */ '@/routes/retailer/account_dashboard.vue'), component: () => import(/* webpackChunkName: "meModule" */ '@/routes/retailer/account_dashboard.vue'),
meta: { meta: {
@ -395,76 +24,6 @@ export default [{
}, },
} }
}, },
{
path: 'edit-account-info/:value',
name: 'EditAccountInfo',
component: () => import(/* webpackChunkName: "meModule" */ '@/routes/retailer/edit_account_info.vue'),
meta: {
breadcrumb: {
label: 'Edit Account Information Page',
},
}
},
{
path: 'store-credit-info',
name: 'StoreCreditInfoPage',
component: () => import(/* webpackChunkName: "meModule" */ '@/routes/retailer/store_credit_info_page.vue'),
meta: {
breadcrumb: {
label: 'Store Credit Page',
},
}
},
{
path: 'gift-card-page',
name: 'GiftCardPage',
component: () => import(/* webpackChunkName: "meModule" */ '@/routes/retailer/gift_card_page.vue'),
meta: {
breadcrumb: {
label: 'Gift Card Page',
},
}
},
{
path: 'gift-card-page/:giftCardCode',
name: 'GiftCardPageId',
component: () => import(/* webpackChunkName: "meModule" */ '@/routes/retailer/gift_card_page.vue'),
meta: {
breadcrumb: {
label: 'Gift Card Page',
},
}
},
{
path: 'my-orders',
name: 'MyOrders',
component: () => import(/* webpackChunkName: "meModule" */ '@/routes/retailer/my_orders.vue'),
meta: {
breadcrumb: {
label: 'My Orders Page',
},
}
},
{
path: 'my-orders/:orderId',
name: 'ViewProduct',
component: () => import(/* webpackChunkName: "meModule" */ '@/routes/retailer/my_orders.vue'),
meta: {
breadcrumb: {
label: 'My Orders Item',
},
}
},
{
path: 'wishlist',
name: 'SaveForLater',
component: () => import(/* webpackChunkName: "meModule" */ '@/routes/retailer/save_for_later.vue'),
meta: {
breadcrumb: {
label: 'Save For Later Page',
},
}
},
{ {
path: 'address-book', path: 'address-book',
name: 'AddressBook', name: 'AddressBook',
@ -486,38 +45,98 @@ export default [{
} }
}, },
{ {
path: 'news-letter-subscription', path: 'edit-account-info/:value',
name: 'NewsLetterSubscription', name: 'EditAccountInfo',
component: () => import(/* webpackChunkName: "meModule" */ '@/routes/retailer/news_letter_subscription.vue'), component: () => import(/* webpackChunkName: "meModule" */ '@/routes/retailer/edit_account_info.vue'),
meta: { meta: {
breadcrumb: { breadcrumb: {
label: 'News Letter subscription Page', label: 'Edit Account Information Page',
}, },
} }
} },
{
path: 'my-orders',
name: 'MyOrders',
component: () => import(/* webpackChunkName: "meModule" */ '@/routes/retailer/my_orders.vue'),
meta: {
breadcrumb: {
label: 'My Orders Page',
},
}
},
{
path: 'my-orders/:orderId',
name: 'ViewProduct',
component: () => import(/* webpackChunkName: "meModule" */ '@/routes/retailer/my_orders.vue'),
meta: {
breadcrumb: {
label: 'My Orders Item',
},
}
},
{
path: 'search',
name: 'SearchPage',
component: () => import( /* webpackChunkName: "craneMain-search" */'@/routes/retailer/search_page.vue'),
meta: {
breadcrumb: {
label: 'SearchPage Page',
},
}
},
{
path: 'logout-success',
name: 'LogOutSuccess',
component: () => import( /* webpackChunkName: "craneMain" */'@/routes/retailer/logout_success.vue'),
meta: {
breadcrumb: {
label: 'LogOut Success',
},
}
},
{
path: 'maintenance',
name: 'Maintenance',
component: () => import( /* webpackChunkName: "craneMain" */'@/routes/retailer/maintenance.vue'),
meta: {
"canonical": true,
breadcrumb: {
label: 'Maintenance',
},
}
},
{
path: 'checkout',
name: 'CheckoutPage',
component: () => import( /* webpackChunkName: "craneMain-checkout" */'@/routes/retailer/checkout_page.vue'),
meta: {
breadcrumb: {
label: 'checkout',
},
}
},
{
path: 'cart-products',
name: 'CartProducts',
component: () => import( /* webpackChunkName: "craneMain-cart-products" */'@/routes/retailer/cart_products.vue'),
meta: {
"canonical": true,
breadcrumb: {
label: 'cart products',
},
}
},
] ]
}, },
{ {
path: '*', path: '*',
name: 'RouteNotFound', name: 'RouteNotFound',
component: () => import( /* webpackChunkName: "craneMain" */'@/routes/retailer/route_not_found.vue'), component: () => import( /* webpackChunkName: "craneMain" */'@/routes/retailer/route_not_found.vue'),
beforeEnter: (to) => {
let regEx = new RegExp(`^${to.path}$`);
let seoData = seoUrls.filter(data => {
let url=data.oldUrl;
if(url.charAt(0)!=="/")
url="/"+url;
return url.match(regEx);
})[0];
if (seoData){
let queryString = Object.keys(to.query).map(key => key + '=' + to.query[key]).join('&');
location.href = seoData.newUrl+ "?"+queryString;
}
else {
let q = to.path.replace("/", '');
location.href = vueHomePageUrl + "/search?q=" + q;
}
}
} }
] ]

View File

@ -1,98 +0,0 @@
.aboutus-background-image{
background-image: url('../../assets/Liberty__Mill_Site_569x434.png');
background-repeat: no-repeat;
background-attachment: fixed;
background-size: cover;
}
.aboutus-background-color{
background-color: #eacfff;
}
.aboutus-route-link:active{
color: #2c50da !important;
& .aboutus-route-icon {
color:#2c50da !important;
}
}
.aboutus-page-link{
color: #E5DBFE !important;
& .aboutus-page-icon{
background-image: url('../../assets/white-arrow.png');
max-width:22px;
height:14px;
background-position: right center;
background-size:contain;
}
}
.aboutus-page-link:hover{
color: #CCB7FF!important;
& .aboutus-page-icon{
background-image: url('../../assets/hover-arrow.png');
max-width:22px;
height:14px;
background-position: right center;
background-size:contain;
}
}
.aboutus-page-primary-link{
color: #2c50da !important;
& .aboutus-page-icon{
background-image: url('../../assets/blue-arrow.png');
max-width:22px;
height:14px;
background-position: right center;
background-size:contain;
}
}
.aboutus-page-primary-link:hover{
color: #CCB7FF!important;
& .aboutus-page-icon{
background-image: url('../../assets/hover-arrow.png');
max-width:22px;
height:14px;
background-position: right center;
background-size:contain;
}
}
@media screen and (max-width: 600px) {
.aboutus-background-image{
background-image: url('../../assets/Mask_Group_27@2x.png');
background-repeat: no-repeat;
background-attachment: fixed;
background-size: cover;
}
.aboutus-page-row{
display: block !important;
width: 100%;
}
.aboutus-page-column{
display: flex !important;
width: 100% !important;
}
.aboutus-page-col-6{
display: block !important;
width: 100% !important;
}
}
.aboutus-page-row{
display: flex;
}
.aboutus-page-column{
display: block;
width: 33.33%;
}
.aboutus-page-col-6{
display: block;
width: 50%;
}
.aboutus-page-header-content-max-width-560{
max-width: 560px;
width:100%;
}
.aboutus-page-header-hero-min-height-800{
min-height: 800px;
}
.aboutus-page-header-left-block{
width: 100%;
display: block;
}

View File

@ -1,100 +0,0 @@
<template>
<div>
<!--<div v-html="etiquetteGuideContent.content" class="mx-auto history-section"></div>-->
<div v-if="pageContent.length">
<div v-html="getPageContent()"></div>
</div>
<PostScriptBlog />
<FooterComponent />
</div>
</template>
<script>
const baseUrl = process.env.VUE_APP_BASE_URL;
import PostScriptBlog from "@/components/retailer/home/PostScriptBlog";
import FooterComponent from "@/components/layout/footer/FooterComponent";
import { goToCategoryPage } from "@/services/util.service";
export default {
name: "AboutUs",
components: {
PostScriptBlog,
FooterComponent
},
computed: {
pageContent: function() {
return this.$store.state.layout.pageContent;
},
etiquetteGuideContent: function() {
return this.$store.state.block.one;
},
canonical: function() {
return this.$route.meta.canonical;
},
},
data: () => ({
image: require("@/assets/c4aa164d9b01387a88228c67620f7faf861b5544.png"),
}),
metaInfo() {
return {
link: [
{rel: 'canonical', href:`${this.canonical ? window.location.href.split('?')[0] : baseUrl }`}
]
}
},
methods: {
getPageContent() {
if (this.pageContent.length) {
let data = this.pageContent.filter(element => {
return element.identifier === "about-us";
});
if (data.length > 0) {
let path = data[0].content;
var div = document.createElement("div");
div.innerHTML = path;
let imgSrcUrls = div.getElementsByTagName("img");
for (let i = 0; i < imgSrcUrls.length; i++) {
let urlValue = imgSrcUrls[i].getAttribute("src");
if (urlValue) {
imgSrcUrls[i].setAttribute(
"src",
this.imageBasePathUrl() +
"/media/" +
imgSrcUrls[i].src
.replace(window.location.href, "")
.replace(window.location.origin, "")
.replace(/%22%7D%7D/g, "")
.replace(/%7B%7B/g, "")
.replace(/%20url=%22/g, "")
.replace("media", "")
);
}
}
return div.innerHTML;
}
}
},
imageBasePathUrl() {
return process.env.VUE_APP_IMAGE_CATEGORY_PATH_URL;
},
routeToPage(pageName) {
if (pageName == "CategoryPage") {
let vm = this;
goToCategoryPage(vm, "stationery", null, null, 10);
}
},
initialLink() {
return process.env.VUE_APP_HOME_PAGE_URL;
},
goToPage(pageLink) {
window.location.replace(this.initialLink()+pageLink);
//} else {
//window.open(routeSecond, "_self");
//}
},
},
created() {
// this.$store.dispatch("block/fetchEtiquetteGuide", this.blockId);
}
};
</script>
<style src="./about_us.scss" lang="scss" />

View File

@ -1,40 +0,0 @@
.accessibility-background-image{
background-image: url('../../assets/Liberty__Mill_Site_569x434.png');
background-repeat: no-repeat;
background-attachment: fixed;
width: 100%;
background-size: cover;
}
.accessibility-page-row{
display: flex;
align-items: center;
}
.accessibility-page-column{
display: block;
width: 33.33%;
}
.accessibility-page-col-6{
display: block;
width: 50%;
}
.accessibility-page-header-content-max-width-600{
max-width: 600px;
}
.accessibility-page-header-left-block{
width: 100%;
display: block;
}
@media screen and (max-width: 600px) {
.accessibility-page-row{
display: block !important;
width: 100%;
}
.accessibility-page-column{
display: flex !important;
width: 100% !important;
}
.accessibility-page-col-6{
display: block !important;
width: 100% !important;
}
}

View File

@ -1,80 +0,0 @@
<template>
<div>
<div v-if="pageContent.length">
<div v-html="getPageContent()"></div>
</div>
<PostScriptBlog />
<FooterComponent />
</div>
</template>
<script>
const baseUrl = process.env.VUE_APP_BASE_URL;
import PostScriptBlog from "@/components/retailer/home/PostScriptBlog";
import FooterComponent from "@/components/layout/footer/FooterComponent";
export default {
name: "Accessibility",
components: {
PostScriptBlog,
FooterComponent
},
data: () => ({
}),
computed:{
pageContent: function() {
return this.$store.state.layout.pageContent;
},
canonical: function() {
return this.$route.meta.canonical;
},
},
metaInfo() {
return {
link: [
{rel: 'canonical', href:`${this.canonical ? window.location.href.split('?')[0] : baseUrl }`}
]
}
},
methods: {
getPageContent() {
if (this.pageContent.length) {
let data = this.pageContent.filter(element => {
return element.identifier === "accessibility-page";
});
if (data.length > 0) {
let path = data[0].content;
var div = document.createElement("div");
div.innerHTML = path;
let imgSrcUrls = div.getElementsByTagName("img");
for (let i = 0; i < imgSrcUrls.length; i++) {
let urlValue = imgSrcUrls[i].getAttribute("src");
if (urlValue) {
imgSrcUrls[i].setAttribute(
"src",
this.imageBasePathUrl() +
"/media/" +
imgSrcUrls[i].src
.replace(window.location.href, "")
.replace(window.location.origin, "")
.replace(/%22%7D%7D/g, "")
.replace(/%7B%7B/g, "")
.replace(/%20url=%22/g, "")
.replace("media", "")
);
}
}
return div.innerHTML;
}
}
},
imageBasePathUrl() {
return process.env.VUE_APP_IMAGE_CATEGORY_PATH_URL;
},
},
created() {
// this.$store.dispatch("block/fetchOne",10)
}
};
</script>
<style src="./accessibility.scss" lang="scss" />

View File

@ -1,23 +0,0 @@
.careers-text-underline{
text-decoration: underline;
}
.careers-page-row{
display: flex;
}
.careers-page-column{
display: block;
width: auto;
}
.careers-page-img{
width: 100%;
}
@media screen and (max-width: 600px) {
.careers-page-row{
display: block !important;
width: 100%;
}
.careers-page-column{
display: flex !important;
width: 100% !important;
}
}

View File

@ -1,78 +0,0 @@
<template>
<div class="white">
<div v-if="pageContent.length">
<div v-html="getPageContent()"></div>
</div>
<FooterComponent />
</div>
</template>
<script>
const baseUrl = process.env.VUE_APP_BASE_URL;
import FooterComponent from "@/components/layout/footer/FooterComponent";
/* eslint-disable */
export default {
name: "Careers",
data() {
return {
};
},
metaInfo() {
return {
link: [
{rel: 'canonical', href:`${this.canonical ? window.location.href.split('?')[0] : baseUrl }`}
]
}
},
components: {
FooterComponent
},
watch: {},
computed: {
pageContent: function() {
return this.$store.state.layout.pageContent;
},
canonical: function() {
return this.$route.meta.canonical;
},
},
methods: {
getPageContent() {
if (this.pageContent.length) {
let data = this.pageContent.filter(element => {
return element.identifier === "careers-page";
});
if (data.length > 0) {
let path = data[0].content;
var div = document.createElement("div");
div.innerHTML = path;
let imgSrcUrls = div.getElementsByTagName("img");
for (let i = 0; i < imgSrcUrls.length; i++) {
let urlValue = imgSrcUrls[i].getAttribute("src");
if (urlValue) {
imgSrcUrls[i].setAttribute(
"src",
this.imageBasePathUrl() +
"/media/" +
imgSrcUrls[i].src
.replace(window.location.href, "")
.replace(window.location.origin, "")
.replace(/%22%7D%7D/g, "")
.replace(/%7B%7B/g, "")
.replace(/%20url=%22/g, "")
.replace("media", "")
);
}
}
return div.innerHTML;
}
}
},
imageBasePathUrl() {
return process.env.VUE_APP_IMAGE_CATEGORY_PATH_URL;
},
},
mounted() {},
created() {}
};
</script>
<style src="./careers.scss" lang="scss" scopped/>

View File

@ -1,255 +0,0 @@
<template>
<div>
<v-overlay :value="AddingToBagProgress" :opacity="0.8">
<v-container>
<v-row>
<v-col cols="12" class="d-flex justify-center align-center">
<div class="h3 white--text mt-10">Adding To Bag...</div>
</v-col>
<v-col cols="12" class="d-flex justify-center align-center">
<v-progress-circular
indeterminate
size="80"
color="white"
align="center"
justify="center"
></v-progress-circular>
</v-col>
</v-row>
</v-container>
</v-overlay>
<SnackbarComponent :snackbar="snackbar"></SnackbarComponent>
</div>
</template>
<script>
const baseUrl = process.env.VUE_APP_BASE_URL;
import SnackbarComponent from "@/components/common/SnackbarComponent";
import {googleAanalytics} from "@/services/util.service";
export default {
name: "CCAction",
components: { SnackbarComponent },
data: () => ({
AddingToBagProgress: false,
snackbar: {
show: false,
message: null,
color: null,
timeout: 0
}
}),
computed: {
userAuth: function() {
return this.$store.state.auth.userAuth;
},
guestQuoteId: function() {
return this.$store.state.guestInfo.guestQuoteId;
},
canonical: function() {
return this.$route.meta.canonical;
},
},
metaInfo() {
return {
link: [
{rel: 'canonical', href:`${this.canonical ? window.location.href.split('?')[0] : baseUrl }`}
]
}
},
methods: {
async userCartAction(sku, quantity, ccid, itemId, cartAction) {
let vm =this;
try {
if (cartAction === "add") {
let res= await this.$store.dispatch("userCartProduct/addToCart", {
sku: sku,
qty: quantity,
ccid: ccid,
price: null,
personalizeDetails: null
});
if(res)
{
let productDetails = await this.$store.dispatch("productOne/fetchProductDetails", sku);
if(productDetails)
{
googleAanalytics(vm,res,productDetails,quantity,'add_to_cart' ,'Ecommerce');
}
}
this.snackbar = {
message: "Product Added Successfully",
color: "success",
show: true,
timeout: 2000
};
} else {
await this.$store.dispatch("userCartProduct/cartProductList");
await this.$store.dispatch("userCartProduct/updateToCart", {
sku: sku,
qty: quantity,
ccid: ccid,
itemId: itemId,
price: null,
personalizeDetails: null
});
this.snackbar = {
message: "Product Updated Successfully",
color: "success",
show: true,
timeout: 3000
};
}
this.AddingToBagProgress = false;
this.$store.dispatch("userCartProduct/cartProductList");
this.$store.dispatch("userCartProduct/cartDrawer", false);
setTimeout(() => {
this.$router.push({
name: "CartProducts"
});
}, 2000);
} catch (error) {
this.$store.dispatch("userCartProduct/cartProductList");
this.snackbar = {
message: error.message,
color: "error",
show: true,
timeout: 3000
};
setTimeout(() => {
this.$router.push({
name: "CartProducts"
});
}, 2000);
}
},
async guestCartAction(sku, quantity, ccid, itemId, cartAction) {
let vm=this;
try {
if (cartAction === "add") {
let res= await this.$store.dispatch("cartProduct/addToCart", {
sku: sku,
qty: quantity,
ccid: ccid,
price: null,
personalizeDetails: null
});
if(res)
{
let productDetails = await this.$store.dispatch("productOne/fetchProductDetails", sku);
if(productDetails)
{
googleAanalytics(vm,res,productDetails,quantity,'add_to_cart' ,'Ecommerce');
}
}
this.snackbar = {
message: "Product Added Successfully",
color: "success",
show: true,
timeout: 2000
};
} else {
await this.$store.dispatch("cartProduct/updateToCart", {
sku: sku,
qty: quantity,
ccid: ccid,
itemId: itemId,
price: null,
personalizeDetails: null
});
this.snackbar = {
message: "Product Updated Successfully",
color: "success",
show: true,
timeout: 3000
};
}
this.AddingToBagProgress = false;
this.$store.dispatch("userCartProduct/cartDrawer", false);
setTimeout(() => {
this.$router.push({
name: "CartProducts"
});
}, 2000);
} catch (error) {
this.snackbar = {
message: error.message,
color: "error",
show: true,
timeout: 3000
};
setTimeout(() => {
this.$router.push({
name: "CartProducts"
});
}, 2000);
}
}
},
async mounted() {
if (this.$route.params.mode == "4") {
this.AddingToBagProgress = true;
let { ccid, quantity, itemNumber, itemId } = this.$route.params;
if (ccid && quantity && itemNumber) {
if (this.userAuth) {
if (itemId) {
await this.userCartAction(
itemNumber,
quantity,
ccid,
itemId,
"update"
);
} else {
await this.userCartAction(itemNumber, quantity, ccid, null, "add");
}
} else {
if (itemId) {
await this.guestCartAction(
itemNumber,
quantity,
ccid,
itemId,
"update"
);
} else {
await this.guestCartAction(itemNumber, quantity, ccid, null, "add");
}
}
} else {
this.AddingToBagProgress = false;
this.snackbar = {
message: "Required parameters are missing",
color: "error",
show: true,
timeout: 2000
};
setTimeout(() => {
this.$router.push({
name: "CartProducts"
});
}, 2000);
}
} else {
this.AddingToBagProgress = false;
this.snackbar = {
message: "This feature is currently unavailable",
color: "error",
show: true,
timeout: 2000
};
setTimeout(() => {
this.$router.push({
name: "CartProducts"
});
}, 2000);
}
},
created() {
if (this.$route.params.mode == "4") {
this.AddingToBagProgress = true;
}
}
};
</script>

View File

@ -1,70 +0,0 @@
<template>
<div>
</div>
</template>
<script>
const baseUrl = process.env.VUE_APP_BASE_URL;
export default {
name: "CCCancel",
components: {
},
data: () => ({
}),
computed:{
userAuth: function() {
return this.$store.state.auth.userAuth;
},
guestQuoteId: function() {
return this.$store.state.guestInfo.guestQuoteId;
},
canonical: function() {
return this.$route.meta.canonical;
},
},
metaInfo() {
return {
link: [
{rel: 'canonical', href:`${this.canonical ? window.location.href.split('?')[0] : baseUrl }`}
]
}
},
mounted() {
if (this.userAuth) {
if (
this.$route.query.RetailerID &&
this.$route.query.ItemNumber &&
this.$route.query.Quantity &&
this.$route.query.CCID
) {
// this.$store.dispatch("userCartProduct/addToCart", {
// RetailerID: this.$route.query.RetailerID,
// ItemNumber: this.$route.query.ItemNumber,
// Quantity: this.$route.query.Quantity,
// CCID: this.$route.query.CCID
// })
// this.$store.dispatch("userCartProduct/cartProductList");
}
}
else
{
if (
this.$route.query.RetailerID &&
this.$route.query.ItemNumber &&
this.$route.query.Quantity &&
this.$route.query.CCID
) {
// this.$store.dispatch("cartProduct/addToCart", {
// RetailerID: this.$route.query.RetailerID,
// ItemNumber: this.$route.query.ItemNumber,
// Quantity: this.$route.query.Quantity,
// CCID: this.$route.query.CCID
// })
}
}
}
,
created(){
}
};
</script>

View File

@ -1,70 +0,0 @@
<template>
<div>
</div>
</template>
<script>
const baseUrl = process.env.VUE_APP_BASE_URL;
export default {
name: "CCError",
components: {
},
data: () => ({
}),
computed:{
userAuth: function() {
return this.$store.state.auth.userAuth;
},
guestQuoteId: function() {
return this.$store.state.guestInfo.guestQuoteId;
},
canonical: function() {
return this.$route.meta.canonical;
},
},
metaInfo() {
return {
link: [
{rel: 'canonical', href:`${this.canonical ? window.location.href.split('?')[0] : baseUrl }`}
]
}
},
mounted() {
if (this.userAuth) {
if (
this.$route.query.RetailerID &&
this.$route.query.ItemNumber &&
this.$route.query.Quantity &&
this.$route.query.CCID
) {
// this.$store.dispatch("userCartProduct/addToCart", {
// RetailerID: this.$route.query.RetailerID,
// ItemNumber: this.$route.query.ItemNumber,
// Quantity: this.$route.query.Quantity,
// CCID: this.$route.query.CCID
// })
// this.$store.dispatch("userCartProduct/cartProductList");
}
}
else
{
if (
this.$route.query.RetailerID &&
this.$route.query.ItemNumber &&
this.$route.query.Quantity &&
this.$route.query.CCID
) {
// this.$store.dispatch("cartProduct/addToCart", {
// RetailerID: this.$route.query.RetailerID,
// ItemNumber: this.$route.query.ItemNumber,
// Quantity: this.$route.query.Quantity,
// CCID: this.$route.query.CCID
// })
}
}
}
,
created(){
}
};
</script>

View File

@ -1,143 +0,0 @@
<template>
<div>
<SnackbarComponent :snackbar="snackbar"></SnackbarComponent>
</div>
</template>
<script>
const baseUrl = process.env.VUE_APP_BASE_URL;
import SnackbarComponent from "@/components/common/SnackbarComponent";
export default {
name: "CCUpdate",
components: { SnackbarComponent },
data: () => ({
snackbar: {
show: false,
message: null,
color: null,
timeout: 0
}
}),
computed: {
userAuth: function() {
return this.$store.state.auth.userAuth;
},
guestQuoteId: function() {
return this.$store.state.guestInfo.guestQuoteId;
},
canonical: function() {
return this.$route.meta.canonical;
},
},
metaInfo() {
return {
link: [
{rel: 'canonical', href:`${this.canonical ? window.location.href.split('?')[0] : baseUrl }`}
]
}
},
mounted() {
if (this.$route.params.mode == "4") {
if (
this.$route.params.ccid &&
this.$route.params.quantity &&
this.$route.params.itemNumber
) {
if (this.userAuth) {
this.$store
.dispatch("userCartProduct/updateToCart", {
sku: this.$route.params.itemNumber,
qty: this.$route.params.quantity,
ccid: this.$route.params.ccid,
itemId: this.$route.params.itemId
})
.then(() => {
this.snackbar = {
message: "Product Updated Successfully",
color: "success",
show: true,
timeout: 3000
};
setTimeout(() => {
this.$router.push({
name: "CartProducts"
});
}, 5000);
})
.catch(error => {
this.snackbar = {
message: error.message,
color: "error",
show: true,
timeout: 3000
};
setTimeout(() => {
this.$router.push({
name: "CartProducts"
});
}, 5000);
});
} else {
this.$store
.dispatch("cartProduct/updateToCart", {
sku: this.$route.params.itemNumber,
qty: this.$route.params.quantity,
ccid: this.$route.params.ccid,
itemId: this.$route.params.itemId
})
.then(() => {
this.snackbar = {
message: "Product Updated Successfully",
color: "success",
show: true,
timeout: 3000
};
setTimeout(() => {
this.$router.push({
name: "CartProducts"
});
}, 5000);
})
.catch(error => {
this.snackbar = {
message: error.message,
color: "error",
show: true,
timeout: 3000
};
setTimeout(() => {
this.$router.push({
name: "CartProducts"
});
}, 5000);
});
}
} else {
this.snackbar = {
message: "Required parameters are missing",
color: "error",
show: true,
timeout: 2000
};
setTimeout(() => {
this.$router.push({
name: "CartProducts"
});
}, 2000);
}
} else {
this.snackbar = {
message: "This feature is currently unavailable",
color: "error",
show: true,
timeout: 2000
};
setTimeout(() => {
this.$router.push({
name: "CartProducts"
});
}, 2000);
}
},
created() {}
};
</script>

View File

@ -1914,7 +1914,6 @@ import {
googleAanalyticsCheckoutAddShippingInfo, googleAanalyticsCheckoutAddShippingInfo,
googleAanalyticsCheckoutAddPaymentInfo, googleAanalyticsCheckoutAddPaymentInfo,
} from "@/services/util.service"; } from "@/services/util.service";
import { doPostPdfdoc } from "@/services/pdfdoc.service";
const braintreeAuthKey = process.env.VUE_APP_BRAINTREE_AUTH_KEY; const braintreeAuthKey = process.env.VUE_APP_BRAINTREE_AUTH_KEY;
const { mapFields } = createHelpers({ const { mapFields } = createHelpers({

View File

@ -1,3 +0,0 @@
.crane-concierge-page-height{
height: -webkit-fill-available;
}

View File

@ -1,80 +0,0 @@
<template>
<div class="white d-flex flex-column crane-concierge-page-height">
<div v-if="pageContent.length">
<div v-html="getPageContent()"></div>
</div>
<v-row class="d-flex align-end">
<FooterComponent />
</v-row>
</div>
</template>
<script>
const baseUrl = process.env.VUE_APP_BASE_URL;
import FooterComponent from "@/components/layout/footer/FooterComponent";
/* eslint-disable */
export default {
name: "CraneConcierge",
data() {
return {};
},
components: {
FooterComponent
},
watch: {},
computed: {
pageContent: function() {
return this.$store.state.layout.pageContent;
},
canonical: function() {
return this.$route.meta.canonical;
},
},
metaInfo() {
return {
link: [
{rel: 'canonical', href:`${this.canonical ? window.location.href.split('?')[0] : baseUrl }`}
]
}
},
methods: {
getPageContent() {
if (this.pageContent.length) {
let data = this.pageContent.filter(element => {
return element.identifier === "crane-concierge-page";
});
if (data.length > 0) {
let path = data[0].content;
var div = document.createElement("div");
div.innerHTML = path;
let imgSrcUrls = div.getElementsByTagName("img");
for (let i = 0; i < imgSrcUrls.length; i++) {
let urlValue = imgSrcUrls[i].getAttribute("src");
if (urlValue) {
imgSrcUrls[i].setAttribute(
"src",
this.imageBasePathUrl() +
"/media/" +
imgSrcUrls[i].src
.replace(window.location.href, "")
.replace(window.location.origin, "")
.replace(/%22%7D%7D/g, "")
.replace(/%7B%7B/g, "")
.replace(/%20url=%22/g, "")
.replace("media", "")
);
}
}
return div.innerHTML;
}
}
},
imageBasePathUrl() {
return process.env.VUE_APP_IMAGE_CATEGORY_PATH_URL;
},
},
mounted() {},
created() {}
};
</script>
<style src="./crane_concierge.scss" lang="scss" scopped/>

View File

@ -1,59 +0,0 @@
<template>
<div v-resize="resize">
<iframe :src="url" :height="frameHeight" :width="isDesktop ?frameWidth:frameWidthDesktop"></iframe>
</div>
</template>
<script>
const baseUrl = process.env.VUE_APP_BASE_URL;
const craneConnectionUrl = process.env.VUE_APP_CC_CONNECTION_URL;
export default {
name: "CraneConnection",
components: {
},
data: () => ({
queryString:"",
url:"",
frameWidth:"",
frameHeight:"",
frameWidthDesktop:""
}),
computed:{
isDesktop: function() {
return this.$vuetify.breakpoint.smAndDown ? true : false;
},
canonical: function() {
return this.$route.meta.canonical;
},
},
metaInfo() {
return {
link: [
{rel: 'canonical', href:`${this.canonical ? window.location.href.split('?')[0] : baseUrl }`}
]
}
},
methods:{
resize() {
this.iframeWidthHeight();
},
iframeWidthHeight() {
this.frameWidth = window.innerWidth;
this.frameWidthDesktop=window.innerWidth-20;
this.frameHeight = window.innerHeight-60;
},
},
created(){
if(this.$route.params.ccid)
{
this.queryString='RetailerID='+this.$route.params.retailorId+'&CCID='+this.$route.params.ccid+'&Quantity='+this.$route.params.quantity+'&sav_itemId='+this.$route.params.savItemId+'&sav_itemNumber='+this.$route.params.itemNumber ;
}
else
{
this.queryString='RetailerID='+this.$route.params.retailorId+ '&ItemNumber='+ this.$route.params.itemNumber + '&Quantity=' + this.$route.params.quantity;
}
this.url =craneConnectionUrl+this.queryString;
}
};
</script>
<style src="./crane_connection.scss" lang="scss" scoped />

View File

@ -1,118 +0,0 @@
.etiquette-background-image{
background-image: url('../../assets/ImageBlock-02_Option1_BnW.png');
background-repeat: no-repeat;
background-attachment: fixed;
width: 100%;
background-size: cover;
}
.etiquette-background-color{
background-color: #f5f3f1;
}
.etiquette-route-link:active{
color: #2c50da !important;
& .etiquette-route-icon {
color:#2c50da !important;
}
}
.fontcolor-ecru{
color: #F5F3F2 !important;
}
.fontcolor-bordeaux {
color: #C53C44 !important;
}
.etiquette-page-link{
color: #F5F3F2 !important;
& .etiquette-page-icon{
background-image: url('../../assets/white-arrow.png');
max-width:22px;
height:14px;
background-position: right center;
background-size:contain;
}
}
.etiquette-page-link:hover{
color: #CCB7FF!important;
& .etiquette-page-icon{
background-image: url('../../assets/hover-arrow.png');
max-width:22px;
height:14px;
background-position: right center;
background-size:contain;
}
}
.etiquette-page-bordeaux-link{
color:#C53C44 !important;
& .etiquette-page-icon{
background-image: url('../../assets/red-arrow.png');
max-width:22px;
height:14px;
background-position: right center;
background-size:contain;
}
}
.etiquette-page-bordeaux-link:hover{
color: #CCB7FF!important;
& .etiquette-page-icon{
background-image: url('../../assets/hover-arrow.png');
max-width:22px;
height:14px;
background-position: right center;
background-size:contain;
}
}
.etiquette-page-primary-link{
color: #2c50da !important;
& .etiquette-page-icon{
background-image: url('../../assets/blue-arrow.png');
max-width:22px;
height:14px;
background-position: right center;
background-size:contain;
}
}
.etiquette-page-primary-link:hover{
color: #CCB7FF!important;
& .etiquette-page-icon{
background-image: url('../../assets/hover-arrow.png');
max-width:22px;
height:14px;
background-position: right center;
background-size:contain;
}
}
.etiquette-page-row{
display: flex;
}
.etiquette-page-column{
display: block;
width: 33.33%;
}
.etiquette-page-col-6{
display: block;
width: 50%;
}
.etiquette-page-header-content-max-width-560{
max-width: 560px;
width:100%;
}
.etiquette-page-header-hero-min-height-800{
min-height: 800px;
}
.etiquette-page-header-left-block{
width: 100%;
display: block;
}
@media screen and (max-width: 600px) {
.etiquette-page-row{
display: block !important;
width: 100%;
}
.etiquette-page-column{
display: flex !important;
width: 100% !important;
}
.etiquette-page-col-6{
display: block !important;
width: 100% !important;
}
}

View File

@ -1,94 +0,0 @@
<template>
<div>
<!--<div v-html="etiquetteGuideContent.content" class="mx-auto history-section"></div>-->
<div v-if="pageContent.length">
<div v-html="getPageContent()"></div>
</div>
<PostScriptBlog />
<FooterComponent />
<!--end mobile view-->
</div>
</template>
<script>
const baseUrl = process.env.VUE_APP_BASE_URL;
import PostScriptBlog from "@/components/retailer/home/PostScriptBlog";
import FooterComponent from "@/components/layout/footer/FooterComponent";
import { goToCategoryPageRouting } from "@/services/util.service";
export default {
name: "EtiquetteGuide",
components: {
PostScriptBlog,
FooterComponent
},
computed: {
pageContent: function() {
return this.$store.state.layout.pageContent;
},
etiquetteGuideContent: function() {
return this.$store.state.block.one;
},
canonical: function() {
return this.$route.meta.canonical;
}
},
data: () => ({
image: require("@/assets/c4aa164d9b01387a88228c67620f7faf861b5544.png"),
blockId: "175",
}),
metaInfo() {
return {
link: [
{rel: 'canonical', href:`${this.canonical ? window.location.href.split('?')[0] : baseUrl }`}
]
}
},
methods: {
getPageContent() {
if (this.pageContent.length) {
let data = this.pageContent.filter(element => {
return element.identifier === "etiquette-guide-page";
});
if (data.length > 0) {
let path = data[0].content;
var div = document.createElement("div");
div.innerHTML = path;
let imgSrcUrls = div.getElementsByTagName("img");
for (let i = 0; i < imgSrcUrls.length; i++) {
let urlValue = imgSrcUrls[i].getAttribute("src");
if (urlValue) {
imgSrcUrls[i].setAttribute(
"src",
this.imageBasePathUrl() +
"/media/" +
imgSrcUrls[i].src
.replace(window.location.href, "")
.replace(window.location.origin, "")
.replace(/%22%7D%7D/g, "")
.replace(/%7B%7B/g, "")
.replace(/%20url=%22/g, "")
.replace("media", "")
);
}
}
return div.innerHTML;
}
}
},
imageBasePathUrl() {
return process.env.VUE_APP_IMAGE_CATEGORY_PATH_URL;
},
routeToPage(pageName) {
if (pageName == "CategoryPage") {
let vm = this;
goToCategoryPageRouting(vm, {n:"Stationery",id:10});
}
}
},
created() {
// this.$store.dispatch("block/fetchEtiquetteGuide", this.blockId);
}
};
</script>
<style src="./etiquette_guide.scss" lang="scss" />

View File

@ -1,34 +0,0 @@
<template>
<div>
<FaqComponent />
<FooterComponent />
</div>
</template>
<script>
const baseUrl = process.env.VUE_APP_BASE_URL;
import FaqComponent from "@/components/retailer/faq/FaqComponent";
import FooterComponent from "@/components/layout/footer/FooterComponent";
export default {
name: "FaqPage",
components: {
FaqComponent,
FooterComponent
},
data: () => ({
}),
computed:{
canonical: function() {
return this.$route.meta.canonical;
},
},
metaInfo() {
return {
link: [
{rel: 'canonical', href:`${this.canonical ? window.location.href.split('?')[0] : baseUrl }`}
]
}
},
};
</script>
<style src="./faq_page.scss" lang="scss" scoped />

View File

@ -1,10 +0,0 @@
.gift-card-line {
border: 0.0625rem solid #2850da !important;
width: 100%;
content: "";
display: block;
}
.gift-card-button:active{
background-color: #2850da !important;
color:#ffffff !important;
}

View File

@ -1,253 +0,0 @@
<template>
<v-container>
<v-row>
<v-col cols="12" sm="9" lg="6" class="fontcolor-black-light">
<v-form ref="form">
<v-alert type="error" text v-if="errorMessageFlag">{{errorMessage}}.</v-alert>
<p class="h2 pb-2 mb-1 body-font text-uppercase primary--text">Gift Card</p>
<div class="gift-card-line my-5"></div>
<v-col class="px-0" v-show="cardBalance">
<p v-show="giftCardCode" class="body-font">
Gift Card:
<b>{{giftCardCode}}</b>
</p>
<p v-show="giftCode" class="body-font">
Gift Card:
<b>{{giftCode}}</b>
</p>
<p class="body-font" v-if="giftCardBalance == 0">
Current Balance:
<b>$0.00</b>
</p>
<p class="body-font" v-else>
Current Balance:
<b>${{giftCardBalance}}</b>
</p>
</v-col>
<v-text-field
v-show="giftCardCode"
label="Enter gift card code"
ref="giftCode"
outlined
required
v-model="giftCardCode"
dense
:rules="giftCardCode?giftCodeRules:[]"
></v-text-field>
<v-text-field
v-show="!giftCardCode"
label="Enter gift card code"
ref="giftCode"
outlined
required
v-model="giftCode"
dense
:rules="!giftCardCode?giftCodeRules:[]"
></v-text-field>
<v-row>
<v-col cols="12">
<v-hover v-slot:default="{ hover }">
<router-link to="#" class="body ls-n009 text-decoration-none">
<v-btn
class="text-uppercase gift-card-button"
:outlined="hover"
:color="hover?'white':'primary'"
:class="hover?'primary--text':'white--text'"
depressed
:block="$vuetify.breakpoint.xsOnly"
tile
large
@click="redeemGiftCode()"
>REDEEM GIFT CARD</v-btn>
</router-link>
</v-hover>
<v-hover v-slot:default="{ hover }">
<router-link to="#" class="body ls-n009 text-decoration-none">
<v-btn
class="text-uppercase ml-sm-4 my-4 my-sm-0 gift-card-button"
:outlined="hover"
:color="hover?'white':'primary'"
:class="hover?'primary--text':'white--text'"
depressed
:block="$vuetify.breakpoint.xsOnly"
tile
large
@click="checkGiftCode()"
>CHECK BALANCE</v-btn>
</router-link>
</v-hover>
</v-col>
</v-row>
</v-form>
</v-col>
</v-row>
<SnackbarComponent :snackbar="snackbar"></SnackbarComponent>
</v-container>
</template>
<script>
import { loginInterrupt } from "@/services/nav";
import SnackbarComponent from "@/components/common/SnackbarComponent";
export default {
name: "GiftCardPage",
data: () => ({
errorMessageFlag: false,
errorMessage: "",
cardBalance: false,
giftCode: "",
giftCodeRules: [
v => !!v || "This field is required",
v => (v && v.length >= 3) || "This field must be at least 3 characters"
],
snackbar: {
show: false,
message: null,
color: null,
timeout: 0
}
}),
components: {
SnackbarComponent
},
computed: {
userAuth: function() {
return this.$store.state.auth.userAuth;
},
giftCardCode: function() {
return this.$route.params.giftCardCode;
},
giftCardBalance: function() {
return this.$store.state.storeCredit.giftCardBalance;
},
/*giftCardDetails: function() {
return this.$store.state.storeCredit.giftCardDetails;
}*/
basicInfo() {
return this.$store.state.accountOne.one;
}
},
methods: {
redeemGiftCode: function() {
if (this.$refs.form.validate()) {
if (this.giftCardCode) {
this.$store
.dispatch("storeCredit/redeemGiftCard", this.giftCardCode)
.then(() => {
this.cardBalance = false;
this.$refs.giftCode.reset();
if (this.basicInfo) {
this.$store.dispatch(
"storeCredit/fetchGiftCardCreditBalance",
this.basicInfo.id
);
}
this.snackbar = {
message: "Gift Card" + this.giftCardCode + "was redeemed.",
color: "success",
show: true,
timeout: 3000
};
})
.catch(error => {
this.cardBalance = false;
this.$refs.giftCode.reset();
this.snackbar = {
message: error.message,
color: "error",
show: true,
timeout: 3000
};
});
} else {
this.$store
.dispatch("storeCredit/redeemGiftCard", this.giftCode)
.then(() => {
this.cardBalance = false;
this.$refs.giftCode.reset();
if (this.basicInfo) {
this.$store.dispatch(
"storeCredit/fetchGiftCardCreditBalance",
this.basicInfo.id
);
}
this.snackbar = {
message: "Gift Card" + this.giftCode + "was redeemed.",
color: "success",
show: true,
timeout: 3000
};
})
.catch(error => {
this.cardBalance = false;
this.$refs.giftCode.reset();
this.snackbar = {
message: error.message,
color: "error",
show: true,
timeout: 3000
};
});
}
} else {
//(this.errorMessage = "We cannot redeem this gift card."),
this.errorMessageFlag = true;
setTimeout(() => {
this.errorMessageFlag = false;
}, 2000);
}
},
checkGiftCode: function() {
if (this.$refs.form.validate()) {
if (this.giftCardCode) {
this.$store
.dispatch("storeCredit/fetchGiftCardBalance", this.giftCardCode)
.then(() => {
this.cardBalance = true;
})
.catch(() => {
this.cardBalance = false;
this.snackbar = {
message: "Please enter a valid gift card code.",
color: "error",
show: true,
timeout: 3000
};
});
} else {
this.$store
.dispatch("storeCredit/fetchGiftCardBalance", this.giftCode)
.then(() => {
this.cardBalance = true;
})
.catch(() => {
this.cardBalance = false;
this.snackbar = {
message: "Please enter a valid gift card code.",
color: "error",
show: true,
timeout: 3000
};
});
}
} else {
//(this.errorMessage = "Please enter a valid gift card code."),
this.errorMessageFlag = true;
setTimeout(() => {
this.errorMessageFlag = false;
}, 2000);
}
}
},
async created() {
await this.$store.dispatch("accountOne/basicInfo");
//this.$store.dispatch("storeCredit/fetchGiftCardDetails");
if (!this.userAuth) {
loginInterrupt(
window.location.href,
"There was an access violation caused by your request. You need to sign back in please."
);
}
}
};
</script>
<style src="./gift_card_page.scss" lang="scss" scoped />

View File

@ -1,40 +0,0 @@
<template>
<div>
<GiftGuideComponent/>
<FooterComponent/>
</div>
</template>
<script>
const baseUrl = process.env.VUE_APP_BASE_URL;
import GiftGuideComponent from "@/components/retailer/gift-guide/GiftGuideComponent";
import FooterComponent from "@/components/layout/footer/FooterComponent";
export default {
name: "GiftGuide",
data: () => ({
}),
components: {
GiftGuideComponent,
FooterComponent
},
computed:{
canonical: function() {
return this.$route.meta.canonical;
},
},
metaInfo() {
return {
title: "Personalized Stationery | Crane Personalized Stationery Cards | Boxed Sets",
meta: [
{ name: 'title', content: "Personalized Stationery | Crane Personalized Stationery Cards | Boxed Sets"},
{ name: 'description', content: "Explore the personalized cards, invitations, and more quality stationery at Crane. Customize the stationery you need to share the special moments in your life."},
{ name: 'keywords', content: "stationery, personalized stationery, stationary, wedding invitations, wedding stationery, crane stationery, holiday invitations, crane, crane personalized stationery, stationary"},
{ name: 'robots', content: "INDEX,FOLLOW"}
],
link: [
{rel: 'canonical', href:`${this.canonical ? window.location.href.split('?')[0] : baseUrl }`}
]
}
},
};
</script>
<style src="./gift_guide.scss" lang="scss" scoped />

View File

@ -1,46 +0,0 @@
<template>
<div>
<HomeComponent/>
<FooterComponent/>
</div>
</template>
<script>
const baseUrl = process.env.VUE_APP_BASE_URL;
import HomeComponent from "@/components/retailer/home/HomeComponent";
import FooterComponent from "@/components/layout/footer/FooterComponent";
export default {
name: "HomePage",
data: () => ({
}),
components: {
HomeComponent,
FooterComponent
},
computed:{
canonical: function() {
return this.$route.meta.canonical;
},
},
metaInfo() {
return {
title: "Personalized Stationery | Crane Personalized Stationery Cards | Boxed Sets",
meta: [
{ name: 'title', content: "Personalized Stationery | Crane Personalized Stationery Cards | Boxed Sets"},
{ name: 'description', content: "Explore the personalized cards, invitations, and more quality stationery at Crane. Customize the stationery you need to share the special moments in your life."},
{ name: 'keywords', content: "stationery, personalized stationery, stationary, wedding invitations, wedding stationery, crane stationery, holiday invitations, crane, crane personalized stationery, stationary"},
{ name: 'robots', content: "INDEX,FOLLOW"}
],
link: [
{rel: 'canonical', href:`${this.canonical ? window.location.href.split('?')[0] : baseUrl }`}
]
}
},
created() {
window.criteo_q.push(
{ event: "setEmail", email: "" }, // Can be an empty string
{ event: "viewHome" }
);
}
};
</script>
<style src="./home_page.scss" lang="scss" scoped />

View File

@ -1,3 +0,0 @@
.landing-page-height{
height:100%;
}

View File

@ -1,58 +0,0 @@
<template>
<div class="d-flex flex-column landing-page-height">
<LandingComponent/>
<FooterComponent class="mt-auto"/>
</div>
</template>
<script>
const baseUrl = process.env.VUE_APP_BASE_URL;
import LandingComponent from "@/components/retailer/landing/LandingComponent";
import FooterComponent from "@/components/layout/footer/FooterComponent";
export default {
name: "LandingPage",
data: () => ({
}),
components: {
LandingComponent,
FooterComponent
},
computed:{
canonical: function() {
return this.$route.meta.canonical;
},
landingPageContent: function() {
return this.$store.state.layout.pageContent;
},
pageId: function(){
return this.$route.meta.pid
}
},
methods:{
pageData() {
if (this.landingPageContent.length) {
let data = this.landingPageContent.filter(element=>{
return element.id === this.pageId});
if(data.length > 0){
return data[0]
}
}
},
},
metaInfo() {
return {
title: `${this.landingPageContent && this.pageData() && this.pageData().title != undefined ?this.pageData().title:''}`,
meta: [
{ name: 'title', content: `${this.landingPageContent && this.pageData() && this.pageData().metaTitle != undefined?this.pageData().metaTitle:''}`},
{ name: 'description', content: `${this.landingPageContent && this.pageData() && this.pageData().metaDescription != undefined?this.pageData().metaDescription:''}`},
{ name: 'keywords', content: `${this.landingPageContent && this.pageData() && this.pageData().metaKeywords != undefined ? this.pageData().metaKeywords:''}`}
],
link: [
{rel: 'canonical', href:`${this.canonical ? window.location.href.split('?')[0] : baseUrl }`}
]
}
},
};
</script>
<style src="./landing_page.scss" lang="scss" scoped />

View File

@ -0,0 +1,23 @@
.careers-text-underline{
text-decoration: underline;
}
.careers-page-row{
display: flex;
}
.careers-page-column{
display: block;
width: auto;
}
.careers-page-img{
width: 100%;
}
@media screen and (max-width: 600px) {
.careers-page-row{
display: block !important;
width: 100%;
}
.careers-page-column{
display: flex !important;
width: 100% !important;
}
}

View File

@ -3,12 +3,11 @@
<v-container class="mt-12 mb-auto"> <v-container class="mt-12 mb-auto">
<h1 class="my-6 font-weight-medium">You are signed out</h1> <h1 class="my-6 font-weight-medium">You are signed out</h1>
<h3 class="font-weight-light">You have signed out and will go to our homepage in {{countDown}} seconds.</h3> <h3 class="font-weight-light">You have signed out and will go to our homepage in {{countDown}} seconds.</h3>
</v-container> </v-container>
<FooterComponent />
</div> </div>
</template> </template>
<script> <script>
import FooterComponent from "@/components/layout/footer/FooterComponent";
export default { export default {
name: "LogOutSuccess", name: "LogOutSuccess",
data() { data() {
@ -16,9 +15,7 @@ export default {
countDown:5 countDown:5
}; };
}, },
components: {
FooterComponent
},
watch: {}, watch: {},
computed: {}, computed: {},
methods: { methods: {
@ -43,4 +40,4 @@ export default {
} }
}; };
</script> </script>
<style src="./careers.scss" lang="scss" scopped/> <style src="./logout_success.scss" lang="scss" scopped/>

View File

@ -1,6 +0,0 @@
.news-letter-subscription-dashboard-line {
border: 0.0625rem solid #2850da !important;
width: 100%;
content: "";
display: block;
}

View File

@ -1,111 +0,0 @@
<template>
<v-container>
<v-row v-if="one.extensionAttributes">
<v-col cols="12" class="fontcolor-black-light">
<p class="h2 body-font text-uppercase primary--text">Newsletter Subscription</p>
<v-row>
<v-col cols="12">
<p class="h4 body-font text-uppercase primary--text">Subscription option</p>
<div class="news-letter-subscription-dashboard-line my-5"></div>
<v-checkbox class="pt-5" label="General Subscription" v-model="isSubscribed"></v-checkbox>
</v-col>
<v-col cols="2">
<v-hover v-slot:default="{ hover }">
<v-btn
:disabled="inProgress"
class="text-uppercase ma-2"
:outlined="hover"
:color="hover?'white':'success'"
:class="hover?'success--text':'white--text'"
tile
large
depressed
@click="saveSubscription"
>
<v-progress-circular :size="20" color="success" indeterminate v-if="inProgress"></v-progress-circular>SAVE SUBSCRIPTION
</v-btn>
</v-hover>
</v-col>
</v-row>
</v-col>
</v-row>
<SnackbarComponent :snackbar="snackbar"></SnackbarComponent>
</v-container>
</template>
<script>
import { loginInterrupt } from "@/services/nav";
import { createHelpers } from "vuex-map-fields";
import SnackbarComponent from "@/components/common/SnackbarComponent";
const { mapFields } = createHelpers({
getterType: "accountOne/getField",
mutationType: "accountOne/updateField"
});
export default {
name: "NewsLetterSubscription",
components: { SnackbarComponent },
data: () => ({
//email: false,
snackbar: {
show: false,
message: null,
color: null,
timeout: 0
}
}),
computed: {
basicInfo() {
return this.$store.state.accountOne.one;
},
...mapFields(["one", "one.extensionAttributes.isSubscribed", "inProgress"]),
userAuth: function() {
return this.$store.state.auth.userAuth;
}
},
methods: {
saveSubscription() {
this.$store
.dispatch("accountOne/updateSubscription")
.then(() => {
this.snackbar = {
message: "Updated News Subscription Successfully",
color: "success",
show: true,
timeout: 3000
};
setTimeout(() => {
this.$router.push({
name: "AccountDashboard"
});
}, 3000);
}).catch(error => {
this.snackbar = {
message: error.message,
color: "error",
show: true,
timeout: 3000
};
setTimeout(() => {
this.$router.push({
name: "AccountDashboard"
});
}, 3000);
});
}
},
created() {
if (!this.userAuth) {
loginInterrupt(
window.location.href,
"There was an access violation caused by your request. You need to sign back in please."
);
}
if(!this.one.extensionAttributes)
{
this.$store.dispatch("accountOne/basicInfo");
}
}
};
</script>
<style src="./news_letter_subscription.scss" lang="scss" scoped />

View File

@ -1,109 +0,0 @@
<template>
<div>
<!--<div v-html="etiquetteGuideContent.content" class="mx-auto history-section"></div>-->
<div v-if="pageContent.length">
<div v-html="getPageContent()"></div>
</div>
<PostScriptBlog />
<FooterComponent />
<!--end mobile view-->
</div>
</template>
<script>
const baseUrl = process.env.VUE_APP_BASE_URL;
import PostScriptBlog from "@/components/retailer/home/PostScriptBlog";
import FooterComponent from "@/components/layout/footer/FooterComponent";
import { goToCategoryPage } from "@/services/util.service";
export default {
name: "OurPapers",
components: {
PostScriptBlog,
FooterComponent
},
computed: {
pageContent: function() {
return this.$store.state.layout.pageContent;
},
etiquetteGuideContent: function() {
return this.$store.state.block.one;
},
canonical: function() {
return this.$route.meta.canonical;
}
},
data: () => ({
image: require("@/assets/c4aa164d9b01387a88228c67620f7faf861b5544.png"),
blockId: "175",
}),
metaInfo() {
return {
link: [
{rel: 'canonical', href:`${this.canonical ? window.location.href.split('?')[0] : baseUrl }`}
]
}
},
methods: {
getPageContent() {
if (this.pageContent.length) {
let data = this.pageContent.filter(element => {
return element.identifier === "our-papers-page";
});
if (data.length > 0) {
let path = data[0].content;
var div = document.createElement("div");
div.innerHTML = path;
let imgSrcUrls = div.getElementsByTagName("img");
for (let i = 0; i < imgSrcUrls.length; i++) {
let urlValue = imgSrcUrls[i].getAttribute("src");
if (urlValue) {
imgSrcUrls[i].setAttribute(
"src",
this.imageBasePathUrl() +
"/media/" +
imgSrcUrls[i].src
.replace(window.location.href, "")
.replace(window.location.origin, "")
.replace(/%22%7D%7D/g, "")
.replace(/%7B%7B/g, "")
.replace(/%20url=%22/g, "")
.replace("media", "")
);
}
}
return div.innerHTML;
}
}
},
imageBasePathUrl() {
return process.env.VUE_APP_IMAGE_CATEGORY_PATH_URL;
},
routeToPage(pageName) {
/* setTimeout(() => {
this.$router.push({
name: pageName,
params: {}
});
}, 50);
}*/
if (pageName == "CategoryPage") {
let vm = this;
goToCategoryPage(vm, "stationery", null, null, 10);
}
},
initialLink() {
return process.env.VUE_APP_HOME_PAGE_URL;
},
goToPage(pageLink) {
window.location.replace(this.initialLink()+pageLink);
//} else {
//window.open(routeSecond, "_self");
//}
},
},
created() {
// this.$store.dispatch("block/fetchEtiquetteGuide", this.blockId);
}
};
</script>
<style src="./our_papers.scss" lang="scss"/>

View File

@ -1,108 +0,0 @@
<template>
<div>
<v-card min-height="650" class="d-flex align-center justify-center" flat>
<v-card-text class="pb-0 mb-0 px-0 text-center">
<v-hover v-slot:default="{ hover }">
<v-btn
large
:outlined="hover"
:color="hover ? 'white' : 'primary'"
:class="hover ? 'primary--text' : 'white--text'"
class="text-uppercase ls-0 body productpage-button"
tile
depressed
@click="checkAllEvents()"
>
<span>Purchase</span>
</v-btn>
</v-hover>
<!-- <v-row class="d-flex justify-center" v-if="!userAuth">
<v-col cols="4">
<v-alert class="word-break" type="info"
>Kindly you need to sign in !</v-alert
>
</v-col>
</v-row> -->
</v-card-text>
</v-card>
<!-- <PostScriptBlog /> -->
<FooterComponent />
</div>
</template>
<script>
/* eslint-disable */
const baseUrl = process.env.VUE_APP_BASE_URL;
//import PostScriptBlog from "@/components/retailer/home/PostScriptBlog";
import FooterComponent from "@/components/layout/footer/FooterComponent";
import { goToCategoryPage, googleAanalyticsEventPDP, googleAanalyticsPurchase, googleAanalyticsCheckout, googleAanalytics } from "@/services/util.service";
import { productDetails, cartPurchased, addToCartItems, beginCheckoutParams } from "@/services/staticProductInfo";
import humps from 'lodash-humps';
export default {
name: "playground",
components: {
// PostScriptBlog,
FooterComponent,
},
computed: {
canonical: function () {
return this.$route.meta.canonical;
},
userAuth: function () {
return this.$store.state.auth.userAuth;
},
},
data: () => ({
checkoutOptionParams: {
checkout_step: 1,
checkout_option: "shipping method",
},
}),
metaInfo() {
return {
link: [
{
rel: "canonical",
href: `${
this.canonical ? window.location.href.split("?")[0] : baseUrl
}`,
},
],
};
},
methods: {
routeToPage(pageName) {
if (pageName == "CategoryPage") {
let vm = this;
goToCategoryPage(vm, "stationery", null, null, 10);
}
},
initialLink() {
return process.env.VUE_APP_HOME_PAGE_URL;
},
goToPage(pageLink) {
window.location.replace(this.initialLink() + pageLink);
},
async checkAllEvents() {
// await googleAanalyticsEventPDP(humps(productDetails), "view_item", "10");
// await googleAanalytics('',humps(addToCartItems),humps(productDetails),25, "add_to_cart", "ENGRAVED MAGNOLIA BLOSSOM NOTE");
// await googleAanalyticsCheckout("begin_checkout", {items:[ beginCheckoutParams]});
// await googleAanalyticsCheckout("set_checkout_option", this.checkoutOptionParams);
// await googleAanalyticsCheckout("checkout_progress", {items:[ beginCheckoutParams]});
await googleAanalyticsPurchase(humps(cartPurchased), new Date().getTime());
// window.dataLayer = window.dataLayer || [];
// window.dataLayer.push({
// 'event': "addToCart",
// 'eventCategory': "Product Page",
// 'eventLabel':"test"
// })
},
},
created() {
},
};
</script>
<style src="./our_papers.scss" lang="scss" scoped />

View File

@ -1,106 +0,0 @@
.printingprocesses-background-image{
background-image: url('../../assets/CraneStationary-062_BnW.png');
background-repeat: no-repeat;
background-attachment: fixed;
width: 100%;
background-size: cover;
}
.printingprocesses-bancground-color{
background-color:#ffe8e8;
}
.printingprocesses-page-link{
color: #fff !important;
& .printingprocesses-page-icon{
background-image: url('../../assets/white-arrow.png');
max-width:22px;
height:14px;
background-position: right center;
background-size:contain;
}
}
.printingprocesses-page-link:hover{
color: #CCB7FF!important;
& .printingprocesses-page-icon{
background-image: url('../../assets/hover-arrow.png');
max-width:22px;
height:14px;
background-position: right center;
background-size:contain;
}
}
.printingprocesses-page-strongblue-link{
color: #2d5d84 !important;
& .printingprocesses-page-icon{
background-image: url('../../assets/strong-blue-arrow.png');
max-width:22px;
height:14px;
background-position: right center;
background-size:contain;
}
}
.printingprocesses-page-strongblue-link:hover{
color: #CCB7FF!important;
& .printingprocesses-page-icon{
background-image: url('../../assets/hover-arrow.png');
max-width:22px;
height:14px;
background-position: right center;
background-size:contain;
}
}
.printingprocesses-page-primary-link{
color: #2c50da !important;
& .printingprocesses-page-icon{
background-image: url('../../assets/blue-arrow.png');
max-width:22px;
height:14px;
background-position: right center;
background-size:contain;
}
}
.printingprocesses-page-primary-link:hover{
color: #CCB7FF!important;
& .printingprocesses-page-icon{
background-image: url('../../assets/hover-arrow.png');
max-width:22px;
height:14px;
background-position: right center;
background-size:contain;
}
}
.printing-processes-page-row{
display: flex;
}
.printing-processes-page-column{
display: block;
width: 33.33%;
}
.printing-processes-page-col-6{
display: block;
width: 50%;
}
.printing-processes-page-header-content-max-width-560{
max-width: 560px;
width:100%;
}
.printing-processes-page-header-hero-min-height-800{
min-height: 800px;
}
.printing-processes-page-header-left-block{
width: 100%;
display: block;
}
@media screen and (max-width: 600px) {
.printing-processes-page-row{
display: block !important;
width: 100%;
}
.printing-processes-page-column{
display: flex !important;
width: 100% !important;
}
.printing-processes-page-col-6{
display: block !important;
width: 100% !important;
}
}

View File

@ -1,110 +0,0 @@
<template>
<div>
<!--<div v-html="etiquetteGuideContent.content" class="mx-auto history-section"></div>-->
<div v-if="pageContent.length">
<div v-html="getPageContent()"></div>
</div>
<PostScriptBlog />
<FooterComponent />
<!--end mobile view-->
</div>
</template>
<script>
const baseUrl = process.env.VUE_APP_BASE_URL;
import PostScriptBlog from "@/components/retailer/home/PostScriptBlog";
import FooterComponent from "@/components/layout/footer/FooterComponent";
//import { goToCategoryPageRouting } from "@/services/util.service";
export default {
name: "PrintingProcesses",
components: {
PostScriptBlog,
FooterComponent
},
computed: {
pageContent: function() {
return this.$store.state.layout.pageContent;
},
etiquetteGuideContent: function() {
return this.$store.state.block.one;
},
canonical: function() {
return this.$route.meta.canonical;
}
},
data: () => ({
image: require("@/assets/c4aa164d9b01387a88228c67620f7faf861b5544.png"),
blockId: "175"
}),
metaInfo() {
return {
link: [
{rel: 'canonical', href:`${this.canonical ? window.location.href.split('?')[0] : baseUrl }`}
]
}
},
methods: {
getPageContent() {
if (this.pageContent.length) {
let data = this.pageContent.filter(element => {
return element.identifier === "printing-processes-page";
});
if (data.length > 0) {
let path = data[0].content;
var div = document.createElement("div");
div.innerHTML = path;
let imgSrcUrls = div.getElementsByTagName("img");
for (let i = 0; i < imgSrcUrls.length; i++) {
let urlValue = imgSrcUrls[i].getAttribute("src");
if (urlValue) {
imgSrcUrls[i].setAttribute(
"src",
this.imageBasePathUrl() +
"/media/" +
imgSrcUrls[i].src
.replace(window.location.href, "")
.replace(window.location.origin, "")
.replace(/%22%7D%7D/g, "")
.replace(/%7B%7B/g, "")
.replace(/%20url=%22/g, "")
.replace("media", "")
);
}
}
return div.innerHTML;
}
}
},
imageBasePathUrl() {
return process.env.VUE_APP_IMAGE_CATEGORY_PATH_URL;
},
routeToPage(pageLink) {
/* setTimeout(() => {
this.$router.push({
name: pageName,
params: {}
});
}, 50);
}*/
window.open(pageLink, '_blank');
/*if (pageName == "CategoryPage") {
let vm = this;
goToCategoryPageRouting(vm, {n:"Stationery",id:10});
}*/
},
initialLink() {
return process.env.VUE_APP_HOME_PAGE_URL;
},
goToPage(pageLink) {
window.location.replace(this.initialLink()+pageLink);
//} else {
//window.open(routeSecond, "_self");
//}
},
},
created() {
// this.$store.dispatch("block/fetchEtiquetteGuide", this.blockId);
}
};
</script>
<style src="./printing_processes.scss" lang="scss"/>

View File

@ -1,106 +0,0 @@
<template>
<div class="white">
<v-container class="my-10" ref="divOne">
<h1 class="font-weight-medium">Privacy & Security</h1>
<h3 class="font-weight-medium my-6">Notice Of Updated Policy</h3>
<p
class="fontcolor-black-light"
>We have updated our privacy policy, effective September 30, 2015, to provide more details about our information privacy practices. Specifically, the updates concern how your personal information may be shared if required by law, or if Crane & Co., Inc. sells all or part of its business, including Crane.com or Crane Stationery, as well as our policies regarding links to other websites, and use of our site by children and non-U.S. users.</p>
<h3 class="font-weight-medium my-6">Privacy And Security</h3>
<p
class="my-6 fontcolor-black-light"
>Thank you for visiting Crane.com. Your privacy is important to us and we are committed to the proper use and protection of your personal information. This policy explains our online information practices and the choices you can make about the way your information is collected and used on our site. It also demonstrates our firm commitment to security and privacy. The following discloses our information gathering and dissemination practices for Crane.com.</p>
<h3 class="font-weight-medium my-6">The Information We Collect</h3>
<p
class="my-6 fontcolor-black-light"
>Crane.com may collect personal information that you provide to us for the purposes of facilitating transactions, account registration and to support your customer relationship with Crane.com. This information may include name, payment information, billing and shipping addresses, email, phone number and various customer preferences. Personally identifiable information is collected when you place an order, set up an account or subscribe to the Crane.com email newsletter. We may also collect personal information about you from other third parties, such as demographic firms, to make our future marketing efforts more efficient. We will not trade, rent, or sell your personal information, without your prior consent, except as otherwise set forth in this policy.</p>
<h3 class="font-weight-medium my-6">How We Use The Information</h3>
<p
class="my-6 fontcolor-black-light"
>We use the personal information that we collect for internal purposes to conduct our business and to ensure you are provided with the highest level of service possible. We use the information to meet your requests and to tell you about other products and services offered by Crane.com. Service providers and third parties who perform services on our behalf, are contractually restricted from using your information in any manner other than in helping us provide you with the products available from Crane.com. If Crane & Co., Inc. sells all or part of its business, or makes a sale or transfer of assets, or is otherwise involved in a merger or business transfer, or in the unlikely event of bankruptcy, we may transfer your information to one or more third parties as part of that transaction. We may also disclose your personal information when you ask us to do so or when it is required by law. For example, we may disclose your personal information to law enforcement officers, courts, government agencies, other companies, lawyers or agents, pursuant to warrants, criminal or civil subpoenas or other government or court orders. We may also publicly display personal information that you post in online blogs, bulletin boards, chat rooms, news groups and other public forums.</p>
<h3 class="font-weight-medium my-6">Cookies And Web Beacons</h3>
<p
class="my-6 fontcolor-black-light"
>A cookie is a small data file generated by our website that is stored on your computer. It makes it easier for you to use our site by keeping track of your Shopper ID so that you can retrieve your shopping basket on a return visit. The use of cookies is a preference that can be enabled and disabled on your web browser. Cookies, by themselves, do not tell us your email address or other personally identifiable information unless you choose to provide this information to us by, for example, registering for an account on our site. We use cookies and web beacons to enhance your experience with our site. They distinguish you from other visitors, track your IP address and usage of our site, and identify the name of the website from which you linked to Crane.com. We also use cookies to understand site usage and to facilitate the ordering process for many of our products and services. We may use cookies to personalize your experience at Crane.com, such as recognizing you by name when you return, saving your password in password-protected areas and enabling you to use shopping carts on the site.</p>
<h3 class="font-weight-medium my-6">Links To Other Sites</h3>
<p
class="my-6 fontcolor-black-light"
>You may encounter links to third party websites when using this site. These links may have been placed on the site by Crane.com, by an advertiser, through the use of a third party application, or by some other manner. We make no guarantees regarding the content, reliability, correctness or safety of any third party website accessed through links appearing on this site. We do not control the content of these sites and do not supervise links posted by users, advertisers or third party applications. These sites may have different privacy policies or no privacy policy. If you access any of these links, you do so at your own risk.</p>
<h3 class="font-weight-medium my-6">Email Newsletter And Promotional Emails</h3>
<p
class="my-6 fontcolor-black-light"
>Transactional emails, those containing order confirmation information or shipping details which facilitate an agreed-upon transaction, will be sent at the completion of each purchase. You cannot opt out of receiving these emails. Due to their transactional nature, these emails are exempt from most provisions of the CAN-SPAM Act. One may unsubscribe from promotional emails at any time. Those with accounts on Crane.com may do so by editing account preferences to indicate that you do not wish to receive emails of this nature. Those who do not have accounts may do so by visiting the email subscription page and entering the email address which you wish to opt out of future mailings. Alternatively, there is an unsubscribe link at the bottom of every promotional email in accordance with the CAN-SPAM Act.</p>
<h3 class="font-weight-medium my-6">Your Choices</h3>
<p
class="my-6 fontcolor-black-light"
>You have the ability to set your information sharing preferences and you can change how we communicate with you. You can stop receiving promotional emails from us and you can update the contact information you provide. By using this site, you hereby agree to the terms and conditions of this privacy policy. If you do not agree to this policy, please notify us as described below, and do not continue to use this site. We reserve the right, at our discretion, to change, modify, add, or remove elements of this policy at any time. Please review this page periodically for any changes. Your continued use of this site following the posting of any changes to this policy shall mean that you have accepted any such changes. To let us know that you do not agree to this policy and wish to have your personal information purged from our systems, please notify us by calling 1.800.268.2281, emailing customerservice@crane.com, or writing to Crane & Co., Inc. Privacy, 1466 Curran Highway, North Adams, MA 01247.</p>
<h3 class="font-weight-medium my-6">Our Commitment To Security</h3>
<p
class="my-6 fontcolor-black-light"
>We maintain physical, electronic and procedural safeguards to protect the confidentiality and security of personal information transmitted to us through Crane.com. To guard your information, our website uses Secure Sockets Layer (SSL). SSL encrypts your credit card number, name and address so only Crane.com is able to decode your information. We also use the secure protocol HTTPs and we use GoDaddy for our certificates. However, we cannot guarantee that third parties will not overcome any security measures and gain access to your information for unauthorized purposes. By using this site, you accept the risk that compromise of and unauthorized access to your information is possible.</p>
<h3 class="font-weight-medium my-6">Children Under Age 13</h3>
<p
class="my-6 fontcolor-black-light"
>Crane.com is not intended for use by children under 13 years of age, and we do not intentionally or knowingly collect personal information from anyone under 13. No one under the age of 13 is allowed to transmit personal information via this site. Crane.com recommends that anyone between the ages of 13 and 18 get permission from his or her parents or guardians before transmitting any personal information to or through this site.</p>
<h3 class="font-weight-medium my-6">Notice To Non-U.S. Users</h3>
<p
class="my-6 fontcolor-black-light"
>If you are a non-U.S. visitor to our site, by visiting our site and providing us with data, you acknowledge and agree that your personal information is subject to the terms of this privacy policy. In addition, such data may be stored on servers located in the United States, which may have less stringent privacy practices than those your own resident jurisdiction. By providing us with your data, you consent to transfer of such data.</p>
<h3 class="font-weight-medium my-6">Future Policy Changes</h3>
<p
class="my-6 fontcolor-black-light"
>If we decide to change our privacy policy in whole or in part in the future, we will inform you by posting a notice on our website. Any changes to this policy will go into effect on the date posted in the notice.</p>
</v-container>
<FooterComponent />
</div>
</template>
<script>
const baseUrl = process.env.VUE_APP_BASE_URL;
import * as easings from "vuetify/es5/services/goto/easing-patterns";
import FooterComponent from "@/components/layout/footer/FooterComponent";
/* eslint-disable */
export default {
name: "PrivacyPolicy",
data() {
return {
easings: Object.keys(easings)
};
},
components: {
FooterComponent
},
watch: {},
computed: {
canonical: function() {
return this.$route.meta.canonical;
}
},
metaInfo() {
return {
link: [
{rel: 'canonical', href:`${this.canonical ? window.location.href.split('?')[0] : baseUrl }`}
]
}
},
methods: {
pageScrollUp() {
this.$vuetify.goTo(this.$refs.divOne, {
duration: 300,
easing: "easeInOutCubic"
});
}
},
mounted() {
this.pageScrollUp();
},
created() {}
};
</script>

View File

@ -1,74 +0,0 @@
<template>
<div>
<div v-html="getReturnPolicyContent()"></div>
<FooterComponent/>
</div>
</template>
<script>
const baseUrl = process.env.VUE_APP_BASE_URL;
import FooterComponent from "@/components/layout/footer/FooterComponent";
/* eslint-disable */
export default {
name: "ReturnPolicy",
data() {
return {
map: require("@/assets/shipment-transit-map-us.png"),
};
},
components: {
FooterComponent
},
watch: {},
computed: {
canonical: function() {
return this.$route.meta.canonical;
},
returnPolicyContent: function() {
return this.$store.state.layout.cmsBlockContent;
}
},
metaInfo() {
return {
link: [
{rel: 'canonical', href:`${this.canonical ? window.location.href.split('?')[0] : baseUrl }`}
]
}
},
methods: {
getReturnPolicyContent(){
if (this.returnPolicyContent.length) {
let data = this.returnPolicyContent.filter(element => {
return element.identifier === "return-policy";
});
if(data.length > 0){
let path = data[0].content;
var div = document.createElement("div");
div.innerHTML = path;
let imgSrcUrls = div.getElementsByTagName("img");
for (let i = 0; i < imgSrcUrls.length; i++) {
let urlValue = imgSrcUrls[i].getAttribute("src");
if (urlValue) {
imgSrcUrls[i].setAttribute(
"src",
this.imageBasePathUrl() +
"/media/" +
imgSrcUrls[i].src
.replace(window.location.href, "")
.replace(window.location.origin, "")
.replace(/%22%7D%7D/g, "")
.replace(/%7B%7B/g, "")
.replace(/%20url=%22/g, "")
.replace("media", "")
);
}
}
return div.innerHTML;
}
}
},
},
mounted() {},
created() {}
};
</script>

View File

@ -1,6 +0,0 @@
.saveforlater-dashboard-line {
border: 0.0625rem solid #2850da !important;
width: 100%;
content: "";
display: block;
}

View File

@ -1,52 +0,0 @@
<template>
<v-container>
<v-row>
<v-col cols="12" class="fontcolor-black-light">
<p class="h2 body-font text-uppercase primary--text pb-2">My Wishlist</p>
<div class="saveforlater-dashboard-line my-5"></div>
<!-- <v-alert
type="error"
color="deep-orange lighten-3"
class="white--text mt-5"
>You have no saved items..</v-alert>-->
<v-row>
<v-col cols="12" sm="6" class="ml-n6">
<!---<CartProductList :hideAndShowFields="hideAndShowFields" />-->
</v-col>
</v-row>
</v-col>
</v-row>
</v-container>
</template>
<script>
import { loginInterrupt } from '@/services/nav';
//import CartProductList from "@/components/retailer/cart-product/CartProductList";
export default {
name: "SaveForLater",
data: () => ({
errorMessage: false
}),
components: {
//CartProductList
},
computed: {
hideAndShowFields: function() {
let currentName = this.$router.history.current.name;
if (currentName === "SaveForLater") {
return false;
} else {
return false;
}
},
userAuth: function() {
return this.$store.state.auth.userAuth;
},
},
created(){
if (!this.userAuth) {
loginInterrupt(window.location.href, 'There was an access violation caused by your request. You need to sign back in please.')
}
}
};
</script>
<style src="./save_for_later.scss" lang="scss" scoped />

View File

@ -1,135 +0,0 @@
.theme--light.v-data-table tbody tr:not(:last-child) td:not(.v-data-table__mobile-row), .theme--light.v-data-table tbody tr:not(:last-child) th:not(.v-data-table__mobile-row) {
border-bottom: thin solid #2850da;
}
.shipping-delivery-table table{
//border-collapse: collapse;
}
.shipping-delivery-table{
border:thin solid #2850da;
border-right:none;
border-radius: 0px;
}
.shipping-delivery-table td{
border-right:thin solid #2850da;
width:30%;
font-size: 14px;
font-family: 'Whyte-Regular', sans-serif;
letter-spacing: -0.14px;
}
.shipping-delivery-mobile-table table{
//border-collapse: collapse;
}
.shipping-delivery-mobile-table{
border:thin solid #2850da;
border-right:none;
border-radius: 0px;
}
.shipping-delivery-mobile-table td{
border-right:thin solid #2850da;
width:50%;
font-size: 14px;
font-family: 'Whyte-Regular', sans-serif;
letter-spacing: -0.14px;
}
.shipping-delivery-button{
font-size: 16px;
font-family: 'Whyte-Regular', sans-serif;
line-height: 19px;
letter-spacing: -0.16px;
}
.shipping-delivery-button.theme--dark.v-btn:hover:before {
opacity:0 !important;
}
.shipping-delivery-button{
width: -webkit-fill-available;
}
.shipping-delivery-table-menu{
max-width:180px;
height: 315px;
}
.shipping-delivery-days-list .v-list-item.theme--light{
min-height:30px !important;
max-width:130px;
white-space: normal !important;
}
.shipping-delivery-square{
background-color:#2850da;
color:#2850da;
width:35px;
height:35px;
}
.shipping-delivery-days-button{
max-width:130px;
border:thin solid #2850da;
}
.shipping-delivery-days-button-mobileview{
max-width:120px;
border:thin solid #2850da;
}
.fontcolor-mauve-CCB7FF{
color: #CCB7FF !important;
}
.shipping-delivery-day-two{
opacity: 0.8 !important;
}
.shipping-delivery-day-three{
opacity: 0.6 !important;
}
.shipping-delivery-day-four{
opacity: 0.4 !important;
}
.shipping-delivery-day-five{
opacity: 0.2 !important;
}
.shipping-delivery-day-six{
opacity: 0!important;
}
.shipping-delivery-right-border{
border-right:thin solid #2850da;
}
.shipping-delivery-day-six-inside{
background-color:#ffffff;
width:35px;
height:35px;
border-right:thin solid #2850da;
border-bottom:thin solid #2850da;
}
.shipping-delivery-right-mauve-icon{
background-image: url('../../assets/right-hover-arrow.png');
max-width:22px;
height:24px;
}
.shipping-delivery-right-hover-icon{
background-image: url('../../assets/right-arrow-white.png');
max-width:22px;
height:24px;
}
.shipping-delivery-route-link:active .shipping-delivery-right-hover-icon{
background-image: url('../../assets/right-arrow.png');
max-width:22px;
height:24px;
}
.shipping-delivery-right-white-icon{
background-image: url('../../assets/right-arrow-white.png');
max-width:22px;
height:24px;
}
.shipping-delivery-right-icon{
background-image: url('../../assets/right-arrow.png');
max-width:22px;
height:24px;
}
.shipping-delivery-heading{
font-family: 'Whyte-Regular', sans-serif;
font-size: 28px;
letter-spacing: -0.28px;
line-height: 32px;
}
@media screen and (max-width: 320px) {
.shipping-delivery-days-button-mobileview{
max-width:100px;
border:thin solid #2850da;
}
}

View File

@ -1,56 +0,0 @@
<template>
<div>
<ShippingAndDeliveryComponent></ShippingAndDeliveryComponent>
<!--<div v-html="etiquetteGuideContent.content" class="mx-auto history-section"></div>-->
<PostScriptBlog />
<FooterComponent />
<!--end mobile view-->
</div>
</template>
<script>
const baseUrl = process.env.VUE_APP_BASE_URL;
import ShippingAndDeliveryComponent from "@/components/retailer/shipping-delivery/ShippingAndDeliveryComponent";
import PostScriptBlog from "@/components/retailer/home/PostScriptBlog";
import FooterComponent from "@/components/layout/footer/FooterComponent";
import { goToCategoryPageRouting } from "@/services/util.service";
export default {
name: "ShippingDeliveryCmsPage",
components: {
ShippingAndDeliveryComponent,
PostScriptBlog,
FooterComponent,
},
computed: {
canonical: function () {
return this.$route.meta.canonical;
},
},
data: () => ({}),
metaInfo() {
return {
link: [
{
rel: "canonical",
href: `${
this.canonical ? window.location.href.split("?")[0] : baseUrl
}`,
},
],
};
},
methods: {
routeToPage(pageName) {
if (pageName == "CategoryPage") {
let vm = this;
goToCategoryPageRouting(vm, { n: "Stationery", id: 10 });
}
},
},
created() {
// this.$store.dispatch("block/fetchEtiquetteGuide", this.blockId);
},
};
</script>

File diff suppressed because it is too large Load Diff

View File

@ -1,242 +0,0 @@
<template>
<v-container>
<v-row>
<v-col cols="12">
<p class="mt-1 h3 regular-font">Crane Module</p>
<hr class="mb-4" />
<div>
Home Page
<span class="ml-4">
<router-link class="text-decoration-none" to="/" target="_blank">/</router-link>
</span>
</div>
<div class="mt-4">
Category Page
<span class="ml-4">
<router-link
class="text-decoration-none"
:to="{name:'CategoryPage'}"
target="_blank"
>/category-page</router-link>
</span>
</div>
<div class="mt-4">
Product Details Page
<span class="ml-4">
<router-link
class="text-decoration-none"
:to="{name:'ProductPage',params:{sku:'24-MB01'}}"
target="_blank"
>/product-details</router-link>
</span>
</div>
<div class="mt-4">
Builder Designer Mode Page
<span class="ml-4">
<a href="https://personalize-daily.crane.com/personalize/designer">
designer mode
</a>
</span>
</div>
<div class="mt-4">
faq Page
<span class="ml-4">
<router-link class="text-decoration-none" :to="{name:'FaqPage'}" target="_blank">/faq-page</router-link>
</span>
</div>
<div class="mt-4">
Checkout Page
<span class="ml-4">
<router-link class="text-decoration-none" :to="{name:'CheckoutPage'}" target="_blank">/checkout</router-link>
</span>
</div>
<div class="mt-4">
About Us
<span class="ml-4">
<router-link
class="text-decoration-none"
:to="{name:'AboutUs'}"
target="_blank"
>/about-us</router-link>
</span>
</div>
<div class="mt-4">
Etiquette Guide
<span class="ml-4">
<router-link
class="text-decoration-none"
:to="{name:'EtiquetteGuide'}"
target="_blank"
>/etiquette-guide</router-link>
</span>
</div>
<div class="mt-4">
Printing Processes
<span class="ml-4">
<router-link
class="text-decoration-none"
:to="{name:'PrintingProcesses'}"
target="_blank"
>/printing-processes</router-link>
</span>
</div>
<div class="mt-4">
Our Papers
<span class="ml-4">
<router-link
class="text-decoration-none"
:to="{name:'OurPapers'}"
target="_blank"
>/our-papers</router-link>
</span>
</div>
<div class="mt-4">
Accessibility
<span class="ml-4">
<router-link
class="text-decoration-none"
:to="{name:'Accessibility'}"
target="_blank"
>/accessibility</router-link>
</span>
</div>
<p class="mt-6 h3 regular-font">Gate Module</p>
<hr class="mb-4" />
<div class="mt-4">
Sign In
<span class="ml-4">
<router-link class="text-decoration-none" to="/gate/sign-in" target="_blank">/sign-in</router-link>
</span>
</div>
<div class="mt-4">
Sign Up
<span class="ml-4">
<router-link class="text-decoration-none" to="/gate/sign-up" target="_blank">/sign-up</router-link>
</span>
</div>
<div class="mt-4">
Forgot Password
<span class="ml-4">
<router-link
class="text-decoration-none"
to="/gate/forgot-password"
target="_blank"
>/forgot-password</router-link>
</span>
</div>
<div class="mt-4">
Reset Password
<span class="ml-4">
<router-link
class="text-decoration-none"
to="/gate/reset-password/554/fegreger271817/"
target="_blank"
>/reset-password/:userId/:token</router-link>
</span>
</div>
<p class="mt-6 h3 regular-font">Me Module</p>
<hr class="mb-4" />
<div class="mt-4">
Account Dashboard Page
<span class="ml-4">
<router-link
class="text-decoration-none"
to="/retailer/account-dashboard"
target="_blank"
>/account-dashboard</router-link>
</span>
</div>
<div class="mt-4">
Edit Account Information Page
<span class="ml-4">
<router-link
class="text-decoration-none"
to="/retailer/edit-account-info/false"
target="_blank"
>/edit-account-info</router-link>
</span>
</div>
<div class="mt-4">
Store Credit Page
<span class="ml-4">
<router-link
class="text-decoration-none"
to="/retailer/store-credit-info"
target="_blank"
>/store-credit-info</router-link>
</span>
</div>
<div class="mt-4">
Gift card Page
<span class="ml-4">
<router-link
class="text-decoration-none"
to="/retailer/gift-card-page"
target="_blank"
>/gift-card-page</router-link>
</span>
</div>
<div class="mt-4">
My Orders Page
<span class="ml-4">
<router-link class="text-decoration-none" to="/retailer/my-orders" target="_blank">/my-orders</router-link>
</span>
</div>
<div class="mt-4">
Wishlist Page
<span class="ml-4">
<router-link class="text-decoration-none" to="/retailer/wishlist" target="_blank">/wishlist</router-link>
</span>
</div>
<div class="mt-4">
Address Book Page
<span class="ml-4">
<router-link
class="text-decoration-none"
to="/retailer/address-book/shipping"
target="_blank"
>/address-book</router-link>
</span>
</div>
<div class="mt-4">
News Letter Subscription Page
<span class="ml-4">
<router-link
class="text-decoration-none"
to="/retailer/news-letter-subscription"
target="_blank"
>/news-letter-subscription</router-link>
</span>
</div>
</v-col>
</v-row>
</v-container>
</template>
<script>
//import { mapState } from "vuex";
export default {
name: "shortcutsPage",
components: {},
computed: {},
methods: {},
created() {}
};
</script>

View File

@ -1,6 +0,0 @@
.storecreditinfo-dashboard-line {
border: 0.0625rem solid #2850da !important;
width: 100%;
content: "";
display: block;
}

View File

@ -1,155 +0,0 @@
<template>
<v-container v-resize="resize">
<v-row class="mt-12" justify="center" v-if="balanceInprogress">
<v-progress-circular :size="60" color="primary" indeterminate></v-progress-circular>
</v-row>
<v-row v-else>
<v-col cols="12" class="fontcolor-black-light">
<p class="h2 body-font text-uppercase primary--text">Store Credit</p>
<v-row>
<v-col cols="12" sm="6">
<p class="h4 body-font text-uppercase primary--text">Balance</p>
<div class="storecreditinfo-dashboard-line my-5"></div>
<p v-if="CreditBalance" class="h3 pt-2">${{giftCardCreditBalance}}</p>
<p v-else class="h3 pt-2">$0.00</p>
</v-col>
<v-col cols="12" sm="6">
<p class="h4 body-font text-uppercase primary--text">Redeem Gift Card</p>
<div class="storecreditinfo-dashboard-line my-5"></div>
<p class="body body-font pt-5">
Have a gift card?
<v-hover v-slot:default="{ hover }">
<router-link
to
target="_self"
@click.native="giftCard()"
class="text-decoration-none"
:class="hover ? 'primary--text':'black--text'"
>Click here</router-link>
</v-hover>to redeem it.
</p>
</v-col>
</v-row>
</v-col>
<v-col v-if="balanceHistory.length > 0">
<p class="h4 body-font text-uppercase primary--text">Balance History</p>
<div class="storecreditinfo-dashboard-line my-5"></div>
<v-divider></v-divider>
<v-simple-table fixed-header :height="tableHeight">
<template v-slot:default>
<thead>
<tr>
<th class="text-center fontsize-16">Action</th>
<th class="text-center fontsize-16">Balance Change</th>
<th class="text-center fontsize-16">Balance</th>
<th class="text-center fontsize-16">Date</th>
</tr>
</thead>
<tbody>
<tr v-for="(balanceDetails,index) in balanceHistory" v-bind:key="index">
<td class="text-center fontsize-16">{{ getAction(balanceDetails.action) }}</td>
<td class="text-center fontsize-16">{{ updateBalance(balanceDetails.balanceDelta) }}</td>
<td class="text-center fontsize-16">{{ balanceDetails.balanceAmount }}</td>
<td class="text-center fontsize-16">{{ isoStringToNormalDate(balanceDetails.updatedAt) }}</td>
</tr>
</tbody>
</template>
</v-simple-table>
</v-col>
</v-row>
</v-container>
</template>
<script>
import { loginInterrupt } from "@/services/nav";
//import { createHelpers } from "vuex-map-fields";
/*const { mapFields } = createHelpers({
getterType: "accountOne/getField",
mutationType: "accountOne/updateField"
});*/
export default {
name: "StoreCreditPage",
data: () => ({
CreditBalance: false,
tableHeight: ""
}),
computed: {
/*...mapFields([
"creditBalance"
]),*/
userAuth: function() {
return this.$store.state.auth.userAuth;
},
giftCardCreditBalance: function() {
return this.$store.state.storeCredit.giftCardCreditBalance;
},
balanceInprogress: function() {
return this.$store.state.storeCredit.inProgress;
},
basicInfo() {
return this.$store.state.accountOne.one;
},
balanceHistory: function() {
return this.$store.state.storeCredit.balanceHistory;
}
},
methods: {
giftCard() {
this.$router.push({
name: "GiftCardPage"
});
},
getAction(number) {
if (number == "1") {
return "Updated";
} else if (number == "2") {
return "Created";
} else if (number == "3") {
return "Used";
}
},
updateBalance(balance) {
if (balance.includes("-")) {
return balance.slice(0, 1) + "$" + balance.slice(1);
} else {
return balance.slice(0, 0) + "$" + balance.slice(0);
}
},
isoStringToNormalDate(date) {
/* eslint-disable */
//debugger;
let newDateTime = Date.parse(date);
let tmp = new Date(newDateTime).toLocaleString().split("/");
return (date = tmp[1] + "/" + tmp[0] + "/" + tmp[2]);
},
resize() {
this.tableHeight = window.innerHeight - 430;
}
},
async created() {
await this.$store.dispatch("accountOne/basicInfo");
if (this.basicInfo) {
this.$store
.dispatch("storeCredit/fetchGiftCardCreditBalance", this.basicInfo.id)
.then(() => {
this.CreditBalance = true;
this.$store.dispatch(
"storeCredit/fetchBalanceHistory",
this.basicInfo.id
);
})
.catch(() => {
this.CreditBalance = false;
//fetchBalanceHistory
});
}
if (!this.userAuth) {
loginInterrupt(
window.location.href,
"There was an access violation caused by your request. You need to sign back in please."
);
}
}
};
</script>
<style src="./store_credit_info_page.scss" lang="scss" scoped />

View File

@ -1,104 +0,0 @@
<template>
<div class="white">
<v-container class="my-10" ref="divOne">
<h1 class="font-weight-medium">Terms & Conditions</h1>
<p
class="my-6 fontcolor-black-light"
>Please read these Terms and Conditions carefully before using this website. Your use of this website confirms your unconditional acceptance of the following Terms and Conditions. If you do not accept these terms and conditions, do not use this website.</p>
<h3 class="font-weight-medium my-6">Our Website</h3>
<p
class="my-6 fontcolor-black-light"
>We make all reasonable effort to accurately display our products and the products of third parties on our website. However, we cannot guarantee your computer will accurately display the product features (e.g., color) and therefore do not guarantee the color of the products ordered will match exactly the color you see on your computer. We retain the right to change all features, specifications, content, products and prices of products or services at any time without notice and the inclusion of products and services on this website is not a guaranty that these products and services will be available at any time.</p>
<h3 class="font-weight-medium my-6">Laws</h3>
<p
class="my-6 fontcolor-black-light"
>It is your responsibility to ascertain and obey all applicable local, state, federal and international laws (including minimum age requirements) relating to the possession, use and sale of any item purchased from this website. By placing an order, you represent that the products ordered will be used only in a lawful manner.</p>
<h3 class="font-weight-medium my-6">Shipping</h3>
<p
class="my-6 fontcolor-black-light"
>Items will be shipped to an address designated by the purchase as long as that shipping address is compliant with the shipping restrictions contained on this website and U.S. export laws and regulations. No order will be shipped contrary to U.S. export laws and regulations. All purchases from this website are made pursuant to a shipment contract. As a result, risk of loss and title of the purchased items pass to you upon delivery of the items to the carrier. It is your responsibility for filing any claims with carriers for damaged and/or lost shipments.</p>
<h3 class="font-weight-medium my-6">Use Of This Website</h3>
<p
class="mt-6 mb-0 pb-0 fontcolor-black-light"
>The website design and all text, graphics, information, content, and other material displayed on or that can be downloaded from this website are the property of Crane & Co., Inc. or are used with permission from certain third parties and are protected by copyright, trademark and other laws and may not be used except as permitted in these terms and conditions or with the prior written permission of Crane & Co., Inc. As such, you may not, without the written permission of Crane & Co., Inc.:</p>
<ul>
<li class="fontcolor-black-light">modify the information or materials located on this website; or</li>
<li class="fontcolor-black-light">reproduce or publicly display, or distribute or otherwise use any such materials for any public or commercial purpose; or</li>
<li class="fontcolor-black-light">link to this website from another website; or</li>
<li class="fontcolor-black-light">display this website or any material displayed on this website in frames or through similar means on another website; or</li>
<li class="fontcolor-black-light">post or transmit any unlawful, threatening, defaming, libelous, obscene, pornographic or profane material or any material that could constitute or encourage or that would be considered a criminal offense or give rise to civil liability, or otherwise violate any law; or</li>
<li class="fontcolor-black-light">otherwise use the content of this website.</li>
</ul>
<p
class="mb-6 fontcolor-black-light"
>Unauthorized use of any such information or materials may violate copyright laws, trademark laws, laws of privacy and publicity, and other laws and regulations.</p>
<h3 class="font-weight-medium my-6">Trademarks</h3>
<p
class="my-6 fontcolor-black-light"
>Certain trademarks, trade names, service marks and logos used or displayed on this website registered and unregistered trademarks, trade names and service marks of Crane & Co., Inc. or other trademarks, trade names and service marks used or displayed on this website are the registered and unregistered trademarks, trade names and service marks of their respective owners. Nothing contained on this website grants or should be construed as granting, by implication, estoppels, or otherwise, any license or right to use any trademarks, trade names, service marks or logos displayed on this website without the written permission of Crane & Co., Inc. or other third party owner.</p>
<h3 class="font-weight-medium my-6">Liability</h3>
<p
class="my-6 fontcolor-black-light"
>Crane & Co., Inc. does not assume any responsibility, and shall not be liable for, any damages to, or viruses that may infect, your computer, telecommunication equipment, or other property caused by or arising from your access to, use of, or browsing this web site or your downloading of any materials, from this web site. In no event will Crane & Co., Inc., and its respective officers, directors, shareholders, affiliates, agents, successors, assigns, retail partners nor any party involved in the creation, production or transmission of this web site be liable to any party for any indirect, special, punitive, incidental or consequential damages (including, without limitation, those resulting from lost profits, lost data or business interruption) arising out of the use, inability to use, or the results of use of this web site, any web sites linked to this web site, or the materials, information or services contained at any or all such sites, whether based warranty, contract, tort or any other legal theory and whether or not advised of the possibility of such damages. The foregoing limitations of liability do not apply to the extent prohibited by law.</p>
<h3 class="font-weight-medium my-6">Revisions</h3>
<p
class="my-6 fontcolor-black-light"
>Crane & Co., Inc. may revise these terms and conditions at any time by updating this posting.</p>
<h3 class="font-weight-medium my-6">Governing Law</h3>
<p
class="my-6 fontcolor-black-light"
>These terms and conditions will be governed by and construed in accordance with the laws of the Commonwealth of Massachusetts. Any action seeking legal or equitable relief arising out of or relating to this website shall be brought only in the courts of the Commonwealth of Massachusetts or the United States District Court of Massachusetts, Springfield.</p>
<h3 class="font-weight-medium my-6">Termination</h3>
<p
class="my-6 fontcolor-black-light"
>Crane & Co., Inc. has the right to suspend or terminate your account or your use of this website at any time, for any reason or for no reason. You are personally liable for any orders that you place or charges that you make prior to termination. Crane reserves the right to change, suspend, or discontinue all or any aspect of this web at any time without notice.</p>
</v-container>
<FooterComponent />
</div>
</template>
<script>
const baseUrl = process.env.VUE_APP_BASE_URL;
import * as easings from "vuetify/es5/services/goto/easing-patterns";
import FooterComponent from "@/components/layout/footer/FooterComponent";
/* eslint-disable */
export default {
name: "TermsAndConditions",
data() {
return {
easings: Object.keys(easings)
};
},
components: {
FooterComponent
},
watch: {},
computed: {
canonical: function() {
return this.$route.meta.canonical;
}
},
metaInfo() {
return {
link: [
{rel: 'canonical', href:`${this.canonical ? window.location.href.split('?')[0] : baseUrl }`}
]
}
},
methods: {
pageScrollUp() {
this.$vuetify.goTo(this.$refs.divOne, {
duration: 300,
easing: "easeInOutCubic"
});
}
},
mounted() {
this.pageScrollUp();
},
created() {
}
};
</script>

View File

@ -11,7 +11,7 @@
...authHeader() ...authHeader()
}, },
}; };
return fetch(`${vueAppMagenotApiUrl}/rest/all/V1/crcmsBlock/${blockId}`, requestOptions) return fetch(`${vueAppMagenotApiUrl}/rest/V1/crcmsBlock/${blockId}`, requestOptions)
}); });
export const doFetchList = wrapRequest(() => { export const doFetchList = wrapRequest(() => {
@ -22,9 +22,9 @@
'Authorization': 'Bearer ' + 'q6u1q4thvtw03ajuo5v6q3cb8vlq623v' 'Authorization': 'Bearer ' + 'q6u1q4thvtw03ajuo5v6q3cb8vlq623v'
}, },
}; };
return fetch(`${vueAppMagenotApiUrl}/rest/all/V1/cmsBlock/search?searchCriteria[filter_groups][0][filters][0][field]=id&searchCriteria[filter_groups][0][filters][0][value]=10&searchCriteria[filter_groups][0][filters][0][condition_type]=eq`, requestOptions) return fetch(`${vueAppMagenotApiUrl}/rest/V1/cmsBlock/search?searchCriteria[filter_groups][0][filters][0][field]=id&searchCriteria[filter_groups][0][filters][0][value]=10&searchCriteria[filter_groups][0][filters][0][condition_type]=eq`, requestOptions)
// return fetch(`${vueAppMagenotApiUrl}/rest/all/V1/cmsBlock/search? // return fetch(`${vueAppMagenotApiUrl}/rest/V1/cmsBlock/search?
// searchCriteria[filter_groups][0][filters][0][field]=id& // searchCriteria[filter_groups][0][filters][0][field]=id&
// searchCriteria[filter_groups][0][filters][0][value]=10& // searchCriteria[filter_groups][0][filters][0][value]=10&
// searchCriteria[filter_groups][0][filters][0][condition_type]=eq& // searchCriteria[filter_groups][0][filters][0][condition_type]=eq&

View File

@ -1,30 +0,0 @@
// import { authHeader } from './auth';
import { wrapRequest } from './nav';
const imageLibApiUrl = process.env.VUE_APP_IMAGE_LIB_URL;
export const doFetchUserBuilderItemImages = wrapRequest((ownerId) => {
const requestOptions = {
method: 'GET',
headers: { 'Content-type': 'application/json'},
};
let res = fetch(`${imageLibApiUrl}/builder_item?owner_id=eq.${ownerId}`, requestOptions);
return res;
});
export const doPatchOneBuilder = wrapRequest((image) => {
if(!image.s3_id){
let s3Id=image.s_3_id;
delete image.s_3_id;
image.s3_id=s3Id;
}
const requestOptions = {
method: 'PATCH',
headers: {
'Content-Type': 'application/json', 'Accept': 'application/vnd.pgrst.object+json',
'Prefer': 'return=representation'
},
body: JSON.stringify(image)
};
return fetch(`${imageLibApiUrl}/builder_item?id=eq.${image.id}`, requestOptions)
})

View File

@ -14,7 +14,7 @@ export const doLogin = wrapRequest((loginDetail) => {
password: loginDetail.password password: loginDetail.password
}) })
}; };
return fetch(`${vueAppMagentoApiUrl}/rest/default/V1/integration/customer/token`, requestOptions); return fetch(`${vueAppMagentoApiUrl}/rest/V1/integration/customer/token`, requestOptions);
}); });
////////////////// dummy api ////////////////// ////////////////// dummy api //////////////////

View File

@ -1,104 +0,0 @@
//import { authHeader } from './auth';
import { wrapRequest } from './nav';
const vueAppMagenotApiUrl = process.env.VUE_APP_MAGENTO_API_URL;
export const doPostGiftCartItem = wrapRequest((data,quoteId,giftCartDetails) => {
const requestOptions = {
method: 'POST',
headers: {
'Content-type': 'application/json',
'Access-Control-Allow-Origin': '*',
},
body: JSON.stringify({
"cart_item": {
"sku": data.sku,
"qty": data.qty,
"quoteId": quoteId,
"product_option": {
"extension_attributes": {
"giftcard_item_option": {
"giftcard_sender_name": giftCartDetails.senderName,
"giftcard_sender_email": giftCartDetails.senderEmail,
"giftcard_recipient_name": giftCartDetails.recipientName,
"giftcard_recipient_email": giftCartDetails.recipientEmail
}
}
}
}
})
};
return fetch(`${vueAppMagenotApiUrl}/rest/V1/guest-carts/${quoteId}/items`, requestOptions)
});
export const doFetchQuote = wrapRequest(() => {
const requestOptions = {
method: 'POST',
headers: {
'Content-type': 'application/json',
'Access-Control-Allow-Origin': '*',
}
};
return fetch(`${vueAppMagenotApiUrl}/rest/V1/guest-carts`, requestOptions)
});
export const doFetchCartProducts = wrapRequest((quoteId) => {
const requestOptions = {
method: 'GET',
headers: {
'Content-type': 'application/json',
'Access-Control-Allow-Origin': '*',
}
};
return fetch(`${vueAppMagenotApiUrl}/rest/V1/guest-carts/${quoteId}/items`, requestOptions)
});
export const doFetchTotalAmt = wrapRequest(() => {
const requestOptions = {
method: 'GET',
headers: {
'Content-type': 'application/json',
'Access-Control-Allow-Origin': '*',
}
};
return fetch(`${vueAppMagenotApiUrl}/rest/V1/carts/mine/totals`, requestOptions)
});
export const doDeleteCartProduct = wrapRequest((productId) => {
const requestOptions = {
method: 'DELETE',
headers: {
'Content-type': 'application/json',
'Access-Control-Allow-Origin': '*',
}
};
return fetch(`${vueAppMagenotApiUrl}/rest/V1/carts/mine/items/${productId}`, requestOptions)
});
export const doPutCartItem = wrapRequest((sku, qty, quoteId, itemId) => {
const requestOptions = {
method: 'PUT',
headers: {
'Content-type': 'application/json',
'Access-Control-Allow-Origin': '*',
},
body: JSON.stringify({
"cart_item": {
"quote_id": quoteId,
"sku": sku,
"qty": qty,
"item_id": itemId
}
})
};
return fetch(`${vueAppMagenotApiUrl}/rest/V1/carts/mine/items/${sku}`, requestOptions)
});

View File

@ -1,233 +0,0 @@
import { wrapRequest, meWrapRequest } from './nav';
const vueAppMagenotApiUrl = process.env.VUE_APP_MAGENTO_API_URL;
//const vueAppCCUrl = process.env.VUE_APP_CC_URL;
const retailorId = process.env.VUE_APP_RETAILOR_ID;
const vueAppNodeslsApiUrl = process.env.VUE_APP_NODESLS_API_URL;
export const doFetchBasicInfo = async() => {
let address = {
"id": '',
"group_id": '',
"default_billing": '',
"default_shipping": '',
"created_at": '',
"updated_at": '',
"created_in": '',
"email": '',
"firstname": '',
"lastname": '',
"store_id": '',
"website_id": '',
"addresses": [{
"id": '',
"customer_id": '',
"region": {
"region_code": '',
"region": '',
"region_id": ''
},
"region_id": '',
"country_id": '',
"street": [
''
],
"telephone": '',
"postcode": '',
"city": '',
"firstname": '',
"lastname": ''
}],
}
return address
};
export const doValidateAddress = wrapRequest((address) => {
const requestOptions = {
method: 'GET',
};
return fetch("https://maps.googleapis.com/maps/api/geocode/json?address=" + address + "&key=AIzaSyDmHp0PPuKHD1KGHCDmLq1qQKr_03XKEHo", requestOptions);
});
export const doFetchCheckEmailAvailable = wrapRequest((email) => {
const requestOptions = {
method: 'POST',
headers: {
'Content-type': 'application/json',
'Access-Control-Allow-Origin': '*',
},
body: JSON.stringify({
"customerEmail": email,
"websiteId": 1
})
};
return fetch(`${vueAppMagenotApiUrl}/rest/V1/customers/isEmailAvailable`, requestOptions)
});
/*
export const doFetchChangePassword = wrapRequest((token) => {
const requestOptions = {
method: 'PUT',
headers: { 'Content-type': 'application/json'
, 'Authorization' : `Bearer ${token}`}
};
return fetch(`https://magento2.test/rest/all/V1/customers/retailer/password`, requestOptions)
});*/
/*export const doUpdateSubscription = meWrapRequest((one) => {
const requestOptions = {
method: 'PUT',
headers: {
'Content-type': 'application/json',
...authHeader()
},
body: JSON.stringify({
"customer": {
"firstname": one.firstname,
"lastname": one.lastname,
"email": one.email,
"website_id": one.websiteId,
"extension_attributes": {
"is_subscribed": one.extensionAttributes.isSubscribed
}
}
})
};
return fetch(`${vueAppMagenotApiUrl}/rest/all/V1/customers/retailer`, requestOptions)
});*/
export const doFetchEstimatedShippingMethods = wrapRequest((address, email, guestQuoteId) => {
let streetAddress = [];
let streetArray = [];
if (address.streetNoTwo == " " || address.streetNoTwo == undefined) {
streetAddress[0] = address.streetNoOne;
streetArray = streetAddress.filter(v => v != '');
} else {
streetAddress[0] = address.streetNoOne
streetAddress[1] = address.streetNoTwo;
streetArray = streetAddress.filter(v => v != '');
}
const requestOptions = {
method: 'POST',
headers: {
'Content-type': 'application/json',
},
body: JSON.stringify({
"address": {
"region_id": address.regionId,
"country_id": address.countryId,
"street": streetArray,
"postcode": address.postcode,
"city": address.city,
"firstname": address.firstname,
"lastname": address.lastname,
"email": email,
"same_as_billing": 1
}
}),
};
return fetch(`${vueAppMagenotApiUrl}/rest/V1/guest-carts/${guestQuoteId}/estimate-shipping-methods`, requestOptions)
});
export const doShippingInformation = wrapRequest((address, estimated, email, guestQuoteId, suggestedAddress) => {
let streetAddress = [];
let streetArray = [];
if (address.streetNoTwo == " " || address.streetNoTwo == undefined) {
streetAddress[0] = suggestedAddress.streetNoOne ? suggestedAddress.streetNoOne : address.streetNoOne;
streetArray = streetAddress.filter(v => v != '');
} else {
streetAddress[0] = suggestedAddress.streetNoOne ? suggestedAddress.streetNoOne : address.streetNoOne
streetAddress[1] = suggestedAddress.streetNoTwo ? suggestedAddress.streetNoTwo : address.streetNoTwo;
streetArray = streetAddress.filter(v => v != '');
}
const requestOptions = {
method: 'POST',
headers: {
'Content-type': 'application/json',
},
body: JSON.stringify({
"addressInformation": {
"shipping_address": {
"region_id": suggestedAddress.region_id ? suggestedAddress.region_id : address.regionId,
"country_id": suggestedAddress.country_id ? suggestedAddress.country_id : address.countryId,
"street": streetArray,
"postcode": suggestedAddress.postcode ? suggestedAddress.postcode : address.postcode,
"city": suggestedAddress.city ? suggestedAddress.city : address.city,
"firstname": address.firstname,
"lastname": address.lastname,
"email": email,
"telephone": address.telephone
},
"shipping_carrier_code": estimated.carrierCode,
"shipping_method_code": estimated.methodCode
}
})
};
return fetch(`${vueAppMagenotApiUrl}/rest/V1/guest-carts/${guestQuoteId}/shipping-information`, requestOptions)
});
export const doProductsOrder = meWrapRequest((userEmail, guestQuoteId, paymentMethod, oneAddress) => {
const requestOptions = {
method: 'POST',
headers: {
'Content-type': 'application/json'
},
body: JSON.stringify({
"email": userEmail,
"cartId": guestQuoteId,
"billingAddress": oneAddress,
"paymentMethod": paymentMethod,
"comments": ""
})
};
return fetch(`${vueAppMagenotApiUrl}/rest/V1/guest-carts/${guestQuoteId}/payment-information`, requestOptions)
});
/*export const doProductsOrderOnCC = meWrapRequest((orderNumber, shippingAddress, webOrderNumber) => {
const requestOptions = {
method: 'POST',
headers: {
'Content-Type':'text/xml',
},
};
let address2 = shippingAddress.street[1]? '&ShipToAddress2='+shippingAddress.street[1] : '';
return fetch(`${vueAppCCUrl}?Operation=SUBMIT&RetailerID=${retailorId}&OrderNumber=${orderNumber}&ShipToFirstName=${shippingAddress.firstname}&ShipToLastName=${shippingAddress.lastname}&ShipToAddress1=${shippingAddress.street[0]}${address2}&ShipToCity=${shippingAddress.city}&ShipToState=${shippingAddress.regionCode}&ShipToZip=${shippingAddress.postcode}&ShipToCountry=${shippingAddress.countryId}&ShipToPhone=${shippingAddress.telephone}&ShipToEmail=${shippingAddress.email}&ShippingMethod=usp&WebOrderNumber=${webOrderNumber}`, requestOptions)
});*/
export const doProductsOrderOnCC = meWrapRequest((orderNumber, shippingAddress, webOrderNumber) => {
let address2 = shippingAddress.street[1] ? shippingAddress.street[1] : undefined;
const requestOptions = {
method: 'POST',
headers: {
'Content-type': 'application/json'
},
body: JSON.stringify({
"retailorId": retailorId,
"orderNumber": orderNumber,
"shipToFirstName": shippingAddress.firstname,
"shipToLastName": shippingAddress.firstname,
"shipToAddress1": shippingAddress.street[0],
"shipToAddress2": address2,
"shipToCity": shippingAddress.city,
"shipToState": shippingAddress.regionCode,
"shipToZip": shippingAddress.postcode,
"shipToCountry": shippingAddress.countryId,
"shipToPhone": shippingAddress.telephone,
"shipToEmail": shippingAddress.email,
"shippingMethod": "usp",
"webOrderNumber": webOrderNumber
})
};
return fetch(`${vueAppNodeslsApiUrl}/cc-submit-order`, requestOptions)
});
/* personalise order
export const doProductsOrderOnPersonalize = meWrapRequest((order) => {
const requestOptions = {
method: 'POST',
headers: {
'Content-type': 'application/json',
},
body: JSON.stringify({
"order": order
})
};
return fetch(`http://order.crane.com/Incoming/input`, requestOptions)
});*/

View File

@ -1,258 +0,0 @@
import { wrapRequest } from './nav';
const vueAppMagenotApiUrl = process.env.VUE_APP_MAGENTO_API_URL;
const vueAppNodeslsApiUrl = process.env.VUE_APP_NODESLS_API_URL;
const retailorId = process.env.VUE_APP_RETAILOR_ID;
export const doPostCartItem = wrapRequest((itemNumber, quantity, ccid, price, personalizeDetails, quoteId) => {
const requestOptions = {
method: 'POST',
headers: {
'Content-type': 'application/json',
'Access-Control-Allow-Origin': '*'
},
body: JSON.stringify({
"cart_item": {
"quote_id": quoteId,
"sku": itemNumber,
"qty": quantity
},
"ccid": ccid,
"order_total": price,
"personalize_Data": personalizeDetails
})
};
return fetch(`${vueAppMagenotApiUrl}/rest/V1/guest-carts/${quoteId}/items`, requestOptions)
});
export const doPostConfiguredCartItem = wrapRequest((itemNumber, quantity, typeId, optionId, optionValue, quoteId) => {
const requestOptions = {
method: 'POST',
headers: {
'Content-type': 'application/json',
'Access-Control-Allow-Origin': '*'
},
body: JSON.stringify({
"cart_item": {
"quote_id": quoteId,
"sku": itemNumber,
"qty": quantity,
"product_type": typeId,
"product_option": {
"extension_attributes": {
"configurable_item_options": [{
"option_id": optionId,
"option_value": optionValue
}]
}
}
},
})
};
return fetch(`${vueAppMagenotApiUrl}/rest/V1/guest-carts/${quoteId}/items`, requestOptions)
});
export const doPutConfiguredCartItem = wrapRequest((sku, qty, quoteId, itemId, optionId, optionValue) => {
const requestOptions = {
method: 'PUT',
headers: {
'Content-type': 'application/json',
'Access-Control-Allow-Origin': '*'
},
body: JSON.stringify({
"cart_item": {
"quote_id": quoteId,
"sku": sku,
"qty": qty,
"item_id": itemId,
"product_option": {
"extension_attributes": {
"configurable_item_options": [{
"option_id": optionId,
"option_value": optionValue
}]
}
}
},
})
};
return fetch(`${vueAppMagenotApiUrl}/rest/V1/guest-carts/${quoteId}/items/${sku}`, requestOptions)
});
export const doPostGiftCartItem = wrapRequest((data, quoteId, giftCartDetailsGuest) => {
const requestOptions = {
method: 'POST',
headers: {
'Content-type': 'application/json',
'Access-Control-Allow-Origin': '*',
},
body: JSON.stringify({
"cart_item": {
"sku": data.sku,
"qty": data.qty,
"quoteId": quoteId,
"product_option": {
"extension_attributes": {
"giftcard_item_option": {
"giftcard_sender_name": giftCartDetailsGuest.senderNameGuest,
"giftcard_sender_email": giftCartDetailsGuest.senderEmailGuest,
"giftcard_recipient_name": giftCartDetailsGuest.recipientNameGuest,
"giftcard_recipient_email": giftCartDetailsGuest.recipientEmailGuest,
"giftcard_message": giftCartDetailsGuest.senderMessageGuest,
"giftcard_amount": giftCartDetailsGuest.giftCardAmtGuest
}
}
}
}
})
};
return fetch(`${vueAppMagenotApiUrl}/rest/V1/guest-carts/${quoteId}/items`, requestOptions)
});
export const doPutGiftCartItem = wrapRequest((data, quoteId, giftCartDetailsGuest) => {
const requestOptions = {
method: 'PUT',
headers: {
'Content-type': 'application/json',
'Access-Control-Allow-Origin': '*',
},
body: JSON.stringify({
"cart_item": {
"sku": data.sku,
"qty": data.qty,
"quote_id": quoteId,
"item_id": data.itemId,
"product_option": {
"extension_attributes": {
"giftcard_item_option": {
"giftcard_sender_name": giftCartDetailsGuest.senderNameGuest,
"giftcard_sender_email": giftCartDetailsGuest.senderEmailGuest,
"giftcard_recipient_name": giftCartDetailsGuest.recipientNameGuest,
"giftcard_recipient_email": giftCartDetailsGuest.recipientEmailGuest,
"giftcard_message": giftCartDetailsGuest.senderMessageGuest,
"giftcard_amount": giftCartDetailsGuest.giftCardAmtGuest
}
}
}
}
})
};
return fetch(`${vueAppMagenotApiUrl}/rest/V1/guest-carts/${quoteId}/items/${data.sku}`, requestOptions)
});
export const doFetchQuote = wrapRequest(() => {
const requestOptions = {
method: 'POST',
headers: {
'Content-type': 'application/json',
'Access-Control-Allow-Origin': '*',
}
};
return fetch(`${vueAppMagenotApiUrl}/rest/V1/guest-carts`, requestOptions)
});
export const doFetchCartId = wrapRequest((quoteId) => {
const requestOptions = {
method: 'GET',
headers: {
'Content-type': 'application/json',
'Access-Control-Allow-Origin': '*',
}
};
return fetch(`${vueAppMagenotApiUrl}/rest/V1/guest-carts/${quoteId}`, requestOptions)
});
export const doFetchCartProducts = wrapRequest((guestCartId) => {
const requestOptions = {
method: 'GET',
headers: {
'Content-type': 'application/json',
'Access-Control-Allow-Origin': '*',
}
};
return fetch(`${vueAppMagenotApiUrl}/rest/V1/cart/data?cartid=${guestCartId}`, requestOptions)
});
export const doFetchTotalAmt = wrapRequest((quoteId) => {
const requestOptions = {
method: 'GET',
headers: {
'Content-type': 'application/json',
'Access-Control-Allow-Origin': '*',
}
};
return fetch(`${vueAppMagenotApiUrl}/rest/V1/guest-carts/${quoteId}/totals`, requestOptions)
});
export const doDeleteCartProduct = wrapRequest((productId, quoteId) => {
const requestOptions = {
method: 'DELETE',
headers: {
'Content-type': 'application/json',
'Access-Control-Allow-Origin': '*',
}
};
return fetch(`${vueAppMagenotApiUrl}/rest/V1/guest-carts/${quoteId}/items/${productId}`, requestOptions)
});
export const doPutCartItem = wrapRequest((sku, qty, quoteId, itemId, ccid, price, personalizeDetails) => {
const requestOptions = {
method: 'PUT',
headers: {
'Content-type': 'application/json',
'Access-Control-Allow-Origin': '*'
},
body: JSON.stringify({
"cart_item": {
"quote_id": quoteId,
"sku": sku,
"qty": qty,
"item_id": itemId,
},
"ccid": ccid,
"order_total": price,
"personalize_Data": personalizeDetails
})
};
return fetch(`${vueAppMagenotApiUrl}/rest/V1/guest-carts/${quoteId}/items/${sku}`, requestOptions)
});
export const doFetchCoupon = wrapRequest((quoteId) => {
const requestOptions = {
method: 'GET',
headers: {
'Content-type': 'application/json',
'Access-Control-Allow-Origin': '*'
}
};
return fetch(`${vueAppMagenotApiUrl}/rest/V1/guest-carts/${quoteId}/coupons`, requestOptions)
});
export const doApplyDiscountCode = wrapRequest((code, quoteId) => {
const requestOptions = {
method: 'PUT',
headers: {
'Content-type': 'application/json',
'Access-Control-Allow-Origin': '*'
}
};
return fetch(`${vueAppMagenotApiUrl}/rest/V1/guest-carts/${quoteId}/coupons/${code}`, requestOptions)
});
export const doRemoveDiscountCode = wrapRequest((quoteId) => {
const requestOptions = {
method: 'DELETE',
headers: {
'Content-type': 'application/json',
'Access-Control-Allow-Origin': '*'
}
};
return fetch(`${vueAppMagenotApiUrl}/rest/V1/guest-carts/${quoteId}/coupons`, requestOptions)
});
export const doFetchGiftMessage = wrapRequest((quoteId, itemId) => {
const requestOptions = {
method: 'GET',
headers: {
'Content-type': 'application/json',
'Access-Control-Allow-Origin': '*'
}
};
return fetch(`${vueAppMagenotApiUrl}/rest/V1/item/data?itemId=${itemId}&cartid=${quoteId}`, requestOptions)
});
export const doPutCConectionCartItem = wrapRequest((sku, qty, ccid) => {
const requestOptions = {
method: 'GET'
};
return fetch(`${vueAppNodeslsApiUrl}/cc-update-cart-item-quantity?retailerID=${retailorId}&orderNumber=${ccid}&itemNumber=${sku}&quantity=${qty}`, requestOptions)
});

View File

@ -1,14 +0,0 @@
import { authHeader } from './auth';
import { wrapRequest } from './nav';
const vueAppMagenotApiUrl=process.env.VUE_APP_MAGENTO_API_URL;
export const doFetchHeroContent= wrapRequest((blockId) => {
const requestOptions = {
method: 'GET',
headers: {
'Content-type': 'application/json',...authHeader()
},
};
return fetch(`${vueAppMagenotApiUrl}/rest/all/V1/crcategories/${blockId}`, requestOptions)
});

View File

@ -4,7 +4,7 @@ import Vue from 'vue';
/* eslint-disable */ /* eslint-disable */
const loginUrl = process.env.VUE_APP_LOGIN_URL ? process.env.VUE_APP_LOGIN_URL : '/gate/sign-in'; const loginUrl = process.env.VUE_APP_LOGIN_URL ? process.env.VUE_APP_LOGIN_URL : '/gate/sign-in';
const homeUrl = process.env.VUE_APP_ME_URL ? process.env.VUE_APP_ME_URL + '/account-dashboard' : '/'; const homeUrl = process.env.VUE_APP_ME_URL ? process.env.VUE_APP_ME_URL + '/b2b' : '/';
const vueMaintenanceMode = process.env.VUE_APP_MAINTENANCE_MODE; const vueMaintenanceMode = process.env.VUE_APP_MAINTENANCE_MODE;
const loginInterrupt = function(current_url, message) { const loginInterrupt = function(current_url, message) {

View File

@ -1,64 +0,0 @@
import { wrapRequest } from './nav';
const vueAppImageApiUrl = process.env.VUE_APP_IMAGE_LIB_URL;
export const doFetchList = wrapRequest(() => {
const requestOptions = {
method: 'GET',
headers: { 'Content-type': 'application/json'},
};
//return fetch(`${vueAppImageApiUrl}/pdfdoc`, requestOptions);
return fetch(`${vueAppImageApiUrl}/pdfdoc?type=eq.final`, requestOptions);
});
export const doFetchOne = wrapRequest((id) => {
const requestOptions = {
method: 'GET',
headers: { 'Content-type': 'application/json'},
};
return fetch(`${vueAppImageApiUrl}/pdfdoc?id=eq.${id}`, requestOptions);
});
export const dolookUpList = wrapRequest((search) => {
const requestOptions = {
method: 'POST',
headers: { 'Content-type': 'application/json'},
body:JSON.stringify({ oms_order_id:search.omsOrderId||'',organization_id:search.organizationId,tags:search.tags, _limit:100})
};
return fetch(`${vueAppImageApiUrl}/rpc/lookup_pdfdoc`, requestOptions);
})
export const doPostOne = wrapRequest((pdfdoc) => {
const requestOptions = {
method: 'POST',
headers: { 'Content-Type': 'application/json','Prefer': 'return=representation' },
body: JSON.stringify(pdfdoc),
};
return fetch(`${vueAppImageApiUrl}/pdfdoc`, requestOptions);
});
export const doPatchOne = wrapRequest((pdfdoc) => {
if(!pdfdoc.s3_id){
let s3Id=pdfdoc.s_3_id;
delete pdfdoc.s_3_id;
pdfdoc.s3_id=s3Id;
}
const requestOptions = {
method: 'PATCH',
headers: {
'Content-Type': 'application/json', 'Accept': 'application/vnd.pgrst.object+json',
'Prefer': 'return=representation'
},
body: JSON.stringify(pdfdoc)
};
return fetch(`${vueAppImageApiUrl}/pdfdoc?id=eq.${pdfdoc.id}`, requestOptions)
})

View File

@ -146,7 +146,7 @@ export const doFetchProductsList = wrapRequest(() => {
}, },
}; };
return fetch(`${vueAppMagenotApiUrl}/rest/all/V1/crproducts?searchCriteria[current_page]=1&searchCriteria[page_size]=27`, requestOptions) return fetch(`${vueAppMagenotApiUrl}/rest/V1/crproducts?searchCriteria[current_page]=1&searchCriteria[page_size]=27`, requestOptions)
}); });
export const doFetchProductsMedia = wrapRequest((sku) => { export const doFetchProductsMedia = wrapRequest((sku) => {
const requestOptions = { const requestOptions = {
@ -157,7 +157,7 @@ export const doFetchProductsMedia = wrapRequest((sku) => {
'Access-Control-Allow-Origin': '*', 'Access-Control-Allow-Origin': '*',
}, },
}; };
return fetch(`${vueAppMagenotApiUrl}/rest/all/V1/crproducts/${sku}?fields=sku,media_gallery_entries[file]`, requestOptions) return fetch(`${vueAppMagenotApiUrl}/rest/V1/crproducts/${sku}?fields=sku,media_gallery_entries[file]`, requestOptions)
}); });
export const doFetchProductsAttributes = wrapRequest((sku) => { export const doFetchProductsAttributes = wrapRequest((sku) => {
const requestOptions = { const requestOptions = {
@ -168,7 +168,7 @@ export const doFetchProductsAttributes = wrapRequest((sku) => {
'Access-Control-Allow-Origin': '*', 'Access-Control-Allow-Origin': '*',
}, },
}; };
return fetch(`${vueAppMagenotApiUrl}/rest/all/V1/crproducts/${sku}?fields=sku,custom_attributes`, requestOptions) return fetch(`${vueAppMagenotApiUrl}/rest/V1/crproducts/${sku}?fields=sku,custom_attributes`, requestOptions)
}); });
export const doFetchAttributeList = wrapRequest(() => { export const doFetchAttributeList = wrapRequest(() => {
const requestOptions = { const requestOptions = {
@ -178,7 +178,7 @@ export const doFetchAttributeList = wrapRequest(() => {
}, },
}; };
return fetch(`${vueAppMagenotApiUrl}/rest/all/V1/crproducts/attributes?searchCriteria=&fields=items[attribute_id,attribute_code,options,frontend_labels]`, requestOptions) return fetch(`${vueAppMagenotApiUrl}/rest/V1/crproducts/attributes?searchCriteria=&fields=items[attribute_id,attribute_code,options,frontend_labels]`, requestOptions)
}); });
export const doFetchFilterOptions = async () => { export const doFetchFilterOptions = async () => {
@ -435,7 +435,7 @@ export const doFetchProductDetails = wrapRequest((sku) => {
'Access-Control-Allow-Origin': '*' 'Access-Control-Allow-Origin': '*'
}, },
}; };
return fetch(`${vueAppMagenotApiUrl}/rest/V2/product/${sku}`, requestOptions) return fetch(`${vueAppMagenotApiUrl}/rest/V1/product/${sku}`, requestOptions)
}); });
export const doFetchConfiguredProductDetails = wrapRequest((productId) => { export const doFetchConfiguredProductDetails = wrapRequest((productId) => {
@ -539,7 +539,7 @@ export const doFetchCategoryList = wrapRequest(() => {
}, },
}; };
return fetch(`${vueAppMagenotApiUrl}/rest/all/V1/crcategories`, requestOptions) return fetch(`${vueAppMagenotApiUrl}/rest/V1/crcategories`, requestOptions)
}); });
/*export const doFetchCategoryList = wrapRequest(() => { /*export const doFetchCategoryList = wrapRequest(() => {
const requestOptions = { const requestOptions = {
@ -562,7 +562,7 @@ export const doFetchCatelogProducts = wrapRequest((searchCriteria) => {
headers: { 'Content-type': 'application/json' } headers: { 'Content-type': 'application/json' }
}; };
return fetch(`${vueAppMagenotApiUrl}/rest/V2/suggestion?q=${searchCriteria}`, requestOptions); return fetch(`${vueAppMagenotApiUrl}/rest/V1/suggestion?q=${searchCriteria}`, requestOptions);
}); });
export const doFetchRecentlyViewedList = wrapRequest((sku) => { export const doFetchRecentlyViewedList = wrapRequest((sku) => {
@ -572,7 +572,7 @@ export const doFetchRecentlyViewedList = wrapRequest((sku) => {
'Content-type': 'application/json' 'Content-type': 'application/json'
}, },
}; };
return fetch(`${vueAppMagenotApiUrl}/rest/all/V1/crproducts?searchCriteria[filter_groups][0][filters][0][field]=sku&searchCriteria[filter_groups][0][filters][0][value]=${sku}&searchCriteria[filter_groups][0][filters][0][condition_type]=in&searchCriteria[sortOrders][0][direction]=ASC`, requestOptions) return fetch(`${vueAppMagenotApiUrl}/rest/V1/crproducts?searchCriteria[filter_groups][0][filters][0][field]=sku&searchCriteria[filter_groups][0][filters][0][value]=${sku}&searchCriteria[filter_groups][0][filters][0][condition_type]=in&searchCriteria[sortOrders][0][direction]=ASC`, requestOptions)
}); });
export const doSideBarFilter = wrapRequest((pageNo, pageSize, sortBy, categoryId, sideFilter, search) => { export const doSideBarFilter = wrapRequest((pageNo, pageSize, sortBy, categoryId, sideFilter, search) => {
const requestOptions = { const requestOptions = {

View File

@ -88,7 +88,7 @@ function doSignUp(registration) {
// console.log(registration); // console.log(registration);
return fetch(`${vueAppMagenotApiUrl}/rest/all/V1/customers`, requestOptions).then(handleResponse); return fetch(`${vueAppMagenotApiUrl}/rest/V1/customers`, requestOptions).then(handleResponse);
} }
/* eslint-disable no-alert, no-console , no-debugger */ /* eslint-disable no-alert, no-console , no-debugger */
export const doUpdateSubscription = meWrapRequest((one) => { export const doUpdateSubscription = meWrapRequest((one) => {
@ -110,7 +110,7 @@ export const doUpdateSubscription = meWrapRequest((one) => {
} }
}) })
}; };
return fetch(`${vueAppMagenotApiUrl}/rest/V1/customers/retailer`, requestOptions) return fetch(`${vueAppMagenotApiUrl}/rest/V1/customers/me`, requestOptions)
}); });
////////////////// dummy api ////////////////// ////////////////// dummy api //////////////////
/*async function doSignUp(firstName, lastName, email, password) { /*async function doSignUp(firstName, lastName, email, password) {

View File

@ -1,65 +0,0 @@
import { authHeader } from './auth';
import { wrapRequest } from './nav';
const vueAppMagenotApiUrl = process.env.VUE_APP_MAGENTO_API_URL;
export const doFetchGiftCardBalance = wrapRequest((giftCardCode) => {
const requestOptions = {
method: 'GET',
headers: {
'Content-type': 'application/json',
'Access-Control-Allow-Origin': '*',
...authHeader()
}
};
return fetch(`${vueAppMagenotApiUrl}/rest/V1/carts/mine/checkGiftCard/${giftCardCode}`, requestOptions)
});
export const doPostRedeemGiftCard = wrapRequest((giftCardCode) => {
const requestOptions = {
method: 'POST',
headers: {
'Content-type': 'application/json',
'Access-Control-Allow-Origin': '*',
...authHeader()
},
body: JSON.stringify({
"code": giftCardCode
})
};
return fetch(`${vueAppMagenotApiUrl}/rest/V2/gift-card/redeem`, requestOptions)
});
export const doFetchGiftCardCreditBalance = wrapRequest((customerId) => {
const requestOptions = {
method: 'GET',
headers: {
'Content-type': 'application/json',
'Access-Control-Allow-Origin': '*',
...authHeader()
}
};
return fetch(`${vueAppMagenotApiUrl}/rest/V2/customer-balance/${customerId}`, requestOptions)
});
export const doPostStoreCredit = wrapRequest(() => {
const requestOptions = {
method: 'POST',
headers: {
'Content-type': 'application/json',
'Access-Control-Allow-Origin': '*',
...authHeader()
}
};
return fetch(`${vueAppMagenotApiUrl}/rest/V1/carts/mine/balance/apply`, requestOptions)
});
export const doFetchBalanceHistory = wrapRequest((customerId) => {
const requestOptions = {
method: 'GET',
headers: {
'Content-type': 'application/json',
'Access-Control-Allow-Origin': '*',
...authHeader()
}
};
return fetch(`${vueAppMagenotApiUrl}/rest/V2/balance-history/${customerId}`, requestOptions)
});

View File

@ -1,11 +0,0 @@
const vueAppMagenotApiUrl = process.env.VUE_APP_MAGENTO_API_URL;
import { wrapRequest } from './nav';
export const doEmailSubscriber = wrapRequest((email) => {
const requestOptions = {
method: 'POST',
headers: {
'Content-type': 'application/json'
},
};
return fetch(`${vueAppMagenotApiUrl}/rest/V1/newsletterapi/subscriber/${email}`, requestOptions)
});

View File

@ -36,7 +36,7 @@ export const doValidateAddress = wrapRequest((address) => {
} }
}) })
}; };
return fetch(`${vueAppMagenotApiUrl}/rest/default/V1/carts/mine/validate-address`, requestOptions); return fetch(`${vueAppMagenotApiUrl}/rest/crn_retailer/V1/carts/mine/validate-address`, requestOptions);
}); });
export const doValidateAddressCheckout = wrapRequest((address, stateName) => { export const doValidateAddressCheckout = wrapRequest((address, stateName) => {
const requestOptions = { const requestOptions = {
@ -58,7 +58,7 @@ export const doValidateAddressCheckout = wrapRequest((address, stateName) => {
} }
}) })
}; };
return fetch(`${vueAppMagenotApiUrl}/rest/default/V1/shipping-information/validate-address`, requestOptions); return fetch(`${vueAppMagenotApiUrl}/rest/crn_retailer/V1/shipping-information/validate-address`, requestOptions);
}); });
export const doFetchStates = wrapRequest(() => { export const doFetchStates = wrapRequest(() => {
const requestOptions = { const requestOptions = {
@ -67,7 +67,7 @@ export const doFetchStates = wrapRequest(() => {
'Content-type': 'application/json' 'Content-type': 'application/json'
} }
}; };
return fetch(`${vueAppMagenotApiUrl}/rest/all/V1/directory/countries/US`, requestOptions) return fetch(`${vueAppMagenotApiUrl}/rest/crn_retailer/V1/directory/countries/US`, requestOptions)
}); });
export const doFetchCountries = wrapRequest(() => { export const doFetchCountries = wrapRequest(() => {
@ -78,7 +78,7 @@ export const doFetchCountries = wrapRequest(() => {
} }
}; };
return fetch(`${vueAppMagenotApiUrl}/rest/V1/directory/countries`, requestOptions) return fetch(`${vueAppMagenotApiUrl}/rest/crn_retailer/directory/countries`, requestOptions)
}); });
export const doFetchBasicInfo = meWrapRequest(() => { export const doFetchBasicInfo = meWrapRequest(() => {
@ -89,7 +89,7 @@ export const doFetchBasicInfo = meWrapRequest(() => {
...authHeader() ...authHeader()
}, },
}; };
return fetch(`${vueAppMagenotApiUrl}/rest/V1/customers/retailer`, requestOptions) return fetch(`${vueAppMagenotApiUrl}/rest/V1/customers/me`, requestOptions)
}); });
/* /*
export const doFetchChangePassword = wrapRequest((token) => { export const doFetchChangePassword = wrapRequest((token) => {
@ -99,7 +99,7 @@ export const doFetchChangePassword = wrapRequest((token) => {
, 'Authorization' : `Bearer ${token}`} , 'Authorization' : `Bearer ${token}`}
}; };
return fetch(`https://magento2.test/rest/all/V1/customers/retailer/password`, requestOptions) return fetch(`https://magento2.test/rest/crn_retailer/V1/customers/retailer/password`, requestOptions)
});*/ });*/
export const doFetchChangePassword = async (currentPassword, newPassword) => { export const doFetchChangePassword = async (currentPassword, newPassword) => {
@ -140,7 +140,7 @@ export const doUpdateAddress = meWrapRequest((one, address) => {
} }
}) })
}; };
return fetch(`${vueAppMagenotApiUrl}/rest/all/V1/customers/retailer`, requestOptions) return fetch(`${vueAppMagenotApiUrl}/rest/crn_retailer/V1/customers/me`, requestOptions)
}); });
export const doUpdateUserAddress = meWrapRequest((one, addresses) => { export const doUpdateUserAddress = meWrapRequest((one, addresses) => {
const requestOptions = { const requestOptions = {
@ -161,7 +161,7 @@ export const doUpdateUserAddress = meWrapRequest((one, addresses) => {
} }
}) })
}; };
return fetch(`${vueAppMagenotApiUrl}/rest/all/V1/customers/retailer`, requestOptions) return fetch(`${vueAppMagenotApiUrl}/rest/crn_retailer/V1/customers/me`, requestOptions)
}); });
export const doUpdateSubscription = meWrapRequest((one) => { export const doUpdateSubscription = meWrapRequest((one) => {
@ -183,7 +183,7 @@ export const doUpdateSubscription = meWrapRequest((one) => {
} }
}) })
}; };
return fetch(`${vueAppMagenotApiUrl}/rest/V1/customers/retailer`, requestOptions) return fetch(`${vueAppMagenotApiUrl}/rest/crn_retailer/customers/retailer`, requestOptions)
}); });
export const doChangeBasicInfo = meWrapRequest((one) => { export const doChangeBasicInfo = meWrapRequest((one) => {
const requestOptions = { const requestOptions = {
@ -201,7 +201,7 @@ export const doChangeBasicInfo = meWrapRequest((one) => {
} }
}) })
}; };
return fetch(`${vueAppMagenotApiUrl}/rest/all/V1/customers/retailer`, requestOptions) return fetch(`${vueAppMagenotApiUrl}/rest/crn_retailer/V1/customers/me`, requestOptions)
}); });
export const doChangePassword = meWrapRequest((currentPassword, newPassword) => { export const doChangePassword = meWrapRequest((currentPassword, newPassword) => {
const requestOptions = { const requestOptions = {
@ -215,7 +215,7 @@ export const doChangePassword = meWrapRequest((currentPassword, newPassword) =>
"newPassword": newPassword "newPassword": newPassword
}) })
}; };
return fetch(`${vueAppMagenotApiUrl}/rest/V1/customers/retailer/password`, requestOptions) return fetch(`${vueAppMagenotApiUrl}/rest/crn_retailer/customers/retailer/password`, requestOptions)
}); });
export const doFetchEstimatedShippingMethods = wrapRequest((one, address) => { export const doFetchEstimatedShippingMethods = wrapRequest((one, address) => {
let streetAddress = []; let streetAddress = [];
@ -257,7 +257,7 @@ export const doFetchEstimatedShippingMethods = wrapRequest((one, address) => {
}), }),
}; };
return fetch(`${vueAppMagenotApiUrl}/rest/V1/carts/mine/estimate-shipping-methods`, requestOptions) return fetch(`${vueAppMagenotApiUrl}/rest/crn_retailer/carts/mine/estimate-shipping-methods`, requestOptions)
}); });
export const doShippingInformation = wrapRequest((one, address, estimated, suggestedAddress) => { export const doShippingInformation = wrapRequest((one, address, estimated, suggestedAddress) => {
let streetAddress = []; let streetAddress = [];
@ -295,7 +295,7 @@ export const doShippingInformation = wrapRequest((one, address, estimated, sugge
} }
}) })
}; };
return fetch(`${vueAppMagenotApiUrl}/rest/V1/carts/mine/shipping-information`, requestOptions) return fetch(`${vueAppMagenotApiUrl}/rest/crn_retailer/carts/mine/shipping-information`, requestOptions)
}); });
export const doDeleteAddress = wrapRequest((addressId) => { export const doDeleteAddress = wrapRequest((addressId) => {
const requestOptions = { const requestOptions = {
@ -306,7 +306,7 @@ export const doDeleteAddress = wrapRequest((addressId) => {
...authHeader() ...authHeader()
} }
}; };
return fetch(`${vueAppMagenotApiUrl}/rest/V1/addresses/${addressId}`, requestOptions) return fetch(`${vueAppMagenotApiUrl}/rest/crn_retailer/addresses/${addressId}`, requestOptions)
}); });
export const doProductsOrder = meWrapRequest((userQuote, paymentMethod, oneAddress) => { export const doProductsOrder = meWrapRequest((userQuote, paymentMethod, oneAddress) => {
@ -323,7 +323,7 @@ export const doProductsOrder = meWrapRequest((userQuote, paymentMethod, oneAddre
"comments": "" "comments": ""
}) })
}; };
return fetch(`${vueAppMagenotApiUrl}/rest/V1/carts/mine/payment-information`, requestOptions) return fetch(`${vueAppMagenotApiUrl}/rest/crn_retailer/carts/mine/payment-information`, requestOptions)
}); });
/*export const doProductsOrderOnCC = meWrapRequest((orderNumber, shippingAddress, webOrderNumber) => { /*export const doProductsOrderOnCC = meWrapRequest((orderNumber, shippingAddress, webOrderNumber) => {

View File

@ -24,7 +24,7 @@ export const doPostCartItem = wrapRequest((sku, qty, ccid, price, personalizeDet
"builder_id": builderId "builder_id": builderId
}) })
}; };
return fetch(`${vueAppMagenotApiUrl}/rest/V1/carts/mine/items`, requestOptions) return fetch(`${vueAppMagenotApiUrl}/rest/crn_retailer/V1/carts/mine/items`, requestOptions)
}); });
export const doPostConfiguredCartItem = wrapRequest((itemNumber, quantity, typeId, optionId, optionValue, quoteId) => { export const doPostConfiguredCartItem = wrapRequest((itemNumber, quantity, typeId, optionId, optionValue, quoteId) => {
@ -53,7 +53,7 @@ export const doPostConfiguredCartItem = wrapRequest((itemNumber, quantity, typeI
}, },
}) })
}; };
return fetch(`${vueAppMagenotApiUrl}/rest/V1/carts/mine/items`, requestOptions) return fetch(`${vueAppMagenotApiUrl}/rest/crn_retailer/V1/carts/mine/items`, requestOptions)
}); });
export const doPutConfiguredCartItem = wrapRequest((sku, qty, quoteId, itemId, optionId, optionValue) => { export const doPutConfiguredCartItem = wrapRequest((sku, qty, quoteId, itemId, optionId, optionValue) => {
@ -81,7 +81,7 @@ export const doPutConfiguredCartItem = wrapRequest((sku, qty, quoteId, itemId, o
}, },
}) })
}; };
return fetch(`${vueAppMagenotApiUrl}/rest/V1/carts/mine/items/${sku}`, requestOptions) return fetch(`${vueAppMagenotApiUrl}/rest/crn_retailer/V1/carts/mine/items/${sku}`, requestOptions)
}); });
export const doPostGiftCartItem = wrapRequest((sku, qty, quoteId, senderName, senderEmail, giftCartDetails) => { export const doPostGiftCartItem = wrapRequest((sku, qty, quoteId, senderName, senderEmail, giftCartDetails) => {
const requestOptions = { const requestOptions = {
@ -112,7 +112,7 @@ export const doPostGiftCartItem = wrapRequest((sku, qty, quoteId, senderName, se
} }
}) })
}; };
return fetch(`${vueAppMagenotApiUrl}/rest/V1/carts/mine/items`, requestOptions) return fetch(`${vueAppMagenotApiUrl}/rest/crn_retailer/V1/carts/mine/items`, requestOptions)
}); });
export const doPutGiftCartItem = wrapRequest((data, giftCartDetails) => { export const doPutGiftCartItem = wrapRequest((data, giftCartDetails) => {
const requestOptions = { const requestOptions = {
@ -143,7 +143,7 @@ export const doPutGiftCartItem = wrapRequest((data, giftCartDetails) => {
} }
}) })
}; };
return fetch(`${vueAppMagenotApiUrl}/rest/V1/carts/mine/items/${data.sku}`, requestOptions) return fetch(`${vueAppMagenotApiUrl}/rest/crn_retailer/V1/carts/mine/items/${data.sku}`, requestOptions)
}); });
export const doFetchQuote = wrapRequest(() => { export const doFetchQuote = wrapRequest(() => {
const requestOptions = { const requestOptions = {
@ -155,7 +155,7 @@ export const doFetchQuote = wrapRequest(() => {
} }
}; };
return fetch(`${vueAppMagenotApiUrl}/rest/V1/carts/mine`, requestOptions) return fetch(`${vueAppMagenotApiUrl}/rest/crn_retailer/V1/carts/mine`, requestOptions)
}); });
export const doFetchCartId = wrapRequest(() => { export const doFetchCartId = wrapRequest(() => {
@ -167,7 +167,7 @@ export const doFetchCartId = wrapRequest(() => {
...authHeader() ...authHeader()
} }
}; };
return fetch(`${vueAppMagenotApiUrl}/rest/V1/carts/mine`, requestOptions) return fetch(`${vueAppMagenotApiUrl}/rest/crn_retailer/V1/carts/mine`, requestOptions)
}); });
export const doFetchCartProducts = wrapRequest((userCartId) => { export const doFetchCartProducts = wrapRequest((userCartId) => {
const requestOptions = { const requestOptions = {
@ -192,7 +192,7 @@ export const doFetchTotalAmt = wrapRequest(() => {
} }
}; };
return fetch(`${vueAppMagenotApiUrl}/rest/V1/carts/mine/totals`, requestOptions) return fetch(`${vueAppMagenotApiUrl}/rest/crn_retailer/V1/carts/mine/totals`, requestOptions)
}); });
export const doDeleteCartProduct = wrapRequest((productId) => { export const doDeleteCartProduct = wrapRequest((productId) => {
@ -205,7 +205,7 @@ export const doDeleteCartProduct = wrapRequest((productId) => {
...authHeader() ...authHeader()
} }
}; };
return fetch(`${vueAppMagenotApiUrl}/rest/V1/carts/mine/items/${productId}`, requestOptions) return fetch(`${vueAppMagenotApiUrl}/rest/crn_retailer/V1/carts/mine/items/${productId}`, requestOptions)
}); });
export const doPutCartItem = wrapRequest((sku, qty, quoteId, itemId, ccid, price, personalizeDetails) => { export const doPutCartItem = wrapRequest((sku, qty, quoteId, itemId, ccid, price, personalizeDetails) => {
@ -230,7 +230,7 @@ export const doPutCartItem = wrapRequest((sku, qty, quoteId, itemId, ccid, price
}) })
}; };
return fetch(`${vueAppMagenotApiUrl}/rest/V1/carts/mine/items/${sku}`, requestOptions) return fetch(`${vueAppMagenotApiUrl}/rest/crn_retailer/V1/carts/mine/items/${sku}`, requestOptions)
}); });
@ -243,7 +243,7 @@ export const doFetchCoupon = wrapRequest(() => {
...authHeader() ...authHeader()
} }
}; };
return fetch(`${vueAppMagenotApiUrl}/rest/V1/carts/mine/coupons`, requestOptions) return fetch(`${vueAppMagenotApiUrl}/rest/crn_retailer/V1/carts/mine/coupons`, requestOptions)
}); });
export const doApplyDiscountCode = wrapRequest((code) => { export const doApplyDiscountCode = wrapRequest((code) => {
@ -255,7 +255,7 @@ export const doApplyDiscountCode = wrapRequest((code) => {
...authHeader() ...authHeader()
} }
}; };
return fetch(`${vueAppMagenotApiUrl}/rest/V1/carts/mine/coupons/${code}`, requestOptions) return fetch(`${vueAppMagenotApiUrl}/rest/crn_retailer/V1/carts/mine/coupons/${code}`, requestOptions)
}); });
export const doRemoveDiscountCode = wrapRequest(() => { export const doRemoveDiscountCode = wrapRequest(() => {
const requestOptions = { const requestOptions = {
@ -266,7 +266,7 @@ export const doRemoveDiscountCode = wrapRequest(() => {
...authHeader() ...authHeader()
} }
}; };
return fetch(`${vueAppMagenotApiUrl}/rest/V1/carts/mine/coupons`, requestOptions) return fetch(`${vueAppMagenotApiUrl}/rest/crn_retailer/V1/carts/mine/coupons`, requestOptions)
}); });
export const doFetchGiftMessage = wrapRequest((quoteId, itemId) => { export const doFetchGiftMessage = wrapRequest((quoteId, itemId) => {
const requestOptions = { const requestOptions = {

View File

@ -2,10 +2,7 @@ import { doLogin } from '@/services/gate.service';
import { redirectToInterruptedPage } from '@/services/nav'; import { redirectToInterruptedPage } from '@/services/nav';
import { getAuthUser, setAuthUser, resetAuthUser } from '@/services/auth'; import { getAuthUser, setAuthUser, resetAuthUser } from '@/services/auth';
import { doUpdateSubscription } from '@/services/registration.service'; import { doUpdateSubscription } from '@/services/registration.service';
import { doFetchBasicInfo } from '@/services/user.service';
import { getField, updateField } from 'vuex-map-fields'; import { getField, updateField } from 'vuex-map-fields';
import { doPatchOne , doFetchUserImages} from '@/services/image.service';
import { doPatchOneBuilder , doFetchUserBuilderItemImages} from '@/services/builder_item.service';
export const auth = { export const auth = {
namespaced: true, namespaced: true,
state: { state: {
@ -108,29 +105,6 @@ export const auth = {
setOne({ commit }, one) { setOne({ commit }, one) {
commit('setOne', one); commit('setOne', one);
}, },
getUserImages: async()=>{
let guestQuoteId = localStorage.getItem("cr_studio_guestId");
if(guestQuoteId){
let userInfo = await doFetchBasicInfo();
let userId = userInfo.id;
let guestImages = await doFetchUserImages(guestQuoteId);
if(guestImages.length){
for(let i=0; i<guestImages.length; i++){
let imgObj = guestImages[i];
imgObj.owner_id = userId;
await doPatchOne(imgObj);
}
}
let guestBuilderImages = await doFetchUserBuilderItemImages(guestQuoteId);
if(guestBuilderImages.length){
for(let i=0; i<guestBuilderImages.length; i++){
let imgObj = guestBuilderImages[i];
imgObj.owner_id = userId;
await doPatchOneBuilder(imgObj);
}
}
localStorage.removeItem("cr_studio_guestId");
}
},
}, },
}; };

View File

@ -8,19 +8,12 @@ import { layout } from './retailer/layout';
import { registration } from './gate/registration.module'; import { registration } from './gate/registration.module';
import { meProductList } from './retailer/me_product.list'; import { meProductList } from './retailer/me_product.list';
import { accountOne } from './retailer/account.one'; import { accountOne } from './retailer/account.one';
import { storeCredit } from './retailer/me_store_credit';
import { productList } from './retailer/product.list'; import { productList } from './retailer/product.list';
import { productOne } from './retailer/product.one'; import { productOne } from './retailer/product.one';
import { cartProduct } from './retailer/guest_cart.one';
import { userCartProduct } from './retailer/user_cart.one'; import { userCartProduct } from './retailer/user_cart.one';
import { auth } from './gate/auth.module'; import { auth } from './gate/auth.module';
import { headerCategoryList } from './retailer/header'; import { headerCategoryList } from './retailer/header';
import { guestInfo } from './retailer/guestInfo.one';
import { giftCartProducts } from './retailer/gift_cart.one';
import { block } from './retailer/block.js';
import { emailSubscriber } from './retailer/email_subscriber.js';
import { meProductOne } from './retailer/me_product.one'; import { meProductOne } from './retailer/me_product.one';
import { pdfDocOne } from './retailer/pdfdoc.one';
import { catalogBrowser } from './retailer/catalog_browser'; import { catalogBrowser } from './retailer/catalog_browser';
Vue.use(Vuex) Vue.use(Vuex)
@ -36,17 +29,10 @@ const store = new Vuex.Store({
meProductList, meProductList,
accountOne, accountOne,
productList, productList,
productOne, productOne,
cartProduct, userCartProduct,
userCartProduct, meProductOne,
guestInfo, catalogBrowser
giftCartProducts,
block,
emailSubscriber,
meProductOne,
storeCredit,
pdfDocOne,
catalogBrowser,
} }
}) })

View File

@ -1,31 +0,0 @@
import {
doEmailSubscriber
} from '@/services/subscriber.service';
import { getField, updateField } from 'vuex-map-fields';
/* eslint-disable no-alert, no-console , no-debugger */
export const emailSubscriber = {
namespaced: true,
state: {
inProgress: true,
},
getters: {
getField
},
mutations: {
updateField,
inProgress(state, yesOrNo) {
state.inProgress = yesOrNo
},
},
actions: {
fetchEmailSubscriber: async({ commit }, data) => {
try {
commit('inProgress', true);
const cartProduct = await doEmailSubscriber(data.email);
return cartProduct;
} catch (err) {
throw err;
}
}
},
}

View File

@ -1,146 +0,0 @@
import {
doFetchQuote,
doFetchCartProducts,
doDeleteCartProduct,
doPutCartItem,
doPostGiftCartItem
} from '@/services/gift_cart.service';
import { getField, updateField } from 'vuex-map-fields';
import humps from 'lodash-humps';
import { getCookieByName, setCookieByName } from '@/services/auth';
import { listrakCartListClear } from "@/services/util.service";
export const giftCartProducts = {
namespaced: true,
state: {
inProgress: false,
fetchInProgress: false,
cartProduct: [],
cartProductList: [],
productTotalAmt: [],
giftCartDetails: {
"senderName": "",
"senderEmail": "",
"recipientName": "",
"recipientEmail": "",
"senderMessage": "",
"giftCardQty": "",
"giftCardAmt": ""
}
},
getters: {
getField
},
mutations: {
updateField,
inProgress(state, yesOrNo) {
state.inProgress = yesOrNo
},
fetchInProgress(state, yesOrNo) {
state.fetchInProgress = yesOrNo
},
setCartProduct(state, product) {
state.cartProduct = product
},
setCartProductList(state, list) {
state.cartProductList = list
},
setListrakCartListClear(){
listrakCartListClear()
},
},
actions: {
addToGiftCart: async({ commit, dispatch, state}, data) => {
/* eslint-disable */
debugger
try {
commit('inProgress', true);
let guestQuoteId = getCookieByName("cr_guestQuoteId");
if (!guestQuoteId) {
const guestQuote = await doFetchQuote();
setCookieByName("cr_guestQuoteId", guestQuote)
const cartProduct = await doPostGiftCartItem(data, guestQuote,state.giftCartDetails);
if (cartProduct) {
commit('setCartProduct', (cartProduct));
dispatch('cartProductList', guestQuote);
dispatch('productTotalAmt', guestQuote);
}
} else {
const cartProduct = await doPostGiftCartItem(data, guestQuoteId, state.giftCartDetails);
if (cartProduct) {
commit('setCartProduct', (cartProduct));
dispatch('cartProductList', guestQuoteId);
dispatch('productTotalAmt', guestQuoteId);
}
}
commit('inProgress', false);
commit('setCartDrawer', true);
} catch (err) {
commit('inProgress', false);
throw err;
}
},
/* addToGiftCart: async({ commit, dispatch, state }) => {
try {
commit('inProgress', true);
if (!state.cartProductList.id) {
const userQuote = await doFetchQuote();
localStorage.setItem("cr_userQuoteId", userQuote);
await doPostGiftCartItem(state.giftCartDetails);
dispatch('cartProductList');
} else {
await doPostGiftCartItem(state.giftCartDetails);
dispatch('cartProductList');
}
commit('inProgress', false);
} catch (err) {
commit('inProgress', false);
throw err;
}
},*/
cartProductList: async({ commit },guestQuoteId) => {
doFetchCartProducts(guestQuoteId).then((cartProductList) => commit('setCartProductList', humps(cartProductList)))
.catch((error) => error)
},
removeCartProduct: async({ commit, dispatch }, { productId }) => {
try {
commit('fetchInProgress', true);
let trueOrFalse = await doDeleteCartProduct(productId);
if (trueOrFalse) {
await dispatch('cartProductList');
}
commit('fetchInProgress', false);
} catch (err) {
commit('fetchInProgress', false);
throw err;
}
},
updateToCart: async({ commit, dispatch }, data) => {
try {
commit('inProgress', true);
const cartProduct = await doPutCartItem(data.sku, data.qty, data.userQuote, data.itemId);
if (cartProduct) {
commit('setCartProduct', (cartProduct));
dispatch('cartProductList');
}
commit('inProgress', false);
} catch (err) {
commit('inProgress', false);
throw err;
}
},
setListrakCartListClear: async({ commit,state }) => {
if(state.cartProductList.length <= 0)
{
commit('setListrakCartListClear');
}
},
}
}

View File

@ -1,279 +0,0 @@
import { doFetchBasicInfo, doUpdateAddress, doFetchEstimatedShippingMethods, doShippingInformation, doFetchCheckEmailAvailable, doProductsOrder, doProductsOrderOnCC } from '@/services/guest.service';
import { doFetchQuote } from '@/services/guest_cart.service';
import { getCookieByName, setCookieByName } from '@/services/auth';
import { invalidPoBoxAddress,listrakEmailCapture } from '@/services/util.service';
import { getField, updateField } from 'vuex-map-fields';
import humps from 'lodash-humps';
const addresses = {
"regionId": "",
"region": [],
"countryId": "",
"postcode": "",
"city": "",
"telephone": "",
"firstname": "",
"lastname": "",
// "defaultShipping": "false",
// "defaultBilling": "false"
}
const defaultAddress = {
"defaultShipping": 0,
"defaultBilling": 0
}
const streetNew = {
"streetNoOne": "",
"streetNoTwo": "",
}
export const guestInfo = {
namespaced: true,
state: {
one: {},
address: {},
oneAddress: {},
shippingMethods: null,
estimatedShipping: [],
shippingInformation: null,
//successMessage: null,
inProgress: false,
fetchInProgress: false,
checkEmail: false,
emailCheckInProgress: false,
paymentInProgress: false,
guestQuoteId: getCookieByName("cr_guestQuoteId"),
errorMessage: null,
shippingInformationsInProgress: false,
addressContainPOBox: null,
suggestedAddress: {}
},
getters: {
getField,
},
mutations: {
updateField,
setOne(state, one) {
state.one = Object.assign({}, state.one, defaultAddress, one);
state.one.defaultShipping = Number(state.one.defaultShipping);
state.one.defaultBilling = Number(state.one.defaultBilling);
},
setAddress(state, address) {
if (address) {
state.address = Object.assign({}, state.address, address, streetNew);
state.address.streetNoOne = address.street[0];
state.address.streetNoTwo = address.street[1];
state.address.countryId= state.address.countryId ? state.address.countryId :"US" ;
} else {
state.address = Object.assign({}, state.address, addresses, streetNew);
state.address.firstname = state.one.firstname;
state.address.lastname = state.one.lastname;
state.address.countryId= state.address.countryId ? state.address.countryId :"US" ;
}
},
setSuggestedAddress(state, addressNew) {
state.suggestedAddress = Object.assign({}, state.suggestedAddress, addressNew, streetNew);
state.suggestedAddress.streetNoOne = addressNew.street[0];
state.suggestedAddress.streetNoTwo = addressNew.street[1];
},
setEstimatedShipping(state, shipping) {
state.estimatedShipping = shipping;
},
/*successMessage(state, successMessage) {
state.successMessage = successMessage;
},*/
inProgress(state, yesOrNo) {
state.inProgress = yesOrNo
},
shippingInformationsInProgress(state, yesOrNo) {
state.shippingInformationsInProgress = yesOrNo
},
emailCheckInProgress(state, yesOrNo) {
state.emailCheckInProgress = yesOrNo
},
setEmailCheck(state, checkEmail) {
state.checkEmail = checkEmail
},
errorMessage(state, message) {
state.errorMessage = message
},
fetchInProgress(state, yesOrNo) {
state.fetchInProgress = yesOrNo
},
setShippingInformation(state, shippingInformation) {
state.shippingInformation = shippingInformation;
},
formatOneAddress(state) {
let streetAddress = [];
let streetArray = [];
if (state.address.streetNoTwo == " " || state.address.streetNoTwo == undefined) {
streetAddress[0] = state.address.streetNoOne;
streetArray = streetAddress.filter(v => v != '');
} else {
streetAddress[0] = state.address.streetNoOne
streetAddress[1] = state.address.streetNoTwo;
streetArray = streetAddress.filter(v => v != '');
}
let formatedAddress = {
"region_id": state.address.regionId,
"country_id": state.address.countryId,
"street": streetArray,
"postcode": state.address.postcode,
"city": state.address.city,
"telephone": state.address.telephone,
"firstname": state.address.firstname,
"lastname": state.address.lastname,
}
state.oneAddress = formatedAddress;
},
paymentInProgress(state, yesOrNo) {
state.paymentInProgress = yesOrNo
},
checkPOBoxAddress(state, address) {
let streetAddress = address.street;
if (streetAddress.length) {
if (streetAddress[0]) {
if (invalidPoBoxAddress(streetAddress[0])) {
state.addressContainPOBox = true;
} else {
state.addressContainPOBox = false;
}
}
if (streetAddress[1]) {
if (invalidPoBoxAddress(streetAddress[1])) {
state.addressContainPOBox = true;
} else {
state.addressContainPOBox = false;
}
}
}
}
},
actions: {
basicInfo: async({ state, commit }) => {
try {
const basicInfo = await doFetchBasicInfo();
if (basicInfo) {
commit('setOne', humps(basicInfo));
commit('setAddress', humps(basicInfo.addresses[0]));
commit('checkPOBoxAddress', humps(basicInfo.addresses[0]));
}
} catch (err) {
state.errorMessage = err.message;
}
},
updateAddress: async({ state, commit }) => {
commit('inProgress', true);
try {
const basicInfo = await doUpdateAddress(state.one, state.address);
if (basicInfo) {
//commit('successMessage', 'Address Updated Successfully');
commit('inProgress', false);
commit('setOne', humps(basicInfo));
commit('setAddress', humps(basicInfo.addresses[0]));
commit('checkPOBoxAddress', humps(basicInfo.addresses[0]));
}
} catch (err) {
state.errorMessage = err.message;
commit('inProgress', false);
}
},
setEstimatedShipping: async({ state, commit }, email) => {
commit('inProgress', true);
try {
commit('checkPOBoxAddress', humps(state.address));
let guestQuoteId = state.guestQuoteId ? state.guestQuoteId : getCookieByName("cr_guestQuoteId");
const shippMethods = await doFetchEstimatedShippingMethods(state.address, email, guestQuoteId);
listrakEmailCapture(email);
commit('setEstimatedShipping', humps(shippMethods));
commit('inProgress', false);
} catch (err) {
commit('inProgress', false);
throw err;
//state.errorMessage = err.message;
}
},
setShippingInformation: async({ state, commit }, data) => {
commit('shippingInformationsInProgress', true);
try {
commit('checkPOBoxAddress', humps(state.address));
let guestQuoteId = state.guestQuoteId ? state.guestQuoteId : getCookieByName("cr_guestQuoteId");
const shippingInformation = await doShippingInformation(state.address, data.method, data.email, guestQuoteId, state.suggestedAddress);
localStorage.setItem("cr_guestShippingAddress", JSON.stringify(humps(shippingInformation)));
commit('shippingInformationsInProgress', false);
commit('setShippingInformation', humps(shippingInformation));
localStorage.setItem("cr_checkOutTab", 'reviewTab');
} catch (err) {
commit('shippingInformationsInProgress', false);
throw err;
}
},
setShippingAddress: async({ state, commit }) => {
commit('setAddress', state.address);
commit('checkPOBoxAddress', humps(state.address));
},
checkPOBoxAddress: async({ commit }, address) => {
commit('checkPOBoxAddress', address);
},
checkEmailAvailable: async({ commit }, email) => {
try {
commit('emailCheckInProgress', true);
const checkEmail = await doFetchCheckEmailAvailable(email);
if (checkEmail) {
commit('setEmailCheck', checkEmail);
commit('emailCheckInProgress', false);
return ({ exist: true });
} else {
commit('emailCheckInProgress', false);
return ({ exist: false });
}
} catch (err) {
commit('emailCheckInProgress', false);
}
},
setOrder: async({ state, commit }, { userEmail, paymentMethod }) => {
try {
commit('paymentInProgress', true);
commit('formatOneAddress');
commit('checkPOBoxAddress', humps(state.oneAddress));
let guestQuoteId = state.guestQuoteId ? state.guestQuoteId : getCookieByName("cr_guestQuoteId");
if (guestQuoteId) {
let res = await doProductsOrder(userEmail, guestQuoteId, paymentMethod, state.oneAddress);
const guestQuote = await doFetchQuote();
commit('paymentInProgress', false);
setCookieByName("cr_guestQuoteId", guestQuote);
return res;
}
} catch (error) {
commit('errorMessage', error.message);
commit('paymentInProgress', false);
throw error;
}
},
setPaymentInProgress: async({ commit }, flag) => {
commit('paymentInProgress', flag);
},
setCCOrder: async({ commit }, { orderNumber, shippingAddress, webOrderNumber }) => {
try {
await doProductsOrderOnCC(orderNumber, shippingAddress, webOrderNumber);
} catch (error) {
commit('errorMessage', error.message);
}
},
/*setPersonalizeOrder: async({ commit }, {order}) => {
try {
await doProductsOrderOnPersonalize(order);
} catch (error) {
commit('errorMessage', error.message);
}
},*/
setUserAddress: async({ commit }, address) => {
commit('setSuggestedAddress', address);
},
}
}

View File

@ -1,398 +0,0 @@
import {
doPostCartItem,
doFetchQuote,
doFetchCartProducts,
doFetchTotalAmt,
doDeleteCartProduct,
doPutCartItem,
doFetchCoupon,
doApplyDiscountCode,
doRemoveDiscountCode,
doFetchCartId,
doPostGiftCartItem,
doPutGiftCartItem,
doPostConfiguredCartItem,
doPutConfiguredCartItem,
doFetchGiftMessage,
doPutCConectionCartItem
} from '@/services/guest_cart.service';
import { getField, updateField } from 'vuex-map-fields';
import humps from 'lodash-humps';
import { getCookieByName, setCookieByName } from '@/services/auth';
import { criteoViewBasket ,listrakCartList,listrakCartListClear
} from "@/services/util.service";
/* eslint-disable no-alert, no-console , no-debugger */
export const cartProduct = {
namespaced: true,
state: {
cartDrawer: false,
inProgress: false,
fetchInProgress: false,
cartProduct: [],
cartProductList: [],
productTotalAmt: [],
productMedia: {},
discountCode: null,
errorMessage: null,
cartProductsProgress: false,
cartTotalAmtProgress: false,
giftCartDetailsGuest: {
"senderNameGuest": "",
"senderEmailGuest": "",
"recipientNameGuest": "",
"recipientEmailGuest": "",
"senderMessageGuest": "",
//"giftCardQty": "",
"giftCardAmtGuest": ""
},
giftMessageData: {}
//guestQuoteId: getCookieByName("guestQuoteId")
},
getters: {
getField
},
mutations: {
updateField,
inProgress(state, yesOrNo) {
state.inProgress = yesOrNo
},
cartProductsProgress(state, yesOrNo) {
state.cartProductsProgress = yesOrNo
},
cartTotalAmtProgress(state, yesOrNo) {
state.cartTotalAmtProgress = yesOrNo
},
setCartDrawer(state, yesOrNo) {
state.cartDrawer = yesOrNo
},
fetchInProgress(state, yesOrNo) {
state.fetchInProgress = yesOrNo
},
setCartProduct(state, product) {
state.cartProduct = product
},
setCartProductList(state, list) {
state.cartProductList = list
// criteoViewBasket(list);
},
setCriteoViewBasket(state) {
criteoViewBasket(state.cartProductList);
},
setListrakCartList(state) {
listrakCartList(state.cartProductList);
},
setListrakCartListClear(){
listrakCartListClear()
},
setProductAmt(state, amt) {
state.productTotalAmt = amt;
},
setProductsMedia(state, media) {
state.productMedia = media
},
setCouponCode(state, code) {
state.discountCode = code.toString();
},
setErrorMessage(state, err) {
state.errorMessage = err
},
setGiftMessageData(state, giftMessage) {
state.giftCartDetailsGuest.senderNameGuest = giftMessage[0].productOption.infoBuyRequest.giftcardSenderName,
state.giftCartDetailsGuest.senderEmailGuest = giftMessage[0].productOption.infoBuyRequest.giftcardSenderEmail,
state.giftCartDetailsGuest.recipientNameGuest = giftMessage[0].productOption.infoBuyRequest.giftcardRecipientName,
state.giftCartDetailsGuest.recipientEmailGuest = giftMessage[0].productOption.infoBuyRequest.giftcardRecipientEmail,
state.giftCartDetailsGuest.senderMessageGuest = giftMessage[0].productOption.infoBuyRequest.giftcardMessage,
state.giftCartDetailsGuest.giftCardAmtGuest = (giftMessage[0].productOption.infoBuyRequest.giftcardAmount)
},
},
actions: {
addToCart: async({ commit, dispatch }, data) => {
try {
let cartProduct;
commit('inProgress', true);
let guestQuoteId = getCookieByName("cr_guestQuoteId");
if (!guestQuoteId) {
const guestQuote = await doFetchQuote();
setCookieByName("cr_guestQuoteId", guestQuote)
cartProduct = await doPostCartItem(data.sku, data.qty, data.ccid, data.price, data.personalizeDetails, guestQuote);
if (cartProduct) {
commit('setCartProduct', (cartProduct));
dispatch('cartProductList', guestQuote);
dispatch('productTotalAmt', guestQuote);
}
} else {
cartProduct = await doPostCartItem(data.sku, data.qty, data.ccid, data.price, data.personalizeDetails, guestQuoteId);
if (cartProduct) {
commit('setCartProduct', (cartProduct));
dispatch('cartProductList', guestQuoteId);
dispatch('productTotalAmt', guestQuoteId);
}
}
commit('inProgress', false);
commit('setCartDrawer', true);
return cartProduct;
} catch (err) {
commit('inProgress', false);
throw err;
}
},
addToConfiguredCart: async({ commit, dispatch }, data) => {
try {
commit('inProgress', true);
let cartProduct;
let guestQuoteId = getCookieByName("cr_guestQuoteId");
if (!guestQuoteId) {
const guestQuote = await doFetchQuote();
setCookieByName("cr_guestQuoteId", guestQuote)
cartProduct = await doPostConfiguredCartItem(data.sku, data.qty, data.typeId, data.optionId, data.optionValue, guestQuote);
if (cartProduct) {
commit('setCartProduct', (cartProduct));
dispatch('cartProductList', guestQuote);
dispatch('productTotalAmt', guestQuote);
}
} else {
cartProduct = await doPostConfiguredCartItem(data.sku, data.qty, data.typeId, data.optionId, data.optionValue, guestQuoteId);
if (cartProduct) {
commit('setCartProduct', (cartProduct));
dispatch('cartProductList', guestQuoteId);
dispatch('productTotalAmt', guestQuoteId);
}
}
commit('inProgress', false);
commit('setCartDrawer', true);
return cartProduct;
} catch (err) {
commit('inProgress', false);
throw err;
}
},
addToGiftCart: async({ commit, dispatch, state }, data) => {
try {
commit('inProgress', true);
let cartProduct;
let guestQuoteId = getCookieByName("cr_guestQuoteId");
if (!guestQuoteId) {
const guestQuote = await doFetchQuote();
setCookieByName("cr_guestQuoteId", guestQuote)
cartProduct = await doPostGiftCartItem(data, guestQuote, state.giftCartDetailsGuest);
if (cartProduct) {
commit('setCartProduct', (cartProduct));
dispatch('cartProductList', guestQuote);
dispatch('productTotalAmt', guestQuote);
}
} else {
cartProduct = await doPostGiftCartItem(data, guestQuoteId, state.giftCartDetailsGuest);
if (cartProduct) {
commit('setCartProduct', (cartProduct));
dispatch('cartProductList', guestQuoteId);
dispatch('productTotalAmt', guestQuoteId);
}
}
commit('inProgress', false);
commit('setCartDrawer', true);
return cartProduct;
} catch (err) {
commit('inProgress', false);
throw err;
}
},
productTotalAmt: async({ commit }, guestQuoteId) => {
commit('cartTotalAmtProgress', true);
doFetchTotalAmt(guestQuoteId).then((productTotalAmt) => {
commit('cartTotalAmtProgress', false)
commit('setProductAmt', humps(productTotalAmt))
})
.catch(() => commit('cartTotalAmtProgress', false))
},
cartProductList: async({ commit }, guestQuoteId) => {
commit('setCartProductList', []);
commit('cartProductsProgress', true);
await doFetchCartId(guestQuoteId).then(async(cartProductDetails) => {
const cartProductList = await doFetchCartProducts(cartProductDetails.id);
commit('setCartProductList', humps(cartProductList))
commit('cartProductsProgress', false);
})
.catch(() => commit('cartProductsProgress', false))
},
removeCartProduct: async({ commit, dispatch }, productId) => {
let guestQuoteId = getCookieByName("cr_guestQuoteId");
try {
commit('cartProductsProgress', true);
commit('cartTotalAmtProgress', true);
let trueOrFalse = await doDeleteCartProduct(productId, guestQuoteId);
if (trueOrFalse) {
commit('cartProductsProgress', false);
commit('cartTotalAmtProgress', true);
commit('setCartDrawer', false);
await dispatch('cartProductList', guestQuoteId);
dispatch('productTotalAmt', guestQuoteId);
dispatch('setListrakCartListClear')
}
} catch (err) {
commit('cartProductsProgress', false);
commit('cartTotalAmtProgress', true)
throw err;
}
},
updateToCart: async({ commit, dispatch }, data) => {
let guestQuoteId = getCookieByName("cr_guestQuoteId");
try {
commit('cartProductsProgress', true);
const cartProduct = await doPutCartItem(data.sku, data.qty, guestQuoteId, data.itemId, data.ccid, data.price, data.personalizeDetails, data.optionId, data.optionValue);
if (cartProduct) {
commit('cartProductsProgress', false);
if (data.routeName != 'CartProducts') {
commit('setCartDrawer', true);
}
commit('setCartProduct', (cartProduct));
dispatch('cartProductList', guestQuoteId);
dispatch('productTotalAmt', guestQuoteId);
return (cartProduct);
}
} catch (err) {
commit('cartProductsProgress', false);
dispatch('cartProductList', guestQuoteId);
dispatch('productTotalAmt', guestQuoteId);
throw err;
}
},
updateToCConectionCart: async({ commit }, data) => {
try {
commit('cartProductsProgress', true);
const response = await doPutCConectionCartItem(data.sku, data.qty, data.ccid);
commit('cartProductsProgress', false);
return (response);
} catch (err) {
commit('cartProductsProgress', false);
throw err;
}
},
updateToConfiguredCart: async({ commit, dispatch }, data) => {
let guestQuoteId = getCookieByName("cr_guestQuoteId");
try {
commit('cartProductsProgress', true);
const cartProduct = await doPutConfiguredCartItem(data.sku, data.qty, guestQuoteId, data.itemId, data.optionId, data.optionValue);
if (cartProduct) {
commit('cartProductsProgress', false);
if (data.routeName != 'CartProducts') {
commit('setCartDrawer', true);
}
commit('setCartProduct', (cartProduct));
dispatch('cartProductList', guestQuoteId);
dispatch('productTotalAmt', guestQuoteId);
}
} catch (err) {
dispatch('cartProductList', guestQuoteId);
dispatch('productTotalAmt', guestQuoteId);
commit('cartProductsProgress', false);
throw err;
}
},
updateToGiftCart: async({ commit, dispatch, state }, data) => {
let guestQuoteId = getCookieByName("cr_guestQuoteId");
try {
commit('inProgress', true);
const cartProduct = await doPutGiftCartItem(data, guestQuoteId, state.giftCartDetailsGuest);
if (cartProduct) {
commit('inProgress', false);
if (data.routeName != 'CartProducts') {
commit('setCartDrawer', true);
}
commit('setCartProduct', (cartProduct));
dispatch('cartProductList', guestQuoteId);
dispatch('productTotalAmt', guestQuoteId);
}
} catch (err) {
dispatch('cartProductList', guestQuoteId);
dispatch('productTotalAmt', guestQuoteId);
commit('inProgress', false);
throw err;
}
},
cartDrawer: async({ commit }, flag) => {
commit('setCartDrawer', flag)
},
fetchCartCoupon: async({ commit }, guestQuoteId) => {
commit('fetchInProgress', true);
try {
let coupon = await doFetchCoupon(guestQuoteId);
if (coupon) {
commit('fetchInProgress', false);
commit('setCouponCode', coupon);
}
} catch (err) {
commit('fetchInProgress', false);
throw err;
}
},
applyDiscountCode: async({ commit, dispatch }, data) => {
commit('fetchInProgress', true);
try {
let coupon = await doApplyDiscountCode(data.discountTextCode, data.guestQuoteId);
if (coupon) {
commit('fetchInProgress', false);
dispatch('fetchCartCoupon', data.guestQuoteId);
}
} catch (err) {
commit('fetchInProgress', false);
throw err;
}
},
removeDiscountCode: async({ commit, dispatch }, data) => {
commit('fetchInProgress', true);
try {
let coupon = await doRemoveDiscountCode(data.guestQuoteId);
if (coupon) {
commit('fetchInProgress', false);
dispatch('fetchCartCoupon', data.guestQuoteId);
}
} catch (err) {
commit('fetchInProgress', false);
throw err;
}
},
fetchGiftMessage: async({ commit }, data) => {
let guestQuoteId = getCookieByName("cr_guestQuoteId");
commit('fetchInProgress', true);
try {
await doFetchCartId(guestQuoteId).then(async(cartProductDetails) => {
const giftMessageData = await doFetchGiftMessage(cartProductDetails.id, data.itemId);
if (giftMessageData) {
commit('fetchInProgress', false);
commit('setGiftMessageData', humps(giftMessageData));
}
})
} catch (err) {
commit('fetchInProgress', false);
throw err;
}
},
setCriteoViewBasket: async({ commit ,state}) => {
if(state.cartProductList.length > 0)
{
commit('setCriteoViewBasket');
}
},
setListrakCartList: async({ commit ,state}) => {
if(state.cartProductList.length > 0)
{
commit('setListrakCartList');
}
},
setListrakCartListClear: async({ commit,state }) => {
if(state.cartProductList.length <= 0)
{
commit('setListrakCartListClear');
}
},
}
}

View File

@ -1,4 +1,3 @@
import { doFetchHeroContent } from '@/services/hero_content.service';
import { doFetchCmsList, doFetchPageList } from '@/services/cache.service'; import { doFetchCmsList, doFetchPageList } from '@/services/cache.service';
import { getField, updateField } from 'vuex-map-fields'; import { getField, updateField } from 'vuex-map-fields';
import humps from 'lodash-humps'; import humps from 'lodash-humps';
@ -55,21 +54,7 @@ export const layout = {
actions: { actions: {
updateCategoryQueryParam({ commit }, values) { updateCategoryQueryParam({ commit }, values) {
commit('setCategoryQueryParam', values); commit('setCategoryQueryParam', values);
}, },
fetchHeroContent: async({ commit }, categoryId) => {
try {
commit('inProgress', true);
const heroContent = await doFetchHeroContent(categoryId);
if (heroContent) {
commit('inProgress', false);
commit('setHeroContent', humps(heroContent));
}
return humps(heroContent);
} catch (error) {
commit('inProgress', false);
throw error
}
},
showSnackbar({ commit }, obj) { showSnackbar({ commit }, obj) {
commit('setSnackbar', obj); commit('setSnackbar', obj);
}, },

View File

@ -1,117 +0,0 @@
import { doFetchGiftCardBalance, doPostRedeemGiftCard, doFetchGiftCardCreditBalance, doPostStoreCredit, doFetchBalanceHistory } from '@/services/store_credit.service';
import { getField, updateField } from 'vuex-map-fields';
import humps from 'lodash-humps';
export const storeCredit = {
namespaced: true,
state: {
inProgress: false,
giftCardBalance:'',
redeemCard:'',
giftCardCreditBalance:{},
applyStoreCredit:'',
storeCreditInProgress:false,
balanceHistory:{}
},
getters: {
getField,
},
mutations: {
updateField,
inProgress(state, yesOrNo) {
state.inProgress = yesOrNo
},
storeCreditInProgress(state, yesOrNo) {
state.storeCreditInProgress = yesOrNo
},
setGiftCardBalance(state, Balance) {
state.giftCardBalance = Balance;
},
setGiftCardDetails(state, Details) {
state.redeemCard = Details;
},
setGiftCardCreditBalance(state, Details) {
state.giftCardCreditBalance = Details;
},
setApplyStoreCredit(state, credit) {
state.applyStoreCredit = credit;
},
setBalanceHistory(state, balance) {
state.balanceHistory = balance;
}
},
actions: {
redeemGiftCard: async ({ commit }, giftCardCode) => {
commit('inProgress', true);
try {
const redeemCard = await doPostRedeemGiftCard(giftCardCode);
if (redeemCard) {
commit('setGiftCardDetails', humps(redeemCard));
commit('inProgress', false);
}
} catch (err) {
commit('inProgress', false);
throw err;
}
},
fetchGiftCardBalance: async ({ commit }, giftCardCode) => {
commit('inProgress', true);
try {
const giftCardBalance = await doFetchGiftCardBalance(giftCardCode);
if (giftCardBalance) {
commit('setGiftCardBalance', humps(giftCardBalance));
commit('inProgress', false);
}else{
commit('setGiftCardBalance', humps(giftCardBalance));
commit('inProgress', false);
}
} catch (err) {
commit('inProgress', false);
throw err;
}
},
fetchGiftCardCreditBalance: async ({ commit }, customerId) => {
commit('inProgress', true);
try {
const giftCardCreditBalance = await doFetchGiftCardCreditBalance(customerId);
if (giftCardCreditBalance) {
commit('setGiftCardCreditBalance', humps(giftCardCreditBalance));
commit('inProgress', false);
}
} catch (err) {
commit('inProgress', false);
throw err;
}
},
fetchBalanceHistory: async ({ commit }, customerId) => {
commit('inProgress', true);
try {
const balanceHistory = await doFetchBalanceHistory(customerId);
if (balanceHistory) {
commit('setBalanceHistory', humps(balanceHistory));
commit('inProgress', false);
}
} catch (err) {
commit('inProgress', false);
throw err;
}
},
applyStoreCredit: async ({ commit }) => {
commit('storeCreditInProgress', true);
try {
const applyStoreCredit = await doPostStoreCredit();
/* eslint-disable */
//debugger
if (applyStoreCredit) {
commit('setApplyStoreCredit', humps(applyStoreCredit));
commit('storeCreditInProgress', false);
}
} catch (err) {
commit('storeCreditInProgress', false);
throw err;
}
},
}
}

View File

@ -1,94 +0,0 @@
import { doFetchOne, doPostOne, doPatchOne} from '@/services/pdfdoc.service';
import { checkEncodeURI } from '@/services/util.service';
import { getField, updateField } from 'vuex-map-fields';
import humps from 'lodash-humps';
export const pdfDocOne = {
namespaced: true,
state: {
one: {},
inProgress: false,
},
getters: {
getField,
},
mutations: {
updateField,
setOne(state, one) {
state.one = one;
//state.one.workflowData=state.one.workflowData? JSON.stringify(state.one.workflowData):'';
state.one.partOrder=state.one.partOrder?state.one.partOrder.toString():'0';
if (checkEncodeURI(state.one.svgContent))
state.one.svgContent = decodeURIComponent(escape(atob(state.one.svgContent)));
},
inProgress(state, yesOrNo) {
state.inProgress = yesOrNo
},
},
actions: {
new({ commit }) {
commit('inProgress', false);
// commit('setOne', {
// "appId": "crane",
// "organizationId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
// "omsOrderId": "",
// "partOrder":"",
// "productPartId":"",
// "svgContent":"",
// "workflowData":{},
// "type":"",
// "tags": [],
// "status": null,
// });
},
fetchOne: async ({ commit }, { pdfDocId }) => {
try {
commit('inProgress', true);
const list = await doFetchOne(pdfDocId);
const one = list[0];
commit('setOne', one);
commit('inProgress', false);
}
catch (err) {
commit('inProgress', false);
throw err;
}
},
save: async ({ commit, state }, extraData) => {
commit('inProgress', true);
try {
if (undefined === state.one.id) {
await doPostOne((Object.assign({}, state.one, extraData)));
commit('inProgress', false);
return ({ new: true });
}
else {
await doPatchOne(state.one);
commit('inProgress', false);
return ({ update: true });
}
}
catch (err) {
commit('inProgress', false);
throw err;
}
},
setOne: async ({ commit }, page) => {
commit('setOne', humps(page));
},
update: async ({ commit }, pdfDoc) => {
commit('inProgress', true);
try {
await doPatchOne(pdfDoc);
commit('inProgress', false);
return ({ update: true });
}
catch (err) {
commit('inProgress', false);
throw err;
}
}
},
}

View File

@ -8723,7 +8723,7 @@ text-table@^0.2.0:
thenify-all@^1.0.0: thenify-all@^1.0.0:
version "1.6.0" version "1.6.0"
resolved "https://registry.yarnpkg.com/thenify-all/-/thenify-all-1.6.0.tgz#1a1918d402d8fc3f98fbf234db0bcc8cc10e9726" resolved "https://registry.yarnpkg.com/thenify-crn_retailer/-/thenify-all-1.6.0.tgz#1a1918d402d8fc3f98fbf234db0bcc8cc10e9726"
integrity sha1-GhkY1ALY/D+Y+/I02wvMjMEOlyY= integrity sha1-GhkY1ALY/D+Y+/I02wvMjMEOlyY=
dependencies: dependencies:
thenify ">= 3.1.0 < 4" thenify ">= 3.1.0 < 4"