@bjsdistribution/dms-client-return 0.0.73 → 0.0.75

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.
Files changed (24) hide show
  1. package/dist/components/order-view/details-filters/left-side-filters/dropdowns/PrintDropDownReturn.d.ts +1 -1
  2. package/dist/dms-client-return.cjs.development.js +249 -137
  3. package/dist/dms-client-return.cjs.development.js.map +1 -1
  4. package/dist/dms-client-return.cjs.production.min.js +1 -1
  5. package/dist/dms-client-return.cjs.production.min.js.map +1 -1
  6. package/dist/dms-client-return.esm.js +249 -137
  7. package/dist/dms-client-return.esm.js.map +1 -1
  8. package/package.json +2 -2
  9. package/src/components/order-daily-overview/filters/Filters.tsx +42 -42
  10. package/src/components/order-view/details-filters/left-side-filters/dropdowns/PrintDropDownReturn.tsx +5 -4
  11. package/src/components/order-view/fakedata.ts +2 -0
  12. package/src/components/order-view/index.tsx +3 -0
  13. package/src/components/order-view/notes/index.tsx +25 -16
  14. package/src/components/order-view/notes/logs/index.tsx +0 -3
  15. package/src/components/order-view/order-details/expanded-content/customer-section/contact-info/ContactEmail.tsx +5 -15
  16. package/src/components/order-view/order-details/expanded-content/customer-section/contact-info/ContactHome.tsx +45 -16
  17. package/src/components/order-view/order-details/expanded-content/customer-section/contact-info/ContactMobile.tsx +42 -8
  18. package/src/components/order-view/order-details/expanded-content/customer-section/contact-info/ContactWork.tsx +41 -19
  19. package/src/components/order-view/order-details/expanded-content/customer-section/location-info/Latitude.tsx +5 -1
  20. package/src/components/order-view/order-details/expanded-content/customer-section/location-info/Longitude.tsx +5 -1
  21. package/src/components/order-view/order-details/expanded-content/customer-section/location-info/What3words.tsx +12 -5
  22. package/src/components/order-view/order-details/expanded-content/footer/index.tsx +8 -14
  23. package/src/components/order-view/order-details/expanded-content/orders-section/DeliveryDate.tsx +9 -1
  24. package/src/components/order-view/order-details/expanded-content/services-section/TimedService.tsx +13 -1
@@ -27,11 +27,18 @@ function What3words() {
27
27
  };
28
28
 
29
29
  const validateInput = (value: string) => {
30
- const isValid = w3wRegex.test(value);
31
- setErrors(prev => ({
32
- ...prev,
33
- w3wError: isValid ? '' : 'Please enter a valid input (word.word.word)',
34
- }));
30
+ if (value.trim()) {
31
+ const isValid = w3wRegex.test(value);
32
+ setErrors(prev => ({
33
+ ...prev,
34
+ w3wError: isValid ? '' : 'Please enter a valid input (word.word.word)',
35
+ }));
36
+ } else {
37
+ setErrors(prev => ({
38
+ ...prev,
39
+ w3wError: '',
40
+ }));
41
+ }
35
42
  };
36
43
 
37
44
  return (
@@ -8,9 +8,7 @@ import {
8
8
  usePrevOrderDetails,
9
9
  errorAtom,
10
10
  useCustomerInfo,
11
- // useLogsCallAPi,
12
11
  useUpdateApiCall,
13
- // UseNotesLoading,
14
12
  } from '../../../store';
15
13
  import useUpdateOrder from '../../../hooks/useUpdateOrder';
16
14
  import { compareOrderDetailsStates, filterObject } from '../../../utils';
@@ -22,18 +20,15 @@ function OrderDetailsFooter() {
22
20
  const [, setCustomerInfo] = useCustomerInfo();
23
21
  const updateOrder = useUpdateOrder();
24
22
  const [errorState] = useAtom(errorAtom);
25
- // const [, setLogsCallAPi] = useLogsCallAPi();
26
23
  const [, setCallApi] = useUpdateApiCall(); //single detail
27
- // const [, setNoteLoadingStore] = UseNotesLoading();
28
-
29
24
  const errorFound = () => {
30
25
  const isError =
31
- errorState.w3wError.length > 0 ||
32
- errorState.emailError.length > 0 ||
33
- errorState.homeContactError.length > 0 ||
34
- errorState.workCOntanctError.length > 0 ||
35
- errorState.mobileError.length > 0 ||
36
- errorState.postCodeError.length > 0;
26
+ errorState?.w3wError.length > 0 ||
27
+ errorState?.emailError.length > 0 ||
28
+ errorState?.homeContactError.length > 0 ||
29
+ errorState?.workCOntanctError.length > 0 ||
30
+ errorState?.mobileError.length > 0 ||
31
+ errorState?.postCodeError.length > 0;
37
32
 
38
33
  return isError;
39
34
  };
@@ -116,11 +111,10 @@ const Container = styled.div`
116
111
  justify-content: space-between;
117
112
  padding: 10px 15px;
118
113
  align-items: flex-start;
119
- border: 1px solid #edebe8;
114
+ border-top: 1px solid #edebe8;
120
115
  background: #f8fafc;
121
- margin: 0px;
116
+ margin: 0px -15px -15px -15px;
122
117
  border-radius: 0px 0px 8px 8px;
123
- align-items: center;
124
118
  `;
125
119
 
126
120
  export default OrderDetailsFooter;
@@ -2,12 +2,19 @@ import React from 'react';
2
2
  import styled from 'styled-components';
3
3
  import { Label } from '@bjsdistribution/dms-component-library';
4
4
  import { DatePicker, DatePickerProps } from 'antd';
5
- import { useOrderDetails, usePrevOrderDetails } from '../../../store';
5
+ import {
6
+ useOrderDetails,
7
+ usePrevOrderDetails,
8
+ useStatusDetails,
9
+ } from '../../../store';
6
10
  import dayjs from 'dayjs';
7
11
 
8
12
  function DeliveryDate() {
9
13
  const [orderDetails, setOrderDetails] = useOrderDetails();
10
14
  const [prevOrderDetails] = usePrevOrderDetails();
15
+ const [orderStatus] = useStatusDetails();
16
+
17
+ const routedStatus = orderStatus?.[0]?.routed;
11
18
 
12
19
  const actionDate = orderDetails?.action_date
13
20
  ? new Date(orderDetails?.action_date)
@@ -56,6 +63,7 @@ function DeliveryDate() {
56
63
  format="DD/MM/YY"
57
64
  style={{ borderRadius: '25px' }}
58
65
  allowClear={false}
66
+ disabled={routedStatus}
59
67
  />
60
68
  </MainContainer>
61
69
  );
@@ -1,6 +1,10 @@
1
1
  import React from 'react';
2
2
  import { useOrderDetails, useOrderStaticData } from '../../../store';
3
- import { Label, SelectDropdown } from '@bjsdistribution/dms-component-library';
3
+ import {
4
+ dropdownStyles,
5
+ Label,
6
+ SelectDropdown,
7
+ } from '@bjsdistribution/dms-component-library';
4
8
  import styled from 'styled-components';
5
9
  import { capitalize } from '../../../utils';
6
10
 
@@ -46,6 +50,14 @@ function TimedServiceDropdown() {
46
50
  <Container>
47
51
  <Label label="Timed Service" htmlFor="timedServiceDropdown" />
48
52
  <StyledSelectDropdown
53
+ styles={{
54
+ ...dropdownStyles,
55
+
56
+ control: (styles: any) => ({
57
+ ...styles,
58
+ width: 'max-content',
59
+ }),
60
+ }}
49
61
  placeholder="Select Timed Service"
50
62
  options={timedServicesOptions || []}
51
63
  value={timedServicesOptions?.filter(