fix remove Wallet Rule
- remove function get list group
This commit is contained in:
@ -87,7 +87,6 @@ const AddDialog = () => {
|
||||
status: ''
|
||||
};
|
||||
const [formField, setFormField] = useState(initialState);
|
||||
const [groups, setGroups] = useState<GroupProps[]>([]);
|
||||
const [wallets, setWallets] = useState<WalletProps[]>([]);
|
||||
|
||||
const resetForm = () => {
|
||||
@ -134,23 +133,6 @@ const AddDialog = () => {
|
||||
setAlert({ show: false, message: '' });
|
||||
};
|
||||
|
||||
const getGroupLists = async (sorting: any) => {
|
||||
try {
|
||||
const response = await GetData(`${API_URL_WALLET}/dashboard/group`, {
|
||||
limit: 100,
|
||||
page: 1,
|
||||
with_deleted: false,
|
||||
order_field: sorting[0].id,
|
||||
order_direction: sorting[0].desc == false ? 'ASC' : 'DESC'
|
||||
});
|
||||
|
||||
// console.log('GROUPS: ', response?.data);
|
||||
setGroups(response?.data.list);
|
||||
} catch (error) {
|
||||
console.error('Error fetching groups', error);
|
||||
}
|
||||
};
|
||||
|
||||
const getWalletLists = async (sorting: any) => {
|
||||
try {
|
||||
const response = await GetData(`${API_URL_MASTERDATA}/wallet/list`, {
|
||||
@ -173,7 +155,6 @@ const AddDialog = () => {
|
||||
|
||||
useEffect(() => {
|
||||
getWalletLists([{ id: 'wallets.name', desc: false }]);
|
||||
getGroupLists([{ id: 'name', desc: false }]);
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
Reference in New Issue
Block a user