FSM v1.3 ULB Admin - FSM Registry - Driver Tab

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.

FSM Employee Card

 

File Path:

Card: https://github.com/egovernments/DIGIT-Dev/blob/develop/frontend/micro-ui/web/micro-ui-internals/packages/modules/fsm/src/components/FsmCard.js

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.

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

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

 

New Components added in FSM for FSM registry

 

Components

File Path

 

Components

File Path

 

Toggle Switch

https://github.com/egovernments/DIGIT-Dev/blob/develop/frontend/micro-ui/web/micro-ui-internals/packages/css/src/components/toggleSwitch.scss

 

Action Bar

https://github.com/egovernments/DIGIT-Dev/commit/f5936cc5b2b76b4ef6c09c8bfce1b28664983521#diff-6b25efcf33f16fa23971c400b64d7475f6f236b459af82ec187aa207d47098d5 Connect to preview

 

Toggle Switch

https://github.com/egovernments/DIGIT-Dev/commit/f5936cc5b2b76b4ef6c09c8bfce1b28664983521#diff-7b7d336ea2eda25472dbf8d4c433ffa493b96fda400682073c31349bd2c08538 Connect to preview

 

Registry Search

https://github.com/egovernments/DIGIT-Dev/blob/develop/frontend/micro-ui/web/micro-ui-internals/packages/modules/fsm/src/components/RegistrySearch.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

/vendor/driver/v1/_create

FSM_ADMIN,FSM_CREATOR_EMP,FSM_DSO,FSM_EDITOR_EMP,FSM_VIEW_EMP,FSM_EMP_FSTPO

2354

3

/vendor/driver/v1/_update

FSM_ADMIN,FSM_CREATOR_EMP,FSM_DSO,FSM_EDITOR_EMP,FSM_VIEW_EMP,FSM_EMP_FSTPO

2355

4

/vendor/v1/_search

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

2053

5

/vendor/driver/v1/_search

FSM_CREATOR_EMP,FSM_DSO,FSM_ADMIN,FSM_EDITOR_EMP,FSM_VIEW_EMP,FSM_EMP_FSTPO

2356