forked from leandrowd/react-responsive-carousel
-
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.
Merge pull request leandrowd#109 from the-container-store/feature/180…
…383495/sku-future-availability [#180383495] - SKU future availability
- Loading branch information
Showing
6 changed files
with
202 additions
and
56 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
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,48 @@ | ||
import { Button, TextField, Typography } from '@mui/material'; | ||
import { Box } from '@mui/system'; | ||
import React, { useState } from 'react'; | ||
import { useHistory } from 'react-router'; | ||
import { getDigitOnly } from '../../utils/skuHelpers'; | ||
import { Wrapper } from './SKUFuture.styles'; | ||
function SKUFuture() { | ||
const history = useHistory(); | ||
const [skuQuantity, setSkuQuantity] = useState(''); | ||
const inputHandler = ({ target }) => { | ||
const quantity = getDigitOnly(target.value); | ||
if (quantity < 10000) { | ||
setSkuQuantity(quantity); | ||
} | ||
}; | ||
return ( | ||
<Wrapper> | ||
<Box> | ||
<Typography>Future Availability Check</Typography> | ||
<Typography> | ||
Showing next available date for a desired quantity. | ||
</Typography> | ||
<TextField | ||
fullWidth | ||
label='Desired Quantity' | ||
placeholder='Desired Quantity' | ||
type='text' | ||
value={skuQuantity} | ||
onChange={inputHandler} | ||
/> | ||
<Typography className='available'> | ||
45 will be available at Arlington Highlands on on 01/22/2022{' '} | ||
</Typography> | ||
<Typography className='not-available'> | ||
Backordered: This item may be available at other stores near you. | ||
</Typography> | ||
</Box> | ||
<Box display='flex' flexDirection='column' width='100%'> | ||
<Button className='search-button'>SEARCH</Button> | ||
<Button className='cancel-button' onClick={() => history.goBack()}> | ||
CANCEL | ||
</Button> | ||
</Box> | ||
</Wrapper> | ||
); | ||
} | ||
|
||
export default SKUFuture; |
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,52 @@ | ||
import { colors, styles, font } from '../../utils/themeUtils'; | ||
import { Container } from '@mui/material'; | ||
import { styled } from '@mui/system'; | ||
|
||
export const Wrapper = styled(Container)({ | ||
display: styles.display.flex, | ||
flexDirection: 'column', | ||
justifyContent: styles.justify.between, | ||
height: '100vh', | ||
padding: styles.padding[3], | ||
'& p:nth-of-type(1)': { | ||
fontSize: font.size[20], | ||
fontWeight: font.weight['bold'], | ||
}, | ||
'& p:nth-of-type(2)': { | ||
fontSize: font.size[12], | ||
fontWeight: font.weight['normal'], | ||
marginBottom: '1.75rem', | ||
}, | ||
'& .available': { | ||
marginTop: styles.margin[3], | ||
fontSize: font.size[16], | ||
fontWeight: font.weight['bold'], | ||
color: colors.green, | ||
}, | ||
'& .not-available': { | ||
marginTop: styles.margin[3], | ||
fontSize: font.size[16], | ||
fontWeight: font.weight['bold'], | ||
color: colors.danger, | ||
}, | ||
'& .search-button': { | ||
display: styles.display.flex, | ||
justifyContent: styles.justify.center, | ||
alignItems: styles.align.center, | ||
borderRadius: '4px', | ||
backgroundColor: colors.lightBlue, | ||
color: colors.white, | ||
fontSize: font.size[14], | ||
fontWeight: font.weight['bold'], | ||
padding: `${styles.padding[3]} 0`, | ||
}, | ||
'& .cancel-button': { | ||
display: styles.display.flex, | ||
justifyContent: styles.justify.center, | ||
alignItems: styles.align.center, | ||
borderRadius: '4px', | ||
fontSize: font.size[14], | ||
fontWeight: font.weight['bold'], | ||
padding: `${styles.padding[3]} 0`, | ||
}, | ||
}); |