getItemId
@nmi-agro/fdm-source / fdm-rvo/src / getItemId
Function: getItemId()
getItemId(
item):string
Defined in: fdm-rvo/src/utils.ts:23
Generates a stable unique identifier for a review item.
Priority:
- Local field DB id (
b_id) — always present whenlocalFieldexists. - RVO crop field id (
CropFieldID) — always present whenrvoFieldexists. - Deterministic composite from
status,CropFieldVersion, andBeginDate— used only in the degenerate case where neither field is set.
The returned value is stable across renders for the same item, making it
safe to use as a React key and for UserChoiceMap identity comparisons.
Parameters
item
RvoImportReviewItem<any>
The review item to generate an ID for.
Returns
string
A unique string identifier for the item.