Showing
8 changed files
with
193 additions
and
99 deletions
| ... | @@ -8,10 +8,10 @@ const thArray = ['유저ID', '대여 시각', '반납 시각', '대여 시간', | ... | @@ -8,10 +8,10 @@ const thArray = ['유저ID', '대여 시각', '반납 시각', '대여 시간', |
| 8 | 8 | ||
| 9 | const KickboardHistoryTable = () => { | 9 | const KickboardHistoryTable = () => { |
| 10 | 10 | ||
| 11 | + // category="Here is a subtitle for this table" | ||
| 11 | return ( | 12 | return ( |
| 12 | <Card | 13 | <Card |
| 13 | - title="Striped Table with Hover" | 14 | + title="000000번 킥보드 사용자 히스토리" |
| 14 | - category="Here is a subtitle for this table" | ||
| 15 | ctTableFullWidth | 15 | ctTableFullWidth |
| 16 | ctTableResponsive | 16 | ctTableResponsive |
| 17 | content={ | 17 | content={ | ... | ... |
| ... | @@ -6,6 +6,7 @@ import moment from "moment"; | ... | @@ -6,6 +6,7 @@ import moment from "moment"; |
| 6 | 6 | ||
| 7 | // border: 1px solid #E3E3E3; | 7 | // border: 1px solid #E3E3E3; |
| 8 | const KickboardButton = styled.div` | 8 | const KickboardButton = styled.div` |
| 9 | + font-size: 16px; | ||
| 9 | background-color: #e7e7e7; | 10 | background-color: #e7e7e7; |
| 10 | border-radius: 4px; | 11 | border-radius: 4px; |
| 11 | color: #565656; | 12 | color: #565656; |
| ... | @@ -74,8 +75,7 @@ const KickboardStatusCard = () => { | ... | @@ -74,8 +75,7 @@ const KickboardStatusCard = () => { |
| 74 | </KickboardDataList> | 75 | </KickboardDataList> |
| 75 | </Row> | 76 | </Row> |
| 76 | } | 77 | } |
| 77 | - > | 78 | + /> |
| 78 | - </Card> | ||
| 79 | ); | 79 | ); |
| 80 | }; | 80 | }; |
| 81 | 81 | ... | ... |
| 1 | +import React from "react"; | ||
| 2 | +import styled from "styled-components"; | ||
| 3 | + | ||
| 4 | +const SearchButtonWrapper = styled.div` | ||
| 5 | + display: flex; | ||
| 6 | + flex-direction: row; | ||
| 7 | + justify-content: space-between; | ||
| 8 | +`; | ||
| 9 | + | ||
| 10 | +const SearchInput = styled.input` | ||
| 11 | + width: 60%; | ||
| 12 | +`; | ||
| 13 | + | ||
| 14 | +const ApplyButton = styled.div` | ||
| 15 | + width: 17%; | ||
| 16 | + background-color: #e7e7e7; | ||
| 17 | + border-radius: 4px; | ||
| 18 | + color: #565656; | ||
| 19 | + text-align: center; | ||
| 20 | + | ||
| 21 | + display: flex; | ||
| 22 | + justify-content: center; | ||
| 23 | + align-items: center; | ||
| 24 | + | ||
| 25 | + &:hover { | ||
| 26 | + background-color: #565656; | ||
| 27 | + color: white; | ||
| 28 | + cursor: pointer; | ||
| 29 | +`; | ||
| 30 | + | ||
| 31 | +const SelectBox = styled.select` | ||
| 32 | + width: 17%; | ||
| 33 | + color: #333333; | ||
| 34 | + border-color: #E3E3E3; | ||
| 35 | + border-radius: 4px; | ||
| 36 | +`; | ||
| 37 | + | ||
| 38 | + | ||
| 39 | +const SearchButton = () => { | ||
| 40 | + return ( | ||
| 41 | + <SearchButtonWrapper> | ||
| 42 | + <SelectBox> | ||
| 43 | + <option value="전화 번호">전화 번호</option> | ||
| 44 | + <option value="이메일">이메일</option> | ||
| 45 | + </SelectBox> | ||
| 46 | + <SearchInput type="text" className="form-control" placeholder={"킥보드 번호로 검색하기"}/> | ||
| 47 | + <ApplyButton><span>검색</span></ApplyButton> | ||
| 48 | + </SearchButtonWrapper> | ||
| 49 | + ); | ||
| 50 | +}; | ||
| 51 | + | ||
| 52 | +export default SearchButton; | ||
| 53 | + | ||
| 54 | + |
| 1 | +import React from "react"; | ||
| 2 | +import { Card } from "components/Card/Card.jsx"; | ||
| 3 | +import {Col, Row} from "react-bootstrap"; | ||
| 4 | +import styled from "styled-components" | ||
| 5 | +import moment from "moment"; | ||
| 6 | + | ||
| 7 | +const UserData = styled.div` | ||
| 8 | + padding: 4px 0; | ||
| 9 | + font-size: 15px; | ||
| 10 | +`; | ||
| 11 | + | ||
| 12 | +const UserDataCard = () => { | ||
| 13 | + const getStats = `마지막 업데이트 ${moment().format("YYYY/MM/DD hh:mm")}`; | ||
| 14 | + | ||
| 15 | + return ( | ||
| 16 | + <Card | ||
| 17 | + title={'000000번 사용자'} | ||
| 18 | + stats={getStats} | ||
| 19 | + statsIcon="fa fa-history" | ||
| 20 | + content={ | ||
| 21 | + <div> | ||
| 22 | + <Row> | ||
| 23 | + <Col md={6} sm={6} xs={12}> | ||
| 24 | + <UserData>이름</UserData> | ||
| 25 | + </Col> | ||
| 26 | + <Col md={6} sm={6} xs={12}> | ||
| 27 | + <UserData>사용자 ID</UserData> | ||
| 28 | + </Col> | ||
| 29 | + </Row> | ||
| 30 | + <Row> | ||
| 31 | + <Col md={6} sm={6} xs={12}> | ||
| 32 | + <UserData>전화번호</UserData> | ||
| 33 | + </Col> | ||
| 34 | + <Col md={6} sm={6} xs={12}> | ||
| 35 | + <UserData>이메일 가입 날짜</UserData> | ||
| 36 | + </Col> | ||
| 37 | + </Row> | ||
| 38 | + <Row> | ||
| 39 | + <Col md={6} sm={6} xs={12}> | ||
| 40 | + <UserData>가입 날짜</UserData> | ||
| 41 | + </Col> | ||
| 42 | + <Col md={6} sm={6} xs={12}> | ||
| 43 | + <UserData>최근 로그인 날짜</UserData> | ||
| 44 | + </Col> | ||
| 45 | + </Row> | ||
| 46 | + <Row> | ||
| 47 | + <Col md={6} sm={6} xs={12}> | ||
| 48 | + <UserData>면허증 등록 여부</UserData> | ||
| 49 | + </Col> | ||
| 50 | + <Col md={6} sm={6} xs={12}> | ||
| 51 | + <UserData>카드 등록 여부</UserData> | ||
| 52 | + </Col> | ||
| 53 | + </Row> | ||
| 54 | + </div> | ||
| 55 | + } | ||
| 56 | + /> | ||
| 57 | + ); | ||
| 58 | +}; | ||
| 59 | + | ||
| 60 | +export default UserDataCard; | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 1 | -/*! | ||
| 2 | - | ||
| 3 | -========================================================= | ||
| 4 | -* Light Bootstrap Dashboard React - v1.3.0 | ||
| 5 | -========================================================= | ||
| 6 | - | ||
| 7 | -* Product Page: https://www.creative-tim.com/product/light-bootstrap-dashboard-react | ||
| 8 | -* Copyright 2019 Creative Tim (https://www.creative-tim.com) | ||
| 9 | -* Licensed under MIT (https://github.com/creativetimofficial/light-bootstrap-dashboard-react/blob/master/LICENSE.md) | ||
| 10 | - | ||
| 11 | -* Coded by Creative Tim | ||
| 12 | - | ||
| 13 | -========================================================= | ||
| 14 | - | ||
| 15 | -* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | ||
| 16 | - | ||
| 17 | -*/ | ||
| 18 | import React, { Component } from "react"; | 1 | import React, { Component } from "react"; |
| 19 | import { Grid, Row, Col, Table } from "react-bootstrap"; | 2 | import { Grid, Row, Col, Table } from "react-bootstrap"; |
| 20 | 3 | ||
| 21 | import Card from "components/Card/Card.jsx"; | 4 | import Card from "components/Card/Card.jsx"; |
| 22 | -import { thArray, tdArray } from "variables/Variables.jsx"; | 5 | +import { tdArray } from "variables/Variables.jsx"; |
| 23 | 6 | ||
| 24 | -class TableList extends Component { | 7 | +const thArray = ['킥보드 시리얼 번호', '대여 시각', '반납 시각', '대여 시간', '이동 거리', '대여 금액']; |
| 8 | + | ||
| 9 | +class UserHistoryCard extends Component { | ||
| 25 | render() { | 10 | render() { |
| 26 | return ( | 11 | return ( |
| 27 | - <div className="content"> | 12 | + <Card |
| 28 | - <Grid fluid> | 13 | + title="Striped Table with Hover" |
| 29 | - <Row> | 14 | + category="Here is a subtitle for this table" |
| 30 | - <Col md={12}> | 15 | + ctTableFullWidth |
| 31 | - <Card | 16 | + ctTableResponsive |
| 32 | - title="Striped Table with Hover" | 17 | + content={ |
| 33 | - category="Here is a subtitle for this table" | 18 | + <Table striped hover> |
| 34 | - ctTableFullWidth | 19 | + <thead> |
| 35 | - ctTableResponsive | 20 | + <tr> |
| 36 | - content={ | 21 | + {thArray.map((prop, key) => { |
| 37 | - <Table striped hover> | 22 | + return <th key={key}>{prop}</th>; |
| 38 | - <thead> | 23 | + })} |
| 39 | - <tr> | 24 | + </tr> |
| 40 | - {thArray.map((prop, key) => { | 25 | + </thead> |
| 41 | - return <th key={key}>{prop}</th>; | 26 | + <tbody> |
| 42 | - })} | 27 | + {tdArray.map((prop, key) => { |
| 43 | - </tr> | 28 | + return ( |
| 44 | - </thead> | 29 | + <tr key={key}> |
| 45 | - <tbody> | 30 | + {prop.map((prop, key) => { |
| 46 | - {tdArray.map((prop, key) => { | 31 | + return <td key={key}>{prop}</td>; |
| 47 | - return ( | 32 | + })} |
| 48 | - <tr key={key}> | 33 | + </tr> |
| 49 | - {prop.map((prop, key) => { | 34 | + ); |
| 50 | - return <td key={key}>{prop}</td>; | 35 | + })} |
| 51 | - })} | 36 | + </tbody> |
| 52 | - </tr> | 37 | + </Table> |
| 53 | - ); | 38 | + } |
| 54 | - })} | 39 | + /> |
| 55 | - </tbody> | ||
| 56 | - </Table> | ||
| 57 | - } | ||
| 58 | - /> | ||
| 59 | - </Col> | ||
| 60 | - | ||
| 61 | - <Col md={12}> | ||
| 62 | - <Card | ||
| 63 | - plain | ||
| 64 | - title="Striped Table with Hover" | ||
| 65 | - category="Here is a subtitle for this table" | ||
| 66 | - ctTableFullWidth | ||
| 67 | - ctTableResponsive | ||
| 68 | - content={ | ||
| 69 | - <Table hover> | ||
| 70 | - <thead> | ||
| 71 | - <tr> | ||
| 72 | - {thArray.map((prop, key) => { | ||
| 73 | - return <th key={key}>{prop}</th>; | ||
| 74 | - })} | ||
| 75 | - </tr> | ||
| 76 | - </thead> | ||
| 77 | - <tbody> | ||
| 78 | - {tdArray.map((prop, key) => { | ||
| 79 | - return ( | ||
| 80 | - <tr key={key}> | ||
| 81 | - {prop.map((prop, key) => { | ||
| 82 | - return <td key={key}>{prop}</td>; | ||
| 83 | - })} | ||
| 84 | - </tr> | ||
| 85 | - ); | ||
| 86 | - })} | ||
| 87 | - </tbody> | ||
| 88 | - </Table> | ||
| 89 | - } | ||
| 90 | - /> | ||
| 91 | - </Col> | ||
| 92 | - </Row> | ||
| 93 | - </Grid> | ||
| 94 | - </div> | ||
| 95 | ); | 40 | ); |
| 96 | } | 41 | } |
| 97 | } | 42 | } |
| 98 | 43 | ||
| 99 | -export default TableList; | 44 | +export default UserHistoryCard; | ... | ... |
| 1 | import Dashboard from "views/Dashboard.jsx"; | 1 | import Dashboard from "views/Dashboard.jsx"; |
| 2 | import UserProfile from "views/UserProfile.jsx"; | 2 | import UserProfile from "views/UserProfile.jsx"; |
| 3 | -import TableList from "views/TableList.jsx"; | 3 | +import UserHistory from "views/UserHistory.jsx"; |
| 4 | import Typography from "views/Typography.jsx"; | 4 | import Typography from "views/Typography.jsx"; |
| 5 | import Icons from "views/Icons.jsx"; | 5 | import Icons from "views/Icons.jsx"; |
| 6 | import Maps from "views/Maps.jsx"; | 6 | import Maps from "views/Maps.jsx"; |
| ... | @@ -24,9 +24,9 @@ const dashboardRoutes = [ | ... | @@ -24,9 +24,9 @@ const dashboardRoutes = [ |
| 24 | }, | 24 | }, |
| 25 | { | 25 | { |
| 26 | path: "/table", | 26 | path: "/table", |
| 27 | - name: "Table List", | 27 | + name: "사용자 정보", |
| 28 | - icon: "pe-7s-note2", | 28 | + icon: "pe-7s-users", |
| 29 | - component: TableList, | 29 | + component: UserHistory, |
| 30 | layout: "/admin" | 30 | layout: "/admin" |
| 31 | }, | 31 | }, |
| 32 | { | 32 | { |
| ... | @@ -59,8 +59,8 @@ const dashboardRoutes = [ | ... | @@ -59,8 +59,8 @@ const dashboardRoutes = [ |
| 59 | }, | 59 | }, |
| 60 | { | 60 | { |
| 61 | path: "/kickboard", | 61 | path: "/kickboard", |
| 62 | - name: "Kickboard", | 62 | + name: "킥보드 정보", |
| 63 | - icon: "pe-7s-bicycle", | 63 | + icon: "pe-7s-map-2", |
| 64 | component: Kickboard, | 64 | component: Kickboard, |
| 65 | layout: "/admin" | 65 | layout: "/admin" |
| 66 | }, | 66 | }, | ... | ... |
| ... | @@ -601,7 +601,7 @@ var legendBar = { | ... | @@ -601,7 +601,7 @@ var legendBar = { |
| 601 | module.exports = { | 601 | module.exports = { |
| 602 | style, // For notifications (App container and Notifications view) | 602 | style, // For notifications (App container and Notifications view) |
| 603 | thArray, | 603 | thArray, |
| 604 | - tdArray, // For tables (TableList view) | 604 | + tdArray, // For tables (UserHistory view) |
| 605 | iconsArray, // For icons (Icons view) | 605 | iconsArray, // For icons (Icons view) |
| 606 | dataPie, | 606 | dataPie, |
| 607 | legendPie, | 607 | legendPie, | ... | ... |
frontend/src/views/UserHistory.jsx
0 → 100644
| 1 | +import React, { useState, useEffect } from "react"; | ||
| 2 | +import { Grid, Row, Col, Table } from "react-bootstrap"; | ||
| 3 | +import UserDataCard from '../components/UserHistory/UserDataCard'; | ||
| 4 | +import UserHistoryCard from '../components/UserHistory/UserHistoryCard'; | ||
| 5 | +import SearchButton from "../components/UserHistory/SearchButton"; | ||
| 6 | + | ||
| 7 | +const UserHistory = (props) => { | ||
| 8 | + const [userId, setUserId] = useState('0'); | ||
| 9 | + | ||
| 10 | + useEffect(() => { | ||
| 11 | + // componentDidMount > 쿼리 검사하기 | ||
| 12 | + },[]); | ||
| 13 | + | ||
| 14 | + return ( | ||
| 15 | + <div className="content"> | ||
| 16 | + <Grid fluid> | ||
| 17 | + <Row> | ||
| 18 | + <Col md={4} mdOffset={8} sm={5} smOffset={7} style={{marginBottom:15}}> | ||
| 19 | + <SearchButton/> | ||
| 20 | + </Col> | ||
| 21 | + </Row> | ||
| 22 | + <Row> | ||
| 23 | + <Col md={12}> | ||
| 24 | + <UserDataCard/> | ||
| 25 | + </Col> | ||
| 26 | + <Col md={12}> | ||
| 27 | + <UserHistoryCard/> | ||
| 28 | + </Col> | ||
| 29 | + </Row> | ||
| 30 | + </Grid> | ||
| 31 | + </div> | ||
| 32 | + ); | ||
| 33 | +}; | ||
| 34 | + | ||
| 35 | +export default UserHistory; |
-
Please register or login to post a comment