@bjsdistribution/dms-client-return 0.0.49 → 0.0.51

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.49",
2
+ "version": "0.0.51",
3
3
  "license": "MIT",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
@@ -328,8 +328,9 @@ const OrderTable = ({ loadingskeleton }: any) => {
328
328
  <td>{displayValueOrNA(item?.box_count)}</td>
329
329
  <td>
330
330
  {displayValueOrNA(item?.weight)}{' '}
331
- {item?.weight && item?.weight !== null ? 'KG' : ''}
331
+ {item?.weight && item?.weight > 0 ? 'KG' : ''}
332
332
  </td>
333
+
333
334
  <td>{displayValueOrNA(item?.cube)}</td>
334
335
  <td key={item.id}>
335
336
  <StyledAntSelect
@@ -228,7 +228,7 @@ const ReturnOrderFilter = () => {
228
228
  placeholder="Assignee"
229
229
  onChange={handleAssigneeChange}
230
230
  value={selectedAssignee}
231
- style={{ minWidth: '100px' }}
231
+ style={{ minWidth: '120px' }}
232
232
  allowClear
233
233
  onClear={handleClearAssignee}
234
234
  />
@@ -521,13 +521,11 @@ export const StyledTable = styled.table`
521
521
  export const StyledTableWrapper = styled.div`
522
522
  max-height: 60vh;
523
523
  overflow-x: auto;
524
- scrollbar-width: none;
525
524
  min-height: 50vh;
526
525
 
527
526
  .fortables {
528
527
  max-height: 60vh;
529
528
  overflow-x: auto;
530
- scrollbar-width: none;
531
529
  min-height: 50vh;
532
530
  }
533
531
  /* height: 600px; */
@@ -19,7 +19,6 @@ export const GreyBox = styled.div`
19
19
  export const StyledTableWrapper = styled.div`
20
20
  overflow-x: auto;
21
21
  max-height: calc(100vh - 396px);
22
- scrollbar-width: none;
23
22
  /* box-shadow: 0px 0px 30px 6px rgba(46, 45, 116, 0.05); */
24
23
  &::-webkit-scrollbar {
25
24
  width: 5px;
@@ -17,6 +17,18 @@ function OrderServices() {
17
17
 
18
18
  const orderServicesOptions = orderStaticData?.order_service_list;
19
19
 
20
+ const desiredOrder = [
21
+ 'unpack_items',
22
+ 'take_packaging_away',
23
+ 'assemble',
24
+ 'disassemble',
25
+ 'collect_disposal',
26
+ ];
27
+
28
+ const sortedServices = orderServicesOptions?.sort((a: any, b: any) => {
29
+ return desiredOrder.indexOf(a.type) - desiredOrder.indexOf(b.type);
30
+ });
31
+
20
32
  const toggleServices = (id: number) => {
21
33
  const clone = [...orderServices];
22
34
  const selectedService = clone?.find(
@@ -197,7 +209,7 @@ function OrderServices() {
197
209
 
198
210
  return (
199
211
  <Container disabled={isDisabled}>
200
- {orderServicesOptions?.map((service: any) => {
212
+ {sortedServices?.map((service: any) => {
201
213
  const selected = !!orderServices?.find(
202
214
  (s: OrderServiceType) =>
203
215
  s?.order_service_list_id === service?.id && s.is_deleted === false
package/src/index.tsx CHANGED
@@ -44,7 +44,10 @@ function ReturnClient() {
44
44
  };
45
45
  const paths = splitPath(location.pathname);
46
46
  useEffect(() => {
47
- if (paths[paths.length - 1] === 'returnclient') {
47
+ if (
48
+ paths[paths.length - 2] === 'order' ||
49
+ paths[paths.length - 2] === 'return'
50
+ ) {
48
51
  setActionTypeOptions([]);
49
52
  setLocationOptions([]);
50
53
  setSelectedClient(null);