Skip to main content

processRvoImport

@nmi-agro/fdm-source


@nmi-agro/fdm-source / fdm-rvo/src / processRvoImport

Function: processRvoImport()

processRvoImport(fdm, principal_id, b_id_farm, rvoImportReviewData, userChoices, year, onFieldAdded?): Promise<void>

Defined in: fdm-rvo/src/process.ts:46

Processes the RVO import review results by applying user-selected actions.

Iterates through the provided review items and executes the corresponding action (add, update, remove) based on the userChoices map.

Parameters

fdm

FdmType

The FDM client instance for database operations.

principal_id

string

The ID of the principal (user) performing the import.

b_id_farm

string

The ID of the farm the fields belong to.

rvoImportReviewData

RvoImportReviewItem<any>[]

The list of review items resulting from the comparison.

userChoices

UserChoiceMap

A map where keys are item IDs and values are the chosen ImportReviewAction.

year

number

The calendar year for the import context.

onFieldAdded?

(tx, b_id, geometry) => Promise<void>

Returns

Promise<void>

A promise that resolves when all actions have been processed.