fm — Public API surface
Types & interfaces
interface AssetRegisterFilters
- file: src/cores/fm/hooks/useAssetReportData.ts:25
- kind: interface
- core: fm
- spec: FM-05
- summary: Filter criteria for the asset register report (site, category, status, andacquisition-date window).
- score: 5
interface AssetRegisterRow
- file: src/cores/fm/hooks/useAssetReportData.ts:78
- kind: interface
- core: fm
- spec: FM-05
- summary: One row of the asset register report: identity, location, status, andbook-value fields for a single asset.
- see:
- AssetRegisterFilters
- score: 5
interface DepreciationReportFilters
- file: src/cores/fm/hooks/useAssetReportData.ts:43
- kind: interface
- core: fm
- spec: FM-05
- summary: Filter criteria for the depreciation report, narrowing by date window,asset category, and depreciation method.
- score: 5
interface DepreciationReportRow
- file: src/cores/fm/hooks/useAssetReportData.ts:103
- kind: interface
- core: fm
- spec: FM-05
- summary: One row of the depreciation report: purchase basis, salvage value, method,and computed monthly / YTD / lifetime depreciation for an asset.
- see:
- DepreciationReportFilters
- score: 5
interface FleetDriverDetail
- file: src/cores/fm/hooks/useFleetDriverDetail.ts:18
- kind: interface
- core: fm
- spec: FM-13
- summary: A fleet driver record enriched with their linked user profile, currentlyassigned vehicles, and recent trip history.
- see:
- FleetDriver
- score: 5
interface FleetFuelLogListFilters
- file: src/cores/fm/hooks/useFleetFuelLogs.ts:22
- kind: interface
- core: fm
- spec: FM-13
- summary: Filter criteria for fuel-log queries: by vehicle, driver, fuel type, anddate window.
- score: 5
interface FleetMaintenanceListFilters
- file: src/cores/fm/hooks/useFleetMaintenance.ts:22
- kind: interface
- core: fm
- spec: FM-13
- summary: Filter criteria for fleet maintenance-schedule queries: by vehicle, activestate, trigger type, and overdue flag.
- score: 5
interface FleetMaintenanceWithVehicle
- file: src/cores/fm/hooks/useFleetMaintenance.ts:36
- kind: interface
- core: fm
- spec: FM-13
- summary: A fleet maintenance schedule joined with its vehicle reference and acomputed flag.
- see:
- FleetMaintenanceSchedule
- score: 5
interface FMDashboardStats
- file: src/cores/fm/hooks/useFMDashboardStats.ts:20
- kind: interface
- core: fm
- spec: none
- summary: Top-line counts for the FM module overview dashboard, spanning work orders,assets, inventory, and vendors.
- score: 5
type FMModuleSettings
- file: src/cores/fm/hooks/useFMModuleSettings.ts:16
- kind: type
- core: fm
- spec: none
- summary: Per-organization FM module configuration row (e.g. alert windows and moduletoggles), aliased from the generated table Row type.
- see:
- Database
- score: 5
interface MaintenanceCostByMonth
- file: src/cores/fm/hooks/useAssetReportData.ts:146
- kind: interface
- core: fm
- spec: FM-05
- summary: Maintenance cost aggregated into a single month bucket, for trend charts.
- score: 5
interface MaintenanceCostFilters
- file: src/cores/fm/hooks/useAssetReportData.ts:60
- kind: interface
- core: fm
- spec: FM-05
- summary: Filter criteria for the maintenance-cost report, narrowing by date window,asset category, and site.
- score: 5
interface MaintenanceCostRow
- file: src/cores/fm/hooks/useAssetReportData.ts:125
- kind: interface
- core: fm
- spec: FM-05
- summary: One row of the maintenance-cost report: per-asset work-order count, totaland average spend, and most recent maintenance date.
- see:
- MaintenanceCostFilters
- score: 5
interface MaintenanceScheduleFormValues
- file: src/cores/fm/hooks/useFleetMaintenanceMutations.ts:35
- kind: interface
- core: fm
- spec: FM-13
- summary: Form payload for creating or updating a fleet maintenance schedule, coveringthe vehicle, trigger type, mileage/time intervals, and next-due targets.
- score: 5
interface PMTemplateListItem
- file: src/cores/fm/hooks/usePMTemplateList.ts:19
- kind: interface
- core: fm
- spec: FM-04
- summary: A PM template list row augmented with rollup counts of its checklist items,required materials, and schedules that reference it.
- see:
- PMTemplate
- score: 5
interface RecordMileageInput
- file: src/cores/fm/hooks/useFleetMileageMutations.ts:24
- kind: interface
- core: fm
- spec: FM-13
- summary: Payload for recording a new odometer reading against a vehicle, optionallytied to a trip.
- score: 5
interface TrendDataPoint
- file: src/cores/fm/hooks/useFleetTrendData.ts:39
- kind: interface
- core: fm
- spec: FM-13
- summary: A single time bucket (month) of aggregated fleet metrics for trend charts.
- score: 5
type TrendPeriod
- file: src/cores/fm/hooks/useFleetTrendData.ts:20
- kind: type
- core: fm
- spec: FM-13
- summary: Supported lookback windows for fleet trend charts.
- score: 5
interface TrendSummary
- file: src/cores/fm/hooks/useFleetTrendData.ts:55
- kind: interface
- core: fm
- spec: FM-13
- summary: Roll-up totals across the entire trend window, shown above the chart.
- see:
- TrendDataPoint
- score: 5
interface UseAssetDetailOptions
- file: src/cores/fm/hooks/useAssetDetail.ts:29
- kind: interface
- core: fm
- spec: FM-05
- summary: Options controlling the query.
- score: 5
interface UseAssetDetailResult
- file: src/cores/fm/hooks/useAssetDetail.ts:43
- kind: interface
- core: fm
- spec: FM-05
- summary: Result of : the resolved asset (with maintenance,depreciation, and location relations) plus query status flags.
- score: 5
interface UseAssetListOptions
- file: src/cores/fm/hooks/useAssetList.ts:25
- kind: interface
- core: fm
- spec: FM-05
- summary: Filtering and pagination inputs for .
- score: 5
interface UseAssetListResult
- file: src/cores/fm/hooks/useAssetList.ts:42
- kind: interface
- core: fm
- spec: FM-05
- summary: Result of : the current page of assets, the totalmatching count for pagination, and query status flags.
- score: 5
interface UseAssetStatsOptions
- file: src/cores/fm/hooks/useAssetStats.ts:21
- kind: interface
- core: fm
- spec: FM-05
- summary: Options controlling the dashboard query.
- score: 5
interface UseAssetStatsResult
- file: src/cores/fm/hooks/useAssetStats.ts:35
- kind: interface
- core: fm
- spec: FM-05
- summary: Result of : aggregated asset dashboard statistics(counts by category and status, totals) plus query status flags.
- score: 5
interface UseFleetAnalyticsOptions
- file: src/cores/fm/hooks/useFleetAnalytics.ts:22
- kind: interface
- core: fm
- spec: FM-13
- summary: Options controlling the dashboard query.
- score: 5
interface UseFleetDriverDetailOptions
- file: src/cores/fm/hooks/useFleetDriverDetail.ts:37
- kind: interface
- core: fm
- spec: FM-13
- summary: Inputs for : the driver and organization to load,plus an optional enable flag.
- score: 5
interface UseFleetDriversOptions
- file: src/cores/fm/hooks/useFleetDrivers.ts:30
- kind: interface
- core: fm
- spec: FM-13
- summary: Filtering and pagination inputs for .
- score: 5
interface UseFleetDriversResult
- file: src/cores/fm/hooks/useFleetDrivers.ts:47
- kind: interface
- core: fm
- spec: FM-13
- summary: Result of : the current page of drivers (each withprofile and assigned-vehicle count), total count, and query status flags.
- score: 5
interface UseFleetFuelLogsOptions
- file: src/cores/fm/hooks/useFleetFuelLogs.ts:39
- kind: interface
- core: fm
- spec: FM-13
- summary: Filtering and pagination inputs for .
- score: 5
interface UseFleetFuelLogsResult
- file: src/cores/fm/hooks/useFleetFuelLogs.ts:56
- kind: interface
- core: fm
- spec: FM-13
- summary: Result of : the current page of fuel logs plusaggregated totals (cost, gallons, average MPG) and query status flags.
- score: 5
interface UseFleetMaintenanceOptions
- file: src/cores/fm/hooks/useFleetMaintenance.ts:50
- kind: interface
- core: fm
- spec: FM-13
- summary: Filtering and pagination inputs for .
- score: 5
interface UseFleetMaintenanceResult
- file: src/cores/fm/hooks/useFleetMaintenance.ts:67
- kind: interface
- core: fm
- spec: FM-13
- summary: Result of : the current page of maintenanceschedules, total and overdue counts, and query status flags.
- score: 5
interface UseFleetMileageOptions
- file: src/cores/fm/hooks/useFleetMileage.ts:22
- kind: interface
- core: fm
- spec: FM-13
- summary: Inputs for : the target vehicle plus optionaldate-range and pagination controls.
- score: 5
interface UseFleetMileageResult
- file: src/cores/fm/hooks/useFleetMileage.ts:41
- kind: interface
- core: fm
- spec: FM-13
- summary: Result of : the current page of odometer/mileage logs,total count, and query status flags.
- score: 5
interface UseFleetReservationsOptions
- file: src/cores/fm/hooks/useFleetReservations.ts:20
- kind: interface
- core: fm
- spec: FM-13-P2
- summary: Filtering inputs for .
- score: 1
interface UseFleetTrendDataOptions
- file: src/cores/fm/hooks/useFleetTrendData.ts:74
- kind: interface
- core: fm
- spec: FM-13
- summary: Inputs for : the lookback window and optionalsingle-vehicle scope.
- score: 5
interface UseFleetTrendDataResult
- file: src/cores/fm/hooks/useFleetTrendData.ts:90
- kind: interface
- core: fm
- spec: FM-13
- summary: Result of : per-bucket trend points, a window-level, and query status flags.
- score: 5
interface UseFleetTripsOptions
- file: src/cores/fm/hooks/useFleetTrips.ts:21
- kind: interface
- core: fm
- spec: FM-13
- summary: Filtering and pagination inputs for .
- score: 5
interface UseFleetTripsResult
- file: src/cores/fm/hooks/useFleetTrips.ts:38
- kind: interface
- core: fm
- spec: FM-13
- summary: Result of : the current page of trips (each enrichedwith vehicle and driver details), total count, and query status flags.
- score: 5
interface UseFleetVehicleDetailOptions
- file: src/cores/fm/hooks/useFleetVehicleDetail.ts:21
- kind: interface
- core: fm
- spec: FM-13
- summary: Inputs for : the vehicle and organization toload, plus an optional enable flag.
- score: 5
interface UseFleetVehiclesOptions
- file: src/cores/fm/hooks/useFleetVehicles.ts:21
- kind: interface
- core: fm
- spec: FM-13
- summary: Filtering and pagination inputs for .
- score: 5
interface UseFleetVehiclesResult
- file: src/cores/fm/hooks/useFleetVehicles.ts:38
- kind: interface
- core: fm
- spec: FM-13
- summary: Result of : the current page of vehicles (eachenriched with site and driver data), total count, and query status flags.
- score: 5
interface UseInventoryDetailOptions
- file: src/cores/fm/hooks/useInventoryDetail.ts:20
- kind: interface
- core: fm
- spec: FM-02
- summary: Options controlling the query.
- score: 5
interface UseInventoryDetailResult
- file: src/cores/fm/hooks/useInventoryDetail.ts:34
- kind: interface
- core: fm
- spec: FM-02
- summary: Result of : the resolved inventory item (withtransactions and per-location quantities) plus query status flags.
- score: 5
interface UseInventoryListOptions
- file: src/cores/fm/hooks/useInventoryList.ts:21
- kind: interface
- core: fm
- spec: FM-02
- summary: Filtering and pagination inputs for .
- score: 5
interface UseInventoryListResult
- file: src/cores/fm/hooks/useInventoryList.ts:38
- kind: interface
- core: fm
- spec: FM-02
- summary: Result of : the current page of inventory items,total matching count, and query status flags.
- score: 5
interface UseInventoryLocationListOptions
- file: src/cores/fm/hooks/useInventoryLocationList.ts:21
- kind: interface
- core: fm
- spec: FM-02
- summary: Filtering and pagination inputs for .
- score: 5
interface UseInventoryLocationListResult
- file: src/cores/fm/hooks/useInventoryLocationList.ts:38
- kind: interface
- core: fm
- spec: FM-02
- summary: Result of : the current page of inventorylocations (each joined with its site), total count, and query status flags.
- score: 5
interface UseInventoryStatsOptions
- file: src/cores/fm/hooks/useInventoryStats.ts:21
- kind: interface
- core: fm
- spec: FM-02
- summary: Options controlling the dashboard query.
- score: 5
interface UseInventoryStatsResult
- file: src/cores/fm/hooks/useInventoryStats.ts:36
- kind: interface
- core: fm
- spec: FM-02
- summary: Result of : aggregated inventory dashboardstatistics (stock value, low-stock and out-of-stock counts) plus querystatus flags.
- score: 5
interface UsePMComplianceStatsOptions
- file: src/cores/fm/hooks/usePMComplianceStats.ts:21
- kind: interface
- core: fm
- spec: FM-04
- summary: Options controlling the query.
- score: 5
interface UsePMComplianceStatsResult
- file: src/cores/fm/hooks/usePMComplianceStats.ts:36
- kind: interface
- core: fm
- spec: FM-04
- summary: Result of : aggregate preventive-maintenancecompliance metrics (on-time vs overdue completion rates) plus query statusflags.
- score: 5
interface UsePMDashboardStatsOptions
- file: src/cores/fm/hooks/usePMDashboardStats.ts:21
- kind: interface
- core: fm
- spec: FM-04
- summary: Options controlling the query.
- score: 5
interface UsePMDashboardStatsResult
- file: src/cores/fm/hooks/usePMDashboardStats.ts:35
- kind: interface
- core: fm
- spec: FM-04
- summary: Result of : quick PM counts for dashboard widgets(due, overdue, upcoming schedules) plus query status flags.
- score: 5
interface UsePMScheduleDetailOptions
- file: src/cores/fm/hooks/usePMScheduleDetail.ts:22
- kind: interface
- core: fm
- spec: FM-04
- summary: Inputs for : the schedule to load plus an optionalenable flag.
- score: 5
interface UsePMScheduleDetailResult
- file: src/cores/fm/hooks/usePMScheduleDetail.ts:37
- kind: interface
- core: fm
- spec: FM-04
- summary: Result of : the PM schedule with its template andgenerated work orders, its completion history, and query status flags.
- score: 5
interface UsePMScheduleListOptions
- file: src/cores/fm/hooks/usePMScheduleList.ts:21
- kind: interface
- core: fm
- spec: FM-04
- summary: Filtering and pagination inputs for .
- score: 5
interface UsePMScheduleListResult
- file: src/cores/fm/hooks/usePMScheduleList.ts:38
- kind: interface
- core: fm
- spec: FM-04
- summary: Result of : the current page of PM schedules (withoverdue tracking), total count, and query status flags.
- score: 5
interface UsePMTemplateDetailOptions
- file: src/cores/fm/hooks/usePMTemplateDetail.ts:22
- kind: interface
- core: fm
- spec: FM-04
- summary: Inputs for : the template to load plus an optionalenable flag.
- score: 5
interface UsePMTemplateDetailResult
- file: src/cores/fm/hooks/usePMTemplateDetail.ts:37
- kind: interface
- core: fm
- spec: FM-04
- summary: Result of : the PM template with its checklistitems and material lines, plus query status flags.
- score: 5
interface UsePMTemplateListOptions
- file: src/cores/fm/hooks/usePMTemplateList.ts:34
- kind: interface
- core: fm
- spec: FM-04
- summary: Filtering and pagination inputs for .
- score: 5
interface UsePMTemplateListResult
- file: src/cores/fm/hooks/usePMTemplateList.ts:51
- kind: interface
- core: fm
- spec: FM-04
- summary: Result of : the current page of PM templates (withrollup counts), total count, and query status flags.
- score: 5
interface UseVendorCertificationListOptions
- file: src/cores/fm/hooks/useVendorCertificationList.ts:23
- kind: interface
- core: fm
- spec: FM-03
- summary: Filtering inputs for (by vendor andexpiration window).
- score: 5
interface UseVendorCertificationListResult
- file: src/cores/fm/hooks/useVendorCertificationList.ts:38
- kind: interface
- core: fm
- spec: FM-03
- summary: Result of : vendor certifications withderived expiration status, total count, and query status flags.
- score: 5
interface UseVendorDetailOptions
- file: src/cores/fm/hooks/useVendorDetail.ts:27
- kind: interface
- core: fm
- spec: FM-03
- summary: Inputs for : the vendor to load plus an optionalenable flag.
- score: 5
interface UseVendorDetailResult
- file: src/cores/fm/hooks/useVendorDetail.ts:42
- kind: interface
- core: fm
- spec: FM-03
- summary: Result of : the vendor with its certifications,served sites, and work-order history, plus query status flags.
- score: 5
interface UseVendorListOptions
- file: src/cores/fm/hooks/useVendorList.ts:21
- kind: interface
- core: fm
- spec: FM-03
- summary: Filtering and pagination inputs for .
- score: 5
interface UseVendorListResult
- file: src/cores/fm/hooks/useVendorList.ts:38
- kind: interface
- core: fm
- spec: FM-03
- summary: Result of : the current page of vendors, total matchingcount, and query status flags.
- score: 5
interface UseVendorStatsOptions
- file: src/cores/fm/hooks/useVendorStats.ts:21
- kind: interface
- core: fm
- spec: FM-03
- summary: Options controlling the dashboard query.
- score: 5
interface UseVendorStatsResult
- file: src/cores/fm/hooks/useVendorStats.ts:35
- kind: interface
- core: fm
- spec: FM-03
- summary: Result of : aggregated vendor dashboard statistics(active vendors, expiring certifications) plus query status flags.
- score: 5
interface UseWorkOrderDetailOptions
- file: src/cores/fm/hooks/useWorkOrderDetail.ts:26
- kind: interface
- core: fm
- spec: FM-01
- summary: Options controlling the query.
- score: 5
interface UseWorkOrderDetailResult
- file: src/cores/fm/hooks/useWorkOrderDetail.ts:40
- kind: interface
- core: fm
- spec: FM-01
- summary: Result of : the resolved work order with site,assignee, and history relations, plus query status flags.
- score: 5
interface UseWorkOrderHistoryOptions
- file: src/cores/fm/hooks/useWorkOrderHistory.ts:20
- kind: interface
- core: fm
- spec: FM-01
- summary: Options controlling the query.
- score: 5
interface UseWorkOrderHistoryResult
- file: src/cores/fm/hooks/useWorkOrderHistory.ts:34
- kind: interface
- core: fm
- spec: FM-01
- summary: Result of : the ordered audit-trail entries for awork order (each with the acting profile) plus query status flags.
- score: 5
interface UseWorkOrderListOptions
- file: src/cores/fm/hooks/useWorkOrderList.ts:21
- kind: interface
- core: fm
- spec: FM-01
- summary: Filtering and pagination inputs for .
- score: 5
interface UseWorkOrderListResult
- file: src/cores/fm/hooks/useWorkOrderList.ts:38
- kind: interface
- core: fm
- spec: FM-01
- summary: Result of : the current page of work orders, totalmatching count, and query status flags.
- score: 5
interface UseWorkOrderStatsOptions
- file: src/cores/fm/hooks/useWorkOrderStats.ts:26
- kind: interface
- core: fm
- spec: FM-01
- summary: Options controlling the dashboard query.
- score: 5
interface UseWorkOrderStatsResult
- file: src/cores/fm/hooks/useWorkOrderStats.ts:41
- kind: interface
- core: fm
- spec: FM-01
- summary: Result of : aggregated work-order dashboardstatistics (counts by status, priority, and category) plus query statusflags.
- score: 5
interface ValidationResult
- file: src/cores/fm/utils/inventoryValidation.ts:25
- kind: interface
- core: fm
- spec: FM-02
- summary: Outcome of a client-side inventory transaction validation: a flagwith an optional human-readable message when invalid.
- score: 5
interface VehicleComparisonData
- file: src/cores/fm/components/analytics/FleetVehicleComparisonTable.tsx:42
- kind: interface
- core: fm
- spec: FM-13
- summary: One vehicle’s aggregated performance row in the fleet comparison table.Each row pre-computes utilization and efficiency metrics (total miles, fuelcost, average MPG, cost per mile, trip count) so the table can sort and rankvehicles without re-querying.
- score: 5
interface VendorAssignmentValidation
- file: src/cores/fm/utils/vendorValidation.ts:144
- kind: interface
- core: fm
- spec: FM-03
- summary: Result of checking whether a vendor may be assigned to a work order: plus the list of blocking when it cannot.
- score: 5
interface VendorValidationResult
- file: src/cores/fm/utils/vendorValidation.ts:225
- kind: interface
- core: fm
- spec: FM-03
- summary: Result of validating a vendor form submission: plus a map offield name to error message for any fields that failed validation.
- score: 5
interface WarrantyAlert
- file: src/cores/fm/hooks/useAssetWarrantyAlerts.ts:29
- kind: interface
- core: fm
- spec: FM-05
- summary: A single expiring asset warranty or service contract, with urgency derivedfrom the number of days remaining until expiration.
- score: 5
interface WarrantyAlertsSummary
- file: src/cores/fm/hooks/useAssetWarrantyAlerts.ts:47
- kind: interface
- core: fm
- spec: FM-05
- summary: Expiring warranties and service contracts bucketed by urgency, with a totalcount for badge display.
- see:
- WarrantyAlert
- score: 5
interface WorkOrderValidationResult
- file: src/cores/fm/utils/workOrderValidation.ts:131
- kind: interface
- core: fm
- spec: (none)
- summary: Validate work order form data.
- score: 2
Hooks
hook useAssetDepreciationHistory
- file: src/cores/fm/hooks/useAssetDepreciationHistory.ts:19
- kind: hook
- core: fm
- spec: (none)
- summary: Hook for managing asset depreciation history.
- score: 1
hook useAssetDetail
- file: src/cores/fm/hooks/useAssetDetail.ts:63
- kind: hook
- core: fm
- spec: FM-05
- summary: Fetch a single asset by id with its maintenance history, depreciationrecords, and location history, exposed as a .The query stays disabled until an is supplied; pass to gate it further.
- params:
- assetId — Asset id to load; when undefined the query does not run.
- options — Query options (see ).
- returns: The asset and query status (see ).
- score: 5
hook useAssetList
- file: src/cores/fm/hooks/useAssetList.ts:59
- kind: hook
- core: fm
- spec: FM-05
- summary: Fetch a paginated, filterable list of assets scoped to the currentorganization, returning the page rows and total count.
- params:
- options — Filters and pagination (see ).
- returns: The asset page and query status (see ).
- score: 5
hook useAssetMaintenanceHistory
- file: src/cores/fm/hooks/useAssetMaintenanceHistory.ts:19
- kind: hook
- core: fm
- spec: (none)
- summary: Hook for managing asset maintenance history.
- score: 1
hook useAssetMutations
- file: src/cores/fm/hooks/useAssetMutations.ts:24
- kind: hook
- core: fm
- spec: (none)
- summary: Hook for managing asset mutations.
- score: 1
hook useAssetRegisterData
- file: src/cores/fm/hooks/useAssetReportData.ts:165
- kind: hook
- core: fm
- spec: FM-05
- summary: Fetch the asset register report rows for an organization, applying the givenfilters server-side.
- params:
- organizationId — Tenant to scope the report to; query is disabled when undefined.
- filters — Register filter criteria (see ).
- returns: A React Query result resolving to an array of .
- score: 5
hook useAssetStats
- file: src/cores/fm/hooks/useAssetStats.ts:51
- kind: hook
- core: fm
- spec: FM-05
- summary: Compute organization-scoped asset dashboard statistics (counts by categoryand status, book-value totals) for summary widgets.
- params:
- options — Query options (see ).
- returns: The stats and query status (see ).
- score: 5
hook useAssetWarrantyAlerts
- file: src/cores/fm/hooks/useAssetWarrantyAlerts.ts:62
- kind: hook
- core: fm
- spec: FM-05
- summary: Query assets whose warranty or service contract expires within the next 90days, returning them bucketed by urgency as a .
- params:
- organizationId — Tenant to scope the query to; disabled when undefined.
- returns: A React Query result resolving to a .
- score: 5
hook useCalculateBulkDepreciation
- file: src/cores/fm/hooks/useCalculateDepreciation.ts:89
- kind: hook
- core: fm
- spec: (none)
- summary: Hook to calculate depreciation for all eligible assets in an organization
- score: 4
hook useCalculateDepreciation
- file: src/cores/fm/hooks/useCalculateDepreciation.ts:45
- kind: hook
- core: fm
- spec: (none)
- summary: Hook to calculate depreciation for a single asset
- score: 4
hook useDepreciationReportData
- file: src/cores/fm/hooks/useAssetReportData.ts:249
- kind: hook
- core: fm
- spec: FM-05
- summary: Fetch the depreciation report rows for an organization, applying the givenfilters server-side.
- params:
- organizationId — Tenant to scope the report to; query is disabled when undefined.
- filters — Depreciation filter criteria (see ).
- returns: A React Query result resolving to an array of .
- score: 5
hook useFleetAnalytics
- file: src/cores/fm/hooks/useFleetAnalytics.ts:39
- kind: hook
- core: fm
- spec: (none)
- summary: Fetch aggregated fleet dashboard metrics for the current organization. Retrieves vehicles, drivers, mileage, and fuel data from Supabase and computes aggregated metrics: total and active vehicle/driver counts, distributions by vehicle status and fuel type, upcoming expirations for registration/insurance/inspection and driver licenses within configured alert windows, current-month total miles and fuel costs, and average MPG.
- params:
- options — Hook options. - enabled: If , disables the query. Defaults to .
- returns: The React Query result containing a object with the aggregated fleet metrics.
- example: | // Basic usage in a React componentconst data, isLoading, error = useFleetAnalytics();// Access metrics: data?.totalVehicles, data?.byStatus, data?.averageMpg, etc.
- score: 4
hook useFleetDriverDetail
- file: src/cores/fm/hooks/useFleetDriverDetail.ts:56
- kind: hook
- core: fm
- spec: (none)
- summary: Load a fleet driver’s aggregated detail (driver record, optional user profile, assigned vehicles, and up to 20 recent trips) as a React Query result. Validates inputs, fetches the driver record scoped to the provided organization (must exist and not be deleted), concurrently loads the driver’s user profile (if present), assigned vehicles, and up to 20 most recent trips, and returns a composed FleetDriverDetail via React Query.
- params:
- options — Options for the hook - driverId: The driver ID to load (required for the query to run) - organizationId: The organization ID to scope the query (required for the query to run) - enabled: Whether the query is enabled; defaults to
- returns: UseQueryResultFleetDriverDetail, unknown - The React Query result containing the composed FleetDriverDetail on success
- example: | const data, isLoading, error = useFleetDriverDetail( driverId: ‘driver-uuid’, organizationId: ‘org-uuid’, enabled: true );
- score: 4
hook useFleetDriverMutations
- file: src/cores/fm/hooks/useFleetDriverMutations.ts:31
- kind: hook
- core: fm
- spec: (none)
- summary: Provides React Query mutations for creating, updating, toggling, and soft-deleting fleet drivers scoped to the current organization. Each mutation handles Supabase persistence, invalidates related queries on success, and shows toast notifications on success or error.
- returns: An object containing React Query mutation objects: - : mutation to insert a new driver. - : mutation to update driver fields by id. - : mutation to update a driver’s license-related fields by id. - : mutation to set a driver’s state by id. - : mutation to soft-delete a driver by id (also unassigns the driver from vehicles).
- example: | // Usage within a componentconst createDriver, updateDriver = useFleetDriverMutations();createDriver.mutate(formValues);
- score: 4
hook useFleetDrivers
- file: src/cores/fm/hooks/useFleetDrivers.ts:84
- kind: hook
- core: fm
- spec: (none)
- summary: Retrieve a paginated, filterable list of fleet drivers for the current organization, enriched with each driver’s user profile and count of assigned vehicles.Executes a Supabase-backed query applying optional filters (is_active, has_cdl, search, license_expiring_within_days), ordering, and pagination; then loads related profiles and assigned-vehicle counts and attaches them to each driver record.
- params:
- options — Configuration for the retrieval. - filters?: FleetDriverListFilters — Optional filters to apply (is_active, has_cdl, search, license_expiring_within_days). - page?: number — 1-based page number (default: 1). - pageSize?: number — Number of items per page (default: 20). - enabled?: boolean — Whether the query should be enabled (default: true).
- returns: UseFleetDriversResult - An object containing: - drivers: The enriched list of fleet drivers. - totalCount: Total number of drivers matching the query. - isLoading: Loading state of the query. - isError: Error state of the query. - error: The error object if present. - refetch: Function to refetch the data.
- example: | const drivers, totalCount, isLoading, refetch = useFleetDrivers( filters: is_active: true, search: ‘smith’ , page: 2, pageSize: 25,);
- score: 4
hook useFleetFuelLogs
- file: src/cores/fm/hooks/useFleetFuelLogs.ts:96
- kind: hook
- core: fm
- spec: (none)
- summary: Returns a paginated, filterable list of fleet fuel logs enriched with related vehicle and driver records and aggregated totals.
- params:
- options — UseFleetFuelLogsOptions object to control the query. Fields: - filters: FleetFuelLogListFilters | undefined — Optional filters (vehicle_id, driver_id, fuel_type, date_from, date_to). - page: number | undefined — 1-based page number (default: 1). - pageSize: number | undefined — Number of items per page (default: 20). - enabled: boolean | undefined — Whether the query should run (default: true).
- returns: UseFleetFuelLogsResult - An object containing: - fuelLogs: Array of fuel logs enriched with and relations. - totalCount: Total number of matching fuel logs (ignoring pagination). - totalCost: Sum of across matching logs. - totalGallons: Sum of across matching logs. - averageMpg: Average of for logs with mpg 0, rounded to one decimal place. - isLoading, isError, error, refetch: React Query state and controls.
- example: | const fuelLogs, totalCount, totalCost, isLoading, refetch = useFleetFuelLogs( filters: vehicle_id: ‘veh_123’, date_from: ‘2025-01-01’ , page: 1, pageSize: 25, enabled: true,);
- score: 4
hook useFleetFuelMutations
- file: src/cores/fm/hooks/useFleetFuelMutations.ts:35
- kind: hook
- core: fm
- spec: (none)
- summary: Provides React Query mutations for creating, updating, and soft-deleting fleet fuel logs. Initializes three mutations that handle inserting a fuel log (including related vehicle odometer updates and mileage log creation when an odometer reading is provided), updating an existing fuel log, and soft-deleting a fuel log. Each mutation invalidates related fleet queries and surfaces success or error toasts.
- returns: An object containing three React Query mutation objects:- — mutation to insert a fuel log; resolves to the inserted fuel log.- — mutation to update a fuel log; resolves to the updated fuel log.- — mutation to soft-delete a fuel log; resolves to an object with .
- example: | const createFuelLog = useFleetFuelMutations();createFuelLog.mutate( vehicle_id: ‘veh_123’, purchase_date: ‘2025-01-01’, gallons: 10, total_cost: 40,);
- score: 4
hook useFleetMaintenance
- file: src/cores/fm/hooks/useFleetMaintenance.ts:138
- kind: hook
- core: fm
- spec: (none)
- summary: Provide paginated, filterable fleet maintenance schedules enriched with vehicle details and overdue counts. Fetches maintenance schedules scoped to the current organization, applies optional filters (vehicle_id, is_active, trigger_type, is_overdue), paginates results, joins vehicle data (including current_odometer), and computes per-schedule overdue status. Results are cached with a 5-minute stale time and 10-minute GC time. Filtering by is performed client-side after enrichment, so it may reduce the returned page size.
- params:
- options — Configuration for the hook. - filters: vehicle_id?: string; is_active?: boolean; trigger_type?: string; is_overdue?: boolean Optional filters to apply. - page: number Page number for pagination (1-based). Defaults to 1. - pageSize: number Number of items per page. Defaults to 20. - enabled: boolean If , disables the query. Defaults to true.
- returns: UseFleetMaintenanceResult - An object containing: - : Array of schedules enriched with a nested object (or ) and flag. - : Total number of schedules matching the database query (across pages). - : Number of schedules that are overdue computed from the enriched set before any filter is applied. - , , , : Standard query lifecycle controls.
- example: | const schedules, totalCount, overdueCount, refetch = useFleetMaintenance( filters: is_active: true, trigger_type: ‘both’ , page: 1, pageSize: 50,);
- score: 4
hook useFleetMaintenanceMutations
- file: src/cores/fm/hooks/useFleetMaintenanceMutations.ts:63
- kind: hook
- core: fm
- spec: (none)
- summary: Provides React Query mutation hooks for creating, updating, toggling, soft-deleting fleet maintenance schedules and for generating FM-01 work orders from schedules.
- returns: An object containing the following mutation objects:- — creates a new maintenance schedule and returns the created schedule row.- — updates an existing maintenance schedule by id and returns the updated schedule row.- — updates a schedule’s state and returns the updated schedule and its .- — creates an FM-01 work order from a schedule, updates the schedule’s last-completed and next-due fields, and returns .- — soft-deletes a schedule by setting and returns .
- example: | const createSchedule, generateWorkOrder = useFleetMaintenanceMutations();createSchedule.mutate(formValues);
- score: 4
hook useFleetMileage
- file: src/cores/fm/hooks/useFleetMileage.ts:84
- kind: hook
- core: fm
- spec: (none)
- summary: Fetches paginated fleet mileage logs for a vehicle with optional date-range filtering. Executes a Supabase-backed query to load mileage records for the provided , applies optional / filters, orders results by descending, and returns paginated results along with total count and React Query state helpers.
- params:
- options — Query options for fetching fleet mileage. - vehicleId: Vehicle identifier to filter mileage logs (required for query execution). - dateFrom: Inclusive lower bound for (ISO string). If omitted, no lower bound is applied. - dateTo: Inclusive upper bound for (ISO string). If omitted, no upper bound is applied. - page: Page index (1-based). Defaults to . - pageSize: Number of items per page. Defaults to . - enabled: Whether the query should be enabled. Defaults to ; the hook also requires an organization context to enable the query.
- returns: The hook result containing: - : Array of mileage log records for the current page. - : Total number of matching records across all pages. - : Query loading state. - : Query error state. - : Error object when the query fails. - : Function to refetch the query.
- example: | const mileageLogs, totalCount, isLoading, refetch = useFleetMileage( vehicleId: ‘veh_123’, dateFrom: ‘2025-01-01’, dateTo: ‘2025-01-31’, page: 1, pageSize: 25, enabled: true,);
- score: 4
hook useFleetMileageMutations
- file: src/cores/fm/hooks/useFleetMileageMutations.ts:47
- kind: hook
- core: fm
- spec: (none)
- summary: Provide React Query mutations to record and delete fleet mileage entries.Exposes two mutations:- : inserts a new mileage log for a vehicle, prevents inserting an odometer reading lower than the previous reading, computes and stores when applicable, and invalidates related queries on success.- : deletes a mileage log scoped to the current organization and invalidates related queries on success.Both mutations show success or destructive toasts and surface errors from the backend.
- returns: An object containing:- — a React Query mutation for recording a mileage entry.- — a React Query mutation for deleting a mileage entry.
- example: | const recordMileage, deleteMileageEntry = useFleetMileageMutations();
- score: 4
hook useFleetReservationMutations
- file: src/cores/fm/hooks/useFleetReservationMutations.ts:16
- kind: hook
- core: fm
- spec: (none)
- summary: Hook for managing fleet reservation mutations.
- score: 1
hook useFleetReservations
- file: src/cores/fm/hooks/useFleetReservations.ts:33
- kind: hook
- core: fm
- spec: FM-13-P2
- summary: Fetch fleet vehicle reservations for the current organization, enriched withvehicle and driver references and narrowed by the supplied filters.
- params:
- options — Filter options (see ).
- returns: A React Query result resolving to reservations with details.
- score: 4
hook useFleetTrendData
- file: src/cores/fm/hooks/useFleetTrendData.ts:199
- kind: hook
- core: fm
- spec: (none)
- summary: Provides monthly aggregated fleet metrics (mileage, fuel, MPG, trips) and a summary for the selected period and optional vehicle.Aggregates mileage logs, fuel logs, and trips from the current organization over the requested period and returns per-month data points plus overall totals and averages.
- params:
- options — Hook options. - period: Time range for aggregation: ‘30d’, ‘90d’, ‘6m’, or ‘1y’ (defaults to ‘6m’). - vehicleId: Optional vehicle ID to filter results to a single vehicle. - enabled: Whether the query is enabled (defaults to true).
- returns: The hook result containing (array of monthly TrendDataPoint), (TrendSummary totals/averages), loading/error state, and a function.
- example: | function MyChart() const data, summary, isLoading, isError, refetch = useFleetTrendData( period: ‘1y’ ); // render chart with and show
- score: 4
hook useFleetTripMutations
- file: src/cores/fm/hooks/useFleetTripMutations.ts:29
- kind: hook
- core: fm
- spec: (none)
- summary: Provides mutations to create, update, and soft-delete fleet trips while invalidating related queries and showing toast feedback.Exposes three React Query mutation objects for managing fleet trips:- : inserts a trip (optionally creates a mileage log) and invalidates related queries.- : updates a trip record, recalculates derived fields when appropriate, and invalidates related queries.- : marks a trip as deleted () and invalidates related queries.
- returns: An object containing the three mutation objects .
- example: | const createTrip, updateTrip, softDeleteTrip = useFleetTripMutations();createTrip.mutate(formValues);
- score: 4
hook useFleetTrips
- file: src/cores/fm/hooks/useFleetTrips.ts:74
- kind: hook
- core: fm
- spec: (none)
- summary: Fetches a paginated, optionally filtered list of fleet trips for the current organization and enriches each trip with its related vehicle and driver details.The hook returns trips for the active organization applying provided filters (vehicle, driver, trip type, date range) and pagination (page, pageSize). Each trip is augmented with and objects when available. Query caching is applied with a short stale time.
- params:
- options — Configuration for the query - filters: Filter values to apply: , , (string or string[]), , - page: 1-based page number for pagination (default: 1) - pageSize: Number of items per page (default: 20) - enabled: Whether the query should be active (default: true)
- returns: UseFleetTripsResult - An object containing: - : array of fleet trips enriched with and (or if missing) - : total number of matching trips across pages - , , , for query state management
- example: | // Basic usage inside a React componentconst trips, totalCount, isLoading, refetch = useFleetTrips( filters: trip_type: [‘delivery’, ‘pickup’], date_from: ‘2025-01-01’ , page: 2, pageSize: 50,);
- score: 4
hook useFleetVehicleDetail
- file: src/cores/fm/hooks/useFleetVehicleDetail.ts:41
- kind: hook
- core: fm
- spec: (none)
- summary: Fetches a fleet vehicle and its related entities (site, assigned driver, creator/updater profiles,recent trips, fuel/mileage logs, and active maintenance schedules) and exposes the result via React Query. Runs a consolidated query for a single fleet vehicle identified by , aggregates related records, and caches the aggregated FleetVehicleDetail result.
- params:
- options — Configuration for the hook - vehicleId: ID of the vehicle to fetch; required for the query to run - enabled: When false, disables the query (default: true)
- returns: A React Query result object containing the aggregated and query state
- example: | const data, isLoading, error = useFleetVehicleDetail( vehicleId: ‘abc-123’ );
- score: 4
hook useFleetVehicleMutations
- file: src/cores/fm/hooks/useFleetVehicleMutations.ts:40
- kind: hook
- core: fm
- spec: (none)
- summary: Provides React Query mutations for creating, updating, assigning, and soft-deleting fleet vehicles.Exposes five mutations wired to Supabase and the app context:- createVehicle: insert a new vehicle record- updateVehicle: update fields of an existing vehicle- updateStatus: update a vehicle’s status and optional notes- assignDriver: set or clear the assigned driver for a vehicle- softDeleteVehicle: mark a vehicle as deleted (sets )Each mutation validates the current user and organization, updates cache via the query client,and triggers user-facing toast notifications on success or error.
- returns: An object containing the mutation objects:- : Mutation for creating a vehicle- : Mutation for updating a vehicle- : Mutation for updating a vehicle’s status- : Mutation for assigning/unassigning a driver- : Mutation for soft-deleting a vehicle (returns the deleted vehicle id)
- example: | const createVehicle, updateVehicle = useFleetVehicleMutations();createVehicle.mutate(formValues);
- score: 4
hook useFleetVehicles
- file: src/cores/fm/hooks/useFleetVehicles.ts:69
- kind: hook
- core: fm
- spec: (none)
- summary: Loads a paginated, filterable list of fleet vehicles for the current organization and enriches each vehicle with related site and driver data. Executes a Supabase-backed query with the provided filters, pagination, and enabled flag, then fetches related sites and drivers to attach to each vehicle item.
- params:
- options — Query options. - filters: Filter set to apply (status, fuel_type, site_id, assigned_driver_id, search, year_from, year_to, registration/insurance/inspection expiring windows, etc.). - page: 1-based page number for pagination (default: 1). - pageSize: Number of items per page (default: 20). - enabled: Whether the query is enabled (default: true).
- returns: UseFleetVehiclesResult - An object containing (enriched list), , loading/error state flags, , and .
- example: | const vehicles, totalCount, isLoading, isError, refetch = useFleetVehicles( filters: status: [‘active’], search: ‘ABC123’ , page: 2, pageSize: 50,);
- score: 4
hook useFMDashboardStats
- file: src/cores/fm/hooks/useFMDashboardStats.ts:34
- kind: hook
- core: fm
- spec: none
- summary: Compute the FM module overview counts (open work orders, total assets, lowstock items, active vendors) for the current organization.
- returns: A React Query result resolving to .
- score: 5
hook useFMModuleSettings
- file: src/cores/fm/hooks/useFMModuleSettings.ts:30
- kind: hook
- core: fm
- spec: none
- summary: Reads and updates the current organization’s FM module settings, scoping thequery/mutation to the active organization from context.
- returns: — is the org’s row (or undefined until loaded); saves changes and tracks the in-flight mutation.
- score: 5
hook useInventoryDetail
- file: src/cores/fm/hooks/useInventoryDetail.ts:51
- kind: hook
- core: fm
- spec: FM-02
- summary: Fetch a single inventory item with its transaction history and per-locationstock quantities, exposed as a .
- params:
- itemId — Inventory item id; when undefined the query does not run.
- options — Query options (see ).
- returns: The item and query status (see ).
- score: 5
hook useInventoryList
- file: src/cores/fm/hooks/useInventoryList.ts:55
- kind: hook
- core: fm
- spec: FM-02
- summary: Fetch a paginated, filterable list of inventory items scoped to the currentorganization, returning the page rows and total count.
- params:
- options — Filters and pagination (see ).
- returns: The item page and query status (see ).
- score: 5
hook useInventoryLocationList
- file: src/cores/fm/hooks/useInventoryLocationList.ts:55
- kind: hook
- core: fm
- spec: FM-02
- summary: Fetch a paginated, filterable list of inventory storage locations for thecurrent organization, each joined with its parent site.
- params:
- options — Filters and pagination (see ).
- returns: The location page and query status (see ).
- score: 5
hook useInventoryMutations
- file: src/cores/fm/hooks/useInventoryMutations.ts:36
- kind: hook
- core: fm
- spec: (none)
- summary: Hook for managing inventory mutations.
- score: 1
hook useInventoryStats
- file: src/cores/fm/hooks/useInventoryStats.ts:52
- kind: hook
- core: fm
- spec: FM-02
- summary: Compute organization-scoped inventory dashboard statistics (total stockvalue plus low-stock and out-of-stock counts) for summary widgets.
- params:
- options — Query options (see ).
- returns: The stats and query status (see ).
- score: 5
hook useLatestMileage
- file: src/cores/fm/hooks/useFleetMileage.ts:151
- kind: hook
- core: fm
- spec: (none)
- summary: Fetches the most recent mileage log entry for a given vehicle. Returns the latest row from for , or when is not provided.
- params:
- vehicleId — The vehicle identifier to query mileage for; when the hook is disabled and resolves to .
- returns: The React Query result whose is the latest mileage log object (record) for the vehicle, or if none or if is not provided.
- example: | const data: latestMileage, isLoading = useLatestMileage(‘vehicle-123’);
- score: 4
hook useLinkWorkOrderToAsset
- file: src/cores/fm/hooks/useLinkWorkOrderToAsset.ts:21
- kind: hook
- core: fm
- spec: (none)
- summary: Hook for managing link work order to asset.
- score: 1
hook useMaintenanceCostReportData
- file: src/cores/fm/hooks/useAssetReportData.ts:363
- kind: hook
- core: fm
- spec: FM-05
- summary: Fetch the maintenance-cost report rows for an organization, applying thegiven filters server-side.
- params:
- organizationId — Tenant to scope the report to; query is disabled when undefined.
- filters — Maintenance-cost filter criteria (see ).
- returns: A React Query result resolving to an array of .
- score: 5
hook usePMComplianceStats
- file: src/cores/fm/hooks/usePMComplianceStats.ts:52
- kind: hook
- core: fm
- spec: FM-04
- summary: Compute organization-scoped preventive-maintenance compliance statistics(completion and overdue rates across PM schedules).
- params:
- options — Query options (see ).
- returns: The stats and query status (see ).
- score: 5
hook usePMDashboardStats
- file: src/cores/fm/hooks/usePMDashboardStats.ts:51
- kind: hook
- core: fm
- spec: FM-04
- summary: Compute organization-scoped preventive-maintenance dashboard counts (due,overdue, and upcoming PM schedules) for summary widgets.
- params:
- options — Query options (see ).
- returns: The stats and query status (see ).
- score: 5
hook usePMScheduleDetail
- file: src/cores/fm/hooks/usePMScheduleDetail.ts:54
- kind: hook
- core: fm
- spec: FM-04
- summary: Fetch a single PM schedule with its template, generated work orders, andcompletion history, exposed as a .
- params:
- options — Query options (see ).
- returns: The schedule and query status (see ).
- score: 5
hook usePMScheduleList
- file: src/cores/fm/hooks/usePMScheduleList.ts:55
- kind: hook
- core: fm
- spec: FM-04
- summary: Fetch a paginated, filterable list of PM schedules for the currentorganization, with overdue status computed per schedule.
- params:
- options — Filters and pagination (see ).
- returns: The schedule page and query status (see ).
- score: 5
hook usePMScheduleMutations
- file: src/cores/fm/hooks/usePMScheduleMutations.ts:18
- kind: hook
- core: fm
- spec: (none)
- summary: Hook for managing pmschedule mutations.
- score: 1
hook usePMTemplateDetail
- file: src/cores/fm/hooks/usePMTemplateDetail.ts:51
- kind: hook
- core: fm
- spec: FM-04
- summary: Fetch a single PM template with its checklist items and required materials,exposed as a .
- score: 5
hook usePMTemplateList
- file: src/cores/fm/hooks/usePMTemplateList.ts:67
- kind: hook
- core: fm
- spec: FM-04
- summary: Fetch a paginated, filterable list of PM templates for the currentorganization, each with rollup counts of checklist items, materials, andreferencing schedules.
- score: 5
hook usePMTemplateMutations
- file: src/cores/fm/hooks/usePMTemplateMutations.ts:26
- kind: hook
- core: fm
- spec: (none)
- summary: Hook for managing pmtemplate mutations.
- score: 1
hook useVehicleMaintenance
- file: src/cores/fm/hooks/useFleetMaintenance.ts:261
- kind: hook
- core: fm
- spec: (none)
- summary: Fetches active maintenance schedules for a specific vehicle, ordered by next due date. Queries the table for schedules that match the provided and , are active (), and are not deleted. Results are ordered by ascending.
- params:
- vehicleId — string | undefined — The ID of the vehicle to fetch maintenance schedules for; when , the hook returns an empty list and remains disabled.
- organizationId — string | undefined — The ID of the organization used to scope the query; when , the hook returns an empty list and remains disabled.
- returns: Array of maintenance schedule records for the vehicle, or an empty array when none are found.
- example: | const data: schedules, isLoading, isError = useVehicleMaintenance(‘vehicle-123’, ‘org-456’);
- score: 4
hook useVehicleTrips
- file: src/cores/fm/hooks/useFleetTrips.ts:210
- kind: hook
- core: fm
- spec: (none)
- summary: Retrieve recent trips for a single vehicle, each including basic driver details. Queries the table for non-deleted trips matching the provided and , ordered by descending and limited to rows. Each returned trip contains an embedded object with , , and . If or is missing, the hook returns an empty array and is disabled.
- params:
- vehicleId — string | undefined — The ID of the vehicle to retrieve trips for. When , the query is disabled and returns an empty array.
- organizationId — string | undefined — The ID of the organization to scope the query. When , the query is disabled and returns an empty array.
- limit — number — Maximum number of trips to return (default: 20).
- returns: Array of trip records augmented with a object () for each trip, or an empty array when or is not provided.
- example: | const data: trips, isLoading, isError = useVehicleTrips(‘vehicle-123’, ‘org-456’, 10);
- score: 4
hook useVehicleUsageStats
- file: src/cores/fm/hooks/useFleetAnalytics.ts:226
- kind: hook
- core: fm
- spec: (none)
- summary: Provide usage statistics for a vehicle over the past six months. Fetches mileage, fuel, and trip data for the given vehicle and aggregates totals, monthly breakdowns, and average MPG.
- params:
- vehicleId — string | undefined — The vehicle’s unique identifier; if the hook returns and the query is disabled.
- organizationId — string | undefined — The organization identifier used to scope data queries; if the hook returns and the query is disabled.
- returns: An object with aggregated usage statistics or when or is not provided. The object contains:- : total miles driven in the last six months- : total fuel cost in the last six months- : total number of trips in the last six months- : average MPG across fuel logs (rounded to one decimal)- : number[] of total miles for each of the last six months (oldest to newest)- : number[] of total fuel cost for each of the last six months (oldest to newest)
- example: | const data = useVehicleUsageStats(‘vehicle-123’, ‘org-456’);// data?.totalMiles - total miles for vehicle-123 over the last six months
- score: 4
hook useVendorCertificationList
- file: src/cores/fm/hooks/useVendorCertificationList.ts:53
- kind: hook
- core: fm
- spec: FM-03
- summary: Fetch vendor certifications for a vendor or organization, annotating eachwith its computed expiration status and alert level.
- score: 5
hook useVendorDetail
- file: src/cores/fm/hooks/useVendorDetail.ts:58
- kind: hook
- core: fm
- spec: FM-03
- summary: Fetch a single vendor with all relations (certifications, served sites, andassociated work orders), exposed as a .
- params:
- options — Query options (see ).
- returns: The vendor and query status (see ).
- score: 5
hook useVendorList
- file: src/cores/fm/hooks/useVendorList.ts:55
- kind: hook
- core: fm
- spec: FM-03
- summary: Fetch a paginated, filterable list of vendors scoped to the currentorganization, returning the page rows and total count.
- params:
- options — Filters and pagination (see ).
- returns: The vendor page and query status (see ).
- score: 5
hook useVendorMutations
- file: src/cores/fm/hooks/useVendorMutations.ts:28
- kind: hook
- core: fm
- spec: (none)
- summary: Hook for managing vendor mutations.
- score: 1
hook useVendorStats
- file: src/cores/fm/hooks/useVendorStats.ts:51
- kind: hook
- core: fm
- spec: FM-03
- summary: Compute organization-scoped vendor dashboard statistics (active vendor countand expiring-certification counts) for summary widgets.
- params:
- options — Query options (see ).
- returns: The stats and query status (see ).
- score: 5
hook useWorkOrderDetail
- file: src/cores/fm/hooks/useWorkOrderDetail.ts:54
- kind: hook
- core: fm
- spec: FM-01
- summary: Fetch a single work order with all relations (site, requester/assigneeprofiles, and status history), exposed as a .
- score: 5
hook useWorkOrderHistory
- file: src/cores/fm/hooks/useWorkOrderHistory.ts:51
- kind: hook
- core: fm
- spec: FM-01
- summary: Fetch the audit trail (status and field changes, each with the actingprofile) for a single work order.
- params:
- workOrderId — Work order id; when undefined the query does not run.
- options — Query options (see ).
- returns: The history and query status (see ).
- score: 5
hook useWorkOrderList
- file: src/cores/fm/hooks/useWorkOrderList.ts:55
- kind: hook
- core: fm
- spec: FM-01
- summary: Fetch a paginated, filterable list of work orders scoped to the currentorganization, returning the page rows and total count.
- params:
- options — Filters and pagination (see ).
- returns: The work order page and query status (see ).
- score: 5
hook useWorkOrderMutations
- file: src/cores/fm/hooks/useWorkOrderMutations.ts:26
- kind: hook
- core: fm
- spec: (none)
- summary: Hook for managing work order mutations.
- score: 1
hook useWorkOrderStats
- file: src/cores/fm/hooks/useWorkOrderStats.ts:55
- kind: hook
- core: fm
- spec: FM-01
- summary: Compute organization-scoped work-order dashboard statistics (counts bystatus, priority, and category) for summary widgets.
- score: 5
Components
component AssetCategoryBadge
- file: src/cores/fm/components/AssetCategoryBadge.tsx:23
- kind: component
- core: fm
- spec: FM-05
- summary: Renders an outline badge showing the human-readable label for an assetcategory (e.g. “Medical Equipment”, “Vehicle”).
- params:
- props — Component props; is the asset category to label.
- score: 5
component AssetDashboardWidget
- file: src/cores/fm/components/dashboard/AssetDashboardWidget.tsx:29
- kind: component
- core: fm
- spec: FM-05
- summary: Overview dashboard card for the asset module, combining headline asset statswith a warranty-alert count and a link into the asset register.
- params:
- props — Component props; this widget takes no props and reads asset stats and warranty alerts for the current organization from context.
- score: 5
component AssetDepreciationCalculateDialog
- file: src/cores/fm/components/AssetDepreciationCalculateDialog.tsx:55
- kind: component
- core: fm
- spec: FM-05
- summary: Dialog that previews and records a month’s depreciation for an asset,showing the projected book-value change before the user confirms.
- params:
- props — Component props; the dialog state and handler plus the target asset’s id, name, and depreciation basis fields (purchase price, current book value, salvage value, method, life, rate, and last depreciation date).
- score: 5
component AssetDepreciationSchedule
- file: src/cores/fm/components/AssetDepreciationSchedule.tsx:35
- kind: component
- core: fm
- spec: FM-05
- summary: Renders an asset’s depreciation history as a book-value line chart plus adetail table, with summary stats for total depreciation and current value.
- params:
- props — Component props; selects the asset whose depreciation history is loaded, and seeds the starting book value when no history exists yet.
- score: 5
component AssetDetailPage
- file: src/cores/fm/pages/AssetDetailPage.tsx:34
- kind: component
- core: fm
- spec: (none)
- summary: Utility for asset detail page.
- score: 1
component AssetDisposalDialog
- file: src/cores/fm/components/AssetDisposalDialog.tsx:54
- kind: component
- core: fm
- spec: FM-05
- summary: Dialog for retiring an asset: captures disposal date, method, proceeds, andnotes, then records the disposal against the asset’s lifecycle.
- params:
- props — Component props; the dialog state and handler plus the target asset’s id, name, tag, and current book value.
- score: 5
component AssetFormDialog
- file: src/cores/fm/components/AssetFormDialog.tsx:98
- kind: component
- core: fm
- spec: FM-05
- summary: Modal form for creating or editing an asset (identity, category, site,acquisition, and depreciation fields). Switches to edit mode when anexisting asset is supplied.
- params:
- props — Component props; the dialog state and handler plus an optional to edit (omit to create a new asset).
- score: 5
component AssetLocationHistory
- file: src/cores/fm/components/AssetLocationHistory.tsx:27
- kind: component
- core: fm
- spec: FM-05
- summary: Renders an asset’s move history as a chronological timeline of locationchanges, each with the moving user and reason; shows an empty state when nohistory exists.
- params:
- props — Component props; is the ordered list of location change records to display.
- score: 5
component AssetLocationUpdateDialog
- file: src/cores/fm/components/AssetLocationUpdateDialog.tsx:55
- kind: component
- core: fm
- spec: FM-05
- summary: Dialog for relocating an asset to a new site, building, and room, requiringa move reason that is appended to the asset’s location history.
- params:
- props — Component props; the dialog state and handler plus the target and its current site/building/room used to pre-populate the form.
- score: 5
component AssetMaintenanceHistoryList
- file: src/cores/fm/components/AssetMaintenanceHistoryList.tsx:31
- kind: component
- core: fm
- spec: FM-05
- summary: Lists the maintenance and work-order history for a single asset, withloading skeletons and an error state.
- params:
- props — Component props; selects the asset whose maintenance history is loaded.
- score: 5
component AssetMaintenanceSummaryWidget
- file: src/cores/fm/components/AssetMaintenanceSummaryWidget.tsx:28
- kind: component
- core: fm
- spec: FM-05
- summary: Compact widget summarizing an asset’s maintenance posture: total spend, lastand next service dates, formatted for the asset detail view.
- params:
- props — Component props; is the asset detail record whose maintenance summary fields are displayed.
- score: 5
component AssetRegisterPage
- file: src/cores/fm/pages/AssetRegisterPage.tsx:28
- kind: component
- core: fm
- spec: (none)
- summary: Utility for asset register page.
- score: 1
component AssetsPage
- file: src/cores/fm/pages/AssetsPage.tsx:28
- kind: component
- core: fm
- spec: (none)
- summary: Utility for assets page.
- score: 1
component AssetStatusBadge
- file: src/cores/fm/components/AssetStatusBadge.tsx:35
- kind: component
- core: fm
- spec: FM-05
- summary: Renders a semantically colored badge for an asset’s lifecycle status (e.g.in service, in maintenance, disposed) using the shared status-badge config.
- params:
- props — Component props; is the asset status to render.
- score: 5
component AssetTable
- file: src/cores/fm/components/AssetTable.tsx:63
- kind: component
- core: fm
- spec: FM-05
- summary: Data table of assets with tag, name, status, location, and warranty columns;rows are clickable to open the asset detail view and warranty dates arecolor-coded by expiration urgency.
- params:
- props — Component props; is the list of asset rows to render and toggles the loading state.
- score: 5
component AssetWarrantyAlertsWidget
- file: src/cores/fm/components/AssetWarrantyAlertsWidget.tsx:32
- kind: component
- core: fm
- spec: FM-05
- summary: Dashboard card listing assets with warranties or service contracts expiringsoon, grouped by urgency, with click-through to each asset.
- params:
- props — Component props; scopes the warranty-alert query to a tenant.
- score: 5
component AssignDriverDialog
- file: src/cores/fm/components/fleet/AssignDriverDialog.tsx:48
- kind: component
- core: fm
- spec: (none)
- summary: Modal dialog that lets the user assign or remove a driver for a vehicle.Renders a select listing active drivers plus an “Unassigned” option, and provides Cancel and Save actions.When opened the selection resets to the current driver; saving submits the selected driver for the given vehicle and closes the dialog on success.Accessibility: the select is labeled with a visible label and the dialog uses semantic dialog components to support keyboard and screen reader navigation.
- params:
- props — Component props - open: Whether the dialog is visible - onOpenChange: Callback invoked with the new open state (use to close the dialog) - vehicleId: ID of the vehicle to update - currentDriverId: ID of the currently assigned driver, or if unassigned
- returns: The dialog element for assigning a driver to a vehicle
- example: | AssignDriverDialog open=isDialogOpen onOpenChange=setIsDialogOpen vehicleId=“vehicle_123” currentDriverId=“driver_456”/
- score: 4
component ChangeVehicleStatusDialog
- file: src/cores/fm/components/fleet/ChangeVehicleStatusDialog.tsx:46
- kind: component
- core: fm
- spec: (none)
- summary: Displays a dialog that lets the user change a vehicle’s status and optionally provide notes.The dialog initializes its status field from , prevents submitting when the status is unchanged, and closes on a successful update.
- params:
- open — Whether the dialog is visible.
- onOpenChange — Callback invoked with the new open state; called with to close the dialog after a successful update or when the user cancels.
- vehicleId — Identifier of the vehicle to update.
- currentStatus — The vehicle’s current status; used to initialize the status field and to disable submitting unchanged status.
- returns: A JSX element rendering the change-status dialog.
- example: | ChangeVehicleStatusDialog open=isDialogOpen onOpenChange=setIsDialogOpen vehicleId=“vehicle-123” currentStatus=“in_service”/Accessibility considerations:- Form controls are labeled ( components reference the attributes on the select and textarea).- The underlying Dialog primitive should manage focus on open/close to maintain accessibility.
- score: 4
component DepreciationReportPage
- file: src/cores/fm/pages/DepreciationReportPage.tsx:38
- kind: component
- core: fm
- spec: (none)
- summary: Utility for depreciation report page.
- score: 1
component FleetAnalyticsPage
- file: src/cores/fm/pages/FleetAnalyticsPage.tsx:55
- kind: component
- core: fm
- spec: (none)
- summary: Fleet Analytics page displaying fleet KPIs, trend charts, and a per-vehicle comparison table.Renders a period selector to control the analytics timeframe, a row of KPI cards (total miles,total fuel cost, average MPG, cost per mile, total trips), two trend charts (mileage and fuel cost),and a vehicle comparison table populated from per-vehicle aggregated stats.The page derives organization context to drive data fetching and shows skeleton placeholders whiledata is loading. Selecting a different period refetches trend and vehicle stats.Accessibility:- Period selector is keyboard and screen-reader accessible via the Select component.- Chart and table components should include appropriate aria labels and table semantics (delegated to the respective chart/table components).
- example: | FleetAnalyticsPage /
- score: 5
component FleetDashboardPage
- file: src/cores/fm/pages/FleetDashboardPage.tsx:37
- kind: component
- core: fm
- spec: (none)
- summary: Renders the Fleet Management dashboard for the current organization, showing summary cards, expiration alerts, charts, and quick actions.The component fetches fleet analytics and organization context to populate stat cards, expiration warnings, vehicle status and fuel distribution charts, and a compact fleet summary.
- example: | FleetDashboardPage /Accessibility considerations:- Action buttons include visible text labels and icons for screen readers.- Charts and data visualizations should provide accessible alternatives or descriptions (ensure chart components supply appropriate ARIA attributes or captions).
- score: 5
component FleetDriverDetailPage
- file: src/cores/fm/pages/FleetDriverDetailPage.tsx:62
- kind: component
- core: fm
- spec: (none)
- summary: Page displaying a comprehensive detail view for a single fleet driver, including contact info,license/CDL details, assigned vehicles, recent trips, status controls, expiration alerts, notes,quick stats, and edit/delete workflows.Renders loading and error states, computes expiration alerts for license/CDL, and coordinatesmutations for toggling activity and soft-deleting the driver. Uses URL param to load the driver.Accessibility:- Interactive controls (buttons, tabs, dialogs) expose visible labels and follow expected keyboard focus/order.- Dialogs provide descriptive titles and confirmations for destructive actions.
- params:
- props — This component does not accept props; it reads the driver id from the current route.
- returns: The React element for the Fleet Driver detail page.
- example: | // Used directly in a routeRoute path=“/fm/fleet/drivers/:id” element=FleetDriverDetailPage / /
- score: 4
component FleetDriverFormDialog
- file: src/cores/fm/components/FleetDriverFormDialog.tsx:85
- kind: component
- core: fm
- spec: (none)
- summary: Renders a tabbed dialog for creating or editing a fleet driver record.Presents three tabs (Personal Info, License, CDL) with validated form inputs,optional linking to an organization user, and controls to create or update a driver.
- params:
- props — Component props - open: Whether the dialog is visible - onOpenChange: Callback invoked with the new open state - driver: Optional existing driver to edit; when provided the form is pre-filled
- example: | FleetDriverFormDialog open=open onOpenChange=setOpen /Accessibility: form fields include labels and semantic inputs; ensure the surroundingDialog component manages focus trapping and announces the dialog when opened.
- score: 4
component FleetFuelCostChart
- file: src/cores/fm/components/analytics/FleetFuelCostChart.tsx:39
- kind: component
- core: fm
- spec: (none)
- summary: Render a card displaying a fuel cost trend as a responsive bar chart.Shows a centered loading message when is true. When not loading,displays a placeholder if no data points have ; otherwiserenders a responsive BarChart of values over the provided s.Accessibility: chart elements include axis labels and a tooltip for value details;ensure surrounding UI provides sufficient contrast and keyboard focus handling if required.
- params:
- props — Component props - data: Array of data points to plot. Each point should include a (x-axis) and (numeric value). - isLoading: Optional flag to show the loading state.
- returns: A Card element containing the loading state, an empty-data placeholder, or the rendered fuel-cost bar chart.
- example: | FleetFuelCostChart data=[ label: ‘Jan’, fuelCost: 1200 , label: ‘Feb’, fuelCost: 950 ] isLoading=false/
- score: 4
component FleetFuelLogFormDialog
- file: src/cores/fm/components/FleetFuelLogFormDialog.tsx:85
- kind: component
- core: fm
- spec: (none)
- summary: Modal dialog for logging a fleet fuel purchase with validation, live price-per-gallon calculation, and optional pre-populated fields.Renders a form that captures vehicle, driver, purchase date, fuel type, gallons, total cost, odometer reading, station info, receipt number, and notes. Calculates and displays price per gallon when both gallons and total cost are provided. Submits the validated data via the fleet fuel mutation and closes the dialog on success. - open: Whether the dialog is open. - onOpenChange: Callback invoked with the new open state when the dialog should be opened or closed. - vehicleId: Optional preselected vehicle ID; when provided the vehicle field is fixed to this value and the vehicle list is not fetched. - driverId: Optional preselected driver ID used to initialize the driver field. - fuelType: Optional preselected fuel type used to initialize and optionally disable the fuel type field. - currentOdometer: Optional current odometer value used as the initial odometer reading placeholder/value.Accessibility considerations:- All inputs include labels and validation messages.- Date, select, and numeric controls use native input types where appropriate to improve screen reader and keyboard support.
- returns: The FleetFuelLogFormDialog React element.
- example: | FleetFuelLogFormDialog open=isDialogOpen onOpenChange=(open) = setIsDialogOpen(open) vehicleId=“vehicle-123” driverId=“driver-456” fuelType=“diesel” currentOdometer=45213/
- score: 5
component FleetFuelLogsPage
- file: src/cores/fm/pages/FleetFuelLogsPage.tsx:77
- kind: component
- core: fm
- spec: (none)
- summary: Fleet Fuel Logs page: view, filter, paginate, and add fleet fuel log records.Renders a header with actions, summary cards (total cost, gallons, avg MPG), an optional filter panel, a responsive list of fuel logs (table on desktop, cards on mobile), error and loading states, client-side pagination, and a dialog to add a new fuel log.Accessibility considerations:- Interactive controls (filters, pagination, dialog trigger) are keyboard accessible and provide visible focus states.- Tables include semantic headers; mobile cards present the same data in a stacked layout for screen readers.- Ensure aria labels are provided by consuming UI primitives where needed (e.g., dialog, tooltips, selects).
- params:
- props — Component props (none currently)
- example: | FleetFuelLogsPage /
- score: 4
component FleetMaintenanceFormDialog
- file: src/cores/fm/components/FleetMaintenanceFormDialog.tsx:107
- kind: component
- core: fm
- spec: (none)
- summary: Modal form to create or edit a fleet maintenance schedule.Renders a dialog with fields for vehicle selection, schedule name and description,trigger type (mileage, time, or both), conditional mileage/time settings (interval and next-due),active toggle, and notes. When creating, next-due values are auto-calculated from the providedintervals and current odometer; when editing, existing schedule values are populated and auto-calculation is disabled. - open: Whether the dialog is open - onOpenChange: Callback invoked with the new open state when the dialog should open/close - vehicleId: Optional preselected vehicle id (locks vehicle selection when provided) - schedule: Optional existing schedule to edit; presence switches the form into edit mode - currentOdometer: Optional current odometer used to auto-calculate next due odometer when creating
- example: | FleetMaintenanceFormDialog open=isDialogOpen onOpenChange=(v) = setIsDialogOpen(v) vehicleId=“vehicle_123” currentOdometer=45200/Accessibility notes:- The component uses a modal Dialog component that traps focus while open and returns focus when closed.- Form fields include labels and descriptive text for screen readers; ensure the surrounding Dialog implementation exposes appropriate ARIA roles.
- score: 5
component FleetMaintenancePage
- file: src/cores/fm/pages/FleetMaintenancePage.tsx:41
- kind: component
- core: fm
- spec: (none)
- summary: Utility for fleet maintenance page.
- score: 1
component FleetMileageTrendChart
- file: src/cores/fm/components/analytics/FleetMileageTrendChart.tsx:36
- kind: component
- core: fm
- spec: (none)
- summary: Renders an area chart showing fleet mileage trends with loading and empty states.Displays a card titled “Mileage Trend”. While loading, shows a centered loading message.If no data points have mileage 0, shows a centered “No mileage data available” message.Otherwise renders a responsive area chart with gradient fill, gridlines, formatted Y axis(values ≥ 1000 shown as “1k”), and a tooltip showing mileage formatted as “X miles”.
- params:
- props — Component props - data: Array of trend data points; each item must include (x-axis) and (numeric y value) - isLoading: When true, the component shows a loading state instead of the chart
- example: | FleetMileageTrendChart data=[ label: ‘Jan’, mileage: 1200 , label: ‘Feb’, mileage: 900 ] /Accessibility considerations:- All user-facing states (loading, no-data, and the chart title) are rendered as text so assistive technologies receive the current state.
- score: 4
component FleetReservationFormDialog
- file: src/cores/fm/components/FleetReservationFormDialog.tsx:44
- kind: component
- core: fm
- spec: (none)
- summary: Utility for fleet reservation form dialog.
- score: 1
component FleetReservationsPage
- file: src/cores/fm/pages/FleetReservationsPage.tsx:25
- kind: component
- core: fm
- spec: (none)
- summary: Utility for fleet reservations page.
- score: 1
component FleetTripFormDialog
- file: src/cores/fm/components/FleetTripFormDialog.tsx:98
- kind: component
- core: fm
- spec: (none)
- summary: Dialog form for logging a vehicle trip and computing mileage and cost from odometer readings.Presents a controlled dialog with fields for vehicle, driver, date, trip type, locations, purpose,start/end odometer, mileage rate, and notes. When both odometers are provided and valid, itdisplays calculated miles and trip cost. Submits trip data via the fleet trip mutation and closesthe dialog on success. The form can be pre-seeded with a selected vehicle, driver, and current odometer,and resets to sensible defaults each time the dialog opens. - open: Controls whether the dialog is visible. - onOpenChange: Callback invoked when the dialog open state should change (receives the new open boolean). - vehicleId: Optional preselected vehicle id; when provided the vehicle selector is disabled and shows the selected vehicle. - driverId: Optional preselected driver id. - currentOdometer: Optional current odometer value used to prefill the start odometer.
- example: | FleetTripFormDialog open=isDialogOpen onOpenChange=(open) = setDialogOpen(open) vehicleId=“vehicle_123” driverId=“driver_456” currentOdometer=10234/Accessibility:- Form controls are labeled and grouped; ensure the surrounding app provides keyboard and focus management for dialogs.
- score: 5
component FleetVehicleComparisonTable
- file: src/cores/fm/components/analytics/FleetVehicleComparisonTable.tsx:131
- kind: component
- core: fm
- spec: (none)
- summary: Renders a card-based comparison table of vehicle performance metrics with client-side sorting and row navigation.Displays miles, fuel cost, average MPG, cost per mile, and trip count for each vehicle. Supports sorting byany numeric column, highlights the best MPG and highest cost-per-mile with badges, and handles loading and empty states.
- params:
- props — Component props - data: Array of vehicle rows to display; each item must conform to - isLoading: When true, shows a skeleton loading state instead of the table
- example: | FleetVehicleComparisonTable data=[ id: ‘1’, vehicleNumber: ‘42’, make: ‘Ford’, model: ‘F-150’, year: 2020, totalMiles: 12000, totalFuelCost: 1500, avgMpg: 18.5, costPerMile: 0.125, tripCount: 85 ] isLoading=false/Accessibility:- Table headers for sortable columns are interactive and indicate the active sort field.- Each table row is an interactive element that navigates to /fm/fleet/vehicles/vehicle.id when activated.
- score: 4
component FleetVehicleDetailPage
- file: src/cores/fm/pages/FleetVehicleDetailPage.tsx:50
- kind: component
- core: fm
- spec: (none)
- summary: Utility for fleet vehicle detail page.
- score: 1
component FleetVehicleFormDialog
- file: src/cores/fm/components/FleetVehicleFormDialog.tsx:101
- kind: component
- core: fm
- spec: (none)
- summary: Modal dialog with a multi-tab form for creating or editing a fleet vehicle.Renders a tabbed form (Basic Info, Registration, Assignment, Other) backed by react-hook-formand validated with the vehicleFormSchema. When submitted the form calls the providedcreate or update mutation and closes the dialog on success.Accessibility notes:- Dialog uses the app’s Dialog component which manages focus trapping and ARIA attributes.- Form controls include visible labels and FormMessage placeholders for validation feedback. - open: Whether the dialog is open - onOpenChange: Callback invoked with the new open state (pass false to close) - vehicle: Existing vehicle to edit; omit or pass null to open the form in create mode
- example: | FleetVehicleFormDialog open=isDialogOpen onOpenChange=(open) = setIsDialogOpen(open) vehicle=selectedVehicle // or null to add a new vehicle/
- score: 5
component FleetVehiclesPage
- file: src/cores/fm/pages/FleetVehiclesPage.tsx:44
- kind: component
- core: fm
- spec: (none)
- summary: Utility for fleet vehicles page.
- score: 1
component FMOverview
- file: src/cores/fm/pages/FMOverview.tsx:21
- kind: component
- core: fm
- spec: (none)
- summary: Utility for fmoverview.
- score: 1
component FMSettingsForm
- file: src/cores/fm/components/FMSettingsForm.tsx:44
- kind: component
- core: fm
- spec: (none)
- summary: Utility for fmsettings form.
- score: 1
component FMSettingsPage
- file: src/cores/fm/pages/FMSettingsPage.tsx:23
- kind: component
- core: fm
- spec: (none)
- summary: Utility for fmsettings page.
- score: 1
component FuelTypeChart
- file: src/cores/fm/components/dashboard/FuelTypeChart.tsx:41
- kind: component
- core: fm
- spec: (none)
- summary: Visualizes vehicle counts per fuel type as a vertical bar chart.The component converts the provided mapping of fuel types to counts into chart entries,omitting entries with values less than or equal to zero. When no valid entries remain,it renders a centered placeholder message instead of a chart.Accessibility: Y-axis labels expose fuel type names for screen readers and the tooltipformats numeric values with the label “Vehicles”.
- params:
- props — Component props - data: Partial mapping from to vehicle count; entries with values less than or equal to zero are ignored
- returns: A React element containing the fuel-type vertical bar chart or a centered “No fuel data available” placeholder when no data is present.
- example: | FuelTypeChart data= gasoline: 12, diesel: 5, electric: 3 /
- score: 4
component InspectionsPage
- file: src/cores/fm/pages/InspectionsPage.tsx:8
- kind: component
- core: fm
- spec: (none)
- summary: Utility for inspections page.
- score: 1
component InventoryActionMenu
- file: src/cores/fm/components/InventoryActionMenu.tsx:24
- kind: component
- core: fm
- spec: (none)
- summary: Utility for inventory action menu.
- score: 1
component InventoryCategoryBadge
- file: src/cores/fm/components/InventoryCategoryBadge.tsx:20
- kind: component
- core: fm
- spec: (none)
- summary: Utility for inventory category badge.
- score: 1
component InventoryDashboardWidget
- file: src/cores/fm/components/dashboard/InventoryDashboardWidget.tsx:23
- kind: component
- core: fm
- spec: FM-02
- summary: Overview dashboard card for the inventory module, surfacing total stockvalue plus low-stock and out-of-stock counts for the current organization.
- params:
- props — Component props; this widget takes no props and reads inventory stats for the current organization from context.
- score: 5
component InventoryDetailPage
- file: src/cores/fm/pages/InventoryDetailPage.tsx:35
- kind: component
- core: fm
- spec: (none)
- summary: Utility for inventory detail page.
- score: 1
component InventoryItemFormDialog
- file: src/cores/fm/components/InventoryItemFormDialog.tsx:62
- kind: component
- core: fm
- spec: (none)
- summary: Utility for inventory item form dialog.
- score: 1
component InventoryItemSelector
- file: src/cores/fm/components/InventoryItemSelector.tsx:24
- kind: component
- core: fm
- spec: (none)
- summary: Utility for inventory item selector.
- score: 1
component InventoryLocationFormDialog
- file: src/cores/fm/components/InventoryLocationFormDialog.tsx:39
- kind: component
- core: fm
- spec: (none)
- summary: Utility for inventory location form dialog.
- score: 1
component InventoryLocationSelector
- file: src/cores/fm/components/InventoryLocationSelector.tsx:25
- kind: component
- core: fm
- spec: (none)
- summary: Utility for inventory location selector.
- score: 1
component InventoryLocationsPage
- file: src/cores/fm/pages/InventoryLocationsPage.tsx:22
- kind: component
- core: fm
- spec: (none)
- summary: Utility for inventory locations page.
- score: 1
component InventoryLocationTable
- file: src/cores/fm/components/InventoryLocationTable.tsx:24
- kind: component
- core: fm
- spec: (none)
- summary: Utility for inventory location table.
- score: 1
component InventoryPage
- file: src/cores/fm/pages/InventoryPage.tsx:27
- kind: component
- core: fm
- spec: (none)
- summary: Utility for inventory page.
- score: 1
component InventoryTable
- file: src/cores/fm/components/InventoryTable.tsx:29
- kind: component
- core: fm
- spec: (none)
- summary: Utility for inventory table.
- score: 1
component InventoryTransactionList
- file: src/cores/fm/components/InventoryTransactionList.tsx:31
- kind: component
- core: fm
- spec: (none)
- summary: Utility for inventory transaction list.
- score: 1
component InventoryTransactionTypeBadge
- file: src/cores/fm/components/InventoryTransactionTypeBadge.tsx:15
- kind: component
- core: fm
- spec: (none)
- summary: Utility for inventory transaction type badge.
- score: 1
component LinkWorkOrderToAssetDialog
- file: src/cores/fm/components/LinkWorkOrderToAssetDialog.tsx:32
- kind: component
- core: fm
- spec: (none)
- summary: Utility for link work order to asset dialog.
- score: 1
component MaintenanceCostReportPage
- file: src/cores/fm/pages/MaintenanceCostReportPage.tsx:44
- kind: component
- core: fm
- spec: (none)
- summary: Utility for maintenance cost report page.
- score: 1
component PMAssetTypeBadge
- file: src/cores/fm/components/PMAssetTypeBadge.tsx:31
- kind: component
- core: fm
- spec: (none)
- summary: Utility for pmasset type badge.
- score: 1
component PMChecklistItemsEditor
- file: src/cores/fm/components/PMChecklistItemsEditor.tsx:36
- kind: component
- core: fm
- spec: (none)
- summary: Utility for pmchecklist items editor.
- score: 1
component PMCompletionHistory
- file: src/cores/fm/components/PMCompletionHistory.tsx:21
- kind: component
- core: fm
- spec: (none)
- summary: Utility for pmcompletion history.
- score: 1
component PMComplianceDashboard
- file: src/cores/fm/components/PMComplianceDashboard.tsx:17
- kind: component
- core: fm
- spec: (none)
- summary: Utility for pmcompliance dashboard.
- score: 1
component PMDashboardWidget
- file: src/cores/fm/components/PMDashboardWidget.tsx:17
- kind: component
- core: fm
- spec: (none)
- summary: Utility for pmdashboard widget.
- score: 1
component PMFrequencyBadge
- file: src/cores/fm/components/PMFrequencyBadge.tsx:27
- kind: component
- core: fm
- spec: (none)
- summary: Utility for pmfrequency badge.
- score: 1
component PMScheduleDetailPage
- file: src/cores/fm/pages/PMScheduleDetailPage.tsx:25
- kind: component
- core: fm
- spec: (none)
- summary: Utility for pmschedule detail page.
- score: 1
component PMScheduleFormDialog
- file: src/cores/fm/components/PMScheduleFormDialog.tsx:44
- kind: component
- core: fm
- spec: (none)
- summary: Utility for pmschedule form dialog.
- score: 1
component PMSchedulesPage
- file: src/cores/fm/pages/PMSchedulesPage.tsx:21
- kind: component
- core: fm
- spec: (none)
- summary: Utility for pmschedules page.
- score: 1
component PMScheduleStatusBadge
- file: src/cores/fm/components/PMScheduleStatusBadge.tsx:26
- kind: component
- core: fm
- spec: (none)
- summary: Utility for pmschedule status badge.
- score: 1
component PMScheduleTable
- file: src/cores/fm/components/PMScheduleTable.tsx:23
- kind: component
- core: fm
- spec: (none)
- summary: Utility for pmschedule table.
- score: 1
component PMTemplateDetailPage
- file: src/cores/fm/pages/PMTemplateDetailPage.tsx:23
- kind: component
- core: fm
- spec: (none)
- summary: Utility for pmtemplate detail page.
- score: 1
component PMTemplateFormDialog
- file: src/cores/fm/components/PMTemplateFormDialog.tsx:67
- kind: component
- core: fm
- spec: (none)
- summary: Utility for pmtemplate form dialog.
- score: 1
component PMTemplateMaterialsEditor
- file: src/cores/fm/components/PMTemplateMaterialsEditor.tsx:29
- kind: component
- core: fm
- spec: (none)
- summary: Utility for pmtemplate materials editor.
- score: 1
component PMTemplatesPage
- file: src/cores/fm/pages/PMTemplatesPage.tsx:39
- kind: component
- core: fm
- spec: (none)
- summary: Utility for pmtemplates page.
- score: 1
component PMTemplateTable
- file: src/cores/fm/components/PMTemplateTable.tsx:36
- kind: component
- core: fm
- spec: (none)
- summary: Utility for pmtemplate table.
- score: 1
component RecordAdjustmentDialog
- file: src/cores/fm/components/RecordAdjustmentDialog.tsx:39
- kind: component
- core: fm
- spec: (none)
- summary: Utility for record adjustment dialog.
- score: 1
component RecordMileageDialog
- file: src/cores/fm/components/fleet/RecordMileageDialog.tsx:48
- kind: component
- core: fm
- spec: (none)
- summary: Modal dialog for recording a vehicle’s odometer reading with optional notes.Initializes the input to , validates the new reading is greater thanor equal to the current reading, and submits the record via the fleet mileage mutation. - open: Whether the dialog is open. - onOpenChange: Callback invoked with the new open state; call with to close the dialog. - vehicleId: Identifier of the vehicle to record the reading for. - currentOdometer: Current odometer reading used to initialize and validate the input.
- returns: The dialog React element for recording mileage.
- example: | RecordMileageDialog open=isDialogOpen onOpenChange=(open) = setDialogOpen(open) vehicleId=“vehicle-123” currentOdometer=12456/Accessibility:- Uses labeled form controls ( with / / ) to ensure proper association.- The numeric input enforces a equal to to communicate the valid range to assistive tech.
- score: 5
component RecordPurchaseDialog
- file: src/cores/fm/components/RecordPurchaseDialog.tsx:36
- kind: component
- core: fm
- spec: (none)
- summary: Utility for record purchase dialog.
- score: 1
component RecordTransferDialog
- file: src/cores/fm/components/RecordTransferDialog.tsx:42
- kind: component
- core: fm
- spec: (none)
- summary: Utility for record transfer dialog.
- score: 1
component RecordUsageDialog
- file: src/cores/fm/components/RecordUsageDialog.tsx:40
- kind: component
- core: fm
- spec: (none)
- summary: Utility for record usage dialog.
- score: 1
component VehicleStatusChart
- file: src/cores/fm/components/dashboard/VehicleStatusChart.tsx:39
- kind: component
- core: fm
- spec: (none)
- summary: Renders a donut chart showing the distribution of vehicles by status.The component converts the provided status counts into chart entries, filters outzero or missing counts, and displays a colored pie with a legend and tooltip.If no data is available it displays a centered “No vehicle data available” message.Accessibility: the chart uses standard Recharts components which render SVG elements;ensure surrounding context provides an accessible heading or label when used in a page.
- params:
- props — Component props - data: Partial mapping of vehicle statuses to their counts; statuses with values less than or equal to 0 are ignored
- example: | VehicleStatusChart data= active: 12, maintenance: 3, retired: 0, disposed: 1 /
- score: 4
component VendorCategoryBadge
- file: src/cores/fm/components/VendorCategoryBadge.tsx:18
- kind: component
- core: fm
- spec: (none)
- summary: Utility for vendor category badge.
- score: 1
component VendorCertificationFormDialog
- file: src/cores/fm/components/VendorCertificationFormDialog.tsx:47
- kind: component
- core: fm
- spec: (none)
- summary: Utility for vendor certification form dialog.
- score: 1
component VendorCertificationsList
- file: src/cores/fm/components/VendorCertificationsList.tsx:26
- kind: component
- core: fm
- spec: (none)
- summary: Utility for vendor certifications list.
- score: 1
component VendorDashboardWidget
- file: src/cores/fm/components/dashboard/VendorDashboardWidget.tsx:15
- kind: component
- core: fm
- spec: (none)
- summary: Utility for vendor dashboard widget.
- score: 1
component VendorDetailPage
- file: src/cores/fm/pages/VendorDetailPage.tsx:29
- kind: component
- core: fm
- spec: (none)
- summary: Utility for vendor detail page.
- score: 1
component VendorFormDialog
- file: src/cores/fm/components/VendorFormDialog.tsx:59
- kind: component
- core: fm
- spec: (none)
- summary: Utility for vendor form dialog.
- score: 1
component VendorPerformanceWidget
- file: src/cores/fm/components/VendorPerformanceWidget.tsx:17
- kind: component
- core: fm
- spec: (none)
- summary: Utility for vendor performance widget.
- score: 1
component VendorSelector
- file: src/cores/fm/components/VendorSelector.tsx:28
- kind: component
- core: fm
- spec: (none)
- summary: Utility for vendor selector.
- score: 1
component VendorsPage
- file: src/cores/fm/pages/VendorsPage.tsx:21
- kind: component
- core: fm
- spec: (none)
- summary: Utility for vendors page.
- score: 1
component VendorStatusBadge
- file: src/cores/fm/components/VendorStatusBadge.tsx:17
- kind: component
- core: fm
- spec: (none)
- summary: Utility for vendor status badge.
- score: 1
component VendorTable
- file: src/cores/fm/components/VendorTable.tsx:36
- kind: component
- core: fm
- spec: (none)
- summary: Utility for vendor table.
- score: 1
component VendorWorkOrdersList
- file: src/cores/fm/components/VendorWorkOrdersList.tsx:38
- kind: component
- core: fm
- spec: (none)
- summary: Utility for vendor work orders list.
- score: 1
component WorkOrderAssignDialog
- file: src/cores/fm/components/WorkOrderAssignDialog.tsx:32
- kind: component
- core: fm
- spec: (none)
- summary: Utility for work order assign dialog.
- score: 1
component WorkOrderAttachmentsList
- file: src/cores/fm/components/WorkOrderAttachmentsList.tsx:32
- kind: component
- core: fm
- spec: (none)
- summary: Utility for work order attachments list.
- score: 1
component WorkOrderCompleteDialog
- file: src/cores/fm/components/WorkOrderCompleteDialog.tsx:35
- kind: component
- core: fm
- spec: (none)
- summary: Utility for work order complete dialog.
- score: 1
component WorkOrderDashboardWidget
- file: src/cores/fm/components/dashboard/WorkOrderDashboardWidget.tsx:14
- kind: component
- core: fm
- spec: (none)
- summary: Utility for work order dashboard widget.
- score: 1
component WorkOrderDetailPage
- file: src/cores/fm/pages/WorkOrderDetailPage.tsx:28
- kind: component
- core: fm
- spec: (none)
- summary: Utility for work order detail page.
- score: 1
component WorkOrderFormDialog
- file: src/cores/fm/components/WorkOrderFormDialog.tsx:60
- kind: component
- core: fm
- spec: (none)
- summary: Utility for work order form dialog.
- score: 1
component WorkOrderMaterialsList
- file: src/cores/fm/components/WorkOrderMaterialsList.tsx:20
- kind: component
- core: fm
- spec: (none)
- summary: Utility for work order materials list.
- score: 1
component WorkOrderPriorityBadge
- file: src/cores/fm/components/WorkOrderPriorityBadge.tsx:27
- kind: component
- core: fm
- spec: (none)
- summary: Utility for work order priority badge.
- score: 1
component WorkOrdersPage
- file: src/cores/fm/pages/WorkOrdersPage.tsx:24
- kind: component
- core: fm
- spec: (none)
- summary: Utility for work orders page.
- score: 1
component WorkOrderStatusBadge
- file: src/cores/fm/components/WorkOrderStatusBadge.tsx:32
- kind: component
- core: fm
- spec: (none)
- summary: Utility for work order status badge.
- score: 1
component WorkOrderTable
- file: src/cores/fm/components/WorkOrderTable.tsx:32
- kind: component
- core: fm
- spec: (none)
- summary: Utility for work order table.
- score: 1
Functions & utilities
function buildInspectionReportContent
- file: src/cores/fm/templates/inspection-report-content.ts:15
- kind: function
- core: fm
- spec: (none)
- summary: Provides build inspection report content functionality.
- score: 4
function buildWorkOrderReportContent
- file: src/cores/fm/templates/work-order-report-content.ts:20
- kind: function
- core: fm
- spec: (none)
- summary: Provides build work order report content functionality.
- score: 4
function calculateDaysFromDue
- file: src/cores/fm/utils/pmValidation.ts:146
- kind: function
- core: fm
- spec: (none)
- summary: Calculate days until or past due
- score: 4
function calculateNewAverageCost
- file: src/cores/fm/utils/inventoryValidation.ts:145
- kind: function
- core: fm
- spec: (none)
- summary: Calculate new average cost after a purchase
- score: 4
function calculateNextDueDate
- file: src/cores/fm/utils/pmValidation.ts:98
- kind: function
- core: fm
- spec: (none)
- summary: Calculate next due date based on last completion and frequency
- score: 4
function calculateTotalCost
- file: src/cores/fm/utils/inventoryValidation.ts:138
- kind: function
- core: fm
- spec: (none)
- summary: Calculate total cost from quantity and unit cost
- score: 4
function canAssignVendorToWorkOrder
- file: src/cores/fm/utils/vendorValidation.ts:153
- kind: function
- core: fm
- spec: (none)
- summary: Check if a vendor can be assigned to a work order.Validates: active, approved, has valid certifications, serves the site.
- score: 4
function canAssignWorkOrder
- file: src/cores/fm/utils/workOrderValidation.ts:46
- kind: function
- core: fm
- spec: (none)
- summary: Check if a work order can be assigned (not in terminal state).
- score: 4
function canRecordUsage
- file: src/cores/fm/utils/inventoryValidation.ts:117
- kind: function
- core: fm
- spec: (none)
- summary: Check if usage can be recorded without going negative
- score: 4
function CertificationStatusBadge
- file: src/cores/fm/components/CertificationStatusBadge.tsx:28
- kind: function
- core: fm
- spec: FM-03
- summary: Renders a semantically colored badge for a vendor certification’s status(valid, expiring soon, expired, or no expiration), showing the daysremaining when a certification is expiring soon.
- params:
- props — Component props; is the certification status and is the optional countdown shown for expiring certs.
- score: 5
function comparePriorities
- file: src/cores/fm/utils/workOrderValidation.ts:96
- kind: function
- core: fm
- spec: (none)
- summary: Compare two priorities (for sorting).Returns negative if a b, positive if a b, 0 if equal.
- score: 4
function exportAssetRegisterToCSV
- file: src/cores/fm/utils/assetReportExport.ts:134
- kind: function
- core: fm
- spec: (none)
- summary: Export Asset Register to CSV
- score: 1
function exportAssetRegisterToExcel
- file: src/cores/fm/utils/assetReportExport.ts:76
- kind: function
- core: fm
- spec: (none)
- summary: Export Asset Register to ExcelExcelJS is dynamically imported to avoid bundling ~937KB for users who don’t export.
- score: 4
function exportDepreciationReportToCSV
- file: src/cores/fm/utils/assetReportExport.ts:268
- kind: function
- core: fm
- spec: (none)
- summary: Export Depreciation Report to CSV
- score: 1
function exportDepreciationReportToExcel
- file: src/cores/fm/utils/assetReportExport.ts:169
- kind: function
- core: fm
- spec: (none)
- summary: Export Depreciation Report to ExcelExcelJS is dynamically imported to avoid bundling ~937KB for users who don’t export.
- score: 4
function exportMaintenanceCostToCSV
- file: src/cores/fm/utils/assetReportExport.ts:303
- kind: function
- core: fm
- spec: (none)
- summary: Export Maintenance Cost Report to CSV
- score: 4
function exportMaintenanceCostToExcel
- file: src/cores/fm/utils/assetReportExport.ts:222
- kind: function
- core: fm
- spec: (none)
- summary: Export Maintenance Cost Report to ExcelExcelJS is dynamically imported to avoid bundling ~937KB for users who don’t export.
- score: 4
function formatDuration
- file: src/cores/fm/utils/pmValidation.ts:271
- kind: function
- core: fm
- spec: (none)
- summary: Format duration for display
- score: 1
function formatTaxId
- file: src/cores/fm/utils/vendorValidation.ts:37
- kind: function
- core: fm
- spec: (none)
- summary: Format a tax ID with proper dashes as the user types.
- score: 4
function formatVendorNumber
- file: src/cores/fm/utils/vendorValidation.ts:203
- kind: function
- core: fm
- spec: (none)
- summary: Format vendor number for display.
- score: 4
function getAssetTypeOptions
- file: src/cores/fm/utils/pmValidation.ts:68
- kind: function
- core: fm
- spec: (none)
- summary: Get asset type options for select inputs
- score: 4
function getCertificationAlertLevel
- file: src/cores/fm/utils/vendorValidation.ts:103
- kind: function
- core: fm
- spec: (none)
- summary: Get alert level for certification based on days until expiration.
- score: 4
function getCertificationStatus
- file: src/cores/fm/utils/vendorValidation.ts:90
- kind: function
- core: fm
- spec: (none)
- summary: Get certification status label based on expiration.
- params:
- cert — certification view row (expiry flags + days-until-expiration)
- expiringSoonDays — org-configurable “expiring soon” window in days; defaults to 90 (the historical hardcoded value). Sourced from (#1388).
- score: 4
function getCertificationStatusLabel
- file: src/cores/fm/utils/vendorValidation.ts:117
- kind: function
- core: fm
- spec: (none)
- summary: Get human-readable status label for certification.
- score: 4
function getComplianceTypeOptions
- file: src/cores/fm/utils/pmValidation.ts:88
- kind: function
- core: fm
- spec: (none)
- summary: Get compliance type options for select inputs
- score: 4
function getDaysUntilDue
- file: src/cores/fm/utils/workOrderValidation.ts:116
- kind: function
- core: fm
- spec: (none)
- summary: Get days until due (negative if overdue).
- score: 4
function getFrequencyOptions
- file: src/cores/fm/utils/pmValidation.ts:58
- kind: function
- core: fm
- spec: (none)
- summary: Get frequency options for select inputs
- score: 4
function getNextValidStatuses
- file: src/cores/fm/utils/workOrderValidation.ts:39
- kind: function
- core: fm
- spec: (none)
- summary: Get all valid next statuses from current status.
- score: 4
function getPriorityWeight
- file: src/cores/fm/utils/workOrderValidation.ts:88
- kind: function
- core: fm
- spec: (none)
- summary: Get priority weight for sorting.
- score: 4
function getScheduleStatusOptions
- file: src/cores/fm/utils/pmValidation.ts:78
- kind: function
- core: fm
- spec: (none)
- summary: Get schedule status options for select inputs
- score: 4
function getScheduleUrgency
- file: src/cores/fm/utils/pmValidation.ts:159
- kind: function
- core: fm
- spec: (none)
- summary: Get urgency level based on days until due
- score: 4
function getUrgencyBadgeVariant
- file: src/cores/fm/utils/pmValidation.ts:185
- kind: function
- core: fm
- spec: (none)
- summary: Get urgency badge variant
- score: 1
function getUrgencyColorClass
- file: src/cores/fm/utils/pmValidation.ts:169
- kind: function
- core: fm
- spec: (none)
- summary: Get urgency color classes
- score: 1
function isLowStock
- file: src/cores/fm/utils/inventoryValidation.ts:124
- kind: function
- core: fm
- spec: (none)
- summary: Check if an item is low on stock
- score: 4
function isOpenStatus
- file: src/cores/fm/utils/workOrderValidation.ts:60
- kind: function
- core: fm
- spec: (none)
- summary: Check if a work order is in an active/open state.
- score: 4
function isOutOfStock
- file: src/cores/fm/utils/inventoryValidation.ts:131
- kind: function
- core: fm
- spec: (none)
- summary: Check if an item is out of stock
- score: 4
function isOverdue
- file: src/cores/fm/utils/workOrderValidation.ts:107
- kind: function
- core: fm
- spec: (none)
- summary: Check if a work order is overdue.
- score: 4
function isScheduleOverdue
- file: src/cores/fm/utils/pmValidation.ts:134
- kind: function
- core: fm
- spec: (none)
- summary: Check if a PM schedule is overdue
- score: 4
function isTerminalStatus
- file: src/cores/fm/utils/workOrderValidation.ts:53
- kind: function
- core: fm
- spec: (none)
- summary: Check if a status is terminal (no further transitions allowed).
- score: 4
function isValidStatusTransition
- file: src/cores/fm/utils/workOrderValidation.ts:31
- kind: function
- core: fm
- spec: (none)
- summary: Check if a status transition is valid.
- score: 4
function LowStockIndicator
- file: src/cores/fm/components/LowStockIndicator.tsx:18
- kind: function
- core: fm
- spec: (none)
- summary: Utility for low stock indicator.
- score: 1
function maskTaxId
- file: src/cores/fm/utils/vendorValidation.ts:59
- kind: function
- core: fm
- spec: (none)
- summary: Mask a tax ID for display (show only last 4 digits for security).
- score: 4
function requiresAction
- file: src/cores/fm/utils/workOrderValidation.ts:67
- kind: function
- core: fm
- spec: (none)
- summary: Check if a work order requires action (submitted but not assigned).
- score: 4
function validateAdjustment
- file: src/cores/fm/utils/inventoryValidation.ts:98
- kind: function
- core: fm
- spec: (none)
- summary: Validate adjustment transaction data
- score: 4
function validateCertificationForm
- file: src/cores/fm/utils/vendorValidation.ts:269
- kind: function
- core: fm
- spec: (none)
- summary: Validate certification form data.
- score: 4
function validatePMScheduleForm
- file: src/cores/fm/utils/pmValidation.ts:241
- kind: function
- core: fm
- spec: (none)
- summary: Validate PM schedule form values
- score: 4
function validatePMTemplateForm
- file: src/cores/fm/utils/pmValidation.ts:203
- kind: function
- core: fm
- spec: (none)
- summary: Validate PM template form values
- score: 4
function validatePurchase
- file: src/cores/fm/utils/inventoryValidation.ts:33
- kind: function
- core: fm
- spec: (none)
- summary: Validate purchase transaction data
- score: 4
function validateTaxId
- file: src/cores/fm/utils/vendorValidation.ts:18
- kind: function
- core: fm
- spec: (none)
- summary: Validate a tax ID based on type.EIN format: XX-XXXXXXXSSN format: XXX-XX-XXXX
- score: 4
function validateTransfer
- file: src/cores/fm/utils/inventoryValidation.ts:71
- kind: function
- core: fm
- spec: (none)
- summary: Validate transfer transaction data
- score: 4
function validateUsage
- file: src/cores/fm/utils/inventoryValidation.ts:52
- kind: function
- core: fm
- spec: (none)
- summary: Validate usage transaction data
- score: 4
function validateVendorForm
- file: src/cores/fm/utils/vendorValidation.ts:233
- kind: function
- core: fm
- spec: (none)
- summary: Validate vendor form data.
- score: 1
function validateWorkOrderForm
- file: src/cores/fm/utils/workOrderValidation.ts:139
- kind: function
- core: fm
- spec: (none)
- summary: Utility for validate work order form.
- score: 1