This commit is contained in:
rakesh 2022-02-09 13:36:59 +05:30
parent 0254ae8669
commit de31262762
3 changed files with 45 additions and 5 deletions

View File

@ -115,7 +115,16 @@ export default [
}, },
} }
}, },
{
path: 'order-success/:orderNumber',
name: 'OrderSuccess',
component: () => import( /* webpackChunkName: "craneMain" */'@/routes/retailer/order_success.vue'),
meta: {
breadcrumb: {
label: 'Order Success',
},
}
},
{ {
path: 'search', path: 'search',
name: 'SearchPage', name: 'SearchPage',

View File

@ -2067,7 +2067,38 @@ export default {
method: this.freePaymentMethod, method: this.freePaymentMethod,
"poNumber": this.poNumber, "poNumber": this.poNumber,
}); });
await this.$store.dispatch("accountOne/setPaymentInProgress", true);
if (res) {
try {
let resp = await this.$store.dispatch(
"meProductOne/fetchOrderProduct",
res
);
} catch (error) {
await this.$store.dispatch(
"accountOne/setPaymentInProgress",
false
);
this.isPageLoader = false;
this.snackbar = {
message: error,
color: "error",
show: true,
timeout: 5000,
};
}
}
await this.$store.dispatch(
"accountOne/setPaymentInProgress",
false
);
this.$router.push({
name: "OrderSuccess",
params: { orderNumber: res },
});
} catch (error) { } catch (error) {
this.isPageLoader = false; this.isPageLoader = false;
this.snackbar = { this.snackbar = {

View File

@ -130,7 +130,7 @@
const baseUrl = process.env.VUE_APP_BASE_URL; const baseUrl = process.env.VUE_APP_BASE_URL;
import FooterComponent from "@/components/layout/footer/FooterComponent"; import FooterComponent from "@/components/layout/footer/FooterComponent";
import ViewOrderTabs from "@/components/retailer/my-orders/ViewOrderTabs"; import ViewOrderTabs from "@/components/retailer/my-orders/ViewOrderTabs";
import { getCookieByName } from "@/services/auth"; //import { getCookieByName } from "@/services/auth";
//import {goToCategoryPage} from "@/services/util.service"; //import {goToCategoryPage} from "@/services/util.service";
export default { export default {
name: "OrderSuccess", name: "OrderSuccess",
@ -180,11 +180,11 @@ export default {
}, },
methods: { methods: {
goToOrder(orderNo) { goToOrder(orderNo) {
window.open("/retailer/my-orders/" + orderNo, "_self"); window.open("/my-orders/" + orderNo, "_self");
}, },
goToHomePage() { goToHomePage() {
this.$router.push({ this.$router.push({
name: "HomePage", name: "CartProducts",
}); });
}, },
goToSignUp() { goToSignUp() {