|
|
|
@ -53,26 +53,29 @@ const JudgeReview = ({ msDatagb, menuName }) => {
|
|
|
|
|
});
|
|
|
|
|
const [judgeDatas, setJudgeDatas] = useState([]);
|
|
|
|
|
|
|
|
|
|
const search = useCallback(async () => {
|
|
|
|
|
const params = {
|
|
|
|
|
msDatagb,
|
|
|
|
|
msYear: selectedYear,
|
|
|
|
|
msChasu: inputRef.current,
|
|
|
|
|
page: rowsState.page,
|
|
|
|
|
size: rowsState.pageSize
|
|
|
|
|
};
|
|
|
|
|
const search = useCallback(
|
|
|
|
|
async (datagb) => {
|
|
|
|
|
const params = {
|
|
|
|
|
msDatagb: datagb ?? msDatagb,
|
|
|
|
|
msYear: selectedYear,
|
|
|
|
|
msChasu: inputRef.current,
|
|
|
|
|
page: rowsState.page,
|
|
|
|
|
size: rowsState.pageSize
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
let res = {};
|
|
|
|
|
if (msDatagb) {
|
|
|
|
|
res = await findJudges(params);
|
|
|
|
|
} else {
|
|
|
|
|
res = await findParkings(params);
|
|
|
|
|
}
|
|
|
|
|
if (res && res.data) {
|
|
|
|
|
setTotalCount(res.count);
|
|
|
|
|
setRowsState((prevState) => ({ ...prevState, rows: res.data }));
|
|
|
|
|
}
|
|
|
|
|
}, [msDatagb, rowsState.page, rowsState.pageSize, selectedYear]);
|
|
|
|
|
let res = {};
|
|
|
|
|
if (datagb ?? msDatagb) {
|
|
|
|
|
res = await findJudges(params);
|
|
|
|
|
} else {
|
|
|
|
|
res = await findParkings(params);
|
|
|
|
|
}
|
|
|
|
|
if (res && res.data) {
|
|
|
|
|
setTotalCount(res.count);
|
|
|
|
|
setRowsState((prevState) => ({ ...prevState, rows: res.data }));
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
[msDatagb, rowsState.page, rowsState.pageSize, selectedYear]
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
const deleteJudge = useCallback(
|
|
|
|
|
(row) => () => {
|
|
|
|
@ -91,7 +94,7 @@ const JudgeReview = ({ msDatagb, menuName }) => {
|
|
|
|
|
...rowsState,
|
|
|
|
|
page: 0
|
|
|
|
|
});
|
|
|
|
|
search();
|
|
|
|
|
search(datagb);
|
|
|
|
|
} else {
|
|
|
|
|
showAlert.show(res.message);
|
|
|
|
|
}
|
|
|
|
|