edit loan modal added, employer verify api added

This commit was merged in pull request #32.
This commit is contained in:
victorAnumudu
2024-06-13 19:56:17 +01:00
parent 8a96b10e4b
commit 98454e2c80
5 changed files with 34 additions and 12 deletions
@@ -2,7 +2,7 @@ import { useQuery } from "react-query";
import { UserEditModalForm } from "./UserEditModalForm";
import { isNotEmpty, QUERIES } from "../../../../../_digifi/helpers";
import { useListView } from "../core/ListViewProvider";
import { getUserById } from "../../core/_requests";
import { getUserById, getApprovedUsers } from "../../core/_requests";
const UserEditModalFormWrapper = () => {
const { itemIdForUpdate, setItemIdForUpdate } = useListView();
@@ -14,7 +14,8 @@ const UserEditModalFormWrapper = () => {
} = useQuery(
`${QUERIES.READY_LIST}-user-${itemIdForUpdate}`,
() => {
return getUserById(itemIdForUpdate);
// return getUserById(itemIdForUpdate);
return getApprovedUsers('');
},
{
cacheTime: 0,
@@ -33,7 +34,10 @@ const UserEditModalFormWrapper = () => {
}
if (!isLoading && !error && user) {
return <UserEditModalForm isUserLoading={isLoading} user={user} />;
// return <UserEditModalForm isUserLoading={isLoading} user={user} />;
// REMOVE LATER AND ALLOW UP ALONE
let newUser:any = user?.records
return <UserEditModalForm isUserLoading={isLoading} user={newUser} />;
}
return null;