@bjsdistribution/dms-client-return 0.1.13-prod → 0.1.14-prod
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-view/DynamicTable.d.ts +2 -1
- package/dist/components/order-view/general-information/Status.d.ts +1 -1
- package/dist/components/order-view/general-information/index.d.ts +1 -1
- package/dist/components/order-view/index.d.ts +1 -1
- package/dist/components/order-view/order-actions/types.d.ts +1 -1
- package/dist/components/order-view/order-details/expanded-content/index.d.ts +1 -1
- package/dist/components/order-view/order-details/index.d.ts +1 -1
- package/dist/components/order-view/order-resources/expanded-content/index.d.ts +1 -1
- package/dist/components/order-view/products-info/expanded-content/index.d.ts +2 -0
- package/dist/components/order-view/products-info/index.d.ts +1 -1
- package/dist/components/order-view/return-client-products/ProductTable.d.ts +2 -0
- package/dist/components/order-view/return-client-products/product-table/ReturnProductTable.d.ts +2 -0
- package/dist/components/order-view/store.d.ts +1 -1
- package/dist/components/order-view/system-event-logs/expanded-content/index.d.ts +1 -1
- package/dist/dms-client-return.cjs.development.js +539 -411
- 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 +540 -412
- package/dist/dms-client-return.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/order-daily-overview/index.tsx +2 -0
- package/src/components/order-daily-overview/return-after-table/ReturnAfterTable.tsx +1 -0
- package/src/components/order-daily-overview/return-order-table/return-orders-filters/ReturnOrderTable.tsx +1 -0
- package/src/components/order-daily-overview/table/ReturnTable.tsx +2 -4
- package/src/components/order-view/DynamicTable.tsx +21 -8
- package/src/components/order-view/details-filters/left-side-filters/dropdowns/DropDowns.tsx +1 -1
- package/src/components/order-view/flags-action-modal/Dropdowns.tsx +2 -0
- package/src/components/order-view/general-information/Status.tsx +92 -18
- package/src/components/order-view/general-information/index.tsx +2 -2
- package/src/components/order-view/index.tsx +12 -6
- package/src/components/order-view/modalsPopup/ModalManager.tsx +1 -1
- package/src/components/order-view/notes/AddNote.tsx +1 -0
- package/src/components/order-view/notification/index.tsx +33 -28
- package/src/components/order-view/order-actions/actions/confirm-order/tables/NotesTable.tsx +1 -0
- package/src/components/order-view/order-actions/actions/create-task-reminder/CreateTaskModal.tsx +5 -3
- package/src/components/order-view/order-actions/actions/create-task-reminder/TaskModal.tsx +2 -2
- package/src/components/order-view/order-actions/index.tsx +3 -2
- package/src/components/order-view/order-actions/store.ts +1 -1
- package/src/components/order-view/order-actions/types.ts +1 -1
- package/src/components/order-view/order-details/expanded-content/index.tsx +37 -16
- package/src/components/order-view/order-details/index.tsx +5 -2
- package/src/components/order-view/order-resources/expanded-content/index.tsx +2 -2
- package/src/components/order-view/products-info/expanded-content/index.tsx +7 -1
- package/src/components/order-view/products-info/index.tsx +8 -4
- package/src/components/order-view/return-client-products/ProductTable.tsx +7 -1
- package/src/components/order-view/return-client-products/product-table/ReturnProductTable.tsx +19 -8
- package/src/components/order-view/store.ts +1 -1
- package/src/components/order-view/system-event-logs/expanded-content/index.tsx +6 -2
- package/src/index.tsx +6 -3
|
@@ -5,24 +5,38 @@ import OrdersSection from './orders-section';
|
|
|
5
5
|
import InstructionSection from './instruction-section';
|
|
6
6
|
import ServicesSection from './services-section';
|
|
7
7
|
import OrderDetailsFooter from './footer';
|
|
8
|
+
import { Skeleton } from 'antd';
|
|
9
|
+
import { FormSection } from '@bjsdistribution/dms-component-library';
|
|
8
10
|
|
|
9
|
-
function ExpandedContent() {
|
|
11
|
+
function ExpandedContent({ orderLoading, depotDataLoading }: any) {
|
|
10
12
|
return (
|
|
11
|
-
|
|
12
|
-
<
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
13
|
+
<>
|
|
14
|
+
<MainContainer>
|
|
15
|
+
{orderLoading || depotDataLoading ? (
|
|
16
|
+
<>
|
|
17
|
+
<CustomFormSection>
|
|
18
|
+
<Skeleton paragraph={{ rows: 4 }} />
|
|
19
|
+
<Skeleton paragraph={{ rows: 4 }} />
|
|
20
|
+
</CustomFormSection>
|
|
21
|
+
</>
|
|
22
|
+
) : (
|
|
23
|
+
<>
|
|
24
|
+
<Container>
|
|
25
|
+
<HalfWidth>
|
|
26
|
+
<CustomerSection />
|
|
27
|
+
</HalfWidth>
|
|
28
|
+
<HalfWidth>
|
|
29
|
+
<OrdersSection />
|
|
30
|
+
</HalfWidth>
|
|
31
|
+
<InstructionSection />
|
|
32
|
+
</Container>
|
|
33
|
+
|
|
34
|
+
<ServicesSection />
|
|
35
|
+
<OrderDetailsFooter />
|
|
36
|
+
</>
|
|
37
|
+
)}
|
|
38
|
+
</MainContainer>
|
|
39
|
+
</>
|
|
26
40
|
);
|
|
27
41
|
}
|
|
28
42
|
|
|
@@ -86,4 +100,11 @@ const MainContainer = styled.div`
|
|
|
86
100
|
}
|
|
87
101
|
`;
|
|
88
102
|
|
|
103
|
+
const CustomFormSection = styled(FormSection)`
|
|
104
|
+
flex: 1;
|
|
105
|
+
border-radius: 8px;
|
|
106
|
+
background: #f8fafc;
|
|
107
|
+
box-shadow: 0px 1px 3px 0px rgba(16, 24, 40, 0.1);
|
|
108
|
+
`;
|
|
109
|
+
|
|
89
110
|
export default ExpandedContent;
|
|
@@ -14,7 +14,7 @@ interface ApiResponse {
|
|
|
14
14
|
setShouldPerformAction: boolean;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
function OrderDetails() {
|
|
17
|
+
function OrderDetails({ orderLoading, depotDataLoading }: any) {
|
|
18
18
|
const [orderData] = useOrderDetails();
|
|
19
19
|
const customerData = orderData;
|
|
20
20
|
const id = customerData?.customer_id;
|
|
@@ -44,7 +44,10 @@ function OrderDetails() {
|
|
|
44
44
|
|
|
45
45
|
return (
|
|
46
46
|
<>
|
|
47
|
-
<ExpandedContent
|
|
47
|
+
<ExpandedContent
|
|
48
|
+
orderLoading={orderLoading}
|
|
49
|
+
depotDataLoading={depotDataLoading}
|
|
50
|
+
/>
|
|
48
51
|
</>
|
|
49
52
|
);
|
|
50
53
|
}
|
|
@@ -6,7 +6,7 @@ import DynamicTable from '../../DynamicTable';
|
|
|
6
6
|
import { useOrderProductsResources } from '../../store';
|
|
7
7
|
import { tableColumns } from '../helper';
|
|
8
8
|
|
|
9
|
-
function Order() {
|
|
9
|
+
function Order({ loading }: any) {
|
|
10
10
|
const [orderResources] = useOrderProductsResources();
|
|
11
11
|
|
|
12
12
|
const data =
|
|
@@ -17,7 +17,7 @@ function Order() {
|
|
|
17
17
|
return (
|
|
18
18
|
<Table>
|
|
19
19
|
<CollapsableForm collapsedContent={<CollapsedContent />}>
|
|
20
|
-
<DynamicTable columns={tableColumns} data={data} />
|
|
20
|
+
<DynamicTable columns={tableColumns} data={data} loading={loading} />
|
|
21
21
|
</CollapsableForm>
|
|
22
22
|
</Table>
|
|
23
23
|
);
|
|
@@ -16,6 +16,8 @@ import { useOrderId } from '../../store';
|
|
|
16
16
|
|
|
17
17
|
interface IPROS {
|
|
18
18
|
callReturnProducts: any;
|
|
19
|
+
loading: boolean;
|
|
20
|
+
locationloading: boolean;
|
|
19
21
|
}
|
|
20
22
|
|
|
21
23
|
function ExpandedContent(props: IPROS) {
|
|
@@ -106,7 +108,11 @@ function ExpandedContent(props: IPROS) {
|
|
|
106
108
|
|
|
107
109
|
return (
|
|
108
110
|
<Container>
|
|
109
|
-
<ProductTable
|
|
111
|
+
<ProductTable
|
|
112
|
+
callReturnProducts={props?.callReturnProducts}
|
|
113
|
+
loading={props?.loading}
|
|
114
|
+
locationloading={props?.locationloading}
|
|
115
|
+
/>
|
|
110
116
|
<MidContainer>
|
|
111
117
|
<SaveNoteContainer>
|
|
112
118
|
<Button
|
|
@@ -15,7 +15,7 @@ interface ApiResponse {
|
|
|
15
15
|
setShouldPerformAction: boolean;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
function ProductsInfo() {
|
|
18
|
+
function ProductsInfo({ locationloading }: any) {
|
|
19
19
|
const [data] = useOrderDetails();
|
|
20
20
|
const returnOrder = data;
|
|
21
21
|
|
|
@@ -43,17 +43,21 @@ function ProductsInfo() {
|
|
|
43
43
|
setLoading(loading);
|
|
44
44
|
if (returnOrdersData && returnOrdersData.data) {
|
|
45
45
|
const requiredData = returnOrdersData.data;
|
|
46
|
-
if (requiredData
|
|
46
|
+
if (requiredData?.length > 0) {
|
|
47
47
|
setProductsData(requiredData);
|
|
48
48
|
} else {
|
|
49
|
-
setProductsData(
|
|
49
|
+
setProductsData([]);
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
}, [returnOrdersData, loading]);
|
|
53
53
|
|
|
54
54
|
return (
|
|
55
55
|
<CollapsableForm collapsedContent={<CollapsedContent />}>
|
|
56
|
-
<ExpandedContent
|
|
56
|
+
<ExpandedContent
|
|
57
|
+
callReturnProducts={callReturnProducts}
|
|
58
|
+
loading={loading}
|
|
59
|
+
locationloading={locationloading}
|
|
60
|
+
/>
|
|
57
61
|
</CollapsableForm>
|
|
58
62
|
);
|
|
59
63
|
}
|
|
@@ -4,12 +4,18 @@ import styled from 'styled-components';
|
|
|
4
4
|
|
|
5
5
|
interface IPROS {
|
|
6
6
|
callReturnProducts: any;
|
|
7
|
+
loading: boolean;
|
|
8
|
+
locationloading: boolean;
|
|
7
9
|
}
|
|
8
10
|
|
|
9
11
|
const ProductTable = (props: IPROS) => {
|
|
10
12
|
return (
|
|
11
13
|
<Container>
|
|
12
|
-
<ReturnProductTable
|
|
14
|
+
<ReturnProductTable
|
|
15
|
+
callReturnProducts={props?.callReturnProducts}
|
|
16
|
+
loading={props?.loading}
|
|
17
|
+
locationloading={props?.locationloading}
|
|
18
|
+
/>
|
|
13
19
|
</Container>
|
|
14
20
|
);
|
|
15
21
|
};
|
package/src/components/order-view/return-client-products/product-table/ReturnProductTable.tsx
CHANGED
|
@@ -11,13 +11,16 @@ import {
|
|
|
11
11
|
import ActionIcon from '../../../../assets/icons/ActionIcon';
|
|
12
12
|
import { useOrderId, useProductDetails } from '../../store';
|
|
13
13
|
import { ApiResponse } from '../../types';
|
|
14
|
-
import { notification } from 'antd';
|
|
14
|
+
import { Empty, notification, Skeleton } from 'antd';
|
|
15
15
|
import { useNewReturnOrderData, useSelectedProducts } from '../../../store';
|
|
16
16
|
import styled from 'styled-components';
|
|
17
17
|
import { NavLink } from 'react-router-dom';
|
|
18
|
+
import { EmptyDataContainer } from '../../order-actions/actions/charge-log';
|
|
18
19
|
|
|
19
20
|
interface IPROS {
|
|
20
21
|
callReturnProducts: any;
|
|
22
|
+
loading: boolean;
|
|
23
|
+
locationloading: boolean;
|
|
21
24
|
}
|
|
22
25
|
|
|
23
26
|
const ReturnProductTable = (props: IPROS) => {
|
|
@@ -144,7 +147,21 @@ const ReturnProductTable = (props: IPROS) => {
|
|
|
144
147
|
</tr>
|
|
145
148
|
</thead>
|
|
146
149
|
<tbody>
|
|
147
|
-
{
|
|
150
|
+
{props?.loading || props?.locationloading ? (
|
|
151
|
+
<tr>
|
|
152
|
+
<td colSpan={14}>
|
|
153
|
+
<Skeleton active />
|
|
154
|
+
</td>
|
|
155
|
+
</tr>
|
|
156
|
+
) : productData?.length === 0 ? (
|
|
157
|
+
<tr>
|
|
158
|
+
<td colSpan={14}>
|
|
159
|
+
<EmptyDataContainer>
|
|
160
|
+
<Empty />
|
|
161
|
+
</EmptyDataContainer>
|
|
162
|
+
</td>
|
|
163
|
+
</tr>
|
|
164
|
+
) : (
|
|
148
165
|
productData?.map((product: any) => (
|
|
149
166
|
<tr key={product.id}>
|
|
150
167
|
<td>
|
|
@@ -189,12 +206,6 @@ const ReturnProductTable = (props: IPROS) => {
|
|
|
189
206
|
</td>
|
|
190
207
|
</tr>
|
|
191
208
|
))
|
|
192
|
-
) : (
|
|
193
|
-
<tr>
|
|
194
|
-
<td colSpan={8} style={{ textAlign: 'center' }}>
|
|
195
|
-
No records found
|
|
196
|
-
</td>
|
|
197
|
-
</tr>
|
|
198
209
|
)}
|
|
199
210
|
</tbody>
|
|
200
211
|
</StyledTable>
|
|
@@ -320,7 +320,7 @@ const DepotDeatils = atom<any>(0);
|
|
|
320
320
|
function useDepotDetails() {
|
|
321
321
|
return useAtom(DepotDeatils);
|
|
322
322
|
}
|
|
323
|
-
const productDetails = atom<any>([]);
|
|
323
|
+
const productDetails = atom<any[]>([]);
|
|
324
324
|
function useProductDetails() {
|
|
325
325
|
return useAtom(productDetails);
|
|
326
326
|
}
|
|
@@ -8,7 +8,7 @@ import { tableColumns } from '../helper';
|
|
|
8
8
|
// import { useAxios } from '@bjsdistribution/dms-component-library';
|
|
9
9
|
// import { ApiResponse } from '../../types';
|
|
10
10
|
|
|
11
|
-
function SystemLogs() {
|
|
11
|
+
function SystemLogs({ loading }: any) {
|
|
12
12
|
const [systemLogs] = useOrderProductSystemLogs();
|
|
13
13
|
// const [, setNotesData] = useEventNotesData();
|
|
14
14
|
|
|
@@ -38,7 +38,11 @@ function SystemLogs() {
|
|
|
38
38
|
return (
|
|
39
39
|
<Table>
|
|
40
40
|
<CollapsableForm collapsedContent={<CollapsedContent />}>
|
|
41
|
-
<DynamicTable
|
|
41
|
+
<DynamicTable
|
|
42
|
+
columns={tableColumns}
|
|
43
|
+
data={systemLogs}
|
|
44
|
+
loading={loading}
|
|
45
|
+
/>
|
|
42
46
|
</CollapsableForm>
|
|
43
47
|
</Table>
|
|
44
48
|
);
|
package/src/index.tsx
CHANGED
|
@@ -70,7 +70,7 @@ function ReturnClient() {
|
|
|
70
70
|
}, [location.pathname, searchParams]);
|
|
71
71
|
|
|
72
72
|
//API for action type
|
|
73
|
-
const { data: fetchedStaticData, loading:
|
|
73
|
+
const { data: fetchedStaticData, loading: staticLoading } = useApiHook<
|
|
74
74
|
ApiResponse
|
|
75
75
|
>({
|
|
76
76
|
endpoint: `/orders/getStaticData/all/`,
|
|
@@ -110,7 +110,7 @@ function ReturnClient() {
|
|
|
110
110
|
fetchedStaticData?.data?.flatMap((i: any) => i?.assign_client)
|
|
111
111
|
);
|
|
112
112
|
}
|
|
113
|
-
}, [
|
|
113
|
+
}, [staticLoading]);
|
|
114
114
|
useEffect(() => {
|
|
115
115
|
if (fetchedLocationData && fetchedLocationData?.data) {
|
|
116
116
|
setLocationData(fetchedLocationData?.data);
|
|
@@ -136,7 +136,10 @@ function ReturnClient() {
|
|
|
136
136
|
{/* for dev */}
|
|
137
137
|
<Route path="" element={<OrderViewQueryHandler />} />
|
|
138
138
|
<Route path="overview" element={<ReturnAfterTable />} />
|
|
139
|
-
<Route
|
|
139
|
+
<Route
|
|
140
|
+
path="/:id"
|
|
141
|
+
element={<OrderView locationloading={locationloading} />}
|
|
142
|
+
/>
|
|
140
143
|
{/* for local */}
|
|
141
144
|
{/* <Route path="/orders/view/return/filter" element={<ReturnTable />} /> */}
|
|
142
145
|
{/* for dev */}
|