card order ready
This commit is contained in:
@@ -59,20 +59,20 @@ const LoanOrderDetailsScreen = () => {
|
||||
}, []);
|
||||
|
||||
const handleDelete = () => {
|
||||
Alert.alert('Confirm', 'Delete this order?', [
|
||||
{ text: 'Cancel', style: 'cancel' },
|
||||
{ text: 'Delete', style: 'destructive', onPress: deleteOrder },
|
||||
Alert.alert('Tassykla', 'Bu sargydy pozmak isleýärsiňizmi?', [
|
||||
{ text: 'Goýbolsun', style: 'cancel' },
|
||||
{ text: 'Poz', style: 'destructive', onPress: deleteOrder },
|
||||
]);
|
||||
};
|
||||
|
||||
const deleteOrder = async () => {
|
||||
const res = await apiService.deleteLoanOrder(orderId);
|
||||
if (res.success) {
|
||||
Alert.alert('Deleted', res.message || 'Order deleted', [
|
||||
{ text: 'OK', onPress: () => navigation.goBack() },
|
||||
Alert.alert('Pozuldy', res.message || 'Sargyt pozuldy', [
|
||||
{ text: 'Bolýar', onPress: () => navigation.goBack() },
|
||||
]);
|
||||
} else {
|
||||
Alert.alert('Error', res.error || 'Could not delete');
|
||||
Alert.alert('Ýalňyşlyk', res.error || 'Pozup bolmady');
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user