-
-
Notifications
You must be signed in to change notification settings - Fork 408
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 #4656 from openboxes/OBPIH-6329
OBPIH-6329 Add details step of full outbound import form
- Loading branch information
Showing
17 changed files
with
580 additions
and
35 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
19 changes: 12 additions & 7 deletions
19
src/js/components/stock-movement-wizard/outboundImport/OutboundImportConfirm.jsx
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,11 +1,16 @@ | ||
import React from 'react'; | ||
|
||
const OutboundImportConfirm = () => { | ||
return ( | ||
<div> | ||
Confirm | ||
</div> | ||
); | ||
}; | ||
import PropTypes from 'prop-types'; | ||
|
||
const OutboundImportConfirm = ({ previous }) => ( | ||
<div> | ||
Confirm | ||
<button type="button" onClick={() => previous()}>previous</button> | ||
</div> | ||
); | ||
|
||
export default OutboundImportConfirm; | ||
|
||
OutboundImportConfirm.propTypes = { | ||
previous: PropTypes.func.isRequired, | ||
}; |
9 changes: 0 additions & 9 deletions
9
src/js/components/stock-movement-wizard/outboundImport/OutboundImportDetails.jsx
This file was deleted.
Oops, something went wrong.
19 changes: 19 additions & 0 deletions
19
src/js/components/stock-movement-wizard/outboundImport/OutboundImportHeader.jsx
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,19 @@ | ||
import React from 'react'; | ||
|
||
import useTranslate from 'hooks/useTranslate'; | ||
import HeaderWrapper from 'wrappers/HeaderWrapper'; | ||
|
||
const OutboundImportHeader = () => { | ||
const translate = useTranslate(); | ||
return ( | ||
<HeaderWrapper className="align-items-end h-100 pt-3"> | ||
<div className="create-page-title"> | ||
<span className="create-page-tile-main-content"> | ||
{translate('react.outboundImport.header.title', 'Import completed outbound')} | ||
</span> | ||
</div> | ||
</HeaderWrapper> | ||
); | ||
}; | ||
|
||
export default OutboundImportHeader; |
50 changes: 50 additions & 0 deletions
50
src/js/components/stock-movement-wizard/outboundImport/sections/OutboundImportDetails.jsx
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,50 @@ | ||
import React from 'react'; | ||
|
||
import PropTypes from 'prop-types'; | ||
|
||
import Button from 'components/form-elements/Button'; | ||
import Section from 'components/Layout/v2/Section'; | ||
import OutboundImportBasicDetails | ||
from 'components/stock-movement-wizard/outboundImport/subsections/OutboundImportBasicDetails'; | ||
import OutboundImportSendingOptions | ||
from 'components/stock-movement-wizard/outboundImport/subsections/OutboundImportSendingOptions'; | ||
import { FormErrorPropType } from 'utils/propTypes'; | ||
|
||
const OutboundImportDetails = ({ control, errors, isValid }) => ( | ||
<Section | ||
title={{ | ||
label: 'react.outboundImport.form.details.label', | ||
defaultMessage: 'Details', | ||
}} | ||
> | ||
<OutboundImportBasicDetails control={control} errors={errors} /> | ||
<OutboundImportSendingOptions control={control} errors={errors} /> | ||
<Button | ||
label="react.outboundImport.form.next.label" | ||
defaultLabel="Next" | ||
variant="primary" | ||
type="submit" | ||
className="fit-content align-self-end" | ||
disabled={!isValid} | ||
/> | ||
</Section> | ||
); | ||
|
||
export default OutboundImportDetails; | ||
|
||
OutboundImportDetails.propTypes = { | ||
errors: PropTypes.shape({ | ||
description: FormErrorPropType, | ||
origin: FormErrorPropType, | ||
destination: FormErrorPropType, | ||
requestedBy: FormErrorPropType, | ||
dateRequested: FormErrorPropType, | ||
dateShipped: FormErrorPropType, | ||
shipmentType: FormErrorPropType, | ||
trackingNumber: FormErrorPropType, | ||
expectedDeliveryDate: FormErrorPropType, | ||
packingList: FormErrorPropType, | ||
}).isRequired, | ||
control: PropTypes.shape({}).isRequired, | ||
isValid: PropTypes.bool.isRequired, | ||
}; |
Oops, something went wrong.