fix remove Wallet Rule
- remove function get list group
This commit is contained in:
@ -87,7 +87,6 @@ const AddDialog = () => {
|
|||||||
status: ''
|
status: ''
|
||||||
};
|
};
|
||||||
const [formField, setFormField] = useState(initialState);
|
const [formField, setFormField] = useState(initialState);
|
||||||
const [groups, setGroups] = useState<GroupProps[]>([]);
|
|
||||||
const [wallets, setWallets] = useState<WalletProps[]>([]);
|
const [wallets, setWallets] = useState<WalletProps[]>([]);
|
||||||
|
|
||||||
const resetForm = () => {
|
const resetForm = () => {
|
||||||
@ -134,23 +133,6 @@ const AddDialog = () => {
|
|||||||
setAlert({ show: false, message: '' });
|
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) => {
|
const getWalletLists = async (sorting: any) => {
|
||||||
try {
|
try {
|
||||||
const response = await GetData(`${API_URL_MASTERDATA}/wallet/list`, {
|
const response = await GetData(`${API_URL_MASTERDATA}/wallet/list`, {
|
||||||
@ -173,7 +155,6 @@ const AddDialog = () => {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
getWalletLists([{ id: 'wallets.name', desc: false }]);
|
getWalletLists([{ id: 'wallets.name', desc: false }]);
|
||||||
getGroupLists([{ id: 'name', desc: false }]);
|
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user