add resetform + change customer title
This commit is contained in:
@ -109,7 +109,6 @@ const AddFeeDialog = () => {
|
||||
status: formField.status,
|
||||
status_include: formField.status_include
|
||||
};
|
||||
console.log(payload);
|
||||
};
|
||||
useEffect(() => {
|
||||
const created_time = new Date();
|
||||
@ -137,8 +136,6 @@ const AddFeeDialog = () => {
|
||||
order_field: sorting[0].id,
|
||||
order_direction: sorting[0].desc ? 'DESC' : 'ASC'
|
||||
});
|
||||
console.log('TRANSACTION TYPE LIST: ', response?.data?.list);
|
||||
|
||||
setTransactionTypes(response?.data.list || []);
|
||||
} catch (error) {
|
||||
console.error('Error fetching customer', error);
|
||||
@ -151,7 +148,6 @@ const AddFeeDialog = () => {
|
||||
const doCreateTransferType = useCallback(
|
||||
async (e: React.FormEvent<HTMLFormElement>) => {
|
||||
e.preventDefault();
|
||||
console.log(formField);
|
||||
for (const key in formField) {
|
||||
if (
|
||||
formField[key as keyof typeof formField] === '' ||
|
||||
@ -167,7 +163,6 @@ const AddFeeDialog = () => {
|
||||
...formField,
|
||||
priority: formField.priority ? 'Y' : 'N'
|
||||
});
|
||||
// console.log("coba coba:",response);
|
||||
|
||||
if (response?.status) {
|
||||
toast.success('Success Create Transfer Fee');
|
||||
@ -177,7 +172,6 @@ const AddFeeDialog = () => {
|
||||
} else {
|
||||
setAlert({ show: true, message: response?.message || 'Failed to create transfer fee' });
|
||||
}
|
||||
console.log(response);
|
||||
},
|
||||
[formField]
|
||||
);
|
||||
@ -190,7 +184,7 @@ const AddFeeDialog = () => {
|
||||
<DialogHeader className="p-5 border-0">
|
||||
<div className="flex items-center justify-between flex-wrap grow">
|
||||
<div className="flex flex-col justify-center">
|
||||
<h1 className="text-xl font-semibold leading-none text-gray-900">AddTransfer Fee</h1>
|
||||
<h1 className="text-xl font-semibold leading-none text-gray-900">Add Transfer Fee</h1>
|
||||
</div>
|
||||
<div
|
||||
className="cursor-pointer hover:opacity-100 opacity-50"
|
||||
@ -392,7 +386,13 @@ const AddFeeDialog = () => {
|
||||
</Select>
|
||||
</div>
|
||||
<div className="flex justify-end pt-2.5 gap-5">
|
||||
<Button variant={'outline'} type="reset">
|
||||
<Button
|
||||
variant={'outline'}
|
||||
type="reset"
|
||||
onClick={() => {
|
||||
resetForm();
|
||||
}}
|
||||
>
|
||||
Reset
|
||||
</Button>
|
||||
<Button variant={'default'} type="submit" disabled={isSubmitting}>
|
||||
|
||||
Reference in New Issue
Block a user