delete console

This commit is contained in:
bagusajisaputroo
2025-03-26 09:56:49 +07:00
parent f00a667591
commit d9dfe3e6a1
5 changed files with 31 additions and 34 deletions

View File

@ -162,7 +162,7 @@ const AddFeeDialog = () => {
const response = await PostData(`${API_URL}/transactionfees/create`, { const response = await PostData(`${API_URL}/transactionfees/create`, {
...formField ...formField
}); });
console.log(response); // console.log(response);
if (response?.status) { if (response?.status) {
toast.success('Success Create Transfer Fee'); toast.success('Success Create Transfer Fee');
reload(); reload();
@ -202,7 +202,7 @@ const AddFeeDialog = () => {
<div className="card flex flex-col gap-5"> <div className="card flex flex-col gap-5">
<div className="card-body grid gap-5 p-0"> <div className="card-body grid gap-5 p-0">
<div className="w-full"> <div className="w-full">
<label className="form-label">Transfer Free Name</label> <label className="form-label">Transfer Free Name <span className="text-red-500">*</span></label>
<Input <Input
className="input" className="input"
type="text" type="text"
@ -214,7 +214,7 @@ const AddFeeDialog = () => {
/> />
</div> </div>
<div className="w-full"> <div className="w-full">
<label className="form-label">Description</label> <label className="form-label">Description <span className="text-red-500">*</span></label>
<Input <Input
className="input" className="input"
type="text" type="text"
@ -226,7 +226,7 @@ const AddFeeDialog = () => {
/> />
</div> </div>
<div className="w-full"> <div className="w-full">
<label className="form-label">Minimum Amount</label> <label className="form-label">Minimum Amount <span className="text-red-500">*</span></label>
<NumericFormat <NumericFormat
className="input" className="input"
value={formField.minimum_amount} value={formField.minimum_amount}
@ -243,7 +243,7 @@ const AddFeeDialog = () => {
/> />
</div> </div>
<div className="w-full"> <div className="w-full">
<label className="form-label">Maximum Amount</label> <label className="form-label">Maximum Amount <span className="text-red-500">*</span></label>
<NumericFormat <NumericFormat
className="input" className="input"
value={formField.maximum_amount} value={formField.maximum_amount}
@ -260,7 +260,7 @@ const AddFeeDialog = () => {
/> />
</div> </div>
<div className="w-full"> <div className="w-full">
<label className="form-label">Period Start</label> <label className="form-label">Period Start <span className="text-red-500">*</span></label>
<Input <Input
className="input" className="input"
type="date" type="date"
@ -272,7 +272,7 @@ const AddFeeDialog = () => {
/> />
</div> </div>
<div className="w-full"> <div className="w-full">
<label className="form-label">Period End</label> <label className="form-label">Period End <span className="text-red-500">*</span></label>
<Input <Input
className="input" className="input"
type="date" type="date"
@ -284,7 +284,7 @@ const AddFeeDialog = () => {
/> />
</div> </div>
<div className="w-full"> <div className="w-full">
<label className="form-label">Deduct Amount</label> <label className="form-label">Deduct Amount <span className="text-red-500">*</span></label>
<NumericFormat <NumericFormat
className="input" className="input"
value={formField.deduct_amount} value={formField.deduct_amount}
@ -301,7 +301,7 @@ const AddFeeDialog = () => {
/> />
</div> </div>
<div className="w-full"> <div className="w-full">
<label className="form-label">Deduct Percentage</label> <label className="form-label">Deduct Percentage <span className="text-red-500">*</span></label>
<NumericFormat <NumericFormat
className="input" className="input"
value={formField.deduct_percentage} value={formField.deduct_percentage}
@ -318,7 +318,7 @@ const AddFeeDialog = () => {
/> />
</div> </div>
<div className="w-full"> <div className="w-full">
<label className="form-label">Transacsion Type ID</label> <label className="form-label">Transacsion Type ID <span className="text-red-500">*</span></label>
<Select <Select
value={formField.transaction_type} value={formField.transaction_type}
onValueChange={(transaction_type) => onValueChange={(transaction_type) =>
@ -338,7 +338,7 @@ const AddFeeDialog = () => {
</Select> </Select>
</div> </div>
<div className="w-full"> <div className="w-full">
<label className="form-label">Status</label> <label className="form-label">Status <span className="text-red-500">*</span></label>
<Select <Select
value={formField.status} value={formField.status}
onValueChange={(value) => setFormField({ ...formField, status: value })} onValueChange={(value) => setFormField({ ...formField, status: value })}
@ -353,7 +353,7 @@ const AddFeeDialog = () => {
</Select> </Select>
</div> </div>
<div className="w-full"> <div className="w-full">
<label className="form-label">Status Include</label> <label className="form-label">Status Include <span className="text-red-500">*</span></label>
<Select <Select
value={formField.status_include} value={formField.status_include}
onValueChange={(value) => setFormField({ ...formField, status_include: value })} onValueChange={(value) => setFormField({ ...formField, status_include: value })}
@ -368,7 +368,7 @@ const AddFeeDialog = () => {
</Select> </Select>
</div> </div>
<div className="w-full"> <div className="w-full">
<label className="form-label">Priority</label> <label className="form-label">Priority <span className="text-red-500">*</span></label>
<Select <Select
value={formField.priority ? 'Y' : 'N'} value={formField.priority ? 'Y' : 'N'}
onValueChange={(value) => onValueChange={(value) =>

View File

@ -20,7 +20,6 @@ const DeleteDialog = () => {
}); });
const doDeleteTransferFee = useCallback(async () => { const doDeleteTransferFee = useCallback(async () => {
// Kirim enforce=false untuk memastikan soft delete
const response = await DeleteData(`${API_URL}/transactionfees/delete/${selectedTransferFee}/false`, { const response = await DeleteData(`${API_URL}/transactionfees/delete/${selectedTransferFee}/false`, {
id: selectedTransferFee id: selectedTransferFee
}); });

View File

@ -254,7 +254,7 @@ const EditFeeDialog = () => {
<div className="card flex flex-col gap-5"> <div className="card flex flex-col gap-5">
<div className="card-body grid gap-5 p-0"> <div className="card-body grid gap-5 p-0">
<div className="w-full"> <div className="w-full">
<label className="form-label">Transfer Free Name</label> <label className="form-label">Transfer Free Name <span className="text-red-500">*</span></label>
<Input <Input
className="input" className="input"
type="text" type="text"
@ -266,7 +266,7 @@ const EditFeeDialog = () => {
/> />
</div> </div>
<div className="w-full"> <div className="w-full">
<label className="form-label">Description</label> <label className="form-label">Description <span className="text-red-500">*</span></label>
<Input <Input
className="input" className="input"
type="text" type="text"
@ -278,7 +278,7 @@ const EditFeeDialog = () => {
/> />
</div> </div>
<div className="w-full"> <div className="w-full">
<label className="form-label">Minimum Amount</label> <label className="form-label">Minimum Amount <span className="text-red-500">*</span></label>
<NumericFormat <NumericFormat
className="input" className="input"
value={formField.minimum_amount} value={formField.minimum_amount}
@ -295,7 +295,7 @@ const EditFeeDialog = () => {
/> />
</div> </div>
<div className="w-full"> <div className="w-full">
<label className="form-label">Maximum Amount</label> <label className="form-label">Maximum Amount <span className="text-red-500">*</span></label>
<NumericFormat <NumericFormat
className="input" className="input"
value={formField.maximum_amount} value={formField.maximum_amount}
@ -312,7 +312,7 @@ const EditFeeDialog = () => {
/> />
</div> </div>
<div className="w-full"> <div className="w-full">
<label className="form-label">Period Start</label> <label className="form-label">Period Start <span className="text-red-500">*</span></label>
<Input <Input
className="input" className="input"
type="date" type="date"
@ -324,7 +324,7 @@ const EditFeeDialog = () => {
/> />
</div> </div>
<div className="w-full"> <div className="w-full">
<label className="form-label">Period End</label> <label className="form-label">Period End <span className="text-red-500">*</span></label>
<Input <Input
className="input" className="input"
type="date" type="date"
@ -336,7 +336,7 @@ const EditFeeDialog = () => {
/> />
</div> </div>
<div className="w-full"> <div className="w-full">
<label className="form-label">Deduct Amount</label> <label className="form-label">Deduct Amount <span className="text-red-500">*</span></label>
<NumericFormat <NumericFormat
className="input" className="input"
value={formField.deduct_amount} value={formField.deduct_amount}
@ -353,7 +353,7 @@ const EditFeeDialog = () => {
/> />
</div> </div>
<div className="w-full"> <div className="w-full">
<label className="form-label">Deduct Percentage</label> <label className="form-label">Deduct Percentage <span className="text-red-500">*</span></label>
<NumericFormat <NumericFormat
className="input" className="input"
value={formField.deduct_percentage} value={formField.deduct_percentage}
@ -370,7 +370,7 @@ const EditFeeDialog = () => {
/> />
</div> </div>
<div className="w-full"> <div className="w-full">
<label className="form-label">Transacsion Type ID</label> <label className="form-label">Transacsion Type ID <span className="text-red-500">*</span></label>
<Select <Select
value={formField.transaction_type} value={formField.transaction_type}
onValueChange={(transaction_type) => onValueChange={(transaction_type) =>
@ -390,7 +390,7 @@ const EditFeeDialog = () => {
</Select> </Select>
</div> </div>
<div className="w-full"> <div className="w-full">
<label className="form-label">Status</label> <label className="form-label">Status <span className="text-red-500">*</span></label>
<Select <Select
value={formField.status} value={formField.status}
onValueChange={(value) => setFormField({ ...formField, status: value })} onValueChange={(value) => setFormField({ ...formField, status: value })}
@ -405,7 +405,7 @@ const EditFeeDialog = () => {
</Select> </Select>
</div> </div>
<div className="w-full"> <div className="w-full">
<label className="form-label">Status Included</label> <label className="form-label">Status Included <span className="text-red-500">*</span></label>
<Select <Select
value={formField.status_include} value={formField.status_include}
onValueChange={(value) => onValueChange={(value) =>
@ -422,7 +422,7 @@ const EditFeeDialog = () => {
</Select> </Select>
</div> </div>
<div className="w-full"> <div className="w-full">
<label className="form-label">Priority</label> <label className="form-label">Priority <span className="text-red-500">*</span></label>
<Select <Select
value={formField.priority ? 'Y' : 'N'} // Menyesuaikan nilai value={formField.priority ? 'Y' : 'N'} // Menyesuaikan nilai
onValueChange={(value) => onValueChange={(value) =>
@ -440,7 +440,7 @@ const EditFeeDialog = () => {
</div> </div>
{/* <div className="w-full"> {/* <div className="w-full">
<label className="form-label">Priotity</label> <label className="form-label">Priotity <span className="text-red-500">*</span></label>
<Select <Select
value={formField.priority} value={formField.priority}
onValueChange={(value) => setFormField({ ...formField, priority: value })} onValueChange={(value) => setFormField({ ...formField, priority: value })}
@ -456,7 +456,7 @@ const EditFeeDialog = () => {
</div> */} </div> */}
{/* <div className="w-full"> {/* <div className="w-full">
<label className="form-label">Priority</label> <label className="form-label">Priority <span className="text-red-500">*</span></label>
<Select <Select
value={formField.priority ? 'Y' : 'N'} value={formField.priority ? 'Y' : 'N'}
onValueChange={(value) => onValueChange={(value) =>

View File

@ -128,7 +128,7 @@ const AddDialog = () => {
order_direction: sorting[0].desc ? 'DESC' : 'ASC' order_direction: sorting[0].desc ? 'DESC' : 'ASC'
}); });
setCustomers(response?.data.list); setCustomers(response?.data.list);
console.log('CUSTOMER: ', response?.data.list); // console.log('CUSTOMER: ', response?.data.list);
} catch (error) { } catch (error) {
console.error('Error fetching customer', error); console.error('Error fetching customer', error);
} }

View File

@ -143,7 +143,7 @@ const EditDialog = () => {
order_field: sorting[0].id, order_field: sorting[0].id,
order_direction: sorting[0].desc ? 'DESC' : 'ASC' order_direction: sorting[0].desc ? 'DESC' : 'ASC'
}); });
console.log('CUSTOMER: ', response?.data.list); // console.log('CUSTOMER: ', response?.data.list);
setCustomers(response?.data.list); setCustomers(response?.data.list);
} catch (error) { } catch (error) {
console.error('Error fetching customer', error); console.error('Error fetching customer', error);
@ -177,7 +177,7 @@ const EditDialog = () => {
const fetchTransactionType = useCallback(async (id: string) => { const fetchTransactionType = useCallback(async (id: string) => {
const response = await GetData(`${API_URL}/transactiontype/getdata/${id}`, { id }); const response = await GetData(`${API_URL}/transactiontype/getdata/${id}`, { id });
console.log('Transaction Type: ', response?.data); // console.log('Transaction Type: ', response?.data);
if (response?.status) { if (response?.status) {
setFormField((prev) => ({ setFormField((prev) => ({
...prev, ...prev,
@ -192,11 +192,9 @@ const EditDialog = () => {
max_transaction_per_day: response.data.max_transaction_per_day, max_transaction_per_day: response.data.max_transaction_per_day,
status_approval: response.data.status_approval, status_approval: response.data.status_approval,
status: response.data.status status: response.data.status
// updated_by: parsedUser?.username ,
// updated_at: new Date().toISOString().slice(0, 19).replace('T', ' ')
})); }));
console.log('Transaction Type: ', formField);
} }
// console.log('form fieldd Transaction Type: ', formField);
}, []); }, []);
useEffect(() => { useEffect(() => {