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 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"All the Forms and its functionality are in https://github.com/egovernments/frontend/tree/master/web/rainmaker/dev-packages/egov-abg-dev/src/ui-config/screens/specs/receipts/universalCollectionResources path.
Table rendering is taken care in https://github.com/egovernments/frontend/blob/master/web/rainmaker/dev-packages/egov-abg-dev/src/ui-config/screens/specs/receipts/universalCollectionResources/searchResults.js
The Bill search API and formatting data is in done in https://github.com/egovernments/frontend/blob/master/web/rainmaker/dev-packages/egov-abg-dev/src/ui-config/screens/specs/receipts/universalCollectionResources/function.js
Table Structure
MUIDataTableis used to implement Table component.Every columns are entry given as an Object
Any customizations at column level is by
customBodyRenderhook 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
Cancel Receipt
On search Results we can click on cancel receipt to cancel any receipt , it is explained in the following documentation
ROLE ACTION MAPPING
API | ROLES | ACTION ID | |
|---|---|---|---|
1 |
|
|
|
2 |
|
|
|