-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Style: 객실 수정하기 페이지 퍼블리싱/관리하기 API 연결 (#168)
Co-authored-by: 89882 <[email protected]>
- Loading branch information
Showing
17 changed files
with
550 additions
and
89 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
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,121 @@ | ||
{ | ||
"message": "성공적으로 객실 목록을 조회 했습니다.", | ||
"data": { | ||
"pageNum": 1, | ||
"pageSize": 5, | ||
"totalPages": 2, | ||
"totalElements": 8, | ||
"isLast": false, | ||
"rooms": [ | ||
{ | ||
"id": 286, | ||
"name": "봄", | ||
"basePrice": 100000, | ||
"discountPrice": 80000, | ||
"defaultCapacity": 2, | ||
"maxCapacity": 6, | ||
"checkInTime": "15:00", | ||
"checkOutTime": "12:00", | ||
"status": "SELLING", | ||
"count": 5, | ||
"images": [ | ||
{ | ||
"url": "pension_room2_2.webp" | ||
}, | ||
{ | ||
"url": "pension_room2_1.webp" | ||
} | ||
], | ||
"coupons": [ | ||
{ | ||
"id": 56, | ||
"name": "10% 할인", | ||
"price": 90000 | ||
}, | ||
{ | ||
"id": 57, | ||
"name": "2000원 할인", | ||
"price": 80000 | ||
} | ||
], | ||
"options": { | ||
"airCondition": true, | ||
"tv": true, | ||
"internet": true | ||
} | ||
}, | ||
{ | ||
"id": 286, | ||
"name": "봄", | ||
"basePrice": 100000, | ||
"discountPrice": 80000, | ||
"defaultCapacity": 2, | ||
"maxCapacity": 6, | ||
"checkInTime": "15:00", | ||
"checkOutTime": "12:00", | ||
"count": 5, | ||
"images": [ | ||
{ | ||
"fileName": "pension_room2_2.webp" | ||
}, | ||
{ | ||
"fileName": "pension_room2_1.webp" | ||
} | ||
], | ||
"coupons": [ | ||
{ | ||
"id": 56, | ||
"name": "10% 할인", | ||
"price": 90000 | ||
}, | ||
{ | ||
"id": 57, | ||
"name": "2000원 할인", | ||
"price": 80000 | ||
} | ||
], | ||
"options": { | ||
"airCondition": true, | ||
"tv": true, | ||
"internet": true | ||
} | ||
}, | ||
{ | ||
"id": 286, | ||
"name": "봄", | ||
"basePrice": 100000, | ||
"discountPrice": 80000, | ||
"defaultCapacity": 2, | ||
"maxCapacity": 6, | ||
"checkInTime": "15:00", | ||
"checkOutTime": "12:00", | ||
"count": 5, | ||
"images": [ | ||
{ | ||
"fileName": "pension_room2_2.webp" | ||
}, | ||
{ | ||
"fileName": "pension_room2_1.webp" | ||
} | ||
], | ||
"coupons": [ | ||
{ | ||
"id": 56, | ||
"name": "10% 할인", | ||
"price": 90000 | ||
}, | ||
{ | ||
"id": 57, | ||
"name": "2000원 할인", | ||
"price": 80000 | ||
} | ||
], | ||
"options": { | ||
"airCondition": true, | ||
"tv": true, | ||
"internet": true | ||
} | ||
} | ||
] | ||
} | ||
} |
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 |
---|---|---|
@@ -1,8 +1,8 @@ | ||
export type ButtonContainerProps = { | ||
buttonStyle: 'register' | 'edit'; | ||
buttonStyle: 'register' | 'update'; | ||
isValid: boolean; | ||
}; | ||
|
||
export type ButtonContainerStyledWrapperProps = { | ||
$buttonStyle: 'register' | 'edit'; | ||
$buttonStyle: 'register' | 'update'; | ||
}; |
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,74 @@ | ||
import { Switch, Form } from 'antd'; | ||
import { useState } from 'react'; | ||
import { styled } from 'styled-components'; | ||
import { TextBox } from '@components/text-box'; | ||
|
||
export const StatusContainer = () => { | ||
const [isOnSale, setIsOnSale] = useState(true); | ||
|
||
const handleInputChange = (isOnSale: boolean) => { | ||
setIsOnSale(!isOnSale); | ||
return; | ||
}; | ||
|
||
return ( | ||
<StyledInputWrapper> | ||
<StyledDesc> | ||
<TextBox typography="h4" fontWeight={700}> | ||
객실 상태 | ||
</TextBox> | ||
</StyledDesc> | ||
<StyledRow> | ||
<Form.Item name="status"> | ||
<StyledSwitch | ||
defaultChecked={isOnSale} | ||
onChange={handleInputChange} | ||
/> | ||
</Form.Item> | ||
<StyledTextBoxWrapper> | ||
<TextBox typography="body1" color="black900" fontWeight="normal"> | ||
{!isOnSale ? '판매 중' : '판매 중지'} | ||
</TextBox> | ||
</StyledTextBoxWrapper> | ||
</StyledRow> | ||
</StyledInputWrapper> | ||
); | ||
}; | ||
|
||
const StyledInputWrapper = styled.div` | ||
margin-bottom: 35px; | ||
.ant-form-item-control { | ||
width: 100%; | ||
} | ||
.ant-input { | ||
font-size: 16px; | ||
} | ||
`; | ||
|
||
const StyledTextBoxWrapper = styled.div` | ||
margin-bottom: 24px; | ||
margin-right: 12px; | ||
&:last-child { | ||
margin-right: 0; | ||
} | ||
`; | ||
|
||
const StyledRow = styled.div` | ||
height: 30px; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
`; | ||
|
||
const StyledDesc = styled.div` | ||
display: flex; | ||
align-items: center; | ||
margin-bottom: 16px; | ||
`; | ||
|
||
const StyledSwitch = styled(Switch)` | ||
margin-right: 7px; | ||
`; |
This file was deleted.
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
Oops, something went wrong.