@welldot/utils

getCurrentPump

Returns the current pump: the pumpinstallations entry without removedat. When several entries are open (standby pumps, data errors), the most recently installed one is returned. Returns undefined when every installation has been removed or none exists.

getCurrentPump(well): PumpInstallation | undefined

Returns the current pump: the pump_installations entry without removed_at. When several entries are open (standby pumps, data errors), the most recently installed one is returned. Returns undefined when every installation has been removed or none exists.

Parameters

well

Well

Returns

PumpInstallation | undefined