Versions Compared

Key

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

...

  • The most complex part in the module is the assessment information part, where we have handled the multiItem component to show multiple units on the same floor.
  • the units are received and sent in the API as an array. 
  • To render a different variety of plot and floor details for every unique combination of property usage type and property type selected, we have all possible specs written at "\egov-ui-kit-dev\src\config\forms\specs\PropertyTaxPay\", which can be dynamically picked as per the collection with the help of assessInfoFormManager.js present in egov-ui-kit's utils folder.


PT Form hooks:

  • beforeFieldChange → gets called before the every "handleFieldChange" action. it accepts action, dispatch and state as its parameters. it can be used to set other fields or perform any action/operation on every field change. we can alter the value as well here and return the action.
  • updateDependentFields → gets called on every "handleFieldChange" action and is specifically used to load dependent fields. If the data of one dropdown gets loaded only after selecting an option in the previous dropdown, then updateDependentFields hook is the right choice. it gets formKey, field, dispatch, and state as its parameters 
  • beforeInitForm →  gets called before init form action. can be used to make api calls and popuate dropdowns, set fields, set default values etc. When this is called, at that time the same form and its state will not be available in the redux, so setting the form in the state or manipulating it is not possible. actions can be performed only on states other than self.
  • afterInitform  → gets called just after the init form action, its advantage is that when this gets called the form is available in the redux state, so any action can be performed on them.


PT form actions: 

  • setFieldProperty : eg    setFieldProperty(formKey, "ownerCategoryIdType", "dropDownData", documentTypes)
  • prepareFormData : eg  prepareFormData(jsonPath, fieldValue)