|
@@ -79,7 +79,16 @@ const businessFlowMiddlewareLogic: Middleware =
|
|
|
console.log(
|
|
|
`[businessFlowMiddleware] Notifying backend for ${action.payload}`
|
|
|
);
|
|
|
- // todo 把所有未曝光的体位从study删除掉--服务端和slice。
|
|
|
+ // 通知服务端。
|
|
|
+ const studyId =
|
|
|
+ (store.getState() as RootState)?.bodyPositionList?.selectedBodyPosition
|
|
|
+ ?.work?.StudyID ?? '';
|
|
|
+ if (!studyId) {
|
|
|
+ console.error(
|
|
|
+ '[businessFlowMiddleware] No study ID found for the selected body position.'
|
|
|
+ );
|
|
|
+ }
|
|
|
+ await suspendOrCompleteStudy(studyId, 'Completed');
|
|
|
return next({ ...action, payload: continueBusinessFlow });
|
|
|
}
|
|
|
if (action.payload === 'exitExamSuspended') {
|