@bjsdistribution/dms-client-return 0.0.51 → 0.0.53

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.51",
2
+ "version": "0.0.53",
3
3
  "license": "MIT",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
@@ -52,7 +52,7 @@ function SelectionFilter() {
52
52
  const urlActiontype = searchParams.get('type');
53
53
 
54
54
  const selectedCustomer = customers?.find(
55
- (customer: any) => customer?.customer_id.toString() === urlCustomerId
55
+ (customer: any) => customer?.customer_id?.toString() === urlCustomerId
56
56
  );
57
57
 
58
58
  const accountNumber = selectedCustomer?.account_number;
@@ -235,6 +235,11 @@ export const StyledTable = styled.table`
235
235
  /* min-width: 1600px; */
236
236
  thead {
237
237
  white-space: nowrap;
238
+ position: sticky;
239
+ top: 10px;
240
+ z-index: 1;
241
+ background: #fff;
242
+ box-shadow: 0px 0px 1px #ffffff, 0px -10px 1px #ffffff;
238
243
  tr {
239
244
  border-radius: 40px;
240
245
  border-spacing: 0 10px;
@@ -285,6 +290,8 @@ export const StyledTable = styled.table`
285
290
  }
286
291
  }
287
292
  tbody {
293
+ max-height: 400px;
294
+ overflow-y: auto;
288
295
  tr {
289
296
  td {
290
297
  color: #3a3630;
@@ -46,6 +46,11 @@ export const StyledTable = styled.table`
46
46
  width: 100%;
47
47
  /* min-width: 1600px; */
48
48
  thead {
49
+ position: sticky;
50
+ top: 10px;
51
+ z-index: 1;
52
+ background: #fff;
53
+ box-shadow: 0px 0px 1px #ffffff, 0px -10px 1px #ffffff;
49
54
  tr {
50
55
  border-radius: 40px;
51
56
  border-spacing: 0 10px;
@@ -88,6 +93,8 @@ export const StyledTable = styled.table`
88
93
  }
89
94
  }
90
95
  tbody {
96
+ max-height: 400px;
97
+ overflow-y: auto;
91
98
  tr {
92
99
  td {
93
100
  color: #3a3630;
package/src/index.tsx CHANGED
@@ -43,11 +43,9 @@ function ReturnClient() {
43
43
  return parts;
44
44
  };
45
45
  const paths = splitPath(location.pathname);
46
+
46
47
  useEffect(() => {
47
- if (
48
- paths[paths.length - 2] === 'order' ||
49
- paths[paths.length - 2] === 'return'
50
- ) {
48
+ if (paths[paths.length - 1] === 'order/return') {
51
49
  setActionTypeOptions([]);
52
50
  setLocationOptions([]);
53
51
  setSelectedClient(null);