|
@@ -5,8 +5,8 @@ import { FormattedMessage } from 'react-intl';
|
|
import { useSelector, useDispatch } from 'react-redux';
|
|
import { useSelector, useDispatch } from 'react-redux';
|
|
import {
|
|
import {
|
|
fetchWorkThunk,
|
|
fetchWorkThunk,
|
|
- workSelectionSlice,
|
|
|
|
-} from '../../states/patient/worklist/slices/workSlice';
|
|
|
|
|
|
+ historySelectionSlice,
|
|
|
|
+} from '../../states/patient/worklist/slices/history';
|
|
import WorklistTable from './components/WorklistTable';
|
|
import WorklistTable from './components/WorklistTable';
|
|
import OperationPanel from './components/OperationPanel';
|
|
import OperationPanel from './components/OperationPanel';
|
|
import { RootState, AppDispatch } from '../../states/store';
|
|
import { RootState, AppDispatch } from '../../states/store';
|
|
@@ -20,21 +20,21 @@ const HistorylistPage: React.FC = () => {
|
|
const [drawerVisible, setDrawerVisible] = useState(false);
|
|
const [drawerVisible, setDrawerVisible] = useState(false);
|
|
|
|
|
|
const dispatch: AppDispatch = useDispatch();
|
|
const dispatch: AppDispatch = useDispatch();
|
|
- const filters = useSelector((state: RootState) => state.workFilters);
|
|
|
|
- const page = useSelector((state: RootState) => state.workPagination.page);
|
|
|
|
|
|
+ const filters = useSelector((state: RootState) => state.historyFilters);
|
|
|
|
+ const page = useSelector((state: RootState) => state.historyPagination.page);
|
|
const pageSize = useSelector(
|
|
const pageSize = useSelector(
|
|
- (state: RootState) => state.workPagination.pageSize
|
|
|
|
|
|
+ (state: RootState) => state.historyPagination.pageSize
|
|
);
|
|
);
|
|
const selectedIds = useSelector(
|
|
const selectedIds = useSelector(
|
|
- (state: RootState) => state.workSelection.selectedIds
|
|
|
|
|
|
+ (state: RootState) => state.historySelection.selectedIds
|
|
);
|
|
);
|
|
- const worklistData = useSelector(
|
|
|
|
- (state: RootState) => state.workEntities.data
|
|
|
|
|
|
+ const historylistData = useSelector(
|
|
|
|
+ (state: RootState) => state.historyEntities.data
|
|
);
|
|
);
|
|
|
|
|
|
useEffect(() => {
|
|
useEffect(() => {
|
|
console.log(
|
|
console.log(
|
|
- 'Fetching worklist data with filters:',
|
|
|
|
|
|
+ 'Fetching historylist data with filters:',
|
|
filters,
|
|
filters,
|
|
'page:',
|
|
'page:',
|
|
page,
|
|
page,
|
|
@@ -48,7 +48,7 @@ const HistorylistPage: React.FC = () => {
|
|
console.log('Row clicked:', JSON.stringify(record, null, 2));
|
|
console.log('Row clicked:', JSON.stringify(record, null, 2));
|
|
console.log('Selected IDs before:', record.StudyInstanceUID);
|
|
console.log('Selected IDs before:', record.StudyInstanceUID);
|
|
dispatch(
|
|
dispatch(
|
|
- workSelectionSlice.actions.setSelectedIds([record.StudyInstanceUID])
|
|
|
|
|
|
+ historySelectionSlice.actions.setSelectedIds([record.StudyInstanceUID])
|
|
);
|
|
);
|
|
};
|
|
};
|
|
|
|
|
|
@@ -65,7 +65,7 @@ const HistorylistPage: React.FC = () => {
|
|
{screens.xs ? (
|
|
{screens.xs ? (
|
|
<>
|
|
<>
|
|
<WorklistTable
|
|
<WorklistTable
|
|
- worklistData={worklistData}
|
|
|
|
|
|
+ worklistData={historylistData}
|
|
filters={filters}
|
|
filters={filters}
|
|
page={page}
|
|
page={page}
|
|
pageSize={pageSize}
|
|
pageSize={pageSize}
|
|
@@ -102,7 +102,7 @@ const HistorylistPage: React.FC = () => {
|
|
className="overflow-auto"
|
|
className="overflow-auto"
|
|
>
|
|
>
|
|
<WorklistTable
|
|
<WorklistTable
|
|
- worklistData={worklistData}
|
|
|
|
|
|
+ worklistData={historylistData}
|
|
filters={filters}
|
|
filters={filters}
|
|
page={page}
|
|
page={page}
|
|
pageSize={pageSize}
|
|
pageSize={pageSize}
|