Closed david-loe closed 1 month ago
[!CAUTION]
Review failed
The pull request is closed.
The pull request introduces several modifications across multiple controller files in the backend and frontend, primarily focusing on adding new methods to convert various Mongoose schemas into Vueform schemas. These methods are accessible via specific GET endpoints and utilize a new utility function, mongooseSchemaToVueformSchema
. Additionally, several JSON schema files related to forms have been deleted, and the frontend components have been updated to dynamically fetch form schemas instead of relying on static imports.
File Path | Change Summary |
---|---|
backend/controller/countryController.ts | Added method getCountryForm() in CountryAdminController to convert countrySchema to Vueform schema. |
backend/controller/currencyController.ts | Added method getCurrencyForm() in CurrencyAdminController to convert currencySchema to Vueform schema. |
backend/controller/healthInsuranceController.ts | Added method getHealthInsuranceForm() in HealthInsuranceAdminController to convert healthInsuranceSchema to Vueform schema. |
backend/controller/organisationController.ts | Added method getOrganisationForm() in OrganisationAdminController to convert organisationSchema to Vueform schema. |
backend/controller/projectController.ts | Added method getProjectForm() in ProjectAdminController to convert projectSchema to Vueform schema. |
backend/controller/settingsController.ts | Added method getSettingsForm() in SettingsAdminController to convert settingsSchema to Vueform schema. |
backend/controller/userController.ts | Added method getUserForm() in UserAdminController to convert userSchema to Vueform schema. |
backend/models/vueformGenerator.ts | Replaced generateForms with mongooseSchemaToVueformSchema for converting Mongoose schemas to Vueform schemas. |
backend/server.ts | Removed various imports and a conditional block related to development form generation logic. |
common/forms/*.json | Deleted multiple JSON schema files for forms (country, currency, health insurance, organisation, project, settings, user). |
frontend/src/components/settings/elements/*.vue | Updated multiple components to dynamically fetch form schemas during lifecycle hooks instead of using static imports. |
Objective | Addressed | Explanation |
---|---|---|
Enable dynamic forms for custom locales in production (#105) | β | |
Implement new methods to convert schemas to Vueform format | β |
CountryAdminController
, which also involves managing schemas and forms related to projects and user roles.π° In the land where forms do play,
New methods bloom, bright as day.
With schemas fetched, no more static,
Dynamic forms, oh so fantastic!
From country to settings, all align,
In Vueform's embrace, they brightly shine! πΌ
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Fixes #105
Summary by CodeRabbit
New Features
Bug Fixes
Chores