fixed: unupdated state id for row
removed: unecessary dispatch action Updated: label saga to listen to every dispatch
This commit is contained in:
@@ -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
|
||||
}
|
||||
})
|
||||
);
|
||||
|
||||
@@ -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)];
|
||||
|
||||
Reference in New Issue
Block a user