@bjsdistribution/dms-client-return 0.0.11 → 0.0.13
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/dist/components/order-daily-overview/common/css/TableStyle.d.ts +13 -30
- package/dist/components/order-daily-overview/common/fakedata.d.ts +4 -0
- package/dist/components/order-daily-overview/return-order-table/return-orders-filters/ReturnOrderTable.d.ts +1 -1
- package/dist/components/order-view/details-filters/left-side-filters/dropdowns/{PrintDropDown.d.ts → PrintDropDownReturn.d.ts} +2 -2
- package/dist/components/order-view/store.d.ts +77 -28
- package/dist/components/order-view/types.d.ts +61 -11
- package/dist/components/order-view/utils.d.ts +4 -0
- package/dist/components/store.d.ts +6 -1
- package/dist/dms-client-return.cjs.development.js +1777 -1078
- package/dist/dms-client-return.cjs.development.js.map +1 -1
- package/dist/dms-client-return.cjs.production.min.js +1 -1
- package/dist/dms-client-return.cjs.production.min.js.map +1 -1
- package/dist/dms-client-return.esm.js +1780 -1081
- package/dist/dms-client-return.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/common/expand-collapse/index.tsx +4 -4
- package/src/components/order-daily-overview/common/css/TableStyle.tsx +42 -342
- package/src/components/order-daily-overview/common/fakedata.tsx +4 -0
- package/src/components/order-daily-overview/header-filters/HeaderFilter.tsx +10 -1
- package/src/components/order-daily-overview/header-filters/SelectionFilter.tsx +15 -7
- package/src/components/order-daily-overview/index.tsx +3 -3
- package/src/components/order-daily-overview/return-after-table/ReturnAfterTable.tsx +2 -2
- package/src/components/order-daily-overview/return-after-table/table/OrderTable.tsx +4 -8
- package/src/components/order-daily-overview/return-after-table/table-filters/ReturnFilterStore.ts +12 -14
- package/src/components/order-daily-overview/return-after-table/table-filters/ReturnOrderFilter.tsx +32 -33
- package/src/components/order-daily-overview/return-order-table/ReturnTable.tsx +2 -2
- package/src/components/order-daily-overview/return-order-table/return-orders-filters/ReturnOrderTable.tsx +74 -30
- package/src/components/order-daily-overview/return-order-table/return-orders-filters/returnstyles.ts +5 -2
- package/src/components/order-daily-overview/table/table-data/styles.ts +1 -1
- package/src/components/order-daily-overview/table-view/Pagination.tsx +15 -14
- package/src/components/order-view/DynamicTable.tsx +12 -3
- package/src/components/order-view/details-filters/left-side-filters/dropdowns/{PrintDropDown.tsx → PrintDropDownReturn.tsx} +4 -4
- package/src/components/order-view/flags-action-modal/Actions.tsx +1 -2
- package/src/components/order-view/general-information/Status.tsx +13 -17
- package/src/components/order-view/generic-table/AuditLogs.tsx +81 -19
- package/src/components/order-view/index.tsx +192 -192
- package/src/components/order-view/modalsPopup/CreateReturnModal.tsx +74 -36
- package/src/components/order-view/modalsPopup/ModalManager.tsx +49 -14
- package/src/components/order-view/modalsPopup/ProductAction.tsx +1 -1
- package/src/components/order-view/notes/AddNote.tsx +2 -3
- package/src/components/order-view/notes/index.tsx +9 -22
- package/src/components/order-view/order-details/expanded-content/footer/index.tsx +90 -73
- package/src/components/order-view/order-details/expanded-content/instruction-section/DeliveryInstructions.tsx +2 -9
- package/src/components/order-view/order-details/expanded-content/orders-section/Droptime.tsx +2 -10
- package/src/components/order-view/order-details/expanded-content/orders-section/VehicleType.tsx +16 -15
- package/src/components/order-view/order-details/expanded-content/services-section/AssemblyType.tsx +88 -15
- package/src/components/order-view/order-details/expanded-content/services-section/DeliveryPoint.tsx +1 -13
- package/src/components/order-view/order-details/expanded-content/services-section/OrderServices.tsx +141 -16
- package/src/components/order-view/order-details/expanded-content/services-section/ServiceType.tsx +1 -13
- package/src/components/order-view/order-details/expanded-content/services-section/TimedService.tsx +19 -18
- package/src/components/order-view/products-info/expanded-content/products/index.tsx +2 -2
- package/src/components/order-view/return-client-products/ProductTable.tsx +1 -1
- package/src/components/order-view/return-client-products/product-table/ReturnProductTable.tsx +79 -70
- package/src/components/order-view/return-client-products/product-table-footer/ProductDetailsFooter.tsx +5 -5
- package/src/components/order-view/store.ts +215 -53
- package/src/components/order-view/system-event-logs/expanded-content/index.tsx +6 -10
- package/src/components/order-view/toolbox-resources/expanded-content/index.tsx +68 -6
- package/src/components/order-view/types.ts +89 -33
- package/src/components/order-view/utils.ts +20 -17
- package/src/components/store.ts +35 -0
- package/src/index.tsx +13 -9
|
@@ -2,15 +2,15 @@ import React from 'react';
|
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
import { Button } from '@bjsdistribution/dms-component-library';
|
|
4
4
|
import NewReturnDropdown from '../../notes/order-dropdown/NewReturnDropdown';
|
|
5
|
-
import { notification } from 'antd';
|
|
5
|
+
// import { notification } from 'antd';
|
|
6
6
|
|
|
7
7
|
function OrderDetailsFooter() {
|
|
8
8
|
const onSave = () => {
|
|
9
9
|
// alert('saved');
|
|
10
|
-
notification.success({
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
});
|
|
10
|
+
// notification.success({
|
|
11
|
+
// message: 'Success',
|
|
12
|
+
// description: ' Saved successfully.',
|
|
13
|
+
// });
|
|
14
14
|
};
|
|
15
15
|
|
|
16
16
|
return (
|
|
@@ -18,10 +18,10 @@ const date = atom(new Date());
|
|
|
18
18
|
|
|
19
19
|
const orderStaticDataAtom = atom<any>({});
|
|
20
20
|
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
const customerInfoAtom = atom<{
|
|
22
|
+
recipient_name: string | null | undefined;
|
|
23
|
+
postcode: string | null | undefined;
|
|
24
|
+
}>({ recipient_name: '', postcode: '' });
|
|
25
25
|
|
|
26
26
|
export const ordersInitialValue: OrdersType = {
|
|
27
27
|
depot_id: null,
|
|
@@ -47,6 +47,9 @@ export const ordersInitialValue: OrdersType = {
|
|
|
47
47
|
other_instructions: null,
|
|
48
48
|
schedule_after: null,
|
|
49
49
|
vehicle_type: null,
|
|
50
|
+
order_locked_by: null,
|
|
51
|
+
delivery_instructions: null,
|
|
52
|
+
drop_time: null,
|
|
50
53
|
order_recipient: {
|
|
51
54
|
id: null,
|
|
52
55
|
order_id: null,
|
|
@@ -91,6 +94,7 @@ export const ordersInitialValue: OrdersType = {
|
|
|
91
94
|
order_delivery_declined_dates: [],
|
|
92
95
|
order_communications: [],
|
|
93
96
|
id: null,
|
|
97
|
+
name: '',
|
|
94
98
|
};
|
|
95
99
|
|
|
96
100
|
export const orderProductInitialvalue: CreateProduct = {
|
|
@@ -100,7 +104,11 @@ export const orderProductInitialvalue: CreateProduct = {
|
|
|
100
104
|
weight: 0,
|
|
101
105
|
cube: 0,
|
|
102
106
|
order_id: 0,
|
|
103
|
-
|
|
107
|
+
order_product_type_id: 0,
|
|
108
|
+
return_reason_id: 0,
|
|
109
|
+
collection_reason_id: 0,
|
|
110
|
+
product_return_action_id: 0,
|
|
111
|
+
return_location: '',
|
|
104
112
|
};
|
|
105
113
|
|
|
106
114
|
export const unrecieveOrderProducts: UnRecieveOrderProduct = {
|
|
@@ -138,17 +146,10 @@ function useOrderStaticData() {
|
|
|
138
146
|
return useAtom(orderStaticDataAtom);
|
|
139
147
|
}
|
|
140
148
|
|
|
141
|
-
function
|
|
142
|
-
return useAtom(
|
|
149
|
+
export function useCustomerInfo() {
|
|
150
|
+
return useAtom(customerInfoAtom);
|
|
143
151
|
}
|
|
144
152
|
|
|
145
|
-
function useReturnData() {
|
|
146
|
-
return useAtom(returnDataAtom);
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
function useReturnAfterOrderData() {
|
|
150
|
-
return useAtom(returnAfterOrderAtom);
|
|
151
|
-
}
|
|
152
153
|
// Define initial modal state
|
|
153
154
|
export const initialModalState = {
|
|
154
155
|
openModalType: null,
|
|
@@ -157,11 +158,22 @@ function useIsOnHoldOrder() {
|
|
|
157
158
|
return useAtom(isOnHold);
|
|
158
159
|
}
|
|
159
160
|
//value
|
|
160
|
-
const orderId = atom<
|
|
161
|
+
const orderId = atom<any>([]);
|
|
161
162
|
export const useOrderId = () => {
|
|
162
163
|
return useAtom(orderId);
|
|
163
164
|
};
|
|
164
165
|
|
|
166
|
+
const escalationIds = atom<number[]>([]);
|
|
167
|
+
|
|
168
|
+
function useEscalationIDs() {
|
|
169
|
+
return useAtom(escalationIds);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
const bulkUpdateSelectedRow = atom<any[]>([]);
|
|
173
|
+
export const useBulkUpdateSelectedRow = () => {
|
|
174
|
+
return useAtom(bulkUpdateSelectedRow);
|
|
175
|
+
};
|
|
176
|
+
|
|
165
177
|
export {
|
|
166
178
|
useTabType,
|
|
167
179
|
useInfoType,
|
|
@@ -169,6 +181,7 @@ export {
|
|
|
169
181
|
useCurrentAction,
|
|
170
182
|
useIsOnHoldOrder,
|
|
171
183
|
useOrderStaticData,
|
|
184
|
+
useEscalationIDs,
|
|
172
185
|
};
|
|
173
186
|
// Remainder count
|
|
174
187
|
const OrderDetails = atom<OrdersType>(ordersInitialValue);
|
|
@@ -181,7 +194,7 @@ function usePrevOrderDetails() {
|
|
|
181
194
|
return useAtom(prevOrderDetails);
|
|
182
195
|
}
|
|
183
196
|
|
|
184
|
-
const customerDetails = atom<any>(
|
|
197
|
+
const customerDetails = atom<any>({});
|
|
185
198
|
function useCustomerDetails() {
|
|
186
199
|
return useAtom(customerDetails);
|
|
187
200
|
}
|
|
@@ -194,6 +207,12 @@ const productDetails = atom<any>([]);
|
|
|
194
207
|
function useProductDetails() {
|
|
195
208
|
return useAtom(productDetails);
|
|
196
209
|
}
|
|
210
|
+
|
|
211
|
+
const productDetailsCopy = atom<any>([]);
|
|
212
|
+
export function useProductDetailsCopy() {
|
|
213
|
+
return useAtom(productDetailsCopy);
|
|
214
|
+
}
|
|
215
|
+
|
|
197
216
|
const StatusDeatils = atom<any>(0);
|
|
198
217
|
function useStatusDetails() {
|
|
199
218
|
return useAtom(StatusDeatils);
|
|
@@ -204,12 +223,16 @@ function useDepotOptions() {
|
|
|
204
223
|
return useAtom(depotOptions);
|
|
205
224
|
}
|
|
206
225
|
|
|
226
|
+
const depotEscData = atom<any>([]);
|
|
227
|
+
function useEscData() {
|
|
228
|
+
return useAtom(depotEscData);
|
|
229
|
+
}
|
|
207
230
|
const deleteProdId = atom<any[]>([]);
|
|
208
231
|
function useDeleteProdsID() {
|
|
209
232
|
return useAtom(deleteProdId);
|
|
210
233
|
}
|
|
211
234
|
|
|
212
|
-
const createOrderProduct = atom<any>(
|
|
235
|
+
const createOrderProduct = atom<any[]>([]);
|
|
213
236
|
function useCreateOrderProducts() {
|
|
214
237
|
return useAtom(createOrderProduct);
|
|
215
238
|
}
|
|
@@ -225,53 +248,92 @@ const updateOrderProduct = atom<UpdateOrderProduct>(updateOrderProducts);
|
|
|
225
248
|
function useUpdateOrderProducts() {
|
|
226
249
|
return useAtom(updateOrderProduct);
|
|
227
250
|
}
|
|
251
|
+
const CallAPi = atom(false);
|
|
228
252
|
|
|
229
|
-
export
|
|
253
|
+
export function useCallAPi() {
|
|
254
|
+
return useAtom(CallAPi);
|
|
255
|
+
}
|
|
256
|
+
// export const selectedProductIdAtom = atom<number | null>(null);
|
|
230
257
|
|
|
231
|
-
export const
|
|
258
|
+
export const selectedProductActionTabKeyAtom = atom<string>(
|
|
259
|
+
'update_product_type_tab'
|
|
260
|
+
);
|
|
261
|
+
function useSelectedProductActionTabKey() {
|
|
262
|
+
return useAtom(selectedProductActionTabKeyAtom);
|
|
263
|
+
}
|
|
232
264
|
|
|
233
|
-
const
|
|
234
|
-
|
|
235
|
-
|
|
265
|
+
export const errorAtom = atom({
|
|
266
|
+
homeContactError: '',
|
|
267
|
+
workCOntanctError: '',
|
|
268
|
+
mobileError: '',
|
|
269
|
+
emailError: '',
|
|
270
|
+
w3wError: '',
|
|
271
|
+
postCodeError: '',
|
|
272
|
+
});
|
|
273
|
+
|
|
274
|
+
const orderProductResources = atom<any>([]);
|
|
275
|
+
function useOrderProductsResources() {
|
|
276
|
+
return useAtom(orderProductResources);
|
|
236
277
|
}
|
|
237
278
|
|
|
238
|
-
const
|
|
239
|
-
function
|
|
240
|
-
return useAtom(
|
|
279
|
+
const orderProductToolbox = atom<any>([]);
|
|
280
|
+
function useOrderProductsToolbox() {
|
|
281
|
+
return useAtom(orderProductToolbox);
|
|
241
282
|
}
|
|
242
283
|
|
|
243
|
-
const
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
284
|
+
export const initialBulkReasonValues = {
|
|
285
|
+
collection_reason_id: 0,
|
|
286
|
+
return_reason_id: 0,
|
|
287
|
+
product_return_action_id: 0,
|
|
288
|
+
return_location: '',
|
|
289
|
+
};
|
|
247
290
|
|
|
248
|
-
|
|
249
|
-
|
|
291
|
+
const bulkReasonsAtom = atom<any>(initialBulkReasonValues);
|
|
292
|
+
export function useBulkReasons() {
|
|
293
|
+
return useAtom(bulkReasonsAtom);
|
|
250
294
|
}
|
|
251
295
|
|
|
252
|
-
const
|
|
296
|
+
const bulkUpdatePayloadAtom = atom<any>([]);
|
|
297
|
+
export function useBulkUpdatePayload() {
|
|
298
|
+
return useAtom(bulkUpdatePayloadAtom);
|
|
299
|
+
}
|
|
253
300
|
|
|
254
|
-
|
|
255
|
-
|
|
301
|
+
const singleProductTypeUpdateAtom = atom<any>({
|
|
302
|
+
order_product_type_id: 0,
|
|
303
|
+
order_product_type: '',
|
|
304
|
+
});
|
|
305
|
+
export function useSingleProductTypeUpdate() {
|
|
306
|
+
return useAtom(singleProductTypeUpdateAtom);
|
|
256
307
|
}
|
|
257
308
|
|
|
258
|
-
const
|
|
259
|
-
export
|
|
260
|
-
return useAtom(
|
|
261
|
-
}
|
|
309
|
+
const locationOptions = atom<any>([]);
|
|
310
|
+
export function useLocationOptions() {
|
|
311
|
+
return useAtom(locationOptions);
|
|
312
|
+
}
|
|
313
|
+
const orderProductSystemLogs = atom<any>([]);
|
|
314
|
+
function useOrderProductSystemLogs() {
|
|
315
|
+
return useAtom(orderProductSystemLogs);
|
|
316
|
+
}
|
|
262
317
|
|
|
263
|
-
const
|
|
318
|
+
const eventNotesData = atom<any>([]);
|
|
319
|
+
function useEventNotesData() {
|
|
320
|
+
return useAtom(eventNotesData);
|
|
321
|
+
}
|
|
264
322
|
|
|
265
|
-
|
|
266
|
-
|
|
323
|
+
const selectedProductIdAtom = atom<number | undefined>(undefined);
|
|
324
|
+
function useSelectedProductId() {
|
|
325
|
+
return useAtom(selectedProductIdAtom);
|
|
267
326
|
}
|
|
327
|
+
const returnAfterOrderAtom = atom<any[]>([]);
|
|
268
328
|
|
|
269
|
-
export
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
329
|
+
export function useReturnAfterOrderData() {
|
|
330
|
+
return useAtom(returnAfterOrderAtom);
|
|
331
|
+
}
|
|
332
|
+
const clientDataAtom = atom<ClientData[]>([]);
|
|
333
|
+
function useClientData() {
|
|
334
|
+
return useAtom(clientDataAtom);
|
|
335
|
+
}
|
|
336
|
+
|
|
275
337
|
|
|
276
338
|
export {
|
|
277
339
|
useAtom,
|
|
@@ -282,21 +344,121 @@ export {
|
|
|
282
344
|
useStatusDetails,
|
|
283
345
|
useDepotOptions,
|
|
284
346
|
usePrevOrderDetails,
|
|
347
|
+
useEscData,
|
|
285
348
|
useDeleteProdsID,
|
|
286
349
|
useCreateOrderProducts,
|
|
287
350
|
useRecieveOrderProducts,
|
|
288
351
|
useUpdateOrderProducts,
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
useReturnAfterOrderData,
|
|
292
|
-
useEventNotesData,
|
|
352
|
+
useOrderProductsResources,
|
|
353
|
+
useOrderProductsToolbox,
|
|
293
354
|
useOrderProductSystemLogs,
|
|
355
|
+
useEventNotesData,
|
|
356
|
+
useSelectedProductId,
|
|
357
|
+
useSelectedProductActionTabKey,
|
|
358
|
+
useClientData
|
|
359
|
+
};
|
|
360
|
+
|
|
361
|
+
const NotesLoading = atom<boolean>(true);
|
|
362
|
+
export const UseNotesLoading = () => {
|
|
363
|
+
return useAtom(NotesLoading);
|
|
364
|
+
};
|
|
365
|
+
|
|
366
|
+
const notes = atom<any>([]);
|
|
367
|
+
|
|
368
|
+
export function usegetNotes() {
|
|
369
|
+
return useAtom(notes);
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
const moduleIds = atom<{
|
|
373
|
+
id?: string;
|
|
374
|
+
parentId?: string;
|
|
375
|
+
} | null>(null);
|
|
376
|
+
|
|
377
|
+
export function usemoduleIds() {
|
|
378
|
+
return useAtom(moduleIds);
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
const callAPi = atom(false);
|
|
382
|
+
|
|
383
|
+
export function useLogsCallAPi() {
|
|
384
|
+
return useAtom(callAPi);
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
const callOrderProductsApi = atom<boolean>(false);
|
|
388
|
+
|
|
389
|
+
export function usecallOrderProductsApi() {
|
|
390
|
+
return useAtom(callOrderProductsApi);
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
const selectedProductId = atom<any>([]);
|
|
394
|
+
|
|
395
|
+
export function useSelectUpdateOP() {
|
|
396
|
+
return useAtom(selectedProductId);
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
const gsitCUstomerId = atom<any>({});
|
|
400
|
+
|
|
401
|
+
export function useGsitCUstomerId() {
|
|
402
|
+
return useAtom(gsitCUstomerId);
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
const CUstomerId = atom<number | undefined>(undefined);
|
|
406
|
+
|
|
407
|
+
export function useCUstomerId() {
|
|
408
|
+
return useAtom(CUstomerId);
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
const RouteId = atom<number | undefined>(undefined);
|
|
412
|
+
|
|
413
|
+
export function useRouteId() {
|
|
414
|
+
return useAtom(RouteId);
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
const gsitOrderId = atom<number | undefined>(undefined);
|
|
418
|
+
|
|
419
|
+
export function useGsitOrderId() {
|
|
420
|
+
return useAtom(gsitOrderId);
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
const orderProductId = atom<number | undefined>(undefined);
|
|
424
|
+
|
|
425
|
+
export function useOrderProductId() {
|
|
426
|
+
return useAtom(orderProductId);
|
|
427
|
+
}
|
|
428
|
+
const returnDataAtom = atom<any[]>([]);
|
|
429
|
+
export function useReturnData() {
|
|
430
|
+
return useAtom(returnDataAtom);
|
|
431
|
+
}
|
|
432
|
+
const apiCalling = atom<boolean>(false);
|
|
433
|
+
|
|
434
|
+
export function useApiCalling() {
|
|
435
|
+
return useAtom(apiCalling);
|
|
436
|
+
}
|
|
437
|
+
const liveRecalling = atom<boolean>(false);
|
|
438
|
+
|
|
439
|
+
//re api call of live status
|
|
440
|
+
export function useLiveRecalling() {
|
|
441
|
+
return useAtom(liveRecalling);
|
|
442
|
+
}
|
|
443
|
+
export const selectedTabKeyAtom = atom<string>('1');
|
|
444
|
+
export const letselectedProductIdAtom = atom<number | null>(null);
|
|
445
|
+
|
|
446
|
+
// const BulkUPdateDisabledState = atom<boolean>(false);
|
|
447
|
+
// export const useBulkUPdateDisabledState = () => {
|
|
448
|
+
// return useAtom(BulkUPdateDisabledState);
|
|
449
|
+
// };
|
|
450
|
+
|
|
451
|
+
const auditLogToggle = atom<boolean>(true);
|
|
452
|
+
export const SeteauditLogToggle= () => {
|
|
453
|
+
return useAtom(auditLogToggle);
|
|
294
454
|
};
|
|
455
|
+
|
|
456
|
+
|
|
295
457
|
// Popup state Manage
|
|
296
458
|
const initialState = null;
|
|
297
459
|
const popupReducer = (state: any, action: any) => {
|
|
298
|
-
if (action.type === '
|
|
299
|
-
state = '
|
|
460
|
+
if (action.type === 'bulkUpdate') {
|
|
461
|
+
state = 'bulkUpdate';
|
|
300
462
|
return { state };
|
|
301
463
|
} else if (action.type === 'addProduct') {
|
|
302
464
|
state = 'addProduct';
|
|
@@ -5,7 +5,7 @@ import CollapsableForm from '../../../../common/expand-collapse';
|
|
|
5
5
|
import DynamicTable from '../../DynamicTable';
|
|
6
6
|
import {
|
|
7
7
|
useEventNotesData,
|
|
8
|
-
useOrderDetails,
|
|
8
|
+
// useOrderDetails,
|
|
9
9
|
useOrderProductSystemLogs,
|
|
10
10
|
} from '../../store';
|
|
11
11
|
import { tableColumns } from '../helper';
|
|
@@ -15,10 +15,10 @@ import { notification } from 'antd';
|
|
|
15
15
|
function SystemLogs() {
|
|
16
16
|
const [systemLogs] = useOrderProductSystemLogs();
|
|
17
17
|
|
|
18
|
-
const [orderDetails] = useOrderDetails();
|
|
18
|
+
// const [orderDetails] = useOrderDetails();
|
|
19
19
|
const systemLogsData = useGetEventNotes();
|
|
20
20
|
const [, setNotesData] = useEventNotesData();
|
|
21
|
-
const gsitId = orderDetails?.gsit_order_id;
|
|
21
|
+
// const gsitId = orderDetails?.gsit_order_id;
|
|
22
22
|
|
|
23
23
|
const fetchReminderData = async () => {
|
|
24
24
|
try {
|
|
@@ -27,20 +27,16 @@ function SystemLogs() {
|
|
|
27
27
|
setNotesData(result);
|
|
28
28
|
}
|
|
29
29
|
} catch (error) {
|
|
30
|
-
// console.error('Error fetching event notes:', error);
|
|
31
30
|
notification.error({
|
|
32
31
|
message: 'Error',
|
|
33
|
-
description:
|
|
34
|
-
`${error}` || 'An error has occurred. Please try again later.',
|
|
32
|
+
description: `${error}` || 'Error fetching event notes:',
|
|
35
33
|
});
|
|
36
34
|
}
|
|
37
35
|
};
|
|
38
36
|
|
|
39
37
|
useEffect(() => {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}
|
|
43
|
-
}, [gsitId, setNotesData]);
|
|
38
|
+
fetchReminderData();
|
|
39
|
+
}, [setNotesData]);
|
|
44
40
|
|
|
45
41
|
return (
|
|
46
42
|
<Table>
|
|
@@ -2,21 +2,83 @@ import React from 'react';
|
|
|
2
2
|
import CollapsedContent from '../collapsed-content';
|
|
3
3
|
import styled from 'styled-components';
|
|
4
4
|
import CollapsableForm from '../../../../common/expand-collapse';
|
|
5
|
-
import
|
|
6
|
-
import { toolboxColumns, toolboxResources } from '../../../fakeData';
|
|
5
|
+
import { useOrderProductsToolbox } from '../../store';
|
|
7
6
|
|
|
8
7
|
function Toolbox() {
|
|
8
|
+
const [orderToolbox] = useOrderProductsToolbox();
|
|
9
|
+
|
|
10
|
+
const htmlContent =
|
|
11
|
+
orderToolbox?.data && orderToolbox?.data?.length > 0
|
|
12
|
+
? orderToolbox?.data[0]?.html
|
|
13
|
+
: '';
|
|
14
|
+
|
|
9
15
|
return (
|
|
10
|
-
<
|
|
16
|
+
<StyledTable>
|
|
11
17
|
<CollapsableForm collapsedContent={<CollapsedContent />}>
|
|
12
|
-
<
|
|
18
|
+
<div style={{ overflow: 'auto' }}></div>
|
|
19
|
+
<div
|
|
20
|
+
className="tableStyle"
|
|
21
|
+
dangerouslySetInnerHTML={{ __html: htmlContent }}
|
|
22
|
+
></div>
|
|
13
23
|
</CollapsableForm>
|
|
14
|
-
</
|
|
24
|
+
</StyledTable>
|
|
15
25
|
);
|
|
16
26
|
}
|
|
17
27
|
|
|
18
|
-
const
|
|
28
|
+
const StyledTable = styled.table`
|
|
19
29
|
width: 100%;
|
|
30
|
+
border: none;
|
|
31
|
+
|
|
32
|
+
.tableStyle {
|
|
33
|
+
border-spacing: 0;
|
|
34
|
+
width: 100%;
|
|
35
|
+
table {
|
|
36
|
+
border-spacing: 0;
|
|
37
|
+
border: none !important;
|
|
38
|
+
max-height: 400px !important;
|
|
39
|
+
min-height: 100px !important;
|
|
40
|
+
thead {
|
|
41
|
+
background: #f8f8f8 !important;
|
|
42
|
+
tr {
|
|
43
|
+
border-spacing: 0;
|
|
44
|
+
border-bottom: 1px solid rgb(215, 214, 213);
|
|
45
|
+
th {
|
|
46
|
+
padding: 10px;
|
|
47
|
+
font-family: Roboto, sans-serif;
|
|
48
|
+
font-size: 14px;
|
|
49
|
+
font-weight: 500;
|
|
50
|
+
line-height: 24px;
|
|
51
|
+
letter-spacing: 0px;
|
|
52
|
+
/* min-width: 130px; */
|
|
53
|
+
&:first-child {
|
|
54
|
+
border-radius: 10px 0px 0px 0px;
|
|
55
|
+
}
|
|
56
|
+
&:last-child {
|
|
57
|
+
border-radius: 0px 10px 0px 0px;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
tbody {
|
|
63
|
+
tr {
|
|
64
|
+
td {
|
|
65
|
+
color: #3a3630;
|
|
66
|
+
font-size: 13px;
|
|
67
|
+
font-style: normal;
|
|
68
|
+
font-weight: 400;
|
|
69
|
+
line-height: normal;
|
|
70
|
+
padding: 10px 5px;
|
|
71
|
+
background: #fff;
|
|
72
|
+
border-bottom: 1px solid rgba(0, 0, 0, 0.08);
|
|
73
|
+
border-right: none;
|
|
74
|
+
border-left: none;
|
|
75
|
+
word-wrap: break-word;
|
|
76
|
+
max-width: 200px;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
20
82
|
`;
|
|
21
83
|
|
|
22
84
|
export default Toolbox;
|
|
@@ -45,7 +45,10 @@ export type OrderActionsType =
|
|
|
45
45
|
| 'view-reminder'
|
|
46
46
|
| 'order-lock'
|
|
47
47
|
| 'view-flag'
|
|
48
|
-
| 'release-order'
|
|
48
|
+
| 'release-order'
|
|
49
|
+
| 'unrelease-order'
|
|
50
|
+
| 'clear-date'
|
|
51
|
+
| 'uncancel-order';
|
|
49
52
|
|
|
50
53
|
export interface ChargeLogData {
|
|
51
54
|
id: number;
|
|
@@ -101,7 +104,7 @@ export interface OrderServiceType {
|
|
|
101
104
|
id?: number | null;
|
|
102
105
|
service_category_id?: number;
|
|
103
106
|
is_deleted?: boolean;
|
|
104
|
-
new_id?: number; // only required while creating new service
|
|
107
|
+
new_id?: number; // only required while creating new service
|
|
105
108
|
}
|
|
106
109
|
|
|
107
110
|
export interface OrderRouteType {
|
|
@@ -109,12 +112,12 @@ export interface OrderRouteType {
|
|
|
109
112
|
order_id?: number;
|
|
110
113
|
route_id?: number;
|
|
111
114
|
drop_no?: number;
|
|
112
|
-
drop_time?: number;
|
|
115
|
+
// drop_time?: number;
|
|
113
116
|
slot_date?: string;
|
|
114
117
|
slot_fixed?: string;
|
|
115
118
|
est_arrival?: string;
|
|
116
119
|
est_departure?: string;
|
|
117
|
-
delivery_instructions?: string;
|
|
120
|
+
// delivery_instructions?: string;
|
|
118
121
|
complete_time?: string;
|
|
119
122
|
complete_notes?: string;
|
|
120
123
|
signee?: string;
|
|
@@ -153,42 +156,95 @@ export interface OrdersType {
|
|
|
153
156
|
order_communications: any[];
|
|
154
157
|
id: number | null;
|
|
155
158
|
status_value: string | null;
|
|
159
|
+
name: string
|
|
160
|
+
order_locked_by: string | null;
|
|
161
|
+
delivery_instructions: string | null;
|
|
162
|
+
drop_time: string | null
|
|
156
163
|
}
|
|
157
164
|
|
|
158
165
|
export type DeleteProds = {
|
|
159
166
|
id: number | null | undefined;
|
|
160
167
|
order_id: number;
|
|
161
|
-
|
|
168
|
+
};
|
|
162
169
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
+
export interface ApiResponse {
|
|
171
|
+
message: string;
|
|
172
|
+
code: number;
|
|
173
|
+
error: string | null;
|
|
174
|
+
error_traceback: string | null;
|
|
175
|
+
data: any;
|
|
176
|
+
location_name: any;
|
|
177
|
+
}
|
|
170
178
|
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
179
|
+
export interface CreateProduct {
|
|
180
|
+
code: string;
|
|
181
|
+
description: string;
|
|
182
|
+
sku: string;
|
|
183
|
+
weight: number | null;
|
|
184
|
+
cube: number | null;
|
|
185
|
+
order_id: number | null;
|
|
186
|
+
order_product_type_id: number | null;
|
|
187
|
+
return_reason_id: number | null;
|
|
188
|
+
collection_reason_id: number | null;
|
|
189
|
+
product_return_action_id: number | null;
|
|
190
|
+
return_location: string | null;
|
|
191
|
+
}
|
|
180
192
|
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
193
|
+
export interface UnRecieveOrderProduct {
|
|
194
|
+
unrecieve_reason_id: number;
|
|
195
|
+
unrecieve_note: string;
|
|
196
|
+
// id: number
|
|
197
|
+
}
|
|
186
198
|
|
|
187
199
|
export interface UpdateOrderProduct {
|
|
188
|
-
id: number
|
|
189
|
-
order_id: number
|
|
190
|
-
product_type_id
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
200
|
+
id: number;
|
|
201
|
+
order_id: number;
|
|
202
|
+
product_type_id?: number;
|
|
203
|
+
order_product_type_id?: number;
|
|
204
|
+
product_return_action_id?: number;
|
|
205
|
+
return_location?: string;
|
|
206
|
+
return_reason_id?: number;
|
|
207
|
+
collection_reason_id?: number;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
export type CustomersType = {
|
|
211
|
+
client_id: number;
|
|
212
|
+
shared_id_list: string;
|
|
213
|
+
customer_name: string;
|
|
214
|
+
trading_as: string;
|
|
215
|
+
account_number: string;
|
|
216
|
+
company_name: any;
|
|
217
|
+
parent_id: number;
|
|
218
|
+
gsit_customer_id: number;
|
|
219
|
+
comms_name: any;
|
|
220
|
+
status: boolean;
|
|
221
|
+
fax: any;
|
|
222
|
+
api_customer: any;
|
|
223
|
+
api_key: string;
|
|
224
|
+
events_path: any;
|
|
225
|
+
api_ip_whitelist: any;
|
|
226
|
+
review_date: any;
|
|
227
|
+
account_type_id: number;
|
|
228
|
+
injection_type_id: any;
|
|
229
|
+
injection_method_id: any;
|
|
230
|
+
injection_days: any;
|
|
231
|
+
eta_alert_comms_to_customer: any;
|
|
232
|
+
allow_live_tracking: boolean;
|
|
233
|
+
amazon_tracking_enabled: boolean;
|
|
234
|
+
tracking_domain: string;
|
|
235
|
+
tracking_order_identifier_id: number;
|
|
236
|
+
restricted_verification_id: any;
|
|
237
|
+
id: number;
|
|
238
|
+
uuid: string;
|
|
239
|
+
customer_address_book: any[];
|
|
240
|
+
customer_phone_book: any[];
|
|
241
|
+
customer_emails: any[];
|
|
242
|
+
customer_default_services: any;
|
|
243
|
+
service_level_configs: any[];
|
|
244
|
+
review_service_enable_days: any[];
|
|
245
|
+
customer_invoice_details: any;
|
|
246
|
+
customer_retailer_details: any[];
|
|
247
|
+
customer_order_services: any[];
|
|
248
|
+
exceptional_days: any[];
|
|
249
|
+
customer_users: any[];
|
|
250
|
+
};
|