commiting

This commit is contained in:
Abin Toppo
2026-01-16 11:24:24 +05:30
parent 86ebc5d00e
commit b0fb9f7616
4 changed files with 15 additions and 8 deletions
+8 -5
View File
@@ -5,8 +5,9 @@ import colors from '../../Constant/Color';
import { CreditCard, Calendar, User, DollarSign, ArrowRight } from 'lucide-react-native';
import { useSelector } from 'react-redux';
import { useOfflineTenderPurchase } from '../../Services/BBPS/Hooks';
import { useNavigation } from '@react-navigation/native';
import { StackActions, useNavigation } from '@react-navigation/native';
import NavigationString from '../../Constant/NavigationString';
import { showErrorAlert, showToast } from '../../Constant/ShowDailog';
const ProceedToPurTender = () => {
const navigation: any = useNavigation();
@@ -52,11 +53,13 @@ const ProceedToPurTender = () => {
mutate(body, {
onSuccess: (res) => {
console.log(res, '---------------------purchsase response');
Alert.alert('Offline Purchase Successful!', `Order No: ${orderNo}`);
navigation.goBack()
if(res.statusCode === 200 ){
showToast(res.message);
navigation.dispatch(StackActions.pop(2));
}
},
onError: (error) => {
showErrorAlert('Something went wrong');
console.log(error, "================purchse Error");
}
})
@@ -70,7 +73,7 @@ const ProceedToPurTender = () => {
setLoading(true);
setTimeout(() => {
setLoading(false);
type === 'online' ? Alert.alert('Online Purchase Successful!') : handleOfflinePurchase();
type === 'online' ? showErrorAlert('Online Purchase is disabled') : handleOfflinePurchase();
}, 1200);
};