Objective: To provide users with the ability to search for bills.
Workflow Details
Employee Screens
Employee Search Bill Inbox
This page lists all the created search bills in reverse-chronological order with the latest created bill being at the top and the first created one at the end. This table supports pagination and employees specify the size of the list on each page.
Inbox has a search feature which helps employees quickly find search bills based on the selected bill no , consumer code and mobile no fields.
Inbox also has a filter option where employees can filter search bills based on the service categories & ULB .
Citizen Screens
Citizen Bill Genie Card
Citizen Search Bill Inbox
This page lists all the created search bills in reverse-chronological order with the latest created bill being at the top and the first created one at the end. This table supports pagination and the size of the list on each page.
Inbox has a search feature which helps citizens quickly find search bills based on the selected bill no , consumer code and mobile no fields.
Inbox also has a filter option where citizens can filter search bills based on the service categories & ULB .
API Used
Copy billgenie: "/egov-searcher",
Service category curl for searching the bill
Copy curl โhttps://qa.digit.org/egov-searcher/bill-genie/mcollectbills/_get?_=1654070581498โ
-H โauthority: qa.digit.orgโ
-H โaccept: application/json, text/plain, /โ
-H โaccept-language: en-GB,en;q=0.9โ
-H โcontent-type: application/json;charset=UTF-8โ
-H โorigin: https://qa.digit.orgโ
-H โreferer: https://qa.digit.org/digit-ui/employee/bills/inboxโ
-H โsec-ch-ua: โ Not A;Brandโ;v=โ99โ, โChromiumโ;v=โ102โ, โGoogle Chromeโ;v=โ102โโ
-H โsec-ch-ua-mobile: ?0โ
-H โsec-ch-ua-platform: โmacOSโโ
-H โsec-fetch-dest: emptyโ
-H โsec-fetch-mode: corsโ
-H โsec-fetch-site: same-originโ
-H โuser-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.61 Safari/537.36โ
--data-raw โ{โsearchCriteriaโ:{โtenantIdโ:โpb.amritsarโ,โnameโ:โBILLINGSERVICE_BUSINESSSERVICE_ADVT_LIGHT_WALA_BOARDโ,โurlโ:โ/bill-genie/mcollectbills/_getโ,โbusinesServiceโ:โADVT.Light_Wala_Boardโ,โlimitโ:10,โoffsetโ:0,โsortByโ:โapplicationDateโ,โsortOrderโ:โASCโ,โsortParamsโ:[{โidโ:โapplicationDateโ,โdescโ:false}]},โRequestInfoโ:{โapiIdโ:โRainmakerโ,โauthTokenโ:โ5e0a93dd-4a41-4b05-894c-c6237146668fโ,โmsgIdโ:โ1654070581498|en_INโ}}'
--compressed
Group Bills Inbox
This page lists all the created group bills in reverse-chronological order with the latest created group bills being at the top and the first created one at the end. This table supports pagination and the size of the list on each page.
Inbox has a search feature which helps employees quickly find search bills based on consumer id fields.
Inbox also has a filter option where employees can filter search bills based on the service categories , ULB & locality.
API Used
Copy billgenie: "/egov-searcher",
Filter curl for searching group bills:
Copy curl โhttps://qa.digit.org/egov-searcher/bill-genie/mcollectbills/_get?_=1654076169191โ \
-H โauthority: qa.digit.orgโ \
-H โaccept: application/json, text/plain, */*โ \
-H โaccept-language: en-GB,en;q=0.9โ \
-H โcontent-type: application/json;charset=UTF-8โ \
-H โorigin: https://qa.digit.orgโ \
-H โreferer: https://qa.digit.org/digit-ui/employee/bills/group-billโ \
-H โsec-ch-ua: โ Not A;Brandโ;v=โ99โ, โChromiumโ;v=โ102โ, โGoogle Chromeโ;v=โ102โโ \
-H โsec-ch-ua-mobile: ?0โ \
-H โsec-ch-ua-platform: โmacOSโโ \
-H โsec-fetch-dest: emptyโ \
-H โsec-fetch-mode: corsโ \
-H โsec-fetch-site: same-originโ \
-H โuser-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.61 Safari/537.36โ \
--data-raw โ{โsearchCriteriaโ:{โtenantIdโ:โpb.amritsarโ,โnameโ:โBILLINGSERVICE_BUSINESSSERVICE_ADVT_LIGHT_WALA_BOARDโ,โurlโ:โ/bill-genie/mcollectbills/_getโ,โbusinesServiceโ:โADVT.Light_Wala_Boardโ,โlocalityโ:[โSUN20โ],โlimitโ:10,โoffsetโ:0,โsortByโ:โapplicationDateโ,โsortOrderโ:โASCโ,โsortParamsโ:[{โidโ:โapplicationDateโ,โdescโ:false}],โbillActiveโ:โACTIVEโ},โRequestInfoโ:{โapiIdโ:โRainmakerโ,โauthTokenโ:โ5e0a93dd-4a41-4b05-894c-c6237146668fโ,โmsgIdโ:โ1654076169191|en_INโ}}' \
--compressed
Technical Implementation Details
The routing details for the Bill Genie module for employees are defined here.
https://github.com/egovernments/DIGIT-Dev/blob/38ad276f253f917c744787d74d5719a7f09efa88/frontend/micro-ui/web/micro-ui-internals/packages/modules/bills/src/pages/employee/index.js
For calling the search bill API we have used a custom hook for code reuse. Below is a little snapshot of that:
Copy const { isFetching, isLoading: hookLoading, searchResponseKey, data, searchFields, ...rest } = Digit.Hooks.useBillSearch({
tenantId,
filters: { ...searchParams, businessService, ...paginationParams, sortParams },
config: {},
});
Implementation details of the customs service:
Copy import Urls from "../atoms/urls";
import { Request } from "../atoms/Utils/Request";
const BillingService = {
search_bill: ({ tenantId, filters }) =>
Request({
url: `${Urls.billgenie}${filters.url}`,
useCache: false,
method: "POST",
data: {
searchCriteria: {
tenantId: tenantId,
...filters,
},
},
auth: true,
userService: false,
}),
};
export default BillingService;
Implementation details of the hook:
Copy import { useQuery, useQueryClient } from "react-query";
import BillingService from "../../services/elements/Bill";
const useBillSearch = ({ filters }) => {
const client = useQueryClient();
const tenantId = Digit.SessionStorage.get("User")?.info?.tenantId;
filters.locality = filters.locality?.map((element) => {
return element.code;
});
filters.url = filters.url?.replace("egov-searcher", "");
const args = tenantId ? { tenantId, filters } : { filters };
const { isLoading, error, data } = useQuery(["BILL_INBOX", tenantId, filters], async () => await BillingService.search_bill(args), {
enabled: filters?.businesService ? true : false,
});
return { isLoading, error, data, revalidate: () => client.invalidateQueries(["BILL_INBOX", tenantId, filters]) };
};
export default useBillSearch;
All the hooks used in every module are defined here:
MDMS Configuration
To enable the Bills Genie here is the snippet code.
Copy {
"module": "Bills",
"code": "Bills",
"active": true,
"order": 3,
"tenants": [
{
"code": "pb.jalandhar"
},
{
"code": "pb.phagwara"
},
{
"code": "pb.amritsar"
}
]
}
Localisation Details
Localisation keys are added under the rainmaker-abg
locale module. Below is an example of a few locale labels.
Copy {
"code": "ABG_ADVERTISEMENT_TAX_INFO",
"message": "Advertisement Tax",
"module": "rainmaker-abg",
"locale": "en_IN"
},
{
"code": "ABG_ADVERTISEMENT_TAX_LABEL",
"message": "Advertisement Tax",
"module": "rainmaker-abg",
"locale": "en_IN"
},