fixed: unupdated state id for row

removed: unecessary dispatch action
Updated: label saga to listen to every dispatch
This commit is contained in:
Llewellyn D'souza
2022-03-08 17:47:36 +05:30
parent 51dc7c33c3
commit 30b4b5d7c2
2 changed files with 11 additions and 11 deletions

View File

@@ -153,14 +153,14 @@ function LabelingScreen() {
const id = event.target.value;
const type = 'row';
setRowId(id);
dispatch(
WarehouseLocationsActions.locationRequest({
loader: 'loading-request',
slug: API.GET_CHILDREN_FROM_PARENT,
method: 'post',
data: { id, type }
})
);
// dispatch(
// WarehouseLocationsActions.locationRequest({
// loader: 'loading-request',
// slug: API.GET_CHILDREN_FROM_PARENT,
// method: 'post',
// data: { id, type }
// })
// );
dispatch(
LabellingActions.getLabelAction({
loader: 'labelling-request',
@@ -170,7 +170,7 @@ function LabelingScreen() {
warehouse: warehouseId,
zone: zoneId,
area: areaId,
row: rowId
row: id
}
})
);

View File

@@ -1,5 +1,5 @@
import { AuthorizedAPI } from 'config';
import { takeLatest, call, put } from 'redux-saga/effects';
import { call, put, takeEvery } from 'redux-saga/effects';
import LabellingActions from 'redux/LabellingRedux';
import { LabellingTypes } from 'redux/LabellingRedux';
import ApiServices from 'services/API/ApiServices';
@@ -28,4 +28,4 @@ export function* onRequestGetLabelData({ payload }) {
);
}
}
export default [takeLatest(LabellingTypes.GET_LABEL_ACTION, onRequestGetLabelData)];
export default [takeEvery(LabellingTypes.GET_LABEL_ACTION, onRequestGetLabelData)];