inboxlookup_screen 1.0.13 → 1.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,6 +1,6 @@
1
1
  {
2
2
  "name": "inboxlookup_screen",
3
- "version": "1.0.13",
3
+ "version": "1.0.15",
4
4
  "description": "A React component using DevExtreme",
5
5
  "main": "dist/index.js",
6
6
  "homepage": "./",
@@ -66,14 +66,19 @@ const OrdersMasterDetail = ({ dataSource, keyExpr, token, BaseUrl, ProjectId })
66
66
 
67
67
 
68
68
  useEffect(() => {
69
- if (!ProjectId) return;
69
+ if (!ProjectId) return; // ⛔ guard
70
+
70
71
  console.log("ProjectId", ProjectId, BaseUrl);
71
- axios.get(`${BaseUrl}api/LookupSheetMaster/GetLatestSheetsByProject/${ProjectId}`, {
72
- headers: {
73
- Authorization: `Bearer ${token}`,
74
- "Content-Type": "application/json",
75
- },
76
- })
72
+
73
+ axios.get(
74
+ `${BaseUrl}api/LookupSheetMaster/GetLatestSheetsByProject/${ProjectId}`,
75
+ {
76
+ headers: {
77
+ Authorization: `Bearer ${token}`,
78
+ "Content-Type": "application/json",
79
+ },
80
+ }
81
+ )
77
82
  .then(response => {
78
83
  const data = response.data.map(item => ({
79
84
  id: item.Id,
@@ -84,15 +89,14 @@ const OrdersMasterDetail = ({ dataSource, keyExpr, token, BaseUrl, ProjectId })
84
89
  }));
85
90
  setOrders(data);
86
91
  setFilteredOrders(data);
87
- // setSelectedOrder(data.length ? data[0] : null);
88
-
89
92
  })
90
93
  .catch(error => {
91
94
  console.error("Failed to load orders", error);
92
95
  setOrders([]);
93
96
  });
94
97
 
95
- }, []);
98
+ }, [ProjectId, BaseUrl, token]); // ✅ FIXED
99
+
96
100
 
97
101
  useEffect(() => {
98
102
  if (!orders) return;