@bjsdistribution/dms-client-return 0.0.65 → 0.0.67

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.65",
2
+ "version": "0.0.67",
3
3
  "license": "MIT",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
@@ -95,6 +95,11 @@ const ReturnOrderFilter = () => {
95
95
  });
96
96
  };
97
97
 
98
+ const assigneeOptions = assignData?.map(client => ({
99
+ label: client.type,
100
+ value: client.id,
101
+ }));
102
+
98
103
  const handleAssigneeChange = (value: any) => {
99
104
  const bjsDeliveryValue = assignData.find(client => client.id === value)
100
105
  ?.bjs_delivery;
@@ -189,7 +194,7 @@ const ReturnOrderFilter = () => {
189
194
  className="custom-select"
190
195
  placeholder="Status of Order"
191
196
  onChange={handleStatusOfOrder}
192
- style={{ minWidth: '130px' }}
197
+ style={{ width: '145px' }}
193
198
  value={statusOrder}
194
199
  onClear={handleClear}
195
200
  allowClear
@@ -220,15 +225,12 @@ const ReturnOrderFilter = () => {
220
225
  </div>
221
226
  <StyledAntSelect>
222
227
  <Select
223
- options={assignData?.map(client => ({
224
- label: client.type,
225
- value: client.id,
226
- }))}
228
+ options={assigneeOptions}
227
229
  className="custom-select"
228
230
  placeholder="Assignee"
229
231
  onChange={handleAssigneeChange}
230
232
  value={selectedAssignee}
231
- style={{ minWidth: '120px' }}
233
+ style={{ minWidth: '140px' }}
232
234
  allowClear
233
235
  onClear={handleClearAssignee}
234
236
  />
@@ -31,7 +31,7 @@ import { OrdersType } from './types';
31
31
  import { useLocation } from 'react-router-dom';
32
32
  import useSystemLogs from './hooks/useGetSystemLogs';
33
33
  import { notification } from 'antd';
34
- import { useAssignData } from '../store';
34
+ // import { useAssignData } from '../store';
35
35
  import DetailsFilters from './details-filters/DetailsFilters';
36
36
 
37
37
  interface ApiResponse {
@@ -66,7 +66,7 @@ function OrderView() {
66
66
  const [, setRouteId] = useRouteId();
67
67
  const [liveRecalling] = useLiveRecalling();
68
68
  const systemLogsData = useSystemLogs();
69
- const [, setAssignData] = useAssignData();
69
+ // const [, setAssignData] = useAssignData();
70
70
 
71
71
  // query param
72
72
  const location = useLocation();
@@ -173,11 +173,11 @@ function OrderView() {
173
173
  if (fetchedStaticData && fetchedStaticData.data) {
174
174
  const result = fetchedStaticData?.data;
175
175
  setOrderStaticData(result[0]);
176
- setAssignData(
177
- fetchedStaticData?.data?.flatMap(
178
- (i: any) => i?.resource_visibility_type
179
- )
180
- );
176
+ // setAssignData(
177
+ // fetchedStaticData?.data?.flatMap(
178
+ // (i: any) => i?.resource_visibility_type
179
+ // )
180
+ // );
181
181
  }
182
182
  }, [staticDataLoading]);
183
183
 
@@ -221,9 +221,10 @@ function OrderView() {
221
221
  useEffect(() => {
222
222
  setLoading(depotDataLoading);
223
223
  if (fetchedDepotData && fetchedDepotData.data) {
224
+ console.log(fetchedDepotData, 'fetchedDepotData');
224
225
  const requiredData = fetchedDepotData?.data;
225
226
  if (requiredData.length > 0) {
226
- const options = requiredData.map((x: any) => {
227
+ const options = requiredData?.map((x: any) => {
227
228
  return {
228
229
  label: x.name,
229
230
  value: x.id,