-
Notifications
You must be signed in to change notification settings - Fork 189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix: Back to search results button functionality #1044
Closed
Closed
Changes from 2 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
4720e42
Fix: Back to search results button issue
sam-sny fcf847e
Merge pull request #1 from sam-sny/fix/back-to-search-results-button
sam-sny a253fca
Fix: Back to search results button issue
sam-sny 752ae43
Merge branch 'main' of https://github.com/openmrs/openmrs-esm-patient…
sam-sny edad9bd
user_onboarding
sam-sny 06ce47e
Merge pull request #2 from sam-sny/fix/back-to-search-results-button
sam-sny 5f6fcb3
Merge branch 'openmrs:main' into main
sam-sny File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,7 +41,7 @@ import { addQueueEntry, useVisitQueueEntries } from '../../active-visits/active- | |
import { convertTime12to24, type amPm } from '../../helpers/time-helpers'; | ||
import { MemoizedRecommendedVisitType } from './recommended-visit-type.component'; | ||
import { useActivePatientEnrollment } from '../hooks/useActivePatientEnrollment'; | ||
import { SearchTypes, type PatientProgram, type NewVisitPayload } from '../../types'; | ||
import { type SearchTypes, type PatientProgram, type NewVisitPayload } from '../../types'; | ||
import styles from './visit-form.scss'; | ||
import { useDefaultLoginLocation } from '../hooks/useDefaultLocation'; | ||
import isEmpty from 'lodash-es/isEmpty'; | ||
|
@@ -203,10 +203,10 @@ const StartVisitForm: React.FC<VisitFormProps> = ({ patientUuid, toggleSearchTyp | |
<Button | ||
kind="ghost" | ||
renderIcon={(props) => <ArrowLeft size={24} {...props} />} | ||
iconDescription={t('backToScheduledVisits', 'Back to scheduled visits')} | ||
iconDescription={t('backToSearchResult', 'Back to search result')} | ||
size="sm" | ||
onClick={() => toggleSearchType(SearchTypes.SCHEDULED_VISITS, patientUuid)}> | ||
<span>{t('backToScheduledVisits', 'Back to scheduled visits')}</span> | ||
onClick={closePanel}> | ||
<span>{t('backToSearchResult', 'Back to search result')}</span> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here. Does the "closePanel" function actually return you to the search result? Or does it close the panel entirely? If it closes the panel, this would seem incorrect. |
||
</Button> | ||
)} | ||
</div> | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would seem to indicate that clicking on this button will close the entire overlay / search panel entirely, not actually return to the search result. If the goal is to return to the search result, can you show that this is what this does?