{"version":3,"sources":["util.js","apis/api.js","reducers/exampleReducer.js","components/record/RecordTable.js","components/record/Option.js","components/record/MonthlyRecord.js","components/record/DailyRecordDetail.js","components/record/DailyRecordStat.js","actions/types.js","actions/index.js","components/record/DailyRecord.js","components/Header.js","components/game/GameForm.js","components/game/GameCreate.js","components/user/UserForm.js","components/user/UserCreate.js","components/Auth.js","components/game/GameEdit.js","components/Modal.js","components/game/GameDelete.js","components/record/WeeklyRecord.js","components/user/UserDetail.js","components/user/UserManage.js","components/user/UserEdit.js","components/user/UserStatDetail.js","components/user/UserStatSummary.js","components/user/UserStat.js","components/record/YearlyRecord.js","components/record/TotalRecord.js","components/user/UserRelativeStat.js","components/App.js","reducers/authReducer.js","reducers/index.js","index.js"],"names":["calculateStats","games","users","Set","stats","forEach","game","result","individual","has","name","add","Number","uma","toFixed","score","victory_point","star","first_count","second_count","third_count","fourth_count","obj","items","Object","keys","map","key","sort","first","second","sort_object","client","axios","create","baseURL","process","api","get","url","config","token","validateStatus","status","headers","post","payload","put","del","delete","exampleReducer","state","action","type","data","column","slice","reverse","direction","_","sortBy","parseFloat","Error","RecordTable","dispatch","Table","sortable","celled","unstackable","Header","className","Row","HeaderCell","sorted","onClick","Body","d","index","TableRow","TableCell","to","average_uma","average_score","average_vp","average_rank","first_ratio","half_ratio","last_ratio","match_count","monthOption","text","value","yearOption","MonthlyRecord","useState","setGames","setStats","Date","getFullYear","year","setYear","getMonth","month","setMonth","listStats","setListStats","filter","setFilter","React","useReducer","fetchGames","a","params","results","useEffect","stat","numberCheck","v","num","isFinite","toString","includes","replace","onChangeYear","e","YearDropdown","Dropdown","placeholder","fluid","selection","options","onChange","defaultValue","onChangeMonth","MonthDropdown","target","DailyRecordDetail","listIndividuals","props","special","this","roundNo","isSignedIn","role","id","Component","connect","auth","DailyRecordStat","recordStats","SIGN_IN","SIGN_OUT","signIn","signOut","DailyRecord","recordRows","statRows","date","day","getDate","alert","setState","fillTable","listGames","idx","recordRow","push","recordRowElement","splice","length","then","prevProps","prevState","snapshot","ExampleCustomInput","forwardRef","ref","dateFormat","selected","customInput","withRouter","useSelector","store","useDispatch","history","GameForm","onInputChange","event","records","record","filterInt","test","NaN","onFormSubmit","preventDefault","flag","isNaN","onSubmit","renderIndividual","Fragment","fetchGame","match","gameId","compose","GameCreate","response","UserForm","user","phone","fetchUser","UserCreate","user_info","Auth","inputs","password","success","GameEdit","ReactDOM","createPortal","onDismiss","stopPropagation","title","content","actions","document","querySelector","GameDelete","WeeklyRecord","setDate","start","setStart","end","setEnd","d_start","d_end","UserDetail","UserManage","userRows","fetchUsers","listUsers","UserEdit","UserStatDetail","renderList","tableCell","isTotal","headerCell","columnName","padded","UserStatSummary","averageUma","isPersonal","isEmpty","firstRatio","secondRatio","thirdRatio","fourthRatio","active","UserStat","monthly","yearly","total","pieChartData","color","renderMonthlyList","renderYearlyStat","renderTotalStat","label","dataEntry","labelStyle","fill","fontSize","fontFamily","radius","labelPosition","startAngle","YearlyRecord","TotalRecord","UserRelativeStat","fixedName","start_date","end_date","num_games","relative","fetchRelativeStats","opponent","onNameChange","onStartDateChange","onEndDateChange","onNumGamesChange","Grid","verticalAlign","Form","Group","inline","as","style","marginBottom","marginLeft","Field","Input","Button","basic","opponent_stat","App","path","exact","component","INITIAL_STATE","authReducer","persistConfig","storage","whitelist","rootReducer","combineReducers","form","formReducer","persistReducer","createStore","persistor","persistStore","render","loading"],"mappings":"uOA8CeA,EAnCQ,SAACC,GACpB,IAAMC,EAAQ,IAAIC,IACZC,EAAQ,GA8Bd,OA5BAH,EAAMI,SAAQ,SAAAC,GACVA,EAAKC,OAAOF,SAAQ,SAAAG,GACXN,EAAMO,IAAID,EAAWE,QACtBR,EAAMS,IAAIH,EAAWE,MACrBN,EAAMI,EAAWE,MAAQ,CACrB,IAAO,EACP,MAAS,EACT,cAAiB,EACjB,KAAQ,EACR,YAAe,EACf,YAAe,EACf,aAAgB,EAChB,YAAe,EACf,aAAgB,IAGxBN,EAAMI,EAAWE,MAAjB,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AC,IAAD,CAAUgO,KAAM,IAAKhO,GAAI,eC7DvCmO,GAAgB,CAClBrK,WAAY,KACZC,KAAM,KACNtG,MAAO,IAcI2Q,GAXK,WAAoC,IAAnCjQ,EAAkC,uDAA1BgQ,GAAe/P,EAAW,uCACnD,OAAQA,EAAOC,MACX,KAAKiG,EACD,OAAO,2BAAKnG,GAAZ,IAAmB2F,YAAY,EAAMC,KAAM3F,EAAON,QAAQiG,KAAMtG,MAAOW,EAAON,QAAQL,QAC1F,KAAK8G,EACD,OAAO,2BAAKpG,GAAZ,IAAmB2F,YAAY,EAAOC,KAAM,KAAMtG,MAAO,KAC7D,QACI,OAAOU,I,8BCTbkQ,GAAgB,CAClB1R,IAAK,OACL2R,Q,QAAAA,EACAC,UAAW,CAAC,SAGVC,GAAcC,YAAgB,CAChCtK,KAAMiK,GACNM,KAAMC,OAGKC,gBAAeP,GAAeG,I,UCTvClI,GAAQuI,YAAYL,IACpBM,GAAYC,aAAazI,IAE/BmC,IAASuG,OACL,cAAC,IAAD,CAAU1I,MAAOA,GAAjB,SACI,cAAC,KAAD,CAAa2I,QAAS,KAAMH,UAAWA,GAAvC,SACI,cAAC,GAAD,QAGR9F,SAASC,cAAc,W","file":"static/js/main.2e82c206.chunk.js","sourcesContent":["\nconst sort_object = obj => {\n const items = Object.keys(obj).map(function (key) {\n return [key, obj[key]];\n });\n items.sort(function (first, second) {\n return second[1]['uma'] - first[1]['uma']\n });\n return items\n}\n\nconst calculateStats = (games) => {\n const users = new Set()\n const stats = {}\n\n games.forEach(game => {\n game.result.forEach(individual => {\n if (!users.has(individual.name)) {\n users.add(individual.name)\n stats[individual.name] = {\n 'uma': 0,\n 'score': 0,\n 'victory_point': 0,\n 'star': 0,\n 'match_count': 0,\n 'first_count': 0,\n 'second_count': 0,\n 'third_count': 0,\n 'fourth_count': 0\n }\n }\n stats[individual.name]['uma'] = Number((stats[individual.name]['uma'] + individual.uma).toFixed(1))\n stats[individual.name]['score'] += (individual.score - 25000)\n stats[individual.name]['victory_point'] += individual.victory_point\n stats[individual.name]['star'] += individual.star\n stats[individual.name]['match_count'] += 1\n stats[individual.name]['first_count'] += individual.first_count\n stats[individual.name]['second_count'] += individual.second_count\n stats[individual.name]['third_count'] += individual.third_count\n stats[individual.name]['fourth_count'] += individual.fourth_count\n })\n })\n\n return sort_object(stats)\n}\n\nexport default calculateStats\n","import axios from 'axios';\n\nconst client = axios.create({\n baseURL: process.env.REACT_APP_BACKEND,\n})\n\nconst api = (() => {\n const get = (url, config, token) => {\n if (token == null) {\n token = \"\"\n }\n return client.get(url, {...config, validateStatus: (status) => {return status < 500}, headers: {'Authorization': token}})\n }\n\n const post = (url, payload, config, token) => {\n if (token == null) {\n token = \"\"\n }\n return client.post(url, payload, {...config, validateStatus: (status) => {return status < 500}, headers: {'Authorization': token}})\n }\n\n const put = (url, payload, config, token) => {\n if (token == null) {\n token = \"\"\n }\n return client.put(url, payload, {...config, validateStatus: (status) => {return status < 500}, headers: {'Authorization': token}})\n }\n\n const del = (url, config, token) => {\n if (token == null) {\n token = \"\"\n }\n return client.delete(url, {...config, validateStatus: (status) => {return status < 500}, headers: {'Authorization': token}})\n }\n\n return {\n get, post, put, del\n }\n})()\n\nexport default api\n","import _ from \"lodash\";\n\nconst exampleReducer = (state, action) => {\n switch (action.type) {\n case 'CHANGE_SORT':\n let data\n if (action.data == null) {\n data = state.data\n if (state.column === action.column) {\n return {\n ...state,\n data: data.slice().reverse(),\n direction: state.direction === 'ascending' ? 'descending' : 'ascending',\n }\n }\n } else {\n data = action.data\n }\n\n switch (action.column) {\n case 'uma':\n case 'average_uma':\n case 'score':\n case 'average_score':\n case 'victory_point':\n case 'average_vp':\n case 'first_ratio':\n case 'half_ratio':\n case 'first_count':\n case 'match_count':\n return {\n column: action.column,\n data: _.sortBy(data, function (obj) {\n return parseFloat(obj[action.column])\n }).reverse(),\n direction: 'ascending',\n }\n case 'average_rank':\n case 'last_ratio':\n return {\n column: action.column,\n data: _.sortBy(data, function (obj) {\n return parseFloat(obj[action.column])\n }),\n direction: 'ascending'\n }\n default:\n return {\n column: action.column,\n data: _.sortBy(data, [action.column]),\n direction: 'ascending',\n }\n }\n\n default:\n throw new Error()\n }\n}\n\nexport default exampleReducer\n","import React from \"react\"\nimport {Table, TableCell, TableRow} from \"semantic-ui-react\";\nimport {Link} from \"react-router-dom\";\nimport \"../../style.css\"\n\nconst RecordTable = ({column, data, direction, dispatch}) => {\n return (\n \n \n \n \n 순위\n \n \n 닉네임\n \n dispatch({type: 'CHANGE_SORT', column: 'uma'})}\n >\n 우마\n \n dispatch({type: 'CHANGE_SORT', column: 'average_uma'})}\n >\n 평우마\n \n dispatch({type: 'CHANGE_SORT', column: 'score'})}\n >\n 득점\n \n dispatch({type: 'CHANGE_SORT', column: 'average_score'})}\n >\n 평득점\n \n dispatch({type: 'CHANGE_SORT', column: 'victory_point'})}\n >\n 승점\n \n dispatch({type: 'CHANGE_SORT', column: 'average_vp'})}\n >\n 평승점\n \n dispatch({type: 'CHANGE_SORT', column: 'average_rank'})}\n >\n 평순위\n \n dispatch({type: 'CHANGE_SORT', column: 'first_ratio'})}\n >\n 1위율\n \n dispatch({type: 'CHANGE_SORT', column: 'half_ratio'})}\n >\n 연대율\n \n dispatch({type: 'CHANGE_SORT', column: 'last_ratio'})}\n >\n 4위율\n \n dispatch({type: 'CHANGE_SORT', column: 'first_count'})}\n >\n 1위\n \n \n 2위\n \n \n 3위\n \n \n 4위\n \n dispatch({type: 'CHANGE_SORT', column: 'match_count'})}\n >\n 국수\n \n \n \n \n {data.map((d, index) => (\n \n {index + 1}\n \n \n {d.name}\n \n \n {d.uma}\n {d.average_uma}\n {d.score}\n {d.average_score}\n {d.victory_point}\n {d.average_vp}\n {d.average_rank}\n {d.first_ratio}\n {d.half_ratio}\n {d.last_ratio}\n {d.first_count}\n {d.second_count}\n {d.third_count}\n {d.fourth_count}\n {d.match_count}\n \n ))}\n \n
\n )\n}\n\nexport default RecordTable\n","\nconst monthOption = [\n {\n key: '1',\n text: '01월',\n value: 1,\n },\n {\n key: '2',\n text: '02월',\n value: 2,\n },\n {\n key: '3',\n text: '03월',\n value: 3,\n },\n {\n key: '4',\n text: '04월',\n value: 4,\n },\n {\n key: '5',\n text: '05월',\n value: 5,\n },\n {\n key: '6',\n text: '06월',\n value: 6,\n },\n {\n key: '7',\n text: '07월',\n value: 7,\n },\n {\n key: '8',\n text: '08월',\n value: 8,\n },\n {\n key: '9',\n text: '09월',\n value: 9,\n },\n {\n key: '10',\n text: '10월',\n value: 10,\n },\n {\n key: '11',\n text: '11월',\n value: 11,\n },\n {\n key: '12',\n text: '12월',\n value: 12,\n },\n]\n\nconst yearOption = [\n {\n key: '2021',\n text: '2021년',\n value: 2021,\n },\n {\n key: '2022',\n text: '2022년',\n value: 2022,\n },\n {\n key: '2023',\n text: '2023년',\n value: 2023,\n },\n {\n key: '2024',\n text: '2024년',\n value: 2024,\n },\n {\n key: '2025',\n text: '2025년',\n value: 2025,\n },\n]\n\nexport {monthOption, yearOption}\n","import React, {forwardRef, useEffect, useState} from \"react\"\nimport calculateStats from \"../../util\";\nimport api from \"../../apis/api\";\nimport \"../../style.css\"\nimport exampleReducer from \"../../reducers/exampleReducer\";\nimport RecordTable from \"./RecordTable\";\nimport DatePicker from \"react-datepicker\";\nimport { Dropdown } from 'semantic-ui-react'\nimport { yearOption, monthOption } from \"./Option\";\n\nconst ExampleCustomInput = forwardRef(({value, onClick}, ref) => (\n \n))\n\nconst MonthlyRecord = () => {\n const [games, setGames] = useState([])\n const [stats, setStats] = useState([])\n const [year, setYear] = useState(new Date().getFullYear())\n const [month, setMonth] = useState(new Date().getMonth() + 1)\n const [listStats, setListStats] = useState([])\n const [filter, setFilter] = useState(0)\n\n const [state, dispatch] = React.useReducer(exampleReducer, {\n column: null,\n data: listStats,\n direction: null,\n })\n const {column, data, direction} = state\n\n const fetchGames = async () => {\n const results = await api.get('/games/monthly', {\n params: {\n year: year,\n month: month,\n }\n })\n if (results.status === 200) {\n setGames(results.data)\n } else {\n setGames([])\n }\n }\n\n useEffect(() => {\n fetchGames()\n }, [year, month])\n\n useEffect(() => {\n setStats(calculateStats(games))\n }, [games])\n\n useEffect(() => {\n setListStats(stats.map(stat => {\n const [name, {\n uma,\n score,\n victory_point,\n first_count,\n second_count,\n third_count,\n fourth_count,\n match_count\n }] = stat\n return (\n {\n name: name,\n uma: Number(uma).toFixed(1),\n average_uma: Number(uma / match_count).toFixed(2),\n score: Number(score).toFixed(0),\n average_score: Number(score / match_count).toFixed(0),\n victory_point: Number(victory_point).toFixed(0),\n average_vp: Number(victory_point / match_count).toFixed(2),\n average_rank: Number((first_count + second_count * 2 + third_count * 3 + fourth_count * 4) / match_count).toFixed(2),\n first_ratio: Number(first_count / match_count * 100).toFixed(1),\n half_ratio: Number((first_count + second_count) / match_count * 100).toFixed(1),\n last_ratio: Number(fourth_count / match_count * 100).toFixed(1),\n first_count: first_count,\n second_count: second_count,\n third_count: third_count,\n fourth_count: fourth_count,\n match_count: match_count\n }\n )\n }).filter(stat => stat.match_count >= filter))\n }, [stats, filter])\n\n useEffect(() => {\n dispatch({type: 'CHANGE_SORT', column: column, data: listStats})\n }, [listStats])\n\n const onChange = e => {\n numberCheck(e.target.value)\n }\n\n const numberCheck = v => {\n let num = v || 0\n if (!isFinite(num)) return\n num = num.toString()\n\n if (num !== '0' && !num.includes('.')) {\n num = num.replace(/^0+/, '')\n }\n\n setFilter(num)\n }\n\n const onChangeYear = (e, data) => {\n setYear(data.value)\n }\n\n const YearDropdown = () => (\n \n )\n\n const onChangeMonth = (e, data) => {\n setMonth(data.value)\n }\n\n const MonthDropdown = () => (\n \n )\n\n return (\n
\n
\n \n
\n {\" \"}\n
\n \n
\n\n

기준 국수

\n
\n \n
\n

{year}년 {month}월 월간 랭킹

\n \n
\n )\n}\n\nexport default MonthlyRecord\n","import React from \"react\"\nimport {Link} from \"react-router-dom\";\nimport {connect} from \"react-redux\";\n\nclass DailyRecordDetail extends React.Component {\n listIndividuals = this.props.game.result.map((individual, index) => {\n return (\n \n \n \n {individual.name}\n \n \n {individual.score}\n {individual.victory_point}\n {individual.uma}\n {individual.special}\n \n )\n })\n\n render() {\n return (\n <>\n
\n
\n

Round {this.props.roundNo}

\n
\n {\n this.props.isSignedIn && this.props.role === 'admin' ? (\n
\n \n 삭제\n \n \n 수정\n \n
\n ) : null\n }\n
\n\n \n \n \n \n \n \n \n \n \n \n {this.listIndividuals}\n
닉네임점수승점우마기타
\n \n )\n }\n}\n\nconst mapStateToProps = (state) => {\n return {\n isSignedIn: state.auth.isSignedIn,\n role: state.auth.role\n }\n}\n\nexport default connect(mapStateToProps)(DailyRecordDetail)\n","import React from \"react\"\nimport {Link} from \"react-router-dom\";\n\nconst DailyRecordStat = ({recordStats}) => {\n\n const listStats = recordStats.map((stat, index) => {\n return (\n \n {index + 1}\n \n \n {stat[0]}\n \n \n {stat[1].score}\n {stat[1].victory_point}\n {stat[1].uma}\n {stat[1].match_count}\n \n )\n })\n\n return (\n <>\n

일간 랭킹

\n \n \n \n \n \n \n \n \n \n \n \n {listStats}\n
순위닉네임점수승점우마국수
\n \n )\n}\n\nexport default DailyRecordStat\n","export const SIGN_IN = 'SIGN_IN'\nexport const SIGN_OUT = 'SIGN_OUT'\n","import { SIGN_IN, SIGN_OUT } from \"./types\";\n\nexport const signIn = (role, token) => {\n if (token == null) {\n token = \"\"\n }\n return {\n type: SIGN_IN,\n payload: {role: role, token: token}\n }\n}\n\nexport const signOut = () => {\n return {\n type: SIGN_OUT\n }\n}\n","import React, {forwardRef} from \"react\"\nimport DailyRecordDetail from \"./DailyRecordDetail\";\nimport api from \"../../apis/api\";\nimport DailyRecordStat from \"./DailyRecordStat\";\nimport DatePicker from \"react-datepicker\"\nimport \"react-datepicker/dist/react-datepicker.css\"\nimport \"../../style.css\"\nimport calculateStats from \"../../util\";\nimport {connect} from \"react-redux\";\nimport {signOut} from \"../../actions\";\n\nclass DailyRecord extends React.Component {\n state = {games: [], recordRows: [], stats: [], statRows: [], date: new Date()}\n\n fetchGames = async () => {\n const results = await api.get('/games', {\n params: {\n year: this.state.date.getFullYear(),\n month: this.state.date.getMonth() + 1,\n day: this.state.date.getDate()\n }\n }, this.props.token)\n if (results.status === 401) {\n alert(\"다시 로그인 해주세요\")\n this.props.signOut()\n }\n this.setState({games: results.data})\n }\n\n fillTable = () => {\n this.setState({recordRows: []})\n const listGames = this.state.games.map((game, idx) => {\n return (\n \n )\n })\n\n const recordRow = []\n\n listGames.forEach((game, idx) => {\n recordRow.push(\n
\n
\n {game}\n
\n
\n )\n if (idx % 2 === 1) {\n const recordRowElement =
{recordRow}
\n this.setState({recordRows: [...this.state.recordRows, recordRowElement]})\n recordRow.splice(0, recordRow.length)\n }\n })\n\n if (recordRow !== []) {\n const recordRowElement =
{recordRow}
\n this.setState({recordRows: [...this.state.recordRows, recordRowElement]})\n }\n }\n\n calculateStats = () => {\n this.setState({stats: calculateStats(this.state.games)})\n }\n\n componentDidMount() {\n this.fetchGames().then(() => {\n this.fillTable()\n this.calculateStats()\n })\n }\n\n componentDidUpdate(prevProps, prevState, snapshot) {\n if (prevState.date !== this.state.date) {\n this.fetchGames().then(() => {\n this.fillTable()\n this.calculateStats()\n })\n }\n }\n\n render() {\n const ExampleCustomInput = forwardRef(({value, onClick}, ref) => (\n \n ))\n\n return (\n
\n this.setState({date: date})}\n customInput={}\n />\n\n
\n
\n {this.state.recordRows}\n
\n \n
\n
\n )\n }\n}\n\nconst mapStateToProps = (state) => ({\n token: state.auth.token\n})\n\nconst mapDispatchToProps = (dispatch) => ({\n signOut: () => dispatch(signOut())\n})\n\nexport default connect(mapStateToProps, mapDispatchToProps)(DailyRecord)\n","import React from 'react'\nimport {Link, withRouter} from 'react-router-dom'\nimport {useDispatch, useSelector} from \"react-redux\";\nimport {signOut} from \"../actions\";\nimport '../style.css'\n\nconst Header = (props) => {\n const auth = useSelector(store => store.auth)\n const dispatch = useDispatch()\n\n return (\n
\n \n 통산\n \n \n 연간\n \n \n 월간\n \n \n 주간\n \n {\n auth.isSignedIn ? (\n \n 일간\n \n ) : null\n }\n {\n auth.isSignedIn && auth.role === 'admin' ? (\n \n 사용자 정보 보기\n \n ) : null\n }\n
\n {\n auth.isSignedIn && auth.role === 'admin' ? (\n \n 사용자 등록\n \n ) : null\n }\n {\n auth.isSignedIn && auth.role === 'admin' ? (\n \n 게임 등록\n \n ) : null\n }\n {\n auth.isSignedIn ? (\n \n ) : (\n \n )\n }\n {/**/}\n
\n
\n )\n}\n\nexport default withRouter(Header)\n","import React from \"react\"\nimport {withRouter} from \"react-router-dom\";\nimport api from \"../../apis/api\";\nimport {connect} from \"react-redux\";\nimport {compose} from \"redux\";\nimport {signOut} from \"../../actions\";\n\nclass GameForm extends React.Component {\n state = {\n game: [\n {name: '', score: '', special: ''},\n {name: '', score: '', special: ''},\n {name: '', score: '', special: ''},\n {name: '', score: '', special: ''}\n ]\n }\n\n onInputChange = (event, idx) => {\n const records = [...this.state.game]\n const record = {...records[idx]}\n record[event.target.name] = event.target.value\n records[idx] = record\n this.setState({game: records})\n }\n\n filterInt = value => {\n if (/^(0|-?[1-9][0-9]*)$/.test(value))\n return Number(value);\n return NaN;\n }\n\n onFormSubmit = async (event) => {\n event.preventDefault()\n let flag = false\n for (let idx = 0; idx < 4; idx++) {\n if (this.state.game[idx].name === '') {\n flag = true\n break\n }\n if (this.state.game[idx].score === '') {\n flag = true\n break\n }\n let score = this.filterInt(this.state.game[idx].score)\n if (Number.isNaN(score)) {\n flag = true\n break\n }\n if (idx > 0 && score > this.filterInt(this.state.game[idx - 1].score)) {\n flag = true\n break\n }\n }\n if (flag) {\n alert(\"항목들을 제대로 입력해주세요\")\n return\n }\n this.props.onSubmit(this.state.game)\n }\n\n renderIndividual = (idx) => {\n return (\n \n \n
\n
\n this.onInputChange(e, idx)}\n />\n
\n
\n this.onInputChange(e, idx)}\n />\n
\n
\n this.onInputChange(e, idx)}\n />\n
\n
\n
\n )\n }\n\n fetchGame = async () => {\n const result = await api.get(`/games/${this.props.match.params.id}`, {}, this.props.token)\n if (result.status === 401) {\n alert(\"다시 로그인 해주세요\")\n this.props.signOut()\n } else if (result.status === 400) {\n this.props.history.push(\"/\")\n }\n this.setState({game: result.data.result})\n }\n\n componentDidMount() {\n if (this.props.gameId) {\n this.fetchGame()\n }\n }\n\n render() {\n return (\n
\n
\n {this.renderIndividual(0)}\n {this.renderIndividual(1)}\n {this.renderIndividual(2)}\n {this.renderIndividual(3)}\n
\n \n
\n )\n }\n}\n\nconst mapStateToProps = (state) => ({\n token: state.auth.token\n})\n\nconst mapDispatchToProps = (dispatch) => ({\n signOut: () => dispatch(signOut())\n})\n\nexport default compose(\n withRouter,\n connect(mapStateToProps, mapDispatchToProps)\n)(GameForm)\n","import React, {forwardRef} from \"react\"\nimport api from \"../../apis/api\"\nimport {withRouter} from \"react-router-dom\";\nimport GameForm from \"./GameForm\";\nimport \"../../style.css\"\nimport {compose} from \"redux\";\nimport {connect} from \"react-redux\";\nimport {signOut} from \"../../actions\";\nimport DatePicker from \"react-datepicker\";\n\nclass GameCreate extends React.Component {\n state = {date: new Date()}\n\n onSubmit = async game => {\n const response = await api.post('/games', {'result': game, date: this.state.date}, {}, this.props.token)\n if (response.status === 401) {\n alert(\"다시 로그인 해주세요\")\n this.props.signOut()\n }\n if (response.status !== 200) {\n alert(\"등록 실패!\")\n } else if (response.data === \"Success\") {\n this.props.history.push(\"/daily\")\n } else {\n alert(response.data)\n }\n }\n\n render() {\n const ExampleCustomInput = forwardRef(({value, onClick}, ref) => (\n \n ))\n\n return (\n
\n

게임 등록

\n this.setState({date: date})}\n customInput={}\n />\n\n \n
\n )\n }\n}\n\nconst mapStateToProps = (state) => ({\n token: state.auth.token\n})\n\nconst mapDispatchToProps = (dispatch) => ({\n signOut: () => dispatch(signOut())\n})\n\nexport default compose(\n withRouter,\n connect(mapStateToProps, mapDispatchToProps)\n)(GameCreate)\n","import React from \"react\"\nimport api from \"../../apis/api\";\nimport {withRouter} from \"react-router-dom\";\nimport {compose} from \"redux\";\nimport {connect} from \"react-redux\";\nimport {signOut} from \"../../actions\";\n\nclass UserForm extends React.Component {\n state = {\n user: {\n name: '', phone: '', month: '', day: ''\n }\n }\n\n onInputChange = (event) => {\n const user = {...this.state.user}\n user[event.target.name] = event.target.value\n this.setState({user: user})\n }\n\n onFormSubmit = async (event) => {\n event.preventDefault()\n const status = this.props.onSubmit(this.state.user)\n if (await status === true) {\n this.setState({user: {name: '', phone: '', month: '', day: ''}})\n }\n }\n\n fetchUser = async () => {\n const result = await api.get(`/users/${this.props.match.params.name}`, {}, this.props.token)\n if (result.status === 401) {\n alert(\"다시 로그인 해주세요\")\n this.props.signOut()\n } else if (result.status === 400) {\n this.props.history.push(\"/\")\n }\n this.setState({user: result.data})\n }\n\n componentDidMount() {\n if (this.props.name) {\n this.fetchUser()\n }\n }\n\n render() {\n return (\n
\n
\n
\n
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n
\n \n
\n
\n )\n }\n}\n\nconst mapStateToProps = (state) => ({\n token: state.auth.token\n})\n\nconst mapDispatchToProps = (dispatch) => ({\n signOut: () => dispatch(signOut())\n})\n\nexport default compose(\n withRouter,\n connect(mapStateToProps, mapDispatchToProps)\n)(UserForm)\n","import React from \"react\"\nimport api from \"../../apis/api\";\nimport {withRouter} from \"react-router-dom\";\nimport \"../../style.css\"\nimport UserForm from \"./UserForm\";\nimport {connect} from \"react-redux\";\nimport {compose} from \"redux\";\nimport {signOut} from \"../../actions\";\n\nclass UserCreate extends React.Component {\n onSubmit = async user => {\n const response = await api.post('/users', {\n user_info: user\n }, {}, this.props.token)\n if (response.status === 401) {\n alert(\"다시 로그인 해주세요\")\n this.props.signOut()\n }\n if (response.status !== 200) {\n alert(\"등록 실패!\")\n return false\n } else if (response.data === \"Success\") {\n alert(\"등록 성공!\")\n return true\n } else {\n alert(response.data)\n return false\n }\n }\n\n render() {\n return (\n
\n

유저 등록

\n \n
\n )\n }\n}\n\nconst mapStateToProps = (state) => ({\n token: state.auth.token\n})\n\nconst mapDispatchToProps = (dispatch) => ({\n signOut: () => dispatch(signOut())\n})\n\nexport default compose(\n withRouter,\n connect(mapStateToProps, mapDispatchToProps)\n)(UserCreate)\n","import React from 'react'\nimport {connect} from \"react-redux\";\nimport {signIn} from \"../actions\";\nimport \"../style.css\"\nimport api from \"../apis/api\";\n\nclass Auth extends React.Component {\n state = {inputs: {id: '', password: ''}}\n\n onInputChange = event => {\n this.setState({inputs: {...this.state.inputs, [event.target.name]: event.target.value}})\n }\n\n onFormSubmit = async event => {\n event.preventDefault()\n const response = await api.post('/auth', {\n 'id': this.state.inputs.id,\n 'password': this.state.inputs.password\n })\n if (response.status === 200 && response.data.success === true) {\n this.props.dispatch(signIn(response.data.role, response.data.token))\n } else {\n alert(\"로그인 실패!\")\n }\n }\n\n render() {\n return (\n
\n \n \n \n \n\n \n
\n )\n }\n}\n\nconst mapStateToProps = (state) => {\n return {isSignedIn: state.auth.isSignedIn}\n}\n\nexport default connect(mapStateToProps)(Auth)\n","import React from 'react'\nimport api from \"../../apis/api\";\nimport GameForm from \"./GameForm\";\nimport {connect} from \"react-redux\";\nimport {signOut} from \"../../actions\";\n\nclass GameEdit extends React.Component {\n state = {game: {}}\n\n onSubmit = async game => {\n const response = await api.put(`/games/${this.props.match.params.id}`, {'result': game}, {}, this.props.token)\n if (response.status === 401) {\n alert(\"다시 로그인 해주세요\")\n this.props.signOut()\n }\n if (response.status !== 200) {\n alert(\"수정 실패!\")\n } else if (response.data === \"Success\") {\n alert(\"수정 성공\")\n this.props.history.push(\"/daily\")\n } else {\n alert(response.data)\n }\n }\n\n render() {\n return (\n
\n

게임 수정

\n \n
\n )\n }\n}\n\nconst mapStateToProps = (state) => ({\n token: state.auth.token\n})\n\nconst mapDispatchToProps = (dispatch) => ({\n signOut: () => dispatch(signOut())\n})\n\nexport default connect(mapStateToProps, mapDispatchToProps)(GameEdit)\n","import React from 'react'\nimport ReactDOM from 'react-dom'\nimport {withRouter} from \"react-router-dom\";\n\nconst Modal = (props) => {\n\n return ReactDOM.createPortal(\n
\n e.stopPropagation()}\n className=\"ui standard modal visible active\"\n >\n \n
{props.title}
\n
{props.content}
\n
{props.actions}
\n
\n ,\n document.querySelector('#modal')\n )\n}\n\nexport default withRouter(Modal)\n","import React from 'react'\nimport Modal from \"../Modal\";\nimport {Link, withRouter} from \"react-router-dom\";\nimport api from \"../../apis/api\";\nimport {connect} from \"react-redux\";\nimport {compose} from \"redux\";\nimport {signOut} from \"../../actions\";\n\nclass GameDelete extends React.Component {\n onClick = async id => {\n const response = await api.del(`/games/${id}`, {}, this.props.token)\n if (response.status === 401) {\n alert(\"다시 로그인 해주세요\")\n this.props.signOut()\n }\n if (response.status !== 200) {\n alert(\"삭제 실패!\")\n } else if (response.data === \"Success\") {\n alert(\"삭제 성공!\")\n this.props.history.push(\"/daily\")\n } else {\n alert(response.data)\n }\n }\n\n actions = (\n \n this.onClick(this.props.match.params.id)}\n className={\"ui button negative\"}\n >\n 삭제\n \n 취소\n \n )\n\n render() {\n return (\n
\n this.props.history.push(\"/daily\")}\n />\n
\n )\n }\n}\n\nconst mapStateToProps = (state) => ({\n token: state.auth.token\n})\n\nconst mapDispatchToProps = (dispatch) => ({\n signOut: () => dispatch(signOut())\n})\n\nexport default compose(\n withRouter,\n connect(mapStateToProps, mapDispatchToProps)\n)(GameDelete)\n","import React, {forwardRef, useEffect, useState} from 'react'\nimport \"../../style.css\"\nimport DatePicker from \"react-datepicker\";\nimport api from \"../../apis/api\";\nimport calculateStats from \"../../util\";\nimport exampleReducer from \"../../reducers/exampleReducer\";\nimport RecordTable from \"./RecordTable\";\n\nconst ExampleCustomInput = forwardRef(({value, onClick}, ref) => (\n \n))\n\nconst WeeklyRecord = () => {\n const [games, setGames] = useState([])\n const [stats, setStats] = useState([])\n const [date, setDate] = useState(new Date())\n const [start, setStart] = useState(new Date())\n const [end, setEnd] = useState(new Date())\n const [listStats, setListStats] = useState([])\n\n const [state, dispatch] = React.useReducer(exampleReducer, {\n column: null,\n data: listStats,\n direction: null,\n })\n const {column, data, direction} = state\n\n const fetchGames = async () => {\n const results = await api.get('/games/weekly', {\n params: {\n year: date.getFullYear(),\n month: date.getMonth() + 1,\n day: date.getDate(),\n }\n })\n if (results.status === 200) {\n setGames(results.data.games)\n setStart(new Date(results.data.d_start))\n const d_end = new Date(results.data.d_end)\n d_end.setDate(d_end.getDate() - 1)\n setEnd(d_end)\n } else {\n setGames([])\n setStart(new Date())\n setEnd(new Date())\n }\n }\n\n useEffect(() => {\n fetchGames()\n }, [date])\n\n useEffect(() => {\n setStats(calculateStats(games))\n }, [games])\n\n useEffect(() => {\n setListStats(stats.map(stat => {\n const [name, {\n uma,\n score,\n victory_point,\n first_count,\n second_count,\n third_count,\n fourth_count,\n match_count\n }] = stat\n return (\n {\n name: name,\n uma: Number(uma).toFixed(1),\n average_uma: Number(uma / match_count).toFixed(2),\n score: Number(score).toFixed(0),\n average_score: Number(score / match_count).toFixed(0),\n victory_point: Number(victory_point).toFixed(0),\n average_vp: Number(victory_point / match_count).toFixed(2),\n average_rank: Number((first_count + second_count * 2 + third_count * 3 + fourth_count * 4) / match_count).toFixed(2),\n first_ratio: Number(first_count / match_count * 100).toFixed(1),\n half_ratio: Number((first_count + second_count) / match_count * 100).toFixed(1),\n last_ratio: Number(fourth_count / match_count * 100).toFixed(1),\n first_count: first_count,\n second_count: second_count,\n third_count: third_count,\n fourth_count: fourth_count,\n match_count: match_count\n }\n )\n }))\n }, [stats])\n\n useEffect(() => {\n dispatch({type: 'CHANGE_SORT', column: column, data: listStats})\n }, [listStats])\n\n return (\n
\n setDate(date)}\n customInput={}\n />\n

주간 랭킹

\n

시작: {`${start.getFullYear()}년 ${start.getMonth() + 1}월 ${start.getDate()}`}일

\n

종료: {`${end.getFullYear()}년 ${end.getMonth() + 1}월 ${end.getDate()}`}일

\n \n
\n )\n}\n\nexport default WeeklyRecord\n","import React from 'react'\nimport {Link} from \"react-router-dom\";\n\nclass UserDetail extends React.Component {\n render() {\n return (\n
\n
\n
\n

{this.props.user.name} ({this.props.user.month}/{this.props.user.day})

\n

{this.props.user.phone}

\n
\n\n \n 수정\n \n
\n
\n )\n }\n}\n\nexport default UserDetail\n","import React from 'react'\nimport api from \"../../apis/api\";\nimport UserDetail from \"./UserDetail\";\nimport \"../../style.css\"\nimport {connect} from \"react-redux\";\nimport {signOut} from \"../../actions\";\n\nclass UserManage extends React.Component {\n state = {users: [], userRows: []}\n\n fetchUsers = async () => {\n const results = await api.get('/users', {}, this.props.token)\n if (results.status === 401) {\n alert(\"다시 로그인 해주세요\")\n this.props.signOut()\n }\n this.setState({users: results.data})\n }\n\n fillTable = () => {\n this.setState({userRows: []})\n const listUsers = this.state.users.map(user => {\n return (\n \n )\n })\n this.setState({userRows: listUsers})\n }\n\n componentDidMount() {\n this.fetchUsers().then(() => {\n this.fillTable()\n })\n }\n\n render() {\n\n return (\n
\n
\n {this.state.userRows}\n
\n
\n )\n }\n}\n\nconst mapStateToProps = (state) => ({\n token: state.auth.token\n})\n\nconst mapDispatchToProps = (dispatch) => ({\n signOut: () => dispatch(signOut())\n})\n\nexport default connect(mapStateToProps, mapDispatchToProps)(UserManage)\n","import React from \"react\"\nimport api from \"../../apis/api\";\nimport UserForm from \"./UserForm\";\nimport {connect} from \"react-redux\";\nimport {signOut} from \"../../actions\";\n\nclass UserEdit extends React.Component {\n onSubmit = async user => {\n const response = await api.put(`/users/${this.props.match.params.name}`, {\n user_info: user\n }, {}, this.props.token)\n if (response.status === 401) {\n alert(\"다시 로그인 해주세요\")\n this.props.signOut()\n }\n if (response.status !== 200) {\n alert(\"수정 실패!\")\n } else if (response.data === \"Success\") {\n alert(\"수정 성공!\")\n this.props.history.push(\"/users\")\n } else {\n alert(response.data)\n }\n }\n\n render() {\n return (\n
\n

유저 수정

\n \n
\n )\n }\n}\n\nconst mapStateToProps = (state) => ({\n token: state.auth.token\n})\n\nconst mapDispatchToProps = (dispatch) => ({\n signOut: () => dispatch(signOut())\n})\n\nexport default connect(mapStateToProps, mapDispatchToProps)(UserEdit)\n","import React from 'react'\nimport {Tab, Table, TableCell} from \"semantic-ui-react\";\n\nclass UserStatDetail extends React.Component {\n\n render() {\n const renderList = this.props.data ? Object.keys(this.props.data).map((key) => {\n const tableCell = this.props.isTotal ? null : {key}\n return (\n \n {tableCell}\n {Number(this.props.data[key]['uma']).toFixed(1)}\n {Number(this.props.data[key]['average_uma']).toFixed(2)}\n {Number(this.props.data[key]['score']).toFixed(0)}\n {Number(this.props.data[key]['average_score']).toFixed(0)}\n {Number(this.props.data[key]['victory_point']).toFixed(0)}\n {Number(this.props.data[key]['average_vp']).toFixed(2)}\n {Number(this.props.data[key]['average_rank']).toFixed(2)}\n {Number(this.props.data[key]['first_ratio']).toFixed(1)}\n {Number(this.props.data[key]['half_ratio']).toFixed(1)}\n {Number(this.props.data[key]['last_ratio']).toFixed(1)}\n {Number(this.props.data[key]['first_count'].toFixed(0))}\n {Number(this.props.data[key]['second_count']).toFixed(0)}\n {Number(this.props.data[key]['third_count']).toFixed(0)}\n {Number(this.props.data[key]['fourth_count']).toFixed(0)}\n {Number(this.props.data[key]['match_count']).toFixed(0)}\n \n )\n }) : null\n const headerCell = this.props.isTotal ? null : {this.props.columnName}\n return (\n
\n

{this.props.title}

\n \n \n \n {headerCell}\n 우마\n 평우마\n 득점\n 평득점\n 승점\n 평승점\n 평순위\n 1위율\n 연대율\n 4위율\n 1위\n 2위\n 3위\n 4위\n 국수\n \n \n \n {renderList}\n \n
\n
\n );\n }\n}\n\nexport default UserStatDetail\n","import React from 'react'\nimport _ from \"lodash\";\nimport {Table, TableCell, TableRow} from \"semantic-ui-react\";\n\nclass UserStatSummary extends React.Component {\n render() {\n const averageUma = this.props.isPersonal ? (\n !_.isEmpty(this.props.data) ?\n Number(this.props.data.uma / this.props.data.match_count).toFixed(2)\n : 0\n ) : !_.isEmpty(this.props.data) ? this.props.data.average_uma.toFixed(2) : 0\n const firstRatio = !_.isEmpty(this.props.data)\n ? Number(this.props.data.first_count / this.props.data.match_count * 100).toFixed(2)\n : 0\n const secondRatio = !_.isEmpty(this.props.data)\n ? Number(this.props.data.second_count / this.props.data.match_count * 100).toFixed(2)\n : 0\n const thirdRatio = !_.isEmpty(this.props.data)\n ? Number(this.props.data.third_count / this.props.data.match_count * 100).toFixed(2)\n : 0\n const fourthRatio = !_.isEmpty(this.props.data)\n ? Number(this.props.data.fourth_count / this.props.data.match_count * 100).toFixed(2)\n : 0\n\n return !_.isEmpty(this.props.data) ? (\n \n {\n this.props.isPersonal ?

:

\n }\n

{this.props.title}

\n

\n \n \n \n 우마\n {Number(this.props.data.uma).toFixed(1)} \n 평우마\n {averageUma}\n \n {\n !this.props.isPersonal\n ? (\n \n 평순위\n {this.props.data.average_rank.toFixed(2)} \n 평득점\n {this.props.data.average_score.toFixed(0)}\n \n ) : null\n }\n \n 1위\n {this.props.data.first_count} \n 1위율\n {firstRatio} %\n \n \n 2위\n {this.props.data.second_count} \n 2위율\n {secondRatio} %\n \n \n 3위\n {this.props.data.third_count} \n 3위율\n {thirdRatio} %\n \n \n 4위\n {this.props.data.fourth_count} \n 4위율\n {fourthRatio} %\n \n \n
\n \n ) : null\n }\n}\n\nexport default UserStatSummary","import React from 'react'\nimport \"../../style.css\"\nimport {Link, withRouter} from \"react-router-dom\";\nimport api from \"../../apis/api\";\nimport {Table, TableCell, TableRow} from \"semantic-ui-react\";\nimport {PieChart} from \"react-minimal-pie-chart\";\nimport UserStatDetail from \"./UserStatDetail\";\nimport _ from \"lodash\"\nimport UserStatSummary from \"./UserStatSummary\";\n\nclass UserStat extends React.Component {\n state = {\n stat: {\n monthly: {},\n yearly: {},\n total: {},\n }\n }\n\n fetchUser = async () => {\n const result = await api.get(`/user-stats/${this.props.match.params.name}`, {})\n if (result.status === 400) {\n this.props.history.push(\"/\")\n }\n this.setState({stat: result.data})\n }\n\n componentDidMount() {\n this.fetchUser()\n }\n\n render() {\n const pieChartData = !_.isEmpty(this.state.stat.total) ? [\n {title: '1위', value: this.state.stat.total.first_count, color: '#FFAAA7'},\n {title: '2위', value: this.state.stat.total.second_count, color: '#FFD3B4'},\n {title: '3위', value: this.state.stat.total.third_count, color: '#D5ECC2'},\n {title: '4위', value: this.state.stat.total.fourth_count, color: '#98DDCA'},\n ] : []\n\n const renderMonthlyList = this.state.stat.monthly ? Object.keys(this.state.stat.monthly).map((key) => {\n return (\n \n \n

\n
\n )\n }) : null\n\n const renderYearlyStat = !_.isEmpty(this.state.stat.yearly) ? (\n \n \n

\n
\n ) : null\n\n const renderTotalStat = !_.isEmpty(this.state.stat.total) ? (\n \n \n

\n
\n ) : null\n\n return (\n
\n

{`${this.props.match.params.name} 님의 개인 기록`}

\n

\n
\n
\n dataEntry.value}\n labelStyle={(index) => ({\n fill: pieChartData[index].color,\n fontSize: '5px',\n fontFamily: 'sans-serif',\n })}\n radius={38}\n labelPosition={112}\n startAngle={270}\n />\n
\n
\n \n \n \n \n
\n
\n

\n {renderMonthlyList}\n {renderYearlyStat}\n {renderTotalStat}\n
\n )\n }\n}\n\nexport default withRouter(UserStat)\n","import React, {useEffect, useState} from \"react\"\nimport exampleReducer from \"../../reducers/exampleReducer\";\nimport api from \"../../apis/api\";\nimport calculateStats from \"../../util\";\nimport RecordTable from \"./RecordTable\";\nimport {Dropdown} from \"semantic-ui-react\";\nimport {yearOption} from \"./Option\";\n\nconst YearlyRecord = () => {\n const [games, setGames] = useState([])\n const [stats, setStats] = useState([])\n const [year, setYear] = useState(new Date().getFullYear())\n const [listStats, setListStats] = useState([])\n const [filter, setFilter] = useState(0)\n\n const [state, dispatch] = React.useReducer(exampleReducer, {\n column: null,\n data: listStats,\n direction: null,\n })\n const {column, data, direction} = state\n\n const fetchGames = async () => {\n const results = await api.get('/games/yearly', {\n params: {\n year: year,\n }\n })\n if (results.status === 200) {\n setGames(results.data)\n } else {\n setGames([])\n }\n }\n\n useEffect(() => {\n fetchGames()\n }, [year])\n\n useEffect(() => {\n setStats(calculateStats(games))\n }, [games])\n\n useEffect(() => {\n setListStats(stats.map(stat => {\n const [name, {\n uma,\n score,\n victory_point,\n first_count,\n second_count,\n third_count,\n fourth_count,\n match_count\n }] = stat\n return (\n {\n name: name,\n uma: Number(uma).toFixed(1),\n average_uma: Number(uma / match_count).toFixed(2),\n score: Number(score).toFixed(0),\n average_score: Number(score / match_count).toFixed(0),\n victory_point: Number(victory_point).toFixed(0),\n average_vp: Number(victory_point / match_count).toFixed(2),\n average_rank: Number((first_count + second_count * 2 + third_count * 3 + fourth_count * 4) / match_count).toFixed(2),\n first_ratio: Number(first_count / match_count * 100).toFixed(1),\n half_ratio: Number((first_count + second_count) / match_count * 100).toFixed(1),\n last_ratio: Number(fourth_count / match_count * 100).toFixed(1),\n first_count: first_count,\n second_count: second_count,\n third_count: third_count,\n fourth_count: fourth_count,\n match_count: match_count\n }\n )\n }).filter(stat => stat.match_count >= filter))\n }, [stats, filter])\n\n useEffect(() => {\n dispatch({type: 'CHANGE_SORT', column: column, data: listStats})\n }, [listStats])\n\n const onChange = e => {\n numberCheck(e.target.value)\n }\n\n const numberCheck = v => {\n let num = v || 0\n if (!isFinite(num)) return\n num = num.toString()\n\n if (num !== '0' && !num.includes('.')) {\n num = num.replace(/^0+/, '')\n }\n\n setFilter(num)\n }\n\n const onChangeYear = (e, data) => {\n setYear(data.value)\n }\n\n const YearDropdown = () => (\n \n )\n\n return (\n
\n
\n \n
\n

기준 국수

\n
\n \n
\n

{year}년 연간 랭킹

\n \n
\n )\n}\n\nexport default YearlyRecord\n","import React, {useEffect, useState} from \"react\"\nimport exampleReducer from \"../../reducers/exampleReducer\";\nimport api from \"../../apis/api\";\nimport calculateStats from \"../../util\";\nimport RecordTable from \"./RecordTable\";\n\nconst TotalRecord = () => {\n const [games, setGames] = useState([])\n const [stats, setStats] = useState([])\n const [listStats, setListStats] = useState([])\n const [filter, setFilter] = useState(0)\n\n const [state, dispatch] = React.useReducer(exampleReducer, {\n column: null,\n data: listStats,\n direction: null,\n })\n const {column, data, direction} = state\n\n const fetchGames = async () => {\n const results = await api.get('/games/total')\n if (results.status === 200) {\n setGames(results.data)\n } else {\n setGames([])\n }\n }\n\n useEffect(() => {\n fetchGames()\n }, [])\n\n useEffect(() => {\n setStats(calculateStats(games))\n }, [games])\n\n useEffect(() => {\n setListStats(stats.map(stat => {\n const [name, {\n uma,\n score,\n victory_point,\n first_count,\n second_count,\n third_count,\n fourth_count,\n match_count\n }] = stat\n return (\n {\n name: name,\n uma: Number(uma).toFixed(1),\n average_uma: Number(uma / match_count).toFixed(2),\n score: Number(score).toFixed(0),\n average_score: Number(score / match_count).toFixed(0),\n victory_point: Number(victory_point).toFixed(0),\n average_vp: Number(victory_point / match_count).toFixed(2),\n average_rank: Number((first_count + second_count * 2 + third_count * 3 + fourth_count * 4) / match_count).toFixed(2),\n first_ratio: Number(first_count / match_count * 100).toFixed(1),\n half_ratio: Number((first_count + second_count) / match_count * 100).toFixed(1),\n last_ratio: Number(fourth_count / match_count * 100).toFixed(1),\n first_count: first_count,\n second_count: second_count,\n third_count: third_count,\n fourth_count: fourth_count,\n match_count: match_count\n }\n )\n }).filter(stat => stat.match_count >= filter))\n }, [stats, filter])\n\n useEffect(() => {\n dispatch({type: 'CHANGE_SORT', column: column, data: listStats})\n }, [listStats])\n\n const onChange = e => {\n numberCheck(e.target.value)\n }\n\n const numberCheck = v => {\n let num = v || 0\n if (!isFinite(num)) return\n num = num.toString()\n\n if (num !== '0' && !num.includes('.')) {\n num = num.replace(/^0+/, '')\n }\n\n setFilter(num)\n }\n\n return (\n
\n

기준 국수

\n
\n \n
\n

통산 랭킹

\n \n
\n )\n}\n\nexport default TotalRecord\n","import React from 'react'\nimport \"../../style.css\"\nimport {Link, withRouter} from \"react-router-dom\";\nimport api from \"../../apis/api\";\nimport _ from \"lodash\";\nimport {Button, Form, Grid, Header, Input, Table, TableCell, TableRow} from \"semantic-ui-react\";\nimport UserStatDetail from \"./UserStatDetail\";\nimport {PieChart} from \"react-minimal-pie-chart\";\nimport UserStatSummary from \"./UserStatSummary\";\n\nclass UserRelativeStat extends React.Component {\n state = {\n name: \"\",\n fixedName: \"\",\n start_date: \"\",\n end_date: \"\",\n num_games: \"\",\n stat: {\n monthly: {},\n yearly: {},\n total: {},\n },\n relative: {}\n }\n\n fetchUser = async () => {\n const result = await api.get(`/user-stats/${this.props.match.params.name}`, {})\n if (result.status === 400) {\n this.props.history.push(\"/\")\n }\n this.setState({stat: result.data})\n }\n\n fetchRelativeStats = async (name, start_date, end_date, num_games) => {\n let params = {\n opponent: name\n }\n if (start_date) {\n params.start_date = start_date\n }\n if (end_date) {\n params.end_date = end_date\n }\n if (num_games) {\n params.num_games = num_games\n }\n\n const result = await api.get(`/relative-stats/${this.props.match.params.name}`, {\n params: params\n })\n this.setState({fixedName: name})\n if (result.status === 400) {\n alert(result.data)\n this.setState({relative: null})\n } else {\n this.setState({relative: result.data})\n }\n }\n\n componentDidMount() {\n this.fetchUser()\n }\n\n onNameChange = e => {\n this.setState({name: e.target.value})\n }\n\n onStartDateChange = e => {\n this.setState({start_date: e.target.value})\n }\n\n onEndDateChange = e => {\n this.setState({end_date: e.target.value})\n }\n\n onNumGamesChange = e => {\n this.setState({num_games: e.target.value})\n }\n\n onClick = () => {\n this.fetchRelativeStats(\n this.state.name,\n this.state.start_date,\n this.state.end_date,\n this.state.num_games\n )\n }\n\n render() {\n const pieChartData = !_.isEmpty(this.state.stat.total) ? [\n {title: '1위', value: this.state.stat.total.first_count, color: '#FFAAA7'},\n {title: '2위', value: this.state.stat.total.second_count, color: '#FFD3B4'},\n {title: '3위', value: this.state.stat.total.third_count, color: '#D5ECC2'},\n {title: '4위', value: this.state.stat.total.fourth_count, color: '#98DDCA'},\n ] : []\n\n return (\n
\n

{`${this.props.match.params.name} 님의 상대 기록`}

\n
\n
\n dataEntry.value}\n labelStyle={(index) => ({\n fill: pieChartData[index].color,\n fontSize: '5px',\n fontFamily: 'sans-serif',\n })}\n radius={38}\n labelPosition={112}\n startAngle={270}\n />\n
\n
\n \n \n \n \n
\n
\n \n \n
\n \n
\n 비교할 상대 이름\n
\n \n \n \n
\n \n
\n 언제부터? (비워두면 처음부터)\n
\n \n \n \n
\n \n
\n 언제까지? (비워두면 끝까지)\n
\n \n \n \n
\n \n
\n 최대 몇 판? (비워두면 전부)\n
\n \n \n \n
\n \n \n \n
\n
\n
\n {\n !_.isEmpty(this.state.relative) ? (\n \n

\n

총 국수: {this.state.relative.stat.match_count}

\n
\n
\n \n
\n
\n \n
\n
\n
\n ) : null\n }\n

\n

\n )\n }\n}\n\nexport default withRouter(UserRelativeStat)\n","import React from \"react\"\nimport {BrowserRouter, Redirect, Route, Switch} from \"react-router-dom\"\nimport MonthlyRecord from \"./record/MonthlyRecord\";\nimport DailyRecord from \"./record/DailyRecord\";\nimport Header from \"./Header\";\nimport GameCreate from \"./game/GameCreate\";\nimport {useSelector} from \"react-redux\";\nimport UserCreate from \"./user/UserCreate\";\nimport Auth from \"./Auth\";\nimport GameEdit from \"./game/GameEdit\";\nimport GameDelete from \"./game/GameDelete\";\nimport WeeklyRecord from \"./record/WeeklyRecord\";\nimport UserManage from \"./user/UserManage\";\nimport UserEdit from \"./user/UserEdit\";\nimport UserStat from \"./user/UserStat\";\nimport YearlyRecord from \"./record/YearlyRecord\";\nimport TotalRecord from \"./record/TotalRecord\";\nimport UserRelativeStat from \"./user/UserRelativeStat\";\n\nconst App = () => {\n const auth = useSelector(store => store.auth)\n\n return (\n
\n \n
\n \n \n \n \n \n \n {auth.isSignedIn ? : }\n \n \n {auth.isSignedIn && auth.role === 'admin' ? : }\n \n \n {auth.isSignedIn && auth.role === 'admin' ? : }\n \n \n \n {\n auth.isSignedIn && auth.role === 'admin'\n ? \n : null\n }\n \n {auth.isSignedIn && auth.role === 'admin' ? : }\n \n {\n auth.isSignedIn && auth.role === 'admin'\n ? \n : null\n }\n {\n auth.isSignedIn && auth.role === 'admin'\n ? \n : null\n }\n \n {!auth.isSignedIn ? : }\n \n \n \n \n
\n )\n}\n\nexport default App;\n","import { SIGN_IN, SIGN_OUT } from \"../actions/types\"\n\nconst INITIAL_STATE = {\n isSignedIn: null,\n role: null,\n token: \"\",\n}\n\nconst authReducer = (state = INITIAL_STATE, action) => {\n switch (action.type) {\n case SIGN_IN:\n return { ...state, isSignedIn: true, role: action.payload.role, token: action.payload.token }\n case SIGN_OUT:\n return { ...state, isSignedIn: false, role: null, token: \"\" }\n default:\n return state\n }\n}\n\nexport default authReducer\n","import { combineReducers } from \"redux\"\nimport authReducer from \"./authReducer\"\nimport { reducer as formReducer } from \"redux-form\";\nimport { persistReducer } from \"redux-persist\";\nimport storage from \"redux-persist/lib/storage\"\n\nconst persistConfig = {\n key: \"root\",\n storage,\n whitelist: [\"auth\"]\n}\n\nconst rootReducer = combineReducers({\n auth: authReducer,\n form: formReducer\n})\n\nexport default persistReducer(persistConfig, rootReducer)\n","import ReactDOM from \"react-dom\"\nimport { Provider } from \"react-redux\"\nimport { createStore } from \"redux\"\nimport App from \"./components/App\"\nimport rootReducer from \"./reducers/\"\nimport { persistStore } from \"redux-persist\";\nimport { PersistGate } from \"redux-persist/integration/react\"\n\nconst store = createStore(rootReducer)\nconst persistor = persistStore(store)\n\nReactDOM.render(\n \n \n \n \n ,\n document.querySelector(\"#root\")\n)\n"],"sourceRoot":""}