Skip to content

Commit 6509d4f

Browse files
Merge pull request #688 from aphp/hot-fix/noRightToAccessMyPatient
[2.19.3][Merge] - Merge hot-fix/rights into main
2 parents 15a97b8 + 6c9ce9f commit 6509d4f

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cohort360_react",
3-
"version": "2.19.2",
3+
"version": "2.19.3",
44
"private": true,
55
"dependencies": {
66
"@apollo/client": "^3.7.0",

src/state/exploredCohort.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const defaultInitialState = {
4141
importedPatients: [],
4242
includedPatients: [],
4343
excludedPatients: [],
44-
loading: false,
44+
loading: true,
4545
canMakeExport: false,
4646
deidentifiedBoolean: undefined
4747
}
@@ -324,20 +324,20 @@ const exploredCohortSlice = createSlice({
324324
builder.addCase(logout.fulfilled, () => defaultInitialState)
325325
builder.addCase(fetchExploredCohort.pending, (state) => ({ ...state, loading: true }))
326326
builder.addCase(fetchExploredCohort.fulfilled, (state, { payload }) => ({ ...state, ...payload, loading: false }))
327-
builder.addCase(fetchExploredCohort.rejected, () => ({ ...defaultInitialState }))
327+
builder.addCase(fetchExploredCohort.rejected, () => ({ ...defaultInitialState, loading: false }))
328328
builder.addCase(fetchExploredCohortInBackground.pending, (state) => ({ ...state, loading: true }))
329329
builder.addCase(fetchExploredCohortInBackground.fulfilled, (state, { payload }) => ({
330330
...state,
331331
...payload,
332332
loading: false
333333
}))
334-
builder.addCase(fetchExploredCohortInBackground.rejected, () => ({ ...defaultInitialState }))
334+
builder.addCase(fetchExploredCohortInBackground.rejected, () => ({ ...defaultInitialState, loading: false }))
335335
builder.addCase(favoriteExploredCohort.pending, (state) => ({ ...state }))
336336
builder.addCase(favoriteExploredCohort.fulfilled, (state, { payload }) => ({
337337
...state,
338338
...payload
339339
}))
340-
builder.addCase(favoriteExploredCohort.rejected, () => ({ ...defaultInitialState }))
340+
builder.addCase(favoriteExploredCohort.rejected, () => ({ ...defaultInitialState, loading: false }))
341341
}
342342
})
343343

src/views/Dashboard/Dashboard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ const Dashboard: React.FC<{
121121
return <CohortCreation />
122122
}
123123

124-
if (dashboard.loading === false && dashboard.cohort === undefined) {
124+
if (dashboard.loading === false && dashboard.cohort === undefined && dashboard.totalPatients === undefined) {
125125
return <CohortRightOrNotExist />
126126
} else if (dashboard.loading === false && dashboard.totalPatients === 0) {
127127
return <CohortNoPatient />

0 commit comments

Comments
 (0)