-
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.
- Loading branch information
Showing
37 changed files
with
2,771 additions
and
2,386 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,5 +20,5 @@ | |
|
||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
public | ||
yarn-error.log* | ||
public |
Large diffs are not rendered by default.
Oops, something went wrong.
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
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,3 @@ | ||
const { default: axios } = require('axios'); | ||
|
||
const { default: InstanceSetting } = require('../common/instance.api'); |
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,29 @@ | ||
|
||
.Box { | ||
width: 200px; | ||
border-radius: 4px; | ||
background: white; | ||
height: 120px; | ||
display: flex; | ||
align-items: center; | ||
justify-content: left; | ||
cursor: pointer; | ||
} | ||
|
||
|
||
.text1 { | ||
color: rgb(185, 185, 185); | ||
font-size: 14px; | ||
justify-content: left; | ||
text-align: left; | ||
margin-left: 17pt; | ||
} | ||
|
||
|
||
.text2 { | ||
margin-left: 17pt; | ||
color: rgb(185, 185, 185); | ||
font-size: 30px; | ||
justify-content: left; | ||
text-align: left; | ||
} |
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,20 @@ | ||
import './Box.css'; | ||
|
||
export const Box = ({ data, title }) => { | ||
return ( | ||
<div | ||
className="Box" | ||
style={{ | ||
marginRight: '20px', | ||
float: 'left', | ||
marginBottom: '20px' | ||
}} | ||
> | ||
<div> | ||
<div className="text1">{title}</div> | ||
|
||
<div className="text2"> {data}</div> | ||
</div> | ||
</div> | ||
); | ||
}; |
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 |
---|---|---|
@@ -1,7 +1,83 @@ | ||
import React from "react"; | ||
import React, { useState, useEffect } from 'react'; | ||
import { useSelector, useDispatch } from 'react-redux'; | ||
import { Box } from './Box'; | ||
import { LandingPage } from '../../state/actions-creators/LandingPage'; | ||
|
||
function LandingPage() { | ||
return <div>LandingPage</div>; | ||
function Landing_Page() { | ||
const dispatch = useDispatch(); | ||
const { data } = useSelector(state => state.LandingPage); | ||
|
||
useEffect(() => { | ||
dispatch(LandingPage()); | ||
}, [dispatch]); | ||
|
||
console.log(data); | ||
|
||
return ( | ||
<div style={{ display: 'flex' }}> | ||
<ul> | ||
<p | ||
style={{ fontWeight: 'bold', fontSize: '14px', marginBottom: '20px' }} | ||
> | ||
티켓 관련 | ||
</p> | ||
|
||
{data && ( | ||
<div> | ||
<Box data={data?.totalTicket} title={'링크 발급된 티켓'}> | ||
{' '} | ||
</Box> | ||
|
||
<Box data={data?.depositedTicket} title={'입금 확인된 티켓'}> | ||
{' '} | ||
</Box> | ||
|
||
<Box data={data?.income} title={'판매대금'}> | ||
{' '} | ||
</Box> | ||
</div> | ||
)} | ||
|
||
<p | ||
style={{ fontWeight: 'bold', fontSize: '14px', marginBottom: '20px' }} | ||
> | ||
입금 관련 | ||
</p> | ||
{data && ( | ||
<div> | ||
<Box data={data?.doneOrder} title={'입금 확인 완료'}> | ||
{' '} | ||
</Box> | ||
|
||
<Box data={data?.waitOrder} title={'입금 확인 중'}> | ||
{' '} | ||
</Box> | ||
|
||
<Box data={data?.expireOrder} title={'미입금 처리'}> | ||
{' '} | ||
</Box> | ||
</div> | ||
)} | ||
|
||
<p | ||
style={{ fontWeight: 'bold', fontSize: '14px', marginBottom: '20px' }} | ||
> | ||
입장 확인 관련 | ||
</p> | ||
{data && ( | ||
<div> | ||
<Box data={data?.enteredTicket} title={'입장 확인된 티켓'}> | ||
{' '} | ||
</Box> | ||
|
||
<Box data={data?.nonEnteredTicket} title={'입장 확인 안 된 티켓'}> | ||
{' '} | ||
</Box> | ||
</div> | ||
)} | ||
</ul> | ||
</div> | ||
); | ||
} | ||
|
||
export default LandingPage; | ||
export default Landing_Page; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,193 @@ | ||
import React from 'react'; | ||
import React, { useState, useEffect } from 'react'; | ||
import moment from 'moment'; | ||
import { useSelector, useDispatch } from 'react-redux'; | ||
import { Table, Segmented, Select } from 'antd'; | ||
import { | ||
ticketPagi, | ||
ticketPagination | ||
} from '../../../state/actions-creators/ticketPagination'; | ||
import { changeState } from '../../../state/actions-creators/ticketPagination'; | ||
|
||
const { Column } = Table; | ||
const { Option } = Select; | ||
|
||
function TicketsPage() { | ||
return <div>ㅁㄴㅇㄹㅁㄴㅇㄹㅁㄴㅇㄹ</div>; | ||
const dispatch = useDispatch(); | ||
const { data, pending } = useSelector(state => state.ticketPagination); | ||
const [page, setPage] = useState(1); | ||
const [value, setValue] = useState('All'); | ||
|
||
const onSelectStateHandler = (e, id) => { | ||
console.log(' id값 : ', id); | ||
dispatch(changeState({ id, e })); | ||
}; | ||
|
||
const onPageChange = e => { | ||
console.log(e); | ||
setPage(e); | ||
if (value === 'All') { | ||
dispatch( | ||
ticketPagi( | ||
{ | ||
requestVal: null | ||
}, | ||
{ page: e } | ||
) | ||
); | ||
} else { | ||
dispatch( | ||
ticketPagi( | ||
{ | ||
requestVal: value | ||
}, | ||
{ | ||
page: e | ||
} | ||
) | ||
); | ||
} | ||
}; | ||
console.log(data); | ||
|
||
useEffect(() => { | ||
dispatch( | ||
ticketPagi( | ||
{ | ||
requestVal: null | ||
}, | ||
{ page: 1 } | ||
) | ||
); | ||
}, [dispatch]); | ||
|
||
const handlefilt = value => { | ||
if (value === 'All') { | ||
dispatch( | ||
ticketPagi( | ||
{ | ||
requestVal: null | ||
}, | ||
{ page } | ||
) | ||
); | ||
} else { | ||
dispatch( | ||
ticketPagi( | ||
{ | ||
requestVal: value | ||
}, | ||
{ page } | ||
) | ||
); | ||
} | ||
}; | ||
|
||
//해결법?처음에 나오는 두번 클릭....ㅠ | ||
|
||
return ( | ||
<> | ||
<Segmented | ||
options={['All', 'YB', 'OB']} | ||
value={value} | ||
onChange={value => { | ||
if (value === 'OB') { | ||
setValue(value); | ||
//handlefilt(value); | ||
console.log(value); | ||
handlefilt(value); | ||
} else if (value === 'YB') { | ||
setValue(value); | ||
//handlefilt(value); | ||
console.log(value); | ||
handlefilt(value); | ||
} else if (value === 'All') { | ||
setValue(value); | ||
console.log(value); | ||
handlefilt(value); | ||
} | ||
}} | ||
/> | ||
<div style={{ marginBottom: '20px' }} /> | ||
|
||
<Table | ||
loading={pending} | ||
pagination={{ | ||
current: page, | ||
pageSize: 10, | ||
total: data ? data.total : 0, | ||
showSizeChanger: false, | ||
onChange: onPageChange | ||
}} | ||
key="id" | ||
rowKey="id" | ||
// onRow={(record, rowIndex) => { | ||
// return { | ||
// onClick: event => { | ||
// console.log(event, record); | ||
// onStopClickHandler(record); | ||
// } // click row | ||
// }; | ||
// }} | ||
pageSize={10} | ||
dataSource={data ? data.ticketList : []} | ||
> | ||
<Column title="아이디" dataIndex="id" key="id" /> | ||
<Column title="url" dataIndex="uuid" key="id" /> | ||
<Column | ||
title="입금자명" | ||
dataIndex="user" | ||
render={user => user.name} | ||
key="id" | ||
/> | ||
|
||
<Column title="공연 날짜" dataIndex="date" key="id" /> | ||
<Column | ||
title="예매일자" | ||
dataIndex="createdAt" | ||
render={element => { | ||
return moment(element).utc(false).format('MM월DD일 HH:mm'); | ||
}} | ||
/> | ||
<Column | ||
title="업데이트일자" | ||
dataIndex="updatedAt" | ||
key="id" | ||
render={element => { | ||
return moment(element).utc(false).format('MM월DD일 HH:mm'); | ||
}} | ||
/> | ||
<Column | ||
title="Action" | ||
dataIndex="" | ||
render={element => { | ||
return ( | ||
<div style={{ justifyContent: 'space-between', margin: '20px' }}> | ||
<Select | ||
defaultValue={element.status} | ||
onSelect={e => onSelectStateHandler(e, element.id)} | ||
> | ||
<Option value="입금확인">입금확인</Option> | ||
<Option value="입장완료">입장완료</Option> | ||
<Option value="기한만료" disabled={true}> | ||
기한만료 | ||
</Option> | ||
<Option value="확인대기" disabled={true}> | ||
확인대기 | ||
</Option> | ||
</Select> | ||
</div> | ||
); | ||
}} | ||
/> | ||
<Column | ||
title="Admin" | ||
dataIndex="admin" | ||
render={admin => (admin ? admin.name : null)} | ||
key="id" | ||
/> | ||
</Table> | ||
</> | ||
); | ||
} | ||
|
||
export default TicketsPage; |
Oops, something went wrong.