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}
/>
+