Versions Compared

Key

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

...

The code for create API request object generation can be found inside the Owner details or scrutiny details component for BPA & OCBPA respectively. this API call is triggered when user clicks on the next button in correspondence address page.

for BPA/OBPS create API call, Digit.OBPSService.create is used to call the API, whole method can be found inside gonext() method in the following files respectively.

Code reference : https://github.com/egovernments/DIGIT-Dev/blob/develop/frontend/micro-ui/web/micro-ui-internals/packages/modules/obps/src/pageComponents/OwnerDetails.js / https://github.com/egovernments/DIGIT-Dev/blob/develop/frontend/micro-ui/web/micro-ui-internals/packages/modules/obps/src/pageComponents/ScrutinyDetails.js

Utils Folder basically contains all the methods which are being used throughout the OBPS module, and if any common method needs to be declared here, which in turn can be imported in other files. 

Througout the flow, Download button is mentioned according to the current state of the Application, these documents are generated from the sever side, and are dependent on the business service of the application, to define the business service and the following keys refer the below code:

Code Block
if(data?.applicationData?.businessService === "BPA_LOW")
  {
    businessService = ["BPA.LOW_RISK_PERMIT_FEE"]
  }
  else if(data?.applicationData?.businessService === "BPA")
  {
    businessService = ["BPA.NC_APP_FEE","BPA.NC_SAN_FEE"];
  }
  else if(data?.applicationData?.businessService === "BPA_OC")
  {
    businessService = ["BPA.NC_OC_APP_FEE","BPA.NC_OC_SAN_FEE"];
  }

following are the hooks used for the download PDF call:

Code Block
let response = await Digit.PaymentService.generatePdf(tenantId, { Bpa: [requestData] }, order);
const fileStore = await Digit.PaymentService.printReciept(tenantId, { fileStoreIds: response.filestoreIds[0] });
window.open(fileStore[response?.filestoreIds[0]], "_blank");

here order for Occupancy Certificate : occupancy-certificate and for Permit order: buildingpermit-low

For updating an Application the update API from BPA is being called using the React hooks, which has been declare under hooks/elements/obps as OBPSService.

The response object from create API is being used for the request object of update API, with addition of document details which user had entered, it will make the status of the Application as Applied instead of initiated. along with this NOC update API is also called which updates the status of the NOC aligned with the particular application.

for update API for NOC, BPA & OCBPA, the hook used for calling the API is:

Code Block
Digit.Hooks.obps.useObpsAPI(
    data?.address?.city ? data.address?.city?.code : tenantId,
    true
  ); 

This API is called in the respective Acnowledgement Page:

...