Versions Compared

Key

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

...

getTradeEditDetails() function is being used so that the License object which is received from the Trade Search API, is converted to the Apply flow relevant structure so that the values can be pre-populated for the user convenience, on completing the flow, application is updated. Link for the same can be found below:

https://github.com/egovernments/digit-ui-internals/blob/main/packages/modules/tl/src/pages/citizen/EditTrade/index.js

User can delete and add as many as accessory or units it needs but there should be at-least one unit to complete the application, to add new unit or accessory “Add” button is used which is located at the end of the page. A new array is formed with all the updated details or with the old unit/accessory, when the flow is completed, this new array is then compared with the old array of accessory and units, and new resulting array object is formed for the request body, you can find the respective code in the following method : gettradeupdateaccessories & gettradeupdateunits. this can be found in the below link https://github.com/egovernments/digit-ui-internals/blob/main/packages/modules/tl/src/utils/index.js

Similarly for owners the method which is used to form the new request param array is gettradeownerarray

It is similar as accessory and Units, only difference is in UI, user can’t select multiple owner and only add one owner, it needs to either add more than one owner or select single owner as ownership category and proceed. After the successful update the application next action will be “Pending for document verification” as their is update in the data.

On completing the flow, the same object structure which was being used earlier in the flow, gets changed into the request body structure for the update API: /tl-services/v1/_update, for this, the method which gets used is declared inside Utils folder. Method name: convertToResubmitTrade and it can be found in the below link:

...