added search on credit_destination field in transaction fee add +edit

This commit is contained in:
bagusajisaputroo
2025-04-15 10:44:43 +07:00
parent 8bf1c16b6c
commit 172e8a0815
2 changed files with 76 additions and 12 deletions

View File

@ -72,7 +72,6 @@ const EditFeeDialog = () => {
message: ''
});
// Loading states
const [isLoadingTransferFee, setIsLoadingTransferFee] = useState(false);
const [isLoadingTransactionType, setIsLoadingTransactionType] = useState(false);
const [isLoadingWallets, setIsLoadingWallets] = useState(false);
@ -687,9 +686,7 @@ const EditFeeDialog = () => {
<span className="truncate">
{customers.find(customer => customer.id === formField.credit_destination)?.username || 'Search customer...'}
</span>
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" className="h-4 w-4 opacity-50">
<path d="m6 9 6 6 6-6"></path>
</svg>
</div>
{open && (
@ -702,9 +699,7 @@ const EditFeeDialog = () => {
value={customerSearchTerm}
onChange={(e) => setCustomerSearchTerm(e.target.value)}
autoComplete="off"
// Prevent clicks from closing the dropdown
onClick={(e) => e.stopPropagation()}
// Auto focus the input when opened
autoFocus
/>
</div>