Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 2 additions & 15 deletions public/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -16530,14 +16530,6 @@ window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
* for events that are broadcast by Laravel. Echo and event broadcasting
* allows your team to easily build robust real-time web applications.
*/
// import Echo from 'laravel-echo';
// window.Pusher = require('pusher-js');
// window.Echo = new Echo({
// broadcaster: 'pusher',
// key: process.env.MIX_PUSHER_APP_KEY,
// cluster: process.env.MIX_PUSHER_APP_CLUSTER,
// forceTLS: true
// });

/***/ }),

Expand Down Expand Up @@ -16904,8 +16896,6 @@ function _asyncToGenerator(fn) { return function () { var self = this, args = ar
localState.paymentIsProcessing = false;

if (response.statusText === 'Created') {
// TODO Redirect to success page
console.log('Success! Redirecting .... Response data: ');
store.dispatch('emptyCart');
store.commit('UPDATE_ORDER', response.data);
router.push('/thankyou');
Expand Down Expand Up @@ -17131,20 +17121,17 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
var fetchProduct = function fetchProduct() {
localState.products = store.state.products;
localState.loading = false;
console.log('Params: '); // console.log(this.$route.params.slug);

console.log('Params: ');
console.log(route.params.slug);
};

(0,vue__WEBPACK_IMPORTED_MODULE_0__.onMounted)(fetchProduct);
var singleProduct = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(function () {
return localState.products.find(function (product) {
return product.slug === _this.$route.params.slug;
} // (product) => product.slug === route.params.slug,
} // route params slug,
);
});
console.log('Single product: ');
console.log(singleProduct);
return _objectSpread(_objectSpread({}, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toRefs)(localState)), {}, {
singleProduct: singleProduct
});
Expand Down
11 changes: 0 additions & 11 deletions resources/js/bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,3 @@ window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
* for events that are broadcast by Laravel. Echo and event broadcasting
* allows your team to easily build robust real-time web applications.
*/

// import Echo from 'laravel-echo';

// window.Pusher = require('pusher-js');

// window.Echo = new Echo({
// broadcaster: 'pusher',
// key: process.env.MIX_PUSHER_APP_KEY,
// cluster: process.env.MIX_PUSHER_APP_CLUSTER,
// forceTLS: true
// });
2 changes: 0 additions & 2 deletions resources/js/pages/Checkout/Checkout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,6 @@ export default defineComponent({
.then((response) => {
localState.paymentIsProcessing = false;
if (response.statusText === 'Created') {
// TODO Redirect to success page
console.log('Success! Redirecting .... Response data: ');
store.dispatch('emptyCart');
store.commit('UPDATE_ORDER', response.data);
router.push('/thankyou');
Expand Down
7 changes: 2 additions & 5 deletions resources/js/pages/Products/SingleProduct.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,16 @@ export default defineComponent({
localState.loading = false;

console.log('Params: ');
// console.log(this.$route.params.slug);

console.log(route.params.slug);
};
onMounted(fetchProduct);

const singleProduct = computed(() => localState.products.find(
(product) => product.slug === this.$route.params.slug,
// (product) => product.slug === route.params.slug,
// route params slug,
));

console.log('Single product: ');
console.log(singleProduct);

return { ...toRefs(localState), singleProduct };
},
});
Expand Down