GSoC 2022 with OpenMRS: Week 10
The Week 10 of Google Summer of Code started on 15th of August. In my previous blog post I talked about the progress of the form saving feature and the interactive builder. If you haven't read my previous post here is a link for that post. My main goal for this week was to separate the components in the JSON schema and update the attributes of the components from the builder.
An interactive builder displays the existing form elements inside the pages attribute in schema. Pages contains an array of page of objects. Likewise a page contains sections and sections contain questions and so on. Therefore first these elements should be separately displayed. In order to achieve this I need to iterate through each page element and its attributes. Then for each page element a drop down component displayed, and inside the drop down the sections, questions are displayed separately.
Next step was to implement a way to edit specific attributes of those elements. The user should be able to edit page name, section name and questions. While generating the elements each element is provided with an edit and delete button. When a user clicks an edit button, a modal appears, and the user can update the specified properties of an element using the form inside the modal.
This is the progress of the interactive builder within this week. Next week my plan is to complete the interactive builder by implementing the remaining features (Add and remove elements). Thank you for reading, Two more weeks to go… Stay tuned and check back next week for the eleventh week’s blog post. Peace ✌️