Merge branch 'beta' of git.treelet.net:crane/retailer-vue into dev
This commit is contained in:
commit
66e790b4c9
|
@ -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',
|
||||||
|
|
|
@ -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 = {
|
||||||
|
|
|
@ -123,14 +123,12 @@
|
||||||
height="1"
|
height="1"
|
||||||
width="1"
|
width="1"
|
||||||
/>-->
|
/>-->
|
||||||
<FooterComponent />
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
const baseUrl = process.env.VUE_APP_BASE_URL;
|
const baseUrl = process.env.VUE_APP_BASE_URL;
|
||||||
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",
|
||||||
|
@ -141,7 +139,6 @@ export default {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
FooterComponent,
|
|
||||||
ViewOrderTabs,
|
ViewOrderTabs,
|
||||||
},
|
},
|
||||||
watch: {},
|
watch: {},
|
||||||
|
@ -180,11 +177,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() {
|
||||||
|
|
Loading…
Reference in New Issue