Objectives
An admin employee is able to create, update, and delete the respective vendor, driver, and vehicle records. When the user logs in with the 'FSM_ADMIN' roles, the option for accessing the FSM Registry will be available on the FSMCard.
File Path:
FSM Registry:
When the 'FSM Registry' button is clicked, the Registry page is rendered and the vendor tab is selected by default.
FSM Registry Inbox Page consists of a Vendor tab, Vehicle tab and Driver tab with functionality to add, edit and update the respective vendor, vehicle or driver.
FSM Registry Component: https://github.com/egovernments/DIGIT-Dev/blob/develop/frontend/micro-ui/web/micro-ui-internals/packages/modules/fsm/src/components/RegistryInbox.js
Driver Tab:
In the Driver tab, FSM_ADMIN employees can see a list of all active/inactive driver name, dates of creation & assigned vendor name information.
Here are a few of the functionality that can be performed under the FSM registry inbox:
FSM_ADMIN can search the driver by driver name in the search bar.
FSM_ADMIN can enable/disable the driver by using the switch icon for the respective driver.
FSM_ADMIN can add a new driver by clicking on the “plus icon” in the top right corner.
When the 'Driver' option is selected, the 'Add New Driver' screen will be displayed/rendered.
Add New Driver Create:
An FSM_ADMIN is able to add driver details, wherein the fields for Driver Name, Driver License Number, Gender, and Driver Phone Number are marked as mandatory.
The payload sent to the "/vendor/driver/v1/_create
" endpoint looks like the following:
{ "tenantId": "pb.amritsar", "name": "Test New Driver for Tech doc", "licenseNumber": "AS11001123456", "status": "ACTIVE", "owner": { "tenantId": "pb", "name": "Test New Driver for Tech doc", "fatherOrHusbandName": "Test New Driver for Tech doc", "relationship": "OTHER", "gender": "MALE", "dob": -19800000, "emailId": "abc@egov.com", "mobileNumber": "7002159324" }, "vendorDriverStatus": "INACTIVE" }
After the driver details have been added, a toast message will appear indicating the successful addition of the driver, and the user will be redirected to the FSM Registry inbox.
To view a specific driver's details, click on the driver's name, and you will be directed to the driver details page.
An FSM_ADMIN can also add or update a new vendor by clicking on the 'Add New Vendor' plus icon.
List of Vendors shown in select vendor dropdown
FSM_ADMIN also have the options to edit or delete driver under take action button.
The edit screen page will be displayed when an FSM_ADMIN clicks on the edit option.
An FSM_ADMIN can update the Driver's License Number, Gender, Date of Birth (DOB), and Email.After an FSM_ADMIN updates the fields, a toast message will be displayed indicating the successful update of the fields.
The delete pop-up confirmation screen will be displayed when the delete option is clicked.
File path render in FSM Registry are below
Page | File Path |
---|---|
FSM Registry Inbox | |
Add New Driver | |
View Driver | |
Edit Driver |
New Components added in FSM for FSM registry
Components | File Path |
---|---|
ULB Home Card | |
Registry Inbox | |
Toogle Switch | |
Registry Search |
New CSS added
New Icon Added
Svg | File Path |
---|---|
Add icon | |
ULB Home Icon |
Custom Hooks Added
Hooks | File Path |
---|---|
| |
| |
| |
| |
| |
| |
|
Role Action Mapping:
API | ROLES | ACTION ID | |
---|---|---|---|
1 |
|
| 954 |
2 |
|
| 2354 |
3 |
|
| 2355 |
4 |
|
| 2053 |
5 |
|
| 2356 |
0 Comments