-
Notifications
You must be signed in to change notification settings - Fork 347
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(resource): cant submit resource request #5443
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
✅ Deploy Preview for care-egov-staging ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
Kudos, SonarCloud Quality Gate passed!
|
LGTM |
@rithviknishad can you rereview this once |
@cp-Coder We truly appreciate your efforts. Thank you for taking the time to contribute; this is a very valuable contribution to us 🥇. We always welcome your contribution 🙂, so feel free to contribute to anything anytime, and never lose that spirit of innovation 🙌. |
Bug Fix
WHAT
🤖 Generated by Copilot at 1e08fdd
Refactored the resource creation form and added localization support. The form now uses custom components and the
useTranslation
hook to render the fields and labels in the user's preferred language. The code was also cleaned up and the types and styles were enhanced. The English locale file was updated with the resource-related strings fromResource.json
.Proposed Changes
form validation
logicAssociated Issue
@coronasafe/care-fe-code-reviewers @coronasafe/code-reviewers
Merge Checklist
HOW
🤖 Generated by Copilot at 1e08fdd
ResourceCreate.tsx
to clean up the code and avoid unnecessary dependencies (link)ResourceCreate.tsx
to improve the form functionality and appearance (link)const { t } = useTranslation();
inResourceCreate.tsx
to access the translation function for the form labels and title (link)validateForm
function inResourceCreate.tsx
to avoid unnecessary parsing of other fields (link, link)handleChange
function parameter type toFieldChangeEvent<string>
inResourceCreate.tsx
to use the custom type for the form field change event (link)PageTitle
component prop with the translation function for the page title inResourceCreate.tsx
(link)ResourceCreate.tsx
(link, link)Resource.json
file toindex.js
in the English locale to include the resource-related translation strings (link)Resource
object to theen
object in the English locale to include the resource-related translation strings (link)