@bjsdistribution/dms-client-return 0.0.70 → 0.0.72

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.70",
2
+ "version": "0.0.72",
3
3
  "license": "MIT",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
@@ -146,6 +146,8 @@ 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)' };
149
151
  case 'Completed':
150
152
  return { color: '#1F9254', background: 'rgba(41, 204, 106, 0.15)' };
151
153
  case 'Outstanding':
@@ -276,7 +278,8 @@ const OrderTable = () => {
276
278
  cancelled: 'Cancelled',
277
279
  OO: 'On Hold',
278
280
  SC: 'Sub-Contracted',
279
- 'awaiting route': 'Awaiting route',
281
+ 'awaiting route': 'Awaiting',
282
+ 'awaiting confirmation': 'Awaiting',
280
283
  completed: 'completed',
281
284
  outstanding: 'Outstanding',
282
285
  routed: 'Routed',
@@ -194,7 +194,7 @@ const ReturnOrderFilter = () => {
194
194
  className="custom-select"
195
195
  placeholder="Status of Order"
196
196
  onChange={handleStatusOfOrder}
197
- style={{ width: '145px' }}
197
+ style={{ minWidth: '150px', width: 'auto' }}
198
198
  value={statusOrder}
199
199
  onClear={handleClear}
200
200
  allowClear
@@ -209,10 +209,10 @@ const ReturnOrderFilter = () => {
209
209
  <Select
210
210
  options={clientOptions}
211
211
  className="custom-select"
212
- placeholder="Client"
212
+ placeholder="Clients"
213
213
  onChange={handleClientChange}
214
214
  value={selectedClient}
215
- style={{ width: '125px', border: 'none' }}
215
+ style={{ minWidth: '150px', width: 'auto' }}
216
216
  allowClear
217
217
  onClear={handleClearClient}
218
218
  />
@@ -33,7 +33,7 @@ function DeliveryDate() {
33
33
  const today = new Date();
34
34
  const tomorrow = new Date(today);
35
35
  tomorrow.setDate(today.getDate() + 1);
36
-
36
+ //confirm popouop
37
37
  return (
38
38
  <Container>
39
39
  <Label>Delivery Date</Label>
@@ -43,6 +43,7 @@ function DeliveryDate() {
43
43
  value={deliveryDate ? dayjs(deliveryDate) : null}
44
44
  style={{ borderRadius: '15px' }}
45
45
  minDate={dayjs(tomorrow)}
46
+ allowClear={false}
46
47
  />
47
48
  </Container>
48
49
  );
@@ -5,7 +5,7 @@ import CustomerInformation from './customer-info';
5
5
  import ProductTable from './tables/ProductTable';
6
6
  import NotesTable from './tables/NotesTable';
7
7
  import SlotAndInstructions from './slot-and-instructions';
8
- import { Alert, useApiHook } from '@bjsdistribution/dms-component-library';
8
+ import { useApiHook } from '@bjsdistribution/dms-component-library';
9
9
  import {
10
10
  useCurrentAction,
11
11
  useCustomerInfo,
@@ -217,14 +217,14 @@ function ConfirmOrder() {
217
217
  isSubmitDisabled={errorFound()}
218
218
  >
219
219
  <ContentContainer>
220
- <Alert
220
+ {/* <Alert
221
221
  description=""
222
222
  onClose={() => {}}
223
223
  type="info"
224
224
  title="There is Orders with identical postcodes that are yet to be delivered.View Orders"
225
225
  showOkButton={false}
226
226
  showCloseIcon={false}
227
- />
227
+ /> */}
228
228
  <Wrapper>
229
229
  <CustomerInformation />
230
230
  <SlotAndInstructions />
@@ -46,14 +46,16 @@ function DeliveryDate() {
46
46
  });
47
47
  }
48
48
  };
49
+
49
50
  return (
50
51
  <MainContainer>
51
- <Label label="Delivery Date" />
52
+ <Label label="Delivery Date next" />
52
53
  <DatePicker
53
54
  onChange={onChange}
54
55
  value={actionDate === null ? actionDate : dayjs(actionDate)}
55
56
  format="DD/MM/YY"
56
57
  style={{ borderRadius: '25px' }}
58
+ allowClear={false}
57
59
  />
58
60
  </MainContainer>
59
61
  );
@@ -52,7 +52,8 @@ const Container = styled.div`
52
52
  display: flex;
53
53
  flex-direction: column;
54
54
  gap: 6px;
55
- flex: 1;
55
+ // flex: 1;
56
+ min-width: 250px;
56
57
  `;
57
58
  const StyledSelectDropdown = styled(SelectDropdown)`
58
59
  &.disabled {
@@ -44,7 +44,8 @@ const Container = styled.div`
44
44
  display: flex;
45
45
  flex-direction: column;
46
46
  gap: 6px;
47
- flex: 1;
47
+ // flex: 1;
48
+ min-width: 250px;
48
49
  `;
49
50
 
50
51
  const StyledSelectDropdown = styled(SelectDropdown)`
package/src/index.tsx CHANGED
@@ -43,8 +43,9 @@ function ReturnClient() {
43
43
  return parts;
44
44
  };
45
45
  const paths = splitPath(location.pathname);
46
+
46
47
  useEffect(() => {
47
- if (paths[paths.length - 1] === 'orders/view/return') {
48
+ if (paths.join('/') === 'orders/view/return') {
48
49
  setActionTypeOptions([]);
49
50
  setLocationOptions([]);
50
51
  setSelectedClient(null);
@@ -52,11 +53,7 @@ function ReturnClient() {
52
53
  setSelectedLocationValue(null);
53
54
  }
54
55
  }, [location.pathname, searchParams]);
55
- // useEffect(() => {
56
- // if (selectedClientId) {
57
- // navigate(`filter/${selectedClientId}`);
58
- // }
59
- // }, [selectedClientId]);
56
+
60
57
  //API for client data
61
58
  const { data: fetchedCustomerData, loading: loading } = useApiHook<
62
59
  ApiResponse
@@ -113,22 +110,18 @@ function ReturnClient() {
113
110
  <Suspense fallback={<LoadingMessage />}>
114
111
  <Routes>
115
112
  {/* for local */}
113
+ {/* <Route
114
+ path="/orders/view/return/*"
115
+ element={<OrderViewQueryHandler />}
116
+ /> */}
116
117
  {/* for dev */}
117
118
  <Route path="" element={<OrderViewQueryHandler />} />
118
119
  <Route path="overview" element={<ReturnAfterTable />} />
119
120
  <Route path="/:id" element={<OrderView />} />
120
-
121
+ {/* for local */}
122
+ {/* <Route path="/orders/view/return/filter" element={<ReturnTable />} /> */}
123
+ {/* for dev */}
121
124
  <Route path="filter" element={<ReturnTable />} />
122
- {/* <Route
123
- path=""
124
- element={
125
- selectedClientString ? (
126
- <Navigate to={`return/${selectedClientString}`} />
127
- ) : (
128
- <ReturnMainTable />
129
- )
130
- }
131
- /> */}
132
125
  </Routes>
133
126
  </Suspense>
134
127
  </>