Index: src/stock-adjustment-mobile/adjustment-app.jsx =================================================================== diff -u -N -rc337cc219b24bface3d7690246b3d774541a8d85 -rf88f8b7d1f2a79ab3a66389d30d09caceffcda5e --- src/stock-adjustment-mobile/adjustment-app.jsx (.../adjustment-app.jsx) (revision c337cc219b24bface3d7690246b3d774541a8d85) +++ src/stock-adjustment-mobile/adjustment-app.jsx (.../adjustment-app.jsx) (revision f88f8b7d1f2a79ab3a66389d30d09caceffcda5e) @@ -19,6 +19,7 @@ import { setUserHomeFacility } from './reducers/facilities'; import AddProductsPage from './add-products-page/add-product-page'; +import EditProductPage from './edit-product-page/edit-product-page'; import AdjustmentForm from './adjustment-form.component'; import ProgramSelect from './program-select'; @@ -69,6 +70,15 @@ /> } + + { + userHomeFacility + && + } + { userHomeFacility Index: src/stock-adjustment-mobile/adjustment-form.component.jsx =================================================================== diff -u -N -rc337cc219b24bface3d7690246b3d774541a8d85 -rf88f8b7d1f2a79ab3a66389d30d09caceffcda5e --- src/stock-adjustment-mobile/adjustment-form.component.jsx (.../adjustment-form.component.jsx) (revision c337cc219b24bface3d7690246b3d774541a8d85) +++ src/stock-adjustment-mobile/adjustment-form.component.jsx (.../adjustment-form.component.jsx) (revision f88f8b7d1f2a79ab3a66389d30d09caceffcda5e) @@ -24,6 +24,7 @@ import { resetAdjustment } from './reducers/adjustment'; import { setToastList } from './reducers/toasts'; import BlockList from './components/block-list.component'; +import Toast from './components/toast.component'; const AdjustmentForm = ({ stockAdjustmentCreationService, @@ -74,6 +75,16 @@ history.push("/makeAdjustmentAddProducts"); }; + const editProduct = (product, index) => { + history.push({ + pathname: "/makeAdjustmentAddProducts/editProductAdjustment", + state: { + productToEdit: product, + indexOfProductToEdit: index, + } + }); + }; + const dataToDisplay = [ {"key": "productName", "textToDisplay": ""}, {"key": "stockOnHand", "textToDisplay": "Stock on Hand"}, @@ -99,7 +110,12 @@ data={adjustment} dataToDisplay={dataToDisplay} headerToDisplay={headerToDisplay} + onClickAction={editProduct} /> +