Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

After following the above steps, compile the code using the steps mentioned here, copy the files from the dist folder and paste it in the node_modules/bahmni-form-controls/dist of the implementer interface repo.Then, follow the steps mentioned here to compile and run the implementer interface. You can then see your changes reflected.

Steps to Create Controls For Observation Forms:

  1. Create a .jsx file with an appropriate name(preferably the same name as the designer) in the /src/components directory.
  2. Create an appropriate render method.
  3. Create functions to handle the actions performed by user such as onClick, onChange etc.
  4. Check the propTypes passed to the component.
  5. Finally register the component using the Component Store. Use the same name as the one used during creation of the designer component.
  6. If there are any validations to be performed, create checks for them in /src/helpers/controlsHelper.js
  7. Finally handle those checks in /src/helpers/Validator.js . This will keep the code neat and will help others in the future.