feat: 거주자/장애인 심의대상 상세 조회 진행

main
minuk926 3 years ago
parent c20f7ebe7b
commit db1752d397

@ -53,7 +53,7 @@ export async function findJudges(params) {
export async function findJudgeDetails(params) { export async function findJudgeDetails(params) {
const res = await axios.get(GET_JUDGE_DETAIL_LIST, { params }); const res = await axios.get(GET_JUDGE_DETAIL_LIST, { params });
if (res.success) { if (res.success) {
res.data = res.data.map((d, idx) => ({ ...d, rowId: setRowId(params, idx) })); // res.data = res.data.map((d, idx) => ({ ...d, rowId: setRowId(params, idx) }));
return res; return res;
} }
return res; return res;

@ -24,7 +24,29 @@ const ModalDetails = ({ msDatagb, msSdate, msEdate, msChasu, msuTeam }) => {
findJudgeDetails(params).then((response) => { findJudgeDetails(params).then((response) => {
if (response && response.data) { if (response && response.data) {
setTotalCount(response.count); console.log(response.data);
const totUserList = response.data?.totUserList;
const resultList = response.data?.resultList;
const gridRows = [];
const aaa = resultList.map((m) => {
// const users = m.simsa.map((u) => ({ ...m, name: u.NAME, msResult: u.msResult, msuResult: u.msuResult }));
m.simsa.reduce((pre, cur) => {
console.log(pre, cur);
// return pre.concat(cur);
return { pre, ...cur };
});
return m;
});
/*
gridRows.push({
msMainCode: m.msMainCode,
msSeq: m.msSeq,
msCarnum: m.msCarnum,
})
*/
setTotalCount(totUserList.length);
setRowsState((prevState) => ({ ...prevState, rows: response.data })); setRowsState((prevState) => ({ ...prevState, rows: response.data }));
// apiRef.current.forceUpdate(); // .updateRowData([]); // apiRef.current.forceUpdate(); // .updateRowData([]);
// apiRef.current.updateRowData([]); // apiRef.current.updateRowData([]);

Loading…
Cancel
Save