@bjsdistribution/dms-client-return 0.0.17 → 0.0.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.0.17",
2
+ "version": "0.0.18",
3
3
  "license": "MIT",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
@@ -292,6 +292,7 @@ export const StyledTable = styled.table`
292
292
  border: 1px solid rgba(0, 0, 0, 0.08);
293
293
  border-right: none;
294
294
  border-left: none;
295
+ position: relative;
295
296
  .actionbox {
296
297
  display: flex;
297
298
  gap: 5px;
@@ -49,7 +49,7 @@ const ModalManager = () => {
49
49
  const [, setNewPayload] = useNewReturnPayload();
50
50
  const [, setGrouped] = useGroupedPayload();
51
51
  const [, setSelectAll] = useSelectAll();
52
- const [forCheck, setStateCheck] = useState(false);
52
+ // const [forCheck, setStateCheck] = useState(false);
53
53
 
54
54
  console.log(orderProduct, 'abcabcabcabcabcabcabcabcabcabcabc');
55
55
 
@@ -243,6 +243,7 @@ const ModalManager = () => {
243
243
  }, [updateResponse]);
244
244
 
245
245
  //Confirm return popup
246
+ // Confirm return popup
246
247
  const {
247
248
  data: response,
248
249
  setShouldPerformAction,
@@ -261,28 +262,32 @@ const ModalManager = () => {
261
262
  }, [confirmLoading]);
262
263
 
263
264
  console.log(response, 'response');
265
+ console.log(newGrouped, 'newGrouped');
264
266
 
265
267
  const handleConfirmReturn = () => {
266
268
  setShouldPerformAction(false);
267
- setStateCheck(!forCheck);
268
- if (newGrouped.length > 0) {
269
+
270
+ if (newGrouped?.length > 0) {
269
271
  setShouldPerformAction(true);
270
272
  } else {
271
273
  setShouldPerformAction(false);
272
274
  }
275
+
273
276
  dispatch({ type: 'close' });
274
277
  };
275
278
 
276
279
  useEffect(() => {
277
- dispatch({ type: 'close' });
278
- setNewGrouped([]);
279
- setSelectedReturnOrder([]);
280
- setCheck([]);
281
- setNewPayload([]);
282
- setGrouped([]);
283
- setShouldPerformAction(false);
284
- setSelectAll(false);
285
- }, [response, forCheck]);
280
+ if (response && !response) {
281
+ dispatch({ type: 'close' });
282
+ setNewGrouped([]);
283
+ setSelectedReturnOrder([]);
284
+ setCheck([]);
285
+ setNewPayload([]);
286
+ setGrouped([]);
287
+ setShouldPerformAction(false);
288
+ setSelectAll(false);
289
+ }
290
+ }, [response]);
286
291
 
287
292
  return (
288
293
  <>