WIP - I've made some improvements to how _id is handled and the isEmpty…#175
Open
OmarBERRABEH wants to merge 1 commit intoekino:mainfrom
Open
WIP - I've made some improvements to how _id is handled and the isEmpty…#175OmarBERRABEH wants to merge 1 commit intoekino:mainfrom
_id is handled and the isEmpty…#175OmarBERRABEH wants to merge 1 commit intoekino:mainfrom
Conversation
… logic in `VitalityGeneralInformationView`. - I've added validation for the `_id` URL parameter in `VitalityGeneralInformationView.tsx`. - The `useClientQuery` will now be disabled if `_id` isn't a valid numeric string. - I'll log a warning to the console if I encounter an invalid `_id` value. - I've clarified the `isEmpty` prop that gets passed to `VitalitySectionView`. - It now directly reflects whether `appInfos` data is present (`!appInfos`). - I've updated the unit tests in `VitalityGeneralInformationView-test.tsx` to cover: - Scenarios where `_id` parameters are invalid or missing. - The correct `enabled` state for `useClientQuery`. - The revised `isEmpty` logic based on the presence of `appInfos`. - Verification of console warnings for invalid `_id`s.
_id is handled and the isEmpty…_id is handled and the isEmpty…
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
… logic in
VitalityGeneralInformationView._idURL parameter inVitalityGeneralInformationView.tsx.useClientQuerywill now be disabled if_idisn't a valid numeric string._idvalue.isEmptyprop that gets passed toVitalitySectionView.appInfosdata is present (!appInfos).VitalityGeneralInformationView-test.tsxto cover:_idparameters are invalid or missing.enabledstate foruseClientQuery.isEmptylogic based on the presence ofappInfos._ids.Pull Request Template
✨ Title
📄 Description
Please explain in detail what this PR does, why it is needed, and how it addresses a specific problem. Include any relevant context and background information.
Checklist
🔗 Contextual Links (optional)
Add any relevant links to tracking tickets, previous discussions, or other resources.
📸 Visuals (optional)
If possible, include images or videos that show the result of your changes.
🔍 Reviewers
Please assign at least one reviewer for this PR. The PR cannot be merged until it is approved by the reviewer(s).