@bjsdistribution/dms-client-return 0.0.14 → 0.0.15

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.14",
2
+ "version": "0.0.15",
3
3
  "license": "MIT",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
@@ -73,7 +73,7 @@ function OrderView() {
73
73
  const paths = splitPath(location.pathname);
74
74
  const [, setLocationOptions] = useLocationOptions();
75
75
  const [apiCalling] = useApiCalling();
76
-
76
+ console.log(paths, 'paths');
77
77
  const [orderResources, setOrderResources] = useOrderProductsResources();
78
78
  const [orderToolbox, setOrderToolbox] = useOrderProductsToolbox();
79
79
  const [GsitCUstomerId, setGsitCUstomerId] = useGsitCUstomerId();
@@ -138,7 +138,7 @@ function OrderView() {
138
138
 
139
139
  useEffect(() => {
140
140
  if (paths.length > 1) {
141
- setOrderId(paths[1]);
141
+ setOrderId(paths[2]);
142
142
  }
143
143
  // for local
144
144
  // if (paths.length >= 0) {
@@ -16,7 +16,7 @@ const CreateReturnModal = () => {
16
16
  const [selectedReturnOrder] = useSelectedOrders();
17
17
  const [load] = usePostLoading();
18
18
  const [groupedPayload] = useGroupedPayload();
19
- const [forDisabledCheck] = useSelectedConfirmLoc();
19
+ // const [forDisabledCheck] = useSelectedConfirmLoc();
20
20
  const [, setNew] = useFinalPayload();
21
21
 
22
22
  const handleSelectLocations = (id: number) => {
@@ -42,9 +42,9 @@ const CreateReturnModal = () => {
42
42
  }, []);
43
43
 
44
44
  useEffect(() => {
45
- if (groupedPayload?.length > 0 && forDisabledCheck?.length > 0) {
45
+ if (groupedPayload?.length > 0 && selectedlocation?.length > 0) {
46
46
  const matchedItems = groupedPayload?.filter((item: any) =>
47
- forDisabledCheck.includes(item.id)
47
+ selectedlocation.includes(item.id)
48
48
  );
49
49
 
50
50
  if (matchedItems.length > 0) {
@@ -52,7 +52,7 @@ const CreateReturnModal = () => {
52
52
  setNew(finalPayload);
53
53
  }
54
54
  }
55
- }, [forDisabledCheck]);
55
+ }, [selectedlocation]);
56
56
 
57
57
  return (
58
58
  <>