-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ feat(admin): fix main view and dashboard (#381)
* ✨ feat(admin): fix main view and dashboard * :feat: change dashboard view
- Loading branch information
1 parent
5a7c600
commit ddc69b8
Showing
16 changed files
with
561 additions
and
209 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
6 changes: 3 additions & 3 deletions
6
backend/streetdrop-admin/streetdrop-admin-web/public/manifest.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 12 additions & 4 deletions
16
...treetdrop-admin/streetdrop-admin-web/src/components/dashboard/UserSignUpGraphDashboard.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
97 changes: 97 additions & 0 deletions
97
backend/streetdrop-admin/streetdrop-admin-web/src/components/items/ItemReportPage.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
import React, {useEffect, useState} from "react"; | ||
import UserBlockApi from "../../api/domain/user/UserBlockApi"; | ||
import BasicLayout from "../../layout/BasicLayout"; | ||
import {Table} from "antd"; | ||
|
||
function ItemReportPage() { | ||
const [data, setData] = useState([]); | ||
|
||
const exampleData ={ | ||
|
||
} | ||
|
||
const [tableParams, setTableParams] = useState({ | ||
pagination: { | ||
current: 1, | ||
pageSize: 30 | ||
}, | ||
}); | ||
|
||
useEffect(() => { | ||
fetchData(); | ||
}, [JSON.stringify(tableParams)]); | ||
|
||
|
||
const fetchData = async () => { | ||
const response = await UserBlockApi.getAllBlockList(tableParams.pagination.current - 1, tableParams.pagination.pageSize); | ||
setData(response.data['data']); | ||
setTableParams({ | ||
...tableParams, | ||
pagination: { | ||
...tableParams.pagination, | ||
total: response.data['meta']['totalElements'], | ||
}, | ||
}); | ||
} | ||
|
||
const columns = [ | ||
{ | ||
title: 'ID', | ||
dataIndex: 'id', | ||
key: 'id', | ||
}, | ||
{ | ||
title: '차단 요청 유저 ID', | ||
dataIndex: 'userId', | ||
}, | ||
{ | ||
title: '차단 요청 유저 닉네임', | ||
dataIndex: 'userNickname', | ||
}, | ||
{ | ||
title: '아이템 정보', | ||
dataIndex: 'blockUserId', | ||
}, | ||
{ | ||
title: '차단 대상 유저 닉네임', | ||
dataIndex: 'blockUserNickname', | ||
}, | ||
{ | ||
title: '차단 일자', | ||
dataIndex: 'createdAt', | ||
} | ||
]; | ||
|
||
const handleTableChange = ( | ||
pagination, | ||
) => { | ||
setTableParams({ | ||
pagination, | ||
}); | ||
|
||
|
||
if (pagination.pageSize !== tableParams.pagination?.pageSize) { | ||
setData([]); | ||
} | ||
}; | ||
|
||
|
||
return ( | ||
<> | ||
<BasicLayout> | ||
<h3 style={{marginBottom: '10px'}}>아이템 신고 관리</h3> | ||
<p style={{color: 'gray'}}>아이템의 신고내역과 신고 처리를 관리할 수 있습니다.</p> | ||
<Table | ||
style={{marginTop: '20px'}} | ||
columns={columns} | ||
rowKey={record => record.id} | ||
pagination={tableParams.pagination} | ||
dataSource={data} | ||
onChange={handleTableChange} | ||
/> | ||
</BasicLayout> | ||
</> | ||
) | ||
} | ||
|
||
export default ItemReportPage; |
44 changes: 17 additions & 27 deletions
44
backend/streetdrop-admin/streetdrop-admin-web/src/layout/BasicLayout.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.