|
@@ -14,13 +14,16 @@ import {
|
|
|
setPage,
|
|
|
setPageSize,
|
|
|
} from '../../../states/patient/worklist/slices/searchSlice';
|
|
|
-import { RootState } from '../../../states/store';
|
|
|
+import { fetchWorkThunk } from '../../../states/patient/worklist/slices/workSlice';
|
|
|
+import { AppDispatch, RootState } from '../../../states/store';
|
|
|
+import { WorkFilter } from '@/states/patient/worklist/types/workfilter';
|
|
|
+// import { AnyAction } from '@reduxjs/toolkit';
|
|
|
|
|
|
const { RangePicker } = DatePicker;
|
|
|
|
|
|
const SearchPanel: React.FC = () => {
|
|
|
const intl = useIntl();
|
|
|
- const dispatch = useDispatch();
|
|
|
+ const dispatch = useDispatch<AppDispatch>();
|
|
|
const id = useSelector((state: RootState) => state.search.id);
|
|
|
const name = useSelector((state: RootState) => state.search.name);
|
|
|
const accNo = useSelector((state: RootState) => state.search.acc_no);
|
|
@@ -87,6 +90,20 @@ const SearchPanel: React.FC = () => {
|
|
|
dispatch(setStatus('Arrived,InProgress'));
|
|
|
dispatch(setPage(1));
|
|
|
dispatch(setPageSize(10));
|
|
|
+ dispatch(
|
|
|
+ fetchWorkThunk({
|
|
|
+ page: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ filters: {
|
|
|
+ patient_id: id,
|
|
|
+ patient_name: name,
|
|
|
+ access_number: accNo,
|
|
|
+ start_time: startTime,
|
|
|
+ end_time: endTime,
|
|
|
+ status: 'Arrived',
|
|
|
+ } as WorkFilter,
|
|
|
+ })
|
|
|
+ );
|
|
|
}}
|
|
|
>
|
|
|
<FormattedMessage
|