FSM v1.3 Employee: New Desludging Application Create Flow

Objective

It allows an Employee to create a New Desludging Application, Zero pricing & Advance Application by entering all user information.

Once the user logs in with “FSM_CREATOR_EMP" Roles, the User will get the option for creating New Desludging Application in the FSMCard and in the inbox.

FSM Card

 

File Path: https://github.com/egovernments/DIGIT-Dev/blob/develop/frontend/micro-ui/web/micro-ui-internals/packages/modules/fsm/src/components/FsmCard.js and https://github.com/egovernments/DIGIT-Dev/blob/develop/frontend/micro-ui/web/micro-ui-internals/packages/modules/fsm/src/pages/employee/index.js

Clicking of New Desludging it navigates to the New Desludging Application required screen.

Route: https://qa.digit.org/digit-ui/employee/fsm/new-application

New Desludging Application page

New Desludging Application for Zero Pricing:

  • fsm-calculator/v1/billingSlab/_search

  • fsm-calculator/v1/_advancebalancecalculate

Case 1: If the employee has selected slum:

  • Selecting a slum name from dropdown, vehicle capacity & no of trips api is called fsm-calculator/v1/billingSlab/_search & fsm-calculator/v1/_advancebalancecalculate

Case 2: If the employee has selected property type and property sub-type and the status is active

Selecting a property type and property sub-type api is called

  • fsm-calculator/v1/billingSlab/_search

  • fsm-calculator/v1/_advancebalancecalculate

When a user clicks on Submit and all the validations on frontend are successful then a create post request is sent the this API endpoint “/fsm/v1/_create?" with an fsm Object in the body(payload) which contains all the required details to apply for the amendment and a corresponding success/failure acknowledgement screen is shown on the screen.

 

The payload sent to the "fsm/v1/_create" endpoint looks like the following for the zero pricing:

{ "citizen": { "name": "TEST Zero", "mobileNumber": "7890987656", "gender": "MALE" }, "tenantId": "pb.amritsar", "source": "TELEPHONE", "additionalDetails": { "tripAmount": 0 }, "propertyUsage": "RESIDENTIAL.APARTMENT", "vehicleCapacity": 1000, "pitDetail": {}, "address": { "tenantId": "pb.amritsar", "city": "Amritsar", "pincode": 143001, "slumName": "SL0001", "locality": { "code": "SUN04", "name": "Ajit Nagar - Area1" }, "geoLocation": {} }, "noOfTrips": 1, "paymentPreference": null, "advanceAmount": null }

 

New Desludging Application for Advance Pricing:

  • fsm-calculator/v1/billingSlab/_search

  • fsm-calculator/v1/_advancebalancecalculate

Case 1: If the employee has selected slum equals to No:

  • Selecting a slum name from dropdown, vehicle capacity & no of trips api is called fsm-calculator/v1/billingSlab/_search & fsm-calculator/v1/_advancebalancecalculate

Case 2: If the employee has selected property type and property sub-type and the status is active :

Selecting a property type and property sub-type api is called

  • fsm-calculator/v1/billingSlab/_search

  • fsm-calculator/v1/_advancebalancecalculate

 

Note: Employee can update the Advance Collection which is less than Total Amount or Equal .

 

File path: https://github.com/egovernments/DIGIT-Dev/blob/develop/frontend/micro-ui/web/micro-ui-internals/packages/modules/fsm/src/pages/employee/NewApplication/index.js

The payload sent to the "fsm/v1/_create" endpoint looks like the following for Advance Application:

{ "citizen": { "name": "Test QA", "mobileNumber": "7890987678", "gender": "MALE" }, "tenantId": "pb.amritsar", "source": "TELEPHONE", "additionalDetails": { "tripAmount": 3000 }, "propertyUsage": "RESIDENTIAL.APARTMENT", "vehicleCapacity": 1000, "pitDetail": {}, "address": { "tenantId": "pb.amritsar", "city": "Amritsar", "pincode": 143001, "slumName": null, "locality": { "code": "SUN04", "name": "Ajit Nagar - Area1" }, "geoLocation": {} }, "noOfTrips": 1, "paymentPreference": null, "advanceAmount": 100 }

When a user clicks on Submit and all the validations on frontend are successful then a create post request is sent the this API endpoint “/fsm/v1/_create?" with an fsm Object in the body(payload) which contains all the required details to apply for new desuldging application and a corresponding success/failure acknowledgement screen is shown on the screen.

 

When a employee select slum name from dropdown, vehicle capacity & no of trips api is called /fsm-calculator/v1/_advanceBalanceCalculate fetch the advance balance amount.

The headers sent to the "/fsm-calculator/v1/_advanceBalanceCalculate" endpoint looks like the following:

https://qa.digit.org/fsm-calculator/v1/_advanceBalanceCalculate?tenantId=pb.amritsar&totalTripAmount=3000

here is an example how the TotalTripAmount is being calculated for zero pricing:

File path: https://github.com/egovernments/DIGIT-Dev/blob/develop/frontend/micro-ui/web/micro-ui-internals/packages/modules/fsm/src/pageComponents/AdvanceCollection.js

 

Role Action Mapping:

 

API

ROLES

ACTION ID

 

API

ROLES

ACTION ID

1

/egov-mdms-service/v1/_search

LOA_CREATOR,WO_CREATOR,AE_CREATOR,WORKS_MASTER_CREATOR,UC_EMP,SUPERUSER

954

2

/fsm/v1/_create

FSM_CREATOR_EMP,CITIZEN

2043

3

/fsm/v1/_search

FSM_CREATOR_EMP,CITIZEN,FSM_EDITOR_EMP,FSM_VIEW_EMP,FSM_ADMIN,FSM_DSO,FSM_DRIVER,FSM_EMP_FSTPO,FSM_COLLECTOR

2044

4

/vendor/v1/_search

FSM_CREATOR_EMP,FSM_ADMIN,FSM_DSO,FSM_EDITOR_EMP,FSM_VIEW_EMP,FSM_EMP_FSTPO,CITIZEN

2053

5

/egov-location/location/v11/boundarys/_search

SUPERUSER,FSM_CREATOR_EMP,DE_CREATOR,CITIZEN,GRO,CSR,EMPLOYEE,PGR-ADMIN,TL_APPROVER,TL_CEMP

1429

6

/fsm-calculator/v1/billingSlab/_search

FSM_CREATOR_EMP,FSM_EDITOR_EMP,FSM_ADMIN,FSM_DSO,CITIZEN

2061

7

/fsm-calculator/v1/_advanceBalanceCalculate

FSM_CREATOR_EMP,CITIZEN,FSM_EDITOR_EMP

2380