add filter msisdn OR fullname and set limit to 100
This commit is contained in:
@ -147,6 +147,7 @@ const ManageWalletContextProvider = ({ children }: { children: React.ReactNode }
|
||||
try {
|
||||
sorting = sorting.length == 0 ? [{ id: 'name', desc: false }] : sorting;
|
||||
filter = filter.length == 0 ? {} : { 'wallets.name': { like: `%${filter[0].value?.toLowerCase()}%` } };
|
||||
|
||||
const response = await GetData(`${API_URL_MASTER_DATA}/wallet/list`, {
|
||||
limit,
|
||||
page: page + 1,
|
||||
|
||||
@ -60,10 +60,17 @@ const TransactionDisbursement = () => {
|
||||
|
||||
const fetchCustomerMsisdn = async (sorting: any, filterValue: string) => {
|
||||
const filter: any =
|
||||
filterValue.trim().length === 0 ? {} : { msisdn: { like: `%${filterValue}%` } };
|
||||
filterValue.trim().length === 0
|
||||
? {}
|
||||
: {
|
||||
or: [
|
||||
{ msisdn: { like: `%${filterValue}%` } },
|
||||
{ fullname: { like: `%${filterValue}%` } }
|
||||
]
|
||||
};
|
||||
|
||||
const query: any = {
|
||||
limit: 25,
|
||||
limit: 100,
|
||||
page: 1,
|
||||
with_deleted: false,
|
||||
order_field: sorting[0].id,
|
||||
|
||||
Reference in New Issue
Block a user