fixing transactiontype and transactionfee
This commit is contained in:
@ -1,4 +1,11 @@
|
||||
import { Dialog, DialogContent, DialogFooter, DialogHeader, DialogTitle , DialogDescription} from '@/components/ui/dialog';
|
||||
import {
|
||||
Dialog,
|
||||
DialogContent,
|
||||
DialogFooter,
|
||||
DialogHeader,
|
||||
DialogTitle,
|
||||
DialogDescription
|
||||
} from '@/components/ui/dialog';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { Alert, useDataGrid } from '@/components';
|
||||
import { useCallback, useState } from 'react';
|
||||
@ -10,7 +17,8 @@ import { useManageTransferFeeContext } from '../hooks/useManageTransferFeeContex
|
||||
const API_URL = apiConfig.service_transaction;
|
||||
|
||||
const DeleteFeeDialog = () => {
|
||||
const { showDeleteFeeDialog, handleDeleteFeeDialog, selectedTransferFee } = useManageTransferFeeContext();
|
||||
const { showDeleteFeeDialog, handleDeleteFeeDialog, selectedTransferFee } =
|
||||
useManageTransferFeeContext();
|
||||
const { reload } = useDataGrid();
|
||||
const { DeleteData } = useCallApi();
|
||||
const [alert, setAlert] = useState({
|
||||
@ -19,9 +27,12 @@ const DeleteFeeDialog = () => {
|
||||
});
|
||||
|
||||
const doDeleteTransferFee = useCallback(async () => {
|
||||
const response = await DeleteData(`${API_URL}/transactionfees/delete/${selectedTransferFee}/false`, {
|
||||
id: selectedTransferFee
|
||||
});
|
||||
const response = await DeleteData(
|
||||
`${API_URL}/transactionfees/delete/${selectedTransferFee}/false`,
|
||||
{
|
||||
id: selectedTransferFee
|
||||
}
|
||||
);
|
||||
|
||||
if (response?.status) {
|
||||
setAlert({ show: false, message: '' });
|
||||
@ -39,7 +50,9 @@ const DeleteFeeDialog = () => {
|
||||
<DialogContent className="container-fixed max-w-md flex flex-col p-5 overflow-hidden [&>button]:hidden">
|
||||
<DialogHeader className="p-0 border-0 block">
|
||||
<DialogTitle className="text-lg">Delete Transfer Type</DialogTitle>
|
||||
<DialogDescription className="text-sm">Are you sure you want to delete this data?</DialogDescription>
|
||||
<DialogDescription className="text-sm">
|
||||
Are you sure you want to delete this data?
|
||||
</DialogDescription>
|
||||
<Alert variant="warning">
|
||||
<h3 className="text-lg">Are you sure?</h3>
|
||||
<span className="text-sm">You will delete this data!</span>
|
||||
@ -64,4 +77,3 @@ const DeleteFeeDialog = () => {
|
||||
};
|
||||
|
||||
export default DeleteFeeDialog;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user