FSTP Inbox changes:
Search by Application Number: We have added search by application number field where FSTPO can search the vehicle trip detail by application Number.
Application No & Status column: New Application No column and Status Column is added in the Inbox Table so that FSTPO can see the application number and status of the trip.
...
Technical Implementation Details:
Below are the code snippets to add Application search field inside search fields object:
Code Block |
---|
{
label: t("ES_SEARCH_APPLICATION_APPLICATION_NO"),
name: "refernceNos",
}, |
Below are the code snippets to fetch the application number:
Code Block |
---|
const { isLoading: applicationLoading, isError, data: applicationData, error } = Digit.Hooks.fsm.useSearch(
tenantId,
{ applicationNos: searchParams?.refernceNos, uuid: userInfo.uuid },
{ staleTime: Infinity }
); |
Trip No in FSTPO Details:
...
We have added the Trip No. field in fstp-operator-details page so that FSTPO can know the ongoing trip of the application number.
Technical Implementation Details:
Below are the code snippet to check the current Trip:
Code Block |
---|
useEffect(() => {
filterVehicle?.length == 0 ? setCurrentTrip(1) : setCurrentTrip((tripNo - filterVehicle?.length) + 1)
}, [tripNo, filterVehicle, totalvehicle, totalsuccess, isSuccess]);
|
Below are the code snippet to render the trip no field
Code Block |
---|
{!isSearchLoading && !isIdle && tripDetails && currentTrip ? <Row key={t("ES_VEHICLE_TRIP_NO")} label={`${t("ES_VEHICLE_TRIP_NO")} * `} text={ <div> <Dropdown disable selected={{ "name": `${currentTrip} of ${tripDetails[0]?.noOfTrips}` }} t={t} optionKey="name" style={{ maxWidth: '200px' }} /> </div> } > </Row> : null} |