Receipt Search and Cancellation

Receipt Search and Cancellation

Search Receipt

Objective

Provide Employee to search Receipt , download receipt ,check its current status and cancel selected receipt.

Route - https://egov-micro-qa.egovernments.org/employee/receipts/search

Technical Implementation Details

 

  • Initial page.
    https://github.com/egovernments/frontend/blob/master/web/rainmaker/dev-packages/egov-abg-dev/src/ui-config/screens/specs/receipts/search.js

  • Initial MDMS call is being made on page load.

    const getMDMSData = async (action, state, dispatch) => { let mdmsBody = { MdmsCriteria: { tenantId: tenantId, moduleDetails: [ { moduleName: "BillingService", masterDetails: [ { name: "BusinessService", filter: "[?(@.type=='Adhoc')]" } ] }, { moduleName: "common-masters", masterDetails: [ { name: "uiCommonPay" } ] }, ] } };

only for the enabled service we can search and cancel the receipt .it can be configured in uiCommonPay config by setting true to cancelReceipt

arrears: true billKey: "property-bill" cancelReceipt: true code: "PT" headerBandLabel: "PT_COMMON_TABLE_COL_PT_ID" receiptKey: "property-receipt"

Table Structure

  • MUIDataTable is used to implement Table component.

  • Every columns are entry given as an Object

  • Any customizations at column level is by customBodyRender hook available in all the colums ‘option’ property.

 

{ labelName: "Receipt No.", labelKey: "CR_COMMON_TABLE_COL_RECEIPT_NO", options: { filter: false, customBodyRender: (value, tableMeta, updateValue) => ( <div onClick={value => { download(receiptQueryString , "download" ,tableMeta.rowData[7]) ; }} style={{color:'#2196F3'}}> {value} </div> ) } },

Search Results

Data fetch,load and render :

Once the data is fetched using collection-services/payments/{selectedbusinessService}/_search API, the returned data is formatted and dispatched to redux

https://github.com/egovernments/frontend/blob/master/web/rainmaker/dev-packages/egov-abg-dev/src/ui-config/screens/specs/receipts/universalCollectionResources/function.js

Cancel Receipt

On search Results we can click on cancel receipt to cancel any receipt , it is explained in the following documentation

Cancel Receipt

ROLE ACTION MAPPING

S.NO

API

ROLES

ACTION ID

API

ROLES

ACTION ID

1

egov-mdms-service/v1/_search

SUPERUSER , LOA_CREATOR , WO_CREATOR , AE_CREATOR , WORKS_MASTER_CREATOR

954

2

collection-services/payments/PT/_search

PTCEMP, CITIZEN

2029