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.
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 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 .
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:
Role Action Mapping:
API | ROLES | ACTION ID | |
---|---|---|---|
1 |
|
| 954 |
2 |
|
| 2043 |
3 |
|
| 2044 |
4 |
|
| 2053 |
5 |
|
| 1429 |
6 |
|
| 2061 |
7 |
|
| 2380 |