@bjsdistribution/dms-client-return 0.0.69 → 0.0.70

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.69",
2
+ "version": "0.0.70",
3
3
  "license": "MIT",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
@@ -146,8 +146,6 @@ const OrderTable = () => {
146
146
  return { color: '#F4A503', background: '#FFF1D6' };
147
147
  case 'Awaiting route':
148
148
  return { color: '#845ADF', background: 'rgba(132, 90, 223, 0.15)' };
149
- case 'Awaiting':
150
- return { color: '#845ADF', background: 'rgba(132, 90, 223, 0.15)' };
151
149
  case 'Completed':
152
150
  return { color: '#1F9254', background: 'rgba(41, 204, 106, 0.15)' };
153
151
  case 'Outstanding':
@@ -279,7 +277,6 @@ const OrderTable = () => {
279
277
  OO: 'On Hold',
280
278
  SC: 'Sub-Contracted',
281
279
  'awaiting route': 'Awaiting route',
282
- 'awaiting confirmation': 'Awaiting',
283
280
  completed: 'completed',
284
281
  outstanding: 'Outstanding',
285
282
  routed: 'Routed',
package/src/index.tsx CHANGED
@@ -43,9 +43,8 @@ function ReturnClient() {
43
43
  return parts;
44
44
  };
45
45
  const paths = splitPath(location.pathname);
46
-
47
46
  useEffect(() => {
48
- if (paths.join('/') === 'orders/view/return') {
47
+ if (paths[paths.length - 1] === 'orders/view/return') {
49
48
  setActionTypeOptions([]);
50
49
  setLocationOptions([]);
51
50
  setSelectedClient(null);
@@ -53,7 +52,11 @@ function ReturnClient() {
53
52
  setSelectedLocationValue(null);
54
53
  }
55
54
  }, [location.pathname, searchParams]);
56
-
55
+ // useEffect(() => {
56
+ // if (selectedClientId) {
57
+ // navigate(`filter/${selectedClientId}`);
58
+ // }
59
+ // }, [selectedClientId]);
57
60
  //API for client data
58
61
  const { data: fetchedCustomerData, loading: loading } = useApiHook<
59
62
  ApiResponse
@@ -110,18 +113,22 @@ function ReturnClient() {
110
113
  <Suspense fallback={<LoadingMessage />}>
111
114
  <Routes>
112
115
  {/* for local */}
113
- {/* <Route
114
- path="/orders/view/return/*"
115
- element={<OrderViewQueryHandler />}
116
- /> */}
117
116
  {/* for dev */}
118
117
  <Route path="" element={<OrderViewQueryHandler />} />
119
118
  <Route path="overview" element={<ReturnAfterTable />} />
120
119
  <Route path="/:id" element={<OrderView />} />
121
- {/* for local */}
122
- {/* <Route path="/orders/view/return/filter" element={<ReturnTable />} /> */}
123
- {/* for dev */}
120
+
124
121
  <Route path="filter" element={<ReturnTable />} />
122
+ {/* <Route
123
+ path=""
124
+ element={
125
+ selectedClientString ? (
126
+ <Navigate to={`return/${selectedClientString}`} />
127
+ ) : (
128
+ <ReturnMainTable />
129
+ )
130
+ }
131
+ /> */}
125
132
  </Routes>
126
133
  </Suspense>
127
134
  </>