Merge branch 'beta' of git.treelet.net:crane/retailer-vue into dev

This commit is contained in:
anjujangid 2022-02-11 13:01:45 +05:30
commit 66e790b4c9
3 changed files with 45 additions and 8 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',
name: 'SearchPage',

View File

@ -2067,7 +2067,38 @@ export default {
method: this.freePaymentMethod,
"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) {
this.isPageLoader = false;
this.snackbar = {

View File

@ -123,14 +123,12 @@
height="1"
width="1"
/>-->
<FooterComponent />
</div>
</template>
<script>
const baseUrl = process.env.VUE_APP_BASE_URL;
import FooterComponent from "@/components/layout/footer/FooterComponent";
import ViewOrderTabs from "@/components/retailer/my-orders/ViewOrderTabs";
import { getCookieByName } from "@/services/auth";
//import { getCookieByName } from "@/services/auth";
//import {goToCategoryPage} from "@/services/util.service";
export default {
name: "OrderSuccess",
@ -141,7 +139,6 @@ export default {
};
},
components: {
FooterComponent,
ViewOrderTabs,
},
watch: {},
@ -180,11 +177,11 @@ export default {
},
methods: {
goToOrder(orderNo) {
window.open("/retailer/my-orders/" + orderNo, "_self");
window.open("/my-orders/" + orderNo, "_self");
},
goToHomePage() {
this.$router.push({
name: "HomePage",
name: "CartProducts",
});
},
goToSignUp() {