Skip to content

Commit

Permalink
Merge branch 'master' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
gigincg committed Jun 30, 2022
2 parents 11ef368 + a20ccd0 commit df77e22
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Components/Patient/DailyRounds.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -163,22 +163,22 @@ export const DailyRounds = (props: any) => {

useEffect(() => {
async function fetchHasPreviousLog() {
if (consultationId) {
if (consultationId && !id) {
const res = await dispatchAction(
getDailyReport({ limit: 1, offset: 0 }, { consultationId })
);
setHasPreviousLog(res.data.count > 0);
dispatch((prev: any) => ({
dispatch({
type: "set_form",
form: {
...prev.form,
...state.form,
clone_last: res.data.count > 0 ? "true" : "false",
},
}));
});
}
}
fetchHasPreviousLog();
}, [dispatchAction, consultationId]);
}, [dispatchAction, consultationId, id]);

const validateForm = () => {
const errors = { ...initError };
Expand Down

0 comments on commit df77e22

Please sign in to comment.