fixes
This commit is contained in:
parent
7f61304766
commit
aecadf3107
|
@ -0,0 +1 @@
|
||||||
|
{"branch_name":"beta","last_commit_date":"2022-01-19T16:45:44.000Z","last_commit_author":"sidharth","last_commit_hash":"7f61304766a9347d1adbea8794f6276df2d35e68"}
|
|
@ -104,7 +104,7 @@ margin-bottom: 0px !important;
|
||||||
.me-header-search-field .theme--dark.v-label {
|
.me-header-search-field .theme--dark.v-label {
|
||||||
color:#1d1d1d;
|
color:#1d1d1d;
|
||||||
}
|
}
|
||||||
.v-menu__content,.v-list{
|
/*.v-menu__content,.v-list{
|
||||||
border-radius: 0px !important;
|
border-radius: 0px !important;
|
||||||
top: 64px !important;
|
top: 64px !important;
|
||||||
}
|
}*/
|
||||||
|
|
|
@ -76,7 +76,7 @@
|
||||||
class="text-uppercase ls-0 body productpage-button"
|
class="text-uppercase ls-0 body productpage-button"
|
||||||
tile
|
tile
|
||||||
depressed
|
depressed
|
||||||
@click="addToCart(product.sku)"
|
@click="addToCart(product.sku,product.mq)"
|
||||||
>
|
>
|
||||||
<v-progress-circular
|
<v-progress-circular
|
||||||
align="center"
|
align="center"
|
||||||
|
@ -106,20 +106,17 @@
|
||||||
}}</v-alert>
|
}}</v-alert>
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
|
|
||||||
<SnackbarComponent :snackbar="snackbar"></SnackbarComponent>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
/* eslint-disable no-alert, no-console , no-debugger */
|
/* eslint-disable no-alert, no-console , no-debugger */
|
||||||
//import * as easings from "vuetify/es5/services/goto/easing-patterns";
|
//import * as easings from "vuetify/es5/services/goto/easing-patterns";
|
||||||
import { mapState } from "vuex";
|
import { mapState } from "vuex";
|
||||||
import SnackbarComponent from "@/components/common/SnackbarComponent";
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "RetailerSearchProducts",
|
name: "RetailerSearchProducts",
|
||||||
components: {
|
components: {
|
||||||
SnackbarComponent
|
|
||||||
},
|
},
|
||||||
props: [
|
props: [
|
||||||
"criteria",
|
"criteria",
|
||||||
|
@ -172,29 +169,29 @@ export default {
|
||||||
var with2Decimals = num.toString().match(/^-?\d+(?:\.\d{0,2})?/)[0];
|
var with2Decimals = num.toString().match(/^-?\d+(?:\.\d{0,2})?/)[0];
|
||||||
return with2Decimals;
|
return with2Decimals;
|
||||||
},
|
},
|
||||||
addToCart(sku) {
|
async addToCart(sku,qty) {
|
||||||
if (sku) {
|
if (sku) {
|
||||||
this.errorMessage = "";
|
debugger
|
||||||
if (this.userAuth) {
|
if (this.userAuth) {
|
||||||
this.$store
|
await this.$store
|
||||||
.dispatch("userCartProduct/addToCart", {
|
.dispatch("userCartProduct/addToCart", {
|
||||||
sku: sku,
|
sku: sku,
|
||||||
qty: 1,
|
qty:qty,
|
||||||
ccid: null,
|
ccid: null,
|
||||||
price: null,
|
price: null,
|
||||||
personalizeDetails: null
|
personalizeDetails: null
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.$store.dispatch("userCartProduct/cartProductList");
|
this.snackbar = {
|
||||||
|
|
||||||
this.$store.dispatch("userCartProduct/cartDrawer", true);
|
|
||||||
this.snackbar = {
|
|
||||||
message: "Product Added Successfully",
|
message: "Product Added Successfully",
|
||||||
color: "success",
|
color: "success",
|
||||||
show: true,
|
show: true,
|
||||||
timeout: 2000
|
timeout: 2000
|
||||||
};
|
};
|
||||||
|
debugger
|
||||||
|
this.$store.dispatch("userCartProduct/cartProductList");
|
||||||
|
this.$emit("actionClose", this.snackbar);
|
||||||
|
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
this.snackbar = {
|
this.snackbar = {
|
||||||
|
@ -203,7 +200,7 @@ export default {
|
||||||
show: true,
|
show: true,
|
||||||
timeout: 2000
|
timeout: 2000
|
||||||
};
|
};
|
||||||
|
this.$emit("actionClose", this.snackbar);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -31,13 +31,15 @@
|
||||||
</template>
|
</template>
|
||||||
<div>
|
<div>
|
||||||
<v-card tile flat v-if="searchData">
|
<v-card tile flat v-if="searchData">
|
||||||
<RetailerSearchProducts />
|
<RetailerSearchProducts
|
||||||
|
@actionClose="showSnackBarMessage"
|
||||||
|
/>
|
||||||
</v-card>
|
</v-card>
|
||||||
</div>
|
</div>
|
||||||
</v-menu>
|
</v-menu>
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
<v-row v-show="cartProductsItem.length == 0">
|
<v-row v-show="cartProductsItem.length == 0">
|
||||||
<v-col>
|
<v-col>
|
||||||
<v-alert class="alert-box-outline" type="error" text dense
|
<v-alert class="alert-box-outline" type="error" text dense
|
||||||
|
@ -360,12 +362,12 @@ export default {
|
||||||
this.$store.dispatch("catalogBrowser/index", {
|
this.$store.dispatch("catalogBrowser/index", {
|
||||||
productsCatalog: window.craneCatalog.products,
|
productsCatalog: window.craneCatalog.products,
|
||||||
});
|
});
|
||||||
if (this.userAuth) {
|
/* if (this.userAuth) {
|
||||||
this.$store.dispatch("userCartProduct/fetchCartCoupon");
|
this.$store.dispatch("userCartProduct/fetchCartCoupon");
|
||||||
|
|
||||||
this.calledCriteoViewBasket();
|
this.calledCriteoViewBasket();
|
||||||
}
|
}
|
||||||
this.stockFlagHideShow();
|
this.stockFlagHideShow();*/
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -11,7 +11,7 @@ export const fetchStates = (countryId, countryWiseStates) => {
|
||||||
return states.id == countryId;
|
return states.id == countryId;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
if (oneCountry.length > 0) {
|
if (oneCountry.length > 0 && oneCountry[0].availableRegions) {
|
||||||
let allStates = oneCountry[0].availableRegions.map(val => {
|
let allStates = oneCountry[0].availableRegions.map(val => {
|
||||||
return {
|
return {
|
||||||
value: val.id,
|
value: val.id,
|
||||||
|
|
Loading…
Reference in New Issue