diff --git a/src/pages/account/manage-account/ManageAccount.tsx b/src/pages/account/manage-account/ManageAccount.tsx
index 784a20e..6fd1190 100644
--- a/src/pages/account/manage-account/ManageAccount.tsx
+++ b/src/pages/account/manage-account/ManageAccount.tsx
@@ -34,41 +34,43 @@ const ManageAccount = () => {
const { GetData } = useCallApi();
// console.log(accounts);
- useEffect(() => {
- const fetchAccount = async () => {
- try {
- const response = await fetch(`${API_URL}/user/list`);
- const data: Account[] = await response.json();
- setAccounts(data);
- } catch (error) {
- console.error('Error fetching data', error);
- }
- };
+ // useEffect(() => {
+ // const fetchAccount = async () => {
+ // try {
+ // const response = await axios.get(`${API_URL}/user/list`);
+ // console.log(response);
+ // const data: Account[] = response.data;
+ // setAccounts(data);
+ // } catch (error) {
+ // console.error('Error fetching data', error);
+ // }
+ // };
- fetchAccount();
- }, []);
+ // fetchAccount();
+ // }, []);
- // const fetchAccount = async (page: number, limit: number, sorting: any, filter: any) => {
- // try {
- // const response = await GetData(`${API_URL}/user/list`, {
- // limit: limit,
- // page: page + 1,
- // with_deleted: true,
- // order_field: sorting[0].id,
- // order_direction: sorting[0].desc == false ? 'ASC' : 'DESC',
- // filter: JSON.stringify(filter)
- // });
+ const fetchAccount = async (page: number, limit: number, sorting: any, filter: any) => {
+ try {
+ const response = await GetData(`${API_URL}/user/list`, {
+ limit: limit,
+ page: page + 1,
+ with_deleted: true,
+ order_field: sorting[0].id,
+ order_direction: sorting[0].desc == false ? 'ASC' : 'DESC',
+ filter: JSON.stringify(filter)
+ });
- // setAccounts(response?.data.list);
+ console.log(response?.data.list);
+ setAccounts(response?.data.list);
- // return {
- // data: response?.data.list,
- // totalCount: response?.data.total_count
- // };
- // } catch (error) {
- // console.log(error);
- // }
- // };
+ return {
+ data: response?.data.list,
+ totalCount: response?.data.total_count
+ };
+ } catch (error) {
+ console.log(error);
+ }
+ };
return (
diff --git a/src/pages/master/municipios/blocks/SearchDialog.tsx b/src/pages/master/municipios/blocks/SearchDialog.tsx
index 42c1ddf..1b0142f 100644
--- a/src/pages/master/municipios/blocks/SearchDialog.tsx
+++ b/src/pages/master/municipios/blocks/SearchDialog.tsx
@@ -83,14 +83,14 @@ const SearchDialog = () => {
// console.log(municipios);
return (