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