This commit is contained in:
rakesh 2022-01-20 14:50:12 +05:30
parent 7f61304766
commit aecadf3107
5 changed files with 23 additions and 23 deletions

1
git_info.json Normal file
View File

@ -0,0 +1 @@
{"branch_name":"beta","last_commit_date":"2022-01-19T16:45:44.000Z","last_commit_author":"sidharth","last_commit_hash":"7f61304766a9347d1adbea8794f6276df2d35e68"}

View File

@ -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;
}
}*/

View File

@ -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"
@ -107,19 +107,16 @@
</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,28 +169,28 @@ 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 = {
message: "Product Added Successfully",
color: "success",
show: true,
timeout: 2000
};
debugger
this.$store.dispatch("userCartProduct/cartProductList");
this.$emit("actionClose", this.snackbar);
})
.catch(() => {
@ -203,7 +200,7 @@ export default {
show: true,
timeout: 2000
};
this.$emit("actionClose", this.snackbar);
});
}

View File

@ -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>

View File

@ -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,