feat(order): add success haptic for order created event

This commit is contained in:
Nikita Kiselev
2025-08-01 09:51:19 +03:00
parent 85101b9881
commit 858be67c89

View File

@@ -27,6 +27,7 @@ export const useCheckoutStore = defineStore('checkout', {
async makeOrder() {
try {
await storeOrder(this.customer);
await window.Telegram.WebApp.HapticFeedback.notificationOccurred('success');
await useCartStore().getProducts();
} catch (error) {
if (error.response?.status === 422) {
@@ -35,6 +36,8 @@ export const useCheckoutStore = defineStore('checkout', {
console.error('Server error', error);
}
window.Telegram.WebApp.HapticFeedback.notificationOccurred('error');
throw error;
}
},